Branch data Line data Source code
1 : : /* c/zx-wsc-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-wsc-data.h"
36 : : #define TPF zx_
37 : : #include "zx_ext_pt.h"
38 : :
39 : :
40 : :
41 : : int zx_DEC_ATTR_wsc_DerivedKeyToken(struct zx_ctx* c, struct zx_wsc_DerivedKeyToken_s* x)
42 : 0 : {
43 [ # # # ]: 0 : switch (x->gg.attr->g.tok) {
44 : 0 : case zx_Algorithm_ATTR: x->Algorithm = x->gg.attr; return 1;
45 : 0 : case zx_Id_ATTR|zx_wsu_NS: x->Id = x->gg.attr; return 1;
46 : :
47 : 0 : default: return 0;
48 : : }
49 : : }
50 : :
51 : : int zx_DEC_ELEM_wsc_DerivedKeyToken(struct zx_ctx* c, struct zx_wsc_DerivedKeyToken_s* x)
52 : 0 : {
53 : 0 : struct zx_elem_s* el = x->gg.kids;
54 [ # # # # : 0 : switch (el->g.tok) {
# # # # ]
55 : : case zx_wsse_SecurityTokenReference_ELEM:
56 [ # # ]: 0 : if (!x->SecurityTokenReference)
57 : 0 : x->SecurityTokenReference = (struct zx_wsse_SecurityTokenReference_s*)el;
58 : 0 : return 1;
59 : : case zx_wsc_Properties_ELEM:
60 [ # # ]: 0 : if (!x->Properties)
61 : 0 : x->Properties = (struct zx_wsc_Properties_s*)el;
62 : 0 : return 1;
63 : : case zx_wsc_Generation_ELEM:
64 [ # # ]: 0 : if (!x->Generation)
65 : 0 : x->Generation = el;
66 : 0 : return 1;
67 : : case zx_wsc_Offset_ELEM:
68 [ # # ]: 0 : if (!x->Offset)
69 : 0 : x->Offset = el;
70 : 0 : return 1;
71 : : case zx_wsc_Length_ELEM:
72 [ # # ]: 0 : if (!x->Length)
73 : 0 : x->Length = el;
74 : 0 : return 1;
75 : : case zx_wsc_Label_ELEM:
76 [ # # ]: 0 : if (!x->Label)
77 : 0 : x->Label = el;
78 : 0 : return 1;
79 : : case zx_wsc_Nonce_ELEM:
80 [ # # ]: 0 : if (!x->Nonce)
81 : 0 : x->Nonce = el;
82 : 0 : return 1;
83 : :
84 : 0 : default: return 0;
85 : : }
86 : : }
87 : :
88 : :
89 : :
90 : :
91 : : int zx_DEC_ATTR_wsc_Properties(struct zx_ctx* c, struct zx_wsc_Properties_s* x)
92 : 0 : {
93 : 0 : switch (x->gg.attr->g.tok) {
94 : :
95 : 0 : default: return 0;
96 : : }
97 : : }
98 : :
99 : : int zx_DEC_ELEM_wsc_Properties(struct zx_ctx* c, struct zx_wsc_Properties_s* x)
100 : 0 : {
101 : 0 : struct zx_elem_s* el = x->gg.kids;
102 : 0 : switch (el->g.tok) {
103 : :
104 : 0 : default: return 0;
105 : : }
106 : : }
107 : :
108 : :
109 : :
110 : :
111 : : int zx_DEC_ATTR_wsc_SecurityContextToken(struct zx_ctx* c, struct zx_wsc_SecurityContextToken_s* x)
112 : 0 : {
113 [ # # ]: 0 : switch (x->gg.attr->g.tok) {
114 : 0 : case zx_Id_ATTR|zx_wsu_NS: x->Id = x->gg.attr; return 1;
115 : :
116 : 0 : default: return 0;
117 : : }
118 : : }
119 : :
120 : : int zx_DEC_ELEM_wsc_SecurityContextToken(struct zx_ctx* c, struct zx_wsc_SecurityContextToken_s* x)
121 : 0 : {
122 : 0 : struct zx_elem_s* el = x->gg.kids;
123 : 0 : switch (el->g.tok) {
124 : :
125 : 0 : default: return 0;
126 : : }
127 : : }
128 : :
129 : :
130 : : /* EOF -- c/zx-wsc-dec.c */
|