Home · Modules · All Classes · All Namespaces |
#include <TelepathyQt/_gen/svc-connection-manager.h>
Inherits Tp::AbstractAdaptor.
Public Slots | |
QString | NormalizeVCardAddress (const QString &VCardField, const QString &VCardAddress, const QDBusMessage &dbusMessage) |
QString | NormalizeContactURI (const QString &URI, const QDBusMessage &dbusMessage) |
Public Member Functions | |
QStringList | AddressableVCardFields () const |
QStringList | AddressableURISchemes () const |
Public Member Functions inherited from Tp::AbstractAdaptor | |
AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent) | |
~AbstractAdaptor () | |
QDBusConnection | dbusConnection () const |
QObject * | adaptee () const |
Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Protocol.Interface.Addressing".
QStringList Tp::Service::ProtocolInterfaceAddressingAdaptor::AddressableVCardFields | ( | ) | const |
Return the value of the exported D-Bus object property AddressableVCardFields
of type QStringList
.
Adaptees should export this property as a Qt property named 'addressableVCardFields' with type QStringList.
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
AddressableURISchemes instead.
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
AddressableVCardFields
. QStringList Tp::Service::ProtocolInterfaceAddressingAdaptor::AddressableURISchemes | ( | ) | const |
Return the value of the exported D-Bus object property AddressableURISchemes
of type QStringList
.
Adaptees should export this property as a Qt property named 'addressableURISchemes' with type QStringList.
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 ConnectionInterfaceRequestsInterface::RequestableChannelClasses 's TargetURIScheme fixed-property instead.
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
.AddressableURISchemes
.
|
slot |
Begins a call to the exported D-Bus method NormalizeVCardAddress
on this object.
Adaptees should export this method as a Qt slot with the following signature: void normalizeVCardAddress(const QString& VCardField, const QString& VCardAddress, const Tp::Service::ProtocolInterfaceAddressingAdaptor::NormalizeVCardAddressContextPtr &context);
Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.
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
ConnectionInterface .
If full normalization requires network activity or is otherwise impossible to do without a ConnectionInterface , this method SHOULD perform a best-effort normalization.
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.
VCardField | The vCard field of the address we are normalizing. The field name SHOULD be in lower case, and MUST appear in AddressableVCardFields. |
VCardAddress | The address to normalize, which is assumed to belong to a contact (and not, for instance, a chatroom or server). |
The vCard address, normalized as much as possible.
|
slot |
Begins a call to the exported D-Bus method NormalizeContactURI
on this object.
Adaptees should export this method as a Qt slot with the following signature: void normalizeContactURI(const QString& URI, const Tp::Service::ProtocolInterfaceAddressingAdaptor::NormalizeContactURIContextPtr &context);
Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.
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
ConnectionInterface .
If full normalization requires network activity or is otherwise impossible to do without a ConnectionInterface , this method SHOULD perform a best-effort normalization.
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
AddressableURISchemes .
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.
URI | 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 AddressableURISchemes. |
A URI, normalized as much as possible.
TelepathyQt 0.9.8 | Generated by 1.8.15 |