summaryrefslogtreecommitdiff
path: root/spec/Channel_Type_Room_List.xml
blob: 98f74582259ae51acc14cd375b6ee06d07414006 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<?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 (as would
            be returned by getting the string part of the <tp:dbus-ref
            namespace="org.freedesktop.Telepathy.Channel.Interface.Room.DRAFT"
            >Subject</tp:dbus-ref> property)</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>

          <dt>room-id (s)</dt>
          <dd>The human-readable identifier of a chat room (as would be
            returned by getting the <tp:dbus-ref
            namespace="org.freedesktop.Telepathy.Channel.Interface.Room.DRAFT"
            >RoomID</tp:dbus-ref> property)</dd>

          <dt>server (s)</dt>
          <dd>The DNS name of the server hosting these channels (as would be
            returned by getting the <tp:dbus-ref
            namespace="org.freedesktop.Telepathy.Channel.Interface.Room.DRAFT"
            >Server</tp:dbus-ref> property)</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: -->