#include <TelepathyQt4/Prototype/AvatarManager.h>
Classes | |
struct | Avatar |
struct | AvatarRequirements |
Signals | |
void | signalAvatarChanged (TpPrototype::Contact *contact) |
void | signalOwnAvatarChanged (TpPrototype::AvatarManager::Avatar avatar) |
Public Member Functions | |
bool | isValid () |
TpPrototype::Connection * | connection () |
bool | setAvatar (const TpPrototype::AvatarManager::Avatar &newValue) |
void | requestAvatar () |
AvatarRequirements | avatarRequirements () |
void | avatarForContactList (const QList< QPointer< Contact > > &contacts) |
Protected Slots | |
void | slotAvatarUpdated (uint contact, const QString &newAvatarToken) |
void | slotAvatarRetrieved (uint contact, const QString &token, const QByteArray &avatar, const QString &type) |
Protected Member Functions | |
AvatarManager (TpPrototype::Connection *connection, Telepathy::Client::ConnectionInterface *interface, QObject *parent=NULL) | |
~AvatarManager () | |
Friends | |
class | Connection |
class | ConnectionPrivate |
AvatarManager::AvatarManager | ( | TpPrototype::Connection * | connection, | |
Telepathy::Client::ConnectionInterface * | interface, | |||
QObject * | parent = NULL | |||
) | [protected] |
Constructor. The capabilities manager cannot be instantiated directly. Use Connection::AvatarManager() for it!
AvatarManager::~AvatarManager | ( | ) | [protected] |
void AvatarManager::avatarForContactList | ( | const QList< QPointer< Contact > > & | contacts | ) |
Get the avatar for a list of contacts. The avatars can be requested from the contact object. Info: The signal signalAvatarChanged() is called asynchonously after this call for every contact in this list.
List | of contacts to request the avatars from. |
References TpPrototype::Contact::telepathyHandle().
Referenced by slotAvatarUpdated().
TpPrototype::AvatarManager::AvatarRequirements AvatarManager::avatarRequirements | ( | ) |
Get the required format of avatars on this connection.
References TpPrototype::AvatarManager::AvatarManager::AvatarRequirements::isValid, TpPrototype::AvatarManager::AvatarManager::AvatarRequirements::maximumHeight, TpPrototype::AvatarManager::AvatarManager::AvatarRequirements::maximumWidth, TpPrototype::AvatarManager::AvatarManager::AvatarRequirements::maxSize, TpPrototype::AvatarManager::AvatarManager::AvatarRequirements::mimeTypes, TpPrototype::AvatarManager::AvatarManager::AvatarRequirements::minimumHeight, and TpPrototype::AvatarManager::AvatarManager::AvatarRequirements::minimumWidth.
TpPrototype::Connection * AvatarManager::connection | ( | ) |
Returns the connection that belongs to this capabilities information.
bool AvatarManager::isValid | ( | ) |
Validity. Do not access any methods if the object is invalid!
void AvatarManager::requestAvatar | ( | ) |
Request local Avatar. Requests the avatar of the account that belongs to this connection. Info: The signal signalOwnAvatarChanged() is called asynchonously after this call.
References TpPrototype::ConnectionFacade::instance(), and TpPrototype::ConnectionFacade::selfHandleForConnectionInterface().
bool AvatarManager::setAvatar | ( | const TpPrototype::AvatarManager::Avatar & | newValue | ) |
Set local Avatar. This function sets the capabilites of the account that belongs to this connection.
newValue | The new avatar. The content of token is ignored. |
References TpPrototype::AvatarManager::AvatarManager::Avatar::avatar, and TpPrototype::AvatarManager::AvatarManager::Avatar::mimeType.
void TpPrototype::AvatarManager::signalAvatarChanged | ( | TpPrototype::Contact * | contact | ) | [signal] |
The avatar of a contact was changed. This signal is emitted when any of the known contacts changed its avatar.
Referenced by slotAvatarRetrieved().
void TpPrototype::AvatarManager::signalOwnAvatarChanged | ( | TpPrototype::AvatarManager::Avatar | avatar | ) | [signal] |
My avatar was changed. This signal is emmitted if the local avatar was changed.
Referenced by slotAvatarRetrieved().
void AvatarManager::slotAvatarRetrieved | ( | uint | contact, | |
const QString & | token, | |||
const QByteArray & | avatar, | |||
const QString & | type | |||
) | [protected, slot] |
References TpPrototype::Contact::avatar(), TpPrototype::AvatarManager::AvatarManager::Avatar::avatar, TpPrototype::ConnectionFacade::instance(), TpPrototype::AvatarManager::AvatarManager::Avatar::mimeType, TpPrototype::ConnectionFacade::selfHandleForConnectionInterface(), TpPrototype::Contact::setAvatar(), signalAvatarChanged(), signalOwnAvatarChanged(), TpPrototype::Contact::telepathyHandle(), and TpPrototype::AvatarManager::AvatarManager::Avatar::token.
void AvatarManager::slotAvatarUpdated | ( | uint | contact, | |
const QString & | newAvatarToken | |||
) | [protected, slot] |
friend class Connection [friend] |
friend class ConnectionPrivate [friend] |