Methods
SetContactGroups | (u: Contact, as: Groups) | → | nothing | |
SetGroupMembers | (s: Group, au: Members) | → | nothing | |
AddToGroup | (s: Group, au: Members) | → | nothing | |
RemoveFromGroup | (s: Group, au: Members) | → | nothing | |
RemoveGroup | (s: Group) | → | nothing | |
RenameGroup | (s: Old_Name, s: New_Name) | → | nothing |
Signals
GroupsCreated | (as: Names) | |
GroupRenamed | (s: Old_Name, s: New_Name) | |
GroupsRemoved | (as: Names) | |
GroupsChanged | (au: Contact, as: Added, as: Removed) |
Properties
DisjointGroups | b | Read only | |
GroupStorage | u (Contact_Metadata_Storage_Type) | Read only | |
Groups | as | Read only |
Contact Attributes
org.freedesktop.Telepathy.Connection.Interface.ContactGroups.DRAFT/groups | as |
Description
An interface for connections in which contacts can be placed in user-defined groups.
Methods
SetContactGroups (u: Contact, as: Groups) → nothing
Parameters
- Contact — u (Contact_Handle)
- Groups — as
Add the given contact to the given groups (creating new groups if necessary), and remove them from all other groups.
Rationale:
If the user is removed from a group of which they were the only member, the group MAY be removed automatically.
Rationale:
Any GroupsCreated, GroupsChanged and GroupsRemoved signals that result from this method call MUST be emitted before the method returns.
Possible Errors
- Disconnected
- Invalid Handle
- Network Error
- Not Available
- Not Implemented
Rationale:
SetGroupMembers (s: Group, au: Members) → nothing
Parameters
- Group — s
- Members — au (Contact_Handle_List)
Add the given members to the given group (creating it if necessary), and remove all other members.
Rationale:
If DisjointGroups is true, this will also remove each member from their previous group.
If the user is removed from a group of which they were the only member, the group MAY be removed automatically.
Any GroupsCreated, GroupsChanged and GroupsRemoved signals that result from this method call MUST be emitted before the method returns.
Possible Errors
- Disconnected
- Invalid Handle
- Network Error
- Not Implemented
Rationale:
AddToGroup (s: Group, au: Members) → nothing
Parameters
- Group — s
- Members — au (Contact_Handle_List)
Add the given members to the given group, creating it if necessary.
If DisjointGroups is true, this will also remove each member from their previous group.
Rationale:
Any GroupsCreated, GroupsChanged and GroupsRemoved signals that result from this method call MUST be emitted before the method returns.
Possible Errors
- Disconnected
- Invalid Handle
- Network Error
- Not Implemented
Rationale:
RemoveFromGroup (s: Group, au: Members) → nothing
Parameters
- Group — s
- Members — au (Contact_Handle_List)
Remove the given members from the given group.
Rationale:
Any GroupsChanged or GroupsRemoved signals that result from this method call MUST be emitted before the method returns.
Possible Errors
- Disconnected
- Invalid Handle
- Network Error
- Not Implemented
Rationale:
RemoveGroup (s: Group) → nothing
Parameters
- Group — s
Remove all members from the given group, then remove the group itself. If the group already does not exist, this method SHOULD return successfully.
Any GroupsChanged or GroupsRemoved signals that result from this method call MUST be emitted before the method returns.
Possible Errors
- Disconnected
- Network Error
- Not Implemented
Rationale:
RenameGroup (s: Old_Name, s: New_Name) → nothing
Parameters
- Old_Name — s
- New_Name — s
Rename the given group.
On protocols where groups behave like tags, this is an API short-cut for adding all of the group's members to a group with the new name, then removing the old group.
Rationale:
Any GroupRenamed or GroupsRemoved signals that result from this method call MUST be emitted before the method returns.
Possible Errors
- Disconnected
- Network Error
- Not Implemented
- Does Not Exist
- Not Available
Rationale:
Signals
GroupsCreated (as: Names)
Parameters
- Names — as
GroupRenamed (s: Old_Name, s: New_Name)
Parameters
- Old_Name — s
- New_Name — s
Emitted when a group is renamed.
Immediately after this signal is emitted, GroupsCreated MUST signal the creation of a group with the new name, and GroupsRemoved MUST signal the removal of a group with the old name.
Rationale:
If the group was not empty, immediately after those signals are emitted, GroupsChanged MUST signal that the members of that group were removed from the old name and added to the new name.
On connection managers where groups behave like tags, renaming a group MAY be signalled as a set of GroupsCreated, GroupsRemoved and GroupsChanged signals, instead of emitting this signal.
Rationale:
GroupsRemoved (as: Names)
Parameters
- Names — as
Emitted when one or more groups are removed. If they had members at the time that they were removed, then immediately after this signal is emitted, GroupsChanged MUST signal that their members were removed.
Rationale:
GroupsChanged (au: Contact, as: Added, as: Removed)
Parameters
- Contact — au (Contact_Handle)
- Added — as
- Removed — as
Properties
DisjointGroups — b
True if each contact can be in at most one group; false if each contact can be in many groups.
This property cannot change after the connection has moved to the Connected state. Until then, its value is undefined, and it may change at any time, without notification.
GroupStorage — u (Contact_Metadata_Storage_Type)
Indicates the extent to which contacts' groups can be set and stored.
This property cannot change after the connection has moved to the Connected state. Until then, its value is undefined, and it may change at any time, without notification.
Groups — as
The names of all groups that currently exist. This may be a
larger set than the union of all contacts' groups
contact attributes, if the connection allows groups to be
empty.
Change notification is via GroupsCreated and GroupsRemoved; clients can also distinguish between a create/remove pair and a renamed group by receiving GroupRenamed.
This property's value is not meaningful until the initial contact list has been received, in protocols where this is applicable. Clients MAY wait for this property to be meaningful by calling RequestContactList.
Contact Attributes
org.freedesktop.Telepathy.Connection.Interface.ContactGroups.DRAFT/groups — as
The names of groups of which a contact is a member.
Change notification is via GroupsChanged; clients can also get extra context for group membership changes by receiving GroupRenamed and GroupsRemoved.