Commit | Line | Data |
---|---|---|
970ed795 | 1 | /****************************************************************************** |
3abe9331 | 2 | * Copyright (c) 2000-2015 Ericsson Telecom AB |
970ed795 EL |
3 | * All rights reserved. This program and the accompanying materials |
4 | * are made available under the terms of the Eclipse Public License v1.0 | |
5 | * which accompanies this distribution, and is available at | |
6 | * http://www.eclipse.org/legal/epl-v10.html | |
7 | ******************************************************************************/ | |
8 | // | |
9 | // File: http_jabber_org_protocol_pubsub_event.ttcn | |
10 | // Description: | |
11 | // References: | |
12 | // Rev: | |
13 | // Prodnr: | |
14 | // Updated: Sun Jan 6 13:51:49 2013 | |
15 | // Contact: http://ttcn.ericsson.se | |
16 | // | |
17 | //////////////////////////////////////////////////////////////////////////////// | |
18 | // | |
19 | // Generated from file(s): | |
20 | // | |
21 | // - pubsub#event.xsd | |
22 | // /* xml version = "1.0" encoding = "UTF-8" */ | |
23 | // /* targetnamespace = "http://jabber.org/protocol/pubsub#event" */ | |
24 | // | |
25 | //////////////////////////////////////////////////////////////////////////////// | |
26 | ||
27 | //////////////////////////////////////////////////////////////////////////////// | |
28 | // | |
29 | // | |
30 | //XEP-0060: Publish-Subscribe | |
31 | // | |
32 | // | |
33 | //////////////////////////////////////////////////////////////////////////////// | |
34 | ||
35 | ||
36 | module http_jabber_org_protocol_pubsub_event { | |
37 | ||
38 | ||
39 | import from XSD all; | |
40 | ||
41 | ||
42 | import from jabber_x_data all; | |
43 | ||
44 | ||
45 | /* xmlns:xdata='jabber:x:data' is needed to trick the converter */ | |
46 | ||
47 | ||
48 | /* The protocol documented by this schema is defined in | |
49 | XEP-0060: http://xmpp.org/extensions/xep-0060.html */ | |
50 | ||
51 | ||
52 | /* http://xmpp.org/schemas/x-data.xsd */ | |
53 | ||
54 | ||
55 | type record Event | |
56 | { | |
57 | union { | |
58 | Collection collection, | |
59 | Configuration configuration, | |
60 | Delete delete, | |
61 | Items items, | |
62 | Purge purge, | |
63 | Subscription subscription | |
64 | } choice | |
65 | } | |
66 | with { | |
67 | variant "name as uncapitalized"; | |
68 | variant "element"; | |
69 | variant (choice) "untagged"; | |
70 | }; | |
71 | ||
72 | ||
73 | type record Collection | |
74 | { | |
75 | XSD.String node optional, | |
76 | union { | |
77 | Associate associate, | |
78 | Disassociate disassociate | |
79 | } choice | |
80 | } | |
81 | with { | |
82 | variant "name as uncapitalized"; | |
83 | variant "element"; | |
84 | variant (node) "attribute"; | |
85 | variant (choice) "untagged"; | |
86 | }; | |
87 | ||
88 | ||
89 | type record Associate | |
90 | { | |
91 | XSD.String node//, | |
92 | //Empty base | |
93 | } | |
94 | with { | |
95 | variant "name as uncapitalized"; | |
96 | variant "element"; | |
97 | variant (node) "attribute"; | |
98 | //variant (base) "untagged"; | |
99 | }; | |
100 | ||
101 | ||
102 | type record Disassociate | |
103 | { | |
104 | XSD.String node//, | |
105 | //Empty base | |
106 | } | |
107 | with { | |
108 | variant "name as uncapitalized"; | |
109 | variant "element"; | |
110 | variant (node) "attribute"; | |
111 | //variant (base) "untagged"; | |
112 | }; | |
113 | ||
114 | ||
115 | type record Configuration | |
116 | { | |
117 | XSD.String node optional, | |
118 | record { | |
119 | X x | |
120 | } sequence optional | |
121 | } | |
122 | with { | |
123 | variant "name as uncapitalized"; | |
124 | variant "element"; | |
125 | variant (node) "attribute"; | |
126 | variant (sequence) "untagged"; | |
127 | variant (sequence.x) "namespace as 'jabber:x:data' prefix 'xdata'"; | |
128 | }; | |
129 | ||
130 | ||
131 | type record Delete | |
132 | { | |
133 | XSD.String node, | |
134 | Redirect redirect optional | |
135 | } | |
136 | with { | |
137 | variant "name as uncapitalized"; | |
138 | variant "element"; | |
139 | variant (node) "attribute"; | |
140 | }; | |
141 | ||
142 | ||
143 | type record Items | |
144 | { | |
145 | XSD.String node, | |
146 | union { | |
147 | record of Item item_list, | |
148 | record length(1 .. infinity) of Retract retract_list | |
149 | } choice | |
150 | } | |
151 | with { | |
152 | variant "name as uncapitalized"; | |
153 | variant "element"; | |
154 | variant (node) "attribute"; | |
155 | variant (choice) "untagged"; | |
156 | variant (choice.item_list) "untagged"; | |
157 | variant (choice.retract_list) "untagged"; | |
158 | }; | |
159 | ||
160 | ||
161 | type record Item | |
162 | { | |
163 | XSD.String id optional, | |
164 | XSD.String node optional, | |
165 | XSD.String publisher optional, | |
166 | union { | |
167 | XSD.String elem, | |
168 | XSD.String alma | |
169 | } choice optional | |
170 | } | |
171 | with { | |
172 | variant "name as uncapitalized"; | |
173 | variant "element"; | |
174 | variant (id) "attribute"; | |
175 | variant (node) "attribute"; | |
176 | variant (publisher) "attribute"; | |
177 | variant (choice) "untagged"; | |
178 | variant (choice.elem) "anyElement except unqualified, 'http://jabber.org/protocol/pubsub#event'"; | |
179 | }; | |
180 | ||
181 | ||
182 | type record Purge | |
183 | { | |
184 | XSD.String node//, | |
185 | //Empty base | |
186 | } | |
187 | with { | |
188 | variant "name as uncapitalized"; | |
189 | variant "element"; | |
190 | variant (node) "attribute"; | |
191 | //variant (base) "untagged"; | |
192 | }; | |
193 | ||
194 | ||
195 | type record Redirect | |
196 | { | |
197 | XSD.String uri//, | |
198 | //Empty base | |
199 | } | |
200 | with { | |
201 | variant "name as uncapitalized"; | |
202 | variant "element"; | |
203 | variant (uri) "attribute"; | |
204 | //variant (base) "untagged"; | |
205 | }; | |
206 | ||
207 | ||
208 | type record Retract | |
209 | { | |
210 | XSD.String id//, | |
211 | //Empty base | |
212 | } | |
213 | with { | |
214 | variant "name as uncapitalized"; | |
215 | variant "element"; | |
216 | variant (id) "attribute"; | |
217 | //variant (base) "untagged"; | |
218 | }; | |
219 | ||
220 | ||
221 | type record Subscription | |
222 | { | |
223 | XSD.DateTime expiry optional, | |
224 | XSD.String jid, | |
225 | XSD.String node optional, | |
226 | XSD.String subid optional, | |
227 | enumerated { | |
228 | none_, | |
229 | pending, | |
230 | subscribed, | |
231 | unconfigured | |
232 | } subscription optional//, | |
233 | //Empty base | |
234 | } | |
235 | with { | |
236 | variant "name as uncapitalized"; | |
237 | variant "element"; | |
238 | variant (expiry) "attribute"; | |
239 | variant (jid) "attribute"; | |
240 | variant (node) "attribute"; | |
241 | variant (subid) "attribute"; | |
242 | variant (subscription) "text 'none_' as 'none'"; | |
243 | variant (subscription) "attribute"; | |
244 | //variant (base) "untagged"; | |
245 | }; | |
246 | ||
247 | ||
248 | type enumerated Empty | |
249 | { | |
250 | x | |
251 | } | |
252 | with { | |
253 | variant "text 'x' as ''"; | |
254 | variant "name as uncapitalized"; | |
255 | }; | |
256 | ||
257 | ||
258 | } | |
259 | with { | |
260 | encode "XML"; | |
261 | variant "namespace as 'http://jabber.org/protocol/pubsub#event'"; | |
262 | variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; | |
263 | variant "elementFormQualified"; | |
264 | } |