Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions
Tp::Service::ConnectionInterfaceContactInfoAdaptor Class Reference

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

Inherits Tp::AbstractAdaptor.

List of all members.

Public Slots

Signals

Public Member Functions


Detailed Description

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


Member Function Documentation

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.

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:
contactsAn 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:
contactsInteger 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:
contactAn 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:
contactInfoThe new information to be set.

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:
contactAn integer handle for the contact whose info has changed.
contactInfo An array of fields representing information about this contact.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.6.1