Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions
Tp::Service::ConnectionInterfaceAvatarsAdaptor 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.Avatars".


Member Function Documentation

Return the value of the exported D-Bus object property SupportedAvatarMIMETypes of type QStringList.

Adaptees should export this property as a Qt property named 'supportedAvatarMIMETypes' with type QStringList.

An array of supported MIME types (e.g. "image/jpeg"). Clients MAY assume that the first type in this array is preferred. This property cannot change after the Connection goes to the Connected state.

Returns:
The value of exported property SupportedAvatarMIMETypes.

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

Adaptees should export this property as a Qt property named 'minimumAvatarHeight' with type uint.

The minimum height in pixels of an avatar on this protocol, which MAY be 0. This property cannot change after the Connection goes to the Connected state.

Returns:
The value of exported property MinimumAvatarHeight.

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

Adaptees should export this property as a Qt property named 'minimumAvatarWidth' with type uint.

The minimum width in pixels of an avatar on this protocol, which MAY be 0. This property cannot change after the Connection goes to the Connected state.

Returns:
The value of exported property MinimumAvatarWidth.

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

Adaptees should export this property as a Qt property named 'recommendedAvatarHeight' with type uint.

The recommended height in pixels of an avatar on this protocol, or 0 if there is no preferred height. This property cannot change after the Connection goes to the Connected state. In XMPP a recommended width is given by the protocol specification; in proprietary protocols, using the same avatar size as the proprietary client is likely to lead to the best display to other users.

Returns:
The value of exported property RecommendedAvatarHeight.

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

Adaptees should export this property as a Qt property named 'recommendedAvatarWidth' with type uint.

The recommended width in pixels of an avatar on this protocol, or 0 if there is no preferred width. This property cannot change after the Connection goes to the Connected state. The rationale is the same as for RecommendedAvatarHeight.

Returns:
The value of exported property RecommendedAvatarWidth.

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

Adaptees should export this property as a Qt property named 'maximumAvatarHeight' with type uint.

The maximum height in pixels of an avatar on this protocol, or 0 if there is no limit. This property cannot change after the Connection goes to the Connected state.

Returns:
The value of exported property MaximumAvatarHeight.

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

Adaptees should export this property as a Qt property named 'maximumAvatarWidth' with type uint.

The maximum width in pixels of an avatar on this protocol, or 0 if there is no limit. This property cannot change after the Connection goes to the Connected state.

Returns:
The value of exported property MaximumAvatarWidth.

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

Adaptees should export this property as a Qt property named 'maximumAvatarBytes' with type uint.

The maximum size in bytes of an avatar on this protocol, or 0 if there is no limit. This property cannot change after the Connection goes to the Connected state.

Returns:
The value of exported property MaximumAvatarBytes.
QStringList Tp::Service::ConnectionInterfaceAvatarsAdaptor::GetAvatarRequirements ( const QDBusMessage &  dbusMessage,
ushort &  minWidth,
ushort &  minHeight,
ushort &  maxWidth,
ushort &  maxHeight,
uint &  maxBytes 
) [slot]

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

Adaptees should export this method as a Qt slot with the following signature: void getAvatarRequirements(const Tp::Service::ConnectionInterfaceAvatarsAdaptor::GetAvatarRequirementsContextPtr &context);

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

Get the required format of avatars on this connection.

Parameters:
minWidthOutput parameter

The minimum image width in pixels

Parameters:
minHeightOutput parameter

The minimum image height in pixels

Parameters:
maxWidthOutput parameter

The maximum image width in pixels, or 0 if there is no limit

Parameters:
maxHeightOutput parameter

The maximum image height in pixels, or 0 if there is no limit

Parameters:
maxBytesOutput parameter

The maximum image size in bytes, or 0 if there is no limit

Returns:

An array of supported MIME types (eg image/jpeg)

QStringList Tp::Service::ConnectionInterfaceAvatarsAdaptor::GetAvatarTokens ( const Tp::UIntList contacts,
const QDBusMessage &  dbusMessage 
) [slot]

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

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

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

Get the unique tokens for all of the given contacts' avatars. Using this method in new Telepathy clients is deprecated; use GetKnownAvatarTokens instead.

Parameters:
contactsAn array of handles representing contacts
Returns:

An array of avatar tokens or empty strings (if no avatar is set) in the same order as the given array of contact handles

Tp::AvatarTokenMap Tp::Service::ConnectionInterfaceAvatarsAdaptor::GetKnownAvatarTokens ( const Tp::UIntList contacts,
const QDBusMessage &  dbusMessage 
) [slot]

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

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

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

Get the unique tokens for the given contacts' avatars. These tokens can be persisted across connections, and should be used by the client to check whether the avatars have been updated. For handles other than the self handle, only tokens that are already known are returned; an empty token means the given contact has no avatar. However, a CM must always have the tokens for the self handle if one is set (even if it is set to no avatar). On protocols where the avatar does not persist between connections, a CM should omit the self handle from the returned map until an avatar is explicitly set or cleared.

Parameters:
contactsAn array of handles representing contacts
Returns:

A dictionary of handles mapped to avatar tokens, containing only the known avatar tokens.

QByteArray Tp::Service::ConnectionInterfaceAvatarsAdaptor::RequestAvatar ( uint  contact,
const QDBusMessage &  dbusMessage,
QString &  MIMEType 
) [slot]

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

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

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

Request the avatar for a given contact. Using this method in new Telepathy clients is deprecated; use RequestAvatars instead.

Parameters:
contactAn integer handle for the contact to request the avatar for
MIMETypeOutput parameter

A string containing the image MIME type (eg image/jpeg), or empty if unknown

Returns:

An array of bytes containing the image data

void Tp::Service::ConnectionInterfaceAvatarsAdaptor::RequestAvatars ( const Tp::UIntList contacts,
const QDBusMessage &  dbusMessage 
) [slot]

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

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

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

Request avatars for a number of contacts. The AvatarRetrieved signal is emitted for each avatar retrieved. If the handles are valid but retrieving an avatar fails (for any reason, including the contact not having an avatar) the AvatarRetrieved signal is not emitted for that contact.

Parameters:
contactsThe contacts to retrieve avatars for
QString Tp::Service::ConnectionInterfaceAvatarsAdaptor::SetAvatar ( const QByteArray &  avatar,
const QString &  MIMEType,
const QDBusMessage &  dbusMessage 
) [slot]

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

Adaptees should export this method as a Qt slot with the following signature: void setAvatar(const QByteArray& avatar, const QString& MIMEType, const Tp::Service::ConnectionInterfaceAvatarsAdaptor::SetAvatarContextPtr &context);

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

Set a new avatar image for this connection. The avatar image must respect the requirements obtained by GetAvatarRequirements.

Parameters:
avatarAn array of bytes representing the avatar image data
MIMETypeA string representing the image MIME type
Returns:

The string token of the new avatar

void Tp::Service::ConnectionInterfaceAvatarsAdaptor::ClearAvatar ( const QDBusMessage &  dbusMessage) [slot]

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

Adaptees should export this method as a Qt slot with the following signature: void clearAvatar(const Tp::Service::ConnectionInterfaceAvatarsAdaptor::ClearAvatarContextPtr &context);

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

Remove the avatar image for this connection.

void Tp::Service::ConnectionInterfaceAvatarsAdaptor::AvatarUpdated ( uint  contact,
const QString &  newAvatarToken 
) [signal]

Represents the exported D-Bus signal AvatarUpdated on this object.

Adaptees should export this signal as a Qt signal with the following signature: void avatarUpdated(uint contact, const QString& newAvatarToken);

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

Parameters:
contactAn integer handle for the contact whose avatar has changed
newAvatarTokenUnique token for their new avatar
void Tp::Service::ConnectionInterfaceAvatarsAdaptor::AvatarRetrieved ( uint  contact,
const QString &  token,
const QByteArray &  avatar,
const QString &  type 
) [signal]

Represents the exported D-Bus signal AvatarRetrieved on this object.

Adaptees should export this signal as a Qt signal with the following signature: void avatarRetrieved(uint contact, const QString& token, const QByteArray& avatar, const QString& type);

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

Parameters:
contactThe contact whose avatar has been retrieved
tokenThe token corresponding to the avatar
avatarAn array of bytes containing the image data
typeA string containing the image MIME type (eg image/jpeg), or empty if unknown


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