[Telepathy] RFC: draft chat state interface specification

Dafydd Harries dafydd.harries at collabora.co.uk
Mon Jul 10 09:23:32 PDT 2006


I think you meant to send this to the list, not to me. :)

Ar 07/07/2006 am 15:19, ysgrifennodd Luiz Augusto von Dentz:
> Hi,
> 
> This can lead to some confusions because the interface doesnt reflect that
> it is intent to send/receive notifications, but to set chat states that
> could be local.
> I suggest some modifications:
> 
> On 7/7/06, Dafydd Harries <dafydd.harries at collabora.co.uk> wrote:
> >
> >
> >This dract is heavily based upon the relevant Jabber specification[0].
> >
> >class ChannelInterfaceChatState(dbus.service.Interface):
> >
> 
> class ChannelInterfaceChatStateNotification(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 - CHAT_STATE_GONE
> >         The contact has effectively ceased participating in the chat.
> >     1 - CHAT_STATE_INACTIVE
> >         The contact has not been active for some time.
> >     2 - CHAT_STATE_ACTIVE
> >         The contact is actively participating in the chat.
> >     3 - CHAT_STATE_PAUSED
> >         The contact has paused composing a message.
> >     4 - CHAT_STATE_COMPOSING
> >         The contact is composing a message to be sent to the chat.
> >
> >    Clients should assume that a contact's state is CHAT_STATE_INACTIVE
> >unless
> >    they receive a notification otherwise.
> >
> >    The CHAT_STATE_GONE state is treated differently to other states:
> >
> >     - It is not used for multi-user chats;
> >     - It is implictly set when the channel is closed;
> >     - It may not be explicitly set.
> >    """
> >
> >    @dbus.service.method(CHANNEL_TYPE_TEXT, in_signature='u',
> >out_signature='')
> >    def SetState(self, state):
> 
> 
> 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
> >        """
> >
> >    @dbus.service.signal(CHANNEL_TYPE_TEXT, signature='uu')
> >    def StateChanged(self, contact, state):
> 
> 
> def ReceivedNotification(self, contact, state):
> 
>        """
> >        Emitted when somebody's state has changed. This includes local
> >        state.
> >
> >        Parameters:
> >        contact - the contact whose state has changed
> >        state - their new state
> >        """
> >

-- 
Dafydd


More information about the Telepathy mailing list