DesignBuddyList » History » Version 58
Adrian Georgescu, 01/28/2010 01:00 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 | |||
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 | * GET XCAP application xcap-caps |
||
21 | 58 | Adrian Georgescu | * For each document returned by above step, 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 | |||
24 | 57 | Adrian Georgescu | If ''account.presence.enable_publish'' is enabled |
25 | 1 | Adrian Georgescu | |
26 | * If '''pidf-manipulation''' application is supported by XCAP server, update the '''presentity''' with the PIDF stored on the XCAP server |
||
27 | * 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 | * Initialize '''watchers list''' for Event presence |
||
33 | 54 | Adrian Georgescu | * Send Subscribe for ''presence.winfo'' |
34 | |||
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 | |||
41 | * Put the content of ''Subscription List'' initialized above to the XCAP document '''rls-services''' identified by account-buddies@domain |
||
42 | |||
43 | If ''account.presence.subscribe_presence'' is enabled |
||
44 | |||
45 | * If '''account.presence.subscribe_rls_services''' is True send Subscribe for event presence , and header Supported: eventlist to account-buddies@domai |
||
46 | * Else for each contact in the ''Contacts Lists'' send Subscribe for event presence |
||
47 | |||
48 | 54 | Adrian Georgescu | While running |
49 | |||
50 | * Refresh the XCAP server location based on DNS TTL |
||
51 | 1 | Adrian Georgescu | * Reload XCAP documents based on '''xcap-diff''' NOTIFYs |
52 | |||
53 | == Contacts List == |
||
54 | 48 | Adrian Georgescu | |
55 | 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. |
56 | 54 | Adrian Georgescu | |
57 | 57 | Adrian Georgescu | For some contacts we SUBSCRIBE for '''Event: presence'''. We must mark each recipient ion the list for which we subscribe. |
58 | |||
59 | 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. |
||
60 | |||
61 | 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). |
62 | |||
63 | 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'''. |
||
64 | |||
65 | * The contacts list is stored in the main '''resource-lists''' XCAP document '''index''' |
||
66 | * Maintain a '''presentity''' attribute with what is received in the Notify for presence for each contact |
||
67 | * On contacts list change, PUT resource-lists and rls-services documents on the XCAP server |
||
68 | |||
69 | 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 |
||
70 | |||
71 | 56 | Adrian Georgescu | == Policy == |
72 | 53 | Adrian Georgescu | |
73 | 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 |
74 | 54 | Adrian Georgescu | * PUT '''pres-rules''' document on the XCAP server and cache it locally |
75 | 53 | Adrian Georgescu | |
76 | 1 | Adrian Georgescu | Transformations are required to support the following functionality: |
77 | 54 | Adrian Georgescu | |
78 | 1 | Adrian Georgescu | 1. First degree watchers - access to entire PIDF |
79 | 35 | Adrian Georgescu | 1. Second degree watchers - access to subset of PIDF |
80 | 54 | Adrian Georgescu | 1. Third degree watchers - access to basic presence online/offline |
81 | 32 | Adrian Georgescu | |
82 | 56 | Adrian Georgescu | == Icon == |
83 | 1 | Adrian Georgescu | |
84 | 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] |
85 | 1 | Adrian Georgescu | |
86 | Publishing end-point, on boot: |
||
87 | 9 | Adrian Georgescu | |
88 | 1 | Adrian Georgescu | 1. HTTP GET for xcap-directory and locate previously uploaded icon (e.g. ABC) |
89 | 1. HTTP GET http://xcap.example.com/xcap-root/org.openmobilealliance.pres-content/users/sip:alice@example.com/oma_status-icon/ABC |
||
90 | 32 | Adrian Georgescu | |
91 | 9 | Adrian Georgescu | Publishing end-point, on icon change: |
92 | 1 | Adrian Georgescu | |
93 | 32 | Adrian Georgescu | 1. Generate a new random filename: XYZ |
94 | 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 |
95 | 1. HTTP PUT to xcap server |
||
96 | 41 | Adrian Georgescu | 1. Update <icon> element of pidf and PUBLISH new pidf |
97 | 1. HTTP DELETE any previous icon file ABC |
||
98 | |||
99 | 1 | Adrian Georgescu | Subscribing end-point: |
100 | 48 | Adrian Georgescu | |
101 | 56 | Adrian Georgescu | 1. Parse <icon> element of pidf cipid extension received in Notify |
102 | 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 |
103 | 3. Cache picture until next NOTIFY with diferent <icon> element is received |
||
104 | |||
105 |