1 /* c/zx-shps-dec.c - WARNING: This file was auto generated by xsd2sg.pl. DO NOT EDIT!
2  * $Id$ */
3 /* Code generation design Copyright (c) 2006 Sampo Kellomaki (sampo@iki.fi),
4  * All Rights Reserved. NO WARRANTY. See file COPYING for terms and conditions
5  * of use. Some aspects of code generation were driven by schema
6  * descriptions that were used as input and may be subject to their own copyright.
7  * Code generation uses a template, whose copyright statement follows. */
8 
9 /** dec-templ.c  -  XML decoder template, used in code generation
10  ** Copyright (c) 2010 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved.
11  ** Copyright (c) 2006-2007 Symlabs (symlabs@symlabs.com), All Rights Reserved.
12  ** Author: Sampo Kellomaki (sampo@iki.fi)
13  ** This is confidential unpublished proprietary source code of the author.
14  ** NO WARRANTY, not even implied warranties. Contains trade secrets.
15  ** Distribution prohibited unless authorized in writing.
16  ** Licensed under Apache License 2.0, see file COPYING.
17  ** Id: dec-templ.c,v 1.30 2008-10-04 23:42:14 sampo Exp $
18  **
19  ** 28.5.2006, created, Sampo Kellomaki (sampo@iki.fi)
20  ** 8.8.2006,  reworked namespace handling --Sampo
21  ** 12.8.2006, added special scanning of xmlns to avoid backtracking elem recognition --Sampo
22  ** 23.9.2006, added collection of WO information --Sampo
23  ** 21.6.2007, improved handling of undeclared namespace prefixes --Sampo
24  ** 27.10.2010, CSE refactoring, re-engineered namespace handling --Sampo
25  ** 21.11.2010, re-engineered to extract most code to zx_DEC_elem, leaving just switches --Sampo
26  **
27  ** N.B: This template is meant to be processed by pd/xsd2sg.pl. Beware
28  ** of special markers that xsd2sg.pl expects to find and understand.
29  **/
30 
31 #include "errmac.h"
32 #include "zx.h"
33 #include "c/zx-const.h"
34 #include "c/zx-data.h"
35 #include "c/zx-shps-data.h"
36 #define TPF zx_
37 #include "zx_ext_pt.h"
38 
39 
40 
zx_DEC_ATTR_shps_CallbackEPR(struct zx_ctx * c,struct zx_shps_CallbackEPR_s * x)41 int zx_DEC_ATTR_shps_CallbackEPR(struct zx_ctx* c, struct zx_shps_CallbackEPR_s* x)
42 {
43   switch (x->gg.attr->g.tok) {
44     case zx_ID_ATTR:  x->ID = x->gg.attr; return 1;
45     case zx_id_ATTR:  x->id = x->gg.attr; return 1;
46     case zx_notOnOrAfter_ATTR:  x->notOnOrAfter = x->gg.attr; return 1;
47     case zx_Id_ATTR|zx_wsu_NS:  x->Id = x->gg.attr; return 1;
48     case zx_actor_ATTR|zx_e_NS:  x->actor = x->gg.attr; return 1;
49     case zx_mustUnderstand_ATTR|zx_e_NS:  x->mustUnderstand = x->gg.attr; return 1;
50 
51   default: return 0;
52   }
53 }
54 
zx_DEC_ELEM_shps_CallbackEPR(struct zx_ctx * c,struct zx_shps_CallbackEPR_s * x)55 int zx_DEC_ELEM_shps_CallbackEPR(struct zx_ctx* c, struct zx_shps_CallbackEPR_s* x)
56 {
57   struct zx_elem_s* el = x->gg.kids;
58   switch (el->g.tok) {
59   case zx_a_Address_ELEM:
60     if (!x->Address)
61       x->Address = (struct zx_a_Address_s*)el;
62     return 1;
63   case zx_a_ReferenceParameters_ELEM:
64     if (!x->ReferenceParameters)
65       x->ReferenceParameters = (struct zx_a_ReferenceParameters_s*)el;
66     return 1;
67   case zx_a_Metadata_ELEM:
68     if (!x->Metadata)
69       x->Metadata = (struct zx_a_Metadata_s*)el;
70     return 1;
71   case zx_tas3_AltAddress_ELEM:
72     if (!x->AltAddress)
73       x->AltAddress = el;
74     return 1;
75 
76   default: return 0;
77   }
78 }
79 
80 
81 
82 
zx_DEC_ATTR_shps_Delete(struct zx_ctx * c,struct zx_shps_Delete_s * x)83 int zx_DEC_ATTR_shps_Delete(struct zx_ctx* c, struct zx_shps_Delete_s* x)
84 {
85   switch (x->gg.attr->g.tok) {
86 
87   default: return 0;
88   }
89 }
90 
zx_DEC_ELEM_shps_Delete(struct zx_ctx * c,struct zx_shps_Delete_s * x)91 int zx_DEC_ELEM_shps_Delete(struct zx_ctx* c, struct zx_shps_Delete_s* x)
92 {
93   struct zx_elem_s* el = x->gg.kids;
94   switch (el->g.tok) {
95   case zx_shps_ServiceHandle_ELEM:
96     if (!x->ServiceHandle)
97       x->ServiceHandle = el;
98     return 1;
99 
100   default: return 0;
101   }
102 }
103 
104 
105 
106 
zx_DEC_ATTR_shps_DeleteResponse(struct zx_ctx * c,struct zx_shps_DeleteResponse_s * x)107 int zx_DEC_ATTR_shps_DeleteResponse(struct zx_ctx* c, struct zx_shps_DeleteResponse_s* x)
108 {
109   switch (x->gg.attr->g.tok) {
110 
111   default: return 0;
112   }
113 }
114 
zx_DEC_ELEM_shps_DeleteResponse(struct zx_ctx * c,struct zx_shps_DeleteResponse_s * x)115 int zx_DEC_ELEM_shps_DeleteResponse(struct zx_ctx* c, struct zx_shps_DeleteResponse_s* x)
116 {
117   struct zx_elem_s* el = x->gg.kids;
118   switch (el->g.tok) {
119   case zx_lu_Status_ELEM:
120     if (!x->Status)
121       x->Status = (struct zx_lu_Status_s*)el;
122     return 1;
123 
124   default: return 0;
125   }
126 }
127 
128 
129 
130 
zx_DEC_ATTR_shps_GetStatus(struct zx_ctx * c,struct zx_shps_GetStatus_s * x)131 int zx_DEC_ATTR_shps_GetStatus(struct zx_ctx* c, struct zx_shps_GetStatus_s* x)
132 {
133   switch (x->gg.attr->g.tok) {
134 
135   default: return 0;
136   }
137 }
138 
zx_DEC_ELEM_shps_GetStatus(struct zx_ctx * c,struct zx_shps_GetStatus_s * x)139 int zx_DEC_ELEM_shps_GetStatus(struct zx_ctx* c, struct zx_shps_GetStatus_s* x)
140 {
141   struct zx_elem_s* el = x->gg.kids;
142   switch (el->g.tok) {
143   case zx_shps_ServiceHandle_ELEM:
144     if (!x->ServiceHandle)
145       x->ServiceHandle = el;
146     return 1;
147 
148   default: return 0;
149   }
150 }
151 
152 
153 
154 
zx_DEC_ATTR_shps_GetStatusResponse(struct zx_ctx * c,struct zx_shps_GetStatusResponse_s * x)155 int zx_DEC_ATTR_shps_GetStatusResponse(struct zx_ctx* c, struct zx_shps_GetStatusResponse_s* x)
156 {
157   switch (x->gg.attr->g.tok) {
158 
159   default: return 0;
160   }
161 }
162 
zx_DEC_ELEM_shps_GetStatusResponse(struct zx_ctx * c,struct zx_shps_GetStatusResponse_s * x)163 int zx_DEC_ELEM_shps_GetStatusResponse(struct zx_ctx* c, struct zx_shps_GetStatusResponse_s* x)
164 {
165   struct zx_elem_s* el = x->gg.kids;
166   switch (el->g.tok) {
167   case zx_lu_Status_ELEM:
168     if (!x->Status)
169       x->Status = (struct zx_lu_Status_s*)el;
170     return 1;
171   case zx_shps_GetStatusResponseItem_ELEM:
172     if (!x->GetStatusResponseItem)
173       x->GetStatusResponseItem = (struct zx_shps_GetStatusResponseItem_s*)el;
174     return 1;
175 
176   default: return 0;
177   }
178 }
179 
180 
181 
182 
zx_DEC_ATTR_shps_GetStatusResponseItem(struct zx_ctx * c,struct zx_shps_GetStatusResponseItem_s * x)183 int zx_DEC_ATTR_shps_GetStatusResponseItem(struct zx_ctx* c, struct zx_shps_GetStatusResponseItem_s* x)
184 {
185   switch (x->gg.attr->g.tok) {
186 
187   default: return 0;
188   }
189 }
190 
zx_DEC_ELEM_shps_GetStatusResponseItem(struct zx_ctx * c,struct zx_shps_GetStatusResponseItem_s * x)191 int zx_DEC_ELEM_shps_GetStatusResponseItem(struct zx_ctx* c, struct zx_shps_GetStatusResponseItem_s* x)
192 {
193   struct zx_elem_s* el = x->gg.kids;
194   switch (el->g.tok) {
195   case zx_shps_ServiceHandle_ELEM:
196     if (!x->ServiceHandle)
197       x->ServiceHandle = el;
198     return 1;
199   case zx_shps_ServiceStatus_ELEM:
200     if (!x->ServiceStatus)
201       x->ServiceStatus = el;
202     return 1;
203 
204   default: return 0;
205   }
206 }
207 
208 
209 
210 
zx_DEC_ATTR_shps_InvocationContext(struct zx_ctx * c,struct zx_shps_InvocationContext_s * x)211 int zx_DEC_ATTR_shps_InvocationContext(struct zx_ctx* c, struct zx_shps_InvocationContext_s* x)
212 {
213   switch (x->gg.attr->g.tok) {
214 
215   default: return 0;
216   }
217 }
218 
zx_DEC_ELEM_shps_InvocationContext(struct zx_ctx * c,struct zx_shps_InvocationContext_s * x)219 int zx_DEC_ELEM_shps_InvocationContext(struct zx_ctx* c, struct zx_shps_InvocationContext_s* x)
220 {
221   struct zx_elem_s* el = x->gg.kids;
222   switch (el->g.tok) {
223   case zx_shps_InvokingProvider_ELEM:
224     if (!x->InvokingProvider)
225       x->InvokingProvider = el;
226     return 1;
227   case zx_shps_InvokingPrincipal_ELEM:
228     if (!x->InvokingPrincipal)
229       x->InvokingPrincipal = el;
230     return 1;
231   case zx_di_SecurityMechID_ELEM:
232     if (!x->SecurityMechID)
233       x->SecurityMechID = el;
234     return 1;
235 
236   default: return 0;
237   }
238 }
239 
240 
241 
242 
zx_DEC_ATTR_shps_InvokeItem(struct zx_ctx * c,struct zx_shps_InvokeItem_s * x)243 int zx_DEC_ATTR_shps_InvokeItem(struct zx_ctx* c, struct zx_shps_InvokeItem_s* x)
244 {
245   switch (x->gg.attr->g.tok) {
246     case zx_itemID_ATTR:  x->itemID = x->gg.attr; return 1;
247 
248   default: return 0;
249   }
250 }
251 
zx_DEC_ELEM_shps_InvokeItem(struct zx_ctx * c,struct zx_shps_InvokeItem_s * x)252 int zx_DEC_ELEM_shps_InvokeItem(struct zx_ctx* c, struct zx_shps_InvokeItem_s* x)
253 {
254   struct zx_elem_s* el = x->gg.kids;
255   switch (el->g.tok) {
256   case zx_shps_ServiceHandle_ELEM:
257     if (!x->ServiceHandle)
258       x->ServiceHandle = el;
259     return 1;
260 
261   default: return 0;
262   }
263 }
264 
265 
266 
267 
zx_DEC_ATTR_shps_InvokeResponse(struct zx_ctx * c,struct zx_shps_InvokeResponse_s * x)268 int zx_DEC_ATTR_shps_InvokeResponse(struct zx_ctx* c, struct zx_shps_InvokeResponse_s* x)
269 {
270   switch (x->gg.attr->g.tok) {
271 
272   default: return 0;
273   }
274 }
275 
zx_DEC_ELEM_shps_InvokeResponse(struct zx_ctx * c,struct zx_shps_InvokeResponse_s * x)276 int zx_DEC_ELEM_shps_InvokeResponse(struct zx_ctx* c, struct zx_shps_InvokeResponse_s* x)
277 {
278   struct zx_elem_s* el = x->gg.kids;
279   switch (el->g.tok) {
280   case zx_lu_Status_ELEM:
281     if (!x->Status)
282       x->Status = (struct zx_lu_Status_s*)el;
283     return 1;
284   case zx_shps_InvokeResponseItem_ELEM:
285     if (!x->InvokeResponseItem)
286       x->InvokeResponseItem = (struct zx_shps_InvokeResponseItem_s*)el;
287     return 1;
288 
289   default: return 0;
290   }
291 }
292 
293 
294 
295 
zx_DEC_ATTR_shps_InvokeResponseItem(struct zx_ctx * c,struct zx_shps_InvokeResponseItem_s * x)296 int zx_DEC_ATTR_shps_InvokeResponseItem(struct zx_ctx* c, struct zx_shps_InvokeResponseItem_s* x)
297 {
298   switch (x->gg.attr->g.tok) {
299     case zx_ref_ATTR:  x->ref = x->gg.attr; return 1;
300 
301   default: return 0;
302   }
303 }
304 
zx_DEC_ELEM_shps_InvokeResponseItem(struct zx_ctx * c,struct zx_shps_InvokeResponseItem_s * x)305 int zx_DEC_ELEM_shps_InvokeResponseItem(struct zx_ctx* c, struct zx_shps_InvokeResponseItem_s* x)
306 {
307   struct zx_elem_s* el = x->gg.kids;
308   switch (el->g.tok) {
309 
310   default: return 0;
311   }
312 }
313 
314 
315 
316 
zx_DEC_ATTR_shps_Poll(struct zx_ctx * c,struct zx_shps_Poll_s * x)317 int zx_DEC_ATTR_shps_Poll(struct zx_ctx* c, struct zx_shps_Poll_s* x)
318 {
319   switch (x->gg.attr->g.tok) {
320     case zx_wait_ATTR:  x->wait = x->gg.attr; return 1;
321 
322   default: return 0;
323   }
324 }
325 
zx_DEC_ELEM_shps_Poll(struct zx_ctx * c,struct zx_shps_Poll_s * x)326 int zx_DEC_ELEM_shps_Poll(struct zx_ctx* c, struct zx_shps_Poll_s* x)
327 {
328   struct zx_elem_s* el = x->gg.kids;
329   switch (el->g.tok) {
330   case zx_a_Action_ELEM:
331     if (!x->Action)
332       x->Action = (struct zx_a_Action_s*)el;
333     return 1;
334   case zx_dp_Response_ELEM:
335     if (!x->Response)
336       x->Response = (struct zx_dp_Response_s*)el;
337     return 1;
338 
339   default: return 0;
340   }
341 }
342 
343 
344 
345 
zx_DEC_ATTR_shps_PollResponse(struct zx_ctx * c,struct zx_shps_PollResponse_s * x)346 int zx_DEC_ATTR_shps_PollResponse(struct zx_ctx* c, struct zx_shps_PollResponse_s* x)
347 {
348   switch (x->gg.attr->g.tok) {
349     case zx_nextPoll_ATTR:  x->nextPoll = x->gg.attr; return 1;
350 
351   default: return 0;
352   }
353 }
354 
zx_DEC_ELEM_shps_PollResponse(struct zx_ctx * c,struct zx_shps_PollResponse_s * x)355 int zx_DEC_ELEM_shps_PollResponse(struct zx_ctx* c, struct zx_shps_PollResponse_s* x)
356 {
357   struct zx_elem_s* el = x->gg.kids;
358   switch (el->g.tok) {
359   case zx_dp_Request_ELEM:
360     if (!x->Request)
361       x->Request = (struct zx_dp_Request_s*)el;
362     return 1;
363 
364   default: return 0;
365   }
366 }
367 
368 
369 
370 
zx_DEC_ATTR_shps_ProxyInvoke(struct zx_ctx * c,struct zx_shps_ProxyInvoke_s * x)371 int zx_DEC_ATTR_shps_ProxyInvoke(struct zx_ctx* c, struct zx_shps_ProxyInvoke_s* x)
372 {
373   switch (x->gg.attr->g.tok) {
374 
375   default: return 0;
376   }
377 }
378 
zx_DEC_ELEM_shps_ProxyInvoke(struct zx_ctx * c,struct zx_shps_ProxyInvoke_s * x)379 int zx_DEC_ELEM_shps_ProxyInvoke(struct zx_ctx* c, struct zx_shps_ProxyInvoke_s* x)
380 {
381   struct zx_elem_s* el = x->gg.kids;
382   switch (el->g.tok) {
383   case zx_shps_ProxyInvokeItem_ELEM:
384     if (!x->ProxyInvokeItem)
385       x->ProxyInvokeItem = (struct zx_shps_ProxyInvokeItem_s*)el;
386     return 1;
387 
388   default: return 0;
389   }
390 }
391 
392 
393 
394 
zx_DEC_ATTR_shps_ProxyInvokeItem(struct zx_ctx * c,struct zx_shps_ProxyInvokeItem_s * x)395 int zx_DEC_ATTR_shps_ProxyInvokeItem(struct zx_ctx* c, struct zx_shps_ProxyInvokeItem_s* x)
396 {
397   switch (x->gg.attr->g.tok) {
398     case zx_itemID_ATTR:  x->itemID = x->gg.attr; return 1;
399 
400   default: return 0;
401   }
402 }
403 
zx_DEC_ELEM_shps_ProxyInvokeItem(struct zx_ctx * c,struct zx_shps_ProxyInvokeItem_s * x)404 int zx_DEC_ELEM_shps_ProxyInvokeItem(struct zx_ctx* c, struct zx_shps_ProxyInvokeItem_s* x)
405 {
406   struct zx_elem_s* el = x->gg.kids;
407   switch (el->g.tok) {
408   case zx_shps_ServiceHandle_ELEM:
409     if (!x->ServiceHandle)
410       x->ServiceHandle = el;
411     return 1;
412   case zx_shps_InvocationContext_ELEM:
413     if (!x->InvocationContext)
414       x->InvocationContext = (struct zx_shps_InvocationContext_s*)el;
415     return 1;
416   case zx_shps_RequestHeaders_ELEM:
417     if (!x->RequestHeaders)
418       x->RequestHeaders = el;
419     return 1;
420 
421   default: return 0;
422   }
423 }
424 
425 
426 
427 
zx_DEC_ATTR_shps_ProxyInvokeResponse(struct zx_ctx * c,struct zx_shps_ProxyInvokeResponse_s * x)428 int zx_DEC_ATTR_shps_ProxyInvokeResponse(struct zx_ctx* c, struct zx_shps_ProxyInvokeResponse_s* x)
429 {
430   switch (x->gg.attr->g.tok) {
431 
432   default: return 0;
433   }
434 }
435 
zx_DEC_ELEM_shps_ProxyInvokeResponse(struct zx_ctx * c,struct zx_shps_ProxyInvokeResponse_s * x)436 int zx_DEC_ELEM_shps_ProxyInvokeResponse(struct zx_ctx* c, struct zx_shps_ProxyInvokeResponse_s* x)
437 {
438   struct zx_elem_s* el = x->gg.kids;
439   switch (el->g.tok) {
440   case zx_lu_Status_ELEM:
441     if (!x->Status)
442       x->Status = (struct zx_lu_Status_s*)el;
443     return 1;
444   case zx_shps_ProxyInvokeResponseItem_ELEM:
445     if (!x->ProxyInvokeResponseItem)
446       x->ProxyInvokeResponseItem = (struct zx_shps_ProxyInvokeResponseItem_s*)el;
447     return 1;
448 
449   default: return 0;
450   }
451 }
452 
453 
454 
455 
zx_DEC_ATTR_shps_ProxyInvokeResponseItem(struct zx_ctx * c,struct zx_shps_ProxyInvokeResponseItem_s * x)456 int zx_DEC_ATTR_shps_ProxyInvokeResponseItem(struct zx_ctx* c, struct zx_shps_ProxyInvokeResponseItem_s* x)
457 {
458   switch (x->gg.attr->g.tok) {
459     case zx_ref_ATTR:  x->ref = x->gg.attr; return 1;
460 
461   default: return 0;
462   }
463 }
464 
zx_DEC_ELEM_shps_ProxyInvokeResponseItem(struct zx_ctx * c,struct zx_shps_ProxyInvokeResponseItem_s * x)465 int zx_DEC_ELEM_shps_ProxyInvokeResponseItem(struct zx_ctx* c, struct zx_shps_ProxyInvokeResponseItem_s* x)
466 {
467   struct zx_elem_s* el = x->gg.kids;
468   switch (el->g.tok) {
469   case zx_shps_ServiceHandle_ELEM:
470     if (!x->ServiceHandle)
471       x->ServiceHandle = el;
472     return 1;
473   case zx_shps_ResponseHeaders_ELEM:
474     if (!x->ResponseHeaders)
475       x->ResponseHeaders = el;
476     return 1;
477 
478   default: return 0;
479   }
480 }
481 
482 
483 
484 
zx_DEC_ATTR_shps_Query(struct zx_ctx * c,struct zx_shps_Query_s * x)485 int zx_DEC_ATTR_shps_Query(struct zx_ctx* c, struct zx_shps_Query_s* x)
486 {
487   switch (x->gg.attr->g.tok) {
488 
489   default: return 0;
490   }
491 }
492 
zx_DEC_ELEM_shps_Query(struct zx_ctx * c,struct zx_shps_Query_s * x)493 int zx_DEC_ELEM_shps_Query(struct zx_ctx* c, struct zx_shps_Query_s* x)
494 {
495   struct zx_elem_s* el = x->gg.kids;
496   switch (el->g.tok) {
497   case zx_di_RequestedService_ELEM:
498     if (!x->RequestedService)
499       x->RequestedService = (struct zx_di_RequestedService_s*)el;
500     return 1;
501 
502   default: return 0;
503   }
504 }
505 
506 
507 
508 
zx_DEC_ATTR_shps_QueryRegistered(struct zx_ctx * c,struct zx_shps_QueryRegistered_s * x)509 int zx_DEC_ATTR_shps_QueryRegistered(struct zx_ctx* c, struct zx_shps_QueryRegistered_s* x)
510 {
511   switch (x->gg.attr->g.tok) {
512 
513   default: return 0;
514   }
515 }
516 
zx_DEC_ELEM_shps_QueryRegistered(struct zx_ctx * c,struct zx_shps_QueryRegistered_s * x)517 int zx_DEC_ELEM_shps_QueryRegistered(struct zx_ctx* c, struct zx_shps_QueryRegistered_s* x)
518 {
519   struct zx_elem_s* el = x->gg.kids;
520   switch (el->g.tok) {
521   case zx_shps_ServiceHandle_ELEM:
522     if (!x->ServiceHandle)
523       x->ServiceHandle = el;
524     return 1;
525 
526   default: return 0;
527   }
528 }
529 
530 
531 
532 
zx_DEC_ATTR_shps_QueryRegisteredResponse(struct zx_ctx * c,struct zx_shps_QueryRegisteredResponse_s * x)533 int zx_DEC_ATTR_shps_QueryRegisteredResponse(struct zx_ctx* c, struct zx_shps_QueryRegisteredResponse_s* x)
534 {
535   switch (x->gg.attr->g.tok) {
536 
537   default: return 0;
538   }
539 }
540 
zx_DEC_ELEM_shps_QueryRegisteredResponse(struct zx_ctx * c,struct zx_shps_QueryRegisteredResponse_s * x)541 int zx_DEC_ELEM_shps_QueryRegisteredResponse(struct zx_ctx* c, struct zx_shps_QueryRegisteredResponse_s* x)
542 {
543   struct zx_elem_s* el = x->gg.kids;
544   switch (el->g.tok) {
545   case zx_lu_Status_ELEM:
546     if (!x->Status)
547       x->Status = (struct zx_lu_Status_s*)el;
548     return 1;
549   case zx_a_EndpointReference_ELEM:
550     if (!x->EndpointReference)
551       x->EndpointReference = (struct zx_a_EndpointReference_s*)el;
552     return 1;
553 
554   default: return 0;
555   }
556 }
557 
558 
559 
560 
zx_DEC_ATTR_shps_QueryResponse(struct zx_ctx * c,struct zx_shps_QueryResponse_s * x)561 int zx_DEC_ATTR_shps_QueryResponse(struct zx_ctx* c, struct zx_shps_QueryResponse_s* x)
562 {
563   switch (x->gg.attr->g.tok) {
564 
565   default: return 0;
566   }
567 }
568 
zx_DEC_ELEM_shps_QueryResponse(struct zx_ctx * c,struct zx_shps_QueryResponse_s * x)569 int zx_DEC_ELEM_shps_QueryResponse(struct zx_ctx* c, struct zx_shps_QueryResponse_s* x)
570 {
571   struct zx_elem_s* el = x->gg.kids;
572   switch (el->g.tok) {
573   case zx_lu_Status_ELEM:
574     if (!x->Status)
575       x->Status = (struct zx_lu_Status_s*)el;
576     return 1;
577   case zx_a_EndpointReference_ELEM:
578     if (!x->EndpointReference)
579       x->EndpointReference = (struct zx_a_EndpointReference_s*)el;
580     return 1;
581 
582   default: return 0;
583   }
584 }
585 
586 
587 
588 
zx_DEC_ATTR_shps_Register(struct zx_ctx * c,struct zx_shps_Register_s * x)589 int zx_DEC_ATTR_shps_Register(struct zx_ctx* c, struct zx_shps_Register_s* x)
590 {
591   switch (x->gg.attr->g.tok) {
592 
593   default: return 0;
594   }
595 }
596 
zx_DEC_ELEM_shps_Register(struct zx_ctx * c,struct zx_shps_Register_s * x)597 int zx_DEC_ELEM_shps_Register(struct zx_ctx* c, struct zx_shps_Register_s* x)
598 {
599   struct zx_elem_s* el = x->gg.kids;
600   switch (el->g.tok) {
601   case zx_a_EndpointReference_ELEM:
602     if (!x->EndpointReference)
603       x->EndpointReference = (struct zx_a_EndpointReference_s*)el;
604     return 1;
605 
606   default: return 0;
607   }
608 }
609 
610 
611 
612 
zx_DEC_ATTR_shps_RegisterResponse(struct zx_ctx * c,struct zx_shps_RegisterResponse_s * x)613 int zx_DEC_ATTR_shps_RegisterResponse(struct zx_ctx* c, struct zx_shps_RegisterResponse_s* x)
614 {
615   switch (x->gg.attr->g.tok) {
616 
617   default: return 0;
618   }
619 }
620 
zx_DEC_ELEM_shps_RegisterResponse(struct zx_ctx * c,struct zx_shps_RegisterResponse_s * x)621 int zx_DEC_ELEM_shps_RegisterResponse(struct zx_ctx* c, struct zx_shps_RegisterResponse_s* x)
622 {
623   struct zx_elem_s* el = x->gg.kids;
624   switch (el->g.tok) {
625   case zx_lu_Status_ELEM:
626     if (!x->Status)
627       x->Status = (struct zx_lu_Status_s*)el;
628     return 1;
629   case zx_shps_RegisterResponseItem_ELEM:
630     if (!x->RegisterResponseItem)
631       x->RegisterResponseItem = (struct zx_shps_RegisterResponseItem_s*)el;
632     return 1;
633 
634   default: return 0;
635   }
636 }
637 
638 
639 
640 
zx_DEC_ATTR_shps_RegisterResponseItem(struct zx_ctx * c,struct zx_shps_RegisterResponseItem_s * x)641 int zx_DEC_ATTR_shps_RegisterResponseItem(struct zx_ctx* c, struct zx_shps_RegisterResponseItem_s* x)
642 {
643   switch (x->gg.attr->g.tok) {
644     case zx_ref_ATTR:  x->ref = x->gg.attr; return 1;
645 
646   default: return 0;
647   }
648 }
649 
zx_DEC_ELEM_shps_RegisterResponseItem(struct zx_ctx * c,struct zx_shps_RegisterResponseItem_s * x)650 int zx_DEC_ELEM_shps_RegisterResponseItem(struct zx_ctx* c, struct zx_shps_RegisterResponseItem_s* x)
651 {
652   struct zx_elem_s* el = x->gg.kids;
653   switch (el->g.tok) {
654   case zx_shps_ServiceHandle_ELEM:
655     if (!x->ServiceHandle)
656       x->ServiceHandle = el;
657     return 1;
658 
659   default: return 0;
660   }
661 }
662 
663 
664 
665 
zx_DEC_ATTR_shps_SetStatus(struct zx_ctx * c,struct zx_shps_SetStatus_s * x)666 int zx_DEC_ATTR_shps_SetStatus(struct zx_ctx* c, struct zx_shps_SetStatus_s* x)
667 {
668   switch (x->gg.attr->g.tok) {
669 
670   default: return 0;
671   }
672 }
673 
zx_DEC_ELEM_shps_SetStatus(struct zx_ctx * c,struct zx_shps_SetStatus_s * x)674 int zx_DEC_ELEM_shps_SetStatus(struct zx_ctx* c, struct zx_shps_SetStatus_s* x)
675 {
676   struct zx_elem_s* el = x->gg.kids;
677   switch (el->g.tok) {
678   case zx_shps_SetStatusItem_ELEM:
679     if (!x->SetStatusItem)
680       x->SetStatusItem = (struct zx_shps_SetStatusItem_s*)el;
681     return 1;
682 
683   default: return 0;
684   }
685 }
686 
687 
688 
689 
zx_DEC_ATTR_shps_SetStatusItem(struct zx_ctx * c,struct zx_shps_SetStatusItem_s * x)690 int zx_DEC_ATTR_shps_SetStatusItem(struct zx_ctx* c, struct zx_shps_SetStatusItem_s* x)
691 {
692   switch (x->gg.attr->g.tok) {
693     case zx_itemID_ATTR:  x->itemID = x->gg.attr; return 1;
694 
695   default: return 0;
696   }
697 }
698 
zx_DEC_ELEM_shps_SetStatusItem(struct zx_ctx * c,struct zx_shps_SetStatusItem_s * x)699 int zx_DEC_ELEM_shps_SetStatusItem(struct zx_ctx* c, struct zx_shps_SetStatusItem_s* x)
700 {
701   struct zx_elem_s* el = x->gg.kids;
702   switch (el->g.tok) {
703   case zx_shps_ServiceStatus_ELEM:
704     if (!x->ServiceStatus)
705       x->ServiceStatus = el;
706     return 1;
707   case zx_shps_ServiceHandle_ELEM:
708     if (!x->ServiceHandle)
709       x->ServiceHandle = el;
710     return 1;
711 
712   default: return 0;
713   }
714 }
715 
716 
717 
718 
zx_DEC_ATTR_shps_SetStatusResponse(struct zx_ctx * c,struct zx_shps_SetStatusResponse_s * x)719 int zx_DEC_ATTR_shps_SetStatusResponse(struct zx_ctx* c, struct zx_shps_SetStatusResponse_s* x)
720 {
721   switch (x->gg.attr->g.tok) {
722 
723   default: return 0;
724   }
725 }
726 
zx_DEC_ELEM_shps_SetStatusResponse(struct zx_ctx * c,struct zx_shps_SetStatusResponse_s * x)727 int zx_DEC_ELEM_shps_SetStatusResponse(struct zx_ctx* c, struct zx_shps_SetStatusResponse_s* x)
728 {
729   struct zx_elem_s* el = x->gg.kids;
730   switch (el->g.tok) {
731   case zx_lu_Status_ELEM:
732     if (!x->Status)
733       x->Status = (struct zx_lu_Status_s*)el;
734     return 1;
735 
736   default: return 0;
737   }
738 }
739 
740 
741 
742 
zx_DEC_ATTR_shps_Update(struct zx_ctx * c,struct zx_shps_Update_s * x)743 int zx_DEC_ATTR_shps_Update(struct zx_ctx* c, struct zx_shps_Update_s* x)
744 {
745   switch (x->gg.attr->g.tok) {
746 
747   default: return 0;
748   }
749 }
750 
zx_DEC_ELEM_shps_Update(struct zx_ctx * c,struct zx_shps_Update_s * x)751 int zx_DEC_ELEM_shps_Update(struct zx_ctx* c, struct zx_shps_Update_s* x)
752 {
753   struct zx_elem_s* el = x->gg.kids;
754   switch (el->g.tok) {
755   case zx_shps_UpdateItem_ELEM:
756     if (!x->UpdateItem)
757       x->UpdateItem = (struct zx_shps_UpdateItem_s*)el;
758     return 1;
759 
760   default: return 0;
761   }
762 }
763 
764 
765 
766 
zx_DEC_ATTR_shps_UpdateItem(struct zx_ctx * c,struct zx_shps_UpdateItem_s * x)767 int zx_DEC_ATTR_shps_UpdateItem(struct zx_ctx* c, struct zx_shps_UpdateItem_s* x)
768 {
769   switch (x->gg.attr->g.tok) {
770     case zx_itemID_ATTR:  x->itemID = x->gg.attr; return 1;
771 
772   default: return 0;
773   }
774 }
775 
zx_DEC_ELEM_shps_UpdateItem(struct zx_ctx * c,struct zx_shps_UpdateItem_s * x)776 int zx_DEC_ELEM_shps_UpdateItem(struct zx_ctx* c, struct zx_shps_UpdateItem_s* x)
777 {
778   struct zx_elem_s* el = x->gg.kids;
779   switch (el->g.tok) {
780   case zx_shps_ServiceHandle_ELEM:
781     if (!x->ServiceHandle)
782       x->ServiceHandle = el;
783     return 1;
784   case zx_a_EndpointReference_ELEM:
785     if (!x->EndpointReference)
786       x->EndpointReference = (struct zx_a_EndpointReference_s*)el;
787     return 1;
788 
789   default: return 0;
790   }
791 }
792 
793 
794 
795 
zx_DEC_ATTR_shps_UpdateResponse(struct zx_ctx * c,struct zx_shps_UpdateResponse_s * x)796 int zx_DEC_ATTR_shps_UpdateResponse(struct zx_ctx* c, struct zx_shps_UpdateResponse_s* x)
797 {
798   switch (x->gg.attr->g.tok) {
799 
800   default: return 0;
801   }
802 }
803 
zx_DEC_ELEM_shps_UpdateResponse(struct zx_ctx * c,struct zx_shps_UpdateResponse_s * x)804 int zx_DEC_ELEM_shps_UpdateResponse(struct zx_ctx* c, struct zx_shps_UpdateResponse_s* x)
805 {
806   struct zx_elem_s* el = x->gg.kids;
807   switch (el->g.tok) {
808   case zx_lu_Status_ELEM:
809     if (!x->Status)
810       x->Status = (struct zx_lu_Status_s*)el;
811     return 1;
812 
813   default: return 0;
814   }
815 }
816 
817 
818 /* EOF -- c/zx-shps-dec.c */
819