Tp::Client::ConnectionInterfaceContactInfoInterface Class Reference

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

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

`#include <TelepathyQt/Connection>`

Inherits Tp::AbstractInterface.

## Public Slots
QDBusPendingReply < Tp::ContactInfoMap > | GetContactInfo (const Tp::UIntList &contacts, int timeout=-1)
QDBusPendingReply | RefreshContactInfo (const Tp::UIntList &contacts, int timeout=-1)
QDBusPendingReply < Tp::ContactInfoFieldList > | RequestContactInfo (uint contact, int timeout=-1)
QDBusPendingReply | SetContactInfo (const Tp::ContactInfoFieldList &contactInfo, int timeout=-1)

## Signals
void | ContactInfoChanged (uint contact, const Tp::ContactInfoFieldList &contactInfo)
Signals inherited from Tp::AbstractInterface
void | propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)

## Public Member Functions
| ConnectionInterfaceContactInfoInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
| ConnectionInterfaceContactInfoInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
| ConnectionInterfaceContactInfoInterface (Tp::DBusProxy *proxy)
| ConnectionInterfaceContactInfoInterface (const Tp::Client::ConnectionInterface &mainInterface)
| ConnectionInterfaceContactInfoInterface (const Tp::Client::ConnectionInterface &mainInterface, QObject *parent)
Tp::PendingVariant * | requestPropertyContactInfoFlags () const
Tp::PendingVariant * | requestPropertySupportedFields () 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
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.ContactInfo".

## Constructor & Destructor Documentation

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

Creates a ConnectionInterfaceContactInfoInterface 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::ConnectionInterfaceContactInfoInterface::ConnectionInterfaceContactInfoInterface | ( | const QDBusConnection & | connection,
|  | const QString & | busName,
|  | const QString & | objectPath,
|  | QObject * | parent = `0`
| ) |  |

Creates a ConnectionInterfaceContactInfoInterface 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::ConnectionInterfaceContactInfoInterface::ConnectionInterfaceContactInfoInterface | ( | Tp::DBusProxy * | proxy | ) |

Creates a ConnectionInterfaceContactInfoInterface 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::ConnectionInterfaceContactInfoInterface::ConnectionInterfaceContactInfoInterface | ( | const Tp::Client::ConnectionInterface & | mainInterface | ) |
| explicit

Creates a ConnectionInterfaceContactInfoInterface 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::ConnectionInterfaceContactInfoInterface::ConnectionInterfaceContactInfoInterface | ( | const Tp::Client::ConnectionInterface & | mainInterface,
|  | QObject * | parent
| ) |  |

Creates a ConnectionInterfaceContactInfoInterface 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::ConnectionInterfaceContactInfoInterface::staticInterfaceName | ( |  | ) |
| inlinestatic

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

Returns
  The D-Bus interface name.

Tp::PendingVariant* Tp::Client::ConnectionInterfaceContactInfoInterface::requestPropertyContactInfoFlags | ( |  | ) | const
| inline

Asynchronous getter for the remote object property `ContactInfoFlags` of type `uint`.

An integer representing the bitwise-OR of flags on this connection.

This property MAY change, without change notification, at any time before the connection moves to status Connection_Status_Connected. It MUST NOT change after that point.

Some XMPP servers, like Facebook Chat, do not allow the vCard to be changed (and so would not have the Can_Set flag). Whether the user's server is one of these cannot necessarily be detected until quite late in the connection process.

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

Tp::PendingVariant* Tp::Client::ConnectionInterfaceContactInfoInterface::requestPropertySupportedFields | ( |  | ) | const
| inline

Asynchronous getter for the remote object property `SupportedFields` of type `Tp::FieldSpecs`.

A list of field specifications describing the kinds of fields which may be passed to SetContactInfo() . The empty list indicates that arbitrary vCard fields are permitted. This property SHOULD be the empty list, and be ignored by clients, if ContactInfoFlags does not contain the Can_Set flag.

For example, a protocol in which arbitrary vCards were stored as-is would set this property to the empty list. A protocol whose notion of contact information is one each of personal phone number, mobile phone number, location, email address and date of birth, with no attributes allowed on each piece of information, would set this property to (in Python-like syntax):

    [
      ('tel', ['type=home'], Parameters_Exact, 1),
      ('tel', ['type=cell'], Parameters_Exact, 1),
      ('adr', [], Parameters_Exact, 1),
      ('bday', [], Parameters_Exact, 1),
      ('email', ['type=internet'], Parameters_Exact, 1),
    ]

A protocol which allows users to specify up to four phone numbers, which may be labelled as personal and/or mobile, would set this property to `[ ('tel', ['type=home', 'type=cell'], 0, 4), ]`.

Studying existing IM protocols shows that in practice protocols allow either a very restricted set of fields (such as MSN, which seems to correspond roughly to the largest example above), or something mapping 1:1 to a large subset of vCard (such as XMPP's XEP-0054).

This property MAY change, without change notification, at any time before the connection moves to status Connection_Status_Connected. It MUST NOT change after that point.

Some XMPP servers, like Google Talk, only allow a small subset of the "vcard-temp" protocol. Whether the user's server is one of these cannot be detected until quite late in the connection process.

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

Tp::PendingVariantMap* Tp::Client::ConnectionInterfaceContactInfoInterface::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::ContactInfoMap> Tp::Client::ConnectionInterfaceContactInfoInterface::GetContactInfo | ( | const Tp::UIntList & | contacts,
|  | int | timeout = `-1`
| ) |  |
| inlineslot

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

Request information on several contacts at once. This SHOULD only return cached information, omitting handles for which no information is cached from the returned map.

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

Parameters

  contacts |
      An array of handles representing contacts.
  timeout | The timeout in milliseconds.

Returns

      A dictionary mapping contact handles to information, whose keys are
      the subset of the requested list of handles for which information
      was cached.

QDBusPendingReply Tp::Client::ConnectionInterfaceContactInfoInterface::RefreshContactInfo | ( | const Tp::UIntList & | contacts,
|  | int | timeout = `-1`
| ) |  |
| inlineslot

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

Retrieve information for the given contact, requesting it from the network if an up-to-date version is not cached locally. This method SHOULD return immediately, emitting ContactInfoChanged when the contacts' updated contact information is returned. This method allows a client with cached contact information to update its cache after a number of days.

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

Parameters

  contacts |
      Integer handles for contacts.
  timeout | The timeout in milliseconds.

QDBusPendingReply<Tp::ContactInfoFieldList> Tp::Client::ConnectionInterfaceContactInfoInterface::RequestContactInfo | ( | uint | contact,
|  | int | timeout = `-1`
| ) |  |
| inlineslot

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

Retrieve information for a contact, requesting it from the network if it is not cached locally. This method is appropriate for an explicit user request to show a contact's information; it allows a UI to wait for the contact info to be returned.

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

Parameters

  contact |
      An integer handle for a contact.
  timeout | The timeout in milliseconds.

Returns

      Information about that contact.

QDBusPendingReply Tp::Client::ConnectionInterfaceContactInfoInterface::SetContactInfo | ( | const Tp::ContactInfoFieldList & | contactInfo,
|  | int | timeout = `-1`
| ) |  |
| inlineslot

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

Set new contact information for this connection, replacing existing information. This method is only suppported if ContactInfoFlags contains Can_Set, and may only be passed fields conforming to SupportedFields.

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

Parameters

  contactInfo |
      The new information to be set.
  timeout | The timeout in milliseconds.

void Tp::Client::ConnectionInterfaceContactInfoInterface::ContactInfoChanged | ( | uint | contact,
|  | const Tp::ContactInfoFieldList & | contactInfo
| ) |  |
| signal

Represents the signal `ContactInfoChanged` on the remote object.

Emitted when a contact's information has changed or been received for the first time on this connection.

Parameters

  contact |
      An integer handle for the contact whose info has changed.
  contactInfo | An array of fields representing information about this contact.

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

Reimplemented from Tp::AbstractInterface.