summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-02-11 16:24:23 +0000
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-02-11 16:24:23 +0000
commitb4ee16c24028ea3f14392f970948edaee0b0cad0 (patch)
tree626a9c0c3449e94af95a9fd20ceaca382e78d20e
parent74ae0dfeca85df93cda9ee9259f4359d1c535010 (diff)
parentb795655221b536bd849fe73dfbd2a735322f007f (diff)
downloadtelepathy-salut-b4ee16c24028ea3f14392f970948edaee0b0cad0.tar.gz
Merge branch 'upgrade-tube-spec-REBASED'
-rw-r--r--extensions/Channel_Interface_Tube.xml10
-rw-r--r--extensions/Channel_Type_DBus_Tube.xml102
-rw-r--r--extensions/Channel_Type_Stream_Tube.xml4
-rw-r--r--extensions/all.xml4
-rw-r--r--src/tube-stream.c2
-rw-r--r--tests/twisted/avahi/test-tube.py2
-rw-r--r--tests/twisted/constants.py2
7 files changed, 51 insertions, 75 deletions
diff --git a/extensions/Channel_Interface_Tube.xml b/extensions/Channel_Interface_Tube.xml
index 8e1ffab3..b2d0f318 100644
--- a/extensions/Channel_Interface_Tube.xml
+++ b/extensions/Channel_Interface_Tube.xml
@@ -58,7 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
SRV (RFC 2782) Service Types
http://www.dns-sd.org/ServiceTypes.html</a>):
<code>{'u': 'username', 'p': 'password', 'path': 'path'}</code></p>
- <p>When requesting a channel with
+ <p>When requesting a channel with
<tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
this property MAY be included in the request. If it is not included in
the request, the connection manager MUST consider the property to be
@@ -68,11 +68,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</tp:docstring>
</property>
- <property name="Status" type="u" tp:type="Tube_Channel_State" access="read"
- tp:name-for-bindings="Status">
+ <property name="State" type="u" tp:type="Tube_Channel_State" access="read"
+ tp:name-for-bindings="State">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
- <p>Status of the tube in this channel.</p>
- <p>When requesting a channel with
+ <p>State of the tube in this channel.</p>
+ <p>When requesting a channel with
<tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
this property MUST NOT be included in the request.</p>
</tp:docstring>
diff --git a/extensions/Channel_Type_DBus_Tube.xml b/extensions/Channel_Type_DBus_Tube.xml
index a3b98d7e..2671a17a 100644
--- a/extensions/Channel_Type_DBus_Tube.xml
+++ b/extensions/Channel_Type_DBus_Tube.xml
@@ -58,6 +58,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<tp:docstring>
Offers a D-Bus tube providing the service specified.
</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.NetworkError"/>
<tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
@@ -66,11 +72,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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>
@@ -87,71 +88,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
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:name-for-bindings="Get_DBus_Tube_Address">
- <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:name-for-bindings="Get_DBus_Names">
- <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:name-for-bindings="DBus_Names_Changed">
<tp:docstring>
Emitted on a multi-user (i.e. Handle_Type_Room) D-Bus tube when a
- participant opens or closes the tube.
+ participant opens or closes the tube. This provides change
+ notification for the <tp:member-ref>DBusNames</tp:member-ref> property.
</tp:docstring>
- <arg name="added" type="a(us)" tp:type="DBus_Tube_Member[]">
+ <arg name="added" type="a{us}" tp:type="DBus_Tube_Participants">
<tp:docstring>
Array of handles and D-Bus names of new participants.
</tp:docstring>
@@ -171,12 +116,39 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
com.example.ServiceName.</p>
<p>When the tube is offered, the service name is transmitted to the
other end.</p>
- <p>When requesting a channel with
+ <p>When requesting a channel with
<tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
this property MUST be included in the request.</p>
</tp:docstring>
</property>
+ <property name="DBusNames" tp:name-for-bindings="DBus_Names"
+ access="read" type="a{us}" tp:type="DBus_Tube_Participants">
+ <tp:docstring>
+ For a multi-user (i.e. Handle_Type_Room) D-Bus tube, a mapping
+ between contact handles and their unique bus names on this tube.
+ For a peer-to-peer (i.e. Handle_Type_Contact) D-Bus tube, the empty
+ dictionary. Change notification is via
+ <tp:member-ref>DBusNamesChanged</tp:member-ref>.
+ </tp:docstring>
+ </property>
+
+ <tp:mapping name="DBus_Tube_Participants">
+ <tp:docstring>Represents the participants in a multi-user D-Bus tube, as
+ used by the <tp:member-ref>DBusNames</tp:member-ref> property and the
+ <tp:member-ref>DBusNamesChanged</tp:member-ref> signal.</tp:docstring>
+ <tp:member type="u" tp:type="Contact_Handle" name="Handle">
+ <tp:docstring>
+ The handle of a participant in this D-Bus tube.
+ </tp:docstring>
+ </tp:member>
+ <tp:member type="s" tp:type="DBus_Unique_Name" name="Unique_Name">
+ <tp:docstring>
+ That participant's unique name.
+ </tp:docstring>
+ </tp:member>
+ </tp:mapping>
+
</interface>
</node>
diff --git a/extensions/Channel_Type_Stream_Tube.xml b/extensions/Channel_Type_Stream_Tube.xml
index 4a43a007..b64f4a03 100644
--- a/extensions/Channel_Type_Stream_Tube.xml
+++ b/extensions/Channel_Type_Stream_Tube.xml
@@ -154,7 +154,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"rsync" or "daap".</p>
<p>When the tube is offered, the service name is transmitted to the
other end.</p>
- <p>When requesting a channel with
+ <p>When requesting a channel with
<tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
this property MUST be included in the request.</p>
</tp:docstring>
@@ -185,7 +185,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<p>Connection Managers MUST support at least IPv4 with the localhost
access control.</p>
- <p>When requesting a channel with
+ <p>When requesting a channel with
<tp:dbus-ref namespace="org.freedesktop.Telepathy">Connection.Interface.Requests.CreateChannel</tp:dbus-ref>,
this property MUST NOT be included in the request.</p>
diff --git a/extensions/all.xml b/extensions/all.xml
index a4abbff8..3686cd28 100644
--- a/extensions/all.xml
+++ b/extensions/all.xml
@@ -52,6 +52,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p>
from="Telepathy specification"/>
<tp:external-type name="Supported_Socket_Map" type="a{uau}"
from="Telepathy specification"/>
+ <tp:external-type name="Unix_Timestamp64" type="t"
+ from="Telepathy specification"/>
+ <tp:simple-type name="DBus_Unique_Name" type="s"
+ from="Telepathy specification"/>
</tp:generic-types>
</tp:spec>
diff --git a/src/tube-stream.c b/src/tube-stream.c
index 76f83de6..239f0ab4 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -1435,7 +1435,7 @@ salut_tube_stream_class_init (SalutTubeStreamClass *salut_tube_stream_class)
};
static TpDBusPropertiesMixinPropImpl tube_iface_props[] = {
{ "Parameters", "parameters", "parameters" },
- { "Status", "state", NULL },
+ { "State", "state", NULL },
{ NULL }
};
static TpDBusPropertiesMixinIfaceImpl prop_interfaces[] = {
diff --git a/tests/twisted/avahi/test-tube.py b/tests/twisted/avahi/test-tube.py
index 6f6aef1a..7059c5ed 100644
--- a/tests/twisted/avahi/test-tube.py
+++ b/tests/twisted/avahi/test-tube.py
@@ -95,7 +95,7 @@ def check_channel_properties(q, bus, conn, channel, channel_type,
tube_props = channel.GetAll(
'org.freedesktop.Telepathy.Channel.Interface.Tube.DRAFT',
dbus_interface='org.freedesktop.DBus.Properties')
- assert tube_props['Status'] == state, tube_props['Status']
+ assert tube_props['State'] == state, tube_props['State']
# no strict check but at least check the properties exist
assert tube_props.has_key('Parameters')
diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index efc564fc..89c50362 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -30,7 +30,7 @@ NOT_IMPLEMENTED = ERRORS + '.NotImplemented'
NOT_AVAILABLE = ERRORS + '.NotAvailable'
TUBE_PARAMETERS = CHANNEL_IFACE_TUBE + '.Parameters'
-TUBE_STATUS = CHANNEL_IFACE_TUBE + '.Status'
+TUBE_STATE = CHANNEL_IFACE_TUBE + '.State'
STREAM_TUBE_SERVICE = CHANNEL_TYPE_STREAM_TUBE + '.Service'
TUBE_CHANNEL_STATE_LOCAL_PENDING = 0