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::ConnectionInterfaceAvatarsInterface Class Reference

#include <TelepathyQt/Connection>

Inheritance diagram for Tp::Client::ConnectionInterfaceAvatarsInterface:
Inheritance graph
[legend]

Public Slots

QDBusPendingReply< QStringList,
ushort, ushort, ushort, ushort,
uint > 
GetAvatarRequirements (int timeout=-1)
 
QDBusPendingReply< QStringListGetAvatarTokens (const Tp::UIntList &contacts, int timeout=-1)
 
QDBusPendingReply
< Tp::AvatarTokenMap
GetKnownAvatarTokens (const Tp::UIntList &contacts, int timeout=-1)
 
QDBusPendingReply< QByteArray,
QString
RequestAvatar (uint contact, int timeout=-1)
 
QDBusPendingReply RequestAvatars (const Tp::UIntList &contacts, int timeout=-1)
 
QDBusPendingReply< QStringSetAvatar (const QByteArray &avatar, const QString &MIMEType, int timeout=-1)
 
QDBusPendingReply ClearAvatar (int timeout=-1)
 

Signals

void AvatarUpdated (uint contact, const QString &newAvatarToken)
 
void AvatarRetrieved (uint contact, const QString &token, const QByteArray &avatar, const QString &type)
 
- Signals inherited from Tp::AbstractInterface
void propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
 

Public Member Functions

 ConnectionInterfaceAvatarsInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ConnectionInterfaceAvatarsInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ConnectionInterfaceAvatarsInterface (Tp::DBusProxy *proxy)
 
 ConnectionInterfaceAvatarsInterface (const Tp::Client::ConnectionInterface &mainInterface)
 
 ConnectionInterfaceAvatarsInterface (const Tp::Client::ConnectionInterface &mainInterface, QObject *parent)
 
Tp::PendingVariantrequestPropertySupportedAvatarMIMETypes () const
 
Tp::PendingVariantrequestPropertyMinimumAvatarHeight () const
 
Tp::PendingVariantrequestPropertyMinimumAvatarWidth () const
 
Tp::PendingVariantrequestPropertyRecommendedAvatarHeight () const
 
Tp::PendingVariantrequestPropertyRecommendedAvatarWidth () const
 
Tp::PendingVariantrequestPropertyMaximumAvatarHeight () const
 
Tp::PendingVariantrequestPropertyMaximumAvatarWidth () const
 
Tp::PendingVariantrequestPropertyMaximumAvatarBytes () const
 
Tp::PendingVariantMaprequestAllProperties () 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
 
- Public Member Functions inherited from QDBusAbstractInterface
virtual  ~QDBusAbstractInterface ()
 
bool isValid () const
 
QDBusConnection connection () const
 
QString service () const
 
QString path () const
 
QString interface () const
 
QDBusError lastError () const
 
void setTimeout (int timeout)
 
int timeout () const
 
QDBusMessage call (const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusMessage call (QDBus::CallMode mode, const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusMessage callWithArgumentList (QDBus::CallMode mode, const QString &method, const QList< QVariant > &args)
 
bool callWithCallback (const QString &method, const QList< QVariant > &args, QObject *receiver, const char *returnMethod, const char *errorMethod)
 
bool callWithCallback (const QString &method, const QList< QVariant > &args, QObject *receiver, const char *slot)
 
QDBusPendingCall asyncCall (const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusPendingCall asyncCallWithArgumentList (const QString &method, const QList< QVariant > &args)
 
- 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 QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QObjectchild (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< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
QObjectparent () 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)
 

Static Public Member Functions

static QLatin1String staticInterfaceName ()
 
- 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

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)
 
PendingVariantinternalRequestProperty (const QString &name) const
 
PendingOperationinternalSetProperty (const QString &name, const QVariant &newValue)
 
PendingVariantMapinternalRequestAllProperties () const
 
- Protected Member Functions inherited from QObject
QObjectsender () 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)
 

Additional Inherited Members

- Protected Slots inherited from Tp::AbstractInterface
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

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

Constructor & Destructor Documentation

Tp::Client::ConnectionInterfaceAvatarsInterface::ConnectionInterfaceAvatarsInterface ( const QString busName,
const QString objectPath,
QObject parent = 0 
)

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

Parameters
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ConnectionInterfaceAvatarsInterface::ConnectionInterfaceAvatarsInterface ( const QDBusConnection connection,
const QString busName,
const QString objectPath,
QObject parent = 0 
)

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

Parameters
connectionThe bus via which the object can be reached.
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ConnectionInterfaceAvatarsInterface::ConnectionInterfaceAvatarsInterface ( Tp::DBusProxy proxy)

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

Parameters
proxyThe proxy to use. It will also be the QObject::parent() for this object.
Tp::Client::ConnectionInterfaceAvatarsInterface::ConnectionInterfaceAvatarsInterface ( const Tp::Client::ConnectionInterface mainInterface)
explicit

Creates a ConnectionInterfaceAvatarsInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters
mainInterfaceThe proxy to use.
Tp::Client::ConnectionInterfaceAvatarsInterface::ConnectionInterfaceAvatarsInterface ( const Tp::Client::ConnectionInterface mainInterface,
QObject parent 
)

Creates a ConnectionInterfaceAvatarsInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters
mainInterfaceThe proxy to use.
parentPassed to the parent class constructor.

Member Function Documentation

static QLatin1String Tp::Client::ConnectionInterfaceAvatarsInterface::staticInterfaceName ( )
inlinestatic

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

Returns
The D-Bus interface name.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceAvatarsInterface::requestPropertySupportedAvatarMIMETypes ( ) const
inline

Asynchronous getter for the remote object property SupportedAvatarMIMETypes of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceAvatarsInterface::requestPropertyMinimumAvatarHeight ( ) const
inline

Asynchronous getter for the remote object property MinimumAvatarHeight of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceAvatarsInterface::requestPropertyMinimumAvatarWidth ( ) const
inline

Asynchronous getter for the remote object property MinimumAvatarWidth of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceAvatarsInterface::requestPropertyRecommendedAvatarHeight ( ) const
inline

Asynchronous getter for the remote object property RecommendedAvatarHeight of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceAvatarsInterface::requestPropertyRecommendedAvatarWidth ( ) const
inline

Asynchronous getter for the remote object property RecommendedAvatarWidth of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceAvatarsInterface::requestPropertyMaximumAvatarHeight ( ) const
inline

Asynchronous getter for the remote object property MaximumAvatarHeight of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceAvatarsInterface::requestPropertyMaximumAvatarWidth ( ) const
inline

Asynchronous getter for the remote object property MaximumAvatarWidth of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ConnectionInterfaceAvatarsInterface::requestPropertyMaximumAvatarBytes ( ) const
inline

Asynchronous getter for the remote object property MaximumAvatarBytes of 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
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariantMap* Tp::Client::ConnectionInterfaceAvatarsInterface::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<QStringList, ushort, ushort, ushort, ushort, uint> Tp::Client::ConnectionInterfaceAvatarsInterface::GetAvatarRequirements ( int  timeout = -1)
inlineslot

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

Get the required format of avatars on this connection.

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

Parameters
timeoutThe timeout in milliseconds.
Returns
An array of supported MIME types (eg image/jpeg)
The minimum image width in pixels
The minimum image height in pixels
The maximum image width in pixels, or 0 if there is no limit
The maximum image height in pixels, or 0 if there is no limit
The maximum image size in bytes, or 0 if there is no limit
QDBusPendingReply<QStringList> Tp::Client::ConnectionInterfaceAvatarsInterface::GetAvatarTokens ( const Tp::UIntList contacts,
int  timeout = -1 
)
inlineslot

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

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

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
timeoutThe timeout in milliseconds.
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
QDBusPendingReply<Tp::AvatarTokenMap> Tp::Client::ConnectionInterfaceAvatarsInterface::GetKnownAvatarTokens ( const Tp::UIntList contacts,
int  timeout = -1 
)
inlineslot

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

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.

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
timeoutThe timeout in milliseconds.
Returns
A dictionary of handles mapped to avatar tokens, containing only 
the known avatar tokens.
QDBusPendingReply<QByteArray, QString> Tp::Client::ConnectionInterfaceAvatarsInterface::RequestAvatar ( uint  contact,
int  timeout = -1 
)
inlineslot

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

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

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 the contact to request the avatar for
timeoutThe timeout in milliseconds.
Returns
An array of bytes containing the image data
A string containing the image MIME type (eg image/jpeg), or empty 
if unknown
QDBusPendingReply Tp::Client::ConnectionInterfaceAvatarsInterface::RequestAvatars ( const Tp::UIntList contacts,
int  timeout = -1 
)
inlineslot

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

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.

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
The contacts to retrieve avatars for
timeoutThe timeout in milliseconds.
QDBusPendingReply<QString> Tp::Client::ConnectionInterfaceAvatarsInterface::SetAvatar ( const QByteArray avatar,
const QString MIMEType,
int  timeout = -1 
)
inlineslot

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

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

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

Parameters
avatar
An array of bytes representing the avatar image data
MIMEType
A string representing the image MIME type
timeoutThe timeout in milliseconds.
Returns
The string token of the new avatar
QDBusPendingReply Tp::Client::ConnectionInterfaceAvatarsInterface::ClearAvatar ( int  timeout = -1)
inlineslot

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

Remove the avatar image for this connection.

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

Parameters
timeoutThe timeout in milliseconds.
void Tp::Client::ConnectionInterfaceAvatarsInterface::AvatarUpdated ( uint  contact,
const QString newAvatarToken 
)
signal

Represents the signal AvatarUpdated on the remote object.

Emitted when the avatar for a contact has been updated, or first discovered on this connection. If the token differs from the token associated with the client's cached avatar for this contact, the new avatar should be requested with RequestAvatars.

Parameters
contact
An integer handle for the contact whose avatar has changed
newAvatarToken
Unique token for their new avatar
void Tp::Client::ConnectionInterfaceAvatarsInterface::AvatarRetrieved ( uint  contact,
const QString token,
const QByteArray avatar,
const QString type 
)
signal

Represents the signal AvatarRetrieved on the remote object.

Emitted when the avatar for a contact has been retrieved.

Parameters
contact
The contact whose avatar has been retrieved
token
The token corresponding to the avatar
avatar
An array of bytes containing the image data
type
A string containing the image MIME type (eg image/jpeg), or empty 
if unknown
void Tp::Client::ConnectionInterfaceAvatarsInterface::invalidate ( Tp::DBusProxy proxy,
const QString error,
const QString message 
)
protectedvirtual

Reimplemented from Tp::AbstractInterface.


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