Home · Modules · All Classes · All Namespaces
Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Tp::Client::ProtocolInterfaceAddressingInterface Class Reference

#include <TelepathyQt/ConnectionManager>

Inherits Tp::AbstractInterface.

Public Slots

QDBusPendingReply< QString > NormalizeVCardAddress (const QString &VCardField, const QString &VCardAddress, int timeout=-1)
 
QDBusPendingReply< QString > NormalizeContactURI (const QString &URI, int timeout=-1)
 

Public Member Functions

 ProtocolInterfaceAddressingInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ProtocolInterfaceAddressingInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ProtocolInterfaceAddressingInterface (Tp::DBusProxy *proxy)
 
 ProtocolInterfaceAddressingInterface (const Tp::Client::ConnectionManagerInterface &mainInterface)
 
 ProtocolInterfaceAddressingInterface (const Tp::Client::ConnectionManagerInterface &mainInterface, QObject *parent)
 
Tp::PendingVariantrequestPropertyAddressableVCardFields () const
 
Tp::PendingVariantrequestPropertyAddressableURISchemes () const
 
Tp::PendingVariantMaprequestAllProperties () const
 
- Public Member Functions inherited from Tp::AbstractInterface
virtual ~AbstractInterface ()
 
bool isValid () const
 
QString invalidationReason () const
 
QString invalidationMessage () const
 
void setMonitorProperties (bool monitorProperties)
 
bool isMonitoringProperties () const
 

Static Public Member Functions

static QLatin1String staticInterfaceName ()
 

Protected Member Functions

virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)
 
- Protected Member Functions inherited from Tp::AbstractInterface
 AbstractInterface (DBusProxy *proxy, const QLatin1String &interface)
 
 AbstractInterface (const QString &busName, const QString &path, const QLatin1String &interface, const QDBusConnection &connection, QObject *parent)
 
PendingVariantinternalRequestProperty (const QString &name) const
 
PendingOperationinternalSetProperty (const QString &name, const QVariant &newValue)
 
PendingVariantMapinternalRequestAllProperties () const
 

Additional Inherited Members

- Signals inherited from Tp::AbstractInterface
void propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
 
- Protected Slots inherited from Tp::AbstractInterface

Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Protocol.Interface.Addressing".

Constructor & Destructor Documentation

◆ ProtocolInterfaceAddressingInterface() [1/5]

Tp::Client::ProtocolInterfaceAddressingInterface::ProtocolInterfaceAddressingInterface ( const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ProtocolInterfaceAddressingInterface associated with the given object on the session bus.

Parameters
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.

◆ ProtocolInterfaceAddressingInterface() [2/5]

Tp::Client::ProtocolInterfaceAddressingInterface::ProtocolInterfaceAddressingInterface ( const QDBusConnection &  connection,
const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ProtocolInterfaceAddressingInterface associated with the given object on the given bus.

Parameters
connectionThe bus via which the object can be reached.
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.

◆ ProtocolInterfaceAddressingInterface() [3/5]

Tp::Client::ProtocolInterfaceAddressingInterface::ProtocolInterfaceAddressingInterface ( Tp::DBusProxy proxy)

Creates a ProtocolInterfaceAddressingInterface associated with the same object as the given proxy.

Parameters
proxyThe proxy to use. It will also be the QObject::parent() for this object.

◆ ProtocolInterfaceAddressingInterface() [4/5]

Tp::Client::ProtocolInterfaceAddressingInterface::ProtocolInterfaceAddressingInterface ( const Tp::Client::ConnectionManagerInterface mainInterface)
explicit

Creates a ProtocolInterfaceAddressingInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters
mainInterfaceThe proxy to use.

◆ ProtocolInterfaceAddressingInterface() [5/5]

Tp::Client::ProtocolInterfaceAddressingInterface::ProtocolInterfaceAddressingInterface ( const Tp::Client::ConnectionManagerInterface mainInterface,
QObject *  parent 
)

Creates a ProtocolInterfaceAddressingInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters
mainInterfaceThe proxy to use.
parentPassed to the parent class constructor.

Member Function Documentation

◆ staticInterfaceName()

static QLatin1String Tp::Client::ProtocolInterfaceAddressingInterface::staticInterfaceName ( )
inlinestatic

Returns the name of the interface "org.freedesktop.Telepathy.Protocol.Interface.Addressing", which this class represents.

Returns
The D-Bus interface name.

◆ requestPropertyAddressableVCardFields()

Tp::PendingVariant* Tp::Client::ProtocolInterfaceAddressingInterface::requestPropertyAddressableVCardFields ( ) const
inline

Asynchronous getter for the remote object property AddressableVCardFields of 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
The TEL vCard field. Used for phone numbers.
x-sip
The X-SIP vCard field. Used for SIP addresses.
x-aim
The X-AIM vCard field. Used for AIM user IDs.
x-icq
The X-ICQ vCard field. Used for ICQ UINs.
x-skype
The X-SKYPE vCard field. Used for Skype user names or telephone numbers. There is also a X-SKYPE-USERNAME field, but for Telepathy purposes, x-skype is preferred
x-groupwise
The X-GROUPWISE vCard field. Used for Groupwise contacts.
x-gadugadu
The X-GADUGADU vCard field. Used for Gadu-Gadu contacts.
x-jabber
The X-JABBER vCard field. Used for XMPP JIDs.
x-msn
The X-MSN vCard field. Used for MSN contacts.
x-yahoo
The X-YAHOO vCard field. Used for Yahoo! IDs.
x-facebook-id
Used for Facebook IDs in XMPP. If the user JID is "-12345@chat.facebook.com" then the x-facebook-id is "12345"

Returns
A pending variant which will emit finished when the property has been retrieved.

◆ requestPropertyAddressableURISchemes()

Tp::PendingVariant* Tp::Client::ProtocolInterfaceAddressingInterface::requestPropertyAddressableURISchemes ( ) const
inline

Asynchronous getter for the remote object property AddressableURISchemes of 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 protocol. For example: sip:julien@example.com.
sips
Secure (encrypted) SIP protocol. For example: sips:julien@example.com.
tel
Used for telephone numbers. For example: tel:+12065551234.
xmpp
XMPP protocol. For example: xmpp:julien@example.com.
msnim
For the purposes of ProtocolInterfaceAddressingInterface , ConnectionInterfaceAddressingInterface , and org.freedesktop.Telepathy.Channel.Interface.Addressing1 , the verb part is ignored, and SHOULD be add; the contact field in the query string is used to identify the contact. For example: msnim:add?contact=julien.
aim
For the purposes of ProtocolInterfaceAddressingInterface , ConnectionInterfaceAddressingInterface , and org.freedesktop.Telepathy.Channel.Interface.Addressing1 , the verb part is ignored, and SHOULD be addbuddy; the screenname field in the query string is used to identify the contact. For example: aim:addbuddy?screenname=julien.
skype
Skype protocol. For example: skype:julien.
ymsgr
For the purposes of ProtocolInterfaceAddressingInterface , ConnectionInterfaceAddressingInterface , and org.freedesktop.Telepathy.Channel.Interface.Addressing1 , the verb part is ignored, and SHOULD be addfriend; the query string is used to identify the contact. For example: ymsgr:addfriend?julien.
gg
Gadu-Gadu protocol. For example: gg:julien.

Returns
A pending variant which will emit finished when the property has been retrieved.

◆ requestAllProperties()

Tp::PendingVariantMap* Tp::Client::ProtocolInterfaceAddressingInterface::requestAllProperties ( ) const
inline

Request all of the DBus properties on the interface.

Returns
A pending variant map which will emit finished when the properties have been retrieved.

◆ NormalizeVCardAddress

QDBusPendingReply<QString> Tp::Client::ProtocolInterfaceAddressingInterface::NormalizeVCardAddress ( const QString &  VCardField,
const QString &  VCardAddress,
int  timeout = -1 
)
inlineslot

Begins a call to the D-Bus method NormalizeVCardAddress on the remote object.

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.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
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).
timeoutThe timeout in milliseconds.
Returns
The vCard address, normalized as much as possible.

◆ NormalizeContactURI

QDBusPendingReply<QString> Tp::Client::ProtocolInterfaceAddressingInterface::NormalizeContactURI ( const QString &  URI,
int  timeout = -1 
)
inlineslot

Begins a call to the D-Bus method NormalizeContactURI on the remote object.

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.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
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&apos;s scheme (i.e. the part before the first colon) MUST 
appear in AddressableURISchemes.
timeoutThe timeout in milliseconds.
Returns
A URI, normalized as much as possible.

◆ invalidate()

void Tp::Client::ProtocolInterfaceAddressingInterface::invalidate ( Tp::DBusProxy proxy,
const QString &  error,
const QString &  message 
)
protectedvirtual

Reimplemented from Tp::AbstractInterface.