-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxep-0108.xml
517 lines (497 loc) · 20.7 KB
/
xep-0108.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE xep SYSTEM 'xep.dtd' [
<!ENTITY % ents SYSTEM 'xep.ent'>
%ents;
]>
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
<xep>
<header>
<title>User Activity</title>
<abstract>This specification defines a payload format for communicating information about user activities, such as whether a person is currently working, travelling, or relaxing. The payload format is typically transported using the personal eventing protocol, a profile of XMPP publish-subscribe specified in XEP-0163.</abstract>
&LEGALNOTICE;
<number>0108</number>
<status>Draft</status>
<type>Standards Track</type>
<sig>Standards</sig>
<dependencies>
<spec>XMPP Core</spec>
<spec>XEP-0163</spec>
</dependencies>
<supersedes/>
<supersededby/>
<shortname>activity</shortname>
<schemaloc>
<url>http://www.xmpp.org/schemas/activity.xsd</url>
</schemaloc>
&ralphm;
&stpeter;
<revision>
<version>1.3</version>
<date>2008-10-29</date>
<initials>psa</initials>
<remark><p>Allowed empty activity element to signify a pause in publishing; added undefined element to handle any unspecified activity; also added more activities: dancing, fishing, hiding, praying, smoking, thinking.</p></remark>
</revision>
<revision>
<version>1.2</version>
<date>2007-07-11</date>
<initials>psa</initials>
<remark><p>Added on_video_phone activity.</p></remark>
</revision>
<revision>
<version>1.1</version>
<date>2007-06-04</date>
<initials>psa</initials>
<remark><p>Corrected PEP examples.</p></remark>
</revision>
<revision>
<version>1.0</version>
<date>2004-10-20</date>
<initials>psa/rm</initials>
<remark><p>Per a vote of the Jabber Council, advanced status to Draft; per Council discussion, also adjusted structure to use nested elements rather than XML character data.</p></remark>
</revision>
<revision>
<version>0.4</version>
<date>2004-09-15</date>
<initials>psa</initials>
<remark><p>Added internationalization considerations.</p></remark>
</revision>
<revision>
<version>0.3</version>
<date>2004-04-25</date>
<initials>psa</initials>
<remark><p>Corrected several errors; added reference to XEP-0033.</p></remark>
</revision>
<revision>
<version>0.2</version>
<date>2004-02-19</date>
<initials>psa</initials>
<remark><p>Minor text and schema changes; added RPID mapping.</p></remark>
</revision>
<revision>
<version>0.1</version>
<date>2003-07-22</date>
<initials>rm</initials>
<remark><p>Initial version.</p></remark>
</revision>
</header>
<section1 topic='Introduction' anchor='intro'>
<p>This document defines an extension mechanism for capturing "extended presence" data about user activities, above and beyond availability as defined in &xmppim; (e.g., the 'away', 'extended away', and 'dnd' values of the <show/> child of the <presence/> stanza).</p>
</section1>
<section1 topic='Protocol' anchor='proto'>
<section2 topic='Data Format' anchor='proto-format'>
<p>Information about user activities is provided by the user and propagated on the network by the user's client. The information is structured by means of an <activity/> element that is qualified by the 'http://jabber.org/protocol/activity' namespace. The general activity is provided as the element name of a first-level child of the <activity/> element (e.g., <relaxing/>); one such general activity element is REQUIRED. The general activity element MAY contain a child element that specifies a more particular form of the general activity (e.g., <partying/>). The user MAY also specify a natural-language description of the activity in the OPTIONAL <text/> child of the <activity/> element. Here is an example:</p>
<code><![CDATA[
<activity xmlns='http://jabber.org/protocol/activity'>
<relaxing>
<partying/>
</relaxing>
<text xml:lang='en'>My nurse's birthday!</text>
</activity>
]]></code>
<p>Instead of (but not in addition to) one of the specific activity elements defined herein, an application MAY include a properly-namespaced child element for the specific activity. Here is an example:</p>
<code><![CDATA[
<activity xmlns='http://jabber.org/protocol/activity'>
<relaxing>
<tanning xmlns='http://www.ilovetanning.info'/>
</relaxing>
</activity>
]]></code>
<p>Finally, one of the specific activity elements defined herein MAY itself contain a properly-namespaced child element that provides more detailed information about the specific activity. Here is an example:</p>
<code><![CDATA[
<activity xmlns='http://jabber.org/protocol/activity'>
<inactive>
<sleeping>
<hibernating xmlns='http://www.ursus.info/states'/>
</sleeping>
</inactive>
</activity>
]]></code>
<p>In accordance with &xmppcore;, the receiving application MUST ignore a specific activity element or detailed activity element if it does not understand the namespace that qualifies the element.</p>
</section2>
<section2 topic='Pubsub Transport' anchor='proto-pubsub'>
<p>Activity information SHOULD be communicated and transported by means of the &xep0060; subset specified in &xep0163;. Because activity information is not pure presence information and can change independently of the user's availability, it SHOULD NOT be provided as an extension to &PRESENCE;.</p>
<example caption='User Publishes Activity'><![CDATA[
<iq type='set'
from='juliet@capulet.lit/ca486eba-0f9a-11dc-8835-000bcd821bfb'
id='publish1'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='http://jabber.org/protocol/activity'>
<item>
<activity xmlns='http://jabber.org/protocol/activity'>
<relaxing>
<partying/>
</relaxing>
<text xml:lang='en'>My nurse's birthday!</text>
</activity>
</item>
</publish>
</pubsub>
</iq>
]]></example>
<p>The activity is then delivered to all subscribers:</p>
<example caption='Activity is Delivered to All Subscribers'><![CDATA[
<message
from='juliet@capulet.lit'
to='romeo@montague.lit'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='http://jabber.org/protocol/activity'>
<item id='b5ac48d0-0f9c-11dc-8754-001143d5d5db'>
<activity xmlns='http://jabber.org/protocol/activity'>
<relaxing>
<partying/>
</relaxing>
<text xml:lang='en'>My nurse's birthday!</text>
</activity>
</item>
</items>
</event>
</message>
]]></example>
<p>In order to indicate that the user is no longer publishing activities, the user's client shall send an empty <activity/> element, which can be considered a "stop command" for user activities:</p>
<example caption='User Disables Publishing'><![CDATA[
<iq from='juliet@capulet.lit/balcony'
id='publish1'
type='set'>
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<publish node='http://jabber.org/protocol/activity'>
<item>
<activity xmlns='http://jabber.org/protocol/activity'/>
</item>
</publish>
</pubsub>
</iq>
]]></example>
<example caption='Empty Activity Information is Delivered to All Subscribers'><![CDATA[
<message
from='juliet@capulet.lit'
to='romeo@montague.net'>
<event xmlns='http://jabber.org/protocol/pubsub#event'>
<items node='http://jabber.org/protocol/activity'>
<item id='b5ac48d0-0f9c-11dc-8754-001143d5d5db'>
<activity xmlns='http://jabber.org/protocol/activity'/>
</item>
</items>
</event>
</message>
]]></example>
</section2>
</section1>
<section1 topic='Activity Values' anchor='activities'>
<p>Each activity has a REQUIRED general category and an OPTIONAL specific instance. One can understand each specifier as '[user] is [activity]' (e.g., 'Juliet is partying'), where the relevant value is the most specific activity provided (e.g., specifically "partying" rather than generally "relaxing").</p>
<p>The activity values defined in this taxonomy are as follows, where the first indentation level is the general category and the second indentation level is the specific instance. Note: The specific activity elements are RECOMMENDED as forms of the general activities shown below, but can be included under any general activity (e.g., "gardening" could be used as the specific activity under "relaxing" rather than "doing_chores").</p>
<ul>
<li>doing_chores
<ul>
<li>buying_groceries</li>
<li>cleaning</li>
<li>cooking</li>
<li>doing_maintenance</li>
<li>doing_the_dishes</li>
<li>doing_the_laundry</li>
<li>gardening</li>
<li>running_an_errand</li>
<li>walking_the_dog</li>
</ul>
</li>
<li>drinking
<ul>
<li>having_a_beer</li>
<li>having_coffee</li>
<li>having_tea</li>
</ul>
</li>
<li>eating
<ul>
<li>having_a_snack</li>
<li>having_breakfast</li>
<li>having_dinner</li>
<li>having_lunch</li>
</ul>
</li>
<li>exercising
<ul>
<li>cycling</li>
<li>dancing</li>
<li>hiking</li>
<li>jogging</li>
<li>playing_sports</li>
<li>running</li>
<li>skiing</li>
<li>swimming</li>
<li>working_out</li>
</ul>
</li>
<li>grooming
<ul>
<li>at_the_spa</li>
<li>brushing_teeth</li>
<li>getting_a_haircut</li>
<li>shaving</li>
<li>taking_a_bath</li>
<li>taking_a_shower</li>
</ul>
</li>
<li>having_appointment</li>
<li>inactive
<ul>
<li>day_off</li>
<li>hanging_out</li>
<li>hiding</li>
<li>on_vacation</li>
<li>praying</li>
<li>scheduled_holiday</li>
<li>sleeping</li>
<li>thinking</li>
</ul>
</li>
<li>relaxing
<ul>
<li>fishing</li>
<li>gaming</li>
<li>going_out</li>
<li>partying</li>
<li>reading</li>
<li>rehearsing</li>
<li>shopping</li>
<li>smoking</li>
<li>socializing</li>
<li>sunbathing</li>
<li>watching_tv</li>
<li>watching_a_movie</li>
</ul>
</li>
<li>talking
<ul>
<li>in_real_life</li>
<li>on_the_phone</li>
<li>on_video_phone</li>
</ul>
</li>
<li>traveling
<ul>
<li>commuting</li>
<li>cycling</li>
<li>driving</li>
<li>in_a_car</li>
<li>on_a_bus</li>
<li>on_a_plane</li>
<li>on_a_train</li>
<li>on_a_trip</li>
<li>walking</li>
</ul>
</li>
<li>working
<ul>
<li>coding</li>
<li>in_a_meeting</li>
<li>studying</li>
<li>writing</li>
</ul>
</li>
</ul>
<p>In addition, the specific activity element can be <other/> in order to handle activities not defined herein. <note>In the absence of a <text/> element, the recipient is free to draw whatever conclusions he or she may like regarding the nature of the "other" activity. Naturally, emoticons can be provided as the XML character data of the <text/> element. ;-)</note></p>
</section1>
<section1 topic='Mapping to RPID' anchor='rpid-mapping'>
<p>&rfc4480; defines several extensions to the &pidf; for so-called "rich presence". One such extension is the <activity/> element (see Section 4.2), which "describes what the presentity is currently doing". The following table shows a mapping from the defined RPID activity values to the Jabber values defined herein.</p>
<table caption='RPID-to-Jabber mappings'>
<tr>
<th>RPID <activity/></th>
<th>General activity element</th>
<th>Specific activity element</th>
</tr>
<tr>
<td>appointment</td>
<td align='center'>having_appointment</td>
<td align='center'>--</td>
</tr>
<tr>
<td>away</td>
<td colspan='2' align='center'><note>In XMPP, "away" is not an activity, but an availability state captured by means of a <presence/> stanza with a <show>away</show> child (see <cite>XMPP IM</cite>).</note></td>
</tr>
<tr>
<td>busy</td>
<td colspan='2' align='center'><note>In XMPP, "busy" is not an activity, but an availability state captured by means of a <presence/> stanza with <show>dnd</show> child (see <cite>XMPP IM</cite>). Alternatively, the RPID "busy" activity could map to any number of more specific Jabber activities as defined herein.</note></td>
</tr>
<tr>
<td>holiday</td>
<td align='center'>inactive</td>
<td align='center'>scheduled_holiday</td>
</tr>
<tr>
<td>in-transit</td>
<td align='center'>traveling</td>
<td align='center'><note>Appropriate specific values in the "traveling" category would be "in_a_car", "on_a_bus", and "on_a_train".</note></td>
</tr>
<tr>
<td>meal</td>
<td align='center'>eating</td>
<td align='center'><note>The "eating" category can be further specified by "having_a_snack", "having_breakfast", "having_lunch", or "having_dinner".</note></td>
</tr>
<tr>
<td>meeting</td>
<td align='center'>working</td>
<td align='center'>in_a_meeting</td>
</tr>
<tr>
<td>on-the-phone</td>
<td align='center'>talking</td>
<td align='center'>on_the_phone</td>
</tr>
<tr>
<td>performance</td>
<td align='center'>--</td>
<td align='center'>--</td>
</tr>
<tr>
<td>permanent-absence</td>
<td colspan='2' align='center'><note>In XMPP, "permanent absence" is not an activity, but instead would be sent to a contact via the <gone/> stanza error (see &xmppcore;).</note></td>
</tr>
<tr>
<td>sleeping</td>
<td align='center'>inactive</td>
<td align='center'>sleeping</td>
</tr>
<tr>
<td>steering</td>
<td align='center'>traveling</td>
<td align='center'>driving</td>
</tr>
<tr>
<td>travel</td>
<td align='center'>traveling</td>
<td align='center'>on_a_trip</td>
</tr>
<tr>
<td>vacation</td>
<td align='center'>inactive</td>
<td align='center'>on_vacation</td>
</tr>
</table>
<p>The full range of activities defined herein is considerably richer than that defined in RPID; no mapping to RPID is provided by this specification for activity values that are not present in RPID, and any such mapping is the responsibility of a gateway between the two systems.</p>
</section1>
<section1 topic='Internationalization Considerations' anchor='i18n'>
<p>The XML character data values of the <text/> element are intended for presentation to human users; therefore, if a <text/> element is included the sending application SHOULD also ensure that the <text/> element or the parent <activity/> element possesses an 'xml:lang' attribute with an appropriate value.</p>
</section1>
<section1 topic='Security Considerations' anchor='security'>
<p>Because user activities may be published to a large number of pubsub subscribers, users should take care in approving subscribers and in characterizing their current activities.</p>
</section1>
<section1 topic='IANA Considerations' anchor='iana'>
<p>This document requires no interaction with &IANA;.</p>
</section1>
<section1 topic='XMPP Registrar Considerations' anchor='registrar'>
<section2 topic='Protocol Namespaces' anchor='registrar-ns'>
<p>The ®ISTRAR; includes 'http://jabber.org/protocol/activity' in its registry of protocol namespaces.</p>
</section2>
</section1>
<section1 topic='XML Schema' anchor='schema'>
<code><![CDATA[
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
xmlns:xs='http://www.w3.org/2001/XMLSchema'
targetNamespace='http://jabber.org/protocol/activity'
xmlns='http://jabber.org/protocol/activity'
elementFormDefault='qualified'>
<xs:element name='activity'>
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs='0'>
<xs:element name='doing_chores' type='general'/>
<xs:element name='drinking' type='general'/>
<xs:element name='eating' type='general'/>
<xs:element name='exercising' type='general'/>
<xs:element name='grooming' type='general'/>
<xs:element name='having_appointment' type='general'/>
<xs:element name='inactive' type='general'/>
<xs:element name='relaxing' type='general'/>
<xs:element name='talking' type='general'/>
<xs:element name='traveling' type='general'/>
<xs:element name='undefined' type='general'/>
<xs:element name='working' type='general'/>
</xs:choice>
<xs:element name='text' minOccurs='0' type='xs:string'/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name='general'>
<xs:choice minOccurs='0'>
<xs:choice minOccurs='0'>
<xs:element name='at_the_spa' type='specific'/>
<xs:element name='brushing_teeth' type='specific'/>
<xs:element name='buying_groceries' type='specific'/>
<xs:element name='cleaning' type='specific'/>
<xs:element name='coding' type='specific'/>
<xs:element name='commuting' type='specific'/>
<xs:element name='cooking' type='specific'/>
<xs:element name='cycling' type='specific'/>
<xs:element name='dancing' type='specific'/>
<xs:element name='day_off' type='specific'/>
<xs:element name='doing_maintenance' type='specific'/>
<xs:element name='doing_the_dishes' type='specific'/>
<xs:element name='doing_the_laundry' type='specific'/>
<xs:element name='driving' type='specific'/>
<xs:element name='fishing' type='specific'/>
<xs:element name='gaming' type='specific'/>
<xs:element name='gardening' type='specific'/>
<xs:element name='getting_a_haircut' type='specific'/>
<xs:element name='going_out' type='specific'/>
<xs:element name='hanging_out' type='specific'/>
<xs:element name='having_a_beer' type='specific'/>
<xs:element name='having_a_snack' type='specific'/>
<xs:element name='having_breakfast' type='specific'/>
<xs:element name='having_coffee' type='specific'/>
<xs:element name='having_dinner' type='specific'/>
<xs:element name='having_lunch' type='specific'/>
<xs:element name='having_tea' type='specific'/>
<xs:element name='hiding' type='specific'/>
<xs:element name='hiking' type='specific'/>
<xs:element name='in_a_car' type='specific'/>
<xs:element name='in_a_meeting' type='specific'/>
<xs:element name='in_real_life' type='specific'/>
<xs:element name='jogging' type='specific'/>
<xs:element name='on_a_bus' type='specific'/>
<xs:element name='on_a_plane' type='specific'/>
<xs:element name='on_a_train' type='specific'/>
<xs:element name='on_a_trip' type='specific'/>
<xs:element name='on_the_phone' type='specific'/>
<xs:element name='on_vacation' type='specific'/>
<xs:element name='on_video_phone' type='specific'/>
<xs:element name='other' type='specific'/>
<xs:element name='partying' type='specific'/>
<xs:element name='playing_sports' type='specific'/>
<xs:element name='praying' type='specific'/>
<xs:element name='reading' type='specific'/>
<xs:element name='rehearsing' type='specific'/>
<xs:element name='running' type='specific'/>
<xs:element name='running_an_errand' type='specific'/>
<xs:element name='scheduled_holiday' type='specific'/>
<xs:element name='shaving' type='specific'/>
<xs:element name='shopping' type='specific'/>
<xs:element name='skiing' type='specific'/>
<xs:element name='sleeping' type='specific'/>
<xs:element name='smoking' type='specific'/>
<xs:element name='socializing' type='specific'/>
<xs:element name='studying' type='specific'/>
<xs:element name='sunbathing' type='specific'/>
<xs:element name='swimming' type='specific'/>
<xs:element name='taking_a_bath' type='specific'/>
<xs:element name='taking_a_shower' type='specific'/>
<xs:element name='thinking' type='specific'/>
<xs:element name='walking' type='specific'/>
<xs:element name='walking_the_dog' type='specific'/>
<xs:element name='watching_a_movie' type='specific'/>
<xs:element name='watching_tv' type='specific'/>
<xs:element name='working_out' type='specific'/>
<xs:element name='writing' type='specific'/>
</xs:choice>
<xs:any namespace='##other'/>
</xs:choice>
</xs:complexType>
<xs:complexType name='specific'>
<xs:sequence minOccurs='0'>
<xs:any namespace='##other'/>
</xs:sequence>
</xs:complexType>
</xs:schema>
]]></code>
</section1>
</xep>