Package com.anzsoft.client.XMPP

Examples of com.anzsoft.client.XMPP.XmppPacketListener


    iq.setIQ(id.toStringNoResource(), XmppQuery.TYPE_GET, TextUtils.genUniqueId());
    Element vcardEl = iq.getDoc().createElementNS("vcard-temp", "vCard");
    vcardEl.setAttribute("version", "2.0");
    vcardEl.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN");
    iq.getNode().appendChild(vcardEl);
    JabberApp.instance().getSession().send(iq, new XmppPacketListener()
    {
      public void onPacketReceived(XmppPacket packet)
      {
        XmppID id = packet.getFromID();
        XmppVCard vcard = new XmppVCard();
View Full Code Here


        Service service = se.getSelectedItem();
       
        XmppQuery iq = session.getFactory().createQuery();
        iq.setIQ(service.getJid(), XmppQuery.TYPE_GET, TextUtils.genUniqueId());
        iq.setQuery("jabber:iq:search");
        session.send(iq, new XmppPacketListener()
        {
          public void onPacketReceived(XmppPacket iq)
          {
            if(!iq.getType().equals("result"))
              return;
View Full Code Here

    if(searchstring.isEmpty())
    {
      XmppQuery iq = session.getFactory().createQuery();
      iq.setIQ(service+"/users", XmppQuery.TYPE_GET, TextUtils.genUniqueId());
      iq.setQuery("jabber:iq:browse");
      session.send(iq,new XmppPacketListener()
      {
        public void onPacketReceived(XmppPacket packet)
        {
          onSearchResult(packet);
        }
        public void onPacketSent(XmppPacket packet)
        {
         
        }
       
      });
    }
    else
    {
      XmppQuery iq = session.getFactory().createQuery();
      iq.setIQ(service, XmppQuery.TYPE_SET, TextUtils.genUniqueId());
      Element query = iq.setQuery("jabber:iq:search");
      XmlDocument xmlDoc = XmlDocument.create("body", "foo");
      xmlDoc.loadXML("<body>"+searchstring+"</body>");
      query.appendChild(xmlDoc.documentElement().getFirstChildElement().cloneNode(true));
      session.send(iq, new XmppPacketListener()
      {
        public void onPacketReceived(XmppPacket packet)
        {
          onSearchResult(packet);
        }
View Full Code Here

  {
    XmppSession session = JabberApp.instance().getSession();
    XmppQuery query = session.getFactory().createQuery();
    query.setIQ(jid, XmppQuery.TYPE_GET, TextUtils.genUniqueId());
    query.setQuery("http://jabber.org/protocol/disco#items");
    session.send(query,new XmppPacketListener()
    {
      public void onPacketReceived(XmppPacket packet)
      {
        onRooms(packet);
      }
View Full Code Here

    XmppQuery iq = JabberApp.instance().getSession().getFactory().createQuery();
    iq.setIQ("", XmppQuery.TYPE_SET, TextUtils.genUniqueId());
    Element vcardEl = v.toXml(iq.getDoc());
    iq.getNode().appendChild(vcardEl);
   
    JabberApp.instance().getSession().send(iq, new XmppPacketListener()
    {
      public void onPacketReceived(XmppPacket packet)
      {
        publishButton.setEnabled(true);
        if(packet.getType().equals("result"))
View Full Code Here

TOP

Related Classes of com.anzsoft.client.XMPP.XmppPacketListener

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.