Add getGroupIds() to DBUS
getGroupIds() returns a list of group ids (byte arrays)
This commit is contained in:
parent
86f5c9947b
commit
bdffcffd7a
@ -23,6 +23,8 @@ public interface Signal extends DBusInterface {
|
||||
|
||||
void setContactName(String number, String name);
|
||||
|
||||
List<byte[]> getGroupIds();
|
||||
|
||||
String getGroupName(byte[] groupId);
|
||||
|
||||
List<String> getGroupMembers(byte[] groupId);
|
||||
|
@ -818,6 +818,16 @@ class Manager implements Signal {
|
||||
save();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<byte[]> getGroupIds() {
|
||||
List<GroupInfo> groups = getGroups();
|
||||
List<byte[]> ids = new ArrayList<byte[]>(groups.size());
|
||||
for (GroupInfo group : groups) {
|
||||
ids.add(group.groupId);
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGroupName(byte[] groupId) {
|
||||
GroupInfo group = getGroup(groupId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user