Package nu.fw.jeti.plugins.filetransfer

Examples of nu.fw.jeti.plugins.filetransfer.GetFileWindow


  public void execute(InfoQuery iq, Backend backend)
  {
    if(iq.getType().equals("set"))
    {
      GetFileWindow w = Plugin.getGetFile(iq.getFrom(),sid);
      if(w==null) Log.xmlReceivedError("Socks stream from unknown");
      else
      {
        w.startDownloading(new ReceiveSocks5(backend,iq,w));
      }
    }
  }
View Full Code Here


 
 
  public void execute(Packet iq, Backend backend)
  {
    //System.out.println(getSid());
    GetFileWindow w= (GetFileWindow)fileWindows.get(sid);
    if(w==null)
    {
      Log.xmlReceivedError("ibb stream from unknown");
    }
    else
    {
      IBBReceive r= (IBBReceive)w.getStreamReceive();
      r.addData(getData());
    }
  }
View Full Code Here

    {
      //Plugin.ibb(iq.getFrom(),this);
           
      if(isOpen())
      {
        GetFileWindow w= Plugin.getGetFile(iq.getFrom(),getSid());
        if(w!=null)
        {//file accepted by filetransfer protocol;
          //System.out.println(getSid());
          w.startDownloading(new IBBReceive(iq.getFrom(),getSid(),backend,w));
          fileWindows.put(getSid(),w);
          backend.send(new InfoQuery(iq.getFrom(),"result",iq.getID(),null));
          Log.xmlReceivedError("ibb stream init from unknown");
        }
        else
        {
          XMPPError e = new XMPPError("cancel",501);
          e.addError(new XMPPErrorTag("feature-not-implemented"));
          backend.send(new InfoQuery(iq.getFrom(),iq.getID(),e));
        }
      }
      if(isClose())
      {
        GetFileWindow w=  (GetFileWindow) fileWindows.remove(sid);
        if(w!=null)((IBBReceive)w.getStreamReceive()).stopDownloading();
        //System.out.println(" close  " + sid);
        backend.send(new InfoQuery(iq.getFrom(),"result",iq.getID(),null));
      }
    }
  }
View Full Code Here

TOP

Related Classes of nu.fw.jeti.plugins.filetransfer.GetFileWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.