Interface org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities

Interface Index (Compact) | Summary | Description | Methods | Signals | Contact Attributes | Types

Methods

UpdateCapabilities (a(saa{sv}as): Handler_Capabilities) nothing
GetContactCapabilities (au: handles) a{ua(a{sv}as)}: Contact_Capabilities

Signals

ContactCapabilitiesChanged (a{ua(a{sv}as)}: caps)

Contact Attributes

org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities/capabilities a(a{sv}as) (Requestable_Channel_Class_List)

Types

Contact_Capabilities_Map Mapping a{ua(a{sv}as)}
Handler_Capabilities Struct (saa{sv}as)
Added in 0.17.28. (as stable API)
Objects implementing this interface must also implement:

Description

Contact capabilities describe the channel classes which may be created with a given contact in advance of attempting to create a channel. Each capability represents a commitment by the connection manager that it will ordinarily be able to create a channel with a contact when given a request with the properties defined by the channel class.

Capabilities pertain to particular contact handles, and represent activities such as having a text chat, a voice call with the user or a stream tube of a defined type.

This interface also enables user interfaces to notify the connection manager what capabilities to advertise for the user to other contacts. This is done by using the UpdateCapabilities method.

XMPP is a major user of this interface: XMPP contacts will not, in general, be callable using VoIP unless they advertise suitable Jingle capabilities.

Many other protocols also have some concept of capability flags, which this interface exposes in a protocol-independent way.

Methods

(Permalink)

UpdateCapabilities (a(saa{sv}as): Handler_Capabilities) → nothing

Parameters

  • Handler_Capabilities — a(saa{sv}as) (Handler_Capabilities_List)
  • The capabilities of one or more clients.

    For each client in the given list, any capabilities previously advertised for the same client name are discarded, then replaced by the capabilities indicated.

    As a result, if a client becomes unavailable, this method SHOULD be called with a Handler_Capabilities structure containing its name, an empty list of channel classes, and an empty list of capabilities. When this is done, the connection manager SHOULD free all memory associated with that client name.

    This method takes a list of clients so that when the channel dispatcher first calls it (with a list of all the Handlers that are initially available), the changes can be made atomically, with only one transmission of updated capabilities to the network. Afterwards, the channel dispatcher will call this method with a single-element list every time a Handler becomes available or unavailable.

    The connection manager MUST ignore any channel classes and client capabilities for which there is no representation in the protocol or no support in the connection manager.

Alter the connection's advertised capabilities to include the intersection of the given clients' capabilities with what the connection manager is able to implement.

On connections managed by the ChannelDispatcher, processes other than the ChannelDispatcher SHOULD NOT call this method, and the ChannelDispatcher SHOULD use this method to advertise the capabilities of all the registered Client.Handler implementations.On connections not managed by the ChannelDispatcher, clients MAY use this method directly, to indicate the channels they will handle and the extra capabilities they have.

Upon a successful invocation of this method, the connection manager will only emit the ContactCapabilitiesChanged signal for the user's SelfHandle if, in the underlying protocol, the new capabilities are distinct from the previous state.

The connection manager will essentially intersect the provided capabilities and the channel classes it implements. Therefore, certain properties which are never fixed for a channel class (such as the target handle, or the Parameters property of a tube channel) will almost certainly not be advertised.

This method MAY be called on a newly-created connection while it is still in the DISCONNECTED state, to request that when the connection connects, it will do so with the appropriate capabilities. Doing so MUST NOT fail.


Possible Errors

  • Network Error
  • Raised when there is an error reading from or writing to the network.
(Permalink)

GetContactCapabilities (au: handles) → a{ua(a{sv}as)}: Contact_Capabilities

Parameters

  • handles — au (Contact_Handle_List)
  • An array of contact handles for this connection.

    The handle zero MUST NOT be included in the request.

Returns

  • Contact_Capabilities — a{ua(a{sv}as)} (Contact_Capabilities_Map)
  • An array of structures containing:
    • a dictionary mapping the channel properties to their values.
    • an array of additional allowed properties
Returns an array of enhanced capabilities for the given contact handles.

Possible Errors

  • Disconnected
  • The connection is not currently connected and cannot be used. This error may also be raised when operations are performed on a Connection for which StatusChanged has signalled status Disconnected for reason None.
    The second usage corresponds to None in the Connection_Status_Reason enum; if a better reason is available, the corresponding error should be used instead.
  • Invalid Handle
  • The handle does not represent a contact. Zero is always invalid.

Signals

(Permalink)

ContactCapabilitiesChanged (a{ua(a{sv}as)}: caps)

Parameters

Announce that there has been a change of capabilities on the given handles. A single signal can be emitted for several contacts.

The underlying protocol can get several contacts' capabilities at the same time.

Contact Attributes

Attributes that a contact can have, accessed with the org.freedesktop.Telepathy.Connection.Interface.Contacts interface.
(Permalink)

org.freedesktop.Telepathy.Connection.Interface.ContactCapabilities/capabilities — a(a{sv}as) (Requestable_Channel_Class_List)

The same structs that would be returned by GetContactCapabilities. Omitted from the result if the contact's capabilities are not known; present in the result as an empty array if the contact is known to have no capabilities at all.

Types

Mapping (Permalink)

Contact_Capabilities_Map — a{ua(a{sv}as)}

A mapping from contact handle to their capabilities.
Struct (Permalink)

Handler_Capabilities — (saa{sv}as)

A structure representing the capabilities of a single client.
  • Well_Known_Name — s (DBus_Well_Known_Name)
  • For implementations of the Client interface, the well-known bus name name of the client; for any other process, any other reversed domain name that uniquely identifies it.
  • Channel_Classes — aa{sv} (String_Variant_Map_List)
  • An array of channel classes that can be handled by this client. This will usually be a copy of the client's HandlerChannelFilter property.
  • Capabilities — as (Handler_Capability_Token_List)
  • An array of client capabilities supported by this client, to be used by the connection manager to determine what capabilities to advertise. This will usually be a copy of the client's Capabilities property.