[Telepathy-commits] [telepathy-spec/master] Move some types from Channel_Type_Tubes to Channel_Type_DBusTube or Channel_Type_StreamTube. Add Channel_Type_Tubes' members in either Channel_Type_Tube, Channel_Type_StreamTube, or Channel_Type_DBusTube with some modifications

Alban Crequy alban.crequy at collabora.co.uk
Wed Nov 19 06:15:01 PST 2008


Some open questions:

- GetAvailableStreamTubeTypes is copied as is in Channel_Type_StreamTube but it
  should not. It should be a capability of the CM or immutable property of the
  channel maybe.

- GetAvailableTubeTypes is not available in the new API but it should be a
  capability of the CM.

Some differences between the old API and the new API:

- no tube ID anymore because there is only 1 tube per channel and the channel
  object name is enough. The tube ID parameter is removed everywhere.

- The tube state has one additional state: "not yet requested".
  TubeStateChanged replaced by TubeChannelStateChanged. New name required
  because there is one additional state.

- OfferDBusTube or OfferStreamTube:
  - remove the service parameter because it must be given at channel creation
    time.
  - the parameters parameter can be given both at channel creation time and
    offering time. They are merged.

- NewTube, CloseTube, TubeClosed don't exist in the new API.

- GetStreamTubeSocketAddress cannot return an error when the tube is not a
  stream tube because the method is not available on non stream tube channels.


20080806112855-a41c0-3f2bba200a1f53f998c5e4026c26a0bc87028cb3.gz
---
 spec/Channel_Type_DBusTube.xml   |  139 ++++++++++++++++
 spec/Channel_Type_StreamTube.xml |  333 ++++++++++++++++++++++++++++++++++++++
 spec/Channel_Type_Tube.xml       |   60 +++++++-
 spec/Channel_Type_Tubes.xml      |  200 -----------------------
 4 files changed, 530 insertions(+), 202 deletions(-)

diff --git a/spec/Channel_Type_DBusTube.xml b/spec/Channel_Type_DBusTube.xml
index 8128b57..4a27908 100644
--- a/spec/Channel_Type_DBusTube.xml
+++ b/spec/Channel_Type_DBusTube.xml
@@ -23,8 +23,147 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
       <p></p>
 
+      <p>When creating a channel of this type, some parameters are
+        mandatory:</p>
+
+        <ul>
+          <li>service</li>
+        </ul>
+
+      <p>Some parameters are facultative:</p>
+
+        <ul>
+          <li>parameters</li>
+        </ul>
+
     </tp:docstring>
 
+    <tp:struct name="DBus_Tube_Member" array-name="DBus_Tube_Member_List">
+      <tp:docstring>A struct (handle, unique name) representing a participant
+        in a D-Bus tube, as returned by GetDBusNames on the Tubes channel
+        type, and as seen in the DBusNamesChanged signal.</tp:docstring>
+      <tp:member type="u" tp:type="Contact_Handle" name="Handle"/>
+      <tp:member type="s" tp:type="DBus_Unique_Name" name="Unique_Name"/>
+    </tp:struct>
+
+    <method name="OfferDBusTube">
+      <tp:docstring>
+        Offers a D-Bus tube providing the service specified.
+      </tp:docstring>
+      <arg direction="in" name="parameters" type="a{sv}"
+        tp:type="String_Variant_Map">
+        <tp:docstring>
+          A dictionary of properties for the new tube; the allowable keys,
+          types and values are defined by the service. Connection managers
+          must support the value being any primitive (non-container)
+          D-Bus type, or a byte array 'ay'.
+        </tp:docstring>
+      </arg>
+      <tp:possible-errors>
+        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+          <tp:docstring>
+            The contact associated with this channel doesn't have tubes
+            capabilities.
+          </tp:docstring>
+        </tp:error>
+        <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+          <tp:docstring>
+            The connection manager doesn't support D-Bus tubes.
+          </tp:docstring>
+        </tp:error>
+      </tp:possible-errors>
+    </method>
+
+    <method name="AcceptDBusTube">
+      <tp:docstring>
+        Accept a D-Bus tube that's in the "local pending" state. The
+        connection manager will attempt to open the tube. The tube remains in
+        the "local pending" state until the TubeStateChanged signal is
+        emitted.
+      </tp:docstring>
+      <arg direction="out" name="address" type="s">
+        <tp:docstring>
+          The string describing the address of the private bus. The client
+          should not attempt to connect to the address until the tube is open.
+        </tp:docstring>
+      </arg>
+      <tp:possible-errors>
+        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+          <tp:docstring>
+            The given tube ID is invalid or does not refer to a D-Bus
+            tube.
+          </tp:docstring>
+        </tp:error>
+      </tp:possible-errors>
+    </method>
+
+    <method name="GetDBusTubeAddress">
+      <tp:docstring>
+        Return a string describing the address of the private bus.
+      </tp:docstring>
+      <arg direction="out" type="s">
+        <tp:docstring>
+          The bus address.
+        </tp:docstring>
+      </arg>
+      <tp:possible-errors>
+        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+          <tp:docstring>
+            The tube is not a D-Bus tube.
+          </tp:docstring>
+        </tp:error>
+        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+          <tp:docstring>
+            This tube is not in the "open" state.
+          </tp:docstring>
+        </tp:error>
+      </tp:possible-errors>
+    </method>
+
+    <method name="GetDBusNames">
+      <tp:docstring>
+        For a multi-user (i.e. Handle_Type_Room) D-Bus tube, obtain a mapping
+        between contact handles and their unique bus names on this tube.
+      </tp:docstring>
+      <arg direction="out" type="a(us)" tp:type="DBus_Tube_Member[]">
+        <tp:docstring>
+          An array of structures, each containing a contact handle and a D-Bus
+          bus name.
+        </tp:docstring>
+      </arg>
+      <tp:possible-errors>
+        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+          <tp:docstring>
+            The tube is not a multi-user D-Bus tube.
+          </tp:docstring>
+        </tp:error>
+        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+          <tp:docstring>
+            This tube is not in the "open" state.
+          </tp:docstring>
+        </tp:error>
+      </tp:possible-errors>
+    </method>
+
+    <signal name="DBusNamesChanged">
+      <tp:docstring>
+        Emitted on a multi-user (i.e. Handle_Type_Room) D-Bus tube when a
+        participant opens or closes the tube.
+      </tp:docstring>
+      <arg name="added" type="a(us)" tp:type="DBus_Tube_Member[]">
+        <tp:docstring>
+          Array of handles and D-Bus names of new participants.
+        </tp:docstring>
+      </arg>
+      <arg name="removed" type="au" tp:type="Contact_Handle[]">
+        <tp:docstring>
+          Array of handles of former participants.
+        </tp:docstring>
+      </arg>
+    </signal>
+
+
   </interface>
 
 </node>
diff --git a/spec/Channel_Type_StreamTube.xml b/spec/Channel_Type_StreamTube.xml
index 7e1501e..b5812d9 100644
--- a/spec/Channel_Type_StreamTube.xml
+++ b/spec/Channel_Type_StreamTube.xml
@@ -23,8 +23,341 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
       <p></p>
 
+      <p>When creating a channel of this type, some parameters are
+        mandatory:</p>
+
+        <ul>
+          <li>service: A string representing the service name that will be used
+          over the tube. It should be a well-known TCP service name as defined
+          by <a href="http://www.iana.org/assignments/port-numbers">
+            http://www.iana.org/assignments/port-numbers</a> or
+          <a href="http://www.dns-sd.org/ServiceTypes.html">
+            http://www.dns-sd.org/ServiceTypes.html</a>, for instance
+          "rsync" or "daap".</li>
+        </ul>
+
+      <p>Some parameters are facultative:</p>
+
+        <ul>
+          <li>parameters</li>
+        </ul>
+
     </tp:docstring>
 
+    <tp:struct name="Socket_Address_IPv4">
+      <tp:docstring>An IPv4 address and port.</tp:docstring>
+      <tp:member type="s" name="Address">
+        <tp:docstring>A dotted-quad IPv4 address literal: four ASCII decimal
+          numbers, each between 0 and 255 inclusive, e.g.
+          "192.168.0.1".</tp:docstring>
+      </tp:member>
+      <tp:member type="q" name="Port">
+        <tp:docstring>The TCP or UDP port number.</tp:docstring>
+      </tp:member>
+    </tp:struct>
+
+    <tp:struct name="Socket_Address_IPv6">
+      <tp:docstring>An IPv6 address and port.</tp:docstring>
+      <tp:member type="s" name="Address">
+        <tp:docstring>An IPv6 address literal as specified by RFC2373
+          section 2.2, e.g. "2001:DB8::8:800:200C:4171".</tp:docstring>
+      </tp:member>
+      <tp:member type="q" name="Port">
+        <tp:docstring>The TCP or UDP port number.</tp:docstring>
+      </tp:member>
+    </tp:struct>
+
+    <tp:struct name="Socket_Netmask_IPv4">
+      <tp:docstring>An IPv4 network or subnet.</tp:docstring>
+      <tp:member type="s" name="Address">
+        <tp:docstring>A dotted-quad IPv4 address literal: four ASCII decimal
+          numbers, each between 0 and 255 inclusive, e.g.
+          "192.168.0.1".</tp:docstring>
+      </tp:member>
+      <tp:member type="y" name="Prefix_Length">
+        <tp:docstring>The number of leading bits of the address that must
+          match, for this netmask to be considered to match an
+          address.</tp:docstring>
+      </tp:member>
+    </tp:struct>
+
+    <tp:struct name="Socket_Netmask_IPv6">
+      <tp:docstring>An IPv6 network or subnet.</tp:docstring>
+      <tp:member type="s" name="Address">
+        <tp:docstring>An IPv6 address literal as specified by RFC2373
+          section 2.2, e.g. "2001:DB8::8:800:200C:4171".</tp:docstring>
+      </tp:member>
+      <tp:member type="y" name="Prefix_Length">
+        <tp:docstring>The number of leading bits of the address that must
+          match, for this netmask to be considered to match an
+          address.</tp:docstring>
+      </tp:member>
+    </tp:struct>
+
+    <tp:enum name="Socket_Address_Type" type="u">
+      <tp:enumvalue suffix="Unix" value="0">
+        <tp:docstring>
+          A Unix socket. The variant contains a byte-array, signature 'ay',
+          containing the path of the socket.
+        </tp:docstring>
+      </tp:enumvalue>
+
+      <tp:enumvalue suffix="Abstract_Unix" value="1">
+        <tp:docstring>
+          An abstract Unix socket. The variant contains a byte-array,
+          signature 'ay', containing the path of the socket including the
+          leading null byte.
+        </tp:docstring>
+      </tp:enumvalue>
+
+      <tp:enumvalue suffix="IPv4" value="2">
+        <tp:docstring>
+          An IPv4 socket. The variant contains a Socket_Address_IPv4,
+          i.e. a structure with signature (sq)
+          in which the string is an IPv4 dotted-quad address literal
+          (and must not be a DNS name), while the 16-bit unsigned integer is
+          the port number.
+        </tp:docstring>
+      </tp:enumvalue>
+
+      <tp:enumvalue suffix="IPv6" value="3">
+        <tp:docstring>
+          An IPv6 socket. The variant contains a Socket_Address_IPv6,
+          i.e. a structure with signature (sq)
+          in which the string is an IPv6 address literal as specified in
+          RFC2373 (and must not be a DNS name), while the 16-bit unsigned
+          integer is the port number.
+        </tp:docstring>
+      </tp:enumvalue>
+
+    </tp:enum>
+
+    <tp:enum name="Socket_Access_Control" type="u">
+      <tp:enumvalue suffix="Localhost" value="0">
+        <tp:docstring>
+          The IP or Unix socket can be accessed by any local user (e.g.
+          a Unix socket that accepts all local connections, or an IP socket
+          listening on 127.0.0.1 (or ::1) or rejecting connections not from
+          that address). The associated variant must be ignored.
+        </tp:docstring>
+      </tp:enumvalue>
+      <tp:enumvalue suffix="Port" value="1">
+        <tp:docstring>
+          May only be used on IP sockets. The associated variant must contain
+          a struct Socket_Address_IPv4 (or Socket_Address_IPv6)
+          containing the string form of an IP address of the appropriate
+          version, and a port number. The socket can only be accessed if the
+          connecting process has that address and port number; all other
+          connections will be rejected.
+        </tp:docstring>
+      </tp:enumvalue>
+      <tp:enumvalue suffix="Netmask" value="2">
+        <tp:docstring>
+          May only be used on IP sockets. The associated variant must contain
+          a struct Socket_Netmask_IPv4 (or Socket_Netmask_IPv6) with
+          signature (sy), containing the string form of an
+          IP address of the appropriate version, and a prefix length "n".
+          The socket can only be accessed if the first n bits of the
+          connecting address match the first n bits of the given address.
+        </tp:docstring>
+      </tp:enumvalue>
+      <tp:enumvalue suffix="Credentials" value="3">
+        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+          <p>The connecting process must send a single zero (NUL) byte when
+            it first connects, which is not considered to be part of the data
+            stream. If the operating system uses sendmsg() with SCM_CREDS or
+            SCM_CREDENTIALS to pass credentials over sockets, the connecting
+            process must do so if possible; if not, it must still send the
+            byte.</p>
+
+          <p>The listening process will disconnect the connection unless it
+            can determine by OS-specific means that the connecting process
+            has the same user ID as the listening process.</p>
+
+          <p>The associated variant must be ignored.</p>
+        </tp:docstring>
+      </tp:enumvalue>
+    </tp:enum>
+
+    <tp:mapping name="Supported_Socket_Map">
+      <tp:docstring>The supported socket address and access-control types
+        for tubes. See GetAvailableStreamTubeTypes.</tp:docstring>
+      <tp:member name="Address_Type" type="u" tp:type="Socket_Address_Type"/>
+      <tp:member name="Access_Control" type="au"
+        tp:type="Socket_Access_Control[]"/>
+    </tp:mapping>
+
+    <method name="GetAvailableStreamTubeTypes">
+      <tp:docstring>List the available address types and access-control types
+        for stream tubes.</tp:docstring>
+      <arg direction="out" type="a{uau}" tp:type="Supported_Socket_Map">
+        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+          <p>A mapping from address types (members of Socket_Address_Type) to
+          arrays of access-control type (members of Socket_Access_Control)
+          that the connection manager supports for stream tubes with that
+          address type. For simplicity, if a CM supports offering a
+          particular type of tube, it is assumed to support accepting it.</p>
+
+          <p>A typical value for a host without IPv6 support:</p>
+
+          <pre>
+            {
+              Socket_Address_Type_IPv4:
+                [Socket_Access_Control_Localhost, Socket_Access_Control_Port,
+                 Socket_Access_Control_Netmask],
+              Socket_Address_Type_Unix:
+                [Socket_Access_Control_Localhost, Socket_Access_Control_Credentials]
+            }
+          </pre>
+
+          <p>If stream tubes are not supported, this will be an empty
+            dictionary.</p>
+        </tp:docstring>
+      </arg>
+    </method>
+
+    <method name="OfferStreamTube">
+      <tp:docstring>
+        Offer a stream tube exporting the local socket specified.
+      </tp:docstring>
+      <arg direction="in" name="parameters" type="a{sv}"
+        tp:type="String_Variant_Map">
+        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+          <p>A dictionary of properties for the new tube; the allowable keys,
+          types and values are defined by the service. Connection managers
+          must support the value being any primitive (non-container)
+          D-Bus type, or a byte array 'ay'.</p>
+          <p>These should usually be the same key-value pairs specified for
+          use in the DNS-SD TXT record for that service.</p>
+        </tp:docstring>
+      </arg>
+      <arg direction="in" name="address_type" type="u" tp:type="Socket_Address_Type">
+        <tp:docstring>
+          The type of the listening address of the local service, as a member of
+          Socket_Address_Type.
+        </tp:docstring>
+      </arg>
+      <arg direction="in" name="address" type="v">
+        <tp:docstring>
+          The listening address of the local service, as indicated by the
+          address_type.
+        </tp:docstring>
+      </arg>
+      <arg direction="in" name="access_control" type="u" tp:type="Socket_Access_Control">
+        <tp:docstring>
+          The access control the local service applies to the local socket,
+          specified so the connection manager can behave appropriately
+          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>
+      <tp:possible-errors>
+        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
+        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+          <tp:docstring>
+            The contact associated with this channel doesn't have tube
+            capabilities.
+          </tp:docstring>
+        </tp:error>
+        <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+          <tp:docstring>
+            The connection manager doesn't support stream tubes, or
+            does not support the given address type or access-control type.
+          </tp:docstring>
+        </tp:error>
+      </tp:possible-errors>
+    </method>
+
+    <method name="AcceptStreamTube">
+      <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
+        the "local pending" state until the TubeStateChanged signal is
+        emitted.
+      </tp:docstring>
+      <arg direction="in" name="address_type" type="u" tp:type="Socket_Address_Type">
+        <tp:docstring>
+          The type of address the connection manager should listen on.
+        </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>
+      </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="out" name="address" type="v">
+        <tp:docstring>
+          The address on which the connection manager will listen for
+          connections to this tube. The client should not attempt to connect
+          to the address until the tube is open.
+        </tp:docstring>
+      </arg>
+
+      <tp:possible-errors>
+        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument">
+          <tp:docstring>
+            The given tube ID is invalid or does not refer to a stream
+            tube.
+          </tp:docstring>
+        </tp:error>
+        <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented">
+          <tp:docstring>
+            The given address type or access-control mechanism is not supported.
+          </tp:docstring>
+        </tp:error>
+      </tp:possible-errors>
+    </method>
+
+    <method name="GetStreamTubeSocketAddress">
+      <tp:docstring>
+        For a stream tube, obtain the address of the socket used to
+        communicate over this tube.
+      </tp:docstring>
+      <arg direction="out" name="address_type" type="u" tp:type="Socket_Address_Type">
+        <tp:docstring>
+          The type of the listening address of the socket, as a member of
+          Socket_Address_Type.
+        </tp:docstring>
+      </arg>
+      <arg direction="out" name="address" type="v">
+        <tp:docstring>
+          The listening address of the socket, as indicated by the
+          address_type.
+        </tp:docstring>
+      </arg>
+      <tp:possible-errors>
+        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
+          <tp:docstring>
+            This tube is not in the "open" state.
+          </tp:docstring>
+        </tp:error>
+      </tp:possible-errors>
+    </method>
+
+    <signal name="StreamTubeNewConnection">
+      <tp:docstring>
+        Emitted on a stream tube when a participant opens a new connection
+        to its socket.
+      </tp:docstring>
+      <arg name="handle" type="u" tp:type="Contact_Handle">
+        <tp:docstring>
+          The handle of the participant who opened the new connection
+        </tp:docstring>
+      </arg>
+    </signal>
+
   </interface>
 
 </node>
diff --git a/spec/Channel_Type_Tube.xml b/spec/Channel_Type_Tube.xml
index 8546a92..77e0f83 100644
--- a/spec/Channel_Type_Tube.xml
+++ b/spec/Channel_Type_Tube.xml
@@ -32,20 +32,76 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
         HANDLE_TYPE_CONTACT and HANDLE_TYPE_ROOM.</p>
     </tp:docstring>
 
+    <tp:enum name="Tube_Type" type="u">
+      <tp:enumvalue suffix="DBus" value="0">
+        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+          <p>An ordered reliable transport, for transporting D-Bus
+            traffic.</p>
+
+          <p>For each D-Bus tube, the connection manager listens on a D-Bus
+            server address, as detailed in the D-Bus specification. On this
+            address, it emulates a bus upon which each tube participant appears
+            as an endpoint.</p>
+
+          <p>The objects and interfaces which are expected to exist on the
+            emulated bus depend on the well-known name; typically, either the
+            participant who initiated the tube is expected to export the same
+            objects/interfaces that would be exported by a service of that name
+            on a bus, or all participants are expected to export those
+            objects/interfaces.</p>
+
+          <p>In a multi-user context (Handle_Type_Room) the tube behaves
+            like the D-Bus bus daemon, so participants can send each other
+            private messages, or can send broadcast messages which are
+            received by everyone in the tube (including themselves).
+            Each participant has a D-Bus unique name; connection managers
+            must prevent participants from sending messages with the wrong
+            sender unique name, and should attempt to avoid participants
+            receiving messages not intended for them.</p>
+
+          <p>In a 1-1 context (Handle_Type_Contact) the tube behaves like
+            a peer-to-peer D-Bus connection - arbitrary D-Bus messages with
+            any sender and/or destination can be sent by each participant,
+            and each participant receives all messages sent by the other
+            participant.</p>
+        </tp:docstring>
+      </tp:enumvalue>
+
+      <tp:enumvalue suffix="Stream" value="1">
+        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+          <p>A transport for ordered, reliable data transfer, similar to
+            SOCK_STREAM sockets.</p>
+
+          <p>When accepting a Stream Unix tube, a new listening local socket is
+            created. Each time the client connects to this socket, the
+            connection manager of the initiator of the tube opens a new
+            connection to its local socket. Both sides can then use this pair
+            of sockets to communicate together.</p>
+        </tp:docstring>
+      </tp:enumvalue>
+    </tp:enum>
+
+    <property name="Initiator" type="u" tp:type="Contact_Handle" access="read">
+      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+        <p>Initiator handle.</p>
+      </tp:docstring>
+    </property>
+
     <property name="TubeType" type="u" tp:type="Tube_Type" access="read">
       <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
         <p>Type of the tube.</p>
       </tp:docstring>
     </property>
 
-    <property name="ServiceName" type="s" access="read">
+    <property name="Service" type="s" access="read">
       <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
         <p>Each tube has a service name, which is a string specifying the
           kind of communication that takes place over it.</p>
       </tp:docstring>
     </property>
 
-    <property name="Parameters" type="a{sv}" access="read">
+    <property name="Parameters" type="a{sv}" tp:type="String_Variant_Map"
+              access="read">
       <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
         <p>Each tube has a dictionary of arbitrary parameters. Parameters are
           commonly used for bootstrap information such as usernames and
diff --git a/spec/Channel_Type_Tubes.xml b/spec/Channel_Type_Tubes.xml
index b187c03..246317a 100644
--- a/spec/Channel_Type_Tubes.xml
+++ b/spec/Channel_Type_Tubes.xml
@@ -55,113 +55,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       <tp:member type="u" tp:type="Tube_State" name="State"/>
     </tp:struct>
 
-    <tp:struct name="DBus_Tube_Member" array-name="DBus_Tube_Member_List">
-      <tp:docstring>A struct (handle, unique name) representing a participant
-        in a D-Bus tube, as returned by GetDBusNames on the Tubes channel
-        type, and as seen in the DBusNamesChanged signal.</tp:docstring>
-      <tp:member type="u" tp:type="Contact_Handle" name="Handle"/>
-      <tp:member type="s" tp:type="DBus_Unique_Name" name="Unique_Name"/>
-    </tp:struct>
-
-    <tp:struct name="Socket_Address_IPv4">
-      <tp:docstring>An IPv4 address and port.</tp:docstring>
-      <tp:member type="s" name="Address">
-        <tp:docstring>A dotted-quad IPv4 address literal: four ASCII decimal
-          numbers, each between 0 and 255 inclusive, e.g.
-          "192.168.0.1".</tp:docstring>
-      </tp:member>
-      <tp:member type="q" name="Port">
-        <tp:docstring>The TCP or UDP port number.</tp:docstring>
-      </tp:member>
-    </tp:struct>
-
-    <tp:struct name="Socket_Address_IPv6">
-      <tp:docstring>An IPv6 address and port.</tp:docstring>
-      <tp:member type="s" name="Address">
-        <tp:docstring>An IPv6 address literal as specified by RFC2373
-          section 2.2, e.g. "2001:DB8::8:800:200C:4171".</tp:docstring>
-      </tp:member>
-      <tp:member type="q" name="Port">
-        <tp:docstring>The TCP or UDP port number.</tp:docstring>
-      </tp:member>
-    </tp:struct>
-
-    <tp:struct name="Socket_Netmask_IPv4">
-      <tp:docstring>An IPv4 network or subnet.</tp:docstring>
-      <tp:member type="s" name="Address">
-        <tp:docstring>A dotted-quad IPv4 address literal: four ASCII decimal
-          numbers, each between 0 and 255 inclusive, e.g.
-          "192.168.0.1".</tp:docstring>
-      </tp:member>
-      <tp:member type="y" name="Prefix_Length">
-        <tp:docstring>The number of leading bits of the address that must
-          match, for this netmask to be considered to match an
-          address.</tp:docstring>
-      </tp:member>
-    </tp:struct>
-
-    <tp:struct name="Socket_Netmask_IPv6">
-      <tp:docstring>An IPv6 network or subnet.</tp:docstring>
-      <tp:member type="s" name="Address">
-        <tp:docstring>An IPv6 address literal as specified by RFC2373
-          section 2.2, e.g. "2001:DB8::8:800:200C:4171".</tp:docstring>
-      </tp:member>
-      <tp:member type="y" name="Prefix_Length">
-        <tp:docstring>The number of leading bits of the address that must
-          match, for this netmask to be considered to match an
-          address.</tp:docstring>
-      </tp:member>
-    </tp:struct>
-
-    <tp:enum name="Tube_Type" type="u">
-      <tp:enumvalue suffix="DBus" value="0">
-        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-          <p>An ordered reliable transport, for transporting D-Bus
-            traffic.</p>
-
-          <p>For each D-Bus tube, the connection manager listens on a D-Bus
-            server address, as detailed in the D-Bus specification. On this
-            address, it emulates a bus upon which each tube participant appears
-            as an endpoint.</p>
-
-          <p>The objects and interfaces which are expected to exist on the
-            emulated bus depend on the well-known name; typically, either the
-            participant who initiated the tube is expected to export the same
-            objects/interfaces that would be exported by a service of that name
-            on a bus, or all participants are expected to export those
-            objects/interfaces.</p>
-
-          <p>In a multi-user context (Handle_Type_Room) the tube behaves
-            like the D-Bus bus daemon, so participants can send each other
-            private messages, or can send broadcast messages which are
-            received by everyone in the tube (including themselves).
-            Each participant has a D-Bus unique name; connection managers
-            must prevent participants from sending messages with the wrong
-            sender unique name, and should attempt to avoid participants
-            receiving messages not intended for them.</p>
-
-          <p>In a 1-1 context (Handle_Type_Contact) the tube behaves like
-            a peer-to-peer D-Bus connection - arbitrary D-Bus messages with
-            any sender and/or destination can be sent by each participant,
-            and each participant receives all messages sent by the other
-            participant.</p>
-        </tp:docstring>
-      </tp:enumvalue>
-
-      <tp:enumvalue suffix="Stream" value="1">
-        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-          <p>A transport for ordered, reliable data transfer, similar to
-            SOCK_STREAM sockets.</p>
-
-          <p>When accepting a Stream Unix tube, a new listening local socket is
-            created. Each time the client connects to this socket, the
-            connection manager of the initiator of the tube opens a new
-            connection to its local socket. Both sides can then use this pair
-            of sockets to communicate together.</p>
-        </tp:docstring>
-      </tp:enumvalue>
-    </tp:enum>
-
     <tp:enum name="Tube_State" type="u">
       <tp:enumvalue suffix="Local_Pending" value="0">
         <tp:docstring>
@@ -180,99 +73,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
       </tp:enumvalue>
     </tp:enum>
 
-    <tp:enum name="Socket_Address_Type" type="u">
-      <tp:enumvalue suffix="Unix" value="0">
-        <tp:docstring>
-          A Unix socket. The variant contains a byte-array, signature 'ay',
-          containing the path of the socket.
-        </tp:docstring>
-      </tp:enumvalue>
-
-      <tp:enumvalue suffix="Abstract_Unix" value="1">
-        <tp:docstring>
-          An abstract Unix socket. The variant contains a byte-array,
-          signature 'ay', containing the path of the socket including the
-          leading null byte.
-        </tp:docstring>
-      </tp:enumvalue>
-
-      <tp:enumvalue suffix="IPv4" value="2">
-        <tp:docstring>
-          An IPv4 socket. The variant contains a Socket_Address_IPv4,
-          i.e. a structure with signature (sq)
-          in which the string is an IPv4 dotted-quad address literal
-          (and must not be a DNS name), while the 16-bit unsigned integer is
-          the port number.
-        </tp:docstring>
-      </tp:enumvalue>
-
-      <tp:enumvalue suffix="IPv6" value="3">
-        <tp:docstring>
-          An IPv6 socket. The variant contains a Socket_Address_IPv6,
-          i.e. a structure with signature (sq)
-          in which the string is an IPv6 address literal as specified in
-          RFC2373 (and must not be a DNS name), while the 16-bit unsigned
-          integer is the port number.
-        </tp:docstring>
-      </tp:enumvalue>
-
-    </tp:enum>
-
-    <tp:enum name="Socket_Access_Control" type="u">
-      <tp:enumvalue suffix="Localhost" value="0">
-        <tp:docstring>
-          The IP or Unix socket can be accessed by any local user (e.g.
-          a Unix socket that accepts all local connections, or an IP socket
-          listening on 127.0.0.1 (or ::1) or rejecting connections not from
-          that address). The associated variant must be ignored.
-        </tp:docstring>
-      </tp:enumvalue>
-      <tp:enumvalue suffix="Port" value="1">
-        <tp:docstring>
-          May only be used on IP sockets. The associated variant must contain
-          a struct Socket_Address_IPv4 (or Socket_Address_IPv6)
-          containing the string form of an IP address of the appropriate
-          version, and a port number. The socket can only be accessed if the
-          connecting process has that address and port number; all other
-          connections will be rejected.
-        </tp:docstring>
-      </tp:enumvalue>
-      <tp:enumvalue suffix="Netmask" value="2">
-        <tp:docstring>
-          May only be used on IP sockets. The associated variant must contain
-          a struct Socket_Netmask_IPv4 (or Socket_Netmask_IPv6) with
-          signature (sy), containing the string form of an
-          IP address of the appropriate version, and a prefix length "n".
-          The socket can only be accessed if the first n bits of the
-          connecting address match the first n bits of the given address.
-        </tp:docstring>
-      </tp:enumvalue>
-      <tp:enumvalue suffix="Credentials" value="3">
-        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-          <p>The connecting process must send a single zero (NUL) byte when
-            it first connects, which is not considered to be part of the data
-            stream. If the operating system uses sendmsg() with SCM_CREDS or
-            SCM_CREDENTIALS to pass credentials over sockets, the connecting
-            process must do so if possible; if not, it must still send the
-            byte.</p>
-
-          <p>The listening process will disconnect the connection unless it
-            can determine by OS-specific means that the connecting process
-            has the same user ID as the listening process.</p>
-
-          <p>The associated variant must be ignored.</p>
-        </tp:docstring>
-      </tp:enumvalue>
-    </tp:enum>
-
-    <tp:mapping name="Supported_Socket_Map">
-      <tp:docstring>The supported socket address and access-control types
-        for tubes. See GetAvailableStreamTubeTypes.</tp:docstring>
-      <tp:member name="Address_Type" type="u" tp:type="Socket_Address_Type"/>
-      <tp:member name="Access_Control" type="au"
-        tp:type="Socket_Access_Control[]"/>
-    </tp:mapping>
-
     <method name="GetAvailableStreamTubeTypes">
       <tp:docstring>List the available address types and access-control types
         for stream tubes.</tp:docstring>
-- 
1.5.6.5




More information about the Telepathy-commits mailing list