Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_cab.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 0 : static enum ndr_err_code ndr_push_cf_flags(struct ndr_push *ndr, int ndr_flags, uint16_t r)
8 : {
9 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
10 0 : return NDR_ERR_SUCCESS;
11 : }
12 :
13 0 : static enum ndr_err_code ndr_pull_cf_flags(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
14 : {
15 : uint16_t v;
16 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
17 0 : *r = v;
18 0 : return NDR_ERR_SUCCESS;
19 : }
20 :
21 0 : _PUBLIC_ void ndr_print_cf_flags(struct ndr_print *ndr, const char *name, uint16_t r)
22 : {
23 0 : ndr_print_uint16(ndr, name, r);
24 0 : ndr->depth++;
25 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "cfhdrPREV_CABINET", cfhdrPREV_CABINET, r);
26 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "cfhdrNEXT_CABINET", cfhdrNEXT_CABINET, r);
27 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "cfhdrRESERVE_PRESENT", cfhdrRESERVE_PRESENT, r);
28 0 : ndr->depth--;
29 0 : }
30 :
31 0 : _PUBLIC_ enum ndr_err_code ndr_push_CFHEADER(struct ndr_push *ndr, int ndr_flags, const struct CFHEADER *r)
32 : {
33 : {
34 0 : uint32_t _flags_save_STRUCT = ndr->flags;
35 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
36 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
37 0 : if (ndr_flags & NDR_SCALARS) {
38 0 : NDR_CHECK(ndr_push_align(ndr, 4));
39 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "MSCF", 4, sizeof(uint8_t), CH_DOS));
40 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
41 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cbCabinet));
42 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
43 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cFolders * 8 + 36));
44 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
45 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 3));
46 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, 1));
47 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->cFolders));
48 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->cFiles));
49 0 : NDR_CHECK(ndr_push_cf_flags(ndr, NDR_SCALARS, r->flags));
50 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->setID));
51 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->iCabinet));
52 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
53 : }
54 0 : if (ndr_flags & NDR_BUFFERS) {
55 : }
56 0 : ndr->flags = _flags_save_STRUCT;
57 : }
58 0 : return NDR_ERR_SUCCESS;
59 : }
60 :
61 0 : _PUBLIC_ enum ndr_err_code ndr_pull_CFHEADER(struct ndr_pull *ndr, int ndr_flags, struct CFHEADER *r)
62 : {
63 0 : uint32_t size_signature_0 = 0;
64 : {
65 0 : uint32_t _flags_save_STRUCT = ndr->flags;
66 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
67 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
68 0 : if (ndr_flags & NDR_SCALARS) {
69 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
70 0 : size_signature_0 = 4;
71 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->signature, size_signature_0, sizeof(uint8_t), CH_DOS));
72 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
73 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cbCabinet));
74 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
75 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->coffFiles));
76 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
77 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->versionMinor));
78 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->versionMajor));
79 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->cFolders));
80 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->cFiles));
81 0 : NDR_CHECK(ndr_pull_cf_flags(ndr, NDR_SCALARS, &r->flags));
82 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->setID));
83 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->iCabinet));
84 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
85 : }
86 0 : if (ndr_flags & NDR_BUFFERS) {
87 : }
88 0 : ndr->flags = _flags_save_STRUCT;
89 : }
90 0 : return NDR_ERR_SUCCESS;
91 : }
92 :
93 0 : static void ndr_print_flags_CFHEADER(struct ndr_print *ndr, const char *name, int unused, const struct CFHEADER *r)
94 : {
95 0 : ndr_print_CFHEADER(ndr, name, r);
96 0 : }
97 :
98 0 : _PUBLIC_ void ndr_print_CFHEADER(struct ndr_print *ndr, const char *name, const struct CFHEADER *r)
99 : {
100 0 : ndr_print_struct(ndr, name, "CFHEADER");
101 0 : if (r == NULL) { ndr_print_null(ndr); return; }
102 : {
103 0 : uint32_t _flags_save_STRUCT = ndr->flags;
104 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
105 0 : ndr->depth++;
106 0 : ndr_print_string(ndr, "signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"MSCF":r->signature);
107 0 : ndr_print_uint32(ndr, "reserved1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved1);
108 0 : ndr_print_uint32(ndr, "cbCabinet", r->cbCabinet);
109 0 : ndr_print_uint32(ndr, "reserved2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved2);
110 0 : ndr_print_uint32(ndr, "coffFiles", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->cFolders * 8 + 36:r->coffFiles);
111 0 : ndr_print_uint32(ndr, "reserved3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->reserved3);
112 0 : ndr_print_uint8(ndr, "versionMinor", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?3:r->versionMinor);
113 0 : ndr_print_uint8(ndr, "versionMajor", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->versionMajor);
114 0 : ndr_print_uint16(ndr, "cFolders", r->cFolders);
115 0 : ndr_print_uint16(ndr, "cFiles", r->cFiles);
116 0 : ndr_print_cf_flags(ndr, "flags", r->flags);
117 0 : ndr_print_uint16(ndr, "setID", r->setID);
118 0 : ndr_print_uint16(ndr, "iCabinet", r->iCabinet);
119 0 : ndr->depth--;
120 0 : ndr->flags = _flags_save_STRUCT;
121 : }
122 : }
123 :
124 0 : static enum ndr_err_code ndr_push_cf_compress_type(struct ndr_push *ndr, int ndr_flags, enum cf_compress_type r)
125 : {
126 0 : NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
127 0 : return NDR_ERR_SUCCESS;
128 : }
129 :
130 0 : static enum ndr_err_code ndr_pull_cf_compress_type(struct ndr_pull *ndr, int ndr_flags, enum cf_compress_type *r)
131 : {
132 : uint16_t v;
133 0 : NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
134 0 : *r = v;
135 0 : return NDR_ERR_SUCCESS;
136 : }
137 :
138 0 : _PUBLIC_ void ndr_print_cf_compress_type(struct ndr_print *ndr, const char *name, enum cf_compress_type r)
139 : {
140 0 : const char *val = NULL;
141 :
142 0 : switch (r) {
143 0 : case CF_COMPRESS_NONE: val = "CF_COMPRESS_NONE"; break;
144 0 : case CF_COMPRESS_MSZIP: val = "CF_COMPRESS_MSZIP"; break;
145 0 : case CF_COMPRESS_LZX: val = "CF_COMPRESS_LZX"; break;
146 : }
147 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
148 0 : }
149 :
150 0 : _PUBLIC_ enum ndr_err_code ndr_push_CFFOLDER(struct ndr_push *ndr, int ndr_flags, const struct CFFOLDER *r)
151 : {
152 : {
153 0 : uint32_t _flags_save_STRUCT = ndr->flags;
154 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
155 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
156 0 : if (ndr_flags & NDR_SCALARS) {
157 0 : NDR_CHECK(ndr_push_align(ndr, 4));
158 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->coffCabStart));
159 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->cCFData));
160 0 : NDR_CHECK(ndr_push_cf_compress_type(ndr, NDR_SCALARS, r->typeCompress));
161 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
162 : }
163 0 : if (ndr_flags & NDR_BUFFERS) {
164 : }
165 0 : ndr->flags = _flags_save_STRUCT;
166 : }
167 0 : return NDR_ERR_SUCCESS;
168 : }
169 :
170 0 : _PUBLIC_ enum ndr_err_code ndr_pull_CFFOLDER(struct ndr_pull *ndr, int ndr_flags, struct CFFOLDER *r)
171 : {
172 : {
173 0 : uint32_t _flags_save_STRUCT = ndr->flags;
174 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
175 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
176 0 : if (ndr_flags & NDR_SCALARS) {
177 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
178 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->coffCabStart));
179 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->cCFData));
180 0 : NDR_CHECK(ndr_pull_cf_compress_type(ndr, NDR_SCALARS, &r->typeCompress));
181 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
182 : }
183 0 : if (ndr_flags & NDR_BUFFERS) {
184 : }
185 0 : ndr->flags = _flags_save_STRUCT;
186 : }
187 0 : return NDR_ERR_SUCCESS;
188 : }
189 :
190 0 : static void ndr_print_flags_CFFOLDER(struct ndr_print *ndr, const char *name, int unused, const struct CFFOLDER *r)
191 : {
192 0 : ndr_print_CFFOLDER(ndr, name, r);
193 0 : }
194 :
195 0 : _PUBLIC_ void ndr_print_CFFOLDER(struct ndr_print *ndr, const char *name, const struct CFFOLDER *r)
196 : {
197 0 : ndr_print_struct(ndr, name, "CFFOLDER");
198 0 : if (r == NULL) { ndr_print_null(ndr); return; }
199 : {
200 0 : uint32_t _flags_save_STRUCT = ndr->flags;
201 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
202 0 : ndr->depth++;
203 0 : ndr_print_uint32(ndr, "coffCabStart", r->coffCabStart);
204 0 : ndr_print_uint16(ndr, "cCFData", r->cCFData);
205 0 : ndr_print_cf_compress_type(ndr, "typeCompress", r->typeCompress);
206 0 : ndr->depth--;
207 0 : ndr->flags = _flags_save_STRUCT;
208 : }
209 : }
210 :
211 0 : static enum ndr_err_code ndr_push_cf_attributes(struct ndr_push *ndr, int ndr_flags, uint16_t r)
212 : {
213 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
214 0 : return NDR_ERR_SUCCESS;
215 : }
216 :
217 0 : static enum ndr_err_code ndr_pull_cf_attributes(struct ndr_pull *ndr, int ndr_flags, uint16_t *r)
218 : {
219 : uint16_t v;
220 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
221 0 : *r = v;
222 0 : return NDR_ERR_SUCCESS;
223 : }
224 :
225 0 : _PUBLIC_ void ndr_print_cf_attributes(struct ndr_print *ndr, const char *name, uint16_t r)
226 : {
227 0 : ndr_print_uint16(ndr, name, r);
228 0 : ndr->depth++;
229 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "_A_RDONLY", _A_RDONLY, r);
230 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "_A_HIDDEN", _A_HIDDEN, r);
231 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "_A_SYSTEM", _A_SYSTEM, r);
232 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "_A_ARCH", _A_ARCH, r);
233 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "_A_EXEC", _A_EXEC, r);
234 0 : ndr_print_bitmap_flag(ndr, sizeof(uint16_t), "_A_NAME_IS_UTF", _A_NAME_IS_UTF, r);
235 0 : ndr->depth--;
236 0 : }
237 :
238 0 : static enum ndr_err_code ndr_push_cf_date(struct ndr_push *ndr, int ndr_flags, const struct cf_date *r)
239 : {
240 : {
241 0 : uint32_t _flags_save_STRUCT = ndr->flags;
242 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
243 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
244 0 : if (ndr_flags & NDR_SCALARS) {
245 0 : NDR_CHECK(ndr_push_align(ndr, 2));
246 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->date));
247 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
248 : }
249 0 : if (ndr_flags & NDR_BUFFERS) {
250 : }
251 0 : ndr->flags = _flags_save_STRUCT;
252 : }
253 0 : return NDR_ERR_SUCCESS;
254 : }
255 :
256 0 : static enum ndr_err_code ndr_pull_cf_date(struct ndr_pull *ndr, int ndr_flags, struct cf_date *r)
257 : {
258 : {
259 0 : uint32_t _flags_save_STRUCT = ndr->flags;
260 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
261 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
262 0 : if (ndr_flags & NDR_SCALARS) {
263 0 : NDR_CHECK(ndr_pull_align(ndr, 2));
264 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->date));
265 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
266 : }
267 0 : if (ndr_flags & NDR_BUFFERS) {
268 : }
269 0 : ndr->flags = _flags_save_STRUCT;
270 : }
271 0 : return NDR_ERR_SUCCESS;
272 : }
273 :
274 0 : static enum ndr_err_code ndr_push_cf_time(struct ndr_push *ndr, int ndr_flags, const struct cf_time *r)
275 : {
276 : {
277 0 : uint32_t _flags_save_STRUCT = ndr->flags;
278 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
279 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
280 0 : if (ndr_flags & NDR_SCALARS) {
281 0 : NDR_CHECK(ndr_push_align(ndr, 2));
282 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->time));
283 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 2));
284 : }
285 0 : if (ndr_flags & NDR_BUFFERS) {
286 : }
287 0 : ndr->flags = _flags_save_STRUCT;
288 : }
289 0 : return NDR_ERR_SUCCESS;
290 : }
291 :
292 0 : static enum ndr_err_code ndr_pull_cf_time(struct ndr_pull *ndr, int ndr_flags, struct cf_time *r)
293 : {
294 : {
295 0 : uint32_t _flags_save_STRUCT = ndr->flags;
296 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN);
297 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
298 0 : if (ndr_flags & NDR_SCALARS) {
299 0 : NDR_CHECK(ndr_pull_align(ndr, 2));
300 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->time));
301 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
302 : }
303 0 : if (ndr_flags & NDR_BUFFERS) {
304 : }
305 0 : ndr->flags = _flags_save_STRUCT;
306 : }
307 0 : return NDR_ERR_SUCCESS;
308 : }
309 :
310 0 : _PUBLIC_ enum ndr_err_code ndr_push_CFFILE(struct ndr_push *ndr, int ndr_flags, const struct CFFILE *r)
311 : {
312 : {
313 0 : uint32_t _flags_save_STRUCT = ndr->flags;
314 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
315 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
316 0 : if (ndr_flags & NDR_SCALARS) {
317 0 : NDR_CHECK(ndr_push_align(ndr, 4));
318 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cbFile));
319 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uoffFolderStart));
320 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->iFolder));
321 0 : NDR_CHECK(ndr_push_cf_date(ndr, NDR_SCALARS, &r->date));
322 0 : NDR_CHECK(ndr_push_cf_time(ndr, NDR_SCALARS, &r->time));
323 0 : NDR_CHECK(ndr_push_cf_attributes(ndr, NDR_SCALARS, r->attribs));
324 : {
325 0 : uint32_t _flags_save_string = ndr->flags;
326 0 : ndr_set_flags(&ndr->flags, r->attribs&_A_NAME_IS_UTF?LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM:LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
327 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->szName));
328 0 : ndr->flags = _flags_save_string;
329 : }
330 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
331 : }
332 0 : if (ndr_flags & NDR_BUFFERS) {
333 : }
334 0 : ndr->flags = _flags_save_STRUCT;
335 : }
336 0 : return NDR_ERR_SUCCESS;
337 : }
338 :
339 0 : _PUBLIC_ enum ndr_err_code ndr_pull_CFFILE(struct ndr_pull *ndr, int ndr_flags, struct CFFILE *r)
340 : {
341 : {
342 0 : uint32_t _flags_save_STRUCT = ndr->flags;
343 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
344 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
345 0 : if (ndr_flags & NDR_SCALARS) {
346 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
347 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cbFile));
348 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uoffFolderStart));
349 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->iFolder));
350 0 : NDR_CHECK(ndr_pull_cf_date(ndr, NDR_SCALARS, &r->date));
351 0 : NDR_CHECK(ndr_pull_cf_time(ndr, NDR_SCALARS, &r->time));
352 0 : NDR_CHECK(ndr_pull_cf_attributes(ndr, NDR_SCALARS, &r->attribs));
353 : {
354 0 : uint32_t _flags_save_string = ndr->flags;
355 0 : ndr_set_flags(&ndr->flags, r->attribs&_A_NAME_IS_UTF?LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM:LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
356 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->szName));
357 0 : ndr->flags = _flags_save_string;
358 : }
359 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
360 : }
361 0 : if (ndr_flags & NDR_BUFFERS) {
362 : }
363 0 : ndr->flags = _flags_save_STRUCT;
364 : }
365 0 : return NDR_ERR_SUCCESS;
366 : }
367 :
368 0 : static void ndr_print_flags_CFFILE(struct ndr_print *ndr, const char *name, int unused, const struct CFFILE *r)
369 : {
370 0 : ndr_print_CFFILE(ndr, name, r);
371 0 : }
372 :
373 0 : _PUBLIC_ void ndr_print_CFFILE(struct ndr_print *ndr, const char *name, const struct CFFILE *r)
374 : {
375 0 : ndr_print_struct(ndr, name, "CFFILE");
376 0 : if (r == NULL) { ndr_print_null(ndr); return; }
377 : {
378 0 : uint32_t _flags_save_STRUCT = ndr->flags;
379 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
380 0 : ndr->depth++;
381 0 : ndr_print_uint32(ndr, "cbFile", r->cbFile);
382 0 : ndr_print_uint32(ndr, "uoffFolderStart", r->uoffFolderStart);
383 0 : ndr_print_uint16(ndr, "iFolder", r->iFolder);
384 0 : ndr_print_cf_date(ndr, "date", &r->date);
385 0 : ndr_print_cf_time(ndr, "time", &r->time);
386 0 : ndr_print_cf_attributes(ndr, "attribs", r->attribs);
387 : {
388 0 : uint32_t _flags_save_string = ndr->flags;
389 0 : ndr_set_flags(&ndr->flags, r->attribs&_A_NAME_IS_UTF?LIBNDR_FLAG_STR_UTF8|LIBNDR_FLAG_STR_NULLTERM:LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
390 0 : ndr_print_string(ndr, "szName", r->szName);
391 0 : ndr->flags = _flags_save_string;
392 : }
393 0 : ndr->depth--;
394 0 : ndr->flags = _flags_save_STRUCT;
395 : }
396 : }
397 :
398 0 : _PUBLIC_ size_t ndr_size_CFFILE(const struct CFFILE *r, int flags)
399 : {
400 0 : flags |= LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN;
401 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_CFFILE);
402 : }
403 :
404 0 : _PUBLIC_ void ndr_print_CFDATA(struct ndr_print *ndr, const char *name, const struct CFDATA *r)
405 : {
406 0 : ndr_print_struct(ndr, name, "CFDATA");
407 0 : if (r == NULL) { ndr_print_null(ndr); return; }
408 : {
409 0 : uint32_t _flags_save_STRUCT = ndr->flags;
410 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
411 0 : ndr->depth++;
412 0 : ndr_print_uint32(ndr, "csum", r->csum);
413 0 : ndr_print_uint16(ndr, "cbData", r->cbData);
414 0 : ndr_print_uint16(ndr, "cbUncomp", r->cbUncomp);
415 0 : ndr_print_DATA_BLOB(ndr, "ab", r->ab);
416 0 : ndr->depth--;
417 0 : ndr->flags = _flags_save_STRUCT;
418 : }
419 : }
420 :
421 0 : static void ndr_print_flags_cab_file(struct ndr_print *ndr, const char *name, int unused, const struct cab_file *r)
422 : {
423 0 : ndr_print_cab_file(ndr, name, r);
424 0 : }
425 :
426 0 : _PUBLIC_ void ndr_print_cab_file(struct ndr_print *ndr, const char *name, const struct cab_file *r)
427 : {
428 : uint32_t cntr_cffolders_0;
429 : uint32_t cntr_cffiles_0;
430 : uint32_t cntr_cfdata_0;
431 0 : ndr_print_struct(ndr, name, "cab_file");
432 0 : if (r == NULL) { ndr_print_null(ndr); return; }
433 : {
434 0 : uint32_t _flags_save_STRUCT = ndr->flags;
435 0 : ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX|LIBNDR_FLAG_LITTLE_ENDIAN|LIBNDR_FLAG_NOALIGN);
436 0 : ndr->depth++;
437 0 : ndr_print_CFHEADER(ndr, "cfheader", &r->cfheader);
438 0 : ndr->print(ndr, "%s: ARRAY(%d)", "cffolders", (int)r->cfheader.cFolders);
439 0 : ndr->depth++;
440 0 : for (cntr_cffolders_0 = 0; cntr_cffolders_0 < (r->cfheader.cFolders); cntr_cffolders_0++) {
441 0 : ndr_print_CFFOLDER(ndr, "cffolders", &r->cffolders[cntr_cffolders_0]);
442 : }
443 0 : ndr->depth--;
444 0 : ndr->print(ndr, "%s: ARRAY(%d)", "cffiles", (int)r->cfheader.cFiles);
445 0 : ndr->depth++;
446 0 : for (cntr_cffiles_0 = 0; cntr_cffiles_0 < (r->cfheader.cFiles); cntr_cffiles_0++) {
447 0 : ndr_print_CFFILE(ndr, "cffiles", &r->cffiles[cntr_cffiles_0]);
448 : }
449 0 : ndr->depth--;
450 0 : ndr->print(ndr, "%s: ARRAY(%d)", "cfdata", (int)r->cfdata_count);
451 0 : ndr->depth++;
452 0 : for (cntr_cfdata_0 = 0; cntr_cfdata_0 < (r->cfdata_count); cntr_cfdata_0++) {
453 0 : ndr_print_CFDATA(ndr, "cfdata", &r->cfdata[cntr_cfdata_0]);
454 : }
455 0 : ndr->depth--;
456 0 : ndr->depth--;
457 0 : ndr->flags = _flags_save_STRUCT;
458 : }
459 : }
460 :
461 : #ifndef SKIP_NDR_TABLE_cab
462 : static const struct ndr_interface_public_struct cab_public_structs[] = {
463 : {
464 : .name = "CFHEADER",
465 : .struct_size = sizeof(struct CFHEADER ),
466 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CFHEADER,
467 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CFHEADER,
468 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CFHEADER,
469 : },
470 : {
471 : .name = "CFFOLDER",
472 : .struct_size = sizeof(struct CFFOLDER ),
473 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CFFOLDER,
474 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CFFOLDER,
475 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CFFOLDER,
476 : },
477 : {
478 : .name = "CFFILE",
479 : .struct_size = sizeof(struct CFFILE ),
480 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_CFFILE,
481 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_CFFILE,
482 : .ndr_print = (ndr_print_function_t) ndr_print_flags_CFFILE,
483 : },
484 : {
485 : .name = "cab_file",
486 : .struct_size = sizeof(struct cab_file ),
487 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_cab_file,
488 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_cab_file,
489 : .ndr_print = (ndr_print_function_t) ndr_print_flags_cab_file,
490 : },
491 : { .name = NULL }
492 : };
493 :
494 : static const struct ndr_interface_call cab_calls[] = {
495 : { .name = NULL }
496 : };
497 :
498 : static const char * const cab_endpoint_strings[] = {
499 : "ncacn_np:[\\pipe\\cab]",
500 : };
501 :
502 : static const struct ndr_interface_string_array cab_endpoints = {
503 : .count = 1,
504 : .names = cab_endpoint_strings
505 : };
506 :
507 : static const char * const cab_authservice_strings[] = {
508 : "host",
509 : };
510 :
511 : static const struct ndr_interface_string_array cab_authservices = {
512 : .count = 1,
513 : .names = cab_authservice_strings
514 : };
515 :
516 :
517 : const struct ndr_interface_table ndr_table_cab = {
518 : .name = "cab",
519 : .syntax_id = {
520 : {0x12345678,0x0000,0x0000,{0x00,0x00},{0x00,0x00,0x00,0x00}},
521 : NDR_CAB_VERSION
522 : },
523 : .helpstring = NDR_CAB_HELPSTRING,
524 : .num_calls = 0,
525 : .calls = cab_calls,
526 : .num_public_structs = 4,
527 : .public_structs = cab_public_structs,
528 : .endpoints = &cab_endpoints,
529 : .authservices = &cab_authservices
530 : };
531 :
532 : #endif /* SKIP_NDR_TABLE_cab */
|