aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaud Maillet <arnaud.maillet@collabora.co.uk>2009-05-22 22:02:00 +0800
committerArnaud Maillet <arnaud.maillet@collabora.co.uk>2009-05-22 22:02:00 +0800
commit401b81d9cf9667283cabea8d1d9b5926d9d77a9c (patch)
treef8b1b2cab5eb6365e91a492077fa061f1802438f
parent7b1c449738cd5800d54335eb5512a3b8231b1e12 (diff)
downloadgsoc2013-empathy-401b81d9cf9667283cabea8d1d9b5926d9d77a9c.tar
gsoc2013-empathy-401b81d9cf9667283cabea8d1d9b5926d9d77a9c.tar.gz
gsoc2013-empathy-401b81d9cf9667283cabea8d1d9b5926d9d77a9c.tar.bz2
gsoc2013-empathy-401b81d9cf9667283cabea8d1d9b5926d9d77a9c.tar.lz
gsoc2013-empathy-401b81d9cf9667283cabea8d1d9b5926d9d77a9c.tar.xz
gsoc2013-empathy-401b81d9cf9667283cabea8d1d9b5926d9d77a9c.tar.zst
gsoc2013-empathy-401b81d9cf9667283cabea8d1d9b5926d9d77a9c.zip
Rename OfferStreamTube and AcceptStreamTube to Offer and Accept
-rw-r--r--extensions/Channel_Type_Stream_Tube.xml92
-rw-r--r--libempathy/empathy-tp-tube.c6
2 files changed, 77 insertions, 21 deletions
diff --git a/extensions/Channel_Type_Stream_Tube.xml b/extensions/Channel_Type_Stream_Tube.xml
index 060cd0bb0..eed8faf2d 100644
--- a/extensions/Channel_Type_Stream_Tube.xml
+++ b/extensions/Channel_Type_Stream_Tube.xml
@@ -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"
diff --git a/libempathy/empathy-tp-tube.c b/libempathy/empathy-tp-tube.c
index 601ad0626..c2ec0ba31 100644
--- a/libempathy/empathy-tp-tube.c
+++ b/libempathy/empathy-tp-tube.c
@@ -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));