[Telepathy-commits] [telepathy-spec/master] Messages: name the Message_Part_Content_Map type
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Jan 6 10:09:34 PST 2009
Documenting it properly requires inventing a Message_Part_Index type,
so add that too.
This is needed because Telepathy-Qt4 can't cope with unnamed container
types, apart from the few that QtDBus special-cases. It also improves
our documentation.
Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
---
spec/Channel_Interface_Messages.xml | 36 +++++++++++++++++++++++++++++++++-
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/spec/Channel_Interface_Messages.xml b/spec/Channel_Interface_Messages.xml
index aa632ba..0604b3a 100644
--- a/spec/Channel_Interface_Messages.xml
+++ b/spec/Channel_Interface_Messages.xml
@@ -706,6 +706,36 @@ USA.</p>
</tp:member>
</tp:mapping>
+ <tp:simple-type type="u" name="Message_Part_Index">
+ <tp:docstring>
+ The index of a message part within a message.
+ </tp:docstring>
+ </tp:simple-type>
+
+ <tp:mapping name="Message_Part_Content_Map">
+ <tp:docstring>
+ A mapping from message part indexes to their content, as returned by
+ <tp:member-ref>GetPendingMessageContent</tp:member-ref>.
+ </tp:docstring>
+
+ <tp:member type="u" tp:type="Message_Part_Index" name="Part">
+ <tp:docstring>
+ Indexes into the array of <tp:type>Message_Part</tp:type>s that
+ represents a message. The "headers" part (which is not a valid
+ argument to GetPendingMessageContent) is considered to be part 0,
+ so the valid part numbers start at 1 (for the second message part).
+ </tp:docstring>
+ </tp:member>
+
+ <tp:member type="v" name="Content">
+ <tp:docstring>
+ The message part's content. The variant MUST contain either type
+ 's' or 'ay' (UTF-8 text string, or byte array), following the
+ same rules as for the value of the 'content' key in
+ the <tp:type>Message_Part</tp:type> mappings.
+ </tp:docstring>
+ </tp:member>
+ </tp:mapping>
<tp:simple-type type="s" name="Sent_Message_Token">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
@@ -915,7 +945,8 @@ USA.</p>
</tp:docstring>
</arg>
- <arg name="Parts" type="au" direction="in">
+ <arg name="Parts" type="au" direction="in"
+ tp:type="Message_Part_Index[]">
<tp:docstring>
The desired entries in the array of message parts, identified by
their position. The "headers" part (which is not a valid argument
@@ -924,7 +955,8 @@ USA.</p>
</tp:docstring>
</arg>
- <arg name="Content" type="a{uv}" direction="out">
+ <arg name="Content" type="a{uv}" direction="out"
+ tp:type="Message_Part_Content_Map">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>The content of the requested parts. The keys in this mapping
are positions in the array of message parts; the values are
--
1.5.6.5
More information about the Telepathy-commits
mailing list