[Telepathy] Avatar interface proposal

Andre Magalhaes andrunko at gmail.com
Thu Jun 8 07:07:11 PDT 2006


Oops, bug fix release.

Added a comment about the missing token, and changed the signal
AvatarUpdate token parameter to be a string.

Can we add this to 0.13.1??? How will we work with this? Who is going
to integrate? ...

org.freedesktop.Telepathy.Connection.Interface.Avatars

  An interface for requesting contact avatars on a given
  connection.

Methods:
GetAvatarTokens ( au: contacts ) -> as

      Get the avatars unique tokens for the given contacts. These
tokens should be used to check if the avatars have been updated.

      Parameters:
      contacts - an array of the handle representing contacts

      Returns:
      a dictionary of contact handles to avatar tokens in the same
order. A empty token means that no avatar is set for the corresponding
contact.

      Possible Errors:
      Disconnected, NetworkError, InvalidHandle, PermissionDenied,
NotAvailable

RequestAvatar ( u: contact ) -> ays

      Request the avatar for a given contact.

      Parameters:
      contact - an integer handle for the contact to request the
avatar for

      Returns:
      The avatar image data and the corresponding mimetype.

      Possible Errors:
      Disconnected, NetworkError, InvalidHandle, PermissionDenied,
NotAvailable

SetAvatar ( ay: avatar, s: mimetype ) -> None

       Set the user new avatar image.

       Parameters:
       avatar - the avatar image data
       mimetype - the avatar image mimetype

      Possible Errors:
      Disconnected, NetworkError, InvalidHandle, PermissionDenied,
NotAvailable

Signals:
AvatarUpdated ( u: contact, s: new_avatar_token )

      Emitted when the avatar for the user has been updated. Note
that this signal will only be emitted when the avatar has changed in
the Connection lifetime. To request the contact new avatar use RequestAvatar.

      Parameters:
      contact - an integer handle of the contact ID on the server
      new_avatar_token - new avatar unique token

BR
Andrunko


More information about the Telepathy mailing list