src/net/java/sip/communicator/impl/protocol/jabber/ScServiceDiscoveryManager.java
/**
     * Handles incoming presence packets and maps jids to node#ver strings.
     *
     * @param packet the incoming presence <tt>Packet</tt> to be handled
     */
Handles incoming presence packets and maps jids to node#ver strings.
@param packet the incoming presence Packet to be handled
Handles incoming presence packets and maps jids to node#ver strings . @param packet the incoming presence Packet to be handled
@Override
    public void processStanza(Stanza packet)
    {
        boolean online
            = (packet instanceof Presence)
                && ((Presence) packet).isAvailable();
        CapsExtension ext =  packet.getExtension(
            CapsExtension.ELEMENT, CapsExtension.NAMESPACE);
        if(ext != null && online)
        {
            addUserCapsNode(packet.getFrom(), ext.getNode(), ext.getVer());
        }
        else if (!online)
        {
            removeUserCapsNode(packet.getFrom());
        }
    }
@ Override public void processStanza ( Stanza packet ) { boolean online = ( packet instanceof Presence ) && ( ( Presence ) packet ) . isAvailable ( ) ; CapsExtension ext = packet . getExtension ( CapsExtension . ELEMENT , CapsExtension . NAMESPACE ) ; if ( ext != null && online ) { addUserCapsNode ( packet . getFrom ( ) , ext . getNode ( ) , ext . getVer ( ) ) ; } else if ( ! online ) { removeUserCapsNode ( packet . getFrom ( ) ) ; } }
Handles incoming presence packets and maps jids to node#ver strings.
Handles incoming presence packets and maps jids to node#ver strings .
// Check it the packet indicates  that the user is online. We // will use this information to decide if we're going to send // the discover info request.