DesignBuddyList

Version 57 (Adrian Georgescu, 01/28/2010 12:56 pm)

1 27 Adrian Georgescu
= Presence blueprint =
2 2 Adrian Georgescu
3 55 Adrian Georgescu
[[TOC(DesignBuddyList, depth=2)]]
4 1 Adrian Georgescu
5 41 Adrian Georgescu
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.
6 1 Adrian Georgescu
7 53 Adrian Georgescu
== Storage ==
8 1 Adrian Georgescu
9 54 Adrian Georgescu
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.
10 50 Adrian Georgescu
11 1 Adrian Georgescu
[[Image(BuddyList-Aggregation.png)]]
12 1 Adrian Georgescu
13 53 Adrian Georgescu
== Account ==
14 1 Adrian Georgescu
15 47 Adrian Georgescu
On boot:
16 1 Adrian Georgescu
17 57 Adrian Georgescu
If ''account.xcap'' is enabled
18 54 Adrian Georgescu
19 1 Adrian Georgescu
 * If '''account.xcap.xcap_root''' is not defined, locate XCAP root by doing a DNS TXT lookup for xcap.example.com
20 1 Adrian Georgescu
 * GET XCAP application xcap-caps
21 54 Adrian Georgescu
 * GET the default filename for all applications supported in xcap-caps and cache them locally
22 1 Adrian Georgescu
 * If '''account.xcap.subscribe_xcap_diff''' is enabled, SUBSCRIBE for '''Event: xcap-diff'''
23 1 Adrian Georgescu
24 57 Adrian Georgescu
If ''account.presence.enable_publish'' is enabled
25 1 Adrian Georgescu
26 1 Adrian Georgescu
 * If '''pidf-manipulation''' application is supported by XCAP server, update the '''presentity''' with the PIDF stored on the XCAP server
27 1 Adrian Georgescu
 * Initialize own '''presentity''' 
28 57 Adrian Georgescu
 * Send Publish
29 1 Adrian Georgescu
30 57 Adrian Georgescu
If ''account.presence.subscribe_winfo'' is enabled
31 1 Adrian Georgescu
32 1 Adrian Georgescu
 * Initialize '''watchers list''' for Event presence
33 54 Adrian Georgescu
 * Send Subscribe for ''presence.winfo''
34 54 Adrian Georgescu
35 57 Adrian Georgescu
If ''account.presence.resource_lists'' is enabled
36 54 Adrian Georgescu
37 57 Adrian Georgescu
 * Initialize the '''Contacts List''' by using the content of the XCAP document '''resource-lists'''. Initialize the ''Subscriptions List'' using the Contacts marked for this 
38 54 Adrian Georgescu
39 57 Adrian Georgescu
If ''account.presence.rls_services'' is enabled
40 57 Adrian Georgescu
41 57 Adrian Georgescu
 * Put the content of ''Subscription List'' initialized above to the XCAP document '''rls-services''' identified by account-buddies@domain
42 57 Adrian Georgescu
43 57 Adrian Georgescu
If ''account.presence.subscribe_presence'' is enabled
44 57 Adrian Georgescu
45 57 Adrian Georgescu
 * If '''account.presence.subscribe_rls_services''' is True send Subscribe for event presence , and header Supported: eventlist to account-buddies@domai
46 57 Adrian Georgescu
 * Else for each contact in the ''Contacts Lists'' send Subscribe for event presence
47 57 Adrian Georgescu
48 57 Adrian Georgescu
49 54 Adrian Georgescu
While running
50 54 Adrian Georgescu
51 54 Adrian Georgescu
 * Refresh the XCAP server location based on DNS TTL
52 1 Adrian Georgescu
 * Reload XCAP documents based on '''xcap-diff''' NOTIFYs
53 1 Adrian Georgescu
54 1 Adrian Georgescu
== Contacts List ==
55 48 Adrian Georgescu
56 57 Adrian Georgescu
''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. 
57 54 Adrian Georgescu
58 57 Adrian Georgescu
For some contacts we SUBSCRIBE for '''Event: presence'''. We must mark each recipient ion the list for which we subscribe.
59 57 Adrian Georgescu
60 57 Adrian Georgescu
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. 
61 57 Adrian Georgescu
62 1 Adrian Georgescu
Additional, one can store full names and other attributes for each contact by using extensions to PIDF for contact information (cipid extension). 
63 1 Adrian Georgescu
64 1 Adrian Georgescu
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'''.
65 1 Adrian Georgescu
66 1 Adrian Georgescu
 * The contacts list is stored in the main '''resource-lists''' XCAP document '''index'''
67 1 Adrian Georgescu
 * Maintain a '''presentity''' attribute with what is received in the Notify for presence for each contact
68 1 Adrian Georgescu
 * On contacts list change, PUT resource-lists and rls-services documents on the XCAP server
69 1 Adrian Georgescu
 
70 1 Adrian Georgescu
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
71 1 Adrian Georgescu
 
72 56 Adrian Georgescu
== Policy ==
73 53 Adrian Georgescu
74 56 Adrian Georgescu
 * 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
75 54 Adrian Georgescu
 * PUT '''pres-rules''' document on the XCAP server and cache it locally
76 53 Adrian Georgescu
77 1 Adrian Georgescu
Transformations are required to support the following functionality:
78 54 Adrian Georgescu
79 1 Adrian Georgescu
 1.  First degree watchers - access to entire PIDF
80 35 Adrian Georgescu
 1.  Second degree watchers - access to subset of PIDF
81 54 Adrian Georgescu
 1.  Third degree watchers - access to basic presence online/offline
82 32 Adrian Georgescu
83 56 Adrian Georgescu
== Icon ==
84 1 Adrian Georgescu
85 56 Adrian Georgescu
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]
86 1 Adrian Georgescu
87 1 Adrian Georgescu
Publishing end-point, on boot:
88 9 Adrian Georgescu
89 1 Adrian Georgescu
 1. HTTP GET for xcap-directory and locate previously uploaded icon (e.g. ABC)
90 1 Adrian Georgescu
 1. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/ABC
91 32 Adrian Georgescu
92 9 Adrian Georgescu
Publishing end-point, on icon change:
93 1 Adrian Georgescu
94 32 Adrian Georgescu
 1. Generate a new random filename: XYZ
95 9 Adrian Georgescu
 1. Build URL http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/XYZ
96 9 Adrian Georgescu
 1. HTTP PUT to xcap server
97 41 Adrian Georgescu
 1. Update <icon> element of pidf and PUBLISH new pidf
98 41 Adrian Georgescu
 1. HTTP DELETE any previous icon file ABC
99 41 Adrian Georgescu
100 1 Adrian Georgescu
Subscribing end-point:
101 48 Adrian Georgescu
102 56 Adrian Georgescu
 1. Parse <icon> element of pidf cipid extension received in Notify
103 1 Adrian Georgescu
 2. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/XYZ
104 1 Adrian Georgescu
 3. Cache picture until next NOTIFY with diferent <icon> element is received
105 1 Adrian Georgescu
106 1 Adrian Georgescu