diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-05-09 15:48:45 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2009-05-09 15:48:45 +0000 |
commit | 40def246c4738ab515229bf4e81ce441293c9cf3 (patch) | |
tree | 526db39fa8adfae23868f676c159ff39ca776ff9 /src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java | |
parent | 872661ae0607cd6ab1303f82800e729416a89cf6 (diff) | |
download | jitsi-40def246c4738ab515229bf4e81ce441293c9cf3.zip jitsi-40def246c4738ab515229bf4e81ce441293c9cf3.tar.gz jitsi-40def246c4738ab515229bf4e81ce441293c9cf3.tar.bz2 |
Eliminates duplication, fixes raw-type warnings.
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java index e5cc4fe..dde17b8 100644 --- a/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetPersistentPresenceYahooImpl.java @@ -52,12 +52,6 @@ public class OperationSetPersistentPresenceYahooImpl private Vector providerPresenceStatusListeners = new Vector(); /** - * The list of presence status listeners interested in receiving presence - * notifications of changes in status of contacts in our contact list. - */ - private Vector contactPresenceStatusListeners = new Vector(); - - /** * Sometimes status changes are received before the contact list is inited * here we store such events so we can show them correctly */ @@ -150,22 +144,6 @@ public class OperationSetPersistentPresenceYahooImpl } /** - * Registers a listener that would receive a presence status change event - * every time a contact, whose status we're subscribed for, changes her - * status. - * - * @param listener the listener that would received presence status - * updates for contacts. - */ - public void addContactPresenceStatusListener(ContactPresenceStatusListener - listener) - { - synchronized(contactPresenceStatusListeners){ - this.contactPresenceStatusListeners.add(listener); - } - } - - /** * Adds a listener that would receive events upon changes of the provider * presence status. * @@ -487,20 +465,6 @@ public class OperationSetPersistentPresenceYahooImpl } /** - * Removes the specified listener so that it won't receive any further - * updates on contact presence status changes - * - * @param listener the listener to remove. - */ - public void removeContactPresenceStatusListener( - ContactPresenceStatusListener listener) - { - synchronized(contactPresenceStatusListeners){ - contactPresenceStatusListeners.remove(listener); - } - } - - /** * Unregisters the specified listener so that it does not receive further * events upon changes in local presence status. * @@ -921,43 +885,6 @@ public class OperationSetPersistentPresenceYahooImpl } } - /** - * Notify all contact presence listeners of the corresponding event change - * @param contact the contact that changed its status - * @param oldStatus the status that the specified contact had so far - * @param newStatus the status that the specified contact is currently in. - * @param parentGroup the group containing the contact which caused the event - */ - private void fireContactPresenceStatusChangeEvent( - Contact contact, - ContactGroup parentGroup, - PresenceStatus oldStatus, - PresenceStatus newStatus) - { - ContactPresenceStatusChangeEvent evt = - new ContactPresenceStatusChangeEvent( - contact, parentProvider, parentGroup, oldStatus, newStatus); - - - logger.debug("Dispatching Contact Status Change. Listeners=" - + contactPresenceStatusListeners.size() - + " evt=" + evt); - - Iterator listeners = null; - synchronized (contactPresenceStatusListeners) - { - listeners = new ArrayList(contactPresenceStatusListeners).iterator(); - } - - while (listeners.hasNext()) - { - ContactPresenceStatusListener listener - = (ContactPresenceStatusListener) listeners.next(); - - listener.contactPresenceStatusChanged(evt); - } - } - private void handleContactStatusChange(YahooUser yFriend) { ContactYahooImpl sourceContact = |