Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_preg.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 6942 : _PUBLIC_ enum ndr_err_code ndr_push_preg_entry(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct preg_entry *r)
8 : {
9 : {
10 6942 : libndr_flags _flags_save_STRUCT = ndr->flags;
11 6942 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
12 6942 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
13 6942 : if (ndr_flags & NDR_SCALARS) {
14 6942 : NDR_CHECK(ndr_push_align(ndr, 8));
15 6942 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "[", 2, sizeof(uint8_t), CH_DOS));
16 : {
17 6942 : libndr_flags _flags_save_string = ndr->flags;
18 6942 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
19 6942 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->keyname));
20 6942 : ndr->flags = _flags_save_string;
21 : }
22 6942 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, ";", 2, sizeof(uint8_t), CH_DOS));
23 : {
24 6942 : libndr_flags _flags_save_string = ndr->flags;
25 6942 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
26 6942 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->valuename));
27 6942 : ndr->flags = _flags_save_string;
28 : }
29 6942 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, ";", 2, sizeof(uint8_t), CH_DOS));
30 6942 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->type));
31 6942 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, ";", 2, sizeof(uint8_t), CH_DOS));
32 6942 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_winreg_Data_GPO(&r->data, r->type, ndr->flags)));
33 6942 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, ";", 2, sizeof(uint8_t), CH_DOS));
34 : {
35 6942 : libndr_flags _flags_save_winreg_Data_GPO = ndr->flags;
36 6942 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
37 : {
38 0 : struct ndr_push *_ndr_data;
39 6942 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_data, 0, ndr_size_winreg_Data_GPO(&r->data, r->type, ndr->flags)));
40 6942 : NDR_CHECK(ndr_push_set_switch_value(_ndr_data, &r->data, r->type));
41 6942 : NDR_CHECK(ndr_push_winreg_Data_GPO(_ndr_data, NDR_SCALARS|NDR_BUFFERS, &r->data));
42 6942 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_data, 0, ndr_size_winreg_Data_GPO(&r->data, r->type, ndr->flags)));
43 : }
44 6942 : ndr->flags = _flags_save_winreg_Data_GPO;
45 : }
46 6942 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "]", 2, sizeof(uint8_t), CH_DOS));
47 6942 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
48 : }
49 6942 : if (ndr_flags & NDR_BUFFERS) {
50 : {
51 0 : libndr_flags _flags_save_winreg_Data_GPO = ndr->flags;
52 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
53 0 : ndr->flags = _flags_save_winreg_Data_GPO;
54 : }
55 : }
56 6942 : ndr->flags = _flags_save_STRUCT;
57 : }
58 6942 : return NDR_ERR_SUCCESS;
59 : }
60 :
61 29938 : _PUBLIC_ enum ndr_err_code ndr_pull_preg_entry(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct preg_entry *r)
62 : {
63 29938 : uint32_t size__opening_bracket_0 = 0;
64 29938 : uint32_t size__sep1_0 = 0;
65 29938 : uint32_t size__sep2_0 = 0;
66 29938 : uint32_t size__sep3_0 = 0;
67 29938 : uint32_t size__sep4_0 = 0;
68 29938 : uint32_t size__closing_bracket_0 = 0;
69 : {
70 29938 : libndr_flags _flags_save_STRUCT = ndr->flags;
71 29938 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
72 29938 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
73 29938 : if (ndr_flags & NDR_SCALARS) {
74 29938 : NDR_CHECK(ndr_pull_align(ndr, 8));
75 29938 : size__opening_bracket_0 = 2;
76 29938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_opening_bracket, size__opening_bracket_0, sizeof(uint8_t), CH_DOS));
77 : {
78 29938 : libndr_flags _flags_save_string = ndr->flags;
79 29938 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
80 29938 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->keyname));
81 29938 : ndr->flags = _flags_save_string;
82 : }
83 29938 : size__sep1_0 = 2;
84 29938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_sep1, size__sep1_0, sizeof(uint8_t), CH_DOS));
85 : {
86 29938 : libndr_flags _flags_save_string = ndr->flags;
87 29938 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
88 29938 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->valuename));
89 29938 : ndr->flags = _flags_save_string;
90 : }
91 29938 : size__sep2_0 = 2;
92 29938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_sep2, size__sep2_0, sizeof(uint8_t), CH_DOS));
93 29938 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->type));
94 29938 : size__sep3_0 = 2;
95 29938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_sep3, size__sep3_0, sizeof(uint8_t), CH_DOS));
96 29938 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
97 29938 : size__sep4_0 = 2;
98 29938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_sep4, size__sep4_0, sizeof(uint8_t), CH_DOS));
99 : {
100 29938 : libndr_flags _flags_save_winreg_Data_GPO = ndr->flags;
101 29938 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
102 : {
103 0 : struct ndr_pull *_ndr_data;
104 29938 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_data, 0, r->size));
105 29938 : NDR_CHECK(ndr_pull_set_switch_value(_ndr_data, &r->data, r->type));
106 29938 : NDR_CHECK(ndr_pull_winreg_Data_GPO(_ndr_data, NDR_SCALARS|NDR_BUFFERS, &r->data));
107 29938 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_data, 0, r->size));
108 : }
109 29938 : ndr->flags = _flags_save_winreg_Data_GPO;
110 : }
111 29938 : size__closing_bracket_0 = 2;
112 29938 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->_closing_bracket, size__closing_bracket_0, sizeof(uint8_t), CH_DOS));
113 29938 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
114 : }
115 29938 : if (ndr_flags & NDR_BUFFERS) {
116 : {
117 0 : libndr_flags _flags_save_winreg_Data_GPO = ndr->flags;
118 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
119 0 : ndr->flags = _flags_save_winreg_Data_GPO;
120 : }
121 : }
122 29938 : ndr->flags = _flags_save_STRUCT;
123 : }
124 29938 : return NDR_ERR_SUCCESS;
125 : }
126 :
127 0 : static void ndr_print_flags_preg_entry(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct preg_entry *r)
128 : {
129 0 : ndr_print_preg_entry(ndr, name, r);
130 0 : }
131 :
132 0 : _PUBLIC_ void ndr_print_preg_entry(struct ndr_print *ndr, const char *name, const struct preg_entry *r)
133 : {
134 0 : ndr_print_struct(ndr, name, "preg_entry");
135 0 : if (r == NULL) { ndr_print_null(ndr); return; }
136 : {
137 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
138 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
139 0 : ndr->depth++;
140 : {
141 0 : libndr_flags _flags_save_string = ndr->flags;
142 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
143 0 : ndr_print_string(ndr, "keyname", r->keyname);
144 0 : ndr->flags = _flags_save_string;
145 : }
146 : {
147 0 : libndr_flags _flags_save_string = ndr->flags;
148 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
149 0 : ndr_print_string(ndr, "valuename", r->valuename);
150 0 : ndr->flags = _flags_save_string;
151 : }
152 0 : ndr_print_winreg_Type(ndr, "type", r->type);
153 0 : ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_winreg_Data_GPO(&r->data, r->type, ndr->flags):r->size);
154 : {
155 0 : libndr_flags _flags_save_winreg_Data_GPO = ndr->flags;
156 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
157 0 : ndr_print_set_switch_value(ndr, &r->data, r->type);
158 0 : ndr_print_winreg_Data_GPO(ndr, "data", &r->data);
159 0 : ndr->flags = _flags_save_winreg_Data_GPO;
160 : }
161 0 : ndr->depth--;
162 0 : ndr->flags = _flags_save_STRUCT;
163 : }
164 : }
165 :
166 202 : _PUBLIC_ enum ndr_err_code ndr_push_preg_header(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct preg_header *r)
167 : {
168 202 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
169 202 : if (ndr_flags & NDR_SCALARS) {
170 202 : NDR_CHECK(ndr_push_align(ndr, 4));
171 202 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "PReg", 4, sizeof(uint8_t), CH_DOS));
172 202 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
173 202 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
174 : }
175 202 : if (ndr_flags & NDR_BUFFERS) {
176 0 : }
177 202 : return NDR_ERR_SUCCESS;
178 : }
179 :
180 2096 : _PUBLIC_ enum ndr_err_code ndr_pull_preg_header(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct preg_header *r)
181 : {
182 2096 : uint32_t size_signature_0 = 0;
183 2096 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
184 2096 : if (ndr_flags & NDR_SCALARS) {
185 2096 : NDR_CHECK(ndr_pull_align(ndr, 4));
186 2096 : size_signature_0 = 4;
187 2096 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->signature, size_signature_0, sizeof(uint8_t), CH_DOS));
188 2096 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
189 2096 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
190 : }
191 2096 : if (ndr_flags & NDR_BUFFERS) {
192 0 : }
193 2096 : return NDR_ERR_SUCCESS;
194 : }
195 :
196 0 : static void ndr_print_flags_preg_header(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct preg_header *r)
197 : {
198 0 : ndr_print_preg_header(ndr, name, r);
199 0 : }
200 :
201 0 : _PUBLIC_ void ndr_print_preg_header(struct ndr_print *ndr, const char *name, const struct preg_header *r)
202 : {
203 0 : ndr_print_struct(ndr, name, "preg_header");
204 0 : if (r == NULL) { ndr_print_null(ndr); return; }
205 0 : ndr->depth++;
206 0 : ndr_print_string(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"PReg":r->signature);
207 0 : ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->version);
208 0 : ndr->depth--;
209 : }
210 :
211 0 : static void ndr_print_flags_preg_file(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct preg_file *r)
212 : {
213 0 : ndr_print_preg_file(ndr, name, r);
214 0 : }
215 :
216 0 : _PUBLIC_ void ndr_print_preg_file(struct ndr_print *ndr, const char *name, const struct preg_file *r)
217 : {
218 0 : uint32_t cntr_entries_0;
219 0 : ndr_print_struct(ndr, name, "preg_file");
220 0 : if (r == NULL) { ndr_print_null(ndr); return; }
221 : {
222 0 : libndr_flags _flags_save_STRUCT = ndr->flags;
223 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
224 0 : ndr->depth++;
225 0 : ndr_print_preg_header(ndr, "header", &r->header);
226 0 : ndr_print_uint32(ndr, "num_entries", r->num_entries);
227 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "entries", (uint32_t)(r->num_entries));
228 0 : ndr->depth++;
229 0 : for (cntr_entries_0 = 0; cntr_entries_0 < (r->num_entries); cntr_entries_0++) {
230 0 : ndr_print_preg_entry(ndr, "entries", &r->entries[cntr_entries_0]);
231 : }
232 0 : ndr->depth--;
233 0 : ndr->depth--;
234 0 : ndr->flags = _flags_save_STRUCT;
235 : }
236 : }
237 :
238 : #ifndef SKIP_NDR_TABLE_preg
239 : static const struct ndr_interface_public_struct preg_public_structs[] = {
240 : {
241 : .name = "preg_entry",
242 : .struct_size = sizeof(struct preg_entry ),
243 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_preg_entry,
244 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_preg_entry,
245 : .ndr_print = (ndr_print_function_t) ndr_print_flags_preg_entry,
246 : },
247 : {
248 : .name = "preg_header",
249 : .struct_size = sizeof(struct preg_header ),
250 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_preg_header,
251 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_preg_header,
252 : .ndr_print = (ndr_print_function_t) ndr_print_flags_preg_header,
253 : },
254 : {
255 : .name = "preg_file",
256 : .struct_size = sizeof(struct preg_file ),
257 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_preg_file,
258 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_preg_file,
259 : .ndr_print = (ndr_print_function_t) ndr_print_flags_preg_file,
260 : },
261 : { .name = NULL }
262 : };
263 :
264 : static const struct ndr_interface_call preg_calls[] = {
265 : { .name = NULL }
266 : };
267 :
268 : static const char * const preg_endpoint_strings[] = {
269 : "ncacn_np:[\\pipe\\preg]",
270 : };
271 :
272 : static const struct ndr_interface_string_array preg_endpoints = {
273 : .count = 1,
274 : .names = preg_endpoint_strings
275 : };
276 :
277 : static const char * const preg_authservice_strings[] = {
278 : "host",
279 : };
280 :
281 : static const struct ndr_interface_string_array preg_authservices = {
282 : .count = 1,
283 : .names = preg_authservice_strings
284 : };
285 :
286 :
287 : const struct ndr_interface_table ndr_table_preg = {
288 : .name = "preg",
289 : .syntax_id = {
290 : {0x67655250,0x0000,0x0000,{0x00,0x00},{0x00,0x00,0x00,0x00}},
291 : NDR_PREG_VERSION
292 : },
293 : .helpstring = NDR_PREG_HELPSTRING,
294 : .num_calls = 0,
295 : .calls = preg_calls,
296 : .num_public_structs = 3,
297 : .public_structs = preg_public_structs,
298 : .endpoints = &preg_endpoints,
299 : .authservices = &preg_authservices
300 : };
301 :
302 : #endif /* SKIP_NDR_TABLE_preg */
|