[Telepathy-commits] [telepathy-spec/master] ContactInfo: rename Flags to Parameters as per RFC 2426, and replace Mandatory with a set of flags
Simon McVittie
simon.mcvittie at collabora.co.uk
Fri Jan 16 09:22:27 PST 2009
This allows for 31 bits of future expansion, and hopefully reduces
confusion.
---
spec/Connection_Interface_Contact_Info.xml | 42 ++++++++++++++++++---------
1 files changed, 28 insertions(+), 14 deletions(-)
diff --git a/spec/Connection_Interface_Contact_Info.xml b/spec/Connection_Interface_Contact_Info.xml
index 9db0fcc..782d524 100644
--- a/spec/Connection_Interface_Contact_Info.xml
+++ b/spec/Connection_Interface_Contact_Info.xml
@@ -283,15 +283,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<tp:docstring>A vCard field name, such as 'tel'.</tp:docstring>
</tp:member>
- <tp:member type="as" name="Flags">
- <tp:docstring>The set of vCard flags which may be set on this
- field. If this list is empty and the Mandatory property is unset, any
- vCard flags may be used.</tp:docstring>
+ <tp:member type="as" name="Parameters">
+ <tp:docstring>The set of vCard type parameters which may be set on this
+ field. If this list is empty and the
+ Contact_Info_Field_Flag_Parameters_Mandatory
+ flag is unset, any vCard type parameters may be used.</tp:docstring>
</tp:member>
- <tp:member type="b" name="Mandatory">
- <tp:docstring>True if those flags must be set on this field, as opposed
- to being optional.</tp:docstring>
+ <tp:member type="u" name="Flags" tp:type="Contact_Info_Field_Flags">
+ <tp:docstring>Flags describing the behaviour of this
+ field.</tp:docstring>
</tp:member>
<tp:member type="u" name="Max">
@@ -301,7 +302,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:member>
</tp:struct>
- <property name="SupportedFields" type="a(sasbu)" tp:type="Field_Spec[]"
+ <property name="SupportedFields" type="a(sasuu)" tp:type="Field_Spec[]"
access="read" tp:name-for-bindings="Supported_Fields">
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>A list of field specifications describing the kinds of fields which may
@@ -321,16 +322,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
<pre>
[
- ('tel', ['home'], True, 1),
- ('tel', ['cell'], True, 1),
- ('adr', [], True, 1),
- ('bday', [], True, 1),
- ('email', ['internet'], True, 1),
+ ('tel', ['home'], Parameters_Mandatory, 1),
+ ('tel', ['cell'], Parameters_Mandatory, 1),
+ ('adr', [], Parameters_Mandatory, 1),
+ ('bday', [], Parameters_Mandatory, 1),
+ ('email', ['internet'], Parameters_Mandatory, 1),
]</pre>
<p>A protocol which allows users to specify up to four phone numbers,
which may be labelled as personal and/or mobile, would set this
- property to <code>[ ('tel', ['home', 'cell'], False, 4), ]</code>.</p>
+ property to <code>[ ('tel', ['home', 'cell'], 0, 4), ]</code>.</p>
<tp:rationale>
<p>Studying existing IM protocols shows that in practice protocols
@@ -341,6 +342,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</
</tp:docstring>
</property>
+ <tp:flags name="Contact_Info_Field_Flags"
+ value-prefix="Contact_Info_Field_Flag" type="u">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ Flags describing the behaviour of a vCard field.
+ </tp:docstring>
+ <tp:flag suffix="Parameters_Mandatory" value="1">
+ <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
+ If present, exactly the parameters indicated must be set on this
+ field. If absent, any subset of the parameters indicated may be used.
+ </tp:docstring>
+ </tp:flag>
+ </tp:flags>
+
<tp:docstring xmlns="http://www.w3.org/1999/xhtml">
<p>An interface for requesting information about a contact on a given
connection. Information is represented as a list of
--
1.5.6.5
More information about the Telepathy-commits
mailing list