<?xml version="1.0" ?>
<node name="/Channel_Type_Room_List" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
  <tp:copyright> Copyright © 2005-2009 Collabora Limited </tp:copyright>
  <tp:copyright> Copyright © 2005-2009 Nokia Corporation </tp:copyright>
  <tp:copyright> Copyright © 2006 INdT </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.Type.RoomList">
    <tp:requires interface="org.freedesktop.Telepathy.Channel"/>

    <tp:struct name="Room_Info" array-name="Room_Info_List">
      <tp:member type="u" tp:type="Room_Handle" name="Handle"/>
      <tp:member type="s" tp:type="DBus_Interface" name="Channel_Type"/>
      <tp:member type="a{sv}" tp:type="String_Variant_Map" name="Info"/>
    </tp:struct>

    <property name="Server" tp:name-for-bindings="Server"
      type="s" access="read">
      <tp:docstring>
        <p>For protocols with a concept of chatrooms on multiple servers
          with different DNS names (like XMPP), the DNS name of the server
          whose rooms are listed by this channel, e.g. "conference.jabber.org".
          Otherwise, the empty string.</p>

        <p>This property cannot change during the lifetime of the channel.</p>
      </tp:docstring>
    </property>

    <method name="GetListingRooms" tp:name-for-bindings="Get_Listing_Rooms">
      <arg direction="out" type="b" name="In_Progress">
        <tp:docstring>
          A boolean indicating if room listing is in progress
        </tp:docstring>
      </arg>
      <tp:docstring>
        Check to see if there is already a room list request in progress
        on this channel.
      </tp:docstring>
    </method>

    <signal name="GotRooms" tp:name-for-bindings="Got_Rooms">
      <arg name="Rooms" type="a(usa{sv})" tp:type="Room_Info[]">
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
          An array of structs containing:
          <ul>
            <li>an integer room handle</li>
            <li>a string representing the D-Bus interface name of the channel type</li>
            <li>a dictionary mapping string keys to variant boxed information</li>
          </ul>
        </tp:docstring>
      </arg>
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
        <p>Emitted when information about rooms on the server becomes available.
        The array contains the room handle (as can be passed to the
        <tp:dbus-ref
          namespace="org.freedesktop.Telepathy.Connection">RequestChannel</tp:dbus-ref>
        method with HANDLE_TYPE_ROOM), the channel
        type, and a dictionary containing further information about the
        room as available. The following well-known keys and types are
        recommended for use where appropriate:</p>

        <dl>
          <dt>handle-name (s)</dt>
          <dd>The identifier of the room (as would be returned by
            <tp:dbus-ref namespace="org.freedesktop.Telepathy.Connection">InspectHandles</tp:dbus-ref>)</dd>

          <dt>name (s)</dt>
          <dd>The human-readable name of the room if different from the handle</dd>

          <dt>description (s)</dt>
          <dd>A description of the room's overall purpose</dd>

          <dt>subject (s)</dt>
          <dd>The current subject of conversation in the room</dd>

          <dt>members (u)</dt>
          <dd>The number of members in the room</dd>

          <dt>password (b)</dt>
          <dd>True if the room requires a password to enter</dd>

          <dt>invite-only (b)</dt>
          <dd>True if you cannot join the room, but must be invited</dd>
        </dl>
      </tp:docstring>
    </signal>
    <method name="ListRooms" tp:name-for-bindings="List_Rooms">
      <tp:docstring>
        Request the list of rooms from the server. The
        <tp:member-ref>ListingRooms</tp:member-ref> (True) signal should be
        emitted when this request is being processed,
        <tp:member-ref>GotRooms</tp:member-ref> when any room information is
        received, and <tp:member-ref>ListingRooms</tp:member-ref> (False) when
        the request is complete.
      </tp:docstring>
      <tp:possible-errors>
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
        <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
      </tp:possible-errors>
    </method>
    <method name="StopListing" tp:name-for-bindings="Stop_Listing">
      <tp:docstring>
        Stop the room listing if it's in progress, but don't close the channel.
        The <tp:member-ref>ListingRooms</tp:member-ref> (False) signal should
        be emitted when the listing stops.
      </tp:docstring>
    </method>
    <signal name="ListingRooms" tp:name-for-bindings="Listing_Rooms">
      <arg name="Listing" type="b">
        <tp:docstring>A boolean indicating if room listing is in progress</tp:docstring>
      </arg>
      <tp:docstring>
        Emitted to indicate whether or not room listing request is currently
        in progress.
      </tp:docstring>
    </signal>
    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
      <p>A channel type for listing named channels available on the server. Once the
    <tp:member-ref>ListRooms</tp:member-ref> method is called, it emits signals for rooms present on the
    server, until you <tp:dbus-ref
    namespace="org.freedesktop.Telepathy.Channel">Close</tp:dbus-ref> this
    channel. In some cases, it may not be possible
    to stop the deluge of information from the server. This channel should be
    closed when the room information is no longer being displayed, so that the
    room handles can be freed.</p>

    <p>This channel type may be implemented as a singleton on some protocols, so
    clients should be prepared for the eventuality that they are given a
    channel that is already in the middle of listing channels. The
    <tp:member-ref>ListingRooms</tp:member-ref> signal, or
    <tp:member-ref>GetListingRooms</tp:member-ref> method, can be used to check
    this.</p>
    </tp:docstring>
  </interface>
</node>
<!-- vim:set sw=2 sts=2 et ft=xml: -->
