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