src/net/java/sip/communicator/impl/protocol/jabber/OperationSetPersistentPresenceJabberImpl.java
/**
     * Fires provider status change.
     *
     * @param oldStatus old status
     * @param newStatus new status
     */
Fires provider status change.
@param oldStatus old status
@param newStatus new status
Fires provider status change . @param oldStatus old status @param newStatus new status
@Override
    public void fireProviderStatusChangeEvent(
        PresenceStatus oldStatus,
        PresenceStatus newStatus)
    {
        if (!oldStatus.equals(newStatus))
        {
            currentStatus = newStatus;
            super.fireProviderStatusChangeEvent(oldStatus, newStatus);
            PresenceStatus offlineStatus =
                    parentProvider.getJabberStatusEnum().getStatus(
                        JabberStatusEnum.OFFLINE);
            if(newStatus.equals(offlineStatus))
            {
                Iterator<ContactGroup> groupsIter =
                    getServerStoredContactListRoot().subgroups();
                while(groupsIter.hasNext())
                {
                    ContactGroup group = groupsIter.next();
                    Iterator<Contact> contactsIter = group.contacts();
                    while(contactsIter.hasNext())
                    {
                        ContactJabberImpl contact
                            = (ContactJabberImpl)contactsIter.next();
                        updateContactStatus(contact, offlineStatus);
                    }
                }
                Iterator<Contact> contactsIter
                    = getServerStoredContactListRoot().contacts();
                while (contactsIter.hasNext())
                {
                    ContactJabberImpl contact
                        = (ContactJabberImpl) contactsIter.next();
                    updateContactStatus(contact, offlineStatus);
                }
            }
        }
    }
@ Override public void fireProviderStatusChangeEvent ( PresenceStatus oldStatus , PresenceStatus newStatus ) { if ( ! oldStatus . equals ( newStatus ) ) { currentStatus = newStatus ; super . fireProviderStatusChangeEvent ( oldStatus , newStatus ) ; PresenceStatus offlineStatus = parentProvider . getJabberStatusEnum ( ) . getStatus ( JabberStatusEnum . OFFLINE ) ; if ( newStatus . equals ( offlineStatus ) ) { Iterator < ContactGroup > groupsIter = getServerStoredContactListRoot ( ) . subgroups ( ) ; while ( groupsIter . hasNext ( ) ) { ContactGroup group = groupsIter . next ( ) ; Iterator < Contact > contactsIter = group . contacts ( ) ; while ( contactsIter . hasNext ( ) ) { ContactJabberImpl contact = ( ContactJabberImpl ) contactsIter . next ( ) ; updateContactStatus ( contact , offlineStatus ) ; } } Iterator < Contact > contactsIter = getServerStoredContactListRoot ( ) . contacts ( ) ; while ( contactsIter . hasNext ( ) ) { ContactJabberImpl contact = ( ContactJabberImpl ) contactsIter . next ( ) ; updateContactStatus ( contact , offlineStatus ) ; } } } }
Fires provider status change.
Fires provider status change .
//send event notifications saying that all our buddies are //offline. The protocol does not implement top level buddies //nor subgroups for top level groups so a simple nested loop //would be enough. //do the same for all contacts in the root group