[Telepathy] RFC: draft chat state interface specification

Luiz Augusto von Dentz luiz.dentz at gmail.com
Wed Oct 25 06:15:49 PDT 2006


diff -rN -u old-telepathy-spec/doc/order new-telepathy-spec/doc/order
--- old-telepathy-spec/doc/order 2006-10-19 18:56:23.000000000 -0300
+++ new-telepathy-spec/doc/order 2006-10-19 18:56:23.000000000 -0300
@@ -18,6 +18,7 @@
org.freedesktop.Telepathy.Channel.Interface.Group
org.freedesktop.Telepathy.Channel.Interface.Hold
org.freedesktop.Telepathy.Channel.Interface.Password
+org.freedesktop.Telepathy.Channel.Interface.MemberState
org.freedesktop.Telepathy.Channel.Interface.Transfer
org.freedesktop.Telepathy.Channel.Interface.MediaSignalling
org.freedesktop.Telepathy.Media.SessionHandler
diff -rN -u old-telepathy-spec/telepathy/interfaces.py
new-telepathy-spec/telepathy/interfaces.py
--- old-telepathy-spec/telepathy/interfaces.py 2006-10-19
18:56:23.000000000-0300
+++ new-telepathy-spec/telepathy/interfaces.py 2006-10-19
18:56:23.000000000-0300
@@ -2,6 +2,7 @@
#
# Copyright (C) 2005,2006 Collabora Limited
# Copyright (C) 2005,2006 Nokia Corporation
+# Copyright (C) 2006 INdT
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -43,6 +44,7 @@
CHANNEL_INTERFACE_MEDIA_SIGNALLING = '
org.freedesktop.Telepathy.Channel.Interface.MediaSignalling'
CHANNEL_INTERFACE_PASSWORD = '
org.freedesktop.Telepathy.Channel.Interface.Password'
CHANNEL_INTERFACE_TRANSFER = '
org.freedesktop.Telepathy.Channel.Interface.Transfer'
+CHANNEL_INTERFACE_MEMBER_STATE = '
org.freedesktop.Telepathy.Channel.Interface.MemberState'
MEDIA_SESSION_HANDLER = 'org.freedesktop.Telepathy.Media.SessionHandler'
MEDIA_STREAM_HANDLER = 'org.freedesktop.Telepathy.Media.StreamHandler'
diff -rN -u old-telepathy-spec/telepathy/server/channel.py
new-telepathy-spec/telepathy/server/channel.py
--- old-telepathy-spec/telepathy/server/channel.py 2006-10-19 18:56:
23.000000000 -0300
+++ new-telepathy-spec/telepathy/server/channel.py 2006-10-19 18:56:
23.000000000 -0300
@@ -2,6 +2,7 @@
#
# Copyright (C) 2005,2006 Collabora Limited
# Copyright (C) 2005,2006 Nokia Corporation
+# Copyright (C) 2006 INdT
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -787,7 +788,6 @@
"""
pass
-
class ChannelInterfaceGroup(dbus.service.Interface):
"""
Interface for channels which have multiple members, and where the members
@@ -1217,6 +1217,58 @@
pass
+class ChannelInterfaceMemberState(dbus.service.Interface):
+ """
+ An interface for channels for receiving notifications of remote contacts
+ states, and for notifying remote contacts of the local state.
+
+ The following states are defined:
+
+ 0 - STATE_NOTIFICATION_GONE
+ The contact has effectively ceased participating in the channel
+ 1 - STATE_NOTIFICATION_INACTIVE
+ The contact has not been active for some time.
+ 2 - STATE_NOTIFICATION_ACTIVE
+ The contact is actively participating in the channel.
+ 3 - STATE_NOTIFICATION_PAUSED
+ The contact has paused its activity.
+ 4 - STATE_NOTIFICATION_COMPOSING
+ The contact is composing a message to be sent to the channel
+
+ Clients should assume that a contact's state is
STATE_NOTIFICATION_INACTIVE unless
+ they receive a notification otherwise.
+
+ The STATE_NOTIFICATION_GONE state is treated differently to other states:
+
+ - It is implictly set when the channel is closed;
+ - It may not be explicitly set.
+ """
+ def __init__(self):
+ self._interfaces.add(CHANNEL_INTERFACE_MEMBER_STATE)
+
+ @dbus.service.method(CHANNEL_INTERFACE_MEMBER_STATE, in_signature='u',
out_signature='')
+ def SendNotification(self, state):
+ """
+ Set the local state and notify other members of the channel that it
+ has changed.
+
+ Parameters:
+ state - The new local state
+ """
+ pass
+
+ @dbus.service.signal(CHANNEL_INTERFACE_MEMBER_STATE, signature='uu')
+ def ReceivedNotification(self, contact, state):
+ """
+ Emitted when somebody's state has changed. This includes local
+ state.
+
+ Parameters:
+ contact - The contact whose the state has changed
+ state - their new state
+ """
+ pass
+
class ChannelInterfaceTransfer(dbus.service.Interface):
"""
An interface for channels where you may request that one of the members
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/telepathy/attachments/20061025/f3455a14/attachment.html


More information about the Telepathy mailing list