Methods
AddStatus | (s: Status, a{sv}: Parameters) | → | nothing | |
ClearStatus | () | → | nothing | |
GetPresence | (au: Contacts) | → | a{u(ua{sa{sv}})}: Presence | |
GetStatuses | () | → | a{s(ubba{ss})}: Available_Statuses | |
RemoveStatus | (s: Status) | → | nothing | |
RequestPresence | (au: Contacts) | → | nothing | |
SetLastActivityTime | (u: Time) | → | nothing | |
SetStatus | (a{sa{sv}}: Statuses) | → | nothing |
Signals
PresenceUpdate | (a{u(ua{sa{sv}})}: Presence) |
Types
Multiple_Status_Map | Mapping | a{sa{sv}} | |
Contact_Presences | Mapping | a{u(ua{sa{sv}})} | |
Status_Spec_Map | Mapping | a{s(ubba{ss})} | |
Last_Activity_And_Statuses | Struct | (ua{sa{sv}}) | |
Status_Spec | Struct | (ubba{ss}) |
Description
This interface is for services which have a concept of presence which can be published for yourself and monitored on your contacts. Telepathy's definition of presence is based on that used by the Galago project.
Presence on an individual (yourself or one of your contacts) is modelled as a last activity time along with a set of zero or more statuses, each of which may have arbitrary key/value parameters. Valid statuses are defined per connection, and a list of them can be obtained with the GetStatuses method.
(The SimplePresence interface which replaces this one restricts presences to one status per contact, with an optional message, which is in practice all that was implemented on this interface.)
Each status has an arbitrary string identifier which should have an agreed meaning between the connection manager and any client which is expected to make use of it. The well-known values defined by the SimplePresence interface SHOULD be used where possible
As well as these well-known status identifiers, every status also has a numerical type value chosen from Connection_Presence_Type which can be used by the client to classify even unknown statuses into different fundamental types.
These numerical types exist so that even if a client does not understand the string identifier being used, and hence cannot present the presence to the user to set on themselves, it may display an approximation of the presence if it is set on a contact.
The dictionary of variant types allows the connection manager to exchange further protocol-specific information with the client. It is recommended that the string (s) argument 'message' be interpreted as an optional message which can be associated with a presence status.
If the connection has a 'subscribe' contact list, PresenceUpdate signals should be emitted to indicate changes of contacts on this list, and should also be emitted for changes in your own presence. Depending on the protocol, the signal may also be emitted for others such as people with whom you are communicating, and any user interface should be updated accordingly.
On some protocols, RequestPresence may only succeed on contacts on your 'subscribe' list, and other contacts will cause a PermissionDenied error. On protocols where there is no 'subscribe' list, and RequestPresence succeeds, a client may poll the server intermittently to update any display of presence information.
Methods
AddStatus (s: Status, a{sv}: Parameters) → nothing
Parameters
- Status — s
- Parameters — a{sv} (String_Variant_Map)
Possible Errors
- Disconnected
- Network Error
- Invalid Argument
- Not Available
- Permission Denied
ClearStatus () → nothing
Possible Errors
- Disconnected
- Network Error
- Permission Denied
GetPresence (au: Contacts) → a{u(ua{sa{sv}})}: Presence
Parameters
- Contacts — au (Contact_Handle_List)
Returns
- Presence — a{u(ua{sa{sv}})} (Contact_Presences)
Possible Errors
- Disconnected
- Invalid Handle
- Not Available
GetStatuses () → a{s(ubba{ss})}: Available_Statuses
Returns
- Available_Statuses — a{s(ubba{ss})} (Status_Spec_Map)
- a type value from one of the values above
- a boolean to indicate if this status may be set on yourself
- a boolean to indicate if this is an exclusive status which you may not set alongside any other
- a dictionary of valid optional string argument names mapped to their types
Possible Errors
- Disconnected
- Network Error
RemoveStatus (s: Status) → nothing
Parameters
- Status — s
Possible Errors
- Disconnected
- Network Error
- Permission Denied
- Invalid Argument
RequestPresence (au: Contacts) → nothing
Parameters
- Contacts — au (Contact_Handle_List)
Possible Errors
- Disconnected
- Network Error
- Invalid Handle
- Permission Denied
- Not Available
SetLastActivityTime (u: Time) → nothing
Parameters
- Time — u (Unix_Timestamp)
Possible Errors
- Disconnected
- Network Error
- Not Implemented
SetStatus (a{sa{sv}}: Statuses) → nothing
Parameters
- Statuses — a{sa{sv}} (Multiple_Status_Map)
Request that the user's presence be changed to the given statuses and desired parameters. Changes will be reflected by PresenceUpdate signals being emitted.
Statuses whose Connection_Presence_Type is Offline, Error or Unknown MUST NOT be passed to this function. Connection managers SHOULD reject these statuses.
The same rationale as for SimplePresence.SetPresence applies.
On certain protocols, this method may be called on a newly-created connection which is still in the DISCONNECTED state, and will sign on with the requested status. If the requested status is not available after signing on, NotAvailable will be returned and the connection will remain offline, or if the protocol does not support signing on with a certain status, Disconnected will be returned.
Possible Errors
- Disconnected
- Network Error
- Not Available
- Invalid Argument
- Permission Denied
Signals
PresenceUpdate (a{u(ua{sa{sv}})}: Presence)
Parameters
- Presence — a{u(ua{sa{sv}})} (Contact_Presences)
Types
Multiple_Status_Map — a{sa{sv}}
- Status — s
- Parameters — a{sv} (String_Variant_Map)
Contact_Presences — a{u(ua{sa{sv}})}
- Contact — u (Contact_Handle)
- Presence — (ua{sa{sv}}) (Last_Activity_And_Statuses)
Last_Activity_And_Statuses — (ua{sa{sv}})
- Last_Activity — u (Unix_Timestamp)
- Statuses — a{sa{sv}} (Multiple_Status_Map)
Status_Spec — (ubba{ss})
- Type — u (Connection_Presence_Type)
- May_Set_On_Self — b
- Exclusive — b
- Parameter_Types — a{ss} (String_String_Map)