This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
An interface for protocols that support multiple forms of addressing contacts, for example through vCard addresses and URIs.
If the ConnectionManager has a .manager file, and it supports this interface, the interface's immutable properties must be represented in the file; the representation is described as part of the documentation for each property.
For instance, a SIP connection manager might have the following lines in the .manager file.
[Protocol sip] AddressableVCardFields=tel;x-sip; AddressableURISchemes=tel;sip;
The vCard fields that can be used to request a contact with
normalized to lower case. If the URL
vCard
field is addressable, a colon, followed by the supported URI
schemes will be concatenated.
For example: ["tel", "x-sip"]
.
The url
vCard field MUST NOT appear here; see
In practice, protocols have a limited set of URI schemes that make sense to resolve as a contact.
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
AddressableVCardFields
. The corresponding value
is a list of strings, each followed with a semicolon and in the
syntax of the "localestring" type from the Desktop Entry
Specification.
Well-known vCard fields:
tel
x-sip
x-aim
x-icq
x-skype
x-skype
is preferredx-groupwise
x-gadugadu
x-jabber
x-msn
x-yahoo
x-facebook-id
The URI schemes that are supported by this protocol.
For example: ["tel", "sip"]
.
This property should only be used when the connection is
offline. When it is connected the addressable URI schemes should be
retrieved from the
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
AddressableURISchemes
. The corresponding value
is a list of strings, each followed with a semicolon and in the
syntax of the "localestring" type from the Desktop Entry
Specification.
Well-known URI schemes:
sip
sip:julien@example.com
.sips
sips:julien@example.com
.tel
tel:+12065551234
.xmpp
xmpp:julien@example.com
.msnim
add
; the
contact
field in the query string is used to
identify the contact.
For example: msnim:add?contact=julien
.aim
addbuddy
; the
screenname
field in the query string is used to
identify the contact.
For example: aim:addbuddy?screenname=julien
.skype
skype:julien
.ymsgr
addfriend
; the
query string is used to identify the contact.
For example: ymsgr:addfriend?julien
.gg
gg:julien
.Attempt to normalize the given vCard address. Where possible, this
SHOULD return an address that would appear in the
org.freedesktop.Telepathy.Connection.Interface.Addressing1/addresses
attribute for a contact on a connected
If full normalization requires network activity or is otherwise
impossible to do without a
An example would be a vCard TEL field with a formatted
number in the form of +1 (206) 555 1234
, this would be
normalized to +12065551234
.
This method MAY simply raise NotImplemented on some protocols, if it has no use.
Attempt to normalize the given contact URI. Where possible, this
SHOULD return an address that would appear in the
org.freedesktop.Telepathy.Connection.Interface.Addressing1/uris
attribute for a contact on a connected
If full normalization requires network activity or is otherwise
impossible to do without a
If the URI has extra information beyond what's necessary to
identify a particular contact, such as an XMPP resource or an
action to carry out, this extra information SHOULD be removed.
If all URIs in a scheme contain a verb or action
(like aim
, ymsgr
and
msnim
URIs), then the verb SHOULD be replaced
with the one specified in
This method is intended to normalize URIs stored in address books, for instance. In protocols like XMPP, if you vary the resource or action (query string), the URI still refers to the same high-level contact.
For instance,
xmpp:romeo@Example.Com/Empathy?message;body=Hello
would be normalized to xmpp:romeo@example.com
,
and aim:goim?screenname=Romeo%20M&message=Hello
would be normalized to
aim:addbuddy?screenname=romeom
.
This method MAY simply raise NotImplemented on some protocols, if it has no use.
The URI to normalize, which is assumed to refer to a contact (as opposed to, for instance, a chatroom or a server).
In some protocols, like XMPP, there is no way to tell whether a given URI refers to a contact or a chatroom by looking at its syntax.
The URI's scheme (i.e. the part before
the first colon) MUST appear in
The URI is syntactically incorrect or cannot be interpreted as a reference to a contact.
For instance, aim:!?
is not a valid AIM URI,
while aim:goaway?message=Absent
is a
valid AIM URI, but not a contact.