From e5ea043798272131b3292d0468d683c6472ac85d Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Fri, 4 Nov 2005 18:31:21 +0000 Subject: [PATCH] Modified RosterListener to fire more specific events when entries are added, deleted or modified. SMACK-106 git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@3032 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/Roster.java | 29 ++++++++++++++++--- .../jivesoftware/smack/RosterListener.java | 22 ++++++++++++-- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/source/org/jivesoftware/smack/Roster.java b/source/org/jivesoftware/smack/Roster.java index 98c50a7ad..614dcb0be 100644 --- a/source/org/jivesoftware/smack/Roster.java +++ b/source/org/jivesoftware/smack/Roster.java @@ -549,16 +549,25 @@ public class Roster { } /** - * Fires roster changed event to roster listeners. + * Fires roster changed event to roster listeners indicating that the + * specified collections of contacts have been added, updated or deleted + * from the roster. + * + * @param addedEntries the collection of address of the added contacts. + * @param updatedEntries the collection of address of the updated contacts. + * @param deletedEntries the collection of address of the deleted contacts. */ - private void fireRosterChangedEvent() { + private void fireRosterChangedEvent(Collection addedEntries, Collection updatedEntries, + Collection deletedEntries) { RosterListener [] listeners = null; synchronized (rosterListeners) { listeners = new RosterListener[rosterListeners.size()]; rosterListeners.toArray(listeners); } for (int i=0; i