Methods
IdentifyAccount | (a{sv}: Parameters) | → | s: Account_ID | |
NormalizeContact | (s: Contact_ID) | → | s: Normalized_Contact_ID |
Properties
Interfaces | as (DBus_Interface_List) | Read only | |
Parameters | a(susv) (Param_Spec_List) | Read only | |
ConnectionInterfaces | as (DBus_Interface_List) | Read only | |
RequestableChannelClasses | a(a{sv}as) (Requestable_Channel_Class_List) | Read only | |
VCardField | s | Read only | |
EnglishName | s | Read only | |
Icon | s | Read only |
Description
An object representing a protocol for which this ConnectionManager can create Connections.
Each Protocol object has the same well-known bus name as its parent ConnectionManager. Its object path is formed by taking the ConnectionManager's object path and appending '/', followed by the Protocol name with any hyphen/minus '-' converted to underscores '_'.
Rationale:
If the ConnectionManager has a .manager file, each Protocol's immutable properties must be represented in that file; the representation is described as part of the documentation for each property. For instance, a very simple ConnectionManager with one Protocol might be represented like this:
[ConnectionManager] Interfaces= [Protocol example] Interfaces= ConnectionInterfaces=org.freedesktop.Telepathy.Connection.Interface.Requests; param-account=s required param-password=s required secret RequestableChannelClasses=text; VCardField=x-example EnglishName=Example Icon=im-example [text] org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text org.freedesktop.Telepathy.Channel.TargetHandleType u=1 allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;
Methods
IdentifyAccount (a{sv}: Parameters) → s: Account_ID
Parameters
- Parameters — a{sv} (String_Variant_Map)
Returns
- Account_ID — s
An opaque string suitable for use as the account-specific part of an Account's object path. This is not necessarily globally unique, but should represent a "best-effort" identification of the account.
Rationale:
Return a string which uniquely identifies the account to which the given parameters would connect.
Rationale:
Possible Errors
- Not Implemented
NormalizeContact (s: Contact_ID) → s: Normalized_Contact_ID
Parameters
- Contact_ID — s
Returns
- Normalized_Contact_ID — s
Attempt to normalize the given contact ID. Where possible, this SHOULD return the same thing that would be returned by InspectHandles(RequestHandles(CONTACT, [Contact_ID])) on a connected Connection.
If full normalization requires network activity or is otherwise impossible to do without a Connection, this method SHOULD perform a best-effort normalization.
Rationale:
This method MAY simply raise NotImplemented on some protocols.
Rationale:
Possible Errors
- Not Implemented
Properties
Interfaces — as (DBus_Interface_List)
A list of interfaces supported by this Protocol object.
This property is immutable, and should not be confused with ConnectionInterfaces, which refers to the interfaces of connections to this protocol.
Connection managers with a .manager
file
(as described as part of the
ConnectionManager interface) MUST cache this
property in the protocol's section of the .manager
file, using the key Interfaces
. The corresponding value
is a list of D-Bus interface names, each followed by a semicolon.
Parameters — a(susv) (Param_Spec_List)
The parameters which must or may be provided to the RequestConnection method when connecting to the given protocol. This property is immutable.
Connection managers with a .manager
file
(as described as part of the
ConnectionManager interface) MUST cache this
property in the protocol's section of the .manager
file via keys of the form param-p
and
default-p
, as documented in the
ConnectionManager interface.
ConnectionInterfaces — as (DBus_Interface_List)
A list of interface names which might be in the Interfaces property of a Connection to this protocol. Whether a Connection will have all, some or none of these interfaces depends on server capabilities.
This property is immutable, and should not be confused with Interfaces.
Connection managers with a .manager
file
MUST cache this property in the protocol's section of the
.manager
file, using the key
ConnectionInterfaces
. The corresponding value
is a list of D-Bus interface names, each followed by a semicolon.
RequestableChannelClasses — a(a{sv}as) (Requestable_Channel_Class_List)
A list of channel classes which might be requestable from a Connection to this protocol (i.e. they will, or might, appear in the Connection's RequestableChannelClasses property).
Whether a Connection will have all, some or none of these requestable channel classes depends on server capabilities; similarly, individual contacts are not guaranteed to support all of these channel classes.
This property is immutable.
Connection managers with a .manager
file
MUST cache this property in the protocol's section of the
.manager
file, using the key
RequestableChannelClasses
. The corresponding value
is a list of opaque strings, each followed by a semicolon; each
of those strings is the name of a group in the .manager
file which represents a channel class.
The names of the groups representing channel classes are not significant, and MUST NOT be interpreted. When writing .manager files, authors MAY choose mnemonic group names, generate group names mechanically (e.g. with an incrementing integer), or use some combination of these.
Each group representing a channel class has a key
allowed
which is a list of D-Bus property names
representing allowed parameters. Any other keys that do not contain
a space MUST be ignored. Any key containing a space represents
a fixed property; the key has the form
"propertyname type
", and the value
is encoded in the same way as for the default-p
keys described in the ConnectionManager documentation.
Connection managers that have channel classes whose fixed
properties are not representable in this form SHOULD NOT have
.manager
files.
For instance, this .manager
file could represent
a connection manager that supports 1-1 Text messages and
StreamedMedia audio calls:
[Protocol jabber] param-account=s required param-password=s required RequestableChannelClasses=rcc0;rcc1; [rcc0] org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.Text org.freedesktop.Telepathy.Channel.TargetHandleType u=1 allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID; [rcc1] org.freedesktop.Telepathy.Channel.ChannelType s=org.freedesktop.Telepathy.Channel.Type.StreamedMedia org.freedesktop.Telepathy.Channel.TargetHandleType u=1 allowed=org.freedesktop.Telepathy.Channel.TargetHandle;org.freedesktop.Telepathy.Channel.TargetID;org.freedesktop.Telepathy.Channel.Type.StreamedMedia.InitialAudio;
VCardField — s
The name of the most common vCard field used for this protocol's contact identifiers, normalized to lower case, or the empty string if there is no such field.
For example, this would be x-jabber
for
Jabber/XMPP (including Google Talk), or tel
for
the PSTN.
Rationale:
Connection managers with a .manager
file
MUST cache this property in the protocol's section of the
.manager
file if it is non-empty, using the key
VCardField
. The corresponding value
is a string, following the syntax of the "localestring" type from
the Desktop Entry Specification.
EnglishName — s
The name of the protocol in a form suitable for display to users, such as "AIM" or "Yahoo!", or the empty string if none is available.
This is effectively in the C locale (international English); user interfaces requiring a localized protocol name SHOULD look one up in their own message catalog based on either the Telepathy Protocol name or this property, but SHOULD use this English version as a fallback if no translated version can be found.
Rationale:
If this property's value is empty, clients MAY fall back to using the Telepathy Protocol name, possibly with its capitalization adjusted.
Connection managers with a .manager
file
MUST cache this property in the protocol's section of the
.manager
file if it is non-empty, using the key
EnglishName
. The corresponding value
is a string, following the syntax of the "localestring" type from
the Desktop Entry Specification.
Icon — s
The name of an icon in the system's icon theme, such as "im-msn", or the empty string.
Rationale:
If this property's value is empty, clients MAY fall back to generating a name based on the Protocol name.
Connection managers with a .manager
file
MUST cache this property in the protocol's section of the
.manager
file if it is non-empty, using the key
Icon
. The corresponding value
is a string, following the syntax of the "localestring" type from
the Desktop Entry Specification.