src/net/java/sip/communicator/impl/protocol/jabber/OperationSetContactCapabilitiesJabberImpl.java
/**
     * Fires event that contact capabilities has changed.
     * @param user the user to search for its contact.
     * @param fullJids a list of all resources of the user (full JIDs)
     */
Fires event that contact capabilities has changed.
@param user the user to search for its contact.
@param fullJids a list of all resources of the user (full JIDs)
Fires event that contact capabilities has changed . @param user the user to search for its contact . @param fullJids a list of all resources of the user ( full JIDs )
public void fireContactCapabilitiesChanged(BareJid user,
        List<Jid> fullJids)
    {
        if(!JabberActivator.getConfigurationService()
            .getBoolean(
                PROP_XMPP_USE_ALL_RESOURCES_FOR_CAPABILITIES,
                USE_ALL_RESOURCES_FOR_CAPABILITIES_DEFAULT)
            || fullJids.isEmpty())
        {
            OperationSetPresence opsetPresence
            = parentProvider.getOperationSet(OperationSetPresence.class);
            if (opsetPresence != null)
            {
                Contact contact = opsetPresence.findContactByID(user.toString());
                Presence presence =
                        Roster.getInstanceFor(parentProvider.getConnection())
                            .getPresence(user);
                if(contact != null)
                {
                    fireContactCapabilitiesEvent(
                        contact,
                        ContactCapabilitiesEvent.
                        SUPPORTED_OPERATION_SETS_CHANGED,
                        getSupportedOperationSets(user, presence.isAvailable()));
                }
            }
        }
        else
        {
            OperationSetPresence opsetPresence
            = parentProvider.getOperationSet(OperationSetPresence.class);
            if (opsetPresence != null)
            {
                Contact contact = opsetPresence.findContactByID(
                        user.asBareJid().toString());
                if(contact != null)
                {
                    fireContactCapabilitiesEvent(
                        contact,
                        ContactCapabilitiesEvent.
                        SUPPORTED_OPERATION_SETS_CHANGED,
                        getLargestSupportedOperationSet(fullJids));
                }
            }
        }
    }
public void fireContactCapabilitiesChanged ( BareJid user , List < Jid > fullJids ) { if ( ! JabberActivator . getConfigurationService ( ) . getBoolean ( PROP_XMPP_USE_ALL_RESOURCES_FOR_CAPABILITIES , USE_ALL_RESOURCES_FOR_CAPABILITIES_DEFAULT ) || fullJids . isEmpty ( ) ) { OperationSetPresence opsetPresence = parentProvider . getOperationSet ( OperationSetPresence . class ) ; if ( opsetPresence != null ) { Contact contact = opsetPresence . findContactByID ( user . toString ( ) ) ; Presence presence = Roster . getInstanceFor ( parentProvider . getConnection ( ) ) . getPresence ( user ) ; if ( contact != null ) { fireContactCapabilitiesEvent ( contact , ContactCapabilitiesEvent . SUPPORTED_OPERATION_SETS_CHANGED , getSupportedOperationSets ( user , presence . isAvailable ( ) ) ) ; } } } else { OperationSetPresence opsetPresence = parentProvider . getOperationSet ( OperationSetPresence . class ) ; if ( opsetPresence != null ) { Contact contact = opsetPresence . findContactByID ( user . asBareJid ( ) . toString ( ) ) ; if ( contact != null ) { fireContactCapabilitiesEvent ( contact , ContactCapabilitiesEvent . SUPPORTED_OPERATION_SETS_CHANGED , getLargestSupportedOperationSet ( fullJids ) ) ; } } } }
Fires event that contact capabilities has changed.
Fires event that contact capabilities has changed .
// this called by received discovery info for particular jid // so we use its online and opsets for this particular jid