Methods
GetClientTypes | (au: Contacts) | → | a{uas}: Client_Types | |
RequestClientTypes | (u: Contact) | → | as: Client_Types |
Signals
ClientTypesUpdated | (u: Contact, as: Client_Types) |
Contact Attributes
im.telepathy1.Connection.Interface.ClientTypes1/client-types | as (Contact_Client_Type_List) |
Types
Contact_Client_Type | Simple Type | s | |
Contact_Client_Types | Mapping | a{uas} |
Description
An interface on connections to support protocols which allows users to subscribe to the client types of their contacts.
One can connect to instant messaging networks on a huge variety of devices, from PCs, to phones to consoles. It can be useful for users to know what kind of device a contact is using so that he or she can decide not to send that big file or start a video chat. This interface exposes exactly this information for clients to display.
The client types are represented in strings, using the values documented by the XMPP registrar with some additional types added for other protocols. A contact can set one or more client types so this interface returns a list of strings to denote client types for a contact. The well-known client types to be used are:
- bot
- console (minimal non-GUI client used on dumb terminals or text-only screens, not a games console)
- handheld
- pc
- phone
- web
If the empty list is given as the client types, this means that details about the contact's client types are unknown. If there are multiple resources of a contact online at one point in time, the client types of the most available resource will be returned. In other words, the returned client types are those for the resource whose presence will be retreived using the Presence1 interface.
For example, if a contact has two resources:
- their phone, with presence "available"; and
- their pc, with presence "busy";
then the methods in this interface will return an array (with one element: "phone") as the client types because that is the more available resource. If at some later time the contact's phone's presence changes to "away", the ClientTypesUpdated signal will notify that the contact's client types attribute has changed from ["phone"] to ["pc"], because "busy" is a more available presence than "away".
Methods
GetClientTypes (au: Contacts) → a{uas}: Client_Types
Parameters
- Contacts — au (Contact_Handle_List)
Returns
- Client_Types — a{uas} (Contact_Client_Types)
Rationale:
Possible Errors
- Disconnected
- Invalid Handle
Rationale:
RequestClientTypes (u: Contact) → as: Client_Types
Parameters
- Contact — u (Contact_Handle)
Returns
- Client_Types — as (Contact_Client_Type_List)
Rationale:
Possible Errors
- Disconnected
- Network Error
- Invalid Handle
- Permission Denied
Rationale:
Signals
ClientTypesUpdated (u: Contact, as: Client_Types)
Parameters
- Contact — u (Contact_Handle)
- Client_Types — as (Contact_Client_Type_List)
Contact Attributes
im.telepathy1.Connection.Interface.ClientTypes1/client-types — as (Contact_Client_Type_List)
The same mapping that would be returned by GetClientTypes for this contact. Omitted from the result if the contact's client types are not known.
Types
Contact_Client_Type — s
Contact_Client_Types — a{uas}
- Contact — u (Contact_Handle)
- Client_Types — as (Contact_Client_Type_List)