2 <node name="/Channel_Type_Stream_Tube" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
3 <tp:copyright>Copyright © 2008-2009 Collabora Limited</tp:copyright>
4 <tp:copyright>Copyright © 2008-2009 Nokia Corporation</tp:copyright>
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 <interface name="org.freedesktop.Telepathy.Channel.Type.StreamTube.DRAFT"
21 tp:causes-havoc="experimental">
22 <tp:requires interface="org.freedesktop.Telepathy.Channel"/>
23 <tp:requires interface="org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT"/>
24 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
25 <p>A stream tube is a transport for ordered, reliable data transfer,
26 similar to SOCK_STREAM sockets.</p>
28 <p>When offering a stream tube, the initiating client creates a local
29 listening socket and offers it to the recipient client using the
30 <tp:member-ref>OfferStreamTube</tp:member-ref> method. When a
31 recipient accepts a stream tube using the
32 <tp:member-ref>AcceptStreamTube</tp:member-ref> method, the
33 recipient's connection manager creates a new local listening socket.
34 Each time the recipient's client connects to this socket, the
35 initiator's connection manager proxies this connection to the
36 originally offered socket.</p>
40 <method name="OfferStreamTube" tp:name-for-bindings="Offer_Stream_Tube">
42 Offer a stream tube exporting the local socket specified.
44 <arg direction="in" name="address_type" type="u" tp:type="Socket_Address_Type">
46 The type of the listening address of the local service, as a member of
50 <arg direction="in" name="address" type="v">
52 The listening address of the local service, as indicated by the
56 <arg direction="in" name="access_control" type="u" tp:type="Socket_Access_Control">
58 The access control the local service applies to the local socket,
59 specified so the connection manager can behave appropriately
63 <arg direction="in" name="access_control_param" type="v">
65 A parameter for the access control type, to be interpreted as
66 specified in the documentation for the Socket_Access_Control enum.
69 <arg direction="in" name="parameters" type="a{sv}"
70 tp:type="String_Variant_Map">
72 The dictionary of arbitrary
73 <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT">Parameters</tp:dbus-ref>
74 to send with the tube offer.
78 <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
79 <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
81 The contact associated with this channel doesn't have tube
85 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
87 The connection manager doesn't support the given address type
88 or access-control type.
94 <method name="AcceptStreamTube" tp:name-for-bindings="Accept_Stream_Tube">
96 Accept a stream tube that's in the "local pending" state. The
97 connection manager will attempt to open the tube. The tube remains in
98 the "local pending" state until the TubeStateChanged signal is
101 <arg direction="in" name="address_type" type="u" tp:type="Socket_Address_Type">
103 The type of address the connection manager should listen on.
106 <arg direction="in" name="access_control" type="u" tp:type="Socket_Access_Control">
108 The type of access control the connection manager should apply to
112 <arg direction="in" name="access_control_param" type="v">
114 A parameter for the access control type, to be interpreted as
115 specified in the documentation for the Socket_Access_Control enum.
118 <arg direction="out" name="address" type="v">
120 The address on which the connection manager will listen for
121 connections to this tube. The client should not attempt to connect
122 to the address until the tube is open.
127 <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
129 The access_control_param is invalid with the given access_control.
132 <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
134 The given address type or access-control mechanism is not supported.
137 </tp:possible-errors>
140 <signal name="StreamTubeNewConnection"
141 tp:name-for-bindings="Stream_Tube_New_Connection">
143 Emitted on a stream tube when a participant opens a new connection
146 <arg name="handle" type="u" tp:type="Contact_Handle">
148 The handle of the participant who opened the new connection
153 <property name="Service" type="s" access="read"
154 tp:name-for-bindings="Service">
155 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
156 <p> A string representing the service name that will be used over the
157 tube. It should be a well-known TCP service name as defined by
158 <a href="http://www.iana.org/assignments/port-numbers">
159 http://www.iana.org/assignments/port-numbers</a> or
160 <a href="http://www.dns-sd.org/ServiceTypes.html">
161 http://www.dns-sd.org/ServiceTypes.html</a>, for instance
162 "rsync" or "daap".</p>
163 <p>When the tube is offered, the service name is transmitted to the
165 <p>When requesting a channel with
166 <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
167 this property MUST be included in the request.</p>
171 <property name="SupportedSocketTypes" type="a{uau}"
172 tp:type="Supported_Socket_Map" access="read"
173 tp:name-for-bindings="Supported_Socket_Types">
174 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
175 <p>A mapping from address types (members of Socket_Address_Type) to
176 arrays of access-control type (members of Socket_Access_Control)
177 that the connection manager supports for stream tubes with that
178 address type. For simplicity, if a CM supports offering a
179 particular type of tube, it is assumed to support accepting it.</p>
181 <p>A typical value for a host without IPv6 support:</p>
185 Socket_Address_Type_IPv4:
186 [Socket_Access_Control_Localhost, Socket_Access_Control_Port,
187 Socket_Access_Control_Netmask],
188 Socket_Address_Type_Unix:
189 [Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
193 <p>Connection Managers MUST support at least IPv4 with the localhost
196 <p>When requesting a channel with
197 <tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
198 this property MUST NOT be included in the request.</p>
206 <!-- vim:set sw=2 sts=2 et ft=xml: -->