~ubuntu-branches/ubuntu/maverick/telepathy-glib/maverick

« back to all changes in this revision

Viewing changes to spec/Connection_Interface_Forwarding.xml

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2010-05-25 16:57:39 UTC
  • mfrom: (1.6.2 upstream) (30.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100525165739-kted5mhm904f8lwj
Tags: 0.11.6-1
* New upstream version
  - requires gtk-doc 1.15
  - requires gobject-introspection 0.6.11
  - new ABI, API
* Merge from experimental
  - add gir1.0-telepathyglib-0.12 binary package

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" ?>
2
 
<node name="/Connection_Interface_Forwarding" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
3
 
  <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
4
 
  <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
5
 
  <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
 
2
<node name="/Connection_Interface_Forwarding"
 
3
  xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
 
4
 
 
5
  <tp:copyright>Copyright © 2005-2010 Nokia Corporation</tp:copyright>
 
6
  <tp:copyright>Copyright © 2005-2010 Collabora Ltd.</tp:copyright>
 
7
  <tp:copyright>Copyright © 2006 INdT </tp:copyright>
6
8
  <tp:license xmlns="http://www.w3.org/1999/xhtml">
7
9
    <p>This library is free software; you can redistribute it and/or
8
 
modify it under the terms of the GNU Lesser General Public
9
 
License as published by the Free Software Foundation; either
10
 
version 2.1 of the License, or (at your option) any later version.</p>
11
 
 
12
 
<p>This library is distributed in the hope that it will be useful,
13
 
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15
 
Lesser General Public License for more details.</p>
16
 
 
17
 
<p>You should have received a copy of the GNU Lesser General Public
18
 
License along with this library; if not, write to the Free Software
19
 
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
 
10
      modify it under the terms of the GNU Lesser General Public
 
11
      License as published by the Free Software Foundation; either
 
12
      version 2.1 of the License, or (at your option) any later version.</p>
 
13
 
 
14
    <p>This library is distributed in the hope that it will be useful,
 
15
      but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
      Lesser General Public License for more details.</p>
 
18
 
 
19
    <p>You should have received a copy of the GNU Lesser General Public
 
20
      License along with this library; if not, write to the Free Software
 
21
      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 
22
      02110-1301, USA.</p>
20
23
  </tp:license>
21
 
  <interface name="org.freedesktop.Telepathy.Connection.Interface.Forwarding"
22
 
    tp:causes-havoc='not well-tested'>
23
 
    <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
24
 
    <signal name="ForwardingChanged" tp:name-for-bindings="Forwarding_Changed">
25
 
      <arg name="Forward_To" type="u" tp:type="Contact_Handle">
26
 
        <tp:docstring>
27
 
          An integer contact handle to forward communication to
28
 
        </tp:docstring>
29
 
      </arg>
30
 
      <tp:docstring>
31
 
        Emitted when the forwarding contact handle for this connection has been
32
 
        changed. An zero handle indicates forwarding is disabled.
33
 
      </tp:docstring>
 
24
 
 
25
  <interface name="org.freedesktop.Telepathy.Connection.Interface.Forwarding.DRAFT"
 
26
    tp:causes-havoc="experimental">
 
27
    <tp:added version="0.19.6">(draft version, not API-stable)</tp:added>
 
28
 
 
29
    <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
30
      <p>This connection interface is for protocols that are capable of
 
31
        signaling to remote contacts that incoming communication channels
 
32
        should be instead sent to a separate contact.  This might apply to
 
33
        things such as call forwarding, for example.</p>
 
34
 
 
35
      <p>In some cases, a CM may register forwarding rules with an external
 
36
        service; in those cases, it will never see the incoming channel, and
 
37
        the forwarding will happen automatically.</p>
 
38
 
 
39
      <p>In other cases, the CM will handle the forwarding itself.  When an
 
40
        incoming channel is detected, the status of the local user will
 
41
        determine whether or not a forwarding rule is matched.  For some
 
42
        rules, this MAY happen immediately (ie, if the user is Busy); for
 
43
        others, there MAY be a timeout (in seconds) that must expire
 
44
        before the forwarding rule is matched (the timeout is specified
 
45
        by the first element in the <tp:type>Forwarding_Rule_Entry</tp:type> list).</p>
 
46
 
 
47
      <p>Once a forwarding rule is matched and any necessary timeouts have
 
48
        expired, the CM can forward the incoming channel to the specified
 
49
        handle.  If for whatever reason the remote handle does not accept
 
50
        the channel AND the CM supports multiple forwarding entries AND
 
51
        any necessary timeouts have expired (specified by the next entry
 
52
        in the list), the CM can forward the incoming channel to the next
 
53
        handle in the entry list.  This continues until the list is
 
54
        exhausted, or the incoming channel is accepted.</p>
 
55
 
 
56
      <p>Note that the rule matches are only for the first entry in the
 
57
        in the forwarding rule list.  Once the incoming channel has been
 
58
        forwarded, the next entry in the list (assuming one exists and
 
59
        the contact that the channel has been forwarded to does not respond
 
60
        after any necessary timeouts) is used regardless of the status of
 
61
        the forwarded channel.  The initial match rule might have been
 
62
        Busy, whereas the contact that the channel has been forwarded to
 
63
        might be offline.  Even in this case, the Busy list is still
 
64
        traversed until the channel is handled (or there are no more
 
65
        forwarding entries in the list).</p>
 
66
 
 
67
      <p>For example, assuming the following dict for Forwarding_Rules:</p>
 
68
      <pre>
 
69
        ForwardingRules = {
 
70
          Busy: ( initial-timeout: 30, [
 
71
            (handle: 3, timeout: 15),
 
72
            (handle: 5, timeout: 20)
 
73
          ]),
 
74
          NoReply: ( initial-timeout: 15, [
 
75
            (handle: 5, timeout: 30),
 
76
            (handle: 3, timeout: 20)
 
77
          ])
 
78
        }</pre>
 
79
 
 
80
      <p>We can imagine a scenario where an incoming channel is detected,
 
81
        the media stream is available (ie, not Busy),
 
82
        and the local user is online.  While the CM is waiting for the local user to
 
83
        accept the channel, it looks at NoReply's first timeout value.  After 15s if
 
84
        the local user hasn't accepted, the CM forwards the channel to Handle #5.  The
 
85
        CM then waits 30s for Handle #5 to accept the channel.  If after 30s it does
 
86
        not, the CM forwards the incoming channel to Handle #3, which will have
 
87
        20s to accept the channel.</p>
 
88
    </tp:docstring>
 
89
 
 
90
    <tp:enum name="Forwarding_Condition" type="u">
 
91
      <tp:docstring>
 
92
        The various forwarding conditions that are supported by this interface.
 
93
        In general, the conditions should not overlap; it should be very clear
 
94
        which rule would be chosen given a CM's behavior with an incoming
 
95
        channel.  The exception to this is Unconditional,
 
96
        which will override all other rules.
 
97
      </tp:docstring>
 
98
 
 
99
      <tp:enumvalue value="0" suffix="Unconditional">
 
100
        <tp:docstring>
 
101
          Incoming channels should always be forwarded.  Note that setting this
 
102
          will override any other rules.  If not set, other rules will
 
103
          be checked when an incoming communication channel is detected.
 
104
        </tp:docstring>
 
105
      </tp:enumvalue>
 
106
 
 
107
      <tp:enumvalue value="1" suffix="Busy">
 
108
        <tp:docstring>
 
109
          <p>The incoming channel should be forwarded if a busy signal is
 
110
            detected.  What defines "Busy" is CM-specific (perhaps a single
 
111
            resource is already in use, or a user's status is set to Busy
 
112
            <tp:type>Connection_Presence_Type</tp:type>).</p>
 
113
          <p>If initial timeout is specified for Busy condition and call
 
114
            waiting is not supported by the service, the timeout will be
 
115
            ignored.</p>
 
116
       </tp:docstring>
 
117
      </tp:enumvalue>
 
118
 
 
119
      <tp:enumvalue value="2" suffix="No_Reply">
 
120
        <tp:docstring>
 
121
          The incoming channel should be forwarded if the local user doesn't
 
122
          accept it within the specified amount of time.
 
123
        </tp:docstring>
 
124
      </tp:enumvalue>
 
125
 
 
126
      <tp:enumvalue value="3" suffix="Not_Reachable">
 
127
        <tp:docstring>
 
128
          The incoming channel should be forwarded if the user is offline.
 
129
          This could be a manual setting (the user has chosen to set their
 
130
          presence to offline or invisible) or something specified by the
 
131
          underlying network (the user is not within range of a cell tower).
 
132
        </tp:docstring>
 
133
      </tp:enumvalue>
 
134
    </tp:enum>
 
135
 
 
136
    <tp:struct name="Forwarding_Rule_Entry"
 
137
        array-name="Forwarding_Rule_Entry_List">
 
138
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
139
        <p>A forwarding rule entry.  These MAY be chained together
 
140
          for CMs that support chaining of forwards (in other words,
 
141
          a forwarding rule may have multiple entries; if the contact
 
142
          in the first entry doesn't respond, the incoming channel
 
143
          might be forwarded to the contact in the second entry).</p>
 
144
 
 
145
        <p>For CMs and protocols that don't support chaining of
 
146
          entries, only the first entry would be used.</p>
 
147
      </tp:docstring>
 
148
 
 
149
      <tp:member type="u" name="Timeout">
 
150
        <tp:docstring>
 
151
          <p>The length of time (in seconds) to wait the contact to respond
 
152
            to the forwarded channel.  This MAY be ignored by the CM if it
 
153
            isn't supported by the underlying network/protocol for the
 
154
            specific status of the remote contact (for example, a GSM call
 
155
            that is forwarded may return Not_Reachable immediately without
 
156
            waiting for the timeout value to expire).</p>
 
157
          <p>A value of 0 means the condition can match immediately. A
 
158
            value of MAX_UINT32 means that the CM's default should be
 
159
            used.</p>
 
160
        </tp:docstring>
 
161
      </tp:member>
 
162
 
 
163
      <tp:member type="u" tp:type="Contact_Handle" name="Handle">
 
164
        <tp:docstring>
 
165
          The contact to forward an incoming channel to. If the handle
 
166
          doesn't point to anything (e.g. points to a phone number that
 
167
          doesn't exist), the entry SHOULD be skipped.
 
168
        </tp:docstring>
 
169
      </tp:member>
 
170
    </tp:struct>
 
171
 
 
172
    <tp:struct name="Forwarding_Rule_Chain">
 
173
      <tp:docstring>
 
174
        A chain of forwarding rules and an initial timeout after which
 
175
        the rules are applied.
 
176
      </tp:docstring>
 
177
 
 
178
      <tp:member type="u" name="InitialTimeout">
 
179
        <tp:docstring>Initial timeout for the rule.</tp:docstring>
 
180
      </tp:member>
 
181
 
 
182
      <tp:member type="a(uu)" name="Rules" tp:type="Forwarding_Rule_Entry[]">
 
183
        <tp:docstring>The forwarding targets (an array of type
 
184
          <tp:type>Forwarding_Rule_Entry</tp:type>).
 
185
        </tp:docstring>
 
186
      </tp:member>
 
187
    </tp:struct>
 
188
 
 
189
    <tp:mapping name="Forwarding_Rule_Map" array-name="">
 
190
      <tp:docstring>A dictionary whose keys are forwarding conditions and
 
191
        whose values are <tp:type>Forwarding_Rule_Chain</tp:type> structs.
 
192
      </tp:docstring>
 
193
 
 
194
      <tp:member type="u" tp:type="Forwarding_Condition" name="Condition" />
 
195
      <tp:member type="(ua(uu))" tp:type="Forwarding_Rule_Chain"
 
196
          name="Rule_Chain" />
 
197
    </tp:mapping>
 
198
 
 
199
    <tp:mapping name="Supported_Forwarding_Conditions_Map" array-name="">
 
200
      <tp:docstring>A dictionary whose keys are forwarding conditions and
 
201
        whose values are maximum number of <tp:type>Forwarding_Rule_Entry</tp:type>
 
202
        for the condition.
 
203
      </tp:docstring>
 
204
      <tp:member type="u" tp:type="Forwarding_Condition" name="Condition" />
 
205
      <tp:member type="u" name="Chain_Length" />
 
206
    </tp:mapping>
 
207
 
 
208
    <property name="SupportedForwardingConditions" type="a{uu}" access="read"
 
209
      tp:type="Supported_Forwarding_Conditions_Map"
 
210
      tp:name-for-bindings="Supported_Forwarding_Conditions">
 
211
      <tp:docstring>
 
212
        <p>
 
213
          A map of forwarding conditions supported on this connection to
 
214
          maximum number of <tp:type>Forwarding_Rule_Entry</tp:type>
 
215
          supported for the specific condition.
 
216
          <tp:rationale>
 
217
            When forwarding is done by the provider, different providers
 
218
            might support different chain sizes, or provider and local
 
219
            implementation chain sizes might differ.
 
220
          </tp:rationale>
 
221
        </p>
 
222
      </tp:docstring>
 
223
    </property>
 
224
 
 
225
    <property name="ForwardingRules" type="a{u(ua(uu))}" access="read"
 
226
      tp:type="Forwarding_Rule_Map" tp:name-for-bindings="Forwarding_Rules">
 
227
      <tp:docstring>
 
228
        <p>The current forwarding rules that are enabled for this connection.
 
229
          Forwarding rules each contain an array of type
 
230
          <tp:type>Forwarding_Rule_Entry</tp:type>.</p>
 
231
      </tp:docstring>
 
232
    </property>
 
233
 
 
234
    <signal name="ForwardingRuleChanged"
 
235
            tp:name-for-bindings="Forwarding_Rule_Changed">
 
236
      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
 
237
        <p>Emitted when the <tp:member-ref>ForwardingRules</tp:member-ref> property changes.</p>
 
238
 
 
239
        <p>By the time this is emitted, the property MUST have been updated
 
240
          with the new rules being active.  If any protocol/network
 
241
          requests must be made, they should be completed before the signal
 
242
          is emitted.</p>
 
243
      </tp:docstring>
 
244
 
 
245
      <arg name="Condition" type="u" tp:type="Forwarding_Condition">
 
246
        <tp:docstring>
 
247
          The condition of the forwarding rule that's been changed.
 
248
        </tp:docstring>
 
249
      </arg>
 
250
 
 
251
      <arg name="Timeout" type="u">
 
252
        <tp:docstring>
 
253
          The new initial timeout for the rule.
 
254
        </tp:docstring>
 
255
      </arg>
 
256
 
 
257
      <arg name="Forwards" type="a(uu)" tp:type="Forwarding_Rule_Entry[]">
 
258
        <tp:docstring>
 
259
          The new (and as of the emission of the signal, currently active)
 
260
          forwards.  The order is relevant; those at the lowest array index
 
261
          are used first.
 
262
        </tp:docstring>
 
263
      </arg>
34
264
    </signal>
35
 
    <method name="GetForwardingHandle"
36
 
      tp:name-for-bindings="Get_Forwarding_Handle">
37
 
      <arg direction="out" type="u" tp:type="Contact_Handle">
38
 
        <tp:docstring>
39
 
          An integer contact handle to whom incoming communication is forwarded
40
 
        </tp:docstring>
41
 
      </arg>
42
 
      <tp:docstring>
43
 
        Returns the current forwarding contact handle, or zero if none is set.
44
 
      </tp:docstring>
45
 
      <tp:possible-errors>
46
 
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
47
 
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
48
 
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
49
 
      </tp:possible-errors>
50
 
    </method>
51
 
    <method name="SetForwardingHandle"
52
 
      tp:name-for-bindings="Set_Forwarding_Handle">
53
 
      <arg direction="in" name="Forward_To" type="u" tp:type="Contact_Handle">
54
 
        <tp:docstring>
55
 
          An integer contact handle to forward incoming communications to
56
 
        </tp:docstring>
57
 
      </arg>
58
 
      <tp:docstring>
59
 
        Set a contact handle to forward incoming communications to. A zero
60
 
        handle disables forwarding.
61
 
      </tp:docstring>
62
 
      <tp:possible-errors>
63
 
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
64
 
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
65
 
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
66
 
        <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
67
 
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle"/>
68
 
      </tp:possible-errors>
69
 
    </method>
70
 
    <tp:docstring>
71
 
      A connection interface for services which can signal to contacts
72
 
    that they should instead contact a different user ID, effectively
73
 
    forwarding all incoming communication channels to another contact on
74
 
    the service.
75
 
    </tp:docstring>
 
265
 
 
266
    <method name="SetForwardingRule" tp:name-for-bindings="Set_Forwarding_Rule">
 
267
      <tp:docstring>
 
268
        Update the forwarding rules.
 
269
      </tp:docstring>
 
270
 
 
271
      <arg direction="in" name="Condition" type="u" tp:type="Forwarding_Condition">
 
272
        <tp:docstring>
 
273
          <p>The forwarding rule to override.  Note that this SHOULD not affect
 
274
            other rules; setting a rule that overrides others (such as
 
275
            Forwarding_Rule_Unconditional) will not modify other rules.  This
 
276
            means that when a client sets Forwarding_Rule_Busy and then
 
277
            temporarily sets Forwarding_Rule_Unconditional, the
 
278
            Forwarding_Rule_Busy rule will retain settings after
 
279
            Forwarding_Rule_Unconditional, has been unset.</p>
 
280
 
 
281
          <p>If the CM has no choice but to adjust multiple rules after a call
 
282
            to this function (ie, due to the network or protocol forcing such
 
283
            behavior), the CM MUST emit multiple <tp:member-ref>ForwardingRuleChanged</tp:member-ref>
 
284
            signals for each changed rule.  The order of the signals is
 
285
            implementation-dependent, with the only requirement that the
 
286
            last signal is for the rule that was originally requested to have
 
287
            been changed (e.g. if Unconditional automatically modifies
 
288
            Busy and NoReply, three
 
289
            separate <tp:member-ref>ForwardingRuleChanged</tp:member-ref> signals should be raised with the
 
290
            last signal being for Forwarding_Rule_Unconditional).</p>
 
291
 
 
292
          <p>Each forwarding condition will occur no more than once in
 
293
            the rule array.  Setting a rule will overwrite the old rule
 
294
            with the same <tp:type>Forwarding_Condition</tp:type> in its entirety.</p>
 
295
        </tp:docstring>
 
296
      </arg>
 
297
 
 
298
      <arg direction="in" name="Forwards" type="a(uu)" tp:type="Forwarding_Rule_Entry[]">
 
299
        <tp:docstring>
 
300
          The forwarding targets (an array of type <tp:type>Forwarding_Rule_Entry</tp:type>) to
 
301
          activate for the rule.  An empty array will effectively disable the
 
302
          rule.
 
303
        </tp:docstring>
 
304
      </arg>
 
305
 
 
306
      <arg direction="out" name="Old_Forwards" type="a(uu)" tp:type="Forwarding_Rule_Entry[]">
 
307
        <tp:docstring>
 
308
          The old forwarding targets (an array of type <tp:type>Forwarding_Rule_Entry</tp:type>).
 
309
          This is the list of entries that is being replaced with the call to
 
310
          <tp:member-ref>SetForwardingRule</tp:member-ref>.
 
311
        </tp:docstring>
 
312
      </arg>
 
313
      <tp:possible-errors>
 
314
        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
 
315
        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
 
316
        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable">
 
317
          <tp:docstring>
 
318
            The specified Condition is not supported by this connection,
 
319
            or the number of chained
 
320
            <tp:member-ref>SupportedForwardingConditions</tp:member-ref> should
 
321
            be checked prior to calling
 
322
            <tp:member-ref>SetForwardingRule</tp:member-ref>.
 
323
          </tp:docstring>
 
324
        </tp:error>
 
325
        <tp:error name="org.freedesktop.Telepathy.Error.InvalidHandle">
 
326
          <tp:docstring>
 
327
            A Handle that has been supplied is invalid.
 
328
          </tp:docstring>
 
329
        </tp:error>
 
330
      </tp:possible-errors>
 
331
    </method>
 
332
 
76
333
  </interface>
77
334
</node>
78
335
<!-- vim:set sw=2 sts=2 et ft=xml: -->