Interface Connection.Interface.Addressing1

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

Methods

GetContactsByVCardField (s: Field, as: Addresses, as: Interfaces) a{su}: Requested, a{ua{sv}}: Attributes
GetContactsByURI (as: URIs, as: Interfaces) a{su}: Requested, a{ua{sv}}: Attributes

Contact Attributes

im.telepathy1.Connection.Interface.Addressing1/addresses a{ss} (VCard_Field_Address_Map)
im.telepathy1.Connection.Interface.Addressing1/uris as

Types

VCard_Field_Address_Map Mapping a{ss}
Addressing_Normalization_Map Mapping a{su}
Added in 0.25.2. (as stable API)
Objects implementing this interface must also implement:

Description

This interface deals with the multiple address types that can refer to the same contact, such as vCard fields and URIs.

It can be used to retrieve contacts with a specific addresses through GetContactsByVCardField and GetContactsByURI, as well as defining the various addressing methods for a given contact through this interface's contact attributes.

Methods

(Permalink)

GetContactsByVCardField (s: Field, as: Addresses, as: Interfaces) → a{su}: Requested, a{ua{sv}}: Attributes

Parameters

  • Field — s
  • The vCard field of the addresses we are requesting. The field name SHOULD be in lower case. Supported fields can be found in AddressableVCardFields.

    The url vCard field MUST NOT appear here; see GetContactsByURI instead.

    Rationale:

    In practice, protocols have a limited set of URI schemes that make sense to resolve as a contact.

  • Addresses — as
  • The addresses to get contact handles for. The address types should match the given vCard field.
  • Interfaces — as (DBus_Interface_List)
  • A list of strings indicating which D-Bus interfaces the calling process is interested in. All supported attributes from these interfaces, whose values can be obtained without additional network activity, will be in the reply.

    Attributes from this interface and from im.telepathy1.Connection are always returned, and need not be requested explicitly.

    The behavior of this parameter is similar to the same parameter in Contacts.GetContactAttributes.

Returns

  • Requested — a{su} (Addressing_Normalization_Map)
  • A mapping from requested vCard addresses to the corresponding contact handles.

    Requested addresses that are not valid or understood for this protocol MUST be omitted from the mapping.

  • Attributes — a{ua{sv}} (Contact_Attributes_Map)
  • A dictionary mapping the contact handles to contact attributes. If any of the requested addresses are in fact invalid, they are simply omitted from this mapping. If contact attributes are not immediately known, the behaviour is defined by the interface; the attribute should either be omitted from the result or replaced with a default value.

    Requested addresses that are not valid or understood for this protocol MUST be omitted from the mapping.

    Each contact's attributes will always include at least the identifier that would be obtained by inspecting the handle (im.telepathy1.Connection/contact-id).

Request contacts and retrieve their attributes using a given field in their vCards.


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.
    Rationale:
    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.
(Permalink)

GetContactsByURI (as: URIs, as: Interfaces) → a{su}: Requested, a{ua{sv}}: Attributes

Parameters

  • URIs — as
  • The URI addresses to get contact handles for. Supported schemes can be found in AddressableURISchemes.
  • Interfaces — as (DBus_Interface_List)
  • A list of strings indicating which D-Bus interfaces the calling process is interested in. All supported attributes from these interfaces, whose values can be obtained without additional network activity, will be in the reply.

    Attributes from this interface and from im.telepathy1.Connection are always returned, and need not be requested explicitly.

    The behavior of this parameter is similar to the same parameter in Contacts.GetContactAttributes.

Returns

  • Requested — a{su} (Addressing_Normalization_Map)
  • A mapping of requested URIs to the corresponding contact handles.

    Requested URIs that are not valid or understood for this protocol MUST be omitted from the mapping.

  • Attributes — a{ua{sv}} (Contact_Attributes_Map)
  • A dictionary mapping the contact handles to contact attributes. If any of the requested addresses are in fact invalid, they are simply omitted from this mapping. If contact attributes are not immediately known, the behaviour is defined by the interface; the attribute should either be omitted from the result or replaced with a default value.

    Requested URIs that are not valid or understood for this protocol MUST be omitted from the mapping.

    Each contact's attributes will always include at least the identifier that would be obtained by inspecting the handle (im.telepathy1.Connection/contact-id).

Request contacts and retrieve their attributes using URI addresses.


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.
    Rationale:
    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.

Contact Attributes

Attributes that a contact can have, accessed with the im.telepathy1.Connection.Interface.Contacts interface.
(Permalink)

im.telepathy1.Connection.Interface.Addressing1/addresses — a{ss} (VCard_Field_Address_Map)

The various vCard addresses that identify this contact.
(Permalink)

im.telepathy1.Connection.Interface.Addressing1/uris — as

The various URI addresses that identify this contact.

Types

Mapping (Permalink)

VCard_Field_Address_Map — a{ss}

A mapping of vCard fields and addresses equivalent to a particular contact's protocol identifier. For instance, on XMPP this would contain x-jabber for all contacts, and x-facebook-id for contacts on Facebook's server.

  • VCard_Field — s
  • A vCard field, such as x-jabber.
  • Address — s
  • The value of that vCard field for the contact.
Mapping (Permalink)

Addressing_Normalization_Map — a{su}

Added in 0.25.1.
A map from URIs/vCard addresses to the corresponding handle.