#include <TelepathyQt4/Client/Connection>
Public Slots | |
QDBusPendingReply < Telepathy::ContactAttributesMap > | GetContactAttributes (const Telepathy::UIntList &handles, const QStringList &interfaces, bool hold) |
Public Member Functions | |
ConnectionInterfaceContactsInterface (const QString &serviceName, const QString &objectPath, QObject *parent=0) | |
ConnectionInterfaceContactsInterface (const QDBusConnection &connection, const QString &serviceName, const QString &objectPath, QObject *parent=0) | |
ConnectionInterfaceContactsInterface (Telepathy::Client::DBusProxy *proxy) | |
ConnectionInterfaceContactsInterface (const Telepathy::Client::ConnectionInterface &mainInterface) | |
ConnectionInterfaceContactsInterface (const Telepathy::Client::ConnectionInterface &mainInterface, QObject *parent) | |
QStringList | ContactAttributeInterfaces () const TELEPATHY_GNUC_DEPRECATED |
Static Public Member Functions | |
static const char * | staticInterfaceName () |
Protected Member Functions | |
virtual void | invalidate (Telepathy::Client::DBusProxy *, const QString &, const QString &) |
Properties | |
QStringList | ContactAttributeInterfaces |
Telepathy::Client::ConnectionInterfaceContactsInterface::ConnectionInterfaceContactsInterface | ( | const QString & | serviceName, | |
const QString & | objectPath, | |||
QObject * | parent = 0 | |||
) |
Creates a ConnectionInterfaceContactsInterface associated with the given object on the session bus.
serviceName | Name of the service the object is on. | |
objectPath | Path to the object on the service. | |
parent | Passed to the parent class constructor. |
Telepathy::Client::ConnectionInterfaceContactsInterface::ConnectionInterfaceContactsInterface | ( | const QDBusConnection & | connection, | |
const QString & | serviceName, | |||
const QString & | objectPath, | |||
QObject * | parent = 0 | |||
) |
Creates a ConnectionInterfaceContactsInterface associated with the given object on the given bus.
connection | The bus via which the object can be reached. | |
serviceName | Name of the service the object is on. | |
objectPath | Path to the object on the service. | |
parent | Passed to the parent class constructor. |
Telepathy::Client::ConnectionInterfaceContactsInterface::ConnectionInterfaceContactsInterface | ( | Telepathy::Client::DBusProxy * | proxy | ) |
Creates a ConnectionInterfaceContactsInterface associated with the same object as the given proxy.
proxy | The proxy to use. It will also be the QObject::parent() for this object. |
Telepathy::Client::ConnectionInterfaceContactsInterface::ConnectionInterfaceContactsInterface | ( | const Telepathy::Client::ConnectionInterface & | mainInterface | ) | [explicit] |
Creates a ConnectionInterfaceContactsInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.
mainInterface | The proxy to use. |
Telepathy::Client::ConnectionInterfaceContactsInterface::ConnectionInterfaceContactsInterface | ( | const Telepathy::Client::ConnectionInterface & | mainInterface, | |
QObject * | parent | |||
) |
Creates a ConnectionInterfaceContactsInterface associated with the same object as the given proxy. However, a different parent object can be specified.
mainInterface | The proxy to use. | |
parent | Passed to the parent class constructor. |
QStringList Telepathy::Client::ConnectionInterfaceContactsInterface::ContactAttributeInterfaces | ( | ) | const [inline] |
Getter for the remote object property "ContactAttributeInterfaces".
Don't use this: it blocks the main loop.
QDBusPendingReply<Telepathy::ContactAttributesMap> Telepathy::Client::ConnectionInterfaceContactsInterface::GetContactAttributes | ( | const Telepathy::UIntList & | handles, | |
const QStringList & | interfaces, | |||
bool | hold | |||
) | [inline, slot] |
Begins a call to the D-Bus method "GetContactAttributes" on the remote object.
Return any number of contact attributes for the given handles.
handles | An array of handles representing contacts. | |
interfaces |
It is an error to request interfaces that are not supported by this Connection (i.e. mentioned in the <tp:member-ref>ContactAttributeInterfaces</tp:member-ref> property).
<tp:rationale>
This makes it possible to distinguish between interfaces for which the Connection has nothing to say (e.g. we don't know the avatar tokens of any of the contacts, so we omitted them all), and interfaces for which this API isn't supported. </tp:rationale>
Attributes from the interface <tp:dbus-ref>org.freedesktop.Telepathy.Connection</tp:dbus-ref> are always returned, and need not be requested explicitly.
As well as returning cached information immediately, the connection MAY start asynchronous requests to obtain better values for the contact attributes. If better values are later obtained by this process, they will be indicated with the usual signals (such as <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface.Aliasing">AliasesChanged</tp:dbus-ref>).
<tp:rationale> For instance, an XMPP connection manager could download vCards in response to a request for <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection.Interface">Aliasing</tp:dbus-ref> attributes. </tp:rationale>
hold | If true, all handles in the result have been held on behalf of the calling process, as if by a call to Connection.HoldHandles. For further round-trip avoidance. |
A dictionary mapping the contact handles to contact attributes. If any of the requested handles are in fact invalid, they are simply omitted from this mapping. If contact attributes are not immediately known, the behaviour is defined by the interface; the attribute should either be omitted from the result or replaced with a default value.
Each contact's attributes will always include at least the identifier that would be obtained by inspecting the handle (org.freedesktop.Telepathy.Connection/contact-id
).
References Telepathy::Client::AbstractInterface::invalidationMessage(), and Telepathy::Client::AbstractInterface::invalidationReason().
Referenced by Telepathy::Client::Connection::getContactAttributes().
virtual void Telepathy::Client::ConnectionInterfaceContactsInterface::invalidate | ( | Telepathy::Client::DBusProxy * | , | |
const QString & | , | |||
const QString & | ||||
) | [protected, virtual] |
Reimplemented from Telepathy::Client::AbstractInterface.
static const char* Telepathy::Client::ConnectionInterfaceContactsInterface::staticInterfaceName | ( | ) | [inline, static] |
Returns the name of the interface "org.freedesktop.Telepathy.Connection.Interface.Contacts", which this class represents.
QStringList Telepathy::Client::ConnectionInterfaceContactsInterface::ContactAttributeInterfaces [read] |
Represents property "ContactAttributeInterfaces" on the remote object.
A list of D-Bus interfaces for which GetContactAttributes is expected to work. This cannot change during the lifetime of the Connection.