<remark>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.</remark>
<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>
<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>
<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>
<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>
<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>
<p>The <activity/> element SHOULD be communicated by means of &xep0060;. 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>
<p>As mentioned in XEP-0060, the stanza containing the event notification or payload MAY also include 'replyto' data (as specified by the &xep0033; protocol) to provide an explicit association between the published data and the user:</p>
<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>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>on_vacation</li>
<li>scheduled_holiday</li>
<li>sleeping</li>
</ul>
</li>
<li>relaxing
<ul>
<li>gaming</li>
<li>going_out</li>
<li>partying</li>
<li>reading</li>
<li>rehearsing</li>
<li>shopping</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>
</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>
<section1topic='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>
<tablecaption='RPID-to-Jabber mappings'>
<tr>
<th>RPID <activity/></th>
<th>General activity element</th>
<th>Specific activity element</th>
</tr>
<tr>
<td>appointment</td>
<tdalign='center'>having_appointment</td>
<tdalign='center'>--</td>
</tr>
<tr>
<td>away</td>
<tdcolspan='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>
<tdcolspan='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>
<tdalign='center'>inactive</td>
<tdalign='center'>scheduled_holiday</td>
</tr>
<tr>
<td>in-transit</td>
<tdalign='center'>traveling</td>
<tdalign='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>
<tdalign='center'>eating</td>
<tdalign='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>
<tdalign='center'>working</td>
<tdalign='center'>in_a_meeting</td>
</tr>
<tr>
<td>on-the-phone</td>
<tdalign='center'>talking</td>
<tdalign='center'>on_the_phone</td>
</tr>
<tr>
<td>performance</td>
<tdalign='center'>--</td>
<tdalign='center'>--</td>
</tr>
<tr>
<td>permanent-absence</td>
<tdcolspan='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>
<tdalign='center'>inactive</td>
<tdalign='center'>sleeping</td>
</tr>
<tr>
<td>steering</td>
<tdalign='center'>traveling</td>
<tdalign='center'>driving</td>
</tr>
<tr>
<td>travel</td>
<tdalign='center'>traveling</td>
<tdalign='center'>on_a_trip</td>
</tr>
<tr>
<td>vacation</td>
<tdalign='center'>inactive</td>
<tdalign='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>
<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>
<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>