Examples of IQDiscoInfo


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

    return jidCapabilities;
  }
 
  public void discoveryInfoResult(JID jid, DiscoveryInfo info){
    if(!info.hasFeatures())return;
    IQDiscoInfo disco = (IQDiscoInfo)info;
    cache.put(disco.getNode(), disco);
    getJIDCapabilities(jid).addCapabilities(disco);
  }
View Full Code Here

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

            else discoHandler.startElement(qName, attr);
        }
       
        public void endElement(String uri, String localName, String qName){
          if(qName.equals("query")){
            IQDiscoInfo info = (IQDiscoInfo) discoHandler.build();
            queries.put(info.getNode(),info);
          }
        }
View Full Code Here

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

    }
  }

  public Extension build()
  {
    return new IQDiscoInfo(node,identities,features);
  }
View Full Code Here

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

   * @param info The disco#info packet
   */
  public void answerInfoRequest(InfoQuery iq, IQDiscoInfo info){
    List identities = new LinkedList();
    identities.add(new DiscoIdentity("client","pc",null));
    IQDiscoInfo returnInfo = null;
    String node = info.getNode();
    if(("http://jeti.jabberstudio.org/caps#"+Start.VERSION).equals(node)){
      returnInfo = new IQDiscoInfo(info.getNode(),identities,coreFeatures);
    }
    else if(node!=null && node.startsWith("http://jeti.jabberstudio.org/caps#")){
      List list =(List) capabilities.get(node.substring(node.lastIndexOf('#')+1,node.length()));
      if(list!=null) returnInfo = new IQDiscoInfo(node,identities,list);
    }
    else returnInfo = new IQDiscoInfo(node,identities,features);
   
    backend.send(new InfoQuery(iq.getFrom(),"result",iq.getID(),returnInfo));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.