XCAP-samples » History » Version 5
Adrian Georgescu, 12/13/2012 09:27 AM
1 | 3 | Adrian Georgescu | h1. XCAP samples |
---|---|---|---|
2 | 1 | Adrian Georgescu | |
3 | 2 | Adrian Georgescu | h2. Presence rules |
4 | 1 | Adrian Georgescu | |
5 | <pre> |
||
6 | <?xml version="1.0" ?> |
||
7 | <cp:ruleset xmlns:cp="urn:ietf:params:xml:ns:common-policy" xmlns:ocp="urn:oma:xml:xdm:common-policy" xmlns:pr="urn:ietf:params:xml:ns:pres-rules"> |
||
8 | <cp:rule id="wp_prs_grantedcontacts"> |
||
9 | <cp:conditions> |
||
10 | <ocp:external-list> |
||
11 | <ocp:entry anc="https%3A//xcap.test.sipthor.net/xcap-root/resource-lists/users/sip%3Aag%40test.sip2sip.info/index/%7E%7E/resource-lists/list%5B%40name%3D%22oma_grantedcontacts%22%5D"/> |
||
12 | </ocp:external-list> |
||
13 | </cp:conditions> |
||
14 | <cp:actions> |
||
15 | <pr:sub-handling> |
||
16 | allow |
||
17 | </pr:sub-handling> |
||
18 | </cp:actions> |
||
19 | </cp:rule> |
||
20 | <cp:rule id="wp_prs_blockedcontacts"> |
||
21 | <cp:conditions> |
||
22 | <ocp:external-list> |
||
23 | <ocp:entry anc="https%3A//xcap.test.sipthor.net/xcap-root/resource-lists/users/sip%3Aag%40test.sip2sip.info/index/%7E%7E/resource-lists/list%5B%40name%3D%22oma_blockedcontacts%22%5D"/> |
||
24 | </ocp:external-list> |
||
25 | </cp:conditions> |
||
26 | <cp:actions> |
||
27 | <pr:sub-handling> |
||
28 | polite-block |
||
29 | </pr:sub-handling> |
||
30 | </cp:actions> |
||
31 | </cp:rule> |
||
32 | <cp:rule id="wp_prs_unlisted"> |
||
33 | <cp:conditions> |
||
34 | <ocp:other-identity/> |
||
35 | </cp:conditions> |
||
36 | <cp:actions> |
||
37 | <pr:sub-handling> |
||
38 | confirm |
||
39 | </pr:sub-handling> |
||
40 | </cp:actions> |
||
41 | </cp:rule> |
||
42 | <cp:rule id="wp_prs_block_anonymous"> |
||
43 | <cp:conditions> |
||
44 | <ocp:anonymous-request/> |
||
45 | </cp:conditions> |
||
46 | <cp:actions> |
||
47 | <pr:sub-handling> |
||
48 | block |
||
49 | </pr:sub-handling> |
||
50 | </cp:actions> |
||
51 | </cp:rule> |
||
52 | <cp:rule id="wp_prs_allow_own"> |
||
53 | <cp:conditions> |
||
54 | <cp:identity> |
||
55 | <cp:one id="sip%3Aag%40test.sip2sip.info"/> |
||
56 | </cp:identity> |
||
57 | </cp:conditions> |
||
58 | <cp:actions> |
||
59 | <pr:sub-handling> |
||
60 | allow |
||
61 | </pr:sub-handling> |
||
62 | </cp:actions> |
||
63 | </cp:rule> |
||
64 | </cp:ruleset> |
||
65 | </pre> |
||
66 | 4 | Adrian Georgescu | |
67 | h2. RLS services |
||
68 | |||
69 | <pre> |
||
70 | <?xml version="1.0" ?> |
||
71 | <rls-services xmlns="urn:ietf:params:xml:ns:rls-services"> |
||
72 | <service uri="sip%3Aag%2Bpresence%40test.sip2sip.info"> |
||
73 | <resource-list> |
||
74 | https%3A//xcap.test.sipthor.net/xcap-root/resource-lists/users/sip%3Aag%40test.sip2sip.info/index/%7E%7E/resource-lists/list%5B%40name%3D%22sipsimple_presence_rls%22%5D |
||
75 | </resource-list> |
||
76 | <packages> |
||
77 | <package> |
||
78 | presence |
||
79 | </package> |
||
80 | </packages> |
||
81 | </service> |
||
82 | <service uri="sip%3Aag%2Bdialog%40test.sip2sip.info"> |
||
83 | <resource-list> |
||
84 | https%3A//xcap.test.sipthor.net/xcap-root/resource-lists/users/sip%3Aag%40test.sip2sip.info/index/%7E%7E/resource-lists/list%5B%40name%3D%22sipsimple_dialog_rls%22%5D |
||
85 | </resource-list> |
||
86 | <packages> |
||
87 | <package> |
||
88 | dialog |
||
89 | </package> |
||
90 | </packages> |
||
91 | </service> |
||
92 | </rls-services> |
||
93 | </pre> |
||
94 | 5 | Adrian Georgescu | |
95 | h2. Status icon |
||
96 | |||
97 | <pre> |
||
98 | <?xml version='1.0' encoding='UTF-8'?> |
||
99 | <content xmlns="urn:oma:xml:prs:pres-content"><mime-type>image/png</mime-type><encoding>base64</encoding><data>iVBORw0KGgoAAAANSUhEUgAAAEkAAABJCAIAAAD+EZyLAAAl10lEQVRoBVWb2Y8l133fa791116n |
||
100 | Z+lZOTMiOaQoSqIoyQYs2Q8K5E0ykCDIS/KYfyDIW/6GwO8BogCxFQRGNsVJ5NixY4EyKXPRUCJn |
||
101 | 4Uz39PS+3L59t9qXfL6nekSlpud23apT5/yW72891fb3v/ul2q7s2rEsy+ZX7VQ2pzq3LMfc4otr |
||
102 | rlVcsbmh8QzQtbquzYke18M8pGfNcJ1Y3Kis86/Nrdq2eJyRzUK1FmIYY5jZcisIqLjY/GtuVVbt |
||
103 | W35plc1gLrIuj3DdtiFSRPOsjgqC9LuuK08cWO75DY12LKc0N/UBlZ/T5XBa85AebK7DKfzq4Dnb |
||
104 | hTixwrq63wzhvsi0HbNq7XBSlPO0iOdJmZVpnjPAC/xuN+z3Qt9zCrcUNfxAFoRpLn2prJLlEUsF |
||
105 | ... |
||
106 | iSDi1AJEJkMAk8EagYW9Q/O3j+dwg0IpUK6BFweywGv/P8HB6Yn10+vLAAAAAElFTkSuQmCC |
||
107 | </data></content> |
||
108 | </pre> |