Project

General

Profile

DesignBuddyList » History » Version 59

Adrian Georgescu, 01/28/2010 01:10 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 59 Adrian Georgescu
== Contacts List ==
8
9
''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.  Some contacts are marked to Subscribe to them for Presence information.
10
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
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'''. 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
15 1 Adrian Georgescu
== Storage ==
16
17 59 Adrian Georgescu
The SIP client maintains the '''Contacts list''' as 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.
18 50 Adrian Georgescu
19 1 Adrian Georgescu
[[Image(BuddyList-Aggregation.png)]]
20
21 59 Adrian Georgescu
22 1 Adrian Georgescu
== Account ==
23 47 Adrian Georgescu
24 1 Adrian Georgescu
On boot:
25 57 Adrian Georgescu
26 54 Adrian Georgescu
If ''account.xcap'' is enabled
27 1 Adrian Georgescu
28
 * If '''account.xcap.xcap_root''' is not defined, locate XCAP root by doing a DNS TXT lookup for xcap.example.com
29
 * GET XCAP application xcap-caps
30 59 Adrian Georgescu
 * For support application returned by above step, GET the default filename for all applications supported in xcap-caps and cache them locally
31 58 Adrian Georgescu
 * If '''account.xcap.subscribe_xcap_diff''' is enabled, SUBSCRIBE for '''Event: xcap-diff'''
32 59 Adrian Georgescu
 * if ''Icon'' application is enabled GET xcap-directory and locate previously uploaded icon (e.g. ABC)
33 1 Adrian Georgescu
34 57 Adrian Georgescu
If ''account.presence.enable_publish'' is enabled
35 1 Adrian Georgescu
36
 * If '''pidf-manipulation''' application is supported by XCAP server, update the '''presentity''' with the PIDF stored on the XCAP server
37 57 Adrian Georgescu
 * Initialize own '''presentity''' 
38 1 Adrian Georgescu
 * Send Publish
39 57 Adrian Georgescu
40 1 Adrian Georgescu
If ''account.presence.subscribe_winfo'' is enabled
41
42 54 Adrian Georgescu
 * Initialize '''watchers list''' for Event presence
43
 * Send Subscribe for ''presence.winfo''
44 1 Adrian Georgescu
45 57 Adrian Georgescu
If ''account.presence.resource_lists'' is enabled
46 54 Adrian Georgescu
47 59 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 this 
48 54 Adrian Georgescu
49 57 Adrian Georgescu
If ''account.presence.rls_services'' is enabled
50
51
 * Put the content of ''Subscription List'' initialized above to the XCAP document '''rls-services''' identified by account-buddies@domain
52 1 Adrian Georgescu
53
If ''account.presence.subscribe_presence'' is enabled
54
55
 * If '''account.presence.subscribe_rls_services''' is True send Subscribe for event presence , and header Supported: eventlist to account-buddies@domai
56
 * Else for each contact in the ''Contacts Lists'' send Subscribe for event presence
57
58
While running
59
60
 * Refresh the XCAP server location based on DNS TTL
61
 * Reload XCAP documents based on '''xcap-diff''' NOTIFYs
62
63 59 Adrian Georgescu
== Policy change ==
64 54 Adrian Georgescu
65 53 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
66 54 Adrian Georgescu
 * PUT '''pres-rules''' document on the XCAP server and cache it locally
67 35 Adrian Georgescu
68 54 Adrian Georgescu
Transformations are required to support the following functionality:
69 32 Adrian Georgescu
70 1 Adrian Georgescu
 1.  First degree watchers - access to entire PIDF
71 56 Adrian Georgescu
 1.  Second degree watchers - access to subset of PIDF
72 9 Adrian Georgescu
 1.  Third degree watchers - access to basic presence online/offline
73 1 Adrian Georgescu
74 59 Adrian Georgescu
== Icon change ==
75 32 Adrian Georgescu
76 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]
77 1 Adrian Georgescu
78 59 Adrian Georgescu
Publishing end-point:
79 9 Adrian Georgescu
80
 1. Generate a new random filename: XYZ
81 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
82 59 Adrian Georgescu
 1. PUT the new icon document to XCAP server
83 41 Adrian Georgescu
 1. Update <icon> element of pidf and PUBLISH new pidf
84 59 Adrian Georgescu
 1. DELETE any previously uploaded icon file
85 48 Adrian Georgescu
86 56 Adrian Georgescu
Subscribing end-point:
87 1 Adrian Georgescu
88 59 Adrian Georgescu
 1. Parse <icon> element of pidf cipid extension received in NOTIFY
89 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
90
 3. Cache picture until next NOTIFY with diferent <icon> element is received