Package com.anzsoft.client.XMPP

Examples of com.anzsoft.client.XMPP.XmppID


  public void getDiscoItems()
  {
    XmppQuery query = session.getFactory().createQuery();
    query.setType(XmppQuery.TYPE_GET);
    query.setID("disco_item_1");
    XmppID jid = XmppID.parseId(session.getUser().getID());
    query.setTo(jid.getDomain());
    query.setQuery("http://jabber.org/protocol/disco#items");
    session.send(query);
  }
View Full Code Here


    iq.getNode().appendChild(vcardEl);
    JabberApp.instance().getSession().send(iq, new XmppPacketListener()
    {
      public void onPacketReceived(XmppPacket packet)
      {
        XmppID id = packet.getFromID();
        XmppVCard vcard = new XmppVCard();
        if(vcard.formXml(packet.toXML()))
        {
          vcards.put(id.toStringNoResource(), vcard);
          if(listener != null)
            listener.onVCard(id,vcard);
          fireOnVCard(id,vcard);
        }
      }
View Full Code Here

 
  protected boolean iqVerify(final Element x,final XmppID to,final String id,final String xmlns)
  {
    if(!x.getTagName().equals("iq"))
      return false;
    XmppID from = XmppID.parseId(x.getAttribute("from"));
    XmppID local = XmppID.parseId(session.getUser().getID());
    XmppID server = XmppID.parseId(XmppID.parseId(session.getUser().getID()).getDomain());
   
    if(from == null)
    {
      if(to != null&&!to.equals(server))
      {
View Full Code Here

  private XmppContactStatus status;
  private Subscription subscription;
 
  public static XmppContact fromXml(Element e)
  {
    XmppID jid = XmppID.parseId(e.getAttribute("jid"));
    String subscription = e.getAttribute("subscription");
    String name = e.getAttribute("name");
    ArrayList<String> groups = XMLHelper.getSubTagsConents(e, "group");
    return new XmppContact(jid,Subscription.valueOf(subscription),name,groups);
   
View Full Code Here

    {
      public void onPresenceReceived(XmppPresence presence)
      {
        try
        {
          XmppID id = presence.getFromID();
          String jid = id.toStringNoResource();
          String type = presence.getType();
          if(type != null&&(type.equals("subscribe")||type.equals("subscribed")||type.equals("unsubscribe")||type.equals("unsubscribed")))
          {
            onSubscription(id,type,presence.getNick());
            return;
View Full Code Here

TOP

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

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.