Methods
AddMembers | (au: Contacts, s: Message) | → | nothing | |
GetAllMembers | () | → | au: Members, au: Local_Pending, au: Remote_Pending | (deprecated) |
GetGroupFlags | () | → | u: Group_Flags | (deprecated) |
GetHandleOwners | (au: Handles) | → | au: Owners | (deprecated) |
GetLocalPendingMembers | () | → | au: Handles | (deprecated) |
GetLocalPendingMembersWithInfo | () | → | a(uuus): Info | (deprecated) |
GetMembers | () | → | au: Handles | (deprecated) |
GetRemotePendingMembers | () | → | au: Handles | (deprecated) |
GetSelfHandle | () | → | u: Self_Handle | (deprecated) |
RemoveMembers | (au: Contacts, s: Message) | → | nothing | |
RemoveMembersWithReason | (au: Contacts, s: Message, u: Reason) | → | nothing |
Signals
HandleOwnersChanged | (a{uu}: Added, au: Removed) | (deprecated) |
HandleOwnersChangedDetailed | (a{uu}: Added, au: Removed, a{us}: Identifiers) | |
SelfHandleChanged | (u: Self_Handle) | (deprecated) |
SelfContactChanged | (u: Self_Handle, s: Self_ID) | |
GroupFlagsChanged | (u: Added, u: Removed) | |
MembersChanged | (s: Message, au: Added, au: Removed, au: Local_Pending, au: Remote_Pending, u: Actor, u: Reason) | |
MembersChangedDetailed | (au: Added, au: Removed, au: Local_Pending, au: Remote_Pending, a{sv}: Details) |
Properties
GroupFlags | u (Channel_Group_Flags) | Read only | ||
HandleOwners | a{uu} (Handle_Owner_Map) | Read only | ||
LocalPendingMembers | a(uuus) (Local_Pending_Info_List) | Read only | ||
Members | au (Contact_Handle_List) | Read only | ||
RemotePendingMembers | au (Contact_Handle_List) | Read only | ||
SelfHandle | u (Contact_Handle) | Read only | ||
MemberIdentifiers | a{us} (Handle_Identifier_Map) | Read only |
Types
Channel_Group_Change_Reason | Enum | u | |
Channel_Group_Flags | Flags | u | |
Handle_Owner_Map | Mapping | a{uu} | |
Handle_Identifier_Map | Mapping | a{us} | |
Local_Pending_Info | Struct | (uuus) |
Description
Interface for channels which have multiple members, and where the members of the channel can change during its lifetime. Your presence in the channel cannot be presumed by the channel's existence (for example, a channel you may request membership of but your request may not be granted).
This interface implements three lists: a list of current members (Members), and two lists of local pending and remote pending members (LocalPendingMembers and RemotePendingMembers, respectively). Contacts on the remote pending list have been invited to the channel, but the remote user has not accepted the invitation. Contacts on the local pending list have requested membership of the channel, but the local user of the framework must accept their request before they may join. A single contact should never appear on more than one of the three lists. The lists are empty when the channel is created, and the MembersChanged signal (and, if the channel's GroupFlags contains Members_Changed_Detailed, the MembersChangedDetailed signal) should be emitted when information is retrieved from the server, or changes occur.
If the MembersChanged or MembersChangedDetailed signal indicates that the SelfHandle has been removed from the channel, and the channel subsequently emits Closed, clients SHOULD consider the details given in the MembersChanged or MembersChangedDetailed signal to be the reason why the channel closed.
Addition of members to the channel may be requested by using AddMembers. If remote acknowledgement is required, use of the AddMembers method will cause users to appear on the remote pending list. If no acknowledgement is required, AddMembers will add contacts to the member list directly. If a contact is awaiting authorisation on the local pending list, AddMembers will grant their membership request.
Removal of contacts from the channel may be requested by using RemoveMembers. If a contact is awaiting authorisation on the local pending list, RemoveMembers will refuse their membership request. If a contact is on the remote pending list but has not yet accepted the invitation, RemoveMembers will rescind the request if possible.
It should not be presumed that the requester of a channel implementing this interface is immediately granted membership, or indeed that they are a member at all, unless they appear in the list. They may, for instance, be placed into the remote pending list until a connection has been established or the request acknowledged remotely.
If the local user joins a Group channel whose members or other state cannot be discovered until the user joins (e.g. many chat room implementations), the connection manager should ensure that the channel is, as far as possible, in a consistent state before adding the local contact to the members set; until this happens, the local contact should be in the remote-pending set. For instance, if the connection manager queries the server to find out the initial members list for the channel, it should leave the local contact in the remote-pending set until it has finished receiving the initial members list.
If the protocol provides no reliable way to tell whether the complete initial members list has been received yet, the connection manager should make a best-effort attempt to wait for the full list (in the worst case, waiting for a suitable arbitrary timeout) rather than requiring user interfaces to do so on its behalf.
Methods
AddMembers (au: Contacts, s: Message) → nothing
Parameters
- Contacts — au (Contact_Handle_List)
- Message — s
Invite all the given contacts into the channel, or accept requests for channel membership for contacts on the pending local list.
A message may be provided along with the request, which will be sent to the server if supported. See the CHANNEL_GROUP_FLAG_MESSAGE_ADD and CHANNEL_GROUP_FLAG_MESSAGE_ACCEPT GroupFlags to see in which cases this message should be provided.
Attempting to add contacts who are already members is allowed; connection managers must silently accept this, without error.
Possible Errors
- Disconnected
- Network Error
- Not Available
- Not Capable
- Permission Denied
- Invalid Handle
- Channel.Full
- Channel.Invite Only
- Channel.Banned
Rationale:
GetAllMembers () → au: Members, au: Local_Pending, au: Remote_Pending
Returns
- Members — au (Contact_Handle_List)
- Local_Pending — au (Contact_Handle_List)
- Remote_Pending — au (Contact_Handle_List)
Possible Errors
- Disconnected
- Network Error
Rationale:
GetGroupFlags () → u: Group_Flags
Returns
- Group_Flags — u (Channel_Group_Flags)
Possible Errors
- Disconnected
- Network Error
Rationale:
GetHandleOwners (au: Handles) → au: Owners
Parameters
- Handles — au (Contact_Handle_List)
Returns
- Owners — au (Contact_Handle_List)
Possible Errors
- Disconnected
- Network Error
- Invalid Handle
- Not Available
- Invalid Argument
Rationale:
GetLocalPendingMembers () → au: Handles
Returns
- Handles — au (Contact_Handle_List)
Possible Errors
- Disconnected
- Network Error
Rationale:
GetLocalPendingMembersWithInfo () → a(uuus): Info
Returns
- Info — a(uuus) (Local_Pending_Info_List)
- A handle representing the contact requesting channel membership
- A handle representing the contact making the request, or 0 if unknown
- The reason for the request: one of the values of Channel_Group_Change_Reason
- A string message containing the reason for the request if any (or blank if none)
Possible Errors
- Disconnected
- Network Error
Rationale:
GetMembers () → au: Handles
Returns
- Handles — au (Contact_Handle_List)
Possible Errors
- Disconnected
- Network Error
Rationale:
GetRemotePendingMembers () → au: Handles
Returns
- Handles — au (Contact_Handle_List)
Possible Errors
- Disconnected
- Network Error
Rationale:
GetSelfHandle () → u: Self_Handle
Returns
- Self_Handle — u (Contact_Handle)
Possible Errors
- Disconnected
- Network Error
Rationale:
RemoveMembers (au: Contacts, s: Message) → nothing
Parameters
- Contacts — au (Contact_Handle_List)
- Message — s
Requests the removal of contacts from a channel, reject their request for channel membership on the pending local list, or rescind their invitation on the pending remote list.
If the SelfHandle is in a Group, it can be removed via this method, in order to leave the group gracefully. This is the recommended way to leave a chatroom, close or reject a StreamedMedia call, and so on.
Accordingly, connection managers SHOULD support doing this, regardless of the value of GroupFlags. If doing so fails with PermissionDenied, this is considered to a bug in the connection manager, but clients MUST recover by falling back to closing the channel with the Close method.
Removing any contact from the local pending list is always allowed. Removing contacts other than the SelfHandle from the channel's members is allowed if and only if Channel_Group_Flag_Can_Remove is in the GroupFlags, while removing contacts other than the SelfHandle from the remote pending list is allowed if and only if Channel_Group_Flag_Can_Rescind is in the GroupFlags.
A message may be provided along with the request, which will be sent to the server if supported. See the Channel_Group_Flag_Message_Remove, Channel_Group_Flag_Message_Depart, Channel_Group_Flag_Message_Reject and Channel_Group_Flag_Message_Rescind GroupFlags to see in which cases this message should be provided.
Possible Errors
- Disconnected
- Network Error
- Not Available
- Permission Denied
- Invalid Handle
Rationale:
RemoveMembersWithReason (au: Contacts, s: Message, u: Reason) → nothing
Parameters
- Contacts — au (Contact_Handle_List)
- Message — s
- Reason — u (Channel_Group_Change_Reason)
Possible Errors
- Disconnected
- Network Error
- Not Available
- Permission Denied
- Invalid Handle
- Invalid Argument
Rationale:
Signals
HandleOwnersChanged (a{uu}: Added, au: Removed)
Parameters
- Added — a{uu} (Handle_Owner_Map)
- Removed — au (Contact_Handle_List)
HandleOwnersChangedDetailed (a{uu}: Added, au: Removed, a{us}: Identifiers)
Parameters
- Added — a{uu} (Handle_Owner_Map)
- Removed — au (Contact_Handle_List)
- Identifiers — a{us} (Handle_Identifier_Map)
Emitted whenever the HandleOwners property changes.
Clients can assume this signal is emitted by the Connection Manager if the MemberIdentifiers property exists
SelfHandleChanged (u: Self_Handle)
Parameters
- Self_Handle — u (Contact_Handle)
SelfContactChanged (u: Self_Handle, s: Self_ID)
Parameters
- Self_Handle — u (Contact_Handle)
- Self_ID — s
Emitted whenever the SelfHandle property changes.
Clients can assume this signal is emitted by the Connection Manager if the MemberIdentifiers property exists.
GroupFlagsChanged (u: Added, u: Removed)
Parameters
- Added — u (Channel_Group_Flags)
- Removed — u (Channel_Group_Flags)
MembersChanged (s: Message, au: Added, au: Removed, au: Local_Pending, au: Remote_Pending, u: Actor, u: Reason)
Parameters
- Message — s
- Added — au (Contact_Handle_List)
- Removed — au (Contact_Handle_List)
- Local_Pending — au (Contact_Handle_List)
- Remote_Pending — au (Contact_Handle_List)
- Actor — u (Contact_Handle)
- Reason — u (Channel_Group_Change_Reason)
Emitted when contacts join any of the three lists (members, local pending or remote pending) or when they leave any of the three lists. There may also be a message from the server regarding this change, which may be displayed to the user if desired.
All channel-specific handles that are mentioned in this signal MUST be represented in the value of the HandleOwners property. In practice, this will mean that HandleOwnersChanged is emitted before emitting a MembersChanged signal in which channel-specific handles are added, but that it is emitted after emitting a MembersChanged signal in which channel-specific handles are removed.
See StreamedMedia for an overview of how group state changes are used to indicate the progress of a call.
MembersChangedDetailed (au: Added, au: Removed, au: Local_Pending, au: Remote_Pending, a{sv}: Details)
Parameters
- Added — au (Contact_Handle_List)
- Removed — au (Contact_Handle_List)
- Local_Pending — au (Contact_Handle_List)
- Remote_Pending — au (Contact_Handle_List)
- Details — a{sv} (String_Variant_Map)
- actor (u — Contact_Handle)
- The contact handle of the person who made the change; 0 or omitted if unknown or not applicable.
- change-reason (u — Channel_Group_Change_Reason)
- A reason for the change.
- contact-ids (a{us} — Handle_Identifier_Map)
-
The string identifiers for handles mentioned in this signal, to give clients the minimal information necessary to react to the event without waiting for round-trips. Connection managers SHOULD include the identifiers for members added to the group and for the actor (if any); they MAY omit the identifiers for handles which have been removed from the group.
Rationale:
On IRC, an event such as a netsplit could cause the vast majority of a channel to leave. Given that clients should already know the identifiers of a channel's members, including potentially hundreds of strings in the netsplit signal is unnecessary.
Clients MUST NOT assume that the presence or absence of a handle in this mapping is meaningful. This mapping is merely an optimization for round-trip reduction, and connection managers MAY add additional handles, omit some handles, or omit the mapping completely.
- message (s)
- A string message from the server regarding the change
- error (s — DBus_Error_Name)
- A (possibly implementation-specific) DBus error describing the
change, providing more specific information than the
Channel_Group_Change_Reason enum allows. This
MUST only be present if it is strictly more informative than
'change-reason'; if present, 'change-reason' MUST be set to the
closest available reason.
Rationale:
A SIP connection manager might want to signal "402 Payment required" as something more specific than Error or Permission_Denied so that a SIP-aware UI could handle it specially; including a namespaced error permits this to be done without Channel_Group_Change_Reason being extended to encompass every error any CM ever wants to report. - debug-message (s)
- Debugging information on the change. SHOULD NOT be shown to users in normal circumstances.
Information about the change, which may include the following well-known keys:
Emitted when contacts join any of the three lists (members, local pending or remote pending) or when they leave any of the three lists. This signal provides a superset of the information provided by MembersChanged; if the channel's GroupFlags contains Members_Changed_Detailed, then clients may listen exclusively to this signal in preference to that signal.
All channel-specific handles that are mentioned in this signal MUST be represented in the value of the HandleOwners property. In practice, this will mean that HandleOwnersChanged is emitted before emitting a MembersChangedDetailed signal in which channel-specific handles are added, but that it is emitted after emitting a MembersChangedDetailed signal in which channel-specific handles are removed.
See StreamedMedia for an overview of how group state changes are used to indicate the progress of a call.
Properties
GroupFlags — u (Channel_Group_Flags)
HandleOwners — a{uu} (Handle_Owner_Map)
LocalPendingMembers — a(uuus) (Local_Pending_Info_List)
Members — au (Contact_Handle_List)
RemotePendingMembers — au (Contact_Handle_List)
SelfHandle — u (Contact_Handle)
MemberIdentifiers — a{us} (Handle_Identifier_Map)
Types
Channel_Group_Change_Reason — u
The reason for a set of handles to move to one of Members, LocalPendingMembers or RemotePendingMembers, or to be removed from the group. A client may supply a reason when attempting to remove members from a group with RemoveMembersWithReason, and reasons are supplied by the CM when emitting MembersChanged and MembersChangedDetailed. Some reason codes have different meanings depending on the Actor in a MembersChanged signal.
- None (0)
- Offline (1)
- Kicked (2)
- Busy (3)
- Invited (4)
- Banned (5)
- Error (6)
- Invalid_Contact (7)
- No_Answer (8)
- Renamed (9)
- Permission_Denied (10)
- Separated (11)
No reason was provided for this change.
In particular, this reason SHOULD be used when representing users joining a named chatroom in the usual way, users leaving a chatroom by their own request, and normal termination of a StreamedMedia call by the remote user.
If the SelfHandle is removed from
a group for this reason and the actor is not the SelfHandle, the
equivalent D-Bus error is
org.freedesktop.Telepathy.Error.Terminated
.
If the SelfHandle is removed from a group for this reason and
the actor is also the SelfHandle, the equivalent D-Bus error is
org.freedesktop.Telepathy.Error.Cancelled
.
The change is due to a user going offline. Also used when user is already offline, but this wasn't known previously.
If a one-to-one StreamedMedia call fails because the contact being called is offline, the connection manager SHOULD indicate this by removing both the SelfHandle and the other contact's handle from the Group interface with reason Offline.
Rationale:
If a handle is removed from a group for this reason, the
equivalent D-Bus error is
org.freedesktop.Telepathy.Error.Offline
.
The change is due to a kick operation.
If the SelfHandle is removed
from a group for this reason, the equivalent D-Bus error is
org.freedesktop.Telepathy.Error.Channel.Kicked
.
The change is due to a busy indication.
If a one-to-one StreamedMedia call fails because the contact being called is busy, the connection manager SHOULD indicate this by removing both the SelfHandle and the other contact's handle from the Group interface with reason Busy.
Rationale:
If the SelfHandle is removed
from a group for this reason, the equivalent D-Bus error is
org.freedesktop.Telepathy.Error.Busy
.
Rationale:
The change is due to a kick+ban operation.
If the SelfHandle is removed
from a group for this reason, the equivalent D-Bus error is
org.freedesktop.Telepathy.Error.Channel.Banned
.
The change is because the requested contact does not exist.
For instance, if the user invites a nonexistent contact to a chatroom or attempts to call a nonexistent contact, this could be indicated by the CM adding that contact's handle to remote-pending for reason None or Invited, then removing it for reason Invalid_Contact. In the case of a 1-1 StreamedMedia call, the CM SHOULD remove the self handle from the Group in the same signal.
Rationale:
If a contact is removed from a group for this reason, the
equivalent D-Bus error is
org.freedesktop.Telepathy.Error.DoesNotExist
.
The change is because the requested contact did not respond.
If a one-to-one StreamedMedia call fails because the contact being called did not respond, or the local user did not respond to an incoming call, the connection manager SHOULD indicate this by removing both the SelfHandle and the other contact's handle from the Group interface with reason No_Answer.
Rationale:
If a contact is removed from a group for this reason, the
equivalent D-Bus error is
org.freedesktop.Telepathy.Error.NoAnswer
.
The change is because a contact's unique identifier changed. There must be exactly one handle in the removed set and exactly one handle in one of the added sets. The Renamed signal on the Renaming interface will have been emitted for the same handles, shortly before this MembersChanged signal is emitted.
The change is because there was no permission to contact the requested handle.
If a contact is removed from a group for this reason, the
equivalent D-Bus error is
org.freedesktop.Telepathy.Error.PermissionDenied
.
If members are removed with this reason code, the change is because the group has split into unconnected parts which can only communicate within themselves (e.g. netsplits on IRC use this reason code).
If members are added with this reason code, the change is because unconnected parts of the group have rejoined. If this channel carries messages (e.g. Text or Tubes channels) applications must assume that the contacts being added are likely to have missed some messages as a result of the separation, and that the contacts in the group are likely to have missed some messages from the contacts being added.
Note that from the added contacts' perspective, they have been in the group all along, and the contacts we indicate to be in the group (including the local user) have just rejoined the group with reason Separated. Application protocols in Tubes should be prepared to cope with this situation.
The SelfHandle SHOULD NOT be removed from channels with this reason.
Channel_Group_Flags — u
- Can_Add (1)
- Can_Remove (2)
- Can_Rescind (4)
- Message_Add (8)
- Message_Remove (16)
- Message_Accept (32)
- Message_Reject (64)
- Message_Rescind (128)
- Channel_Specific_Handles (256)
- Only_One_Group (512)
- Handle_Owners_Not_Available (1024)
- Properties (2048)
- Members_Changed_Detailed (4096)
- Message_Depart (8192)
The members of this group have handles which are specific to this channel, and are not valid as general-purpose handles on the connection. Depending on the channel, it may be possible to check the HandleOwners property or call GetHandleOwners to find the owners of these handles, which should be done if you wish to (e.g.) subscribe to the contact's presence.
Connection managers must ensure that any given handle is not simultaneously a general-purpose handle and a channel-specific handle.
Rationale:
Rationale:
Rationale:
Handle_Owner_Map — a{uu}
- Channel_Specific_Handle — u (Contact_Handle)
- Global_Handle — u (Contact_Handle)
Handle_Identifier_Map — a{us}
- Handle — u (Contact_Handle)
- Identifier — s
Local_Pending_Info — (uuus)
- To_Be_Added — u (Contact_Handle)
- Actor — u (Contact_Handle)
- Reason — u (Channel_Group_Change_Reason)
- Message — s