DesignBuddyList » History » Version 74
Adrian Georgescu, 01/28/2010 01:59 PM
1 | 65 | Adrian Georgescu | = Presence Blueprint = |
---|---|---|---|
2 | 2 | Adrian Georgescu | |
3 | 55 | Adrian Georgescu | [[TOC(DesignBuddyList, depth=2)]] |
4 | 1 | Adrian Georgescu | |
5 | 72 | 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 | 73 | Adrian Georgescu | ''Contacts List'' contains is a list of contacts displayed by the GUI. It must be managed by the SIP client at a global level above the individual SIP account level. |
10 | 59 | Adrian Georgescu | |
11 | 74 | Adrian Georgescu | The ''Contacts List'' is organized in unique ''Groups''. Each Contact belongs to a single Group. The SIP client maintains a central ''Groups List'' by merging all found Groups on all local and remote storages and populates each Group with all recipients found for them. |
12 | 1 | Adrian Georgescu | |
13 | 74 | Adrian Georgescu | To build this consolidated ''Contacts List'', a SIP client supporting multiple accounts must perform for each account the steps described in the ''Account'' section by accessing local or remote ''Storage'' used for each SIP account. |
14 | 70 | Adrian Georgescu | |
15 | 71 | Adrian Georgescu | Some contacts are marked for Subscribing 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 as pidf xml payload, the GUI 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'' and can be used to drive the contextual menus for each Contact related to what kind of action can be initiated to them. |
16 | 59 | Adrian Georgescu | |
17 | 1 | Adrian Georgescu | == Storage == |
18 | |||
19 | 70 | 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. |
20 | 50 | Adrian Georgescu | |
21 | 1 | Adrian Georgescu | [[Image(BuddyList-Aggregation.png)]] |
22 | |||
23 | == Account == |
||
24 | 73 | Adrian Georgescu | |
25 | Each SIP Account has settings that affect the way it stores the ''Contacts List'' and how it interacts with the Contacts. |
||
26 | 47 | Adrian Georgescu | |
27 | 1 | Adrian Georgescu | On boot: |
28 | 57 | Adrian Georgescu | |
29 | 54 | Adrian Georgescu | If ''account.xcap'' is enabled |
30 | 1 | Adrian Georgescu | |
31 | 60 | Adrian Georgescu | * If ''account.xcap.xcap_root'' is not set, locate XCAP root by doing a DNS TXT lookup for xcap.example.com |
32 | 1 | Adrian Georgescu | * GET XCAP application xcap-caps |
33 | 60 | Adrian Georgescu | * GET XCAP application xcap-directory |
34 | * For all supported applications returned by above step, GET their files and cache them locally |
||
35 | * If ''account.xcap.subscribe_xcap_diff'' is enabled, sent Subscribe for ''Event: xcap-diff'' |
||
36 | * if ''Icon'' application is enabled, GET the previous icon using HTTP request |
||
37 | 57 | Adrian Georgescu | |
38 | 1 | Adrian Georgescu | If ''account.presence.enable_publish'' is enabled |
39 | |||
40 | 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 |
41 | * Send Publish with the current pidf if pidf_manipulation is not set, let the user change his state manually if pidf_manipulation is set |
||
42 | 57 | Adrian Georgescu | |
43 | 1 | Adrian Georgescu | If ''account.presence.subscribe_winfo'' is enabled |
44 | |||
45 | 54 | Adrian Georgescu | * Send Subscribe for ''presence.winfo'' |
46 | 61 | Adrian Georgescu | * Initialize ''Watchers List'' for ''Event: presence'' based on received Notify |
47 | 1 | Adrian Georgescu | |
48 | 57 | Adrian Georgescu | If ''account.presence.resource_lists'' is enabled |
49 | 54 | Adrian Georgescu | |
50 | 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'' |
51 | 54 | Adrian Georgescu | |
52 | 57 | Adrian Georgescu | If ''account.presence.rls_services'' is enabled |
53 | |||
54 | 62 | Adrian Georgescu | * Put the content of ''Subscription List'' initialized above to the XCAP document ''rls-services'' identified by SIP URI account-buddies@domain |
55 | 1 | Adrian Georgescu | |
56 | If ''account.presence.subscribe_presence'' is enabled |
||
57 | |||
58 | 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 |
59 | 60 | Adrian Georgescu | * Else for each contact in the ''Contacts Lists'' send Subscribe for ''Event: presence'' |
60 | 1 | Adrian Georgescu | |
61 | While running: |
||
62 | |||
63 | 67 | Adrian Georgescu | * Refresh the XCAP server location based on DNS TTL |
64 | 1 | Adrian Georgescu | * Reload changed XCAP documents based on ''Event: xcap-diff'' Notifies |
65 | 74 | Adrian Georgescu | |
66 | > Each individual contact list stored in a resource-lists document is indexed by a unique SIP URI, a random SIP URI must be generated for Contacts that do not have a real SIP URI and we must mark the contacts that we want to Subscribe to for presence information. Additional, one can store full names and other attributes related to remote recipient by using extensions to PIDF for contact information (cipid extension). |
||
67 | 1 | Adrian Georgescu | |
68 | 59 | Adrian Georgescu | == Policy change == |
69 | 54 | Adrian Georgescu | |
70 | 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 |
71 | * PUT ''pres-rules'' document on the XCAP server |
||
72 | 35 | Adrian Georgescu | |
73 | 54 | Adrian Georgescu | Transformations are required to support the following functionality: |
74 | 32 | Adrian Georgescu | |
75 | 1 | Adrian Georgescu | 1. First degree watchers - access to entire PIDF |
76 | 56 | Adrian Georgescu | 1. Second degree watchers - access to subset of PIDF |
77 | 9 | Adrian Georgescu | 1. Third degree watchers - access to basic presence online/offline |
78 | 1 | Adrian Georgescu | |
79 | 59 | Adrian Georgescu | == Icon change == |
80 | 32 | Adrian Georgescu | |
81 | 68 | Adrian Georgescu | OMA has specified the use of XCAP server for icon 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] |
82 | 1 | Adrian Georgescu | |
83 | 59 | Adrian Georgescu | Publishing end-point: |
84 | 9 | Adrian Georgescu | |
85 | 1. Generate a new random filename: XYZ |
||
86 | 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 |
87 | 59 | Adrian Georgescu | 1. PUT the new icon document to XCAP server |
88 | 41 | Adrian Georgescu | 1. Update <icon> element of pidf and PUBLISH new pidf |
89 | 59 | Adrian Georgescu | 1. DELETE any previously uploaded icon file |
90 | 48 | Adrian Georgescu | |
91 | 56 | Adrian Georgescu | Subscribing end-point: |
92 | 1 | Adrian Georgescu | |
93 | 69 | Adrian Georgescu | 1. Parse <icon> element of pidf cipid extension received in Notify |
94 | 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 |
95 | 69 | Adrian Georgescu | 3. Cache picture until next Notify with diferent <icon> element is received |