[telepathy-doc/master] A bit more on roomlists
Davyd Madeley
davyd at madeley.id.au
Thu Apr 9 03:02:01 PDT 2009
---
docs/book/C/channel.xml | 18 +++++++++++++++++-
docs/examples/glib_jabber_muc/example.c | 2 ++
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/docs/book/C/channel.xml b/docs/book/C/channel.xml
index 3fbf48d..08842ac 100644
--- a/docs/book/C/channel.xml
+++ b/docs/book/C/channel.xml
@@ -1022,12 +1022,23 @@
</para>
<para>
- <interfacename>RoomList</interfacename>s channels are stateful, so
+ <interfacename>RoomList</interfacename> channels are stateful, so
they should be <emphasis>created</emphasis> (see
<xref linkend="sect.channel.requesting"/>). On protocols that support
multiple conference servers (e.g. XMPP), the <property>Server</property>
property can be included in the request.
</para>
+
+ <para>
+ <xref linkend="example.channel.roomlist.examplemap"/> shows an example
+ property map that might be used to request a room list. Omitting the
+ <property>Server</property> property will cause the server's default
+ conference server to be used. If the server does not provide a default,
+ the configured fallback for the connection will be used. If this is
+ unset an error will occur (<errorname>NotAvailable</errorname>).
+ <xref linkend="example.channel.roomlist.requestglib"/> shows a code
+ example.
+ </para>
<example id="example.channel.roomlist.examplemap">
<title>Example Maps For Requesting a Room List</title>
@@ -1062,6 +1073,11 @@
</informaltable>
</example>
+ <example id="example.channel.roomlist.requestglib"
+ file="glib_jabber_muc/example.c">
+ <title>Creating a RoomList Channel</title>
+ </example>
+
<important>
<para>
<interfacename>RoomList</interfacename> channels are anonymous. You
diff --git a/docs/examples/glib_jabber_muc/example.c b/docs/examples/glib_jabber_muc/example.c
index af646ec..2b4cb0f 100644
--- a/docs/examples/glib_jabber_muc/example.c
+++ b/docs/examples/glib_jabber_muc/example.c
@@ -118,6 +118,7 @@ conn_ready (TpConnection *conn,
NULL, NULL, NULL, &error);
handle_error (error);
+ /* begin example.channel.roomlist.requestglib */
/* request a RoomList channel */
GHashTable *map = tp_asv_new (
TP_IFACE_CHANNEL ".ChannelType", G_TYPE_STRING, TP_IFACE_CHANNEL_TYPE_ROOM_LIST,
@@ -131,6 +132,7 @@ conn_ready (TpConnection *conn,
NULL, NULL, NULL);
g_hash_table_destroy (map);
+ /* end example.channel.roomlist.requestglib */
}
}
--
1.5.6.5
More information about the telepathy-commits
mailing list