Interface Connection.Interface.Aliasing

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

Methods

GetAliasFlags () u: Alias_Flags
RequestAliases (au: Contacts) as: Aliases
GetAliases (au: Contacts) a{us}: Aliases
SetAliases (a{us}: Aliases) nothing

Signals

AliasesChanged (a(us): Aliases)

Contact Attributes

org.freedesktop.Telepathy.Connection.Interface.Aliasing/alias s

Types

Connection_Alias_Flags Flags u
Alias_Map Mapping a{us}
Alias_Pair Struct (us)
Objects implementing this interface must also implement:

Description

An interface on connections to support protocols where contacts have an alias which they can change at will. Provides a method for the user to set their own alias, and a signal which should be emitted when a contact's alias is changed or first discovered.

On connections where the user is allowed to set aliases for contacts and store them on the server, the GetAliasFlags method will have the CONNECTION_ALIAS_FLAG_USER_SET flag set, and the SetAliases method may be called on contact handles other than the user themselves.

Aliases are intended to be used as the main displayed name for the contact, where available.

Methods

(Permalink)

GetAliasFlags () → u: Alias_Flags

Returns

Return a bitwise OR of flags detailing the behaviour of aliases on this connection.

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

RequestAliases (au: Contacts) → as: Aliases

Parameters

Returns

  • Aliases — as
  • A list of aliases in the same order as the contact handles
Request the value of several contacts' aliases at once.

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.
  • Network Error
  • Raised when there is an error reading from or writing to the network.
  • Not Available
  • Raised when the requested functionality is temporarily unavailable.
  • Invalid Handle
  • The handle specified is unknown on this channel or connection.
(Permalink)

GetAliases (au: Contacts) → a{us}: Aliases

Parameters

Returns

  • Aliases — a{us} (Alias_Map)
  • A dictionary mapping contact handles to aliases
Request the value of several contacts' aliases at once. This SHOULD only return cached aliases, falling back on the contact identifier (i.e. the string corresponding to the handle) if none is present. Also if there was no cached alias, a request SHOULD be started of which the result is later signalled by AliasesChanged.

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 specified is unknown on this channel or connection.
(Permalink)

SetAliases (a{us}: Aliases) → nothing

Parameters

  • Aliases — a{us} (Alias_Map)
  • A dictionary mapping integer handles of contacts to strings of the new alias to set.
Request that the alias of the given contact be changed. Success will be indicated by emitting an AliasesChanged signal. On connections where the CONNECTION_ALIAS_FLAG_USER_SET flag is not set, this method will only ever succeed if the contact is the user's own handle (as returned by Connection.GetSelfHandle).

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.
  • Network Error
  • Raised when there is an error reading from or writing to the network.
  • Not Available
  • Raised when the requested functionality is temporarily unavailable.
  • Invalid Argument
  • Raised when one of the provided arguments is invalid.
  • Permission Denied
  • The user is not permitted to perform the requested operation.

Signals

(Permalink)

AliasesChanged (a(us): Aliases)

Parameters

  • Aliases — a(us) (Alias_Pair_List)
  • An array containing structs of:
    • the handle representing the contact
    • the new alias
Signal emitted when a contact's alias (or that of the user) is changed.

Contact Attributes

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

org.freedesktop.Telepathy.Connection.Interface.Aliasing/alias — s

The same string that would be returned by GetAliases (always present with some value, possibly the same as Connection/contact-id, if information from the Aliasing interface was requested)

Types

Flags (Permalink)

Connection_Alias_Flags — u

  • User_Set (1)
  • The aliases of contacts on this connection may be changed by the user of the service, not just by the contacts themselves. This is the case on Jabber, for instance.

    It is possible that aliases can be changed by the contacts too - which alias takes precedence is not defined by this specification, and depends on the server and/or connection manager implementation.

    This flag only applies to the aliases of "globally valid" contact handles. At this time, clients should not expect to be able to change the aliases corresponding to any channel-specific handles. If this becomes possible in future, a new flag will be defined.

Mapping (Permalink)

Alias_Map — a{us}

A dictionary whose keys are contact handles and whose values are aliases.
Struct (Permalink)

Alias_Pair — (us)

A pair (contact handle, alias) as seen in the AliasesChanged signal.