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

Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::ConnectionInterfaceContactInfoAdaptor Class Reference
Service-side implementation » Connection service implementation

`#include <TelepathyQt/_gen/svc-connection.h>`

Inheritance diagram for Tp::Service::ConnectionInterfaceContactInfoAdaptor:
[legend]

## Public Slots

Tp::ContactInfoMap | GetContactInfo (const Tp::UIntList &contacts, const QDBusMessage &dbusMessage)
void | RefreshContactInfo (const Tp::UIntList &contacts, const QDBusMessage &dbusMessage)
Tp::ContactInfoFieldList | RequestContactInfo (uint contact, const QDBusMessage &dbusMessage)
void | SetContactInfo (const Tp::ContactInfoFieldList &contactInfo, const QDBusMessage &dbusMessage)

## Signals

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

## Public Member Functions

uint | ContactInfoFlags () const
Tp::FieldSpecs | SupportedFields () const
Public Member Functions inherited from Tp::AbstractAdaptor
| AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
| ~AbstractAdaptor ()
QDBusConnection | dbusConnection () const
QObject * | adaptee () const
Public Member Functions inherited from QDBusAbstractAdaptor
| ~QDBusAbstractAdaptor ()
Public Member Functions inherited from QObject
| QObject (QObject *parent)
virtual | ~QObject ()
virtual bool | event (QEvent *e)
virtual bool | eventFilter (QObject *watched, QEvent *event)
virtual const QMetaObject * | metaObject () const
QString | objectName () const
void | setObjectName (const QString &name)
bool | isWidgetType () const
bool | signalsBlocked () const
bool | blockSignals (bool block)
QThread * | thread () const
void | moveToThread (QThread *targetThread)
int | startTimer (int interval)
void | killTimer (int id)
T | findChild (const QString &name) const
QList< T > | findChildren (const QString &name) const
QList< T > | findChildren (const QRegExp &regExp) const
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
const QObjectList & | children () const
void | setParent (QObject *parent)
void | installEventFilter (QObject *filterObj)
void | removeEventFilter (QObject *obj)
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
bool | disconnect (const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *receiver, const char *method)
void | dumpObjectTree ()
void | dumpObjectInfo ()
bool | setProperty (const char *name, const QVariant &value)
QVariant | property (const char *name) const
QList< QByteArray > | dynamicPropertyNames () const
void | destroyed (QObject *obj)
QObject * | parent () const
bool | inherits (const char *className) const
void | deleteLater ()
| QObject (QObject *parent, const char *name)
void | insertChild (QObject *object)
void | removeChild (QObject *object)
bool | isA (const char *className) const
const char * | className () const
const char * | name () const
const char * | name (const char *defaultName) const
void | setName (const char *name)

## Additional Inherited Members

Static Public Member Functions inherited from QObject
QString | tr (const char *sourceText, const char *disambiguation, int n)
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n)
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
Protected Member Functions inherited from QDBusAbstractAdaptor
| QDBusAbstractAdaptor (QObject *obj)
void | setAutoRelaySignals (bool enable)
bool | autoRelaySignals () const
Protected Member Functions inherited from QObject
QObject * | sender () const
int | senderSignalIndex () const
int | receivers (const char *signal) const
virtual void | timerEvent (QTimerEvent *event)
virtual void | childEvent (QChildEvent *event)
virtual void | customEvent (QEvent *event)
virtual void | connectNotify (const char *signal)
virtual void | disconnectNotify (const char *signal)
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method)
Static Protected Member Functions inherited from QObject
QByteArray | normalizeSignalSlot (const char *signalSlot)
Properties inherited from QObject
| objectName

## Detailed Description

Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Connection.Interface.ContactInfo".

## Member Function Documentation

uint Tp::Service::ConnectionInterfaceContactInfoAdaptor::ContactInfoFlags | ( |  | ) | const

Return the value of the exported D-Bus object property `ContactInfoFlags` of type `uint`.

Adaptees should export this property as a Qt property named 'contactInfoFlags' with 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
  The value of exported property `ContactInfoFlags`.

Tp::FieldSpecs Tp::Service::ConnectionInterfaceContactInfoAdaptor::SupportedFields | ( |  | ) | const

Return the value of the exported D-Bus object property `SupportedFields` of type `Tp::FieldSpecs`.

Adaptees should export this property as a Qt property named 'supportedFields' with 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
  The value of exported property `SupportedFields`.

Tp::ContactInfoMap Tp::Service::ConnectionInterfaceContactInfoAdaptor::GetContactInfo | ( | const Tp::UIntList & | contacts,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

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

Adaptees should export this method as a Qt slot with the following signature: void getContactInfo(const Tp::UIntList& contacts, const Tp::Service::ConnectionInterfaceContactInfoAdaptor::GetContactInfoContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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.

Parameters

  contacts

      An array of handles representing contacts.

Returns

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

void Tp::Service::ConnectionInterfaceContactInfoAdaptor::RefreshContactInfo | ( | const Tp::UIntList & | contacts,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

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

Adaptees should export this method as a Qt slot with the following signature: void refreshContactInfo(const Tp::UIntList& contacts, const Tp::Service::ConnectionInterfaceContactInfoAdaptor::RefreshContactInfoContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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.

Parameters

  contacts

      Integer handles for contacts.

Tp::ContactInfoFieldList Tp::Service::ConnectionInterfaceContactInfoAdaptor::RequestContactInfo | ( | uint | contact,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

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

Adaptees should export this method as a Qt slot with the following signature: void requestContactInfo(uint contact, const Tp::Service::ConnectionInterfaceContactInfoAdaptor::RequestContactInfoContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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.

Parameters

  contact

      An integer handle for a contact.

Returns

      Information about that contact.

void Tp::Service::ConnectionInterfaceContactInfoAdaptor::SetContactInfo | ( | const Tp::ContactInfoFieldList & | contactInfo,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

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

Adaptees should export this method as a Qt slot with the following signature: void setContactInfo(const Tp::ContactInfoFieldList& contactInfo, const Tp::Service::ConnectionInterfaceContactInfoAdaptor::SetContactInfoContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

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.

Parameters

  contactInfo

      The new information to be set.

void Tp::Service::ConnectionInterfaceContactInfoAdaptor::ContactInfoChanged | ( | uint | contact,
|  | const Tp::ContactInfoFieldList & | contactInfo
| ) |  |

signal

Represents the exported D-Bus signal `ContactInfoChanged` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void contactInfoChanged(uint contact, const Tp::ContactInfoFieldList& contactInfo);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  contact

      An integer handle for the contact whose info has changed.

  contactInfo | An array of fields representing information about this contact.