Tp::Client::ConnectionInterfaceContactsInterface Class Reference

| Home · All Classes · All Namespaces · Modules · Functions · Files

Public Slots | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Tp::Client::ConnectionInterfaceContactsInterface Class Reference
Connection proxies

`#include <TelepathyQt/Connection>`

Inherits Tp::AbstractInterface.

## Public Slots
QDBusPendingReply < Tp::ContactAttributesMap > | GetContactAttributes (const Tp::UIntList &handles, const QStringList &interfaces, bool hold, int timeout=-1)
QDBusPendingReply< uint, QVariantMap > | GetContactByID (const QString &identifier, const QStringList &interfaces, int timeout=-1)

## Public Member Functions
| ConnectionInterfaceContactsInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
| ConnectionInterfaceContactsInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
| ConnectionInterfaceContactsInterface (Tp::DBusProxy *proxy)
| ConnectionInterfaceContactsInterface (const Tp::Client::ConnectionInterface &mainInterface)
| ConnectionInterfaceContactsInterface (const Tp::Client::ConnectionInterface &mainInterface, QObject *parent)
Tp::PendingVariant * | requestPropertyContactAttributeInterfaces () const
Tp::PendingVariantMap * | requestAllProperties () 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)
PendingVariant * | internalRequestProperty (const QString &name) const
PendingOperation * | internalSetProperty (const QString &name, const QVariant &newValue)
PendingVariantMap * | internalRequestAllProperties () 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.Connection.Interface.Contacts".

## Constructor & Destructor Documentation

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

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

Parameters

  busName | Name of the service the object is on.
  objectPath | Path to the object on the service.
  parent | Passed to the parent class constructor.

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

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

Parameters

  connection | The bus via which the object can be reached.
  busName | Name of the service the object is on.
  objectPath | Path to the object on the service.
  parent | Passed to the parent class constructor.

Tp::Client::ConnectionInterfaceContactsInterface::ConnectionInterfaceContactsInterface | ( | Tp::DBusProxy * | proxy | ) |

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

Parameters

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

Tp::Client::ConnectionInterfaceContactsInterface::ConnectionInterfaceContactsInterface | ( | const Tp::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.

Parameters

  mainInterface | The proxy to use.

Tp::Client::ConnectionInterfaceContactsInterface::ConnectionInterfaceContactsInterface | ( | const Tp::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.

Parameters

  mainInterface | The proxy to use.
  parent | Passed to the parent class constructor.

## Member Function Documentation

static QLatin1String Tp::Client::ConnectionInterfaceContactsInterface::staticInterfaceName | ( |  | ) |
| inlinestatic

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

Returns
  The D-Bus interface name.

Tp::PendingVariant* Tp::Client::ConnectionInterfaceContactsInterface::requestPropertyContactAttributeInterfaces | ( |  | ) | const
| inline

Asynchronous getter for the remote object property `ContactAttributeInterfaces` of type `QStringList`.

A list of D-Bus interfaces for which GetContactAttributes is expected to work. This cannot change during the lifetime of the Connection.

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

Tp::PendingVariantMap* Tp::Client::ConnectionInterfaceContactsInterface::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.

QDBusPendingReply<Tp::ContactAttributesMap> Tp::Client::ConnectionInterfaceContactsInterface::GetContactAttributes | ( | const Tp::UIntList & | handles,
|  | const QStringList & | interfaces,
|  | bool | hold,
|  | int | timeout = `-1`
| ) |  |
| inlineslot

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

Return any number of contact attributes for the given handles.

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

Parameters

  handles |
      An array of handles representing contacts.
  interfaces | A list of strings indicating which D-Bus interfaces the calling process is interested in. All supported attributes from these interfaces, whose values can be obtained without additional network activity, will be in the reply. Connection managers SHOULD ignore interfaces requested which they do not support (i.e. those not mentioned in the ContactAttributeInterfaces property.) This simplifies client-side code. Clients which care may distinguish between unsupported interfaces (e.g. this Connection does not support Avatars), and interfaces on which no information is known for these contacts (e.g. we don't know the avatar tokens of any of the contacts, so we omitted them all) by inspecting ContactAttributeInterfaces . Attributes from the interface ConnectionInterface 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 ConnectionInterfaceAliasingInterface::AliasesChanged() ). For instance, an XMPP connection manager could download vCards in response to a request for ConnectionInterfaceAliasingInterface attributes.
  hold | If true, all handles that appear as keys in the result have been held on behalf of the calling process, as if by a call to ConnectionInterface::HoldHandles() . (If ConnectionInterface::HasImmortalHandles is true, which SHOULD be the case in all new connection managers, this has no effect.) For further round-trip avoidance.
  timeout | The timeout in milliseconds.

Returns

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`).

QDBusPendingReply<uint, QVariantMap> Tp::Client::ConnectionInterfaceContactsInterface::GetContactByID | ( | const QString & | identifier,
|  | const QStringList & | interfaces,
|  | int | timeout = `-1`
| ) |  |
| inlineslot

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

Return any number of contact attributes for the given identifier. This is for a single identifier to make it simpler to use for the most common use case. For multiple contacts case, GetContactAttributes should be used.

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

Parameters

  identifier |
      An identifier representing a contact.
  interfaces | A list of strings indicating which D-Bus interfaces the calling process is interested in. All supported attributes from these interfaces, whose values can be obtained without additional network activity, will be in the reply. See GetContactAttributes() for details.
  timeout | The timeout in milliseconds.

Returns

The contact's handle, as returned by ConnectionInterface::RequestHandles()

Returns

All supported attributes of the contact on the given interfaces that can be returned without network round-trips. 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.

The contact's attributes will always include at least the identifier that would be obtained by inspecting the handle (`org.freedesktop.Telepathy.Connection/contact-id`).

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

Reimplemented from Tp::AbstractInterface.