]> git.0d.be Git - empathy.git/commitdiff
Merge commit 'ksz/fix-bug-583558'
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 22 May 2009 15:47:31 +0000 (16:47 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 22 May 2009 15:47:31 +0000 (16:47 +0100)
extensions/Channel_Type_Stream_Tube.xml
libempathy/empathy-tp-tube.c

index 060cd0bb06eeb777fbd9ab594acc195259564f10..eed8faf2d367554cfd7a01148a028b31bb6d2c6b 100644 (file)
@@ -27,9 +27,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
       <p>When offering a stream tube, the initiating client creates a local
         listening socket and offers it to the recipient client using the
-        <tp:member-ref>OfferStreamTube</tp:member-ref> method.  When a
+        <tp:member-ref>Offer</tp:member-ref> method.  When a
         recipient accepts a stream tube using the
-        <tp:member-ref>AcceptStreamTube</tp:member-ref> method, the
+        <tp:member-ref>Accept</tp:member-ref> method, the
         recipient's connection manager creates a new local listening socket.
         Each time the recipient's client connects to this socket, the
         initiator's connection manager proxies this connection to the
@@ -37,7 +37,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
     </tp:docstring>
 
-    <method name="OfferStreamTube" tp:name-for-bindings="Offer_Stream_Tube">
+    <method name="Offer" tp:name-for-bindings="Offer">
       <tp:docstring>
         Offer a stream tube exporting the local socket specified.
       </tp:docstring>
@@ -60,12 +60,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
           when it connects.
         </tp:docstring>
       </arg>
-      <arg direction="in" name="access_control_param" type="v">
-        <tp:docstring>
-          A parameter for the access control type, to be interpreted as
-          specified in the documentation for the Socket_Access_Control enum.
-        </tp:docstring>
-      </arg>
       <arg direction="in" name="parameters" type="a{sv}"
         tp:type="String_Variant_Map">
         <tp:docstring>
@@ -91,7 +85,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       </tp:possible-errors>
     </method>
 
-    <method name="AcceptStreamTube" tp:name-for-bindings="Accept_Stream_Tube">
+    <method name="Accept" tp:name-for-bindings="Accept">
       <tp:docstring>
         Accept a stream tube that's in the "local pending" state. The
         connection manager will attempt to open the tube. The tube remains in
@@ -104,9 +98,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
         </tp:docstring>
       </arg>
       <arg direction="in" name="access_control" type="u" tp:type="Socket_Access_Control">
-        <tp:docstring>
-          The type of access control the connection manager should apply to
-          the socket.
+        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+          <p>The type of access control the connection manager should apply to
+          the socket.</p>
+
+          <p>Note that if you plan to establish more than one connection
+          through the tube, the Socket_Access_Control_Port access control
+          can't be used as you can't connect more than once from the same
+          port.</p>
         </tp:docstring>
       </arg>
       <arg direction="in" name="access_control_param" type="v">
@@ -137,17 +136,74 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       </tp:possible-errors>
     </method>
 
-    <signal name="StreamTubeNewConnection"
-            tp:name-for-bindings="Stream_Tube_New_Connection">
+    <signal name="NewRemoteConnection"
+            tp:name-for-bindings="New_Remote_Connection">
       <tp:docstring>
-        Emitted on a stream tube when a participant opens a new connection
-        to its socket.
+        Emitted each time a participant opens a new connection to its socket.
       </tp:docstring>
-      <arg name="handle" type="u" tp:type="Contact_Handle">
+      <arg name="Handle" type="u" tp:type="Contact_Handle">
         <tp:docstring>
           The handle of the participant who opened the new connection
         </tp:docstring>
       </arg>
+      <arg name="Connection_Param" type="v">
+        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+          <p>A parameter which can be used by the listening process to identify
+          the connection. Note that this parameter has a meaningful value
+          only in the Socket_Access_Control_Port and
+          Socket_Access_Control_Credentials cases. If a different
+          Socket_Access_Control has been choosed when offering the tube, this
+          parameter should be ignored.</p>
+
+          <p>In the Socket_Access_Control_Port case, the variant
+          contains a struct Socket_Address_IPv4 (or Socket_Address_IPv6)
+          containing the address from which the CM is connected to the client
+          application.</p>
+
+          <p>In the Socket_Access_Control_Credentials case, the variant
+          contains the byte (D-Bus signature 'y') that has been sent with
+          the credentials.</p>
+        </tp:docstring>
+      </arg>
+      <arg name="Connection_ID" type="u">
+        <tp:docstring>
+          The unique ID associated with this connection. This ID will be used
+          to identifiy the connection when reporting errors with
+          <tp:member-ref>ConnectionClosed</tp:member-ref>.
+        </tp:docstring>
+      </arg>
+    </signal>
+
+    <signal name="NewLocalConnection"
+            tp:name-for-bindings="New_Local_Connection">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>Emitted when the tube application connects to CM's socket.</p>
+      </tp:docstring>
+      <arg name="Connection_ID" type="u">
+        <tp:docstring>
+          The unique ID associated with this connection. This ID will be used
+          to identifiy the connection when reporting errors with
+          <tp:member-ref>ConnectionClosed</tp:member-ref>.
+        </tp:docstring>
+      </arg>
+    </signal>
+
+    <signal name="ConnectionClosed"
+            tp:name-for-bindings="Connection_Closed"
+            tp:type="Stream_Tube_Connection_Closed">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>Emitted when a connection has been closed.</p>
+      </tp:docstring>
+      <arg name="Connection_ID" type="u">
+        <tp:docstring>
+          The ID of the connection.
+        </tp:docstring>
+      </arg>
+      <arg name="Error" type="s" tp:type="DBus_Error_Name">
+        <tp:docstring>
+          The name of a D-Bus error describing the error that occurred.
+        </tp:docstring>
+      </arg>
     </signal>
 
     <property name="Service" type="s" access="read"
index 601ad0626ba7048f473294b063bc15e71fa15205..c2ec0ba318f9beec192d737273ae728cb722396a 100644 (file)
@@ -518,9 +518,9 @@ empathy_tp_tube_new_stream_tube (EmpathyContact *contact,
   else
     g_hash_table_ref (parameters);
 
-  if (!emp_cli_channel_type_stream_tube_run_offer_stream_tube (
+  if (!emp_cli_channel_type_stream_tube_run_offer (
         TP_PROXY(channel), -1, type, address,
-        TP_SOCKET_ACCESS_CONTROL_LOCALHOST, control_param, parameters,
+        TP_SOCKET_ACCESS_CONTROL_LOCALHOST, parameters,
         &error, NULL))
     {
       DEBUG ("Couldn't offer tube: %s", error->message);
@@ -609,7 +609,7 @@ empathy_tp_tube_accept_stream_tube (EmpathyTpTube *tube,
 
   data = new_empathy_tp_tube_accept_data (type, callback, user_data);
 
-  emp_cli_channel_type_stream_tube_call_accept_stream_tube (
+  emp_cli_channel_type_stream_tube_call_accept (
      TP_PROXY (priv->channel), -1, type, TP_SOCKET_ACCESS_CONTROL_LOCALHOST,
      control_param, tp_tube_accept_stream_cb, data,
      free_empathy_tp_tube_accept_data, G_OBJECT (tube));