Project

General

Profile

DesignBuddyList » History » Version 65

Adrian Georgescu, 01/28/2010 01:34 PM

1 65 Adrian Georgescu
= Presence Blueprint =
2 2 Adrian Georgescu
3 55 Adrian Georgescu
[[TOC(DesignBuddyList, depth=2)]]
4 1 Adrian Georgescu
5 63 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 SIP client with a graphical user interface. It implements a combination of SIP SIMPLE standards related to presence event package, storage and policy.
6 1 Adrian Georgescu
7 59 Adrian Georgescu
== Contacts List ==
8
9 64 Adrian Georgescu
''Contacts List'' contains is a list of contacts displayed by the GUI. To build this consolidated list, a SIP client supporting multiple SIP accounts must perform for each account the steps from the ''Account'' section.  
10 59 Adrian Georgescu
11
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). 
12
13 64 Adrian Georgescu
Some contacts are marked for Subscribe to them for ''Presence'' information. 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 it. Each contact can also publish properties related to his device capabilities (e.g. can_chat, can_share, can_talk, can_video). This is conveyed via ''caps'' extensions to ''pidf''.
14 59 Adrian Georgescu
15 1 Adrian Georgescu
== Storage ==
16
17 64 Adrian Georgescu
The SIP client build the ''Contacts List'' by concatenating the individual lists stored locally or on the ''resource-lists'' documents stored on the XCAP server corespondent to each SIP account. 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 updated. The remote storage is set per Contact in the Add/Edit Contact dialog of the SIP client.
18 63 Adrian Georgescu
19 64 Adrian Georgescu
Each Contact can belong to a single Group. The SIP client will maintain a central ''Groups List'' by merging all found groups on all local and remote storages and will populate each Group with all recipients found for them.
20 50 Adrian Georgescu
21 1 Adrian Georgescu
[[Image(BuddyList-Aggregation.png)]]
22
23 59 Adrian Georgescu
24 1 Adrian Georgescu
== Account ==
25 47 Adrian Georgescu
26 1 Adrian Georgescu
On boot:
27 57 Adrian Georgescu
28 54 Adrian Georgescu
If ''account.xcap'' is enabled
29 1 Adrian Georgescu
30 60 Adrian Georgescu
 * If ''account.xcap.xcap_root'' is not set, locate XCAP root by doing a DNS TXT lookup for xcap.example.com
31 1 Adrian Georgescu
 * GET XCAP application xcap-caps
32 60 Adrian Georgescu
 * GET XCAP application xcap-directory
33
 * For all supported applications returned by above step, GET their files and cache them locally
34
 * If ''account.xcap.subscribe_xcap_diff'' is enabled, sent Subscribe for ''Event: xcap-diff''
35
 * if ''Icon'' application is enabled, GET the previous icon using HTTP request
36 57 Adrian Georgescu
37 1 Adrian Georgescu
If ''account.presence.enable_publish'' is enabled
38
39 60 Adrian Georgescu
 * If ''pidf-manipulation'' application is supported by the XCAP server, update the pidf with its content and update GUI with the fact that we have server based PIDF set  
40
 * Send Publish with the current pidf if pidf_manipulation is not set, let the user change his state manually if pidf_manipulation is set
41 57 Adrian Georgescu
42 1 Adrian Georgescu
If ''account.presence.subscribe_winfo'' is enabled
43
44 54 Adrian Georgescu
 * Send Subscribe for ''presence.winfo''
45 61 Adrian Georgescu
 * Initialize ''Watchers List'' for ''Event: presence'' based on received Notify
46 1 Adrian Georgescu
47 57 Adrian Georgescu
If ''account.presence.resource_lists'' is enabled
48 54 Adrian Georgescu
49 61 Adrian Georgescu
 * Initialize the ''Contacts List'' by using the content of the XCAP document ''resource-lists'', filename ''index''. Initialize the ''Subscriptions List'' using the Contacts marked for ''Subscribe to Presence''
50 54 Adrian Georgescu
51 57 Adrian Georgescu
If ''account.presence.rls_services'' is enabled
52
53 62 Adrian Georgescu
 * Put the content of ''Subscription List'' initialized above to the XCAP document ''rls-services'' identified by SIP URI account-buddies@domain
54 1 Adrian Georgescu
55
If ''account.presence.subscribe_presence'' is enabled
56
57 61 Adrian Georgescu
 * If ''account.presence.subscribe_rls_services'' is True send one Subscribe for ''Event: presence'', and header ''Supported: eventlist'' to account-buddies@domain
58 60 Adrian Georgescu
 * Else for each contact in the ''Contacts Lists'' send Subscribe for ''Event: presence''
59 1 Adrian Georgescu
60
While running
61
62
 * Refresh the XCAP server location based on DNS TTL
63 62 Adrian Georgescu
 * Reload XCAP documents based on ''Event: xcap-diff'' Notify
64 1 Adrian Georgescu
65 59 Adrian Georgescu
== Policy change ==
66 54 Adrian Georgescu
67 62 Adrian Georgescu
 * Based on Notify for ''Event: presence.winfo'' alert the user about new watchers and update the policy stored in the pres-rules XCAP document
68
 * PUT ''pres-rules'' document on the XCAP server
69 35 Adrian Georgescu
70 54 Adrian Georgescu
Transformations are required to support the following functionality:
71 32 Adrian Georgescu
72 1 Adrian Georgescu
 1.  First degree watchers - access to entire PIDF
73 56 Adrian Georgescu
 1.  Second degree watchers - access to subset of PIDF
74 9 Adrian Georgescu
 1.  Third degree watchers - access to basic presence online/offline
75 1 Adrian Georgescu
76 59 Adrian Georgescu
== Icon change ==
77 32 Adrian Georgescu
78 9 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]
79 1 Adrian Georgescu
80 59 Adrian Georgescu
Publishing end-point:
81 9 Adrian Georgescu
82
 1. Generate a new random filename: XYZ
83 41 Adrian Georgescu
 1. Build URL http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/XYZ
84 59 Adrian Georgescu
 1. PUT the new icon document to XCAP server
85 41 Adrian Georgescu
 1. Update <icon> element of pidf and PUBLISH new pidf
86 59 Adrian Georgescu
 1. DELETE any previously uploaded icon file
87 48 Adrian Georgescu
88 56 Adrian Georgescu
Subscribing end-point:
89 1 Adrian Georgescu
90 59 Adrian Georgescu
 1. Parse <icon> element of pidf cipid extension received in NOTIFY
91 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
92
 3. Cache picture until next NOTIFY with diferent <icon> element is received