| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Protocol::XMPP::IQ::Roster; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
176004
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
45
|
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
104
|
|
|
5
|
1
|
|
|
1
|
|
7
|
use parent qw(Protocol::XMPP::ElementBase); |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.007'; ## VERSION |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
Example from RFC3921: |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
id='bv1bs71f' |
|
19
|
|
|
|
|
|
|
type='get'> |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Response from server: |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
to='juliet@example.com/chamber' |
|
27
|
|
|
|
|
|
|
type='result'> |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
IQ start - stash current IQ on stream |
|
35
|
|
|
|
|
|
|
Query start - set IQ query type to xmlns |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Each item is parsed as a roster entry. |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
A roster request for a user that does not exist will return an error as follows: |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
to='juliet@example.com/chamber' |
|
43
|
|
|
|
|
|
|
type='error'> |
|
44
|
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/> |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Updates: |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
An update request is as follows: |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
id='rs1' |
|
56
|
|
|
|
|
|
|
type='set'> |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Pass C as the item attribute to remove rather than adding the contact. |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
More detailed example: |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
C:
|
|
67
|
|
|
|
|
|
|
id='ph1xaz53' |
|
68
|
|
|
|
|
|
|
type='set'> |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
-
|
|
71
|
|
|
|
|
|
|
name='Nurse'> |
|
72
|
|
|
|
|
|
|
Servants |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Server push requests can be sent through as follows: |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
to='juliet@example.com/chamber' |
|
80
|
|
|
|
|
|
|
type='set'> |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
with the client reponse being an empty result: |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
id='a78b4q6ha463' |
|
90
|
|
|
|
|
|
|
type='result'/> |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
Until the client sends the initial roster request, it will not receive any server push information. |
|
93
|
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Subscribe by sending something like this: |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
UC:
|
|
97
|
|
|
|
|
|
|
to='juliet@example.com' |
|
98
|
|
|
|
|
|
|
type='subscribe'/> |
|
99
|
|
|
|
|
|
|
Requesting a new contact will cause the server to send out an ask request: |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
US:
|
|
102
|
|
|
|
|
|
|
to='romeo@example.net/foo' |
|
103
|
|
|
|
|
|
|
type='set'> |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
-
|
|
106
|
|
|
|
|
|
|
jid='juliet@example.com' |
|
107
|
|
|
|
|
|
|
subscription='none'/> |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head1 METHODS |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=cut |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
1; |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
__END__ |