<?xml version="1.0" ?>
<node name="/Channel_Interface_Chat_State" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
  <tp:copyright> Copyright (C) 2007 Collabora Limited </tp:copyright>
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
    <p>This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.</p>

<p>This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.</p>

<p>You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
  </tp:license>
  <interface name="org.freedesktop.Telepathy.Channel.Interface.ChatState">
    <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
    <method name="SetChatState" tp:name-for-bindings="Set_Chat_State">
      <arg direction="in" name="State" type="u" tp:type="Channel_Chat_State">
        <tp:docstring>
          The new state.
        </tp:docstring>
      </arg>
      <tp:docstring>
        Set the local state and notify other members of the channel that it
        has changed.
      </tp:docstring>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
      </tp:possible-errors>
    </method>
    <signal name="ChatStateChanged" tp:name-for-bindings="Chat_State_Changed">
      <arg name="Contact" type="u" tp:type="Contact_Handle">
        <tp:docstring>
          An integer handle for the contact.
        </tp:docstring>
      </arg>
      <arg name="State" type="u" tp:type="Channel_Chat_State">
        <tp:docstring>
          The new state of this contact.
        </tp:docstring>
      </arg>
      <tp:docstring>
        Emitted when the state of a member of the channel has changed.
        This includes local state.
      </tp:docstring>
    </signal>
    <tp:enum name="Channel_Chat_State" type="u">
      <tp:enumvalue suffix="Gone" value="0">
        <tp:docstring>
        The contact has effectively ceased participating in the chat.
        </tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Inactive" value="1">
        <tp:docstring>
        The contact has not been active for some time.
        </tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Active" value="2">
        <tp:docstring>
        The contact is actively participating in the chat.
        </tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Paused" value="3">
        <tp:docstring>
        The contact has paused composing a message.
        </tp:docstring>
      </tp:enumvalue>
      <tp:enumvalue suffix="Composing" value="4">
        <tp:docstring>
        The contact is composing a message to be sent to the chat.
        </tp:docstring>
      </tp:enumvalue>
    </tp:enum>
    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      <p>An interface for channels for receiving notifications of remote contacts'
      state, and for notifying remote contacts of the local state.</p>

      <p>Clients should assume that a contact's state is Channel_Chat_State_Inactive
      unless they receive a notification otherwise.</p>

      <p>The Channel_Chat_State_Gone state is treated differently to other states:</p>
      <ul>
        <li>It may not be used for multi-user chats</li>
        <li>It may not be explicitly sent</li>
        <li>It should be automatically sent when the channel is closed</li>
        <li>It must not be sent to the peer if a channel is closed without being used</li>
        <li>Receiving it must not cause a new channel to be opened</li>
      </ul>

      <p>The different states are defined by XEP-0085, but may be applied to any suitable protocol.</p>
    </tp:docstring>
  </interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
