[Telepathy] Avatar interface proposal

Andre Magalhaes andrunko at gmail.com
Thu Jun 8 06:45:49 PDT 2006


So here is the new proposal, with all discussed modifications.

Anything else?

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

       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, u: 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

Andrunko


More information about the Telepathy mailing list