Package nu.fw.jeti.jabber.elements

Examples of nu.fw.jeti.jabber.elements.InfoQuery


        try {
          sha = MessageDigest.getInstance("SHA");
        } catch (Exception ex){
          Log.error(I18N.gettext("main.loginstatus.Could_not_login_with_SHA"));
          //TODO remove lowercase if filetransfer bug fixed
          output.send(new InfoQuery(null,"set",authenticationId,new IQAuth(loginInfo.getUsername().toLowerCase(),loginInfo.getPassword() ,loginInfo.getResource())));
          return;
        }

        sha.update(connectionID.getBytes());
        String digest = Utils.toString(sha.digest(loginInfo.getPassword().getBytes()));
        IQAuthBuilder iqab =  new IQAuthBuilder();
        iqab.digest = digest;
//          TODO remove lowercase if filetransfer bug fixed
        iqab.username = loginInfo.getUsername().toLowerCase();
        iqab.resource = loginInfo.getResource();
        output.send(new InfoQuery(null,"set",authenticationId,(IQExtension)iqab.build()));
      }
      else
      {
        if(!loginInfo.isSSl())
        {
          int option = JOptionPane.showConfirmDialog(null,
              I18N.gettext("main.loginstatus.Sending_password_as_plain_text_over_an_unencrypted_connection,_continue?"),"Plain text",JOptionPane.YES_NO_OPTION);
          if (option == JOptionPane.NO_OPTION)
          {
            sendLoginError("Sending password in plain not allowed");
            return;
          }
        }
//        TODO remove lowercase if filetransfer bug fixed
        output.send(new InfoQuery(null,"set",authenticationId,new IQAuth(loginInfo.getUsername().toLowerCase(),loginInfo.getPassword() ,loginInfo.getResource())));
      }
    }
  }
View Full Code Here


          }
        }
      }
      public void discoveryInfoResult(JID jid, DiscoveryInfo info) {}
    });
    output.send(new InfoQuery("get",new IQPrivate(new JetiPrivateExtension())));
    output.send(new InfoQuery("get",new IQXRoster()));
    if(show == Presence.NONE)
    {
      show = Presence.AVAILABLE;
      //status = Presence.toLongShow(show);
    }
View Full Code Here

    Avatars avatars = getAvatarInterface();
    if(avatars!=null)
    {
      avatars.getVCard(this);
    }
    send(new InfoQuery("get",new IQPrivate(new JetiPrivateRosterExtension())));
    for(Iterator<JETIListener> j =backend.getListeners(nu.fw.jeti.events.StatusChangeListener.class);j.hasNext();)
    {//online
      ((nu.fw.jeti.events.StatusChangeListener)j.next()).connectionChanged(true);
    }
    sendLoginStatus(5);
View Full Code Here

          {
            JOptionPane.showMessageDialog(JUDChooser.this, e1.getMessage());
            return;
          }
        }
        backend.send(new InfoQuery(server,"get",new IQSearch()));
        dispose();
      }
    });
    getRootPane().setDefaultButton(btnOK);
        getContentPane().setLayout(new GridBagLayout());
View Full Code Here

      catch(NumberFormatException e2)
      {
        refresh = 60;
      }
    }
    backend.send(new InfoQuery(jidStatus.getCompleteJID(),"set",new IQCam(new IQXOOB(url,txtDescription.getText()),refresh)));
    dispose();
  }
View Full Code Here

      {
        //backend.changeGroup(jidStatus,currentGroup,group);
        groups.remove(currentGroup);
        groups.add(group);
        IQXRoster roster = new IQXRoster(new RosterItem(jidStatus.getJID(), jidStatus.getNick(), null, null, groups));
        backend.send(new InfoQuery("set", roster));
      } else
      {
        if (!jidStatus.isGroupPresent(group))
        {
          groups.add(group);
          IQXRoster roster = new IQXRoster(new RosterItem(jidStatus.getJID(), jidStatus.getNick(), null, null, groups));
          backend.send(new InfoQuery("set", roster));
          //backend.addGroup(jidStatus,group);
        }
      }
    }
    this.dispose();
View Full Code Here

                 Preferences.getInteger("filetransfer","port",7777),null));
        startSocksServer(file, backend, jid);
        }
      }
             
      backend.send(new InfoQuery(jid,"set",backend.getIdentifier(),new Socks5Extension(sid,streamHosts)),
    new IQResultListener()
    {
      public void iqResult(InfoQuery iq)
      {
        if(iq.getType().equals("result"))
View Full Code Here

    return !proxies.isEmpty();
  }
 
  private static void getProxyInfo(final Backend backend,JID jid)
  {
    backend.send(new InfoQuery(jid,"get",new Socks5Extension((JID)null,null)), new IQResultListener()
    {
      public void iqResult(InfoQuery iq)
      {
        Socks5Extension s = (Socks5Extension)iq.getIQExtension();
        if(s!=null && s.hasStreamHosts())
View Full Code Here

                 
         
          final SocksSocket s = new SocksSocket(new Socks5Proxy(streamHost.getHost(),streamHost.getPort()),digest,0);
    //      TODO get sid?
          final StreamHost chosenStreamHost = streamHost;
          backend.send(new InfoQuery(streamHostID,"set",backend.getIdentifier(),
          new Socks5Extension(sid,targetJID)),new IQResultListener()
          {
            public void iqResult(InfoQuery iq)
            {
              if(iq.getType().equals("result"))sendFile(s);
View Full Code Here

        try{
          //Proxy p = new Socks5Proxy("192.168.10.2",5080);
          //TODO add timeout 
          s = new SocksSocket(new Socks5Proxy(streamHost.getHost(),streamHost.getPort()),digest,0);
  //        check if connection is open
          backend.send(new InfoQuery(iq.getFrom(),"result",iq.getID(),
                new Socks5Extension(streamHost.getJID(),null)));
          break;
        }
        catch (IOException e2)
        {
View Full Code Here

TOP

Related Classes of nu.fw.jeti.jabber.elements.InfoQuery

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.