[Telepathy-commits] [telepathy-doc/master] Finish off section on RequestChannel

Davyd Madeley davyd at madeley.id.au
Tue Mar 17 20:51:30 PDT 2009


---
 docs/book/C/channel.xml                      |   13 +++++++++++--
 docs/examples/python_irc_roomlist/example.py |    2 ++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/docs/book/C/channel.xml b/docs/book/C/channel.xml
index c1c1ddb..6604465 100644
--- a/docs/book/C/channel.xml
+++ b/docs/book/C/channel.xml
@@ -182,7 +182,7 @@
     </tip>
 
     <para>
-     The properties argument for <methodname>RequestChannel</methodname> and
+     The properties argument for <methodname>CreateChannel</methodname> and
      <methodname>EnsureChannel</methodname> is a map of property names on
      the desired channel, and their values.
      In general every channel requires at least three channel
@@ -258,8 +258,17 @@
     </itemizedlist>
 
     <para>
-     If you must call <methodname>RequestChannel</methodname>, XXX WRITE ME
+     If you must call <methodname>RequestChannel</methodname>, you call it
+     with the same three arguments required for all channels (channel type,
+     handle type and handle). The <parameter>Suppress_Handler</parameter>
+     argument should <emphasis>always</emphasis> be True.
+     <xref linkend="ex.channel.requestchannel"/> shows how to do this.
     </para>
+
+    <example id="ex.channel.requestchannel"
+             file="python_irc_roomlist/example.py">
+     <title>Requesting a channel using RequestChannel</title>
+    </example>
    </warning>
 
    <sect2 id="sec.channel.requesting.python">
diff --git a/docs/examples/python_irc_roomlist/example.py b/docs/examples/python_irc_roomlist/example.py
index 2fd3e21..0e1ec9d 100755
--- a/docs/examples/python_irc_roomlist/example.py
+++ b/docs/examples/python_irc_roomlist/example.py
@@ -80,6 +80,7 @@ class Example(object):
         else:
             print 'Falling back to RequestChannel'
 
+            # begin ex.channel.requestchannel
             self.conn[CONNECTION].RequestChannel(CHANNEL_TYPE_ROOM_LIST,
                                                  HANDLE_TYPE_NONE, 0,
                                                  True,
@@ -89,6 +90,7 @@ class Example(object):
     def got_roomlist(self, channel_path):
         print 'Got Roomlist Channel'
         channel = telepathy.client.Channel(self.conn.service_name, channel_path)
+        # end ex.channel.requestchannel
         channel[CHANNEL_TYPE_ROOM_LIST].connect_to_signal('GotRooms',
             self.got_rooms)
         channel[CHANNEL_TYPE_ROOM_LIST].connect_to_signal('ListingRooms',
-- 
1.5.6.5



More information about the telepathy-commits mailing list