diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2011-01-04 08:49:52 +0000 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-10-12 10:49:09 +0100 |
commit | 81bbbae26a884771b0cd7be5da742dc5b7a2b4e7 (patch) | |
tree | 03eef543e806cf9875eb910a18b3c25de1f30c59 /extensions | |
parent | 5fe7678d2bd0c5af56adc753d7eb97b47b840b1a (diff) |
extensions: update to latest Room draft and add Chan.I.Subject
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Channel_Interface_Room.xml | 168 | ||||
-rw-r--r-- | extensions/Channel_Interface_Subject.xml | 163 | ||||
-rw-r--r-- | extensions/Makefile.am | 3 | ||||
-rw-r--r-- | extensions/all.xml | 1 |
4 files changed, 188 insertions, 147 deletions
diff --git a/extensions/Channel_Interface_Room.xml b/extensions/Channel_Interface_Room.xml index 498122dd2..28491f43f 100644 --- a/extensions/Channel_Interface_Room.xml +++ b/extensions/Channel_Interface_Room.xml @@ -61,7 +61,7 @@ <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> = <code>"#telepathy"</code>, - <tp:member-ref>RoomID</tp:member-ref> = <code>"#telepathy"</code>, + <tp:member-ref>RoomName</tp:member-ref> = <code>"#telepathy"</code>, <tp:member-ref>Server</tp:member-ref> = <code>""</code>, indicating that the room has a human-readable identifier, and is not confined to a particular server on the network. @@ -82,7 +82,7 @@ <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> = <code>"0xdeadbeef"</code>, - <tp:member-ref>RoomID</tp:member-ref> = <code>""</code>, + <tp:member-ref>RoomName</tp:member-ref> = <code>""</code>, <tp:member-ref>Server</tp:member-ref> = <code>""</code>, indicating that the room has an identifier but no human-readable name. </li> @@ -91,7 +91,7 @@ <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref> = <code>None</code>, - <tp:member-ref>RoomID</tp:member-ref> = <code>""</code>, + <tp:member-ref>RoomName</tp:member-ref> = <code>""</code>, <tp:member-ref>Server</tp:member-ref> = <code>""</code>, indicating that the room has neither an identifier (so it cannot be re-joined later) nor a human-readable name. @@ -105,7 +105,7 @@ <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> = <code>"jdev@conference.jabber.org"</code>, - <tp:member-ref>RoomID</tp:member-ref> = <code>"jdev"</code>, + <tp:member-ref>RoomName</tp:member-ref> = <code>"jdev"</code>, <tp:member-ref>Server</tp:member-ref> = <code>"conference.jabber.org"</code>. </li> @@ -116,7 +116,7 @@ <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> = <code>"private-chat-11111x1x-11xx-111x-1111-111x1xx11x11@groupchat.google.com"</code>, - <tp:member-ref>RoomID</tp:member-ref> = <code>""</code>, + <tp:member-ref>RoomName</tp:member-ref> = <code>""</code>, <tp:member-ref>Server</tp:member-ref> = <code>"groupchat.google.com"</code>, indicating that the room has a persistent identifier, no human-readable name, and is hosted by a @@ -131,7 +131,7 @@ <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> = <code>"lrcgsnthzvwm@conference.jabber.org"</code>, - <tp:member-ref>RoomID</tp:member-ref> = <code>""</code>, + <tp:member-ref>RoomName</tp:member-ref> = <code>""</code>, <tp:member-ref>Server</tp:member-ref> = <code>"conference.jabber.org"</code>, indicating that the room has a persistent identifier, no human-readable name, and is hosted by a @@ -165,7 +165,7 @@ >TargetHandle</tp:dbus-ref>.</p> <p>If, like IRC, the room identifiers are also human-readable, the - RCCs should also include RoomID in <var>Allowed_Properties</var>:</p> + RCCs should also include RoomName in <var>Allowed_Properties</var>:</p> <blockquote> <pre> @@ -179,7 +179,7 @@ >TargetID</tp:dbus-ref>, ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel" >TargetHandle</tp:dbus-ref>, - ...<tp:member-ref>RoomID</tp:member-ref> + ...<tp:member-ref>RoomName</tp:member-ref> ] ), @@ -187,14 +187,14 @@ >ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type" >Text</tp:dbus-ref> }, - Allowed = [ ...<tp:member-ref>RoomID</tp:member-ref>, + Allowed = [ ...<tp:member-ref>RoomName</tp:member-ref>, ] )</pre></blockquote> - <p>Requests may specify the RoomID in place of + <p>Requests may specify the RoomName in place of <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref> - . Note how <tp:member-ref>RoomID</tp:member-ref> appears + . Note how <tp:member-ref>RoomName</tp:member-ref> appears in <var>Allowed_Properties</var> of a different RCC because when <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel" >TargetHandleType</tp:dbus-ref> is omitted (or is None), both @@ -202,7 +202,7 @@ >TargetHandle</tp:dbus-ref> and <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel" >TargetID</tp:dbus-ref> must also be omitted. - <tp:member-ref>RoomID</tp:member-ref> is allowed in conjuction + <tp:member-ref>RoomName</tp:member-ref> is allowed in conjuction with <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref> @@ -221,7 +221,7 @@ fallback conference server is specified on jabber connections in gabble.</p> - <p>If the protocol supports unnamed rooms, <tp:member-ref>RoomID</tp:member-ref> + <p>If the protocol supports unnamed rooms, <tp:member-ref>RoomName</tp:member-ref> should be fixed to the empty string, and <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref> should be None:</p> @@ -233,7 +233,7 @@ >Text</tp:dbus-ref>, ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel" >TargetHandleType</tp:dbus-ref>: None, - ...<tp:member-ref>RoomID</tp:member-ref>: "", + ...<tp:member-ref>RoomName</tp:member-ref>: "", }, Allowed = [ ] )</pre></blockquote> @@ -242,7 +242,7 @@ <p>When explicitly joining a room, the CM cannot know whether the room ID is unique or not. As a result, if this is the case, adding an - empty string <tp:member-ref>RoomID</tp:member-ref> into the channel + empty string <tp:member-ref>RoomName</tp:member-ref> into the channel request will ensure the CM knows. For example:</p> <blockquote> @@ -250,16 +250,16 @@ { ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>, ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>: Room, ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>: "qwerasdfzxcv@conference.jabber.org", - ...<tp:member-ref>RoomID</tp:member-ref>: "" + ...<tp:member-ref>RoomName</tp:member-ref>: "" }</pre></blockquote> - <p>If <tp:member-ref>RoomID</tp:member-ref> features in + <p>If <tp:member-ref>RoomName</tp:member-ref> features in <var>Allowed_Properties</var> then the only value allowed in conjunction with <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> or <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandle</tp:dbus-ref> is the empty string. Requests with conflicting <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref> - and <tp:member-ref>RoomID</tp:member-ref> properties + and <tp:member-ref>RoomName</tp:member-ref> properties will fail with InvalidArgument.</p> <p>To create a XEP-0045 §10.1.4 uniquely-named room channel @@ -269,7 +269,7 @@ <blockquote> <pre> { ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>, - ...<tp:member-ref>RoomID</tp:member-ref>: "" + ...<tp:member-ref>RoomName</tp:member-ref>: "" ...<tp:member-ref>Server</tp:member-ref>: "conference.jabber.org" }</pre> </blockquote> @@ -282,39 +282,19 @@ { ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">ChannelType</tp:dbus-ref>: ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type">Text</tp:dbus-ref>, ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetHandleType</tp:dbus-ref>: Room, ...<tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel">TargetID</tp:dbus-ref>: "kajsdhkajshdfjkshdfjkhs@conference.jabber.org", - ...<tp:member-ref>RoomID</tp:member-ref>: "" + ...<tp:member-ref>RoomName</tp:member-ref>: "" ...<tp:member-ref>Server</tp:member-ref>: "conference.jabber.org" }</pre> </blockquote> <p>The CM will have received the unique room name (kajsdhkajshdfjkshdfjkhs) and then created a room with such a name on the said server. The empty - <tp:member-ref>RoomID</tp:member-ref> property shows that the room name + <tp:member-ref>RoomName</tp:member-ref> property shows that the room name is not human-readable.</p> </tp:docstring> - <method name="SetSubject" tp:name-for-bindings="Set_Subject"> - <arg direction="in" type="s" name="Subject"> - <tp:docstring>The new subject.</tp:docstring> - </arg> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>Set the room's subject. Clients SHOULD look at the subject - flags before calling this method as the user might not have - permission to set the subject.</p> - - <p>Clients SHOULD NOT assume success if no errors are raised - by calling this method, but instead should listen to the - <tp:member-ref>SubjectChanged</tp:member-ref> signal for - change notification.</p> - </tp:docstring> - <tp:possible-errors> - <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/> - <tp:error name="org.freedesktop.Telepathy.Error.NotCapable"/> - </tp:possible-errors> - </method> - - <property name="RoomID" tp:name-for-bindings="Room_ID" type="s" + <property name="RoomName" tp:name-for-bindings="Room_Name" type="s" access="read"> <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> <p>The human-readable identifier of a chat room. Note that if @@ -349,110 +329,6 @@ </tp:docstring> </property> - <tp:struct name="Room_Subject"> - <tp:docstring> - A struct representing the subject of a room channel. - </tp:docstring> - <tp:member type="s" name="Subject"> - <tp:docstring> - A human-readable description of the current subject of - conversation in the channel, similar to /topic in IRC. - </tp:docstring> - </tp:member> - <tp:member type="s" name="Actor"> - <tp:docstring> - A normalized contact ID representing who last modified the - subject, or the empty string if it is not known. - </tp:docstring> - </tp:member> - <tp:member type="x" tp:type="Unix_Timestamp64" name="Timestamp"> - <tp:docstring> - A unix timestamp indicating when the subject was last modified. - </tp:docstring> - </tp:member> - <tp:member type="u" tp:type="Room_Subject_Flags" name="Flags"> - <tp:docstring> - A bitwise OR of the flags applicable to this channel's - subject. - </tp:docstring> - </tp:member> - </tp:struct> - - <property name="Subject" tp:name-for-bindings="Subject" - type="(ssxu)" tp:type="Room_Subject" access="read"> - <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> - <p>The subject on the room such as the topic in an IRC channel, - or the room name in XMPP MUCs. In protocols which do not support - subjects (like MSN), this property should be ("", "", 0, 0).</p> - - <tp:rationale>This property replaces the subject, subject-contact, and - subject-timestamp Telepathy properties of Text channels, as Telepathy - properties are soon to be deprecated completely.</tp:rationale> - - <p>Change notification for this property is provided by the - <tp:member-ref>SubjectChanged</tp:member-ref> signal.</p> - - <p>This property may change during the lifetime of the channel and - MUST not be included in a channel request.</p> - </tp:docstring> - </property> - - <signal name="SubjectChanged" tp:name-for-bindings="Subject_Changed"> - <arg name="Subject" type="s"> - <tp:docstring> - The new subject string. - </tp:docstring> - </arg> - <arg name="Actor" type="s"> - <tp:docstring> - A normalized contact ID representing who last modified the - subject, or the empty string if it is not known. - </tp:docstring> - </arg> - <arg name="Timestamp" type="x" tp:type="Unix_Timestamp64"> - <tp:docstring> - A unix timestamp indicating when the subject was last - modified. - </tp:docstring> - </arg> - <arg name="Flags" type="u" tp:type="Room_Subject_Flags"> - <tp:docstring> - A bitwise OR of the flags applicable to this channel's - subject. - </tp:docstring> - </arg> - <tp:docstring> - Emitted when the <tp:member-ref>Subject</tp:member-ref> - property is changed. - </tp:docstring> - </signal> - - <tp:flags name="Room_Subject_Flags" - value-prefix="Room_Subject_Flag" type="u"> - <tp:docstring> - Flags indicating capabilities regarding the room subject. - </tp:docstring> - - <tp:flag suffix="Present" value="1"> - <tp:docstring> - A subject exists on this channel. Protocols which do not - have the concept of room subjects MUST NOT have this flag - set as an indication to clients that no notice should be - taken of the <tp:member-ref>Subject</tp:member-ref> - property. - </tp:docstring> - </tp:flag> - - <tp:flag suffix="Can_Set" value="2"> - <tp:docstring> - The <tp:member-ref>Subject</tp:member-ref> property can be - set by the user by calling - <tp:member-ref>SetSubject</tp:member-ref>. If this flag is - set, then Present MUST also be set. - </tp:docstring> - </tp:flag> - </tp:flags> - </interface> </node> <!-- vim:set sw=2 sts=2 et ft=xml: --> diff --git a/extensions/Channel_Interface_Subject.xml b/extensions/Channel_Interface_Subject.xml new file mode 100644 index 000000000..60d37a31a --- /dev/null +++ b/extensions/Channel_Interface_Subject.xml @@ -0,0 +1,163 @@ +<?xml version="1.0" ?> +<node name="/Channel_Interface_Subject" + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0"> + + <tp:copyright>Copyright © 2010 Collabora Ltd.</tp:copyright> + <tp:license xmlns="http://www.w3.org/1999/xhtml"> + <p>This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version.</p> + + <p>This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details.</p> + + <p>You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301, USA.</p> + </tp:license> + + <interface name="org.freedesktop.Telepathy.Channel.Interface.Subject.DRAFT" + tp:causes-havoc="experimental"> + <tp:requires interface="org.freedesktop.Telepathy.Channel"/> + <tp:added version="0.21.UNRELEASED">(draft 1)</tp:added> + + <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> + <p>An interface channels can implement to support subjects. Most + of the time this will be implemented by Room channels, but some + protocols support subjects in 1-to-1 chats (such as Skype).</p> + </tp:docstring> + + <method name="SetSubject" tp:name-for-bindings="Set_Subject"> + <arg direction="in" type="s" name="Subject"> + <tp:docstring>The new subject.</tp:docstring> + </arg> + <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> + <p>Set the room's subject. Clients SHOULD look at the subject + flags before calling this method as the user might not have + permission to set the subject.</p> + + <p>Clients SHOULD NOT assume success if no errors are raised + by calling this method, but instead should listen to the + <tp:member-ref>SubjectChanged</tp:member-ref> signal for + change notification.</p> + </tp:docstring> + <tp:possible-errors> + <tp:error name="org.freedesktop.Telepathy.Error.NotImplemented"/> + <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/> + </tp:possible-errors> + </method> + + <tp:struct name="Room_Subject"> + <tp:docstring> + A struct representing the subject of a room channel. + </tp:docstring> + <tp:member type="s" name="Subject"> + <tp:docstring> + A human-readable description of the current subject of + conversation in the channel, similar to /topic in IRC. + </tp:docstring> + </tp:member> + <tp:member type="s" name="Actor"> + <tp:docstring> + A normalized contact ID representing who last modified the + subject, or the empty string if it is not known. + </tp:docstring> + </tp:member> + <tp:member type="x" tp:type="Unix_Timestamp64" name="Timestamp"> + <tp:docstring> + A unix timestamp indicating when the subject was last modified. + </tp:docstring> + </tp:member> + <tp:member type="u" tp:type="Room_Subject_Flags" name="Flags"> + <tp:docstring> + A bitwise OR of the flags applicable to this channel's + subject. + </tp:docstring> + </tp:member> + </tp:struct> + + <property name="Subject" tp:name-for-bindings="Subject" + type="(ssxu)" tp:type="Room_Subject" access="read"> + <tp:docstring xmlns="http://www.w3.org/1999/xhtml"> + <p>The subject on the room such as the topic in an IRC channel, + or the room name in XMPP MUCs. In protocols which do not support + subjects (like MSN), this property should be ("", "", 0, 0).</p> + + <tp:rationale>This property replaces the subject, subject-contact, and + subject-timestamp Telepathy properties of Text channels, as Telepathy + properties are soon to be deprecated completely.</tp:rationale> + + <p>Change notification for this property is provided by the + <tp:member-ref>SubjectChanged</tp:member-ref> signal.</p> + + <p>This property may change during the lifetime of the channel and + MUST not be included in a channel request.</p> + </tp:docstring> + </property> + + <signal name="SubjectChanged" tp:name-for-bindings="Subject_Changed"> + <arg name="Subject" type="s"> + <tp:docstring> + The new subject string. + </tp:docstring> + </arg> + <arg name="Actor" type="s"> + <tp:docstring> + A normalized contact ID representing who last modified the + subject, or the empty string if it is not known. + </tp:docstring> + </arg> + <arg name="Timestamp" type="x" tp:type="Unix_Timestamp64"> + <tp:docstring> + A unix timestamp indicating when the subject was last + modified. + </tp:docstring> + </arg> + <arg name="Flags" type="u" tp:type="Room_Subject_Flags"> + <tp:docstring> + A bitwise OR of the flags applicable to this channel's + subject. + </tp:docstring> + </arg> + <tp:docstring> + Emitted when the <tp:member-ref>Subject</tp:member-ref> + property is changed. + </tp:docstring> + </signal> + + <tp:flags name="Room_Subject_Flags" + value-prefix="Room_Subject_Flag" type="u"> + <tp:docstring> + Flags indicating capabilities regarding the room subject. + </tp:docstring> + + <tp:flag suffix="Present" value="1"> + <tp:docstring> + A subject exists on this channel. Protocols which do not + have the concept of room subjects MUST NOT have this flag + set as an indication to clients that no notice should be + taken of the <tp:member-ref>Subject</tp:member-ref> + property. Note that this flag only allows clients to + distinguish between protocols which support room subjects + and protocols which do not. The presence of this flag + MUST NOT change. + </tp:docstring> + </tp:flag> + + <tp:flag suffix="Can_Set" value="2"> + <tp:docstring> + The <tp:member-ref>Subject</tp:member-ref> property can be + set by the user by calling + <tp:member-ref>SetSubject</tp:member-ref>. If this flag is + set, then Present MUST also be set. + </tp:docstring> + </tp:flag> + </tp:flags> + + </interface> +</node> +<!-- vim:set sw=2 sts=2 et ft=xml: --> diff --git a/extensions/Makefile.am b/extensions/Makefile.am index 3a1c676a3..52f0eef90 100644 --- a/extensions/Makefile.am +++ b/extensions/Makefile.am @@ -9,7 +9,8 @@ EXTRA_DIST = \ Gabble_Plugin_Test.xml \ OLPC_Activity_Properties.xml \ OLPC_Buddy_Info.xml \ - Channel_Interface_Room.xml + Channel_Interface_Room.xml \ + Channel_Interface_Subject.xml noinst_LTLIBRARIES = libgabble-extensions.la diff --git a/extensions/all.xml b/extensions/all.xml index 85380615c..71d1ddf3a 100644 --- a/extensions/all.xml +++ b/extensions/all.xml @@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p> <xi:include href="Connection_Interface_Gabble_Decloak.xml"/> <xi:include href="Connection_Future.xml"/> <xi:include href="Channel_Interface_Room.xml"/> +<xi:include href="Channel_Interface_Subject.xml"/> <xi:include href="Gabble_Plugin_Gateways.xml"/> <xi:include href="Gabble_Plugin_Test.xml"/> |