--- a/src/com/beem/project/beem/service/RosterAdapter.java Wed Apr 01 21:07:19 2009 +0200
+++ b/src/com/beem/project/beem/service/RosterAdapter.java Thu Apr 02 14:32:07 2009 +0200
@@ -4,12 +4,15 @@
package com.beem.project.beem.service;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jivesoftware.smack.Roster;
import org.jivesoftware.smack.RosterEntry;
+import org.jivesoftware.smack.RosterGroup;
import org.jivesoftware.smack.XMPPException;
import android.os.RemoteException;
@@ -86,4 +89,14 @@
return res;
}
+ @Override
+ public List<String> getGroupsNames() throws RemoteException {
+ Collection<RosterGroup> groups = mAdaptee.getGroups();
+ ArrayList<String> result = new ArrayList<String>(groups.size());
+ for (RosterGroup rosterGroup : groups) {
+ result.add(rosterGroup.getName());
+ }
+ return result;
+ }
+
}
--- a/src/com/beem/project/beem/service/aidl/IRoster.aidl Wed Apr 01 21:07:19 2009 +0200
+++ b/src/com/beem/project/beem/service/aidl/IRoster.aidl Thu Apr 02 14:32:07 2009 +0200
@@ -13,5 +13,7 @@
void createGroup(in String groupname);
List<Contact> getContactList();
+
+ List<String> getGroupsNames();
}
\ No newline at end of file