~ubuntu-branches/ubuntu/utopic/telepathy-python/utopic

« back to all changes in this revision

Viewing changes to spec/Connection_Interface_Contact_Info.xml

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville
  • Date: 2009-06-16 11:23:44 UTC
  • mfrom: (1.1.14 upstream) (8.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090616112344-sslc71m4xns7uv8i
Tags: 0.15.8-1
* New upstream release.
* debian/control:
  - Change package priority to optional
  - Bump Standards-Version to 3.8.1 (no further changes)
  - Be more verbose in package extended description

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        </tp:docstring>
32
32
      </tp:member>
33
33
      <tp:member type="as" name="Parameters">
34
 
        <tp:docstring>
35
 
          A list of (lowercased) vCard type parameters applicable to this field.
36
 
          For example, a contact's preferred home address would have parameters
37
 
          'home' and 'pref'.
38
 
 
39
 
          <tp:rationale>
40
 
            This is a list of strings rather than a bitwise OR of enum members
41
 
            because vCard type parameters are essentially arbitrary strings.
 
34
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
35
          <p>A list of vCard type parameters applicable to this field, with their
 
36
            values. The type parameter names, and any values that are
 
37
            case-insensitive in vCard, MUST be in lower case. For example, a
 
38
            contact's preferred home address would have parameters
 
39
            'type=home' and 'type=pref'.</p>
 
40
 
 
41
          <tp:rationale>
 
42
            The type parameter 'type' is likely to be the most common, but
 
43
            there can be others, such as 'language=en'.
 
44
          </tp:rationale>
 
45
 
 
46
          <p>Characters which are required to be escaped in vCard type
 
47
            parameters should not be escaped in this list. For instance,
 
48
            a field "X-FOO;SEMICOLON=\;:bar" in a vCard would become
 
49
            ('x-foo', ['semicolon=;'], ['bar']) in this interface.</p>
 
50
 
 
51
          <tp:rationale>
 
52
            This avoids Telepathy UIs having to understand the escaping and
 
53
            unescaping rules for vCards. The type parameter name is not
 
54
            allowed (by RFC 2425) to contain an '=' character, so no ambiguity
 
55
            is introduced.
42
56
          </tp:rationale>
43
57
        </tp:docstring>
44
58
      </tp:member>
45
59
      <tp:member type="as" name="Field_Value">
46
 
        <tp:docstring>
47
 
          For unstructured vCard fields (such as 'fn', a formatted name
48
 
          field), a single-element array containing the field's value; for
49
 
          structured fields (such as 'adr', an address field), an array
50
 
          corresponding to the semicolon-separated elements of the field (with
51
 
          empty strings for empty elements).  A vCard field with multiple
52
 
          comma-separated values should be represented by several
53
 
          <tp:type>Contact_Info_Field</tp:type>s.  Characters which are
54
 
          required to be escaped in vCard values, such as semi-colons, should
55
 
          not be escaped in this list.
 
60
        <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
61
          <p>For unstructured vCard fields (such as 'fn', a formatted name
 
62
            field), a single-element array containing the field's value.</p>
 
63
 
 
64
          <p>For structured fields (such as 'adr', an address field), an array
 
65
            corresponding to the semicolon-separated elements of the field (with
 
66
            empty strings for empty elements).</p>
 
67
 
 
68
          <p>A vCard field with multiple comma-separated values, such as
 
69
            'nickname', should be represented by several
 
70
            <tp:type>Contact_Info_Field</tp:type>s.</p>
 
71
 
 
72
          <p>Characters which are required to be escaped in vCard values, such as
 
73
            semi-colons and newlines, should not be escaped in this list (e.g. if
 
74
            a value contains a newline, the data passed over D-Bus should
 
75
            contain a literal newline character).</p>
56
76
 
57
77
          <tp:rationale>
58
78
            An earlier draft of this interface split structured vCard fields
103
123
   BEGIN:vCard
104
124
   VERSION:3.0
105
125
   FN:Wee Ninja
106
 
   N:Ninja;Wee;;;-san
 
126
   N;LANGUAGE=ja:Ninja;Wee;;;-san
107
127
   ORG:Collabora, Ltd.;Human Resources\; Company Policy Enforcement
108
128
   ADR;TYPE=WORK,POSTAL,PARCEL:;;11 Kings Parade;Cambridge;Cambridgeshire
109
129
    ;CB2 1SJ;UK
111
131
   EMAIL;TYPE=INTERNET,PREF:wee.ninja@collabora.co.uk
112
132
   EMAIL;TYPE=INTERNET:wee.ninja@example.com
113
133
   URL:http://www.thinkgeek.com/geektoys/plush/8823/
 
134
   NICKNAME:HR Ninja,Enforcement Ninja
114
135
   END:vCard</pre>
115
136
 
116
137
        <p>would be represented by (in Python-like syntax):</p>
118
139
        <pre>
119
140
[
120
141
  ('fn', [], ['Wee Ninja']),
121
 
  ('n', [], ['Ninja', 'Wee', '', '', '-san']),
 
142
  ('n', ['language=ja'], ['Ninja', 'Wee', '', '', '-san']),
122
143
  ('org', [], ['Collabora, Ltd.', 'Human Resources; Company Policy Enforcement']),
123
 
  ('adr', ['work','postal','parcel'], ['','','11 Kings Parade','Cambridge',
124
 
                                       'Cambridgeshire','CB2 1SJ','UK']),
125
 
  ('tel', ['voice','work'], ['+44 1223 362967']),
126
 
  ('tel', ['voice','work'], ['+44 7700 900753']),
127
 
  ('email', ['internet','pref'], ['wee.ninja@collabora.co.uk']),
128
 
  ('email', ['internet'], ['wee.ninja@example.com']),
 
144
  ('adr', ['type=work','type=postal','type=parcel'],
 
145
   ['','','11 Kings Parade','Cambridge', 'Cambridgeshire','CB2 1SJ','UK']),
 
146
  ('tel', ['type=voice','type=work'], ['+44 1223 362967']),
 
147
  ('tel', ['type=voice','type=work'], ['+44 7700 900753']),
 
148
  ('email', ['type=internet','type=pref'], ['wee.ninja@collabora.co.uk']),
 
149
  ('email', ['type=internet'], ['wee.ninja@example.com']),
129
150
  ('url', [], ['http://www.thinkgeek.com/geektoys/plush/8823/']),
 
151
  ('nickname', [], ['HR Ninja']),
 
152
  ('nickname', [], ['Enforcement Ninja'])
130
153
]</pre>
131
154
      </tp:docstring>
132
155
    </tp:struct>
267
290
      </tp:enumvalue>
268
291
    </tp:enum>
269
292
 
 
293
    <tp:simple-type name="VCard_Field" type="s">
 
294
      <tp:docstring>
 
295
        A string naming a field in a vCard, such as "fn" or "adr". Although
 
296
        these are case-insensitive in RFC 2425, in Telepathy they MUST be
 
297
        normalized to lower case. In the terminology of RFC 2425 this is
 
298
        called a "type name", and corresponds to the "name" production given
 
299
        in the ABNF.
 
300
      </tp:docstring>
 
301
    </tp:simple-type>
 
302
 
 
303
    <tp:simple-type name="VCard_Type_Parameter" type="s"
 
304
      array-name="VCard_Type_Parameter_List">
 
305
      <tp:docstring>
 
306
        A type parameter as defined by RFC 2426, such as "type=cell" or
 
307
        "language=en".
 
308
      </tp:docstring>
 
309
    </tp:simple-type>
 
310
 
270
311
    <property name="ContactInfoFlags" type="u" access="read"
271
312
      tp:type="Contact_Info_Flag" tp:name-for-bindings="Contact_Info_Flags">
272
313
      <tp:docstring>
273
 
        An integer representing the bitwise-OR of flags on this channel. This
274
 
        property should be constant over the lifetime of a connection.
 
314
        An integer representing the bitwise-OR of flags on this connection.
 
315
        This property should be constant over the lifetime of a connection.
275
316
      </tp:docstring>
276
317
    </property>
277
318
 
280
321
        may be passed to <tp:member-ref>SetContactInfo</tp:member-ref> on this
281
322
        Connection.</tp:docstring>
282
323
 
283
 
      <tp:member type="s" name="Name">
 
324
      <tp:member type="s" name="Name" tp:type="VCard_Field">
284
325
        <tp:docstring>A vCard field name, such as 'tel'.</tp:docstring>
285
326
      </tp:member>
286
327
 
287
 
      <tp:member type="as" name="Parameters">
 
328
      <tp:member type="as" name="Parameters" tp:type="VCard_Type_Parameter[]">
288
329
        <tp:docstring>The set of vCard type parameters which may be set on this
289
330
          field. If this list is empty and the
290
331
          Contact_Info_Field_Flag_Parameters_Mandatory