⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rfc 4480 rpid rich presence extensions to the presence information data format (pidf).htm

📁 有关IMS SIP及Presence应用的RFC文档包
💻 HTM
📖 第 1 页 / 共 5 页
字号:

   The <status-icon> element includes a URI pointing to an image (icon)
   representing the current status of the person or service.  The
   watcher MAY use this information to represent the status in a
   graphical user interface.  Presentities SHOULD provide images of




<SPAN class=grey>Schulzrinne, et al.         Standards Track                    [Page 16]</SPAN>
<A id=page-17 href="http://tools.ietf.org/html/rfc4480#page-17" name=page-17><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc4480">RFC 4480</A>                          RIPD                         July 2006</SPAN>


   sizes and aspect ratios that are appropriate for rendering as an
   icon.  Support for JPEG, PNG, and GIF formats is RECOMMENDED.

   Watchers resolving the URI MUST validate whether the local copy of
   the icon is current when receiving a notification, using the standard
   cache control mechanism in the URI-identified retrieval protocol.

   Example:

     &lt;status-icon&gt;http://www.example.com/playing.gif&lt;/status-icon&gt;

<SPAN class=h3><A name=section-3.13>3.13</A>.  Time Offset</SPAN>

   The &lt;time-offset&gt; element describes the number of minutes of offset
   from UTC at the person's current location.  A positive number
   indicates that the local time-of-day is ahead (i.e., east of)
   Universal Time, while a negative number indicates that the local
   time-of-day is behind (i.e., west of) Universal Time.  Transitions
   into and out of daylight savings time may temporarily cause a
   difference between the true offset from UTC and the time offset
   element.

   An optional attribute, description, can be used to describe the
   offset, e.g., by labeling the time zone.  This description is meant
   for human consumption.

   Publishers on mobile devices SHOULD NOT publish this information
   unless they know the time offset information to reflect the current
   location.  (For example, many laptop users do not update their time
   zone when traveling.)  Publishers SHOULD update the information
   whenever they discover that their UTC offset has changed.

   Example:

     &lt;time-offset description="America/New_York"&gt;-300
     &lt;/time-offset&gt;

<SPAN class=h3><A name=section-3.14>3.14</A>.  User-Input Element</SPAN>

   The &lt;user-input&gt; element records the user-input or usage state of the
   service or device, based on human user input, e.g., keyboard,
   pointing device, or voice.  If contained in a &lt;person&gt; element, it
   summarizes any user input activity across all services and devices
   operated by the presentity.  The mechanism for such aggregation is
   beyond the scope of this document, but generally reflects the most
   recent user input across all devices and services.  The element can
   assume one of two values, namely, 'active' or 'idle', with an
   optional 'last-input' attribute that records when the last user input



<SPAN class=grey>Schulzrinne, et al.         Standards Track                    [Page 17]</SPAN>
<A id=page-18 href="http://tools.ietf.org/html/rfc4480#page-18" name=page-18><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc4480">RFC 4480</A>                          RIPD                         July 2006</SPAN>


   was received.  An optional 'idle-threshold' element records how long
   the presentity will wait before reporting the service or device to be
   idle, measured in seconds.

   (A two-state model was chosen since it would otherwise be necessary
   to send repeated last-input updates during continuous activity.)

   A service that wants to indicate user input activity sends a &lt;user-
   input&gt; 'active' indication when the user has provided user input
   within a configurable interval of time, the idle-threshold.  If the
   user ceases to provide input and the idle-threshold has elapsed, the
   tuple is marked with a &lt;user-input&gt; 'idle' indication instead,
   optionally including the time of last activity in the 'last-input'
   attribute.  An example is below:

     &lt;user-input idle-threshold="600"
       last-input="2004-10-21T13:20:00.000-05:00"&gt;idle&lt;/user-input&gt;

   Depending on device or service capabilities, user input may be
   detected only for a particular application, i.e., when the
   application has user focus or when a user has sent a message or
   placed a call, or can be based on user input across all applications
   running on one end system.

   The &lt;user-input&gt; element may be used by a watcher, typically in
   combination with other data, to estimate how likely a user is to
   answer when contacting the service.  A tuple that has not been used
   in a while may still be OPEN, but a watcher may choose to first
   contact a URI in a tuple that is both OPEN and has been used more
   recently.

   The &lt;user-input&gt; attribute can be omitted if the presentity wants to
   indicate that the device has not been used for a while, but does not
   want to reveal the precise duration, as in the following:

     &lt;user-input&gt;idle&lt;/user-input&gt;

   Configuration MUST include the option to omit the 'last-input'
   attribute.

<SPAN class=h2><A name=section-4>4</A>.  Example</SPAN>

   The example below describes the presentity
   'pres:someone@example.com', which has a SIP contact,
   'sip:someone@example.com', representing a service.  It also has a
   device contact, as an email box.  The presentity is in a meeting, in
   a public office setting.  The 'until' information indicates that he
   will be there until 5:30 pm local time.  The presentity also has an



<SPAN class=grey>Schulzrinne, et al.         Standards Track                    [Page 18]</SPAN>
<A id=page-19 href="http://tools.ietf.org/html/rfc4480#page-19" name=page-19><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc4480">RFC 4480</A>                          RIPD                         July 2006</SPAN>


   assistant, sip:secretary@example.com, who happens to be available for
   communications.

    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;presence xmlns="urn:ietf:params:xml:ns:pidf"
        xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
        xmlns:lt="urn:ietf:params:xml:ns:location-type"
        xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
        entity="pres:someone@example.com"&gt;

     &lt;tuple id="bs35r9"&gt;
       &lt;status&gt;
         &lt;basic&gt;open&lt;/basic&gt;
       &lt;/status&gt;
       &lt;dm:deviceID&gt;urn:device:0003ba4811e3&lt;/dm:deviceID&gt;
       &lt;rpid:relationship&gt;&lt;rpid:self/&gt;&lt;/rpid:relationship&gt;
       &lt;rpid:service-class&gt;&lt;rpid:electronic/&gt;&lt;/rpid:service-class&gt;
       &lt;contact priority="0.8"&gt;im:someone@mobile.example.net&lt;/contact&gt;
       &lt;note xml:lang="en"&gt;Don't Disturb Please!&lt;/note&gt;
       &lt;note xml:lang="fr"&gt;Ne derangez pas, s'il vous plait&lt;/note&gt;
       &lt;timestamp&gt;2005-10-27T16:49:29Z&lt;/timestamp&gt;
     &lt;/tuple&gt;

     &lt;tuple id="ty4658"&gt;
       &lt;status&gt;
         &lt;basic&gt;open&lt;/basic&gt;
       &lt;/status&gt;
       &lt;rpid:relationship&gt;&lt;rpid:assistant/&gt;&lt;/rpid:relationship&gt;
       &lt;contact priority="1.0"&gt;mailto:secretary@example.com&lt;/contact&gt;
     &lt;/tuple&gt;

     &lt;tuple id="eg92n8"&gt;
       &lt;status&gt;
         &lt;basic&gt;open&lt;/basic&gt;
       &lt;/status&gt;
       &lt;dm:deviceID&gt;urn:x-mac:0003ba4811e3&lt;/dm:deviceID&gt;
       &lt;rpid:class&gt;email&lt;/rpid:class&gt;
       &lt;rpid:service-class&gt;&lt;rpid:electronic/&gt;&lt;/rpid:service-class&gt;
       &lt;rpid:status-icon&gt;http://example.com/mail.png&lt;/rpid:status-icon&gt;
       &lt;contact priority="1.0"&gt;mailto:someone@example.com&lt;/contact&gt;
     &lt;/tuple&gt;

     &lt;note&gt;I'll be in Tokyo next week&lt;/note&gt;

     &lt;dm:device id="pc147"&gt;
       &lt;rpid:user-input idle-threshold="600"
         last-input="2004-10-21T13:20:00-05:00"&gt;idle&lt;/rpid:user-input&gt;
       &lt;dm:deviceID&gt;urn:device:0003ba4811e3&lt;/dm:deviceID&gt;



<SPAN class=grey>Schulzrinne, et al.         Standards Track                    [Page 19]</SPAN>
<A id=page-20 href="http://tools.ietf.org/html/rfc4480#page-20" name=page-20><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc4480">RFC 4480</A>                          RIPD                         July 2006</SPAN>


       &lt;dm:note&gt;PC&lt;/dm:note&gt;
     &lt;/dm:device&gt;

     &lt;dm:person id="p1"&gt;
       &lt;rpid:activities from="2005-05-30T12:00:00+05:00"
          until="2005-05-30T17:00:00+05:00"&gt;
          &lt;rpid:note&gt;Far away&lt;/rpid:note&gt;
          &lt;rpid:away/&gt;
       &lt;/rpid:activities&gt;
       &lt;rpid:class&gt;calendar&lt;/rpid:class&gt;
       &lt;rpid:mood&gt;
         &lt;rpid:angry/&gt;
         &lt;rpid:other&gt;brooding&lt;/rpid:other&gt;
       &lt;/rpid:mood&gt;
       &lt;rpid:place-is&gt;
          &lt;rpid:audio&gt;
             &lt;rpid:noisy/&gt;
          &lt;/rpid:audio&gt;
       &lt;/rpid:place-is&gt;
       &lt;rpid:place-type&gt;&lt;lt:residence/&gt;&lt;/rpid:place-type&gt;
       &lt;rpid:privacy&gt;&lt;rpid:unknown/&gt;&lt;/rpid:privacy&gt;
       &lt;rpid:sphere&gt;bowling league&lt;/rpid:sphere&gt;
       &lt;rpid:status-icon&gt;http://example.com/play.gif&lt;/rpid:status-icon&gt;

       &lt;rpid:time-offset&gt;-240&lt;/rpid:time-offset&gt;
       &lt;dm:note&gt;Scoring 120&lt;/dm:note&gt;
       &lt;dm:timestamp&gt;2005-05-30T16:09:44+05:00&lt;/dm:timestamp&gt;
     &lt;/dm:person&gt;
   &lt;/presence&gt;

<SPAN class=h2><A name=section-5>5</A>.  XML Schema Definitions</SPAN>

   The RPID schema is shown below.  Due to limitations in composing
   schemas, not all XML documents that validate against the schema below
   are semantically valid RPID documents.  In particular, the schema
   allows each element to appear anyhere in PIDF or data-model elements;
   Table 1 restricts where these elements can appear for semantically
   valid RPID documents.  Elements that do not have from/until
   parameters MUST NOT appear more than once in each &lt;person&gt;, &lt;tuple&gt;,
   or &lt;device&gt;.

<SPAN class=h3><A name=section-5.1>5.1</A>.  urn:ietf:params:xml:ns:pidf:rpid</SPAN>

   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf:rpid"
      xmlns="urn:ietf:params:xml:ns:pidf:rpid"
      xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"



<SPAN class=grey>Schulzrinne, et al.         Standards Track                    [Page 20]</SPAN>
<A id=page-21 href="http://tools.ietf.org/html/rfc4480#page-21" name=page-21><SPAN class=break> </SPAN></A>
<SPAN class=grey><A href="http://tools.ietf.org/html/rfc4480">RFC 4480</A>                          RIPD                         July 2006</SPAN>


      elementFormDefault="qualified"
      attributeFormDefault="unqualified"&gt;

     &lt;xs:simpleType name="activeIdle"&gt;
       &lt;xs:restriction base="xs:string"&gt;
         &lt;xs:enumeration value="active"/&gt;
         &lt;xs:enumeration value="idle"/&gt;
       &lt;/xs:restriction&gt;
     &lt;/xs:simpleType&gt;

     &lt;xs:element name="activities"&gt;
       &lt;xs:annotation&gt;
         &lt;xs:documentation&gt;
           Describes what the person is currently doing, expressed as
           an enumeration of activity-describing elements.  A person
           can be engaged in multiple activities at the same time,
           e.g., traveling and having a meal.
         &lt;/xs:documentation&gt;
       &lt;/xs:annotation&gt;

       &lt;xs:complexType&gt;
         &lt;xs:sequence&gt;
           &lt;xs:element name="note" type="Note_t" minOccurs="0"
              maxOccurs="unbounded" /&gt;
           &lt;xs:choice&gt;
             &lt;xs:element name="unknown" type="empty" minOccurs="0"/&gt;
             &lt;xs:sequence maxOccurs="unbounded"&gt;
               &lt;xs:choice&g

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -