Package nu.fw.jeti.jabber.elements

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


            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

    }
  }

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

   * @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

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

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.