[Telepathy] darcs patch: Add Avatar spec to python-stable branch

Ali Sabil hybrid at tuxfamily.org
Fri Jun 30 09:05:40 PDT 2006


Fri Jun 30 16:13:08 CEST 2006  ali.sabil at gmail.com
  * Add Avatar spec to python-stable branch
-------------- next part --------------

New patches:

[Add Avatar spec to python-stable branch
ali.sabil at gmail.com**20060630141308] {
hunk ./telepathy/interfaces.py 25
+CONN_INTERFACE_AVATARS = 'org.freedesktop.Telepathy.Connection.Interface.Avatars'
hunk ./telepathy/server/conn.py 576
+class ConnectionInterfaceAvatars(dbus.service.Interface):
+    """
+    An interface for requesting avatars for contacts on a given connection,
+    receiving notification when avatars are changed, and publishing your own
+    avatar.
+
+    Avatars are identified by a unique (per contact) token which represents a
+    hash or timestamp (depending on the protocol) of the contacts' avatar data.
+    An empty token means that an avatar has not been set for this contact, and
+    a changed token implies the contact's avatar has changed, but the strings
+    should otherwise be considered opaque by clients.
+
+    A client should use GetAvatarTokens to request the tokens for the avatars
+    of all the contacts it is interested in when it connects. The avatars can
+    then be retreived using RequestAvatar for the corresponding contact.
+    Clients should bind to the AvatarChanged signal and request a new copy of
+    the avatar when a contacts' avatar token changes. Clients should cache the
+    token and data of each contact's avatar between connections, to avoid
+    repeatedly retrieving the same avatar.
+
+    To publish an avatar, a client should use SetAvatar to provide an image
+    which meets the requirements returned by the GetAvatarRequirements
+    function. On some protocols the avatar is stored on the server, so setting
+    the avatar is persistent, but on others it is transferred via a peer to
+    peer mechanism, so needs to be set every connection. Hence, on every
+    connection, clients should inspect the avatar token of the connection's
+    self handle, and set the avatar if it is an empty string (and may
+    optionally replace it if the token corresponds to a different avatar).
+    """
+    def __init__(self):
+        self._interfaces.add(CONN_INTERFACE_AVATARS)
+
+    @dbus.service.method(CONN_INTERFACE_AVATARS,
+                         in_signature='',
+                         out_signature='asqqqqu')
+    def GetAvatarRequirements(self):
+        """
+        Get the required format of avatars on this connection.
+
+        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
+        the maximum image height in pixels
+        the maximum image size in bytes
+
+        Possible Errors:
+        Disconnected, NetworkError, PermissionDenied, NotAvailable
+        """
+
+    @dbus.service.method(CONN_INTERFACE_AVATARS,
+                         in_signature='au',
+                         out_signature='as')
+    def GetAvatarTokens(self, contacts):
+        """
+        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. A empty token means
+        that no avatar is set for the given contact.
+
+        Parameters:
+        contacts - an 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
+
+        Possible Errors:
+        Disconnected, NetworkError, InvalidArgument, PermissionDenied,
+        NotAvailable
+        """
+
+    @dbus.service.method(CONN_INTERFACE_AVATARS,
+                         in_signature='u',
+                         out_signature='ays')
+    def RequestAvatar(self, contact):
+        """
+        Request the avatar for a given contact.
+
+        Parameters:
+        contact - an integer handle for the contact to request the avatar for
+
+        Returns:
+        an array of bytes containing the image data
+        a string containing the image MIME type (eg image/jpeg), or empty if
+            unknown
+
+        Possible Errors:
+        Disconnected, NetworkError, InvalidHandle, PermissionDenied,
+        NotAvailable
+        """
+
+    @dbus.service.method(CONN_INTERFACE_AVATARS,
+                         in_signature='ays',
+                         out_signature='s')
+    def SetAvatar(self, avatar, mime_type):
+        """
+        Set a new avatar image for this connection. The avatar image must
+        respect the requirements obtained by GetAvatarRequirements.
+
+        Parameters:
+        avatar - an array of bytes representing the avatar image data
+        mime_type - a string representing the image MIME type
+
+        Returns:
+        the string token of the new avatar
+
+        Possible Errors:
+        Disconnected, NetworkError, InvalidArgument, PermissionDenied,
+        NotAvailable
+        """
+
+    @dbus.service.signal(CONN_INTERFACE_AVATARS, signature='us')
+    def AvatarUpdated(self, contact, new_avatar_token):
+        """
+        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 RequestAvatar.
+
+        Parameters:
+        contact - an integer handle for the contact whose avatar has changed
+        new_avatar_token - unique token for their new avatar
+        """
+        pass
}

Context:

[move client/server imports after other imports
dafydd.harries at collabora.co.uk**20060619162204] 
[import server and client inside top level __init__.py
dafydd.harries at collabora.co.uk**20060619161200] 
[tabby: im channel support by Senko Rasic (senko at senko.net)
ole.andre.ravnaas at collabora.co.uk**20060531002302] 
[genxml.py: Issue a helpful error message when ElementTree isn't installed.
ole.andre.ravnaas at collabora.co.uk**20060530233916] 
[tabby: Make it possible to turn off VoIP by changing VOIP_ENABLED (this should be detected dynamically later on, or made available in the UI). Also add some test code for GetHandleOwners.
ole.andre.ravnaas at collabora.co.uk**20060530233752] 
[bump spec version to 0.12.1
robert.mcqueen at collabora.co.uk**20060530110258] 
[add channel specific handles the group mixin, and add a GetHandleOwners method to ask for them
robert.mcqueen at collabora.co.uk**20060524185048] 
[add an GetAllMembers method to the group interface to return all three lists of members (current, local pending, remote pending) in one method call
robert.mcqueen at collabora.co.uk**20060409111257] 
[add GetMessageTypes to see what message types are sendable on a text channel
robert.mcqueen at collabora.co.uk**20060207162649] 
[rename instances of server to connection in aliasing interface
robert.mcqueen at collabora.co.uk**20060523201004] 
[add status change reasons for various SSL validation errors
robert.mcqueen at collabora.co.uk**20060523200829] 
[badger Capabilities interface to support multiple contacts and better manipulation of your own capabilities
robert.mcqueen at collabora.co.uk**20060411123355] 
[you may call GetInterfaces on connections when disconnected
robert.mcqueen at collabora.co.uk**20060207125030] 
[sort generated errors
robert.mcqueen at collabora.co.uk**20060522194247] 
[try and indent XML uniformly
robert.mcqueen at collabora.co.uk**20060522193141] 
[remove introspection interface from XML
robert.mcqueen at collabora.co.uk**20060522164659] 
[sort interfaces/methods/signals by name in generated XML
dafydd.harries at collabora.co.uk**20060522161521] 
[tweak conference server in tabby
robert.mcqueen at collabora.co.uk**20060515095620] 
[try and make scw client support optional parameters
robert.mcqueen at collabora.co.uk**20060515095528] 
[add missing imports
dafydd.harries at collabora.co.uk**20060509175555] 
[allow specifying node in query for disco utility
dafydd.harries at collabora.co.uk**20060507051505] 
[add disco.py
dafydd.harries at collabora.co.uk**20060507020431] 
[tabby: Fixed handling of incoming MUC messages.
ole.andre.ravnaas at collabora.co.uk**20060503180236] 
[tabby: Misc fixes for making VoIP calls.
ole.andre.ravnaas at collabora.co.uk**20060426152032] 
[change NewNativeCandidate signal back to using an unsigned int
rob.taylor at collabora.co.uk**20060425150912] 
[add MediaStreamHandler::SetStreamPlaying signal
rob.taylor at collabora.co.uk**20060425104730] 
[tabby: ported to use new Properties interface and some tweaks and fixes here and there.
ole.andre.ravnaas at collabora.co.uk**20060411122636] 
[documentation tweaks on text channel signals/etc
robert.mcqueen at collabora.co.uk**20060410123537] 
[rename RoomProperties to Properties interface, replace some {}s with ()s to avoid GashTables
robert.mcqueen at collabora.co.uk**20060410113124] 
[tabby: Misc MUC-related fixes.
ole.andre.ravnaas at collabora.co.uk**20060409170746] 
[tabby: RoomProperties support.
ole.andre.ravnaas at collabora.co.uk**20060407163349] 
[whitespace
robert.mcqueen at collabora.co.uk**20060409154956] 
[update aliasing methods to handle multiple contacts at once
robert.mcqueen at collabora.co.uk**20060409110855] 
[GetSelfHandle on group interface identifies you if you are local/remote pending as well as a full member
robert.mcqueen at collabora.co.uk**20060409102632] 
[cleanups to new StreamedMedia interfaces/docs
robert.mcqueen at collabora.co.uk**20060409101949] 
[add a SendError signal on text channels: offline, too long, invalid contact, permission denied, unknown
robert.mcqueen at collabora.co.uk**20060409091755] 
[add full/invite only/banned errors to addmembers
robert.mcqueen at collabora.co.uk**20060405093228] 
[merge changed signature for NewNativeCandidate
robert.mcqueen at collabora.co.uk**20060213091511] 
[tweaks to streamed media channel documentation
robert.mcqueen at collabora.co.uk**20060213091337] 
[add new channel errors to doc/order file
robert.mcqueen at collabora.co.uk**20060208125247] 
[add name to the room details from listing rooms
robert.mcqueen at collabora.co.uk**20060207163400] 
[remove RequestAlias method
robert.mcqueen at collabora.co.uk**20060207163244] 
[add missing documentation string in ReleaseHandle
robert.mcqueen at collabora.co.uk**20060207163230] 
[add a LostMessage signal for OOM cases
robert.mcqueen at collabora.co.uk**20060207162830] 
[add channel banned, full and invite only errors
robert.mcqueen at collabora.co.uk**20060207162559] 
[add an auto reply message type to text channels
robert.mcqueen at collabora.co.uk**20060207160335] 
[NewConnection can return NotAvailable if the connection already exists somewhere
robert.mcqueen at collabora.co.uk**20060207125208] 
[allow RemoveStatus to return InvalidArgument if you request the removal of a status which is not active
robert.mcqueen at collabora.co.uk**20060207125131] 
[add RequestAliases to retreive multiple aliases at once
robert.mcqueen at collabora.co.uk**20060207125104] 
[add a NAME_IN_USE reason for connection status changes
robert.mcqueen at collabora.co.uk**20060207124846] 
[doc clarifications to streamed media interfaces
robert.mcqueen at collabora.co.uk**20060207122846] 
[add stream state reporting on StreamedMediaChannel
rob.taylor at collabora.co.uk**20060405082759] 
[replace the subject interface with a room properties interface, and remove the parts of the passport interface which overlap with it
robert.mcqueen at collabora.co.uk**20060405081000] 
[tabby: suppport for getting invited to MUCs and misc cleanups
ole.andre.ravnaas at collabora.co.uk**20060401161311] 
[tabby: Split up and refactored a bit. Added support for inviting and kicking users.
ole.andre.ravnaas at collabora.co.uk**20060316201211] 
[tabby: Implemented support for joining password protected rooms. Close room tabs when the channels are closed.
ole.andre.ravnaas at collabora.co.uk**20060315193441] 
[tabby: implemented queueing of presence lookups when the presence interface is not yet available, and made a couple of cleanups
ole.andre.ravnaas at collabora.co.uk**20060313091839] 
[..and the files for tabby ;)
ole.andre.ravnaas at collabora.co.uk**20060312133518] 
[added tabby, a simple client used for testing
ole.andre.ravnaas at collabora.co.uk**20060312133204] 
[corrected a minor mistake in the Telepathy.Channel description (s/Channel.Type.Group/Channel.Interface.Group/)
ole.andre.ravnaas at collabora.co.uk**20060217141352] 
[scw-client: add support for requesting a media channel
ole.andre.ravnaas at collabora.co.uk**20060215131620] 
[gabble-test.py whitespace fixes
ole.andre.ravnaas at collabora.co.uk**20060214205856] 
[add minimalistic gabble test app
Ole Andre Vadla Ravnaas <ole.andre.ravnaas at collabora.co.uk>**20060211031824] 
[fix NewNativeCandidate signature changing transport type field from signed to unsigned to match candidate transport structs used elsewhere
Ole Andre Vadla Ravnaas <ole.andre.ravnaas at collabora.co.uk>**20060209130638] 
[add codecs argument to MediaStreamHandler::Ready() specifying all supported codecs
Ole Andre Vadla Ravnaas <ole.andre.ravnaas at collabora.co.uk>**20060208150432] 
[update presence type values to match spec
robert.mcqueen at collabora.co.uk**20060206212736] 
[remove deprecated streamed media call in test-client
robert.mcqueen at collabora.co.uk**20060206180321] 
[list channels at test-client startup
robert.mcqueen at collabora.co.uk**20060206180103] 
[make scw-client behave correctly when there is no presence interface
robert.mcqueen at collabora.co.uk**20060125122937] 
[make gengobject generate recursive gtype declarations using dbus struct types
rob.taylor at collabora.co.uk**20060206091455] 
[small typo fix: replace supress_handler with suppress_handler
Ole Andre Vadla Ravnaas <ole.andre.ravnaas at collabora.co.uk>**20060203175335] 
[Correct spelling for MEDIA_STREAM_DIRECTION_RECEIVE
Ole Andre Vadla Ravnaas <ole.andre.ravnaas at collabora.co.uk>**20060126083631] 
[TAG 0.12 spec release
rob.taylor at collabora.co.uk**20060125120334] 
Patch bundle hash:
f2492b363e28d15c979b489a4ed0d2c5ca020277



More information about the Telepathy mailing list