« Previous - Version 57/115 (diff) - Next » - Current version
Adrian Georgescu, 01/28/2010 12:56 pm


= Presence blueprint =

<acronym title="DesignBuddyList, depth=2">TOC</acronym>

This is a high level representation of a mechanism that maintains a '''Contacts list''' and handles subscriptions, publications and notifications that can be used by a GUI. It implements a combination of SIP SIMPLE standards related to presence event package, storage and policy.

Storage

The client maintains a '''Contacts list''' that is a concatenated list of resource-lists stored on multiple XCAP servers. A Contact is stored on exactly one XCAP server to provide atomic transaction. When a Contact is added/modified/deleted the corespondent remote XCAP storage is accessed. The remote storage is set per Contact in the Add/Edit Contact dialog.

Image(BuddyList-Aggregation.png)

Account

On boot:

If ''account.xcap'' is enabled

  • If '''account.xcap.xcap_root''' is not defined, locate XCAP root by doing a DNS TXT lookup for xcap.example.com
  • GET XCAP application xcap-caps
  • GET the default filename for all applications supported in xcap-caps and cache them locally
  • If '''account.xcap.subscribe_xcap_diff''' is enabled, SUBSCRIBE for '''Event: xcap-diff'''

If ''account.presence.enable_publish'' is enabled

  • If '''pidf-manipulation''' application is supported by XCAP server, update the '''presentity''' with the PIDF stored on the XCAP server
  • Initialize own '''presentity'''
  • Send Publish

If ''account.presence.subscribe_winfo'' is enabled

  • Initialize '''watchers list''' for Event presence
  • Send Subscribe for ''presence.winfo''

If ''account.presence.resource_lists'' is enabled

  • Initialize the '''Contacts List''' by using the content of the XCAP document '''resource-lists'''. Initialize the ''Subscriptions List'' using the Contacts marked for this

If ''account.presence.rls_services'' is enabled

  • Put the content of ''Subscription List'' initialized above to the XCAP document '''rls-services''' identified by account-buddies@domain

If ''account.presence.subscribe_presence'' is enabled

  • If '''account.presence.subscribe_rls_services''' is True send Subscribe for event presence , and header Supported: eventlist to account-buddies@domai
  • Else for each contact in the ''Contacts Lists'' send Subscribe for event presence

While running

  • Refresh the XCAP server location based on DNS TTL
  • Reload XCAP documents based on '''xcap-diff''' NOTIFYs
Contacts List

''Contacts List'' contains is a list of contacts displayed by the GUI. To build this consolidated list, the SIP client supporting multiple SIP accounts must perform for each account the steps from the ''Account'' section.

For some contacts we SUBSCRIBE for '''Event: presence'''. We must mark each recipient ion the list for which we subscribe.

The list is indexed by a unique SIP URI, a random SIP URI must be generated for contacts that do not have a SIP URI and we must mark the contacts that we want to subscribe to.

Additional, one can store full names and other attributes for each contact by using extensions to PIDF for contact information (cipid extension).

Based on received NOTIFY messages for Event=presence, each contact has a '''presentity''' attribute that contains its own published information. The GUI can display attributes of each '''presentity'''.

  • The contacts list is stored in the main '''resource-lists''' XCAP document '''index'''
  • Maintain a '''presentity''' attribute with what is received in the Notify for presence for each contact
  • On contacts list change, PUT resource-lists and rls-services documents on the XCAP server

A contact has properties related to his device capabilities (e.g. can_chat, can_share, can_talk, can_video). This is conveyed via '''presence caps''' and updates the preferences set by the local user

Policy * Based on NOTIFYs for event '''presence.winfo''' we alert the user about new watchers and we update the policy stored in the pres-rules XCAP document * PUT '''pres-rules''' document on the XCAP server and cache it locally

Transformations are required to support the following functionality:

1.  First degree watchers - access to entire PIDF
1. Second degree watchers - access to subset of PIDF
1. Third degree watchers - access to basic presence online/offline
Icon

There is how OMA has specified such XCAP application [http://www.openmobilealliance.org/technical/release_program/docs/PresenceSIMPLE/V2_0-20081223-C/OMA-TS-Presence_SIMPLE_Content_XDM-V1_0-20081223-C.pdf Presence Content XDM Specification]

Publishing end-point, on boot:

1. HTTP GET for xcap-directory and locate previously uploaded icon (e.g. ABC)
1. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/ABC

Publishing end-point, on icon change:

1. Generate a new random filename: XYZ
1. Build URL http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/XYZ
1. HTTP PUT to xcap server
1. Update &lt;icon&gt; element of pidf and PUBLISH new pidf
1. HTTP DELETE any previous icon file ABC

Subscribing end-point:

1. Parse &lt;icon&gt; element of pidf cipid extension received in Notify
2. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/XYZ
3. Cache picture until next NOTIFY with diferent &lt;icon&gt; element is received

contact-details.jpg (45.6 kB) Adrian Georgescu, 02/01/2010 12:56 am

BuddyList-Aggregation.png (109.4 kB) Adrian Georgescu, 02/01/2010 01:16 am

PresencePolicy.png (38.8 kB) Adrian Georgescu, 02/12/2010 10:26 am