s4-drs: lock down key DRS calls
[Samba/aatanasov.git] / librpc / gen_ndr / ndr_spoolss.c
blobca86ec569066e106d01786ccbbe5c723372089fd
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_spoolss.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 #include "librpc/gen_ndr/ndr_winreg.h"
9 static enum ndr_err_code ndr_push_spoolss_Time(struct ndr_push *ndr, int ndr_flags, const struct spoolss_Time *r)
11 if (ndr_flags & NDR_SCALARS) {
12 NDR_CHECK(ndr_push_align(ndr, 2));
13 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->year));
14 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->month));
15 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day_of_week));
16 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day));
17 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hour));
18 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minute));
19 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->second));
20 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->millisecond));
22 if (ndr_flags & NDR_BUFFERS) {
24 return NDR_ERR_SUCCESS;
27 static enum ndr_err_code ndr_pull_spoolss_Time(struct ndr_pull *ndr, int ndr_flags, struct spoolss_Time *r)
29 if (ndr_flags & NDR_SCALARS) {
30 NDR_CHECK(ndr_pull_align(ndr, 2));
31 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->year));
32 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->month));
33 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day_of_week));
34 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day));
35 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hour));
36 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minute));
37 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->second));
38 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->millisecond));
40 if (ndr_flags & NDR_BUFFERS) {
42 return NDR_ERR_SUCCESS;
45 _PUBLIC_ void ndr_print_spoolss_Time(struct ndr_print *ndr, const char *name, const struct spoolss_Time *r)
47 ndr_print_struct(ndr, name, "spoolss_Time");
48 ndr->depth++;
49 ndr_print_uint16(ndr, "year", r->year);
50 ndr_print_uint16(ndr, "month", r->month);
51 ndr_print_uint16(ndr, "day_of_week", r->day_of_week);
52 ndr_print_uint16(ndr, "day", r->day);
53 ndr_print_uint16(ndr, "hour", r->hour);
54 ndr_print_uint16(ndr, "minute", r->minute);
55 ndr_print_uint16(ndr, "second", r->second);
56 ndr_print_uint16(ndr, "millisecond", r->millisecond);
57 ndr->depth--;
60 static size_t ndr_size_spoolss_Time(const struct spoolss_Time *r, struct smb_iconv_convenience *ic, int flags)
62 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_Time, ic);
65 static enum ndr_err_code ndr_push_spoolss_TimeCtr(struct ndr_push *ndr, int ndr_flags, const struct spoolss_TimeCtr *r)
67 if (ndr_flags & NDR_SCALARS) {
68 NDR_CHECK(ndr_push_align(ndr, 4));
69 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_Time(r->time, ndr->iconv_convenience, ndr->flags)));
70 NDR_CHECK(ndr_push_unique_ptr(ndr, r->time));
72 if (ndr_flags & NDR_BUFFERS) {
73 if (r->time) {
74 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, r->time));
77 return NDR_ERR_SUCCESS;
80 static enum ndr_err_code ndr_pull_spoolss_TimeCtr(struct ndr_pull *ndr, int ndr_flags, struct spoolss_TimeCtr *r)
82 uint32_t _ptr_time;
83 TALLOC_CTX *_mem_save_time_0;
84 if (ndr_flags & NDR_SCALARS) {
85 NDR_CHECK(ndr_pull_align(ndr, 4));
86 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
87 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time));
88 if (_ptr_time) {
89 NDR_PULL_ALLOC(ndr, r->time);
90 } else {
91 r->time = NULL;
94 if (ndr_flags & NDR_BUFFERS) {
95 if (r->time) {
96 _mem_save_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
97 NDR_PULL_SET_MEM_CTX(ndr, r->time, 0);
98 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, r->time));
99 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_0, 0);
102 return NDR_ERR_SUCCESS;
105 _PUBLIC_ void ndr_print_spoolss_TimeCtr(struct ndr_print *ndr, const char *name, const struct spoolss_TimeCtr *r)
107 ndr_print_struct(ndr, name, "spoolss_TimeCtr");
108 ndr->depth++;
109 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_Time(r->time, ndr->iconv_convenience, ndr->flags):r->size);
110 ndr_print_ptr(ndr, "time", r->time);
111 ndr->depth++;
112 if (r->time) {
113 ndr_print_spoolss_Time(ndr, "time", r->time);
115 ndr->depth--;
116 ndr->depth--;
119 static enum ndr_err_code ndr_push_spoolss_ProcessorArchitecture(struct ndr_push *ndr, int ndr_flags, enum spoolss_ProcessorArchitecture r)
121 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
122 return NDR_ERR_SUCCESS;
125 static enum ndr_err_code ndr_pull_spoolss_ProcessorArchitecture(struct ndr_pull *ndr, int ndr_flags, enum spoolss_ProcessorArchitecture *r)
127 uint16_t v;
128 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
129 *r = v;
130 return NDR_ERR_SUCCESS;
133 _PUBLIC_ void ndr_print_spoolss_ProcessorArchitecture(struct ndr_print *ndr, const char *name, enum spoolss_ProcessorArchitecture r)
135 const char *val = NULL;
137 switch (r) {
138 case PROCESSOR_ARCHITECTURE_INTEL: val = "PROCESSOR_ARCHITECTURE_INTEL"; break;
139 case PROCESSOR_ARCHITECTURE_IA64: val = "PROCESSOR_ARCHITECTURE_IA64"; break;
140 case PROCESSOR_ARCHITECTURE_AMD64: val = "PROCESSOR_ARCHITECTURE_AMD64"; break;
142 ndr_print_enum(ndr, name, "ENUM", val, r);
145 static enum ndr_err_code ndr_push_spoolss_ProcessorType(struct ndr_push *ndr, int ndr_flags, enum spoolss_ProcessorType r)
147 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
148 return NDR_ERR_SUCCESS;
151 static enum ndr_err_code ndr_pull_spoolss_ProcessorType(struct ndr_pull *ndr, int ndr_flags, enum spoolss_ProcessorType *r)
153 uint32_t v;
154 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
155 *r = v;
156 return NDR_ERR_SUCCESS;
159 _PUBLIC_ void ndr_print_spoolss_ProcessorType(struct ndr_print *ndr, const char *name, enum spoolss_ProcessorType r)
161 const char *val = NULL;
163 switch (r) {
164 case PROCESSOR_INTEL_386: val = "PROCESSOR_INTEL_386"; break;
165 case PROCESSOR_INTEL_486: val = "PROCESSOR_INTEL_486"; break;
166 case PROCESSOR_INTEL_PENTIUM: val = "PROCESSOR_INTEL_PENTIUM"; break;
167 case PROCESSOR_INTEL_IA64: val = "PROCESSOR_INTEL_IA64"; break;
168 case PROCESSOR_AMD_X8664: val = "PROCESSOR_AMD_X8664"; break;
170 ndr_print_enum(ndr, name, "ENUM", val, r);
173 static enum ndr_err_code ndr_push_spoolss_MajorVersion(struct ndr_push *ndr, int ndr_flags, enum spoolss_MajorVersion r)
175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
176 return NDR_ERR_SUCCESS;
179 static enum ndr_err_code ndr_pull_spoolss_MajorVersion(struct ndr_pull *ndr, int ndr_flags, enum spoolss_MajorVersion *r)
181 uint32_t v;
182 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
183 *r = v;
184 return NDR_ERR_SUCCESS;
187 _PUBLIC_ void ndr_print_spoolss_MajorVersion(struct ndr_print *ndr, const char *name, enum spoolss_MajorVersion r)
189 const char *val = NULL;
191 switch (r) {
192 case SPOOLSS_MAJOR_VERSION_NT4_95_98_ME: val = "SPOOLSS_MAJOR_VERSION_NT4_95_98_ME"; break;
193 case SPOOLSS_MAJOR_VERSION_2000_2003_XP: val = "SPOOLSS_MAJOR_VERSION_2000_2003_XP"; break;
194 case SPOOLSS_MAJOR_VERSION_2008_VISTA: val = "SPOOLSS_MAJOR_VERSION_2008_VISTA"; break;
196 ndr_print_enum(ndr, name, "ENUM", val, r);
199 static enum ndr_err_code ndr_push_spoolss_MinorVersion(struct ndr_push *ndr, int ndr_flags, enum spoolss_MinorVersion r)
201 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
202 return NDR_ERR_SUCCESS;
205 static enum ndr_err_code ndr_pull_spoolss_MinorVersion(struct ndr_pull *ndr, int ndr_flags, enum spoolss_MinorVersion *r)
207 uint32_t v;
208 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
209 *r = v;
210 return NDR_ERR_SUCCESS;
213 _PUBLIC_ void ndr_print_spoolss_MinorVersion(struct ndr_print *ndr, const char *name, enum spoolss_MinorVersion r)
215 const char *val = NULL;
217 switch (r) {
218 case SPOOLSS_MINOR_VERSION_0: val = "SPOOLSS_MINOR_VERSION_0"; break;
219 case SPOOLSS_MINOR_VERSION_XP: val = "SPOOLSS_MINOR_VERSION_XP"; break;
220 case SPOOLSS_MINOR_VERSION_2003_XP64: val = "SPOOLSS_MINOR_VERSION_2003_XP64"; break;
221 case SPOOLSS_MINOR_VERSION_98: val = "SPOOLSS_MINOR_VERSION_98"; break;
222 case SPOOLSS_MINOR_VERSION_ME: val = "SPOOLSS_MINOR_VERSION_ME"; break;
224 ndr_print_enum(ndr, name, "ENUM", val, r);
227 static enum ndr_err_code ndr_push_spoolss_PrinterStatus(struct ndr_push *ndr, int ndr_flags, uint32_t r)
229 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
230 return NDR_ERR_SUCCESS;
233 static enum ndr_err_code ndr_pull_spoolss_PrinterStatus(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
235 uint32_t v;
236 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
237 *r = v;
238 return NDR_ERR_SUCCESS;
241 _PUBLIC_ void ndr_print_spoolss_PrinterStatus(struct ndr_print *ndr, const char *name, uint32_t r)
243 ndr_print_uint32(ndr, name, r);
244 ndr->depth++;
245 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAUSED", PRINTER_STATUS_PAUSED, r);
246 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_ERROR", PRINTER_STATUS_ERROR, r);
247 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PENDING_DELETION", PRINTER_STATUS_PENDING_DELETION, r);
248 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_JAM", PRINTER_STATUS_PAPER_JAM, r);
249 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_OUT", PRINTER_STATUS_PAPER_OUT, r);
250 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_MANUAL_FEED", PRINTER_STATUS_MANUAL_FEED, r);
251 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_PROBLEM", PRINTER_STATUS_PAPER_PROBLEM, r);
252 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OFFLINE", PRINTER_STATUS_OFFLINE, r);
253 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_IO_ACTIVE", PRINTER_STATUS_IO_ACTIVE, r);
254 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_BUSY", PRINTER_STATUS_BUSY, r);
255 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PRINTING", PRINTER_STATUS_PRINTING, r);
256 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OUTPUT_BIN_FULL", PRINTER_STATUS_OUTPUT_BIN_FULL, r);
257 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_NOT_AVAILABLE", PRINTER_STATUS_NOT_AVAILABLE, r);
258 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_WAITING", PRINTER_STATUS_WAITING, r);
259 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PROCESSING", PRINTER_STATUS_PROCESSING, r);
260 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_INITIALIZING", PRINTER_STATUS_INITIALIZING, r);
261 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_WARMING_UP", PRINTER_STATUS_WARMING_UP, r);
262 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_TONER_LOW", PRINTER_STATUS_TONER_LOW, r);
263 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_NO_TONER", PRINTER_STATUS_NO_TONER, r);
264 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAGE_PUNT", PRINTER_STATUS_PAGE_PUNT, r);
265 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_USER_INTERVENTION", PRINTER_STATUS_USER_INTERVENTION, r);
266 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OUT_OF_MEMORY", PRINTER_STATUS_OUT_OF_MEMORY, r);
267 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_DOOR_OPEN", PRINTER_STATUS_DOOR_OPEN, r);
268 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_SERVER_UNKNOWN", PRINTER_STATUS_SERVER_UNKNOWN, r);
269 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_POWER_SAVE", PRINTER_STATUS_POWER_SAVE, r);
270 ndr->depth--;
273 static enum ndr_err_code ndr_push_spoolss_JobStatus(struct ndr_push *ndr, int ndr_flags, uint32_t r)
275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
276 return NDR_ERR_SUCCESS;
279 static enum ndr_err_code ndr_pull_spoolss_JobStatus(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
281 uint32_t v;
282 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
283 *r = v;
284 return NDR_ERR_SUCCESS;
287 _PUBLIC_ void ndr_print_spoolss_JobStatus(struct ndr_print *ndr, const char *name, uint32_t r)
289 ndr_print_uint32(ndr, name, r);
290 ndr->depth++;
291 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PAUSED", JOB_STATUS_PAUSED, r);
292 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_ERROR", JOB_STATUS_ERROR, r);
293 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_DELETING", JOB_STATUS_DELETING, r);
294 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_SPOOLING", JOB_STATUS_SPOOLING, r);
295 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PRINTING", JOB_STATUS_PRINTING, r);
296 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_OFFLINE", JOB_STATUS_OFFLINE, r);
297 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PAPEROUT", JOB_STATUS_PAPEROUT, r);
298 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PRINTED", JOB_STATUS_PRINTED, r);
299 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_DELETED", JOB_STATUS_DELETED, r);
300 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_BLOCKED_DEVQ", JOB_STATUS_BLOCKED_DEVQ, r);
301 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_USER_INTERVENTION", JOB_STATUS_USER_INTERVENTION, r);
302 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_RESTART", JOB_STATUS_RESTART, r);
303 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_COMPLETE", JOB_STATUS_COMPLETE, r);
304 ndr->depth--;
307 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo0(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo0 *r)
309 if (ndr_flags & NDR_SCALARS) {
310 NDR_CHECK(ndr_push_align(ndr, 4));
312 uint32_t _flags_save_string = ndr->flags;
313 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
314 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
315 ndr->flags = _flags_save_string;
318 uint32_t _flags_save_string = ndr->flags;
319 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
320 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
321 ndr->flags = _flags_save_string;
323 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
324 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_jobs));
325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_bytes));
326 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->time));
327 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->global_counter));
328 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
329 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
330 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->free_build));
331 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->spooling));
332 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_spooling));
333 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_counter));
334 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_out_of_paper));
335 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_not_ready));
336 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->job_error));
337 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_of_processors));
338 NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr, NDR_SCALARS, r->processor_type));
339 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high_part_total_bytes));
340 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->change_id));
341 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_error));
342 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumerate_network_printers));
344 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->c_setprinter));
345 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor_architecture));
346 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->processor_level));
347 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_ic));
348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved3));
351 if (ndr_flags & NDR_BUFFERS) {
353 uint32_t _flags_save_string = ndr->flags;
354 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
355 if (r->printername) {
356 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printername));
357 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
359 ndr->flags = _flags_save_string;
362 uint32_t _flags_save_string = ndr->flags;
363 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
364 if (r->servername) {
365 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->servername));
366 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
368 ndr->flags = _flags_save_string;
371 return NDR_ERR_SUCCESS;
374 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo0(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo0 *r)
376 uint32_t _ptr_printername;
377 TALLOC_CTX *_mem_save_printername_0;
378 uint32_t _ptr_servername;
379 TALLOC_CTX *_mem_save_servername_0;
380 if (ndr_flags & NDR_SCALARS) {
381 NDR_CHECK(ndr_pull_align(ndr, 4));
383 uint32_t _flags_save_string = ndr->flags;
384 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
385 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
386 if (_ptr_printername) {
387 NDR_PULL_ALLOC(ndr, r->printername);
388 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
389 } else {
390 r->printername = NULL;
392 ndr->flags = _flags_save_string;
395 uint32_t _flags_save_string = ndr->flags;
396 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
397 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
398 if (_ptr_servername) {
399 NDR_PULL_ALLOC(ndr, r->servername);
400 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
401 } else {
402 r->servername = NULL;
404 ndr->flags = _flags_save_string;
406 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
407 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_jobs));
408 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_bytes));
409 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->time));
410 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->global_counter));
411 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
412 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
413 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->free_build));
414 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->spooling));
415 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_spooling));
416 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_counter));
417 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_out_of_paper));
418 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_not_ready));
419 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->job_error));
420 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_of_processors));
421 NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr, NDR_SCALARS, &r->processor_type));
422 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high_part_total_bytes));
423 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->change_id));
424 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_error));
425 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumerate_network_printers));
427 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->c_setprinter));
428 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor_architecture));
429 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->processor_level));
430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_ic));
431 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
432 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
434 if (ndr_flags & NDR_BUFFERS) {
436 uint32_t _flags_save_string = ndr->flags;
437 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
438 if (r->printername) {
439 uint32_t _relative_save_offset;
440 _relative_save_offset = ndr->offset;
441 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
442 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
443 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
444 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
445 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
446 ndr->offset = _relative_save_offset;
448 ndr->flags = _flags_save_string;
451 uint32_t _flags_save_string = ndr->flags;
452 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
453 if (r->servername) {
454 uint32_t _relative_save_offset;
455 _relative_save_offset = ndr->offset;
456 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
457 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
458 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
459 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
460 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
461 ndr->offset = _relative_save_offset;
463 ndr->flags = _flags_save_string;
466 return NDR_ERR_SUCCESS;
469 _PUBLIC_ void ndr_print_spoolss_PrinterInfo0(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo0 *r)
471 ndr_print_struct(ndr, name, "spoolss_PrinterInfo0");
472 ndr->depth++;
473 ndr_print_ptr(ndr, "printername", r->printername);
474 ndr->depth++;
475 if (r->printername) {
476 ndr_print_string(ndr, "printername", r->printername);
478 ndr->depth--;
479 ndr_print_ptr(ndr, "servername", r->servername);
480 ndr->depth++;
481 if (r->servername) {
482 ndr_print_string(ndr, "servername", r->servername);
484 ndr->depth--;
485 ndr_print_uint32(ndr, "cjobs", r->cjobs);
486 ndr_print_uint32(ndr, "total_jobs", r->total_jobs);
487 ndr_print_uint32(ndr, "total_bytes", r->total_bytes);
488 ndr_print_spoolss_Time(ndr, "time", &r->time);
489 ndr_print_uint32(ndr, "global_counter", r->global_counter);
490 ndr_print_uint32(ndr, "total_pages", r->total_pages);
491 ndr_print_uint32(ndr, "version", r->version);
492 ndr_print_uint32(ndr, "free_build", r->free_build);
493 ndr_print_uint32(ndr, "spooling", r->spooling);
494 ndr_print_uint32(ndr, "max_spooling", r->max_spooling);
495 ndr_print_uint32(ndr, "session_counter", r->session_counter);
496 ndr_print_uint32(ndr, "num_error_out_of_paper", r->num_error_out_of_paper);
497 ndr_print_uint32(ndr, "num_error_not_ready", r->num_error_not_ready);
498 ndr_print_spoolss_JobStatus(ndr, "job_error", r->job_error);
499 ndr_print_uint32(ndr, "number_of_processors", r->number_of_processors);
500 ndr_print_spoolss_ProcessorType(ndr, "processor_type", r->processor_type);
501 ndr_print_uint32(ndr, "high_part_total_bytes", r->high_part_total_bytes);
502 ndr_print_uint32(ndr, "change_id", r->change_id);
503 ndr_print_WERROR(ndr, "last_error", r->last_error);
504 ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
505 ndr_print_uint32(ndr, "enumerate_network_printers", r->enumerate_network_printers);
506 ndr_print_uint32(ndr, "c_setprinter", r->c_setprinter);
507 ndr_print_spoolss_ProcessorArchitecture(ndr, "processor_architecture", r->processor_architecture);
508 ndr_print_uint16(ndr, "processor_level", r->processor_level);
509 ndr_print_uint32(ndr, "ref_ic", r->ref_ic);
510 ndr_print_uint32(ndr, "reserved2", r->reserved2);
511 ndr_print_uint32(ndr, "reserved3", r->reserved3);
512 ndr->depth--;
515 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo0(const struct spoolss_PrinterInfo0 *r, struct smb_iconv_convenience *ic, int flags)
517 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo0, ic);
520 static enum ndr_err_code ndr_push_spoolss_DeviceModeFields(struct ndr_push *ndr, int ndr_flags, uint32_t r)
522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
523 return NDR_ERR_SUCCESS;
526 static enum ndr_err_code ndr_pull_spoolss_DeviceModeFields(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
528 uint32_t v;
529 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
530 *r = v;
531 return NDR_ERR_SUCCESS;
534 _PUBLIC_ void ndr_print_spoolss_DeviceModeFields(struct ndr_print *ndr, const char *name, uint32_t r)
536 ndr_print_uint32(ndr, name, r);
537 ndr->depth++;
538 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ORIENTATION", DEVMODE_ORIENTATION, r);
539 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERSIZE", DEVMODE_PAPERSIZE, r);
540 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERLENGTH", DEVMODE_PAPERLENGTH, r);
541 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERWIDTH", DEVMODE_PAPERWIDTH, r);
542 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_SCALE", DEVMODE_SCALE, r);
543 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_POSITION", DEVMODE_POSITION, r);
544 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_NUP", DEVMODE_NUP, r);
545 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COPIES", DEVMODE_COPIES, r);
546 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DEFAULTSOURCE", DEVMODE_DEFAULTSOURCE, r);
547 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PRINTQUALITY", DEVMODE_PRINTQUALITY, r);
548 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COLOR", DEVMODE_COLOR, r);
549 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DUPLEX", DEVMODE_DUPLEX, r);
550 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_YRESOLUTION", DEVMODE_YRESOLUTION, r);
551 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_TTOPTION", DEVMODE_TTOPTION, r);
552 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COLLATE", DEVMODE_COLLATE, r);
553 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_FORMNAME", DEVMODE_FORMNAME, r);
554 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_LOGPIXELS", DEVMODE_LOGPIXELS, r);
555 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_BITSPERPEL", DEVMODE_BITSPERPEL, r);
556 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PELSWIDTH", DEVMODE_PELSWIDTH, r);
557 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PELSHEIGHT", DEVMODE_PELSHEIGHT, r);
558 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DISPLAYFLAGS", DEVMODE_DISPLAYFLAGS, r);
559 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DISPLAYFREQUENCY", DEVMODE_DISPLAYFREQUENCY, r);
560 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ICMMETHOD", DEVMODE_ICMMETHOD, r);
561 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ICMINTENT", DEVMODE_ICMINTENT, r);
562 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_MEDIATYPE", DEVMODE_MEDIATYPE, r);
563 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DITHERTYPE", DEVMODE_DITHERTYPE, r);
564 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PANNINGWIDTH", DEVMODE_PANNINGWIDTH, r);
565 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PANNINGHEIGHT", DEVMODE_PANNINGHEIGHT, r);
566 ndr->depth--;
569 static enum ndr_err_code ndr_push_spoolss_DeviceModeSpecVersion(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeSpecVersion r)
571 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
572 return NDR_ERR_SUCCESS;
575 static enum ndr_err_code ndr_pull_spoolss_DeviceModeSpecVersion(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeSpecVersion *r)
577 uint16_t v;
578 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
579 *r = v;
580 return NDR_ERR_SUCCESS;
583 _PUBLIC_ void ndr_print_spoolss_DeviceModeSpecVersion(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeSpecVersion r)
585 const char *val = NULL;
587 switch (r) {
588 case DMSPEC_NT3: val = "DMSPEC_NT3"; break;
589 case DMSPEC_WIN95_98_ME: val = "DMSPEC_WIN95_98_ME"; break;
590 case DMSPEC_NT4_AND_ABOVE: val = "DMSPEC_NT4_AND_ABOVE"; break;
592 ndr_print_enum(ndr, name, "ENUM", val, r);
595 static enum ndr_err_code ndr_push_spoolss_DeviceModeOrientation(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeOrientation r)
597 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
598 return NDR_ERR_SUCCESS;
601 static enum ndr_err_code ndr_pull_spoolss_DeviceModeOrientation(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeOrientation *r)
603 uint16_t v;
604 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
605 *r = v;
606 return NDR_ERR_SUCCESS;
609 _PUBLIC_ void ndr_print_spoolss_DeviceModeOrientation(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeOrientation r)
611 const char *val = NULL;
613 switch (r) {
614 case DMORIENT_PORTRAIT: val = "DMORIENT_PORTRAIT"; break;
615 case DMORIENT_LANDSCAPE: val = "DMORIENT_LANDSCAPE"; break;
617 ndr_print_enum(ndr, name, "ENUM", val, r);
620 static enum ndr_err_code ndr_push_spoolss_DeviceModePaperSize(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModePaperSize r)
622 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
623 return NDR_ERR_SUCCESS;
626 static enum ndr_err_code ndr_pull_spoolss_DeviceModePaperSize(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModePaperSize *r)
628 uint16_t v;
629 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
630 *r = v;
631 return NDR_ERR_SUCCESS;
634 _PUBLIC_ void ndr_print_spoolss_DeviceModePaperSize(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModePaperSize r)
636 const char *val = NULL;
638 switch (r) {
639 case DMPAPER_LETTER: val = "DMPAPER_LETTER"; break;
640 case DMPAPER_LETTERSMALL: val = "DMPAPER_LETTERSMALL"; break;
641 case DMPAPER_TABLOID: val = "DMPAPER_TABLOID"; break;
642 case DMPAPER_LEDGER: val = "DMPAPER_LEDGER"; break;
643 case DMPAPER_LEGAL: val = "DMPAPER_LEGAL"; break;
644 case DMPAPER_STATEMENT: val = "DMPAPER_STATEMENT"; break;
645 case DMPAPER_EXECUTIVE: val = "DMPAPER_EXECUTIVE"; break;
646 case DMPAPER_A3: val = "DMPAPER_A3"; break;
647 case DMPAPER_A4: val = "DMPAPER_A4"; break;
648 case DMPAPER_A4SMALL: val = "DMPAPER_A4SMALL"; break;
649 case DMPAPER_A5: val = "DMPAPER_A5"; break;
650 case DMPAPER_B4: val = "DMPAPER_B4"; break;
651 case DMPAPER_B5: val = "DMPAPER_B5"; break;
652 case DMPAPER_FOLIO: val = "DMPAPER_FOLIO"; break;
653 case DMPAPER_QUARTO: val = "DMPAPER_QUARTO"; break;
654 case DMPAPER_10X14: val = "DMPAPER_10X14"; break;
655 case DMPAPER_11X17: val = "DMPAPER_11X17"; break;
656 case DMPAPER_NOTE: val = "DMPAPER_NOTE"; break;
657 case DMPAPER_ENV_9: val = "DMPAPER_ENV_9"; break;
658 case DMPAPER_ENV_10: val = "DMPAPER_ENV_10"; break;
659 case DMPAPER_ENV_11: val = "DMPAPER_ENV_11"; break;
660 case DMPAPER_ENV_12: val = "DMPAPER_ENV_12"; break;
661 case DMPAPER_ENV_14: val = "DMPAPER_ENV_14"; break;
662 case DMPAPER_CSHEET: val = "DMPAPER_CSHEET"; break;
663 case DMPAPER_DSHEET: val = "DMPAPER_DSHEET"; break;
664 case DMPAPER_ESHEET: val = "DMPAPER_ESHEET"; break;
665 case DMPAPER_ENV_DL: val = "DMPAPER_ENV_DL"; break;
666 case DMPAPER_ENV_C5: val = "DMPAPER_ENV_C5"; break;
667 case DMPAPER_ENV_C3: val = "DMPAPER_ENV_C3"; break;
668 case DMPAPER_ENV_C4: val = "DMPAPER_ENV_C4"; break;
669 case DMPAPER_ENV_C6: val = "DMPAPER_ENV_C6"; break;
670 case DMPAPER_ENV_C65: val = "DMPAPER_ENV_C65"; break;
671 case DMPAPER_ENV_B4: val = "DMPAPER_ENV_B4"; break;
672 case DMPAPER_ENV_B5: val = "DMPAPER_ENV_B5"; break;
673 case DMPAPER_ENV_B6: val = "DMPAPER_ENV_B6"; break;
674 case DMPAPER_ENV_ITALY: val = "DMPAPER_ENV_ITALY"; break;
675 case DMPAPER_ENV_MONARCH: val = "DMPAPER_ENV_MONARCH"; break;
676 case DMPAPER_ENV_PERSONAL: val = "DMPAPER_ENV_PERSONAL"; break;
677 case DMPAPER_FANFOLD_US: val = "DMPAPER_FANFOLD_US"; break;
678 case DMPAPER_FANFOLD_STD_GERMAN: val = "DMPAPER_FANFOLD_STD_GERMAN"; break;
679 case DMPAPER_FANFOLD_LGL_GERMAN: val = "DMPAPER_FANFOLD_LGL_GERMAN"; break;
680 case DMPAPER_DBL_JAPANESE_POSTCARD: val = "DMPAPER_DBL_JAPANESE_POSTCARD"; break;
681 case DMPAPER_A6: val = "DMPAPER_A6"; break;
682 case DMPAPER_JENV_KAKU2: val = "DMPAPER_JENV_KAKU2"; break;
683 case DMPAPER_JENV_KAKU3: val = "DMPAPER_JENV_KAKU3"; break;
684 case DMPAPER_JENV_CHOU3: val = "DMPAPER_JENV_CHOU3"; break;
685 case DMPAPER_JENV_CHOU4: val = "DMPAPER_JENV_CHOU4"; break;
686 case DMPAPER_LETTER_ROTATED: val = "DMPAPER_LETTER_ROTATED"; break;
687 case DMPAPER_A3_ROTATED: val = "DMPAPER_A3_ROTATED"; break;
688 case DMPAPER_A4_ROTATED: val = "DMPAPER_A4_ROTATED"; break;
689 case DMPAPER_A5_ROTATED: val = "DMPAPER_A5_ROTATED"; break;
690 case DMPAPER_B4_JIS_ROTATED: val = "DMPAPER_B4_JIS_ROTATED"; break;
691 case DMPAPER_B5_JIS_ROTATED: val = "DMPAPER_B5_JIS_ROTATED"; break;
692 case DMPAPER_JAPANESE_POSTCARD_ROTATED: val = "DMPAPER_JAPANESE_POSTCARD_ROTATED"; break;
693 case DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED: val = "DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED"; break;
694 case DMPAPER_A6_ROTATED: val = "DMPAPER_A6_ROTATED"; break;
695 case DMPAPER_JENV_KAKU2_ROTATED: val = "DMPAPER_JENV_KAKU2_ROTATED"; break;
696 case DMPAPER_JENV_KAKU3_ROTATED: val = "DMPAPER_JENV_KAKU3_ROTATED"; break;
697 case DMPAPER_JENV_CHOU3_ROTATED: val = "DMPAPER_JENV_CHOU3_ROTATED"; break;
698 case DMPAPER_JENV_CHOU4_ROTATED: val = "DMPAPER_JENV_CHOU4_ROTATED"; break;
699 case DMPAPER_B6_JIS: val = "DMPAPER_B6_JIS"; break;
700 case DMPAPER_B6_JIS_ROTATED: val = "DMPAPER_B6_JIS_ROTATED"; break;
701 case DMPAPER_12X11: val = "DMPAPER_12X11"; break;
702 case DMPAPER_JENV_YOU4: val = "DMPAPER_JENV_YOU4"; break;
703 case DMPAPER_JENV_YOU4_ROTATED: val = "DMPAPER_JENV_YOU4_ROTATED"; break;
704 case DMPAPER_P16K: val = "DMPAPER_P16K"; break;
705 case DMPAPER_P32K: val = "DMPAPER_P32K"; break;
706 case DMPAPER_P32KBIG: val = "DMPAPER_P32KBIG"; break;
707 case DMPAPER_PENV_1: val = "DMPAPER_PENV_1"; break;
708 case DMPAPER_PENV_2: val = "DMPAPER_PENV_2"; break;
709 case DMPAPER_PENV_3: val = "DMPAPER_PENV_3"; break;
710 case DMPAPER_PENV_4: val = "DMPAPER_PENV_4"; break;
711 case DMPAPER_PENV_5: val = "DMPAPER_PENV_5"; break;
712 case DMPAPER_PENV_6: val = "DMPAPER_PENV_6"; break;
713 case DMPAPER_PENV_7: val = "DMPAPER_PENV_7"; break;
714 case DMPAPER_PENV_8: val = "DMPAPER_PENV_8"; break;
715 case DMPAPER_PENV_9: val = "DMPAPER_PENV_9"; break;
716 case DMPAPER_PENV_10: val = "DMPAPER_PENV_10"; break;
717 case DMPAPER_P16K_ROTATED: val = "DMPAPER_P16K_ROTATED"; break;
718 case DMPAPER_P32K_ROTATED: val = "DMPAPER_P32K_ROTATED"; break;
719 case DMPAPER_P32KBIG_ROTATED: val = "DMPAPER_P32KBIG_ROTATED"; break;
720 case DMPAPER_PENV_1_ROTATED: val = "DMPAPER_PENV_1_ROTATED"; break;
721 case DMPAPER_PENV_2_ROTATED: val = "DMPAPER_PENV_2_ROTATED"; break;
722 case DMPAPER_PENV_3_ROTATED: val = "DMPAPER_PENV_3_ROTATED"; break;
723 case DMPAPER_PENV_4_ROTATED: val = "DMPAPER_PENV_4_ROTATED"; break;
724 case DMPAPER_PENV_5_ROTATED: val = "DMPAPER_PENV_5_ROTATED"; break;
725 case DMPAPER_PENV_6_ROTATED: val = "DMPAPER_PENV_6_ROTATED"; break;
726 case DMPAPER_PENV_7_ROTATED: val = "DMPAPER_PENV_7_ROTATED"; break;
727 case DMPAPER_PENV_8_ROTATED: val = "DMPAPER_PENV_8_ROTATED"; break;
728 case DMPAPER_PENV_9_ROTATED: val = "DMPAPER_PENV_9_ROTATED"; break;
729 case DMPAPER_PENV_10_ROTATED: val = "DMPAPER_PENV_10_ROTATED"; break;
731 ndr_print_enum(ndr, name, "ENUM", val, r);
734 static enum ndr_err_code ndr_push_spoolss_DeviceModeDefaultSource(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeDefaultSource r)
736 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
737 return NDR_ERR_SUCCESS;
740 static enum ndr_err_code ndr_pull_spoolss_DeviceModeDefaultSource(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeDefaultSource *r)
742 uint16_t v;
743 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
744 *r = v;
745 return NDR_ERR_SUCCESS;
748 _PUBLIC_ void ndr_print_spoolss_DeviceModeDefaultSource(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDefaultSource r)
750 const char *val = NULL;
752 switch (r) {
753 case DMBIN_UPPER: val = "DMBIN_UPPER"; break;
754 case DMBIN_LOWER: val = "DMBIN_LOWER"; break;
755 case DMBIN_MIDDLE: val = "DMBIN_MIDDLE"; break;
756 case DMBIN_MANUAL: val = "DMBIN_MANUAL"; break;
757 case DMBIN_ENVELOPE: val = "DMBIN_ENVELOPE"; break;
758 case DMBIN_ENVMANUAL: val = "DMBIN_ENVMANUAL"; break;
759 case DMBIN_AUTO: val = "DMBIN_AUTO"; break;
760 case DMBIN_TRACTOR: val = "DMBIN_TRACTOR"; break;
761 case DMBIN_SMALLFMT: val = "DMBIN_SMALLFMT"; break;
762 case DMBIN_LARGEFMT: val = "DMBIN_LARGEFMT"; break;
763 case DMBIN_LARGECAPACITY: val = "DMBIN_LARGECAPACITY"; break;
764 case DMBIN_CASSETTE: val = "DMBIN_CASSETTE"; break;
765 case DMBIN_FORMSOURCE: val = "DMBIN_FORMSOURCE"; break;
767 ndr_print_enum(ndr, name, "ENUM", val, r);
770 static enum ndr_err_code ndr_push_spoolss_DeviceModePrintQuality(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModePrintQuality r)
772 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
773 return NDR_ERR_SUCCESS;
776 static enum ndr_err_code ndr_pull_spoolss_DeviceModePrintQuality(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModePrintQuality *r)
778 uint16_t v;
779 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
780 *r = v;
781 return NDR_ERR_SUCCESS;
784 _PUBLIC_ void ndr_print_spoolss_DeviceModePrintQuality(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModePrintQuality r)
786 const char *val = NULL;
788 switch (r) {
789 case DMRES_HIGH: val = "DMRES_HIGH"; break;
790 case DMRES_MEDIUM: val = "DMRES_MEDIUM"; break;
791 case DMRES_LOW: val = "DMRES_LOW"; break;
792 case DMRES_DRAFT: val = "DMRES_DRAFT"; break;
794 ndr_print_enum(ndr, name, "ENUM", val, r);
797 static enum ndr_err_code ndr_push_spoolss_DeviceModeColor(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeColor r)
799 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
800 return NDR_ERR_SUCCESS;
803 static enum ndr_err_code ndr_pull_spoolss_DeviceModeColor(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeColor *r)
805 uint16_t v;
806 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
807 *r = v;
808 return NDR_ERR_SUCCESS;
811 _PUBLIC_ void ndr_print_spoolss_DeviceModeColor(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeColor r)
813 const char *val = NULL;
815 switch (r) {
816 case DMRES_MONOCHROME: val = "DMRES_MONOCHROME"; break;
817 case DMRES_COLOR: val = "DMRES_COLOR"; break;
819 ndr_print_enum(ndr, name, "ENUM", val, r);
822 static enum ndr_err_code ndr_push_spoolss_DeviceModeDuplex(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeDuplex r)
824 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
825 return NDR_ERR_SUCCESS;
828 static enum ndr_err_code ndr_pull_spoolss_DeviceModeDuplex(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeDuplex *r)
830 uint16_t v;
831 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
832 *r = v;
833 return NDR_ERR_SUCCESS;
836 _PUBLIC_ void ndr_print_spoolss_DeviceModeDuplex(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDuplex r)
838 const char *val = NULL;
840 switch (r) {
841 case DMDUP_SIMPLEX: val = "DMDUP_SIMPLEX"; break;
842 case DMDUP_VERTICAL: val = "DMDUP_VERTICAL"; break;
843 case DMDUP_HORIZONTAL: val = "DMDUP_HORIZONTAL"; break;
845 ndr_print_enum(ndr, name, "ENUM", val, r);
848 static enum ndr_err_code ndr_push_spoolss_DeviceModeTTOption(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeTTOption r)
850 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
851 return NDR_ERR_SUCCESS;
854 static enum ndr_err_code ndr_pull_spoolss_DeviceModeTTOption(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeTTOption *r)
856 uint16_t v;
857 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
858 *r = v;
859 return NDR_ERR_SUCCESS;
862 _PUBLIC_ void ndr_print_spoolss_DeviceModeTTOption(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeTTOption r)
864 const char *val = NULL;
866 switch (r) {
867 case DMTT_BITMAP: val = "DMTT_BITMAP"; break;
868 case DMTT_DOWNLOAD: val = "DMTT_DOWNLOAD"; break;
869 case DMTT_SUBDEV: val = "DMTT_SUBDEV"; break;
870 case DMTT_DOWNLOAD_OUTLINE: val = "DMTT_DOWNLOAD_OUTLINE"; break;
872 ndr_print_enum(ndr, name, "ENUM", val, r);
875 static enum ndr_err_code ndr_push_spoolss_DeviceModeCollate(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeCollate r)
877 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
878 return NDR_ERR_SUCCESS;
881 static enum ndr_err_code ndr_pull_spoolss_DeviceModeCollate(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeCollate *r)
883 uint16_t v;
884 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
885 *r = v;
886 return NDR_ERR_SUCCESS;
889 _PUBLIC_ void ndr_print_spoolss_DeviceModeCollate(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeCollate r)
891 const char *val = NULL;
893 switch (r) {
894 case DMCOLLATE_FALSE: val = "DMCOLLATE_FALSE"; break;
895 case DMCOLLATE_TRUE: val = "DMCOLLATE_TRUE"; break;
897 ndr_print_enum(ndr, name, "ENUM", val, r);
900 static enum ndr_err_code ndr_push_spoolss_DeviceModeNUp(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeNUp r)
902 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
903 return NDR_ERR_SUCCESS;
906 static enum ndr_err_code ndr_pull_spoolss_DeviceModeNUp(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeNUp *r)
908 uint32_t v;
909 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
910 *r = v;
911 return NDR_ERR_SUCCESS;
914 _PUBLIC_ void ndr_print_spoolss_DeviceModeNUp(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeNUp r)
916 const char *val = NULL;
918 switch (r) {
919 case DMNUP_SYSTEM: val = "DMNUP_SYSTEM"; break;
920 case DMNUP_ONEUP: val = "DMNUP_ONEUP"; break;
922 ndr_print_enum(ndr, name, "ENUM", val, r);
925 static enum ndr_err_code ndr_push_spoolss_DeviceModeICMMethod(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeICMMethod r)
927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
928 return NDR_ERR_SUCCESS;
931 static enum ndr_err_code ndr_pull_spoolss_DeviceModeICMMethod(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeICMMethod *r)
933 uint32_t v;
934 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
935 *r = v;
936 return NDR_ERR_SUCCESS;
939 _PUBLIC_ void ndr_print_spoolss_DeviceModeICMMethod(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeICMMethod r)
941 const char *val = NULL;
943 switch (r) {
944 case DMICMMETHOD_NONE: val = "DMICMMETHOD_NONE"; break;
945 case DMICMMETHOD_SYSTEM: val = "DMICMMETHOD_SYSTEM"; break;
946 case DMICMMETHOD_DRIVER: val = "DMICMMETHOD_DRIVER"; break;
947 case DMICMMETHOD_DEVICE: val = "DMICMMETHOD_DEVICE"; break;
949 ndr_print_enum(ndr, name, "ENUM", val, r);
952 static enum ndr_err_code ndr_push_spoolss_DeviceModeICMIntent(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeICMIntent r)
954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
955 return NDR_ERR_SUCCESS;
958 static enum ndr_err_code ndr_pull_spoolss_DeviceModeICMIntent(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeICMIntent *r)
960 uint32_t v;
961 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
962 *r = v;
963 return NDR_ERR_SUCCESS;
966 _PUBLIC_ void ndr_print_spoolss_DeviceModeICMIntent(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeICMIntent r)
968 const char *val = NULL;
970 switch (r) {
971 case DMICM_SATURATE: val = "DMICM_SATURATE"; break;
972 case DMICM_CONTRAST: val = "DMICM_CONTRAST"; break;
973 case DMICM_COLORIMETRIC: val = "DMICM_COLORIMETRIC"; break;
974 case DMICM_ABS_COLORIMETRIC: val = "DMICM_ABS_COLORIMETRIC"; break;
976 ndr_print_enum(ndr, name, "ENUM", val, r);
979 static enum ndr_err_code ndr_push_spoolss_DeviceModeMediaType(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeMediaType r)
981 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
982 return NDR_ERR_SUCCESS;
985 static enum ndr_err_code ndr_pull_spoolss_DeviceModeMediaType(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeMediaType *r)
987 uint32_t v;
988 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
989 *r = v;
990 return NDR_ERR_SUCCESS;
993 _PUBLIC_ void ndr_print_spoolss_DeviceModeMediaType(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeMediaType r)
995 const char *val = NULL;
997 switch (r) {
998 case DMMEDIA_STANDARD: val = "DMMEDIA_STANDARD"; break;
999 case DMMEDIA_TRANSPARENCY: val = "DMMEDIA_TRANSPARENCY"; break;
1000 case DMMEDIA_GLOSSY: val = "DMMEDIA_GLOSSY"; break;
1002 ndr_print_enum(ndr, name, "ENUM", val, r);
1005 static enum ndr_err_code ndr_push_spoolss_DeviceModeDitherType(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeDitherType r)
1007 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1008 return NDR_ERR_SUCCESS;
1011 static enum ndr_err_code ndr_pull_spoolss_DeviceModeDitherType(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeDitherType *r)
1013 uint32_t v;
1014 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1015 *r = v;
1016 return NDR_ERR_SUCCESS;
1019 _PUBLIC_ void ndr_print_spoolss_DeviceModeDitherType(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDitherType r)
1021 const char *val = NULL;
1023 switch (r) {
1024 case DMDITHER_NONE: val = "DMDITHER_NONE"; break;
1025 case DMDITHER_COARSE: val = "DMDITHER_COARSE"; break;
1026 case DMDITHER_FINE: val = "DMDITHER_FINE"; break;
1027 case DMDITHER_LINEART: val = "DMDITHER_LINEART"; break;
1028 case DMDITHER_ERRORDIFFUSION: val = "DMDITHER_ERRORDIFFUSION"; break;
1029 case DMDITHER_RESERVED6: val = "DMDITHER_RESERVED6"; break;
1030 case DMDITHER_RESERVED7: val = "DMDITHER_RESERVED7"; break;
1031 case DMDITHER_RESERVED8: val = "DMDITHER_RESERVED8"; break;
1032 case DMDITHER_RESERVED9: val = "DMDITHER_RESERVED9"; break;
1033 case DMDITHER_GRAYSCALE: val = "DMDITHER_GRAYSCALE"; break;
1035 ndr_print_enum(ndr, name, "ENUM", val, r);
1038 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DeviceMode(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DeviceMode *r)
1040 if (ndr_flags & NDR_SCALARS) {
1041 NDR_CHECK(ndr_push_align(ndr, 4));
1042 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devicename, 32, sizeof(uint16_t), CH_UTF16));
1043 NDR_CHECK(ndr_push_spoolss_DeviceModeSpecVersion(ndr, NDR_SCALARS, r->specversion));
1044 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->driverversion));
1045 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
1046 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->driverextra_data.length));
1047 NDR_CHECK(ndr_push_spoolss_DeviceModeFields(ndr, NDR_SCALARS, r->fields));
1048 NDR_CHECK(ndr_push_spoolss_DeviceModeOrientation(ndr, NDR_SCALARS, r->orientation));
1049 NDR_CHECK(ndr_push_spoolss_DeviceModePaperSize(ndr, NDR_SCALARS, r->papersize));
1050 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->paperlength));
1051 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->paperwidth));
1052 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->scale));
1053 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->copies));
1054 NDR_CHECK(ndr_push_spoolss_DeviceModeDefaultSource(ndr, NDR_SCALARS, r->defaultsource));
1055 NDR_CHECK(ndr_push_spoolss_DeviceModePrintQuality(ndr, NDR_SCALARS, r->printquality));
1056 NDR_CHECK(ndr_push_spoolss_DeviceModeColor(ndr, NDR_SCALARS, r->color));
1057 NDR_CHECK(ndr_push_spoolss_DeviceModeDuplex(ndr, NDR_SCALARS, r->duplex));
1058 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->yresolution));
1059 NDR_CHECK(ndr_push_spoolss_DeviceModeTTOption(ndr, NDR_SCALARS, r->ttoption));
1060 NDR_CHECK(ndr_push_spoolss_DeviceModeCollate(ndr, NDR_SCALARS, r->collate));
1061 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->formname, 32, sizeof(uint16_t), CH_UTF16));
1062 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logpixels));
1063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bitsperpel));
1064 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pelswidth));
1065 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pelsheight));
1066 NDR_CHECK(ndr_push_spoolss_DeviceModeNUp(ndr, NDR_SCALARS, r->displayflags));
1067 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->displayfrequency));
1068 NDR_CHECK(ndr_push_spoolss_DeviceModeICMMethod(ndr, NDR_SCALARS, r->icmmethod));
1069 NDR_CHECK(ndr_push_spoolss_DeviceModeICMIntent(ndr, NDR_SCALARS, r->icmintent));
1070 NDR_CHECK(ndr_push_spoolss_DeviceModeMediaType(ndr, NDR_SCALARS, r->mediatype));
1071 NDR_CHECK(ndr_push_spoolss_DeviceModeDitherType(ndr, NDR_SCALARS, r->dithertype));
1072 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved1));
1073 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
1074 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->panningwidth));
1075 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->panningheight));
1077 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1078 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1080 struct ndr_push *_ndr_driverextra_data;
1081 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_driverextra_data, 0, r->driverextra_data.length));
1082 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_driverextra_data, NDR_SCALARS, r->driverextra_data));
1083 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_driverextra_data, 0, r->driverextra_data.length));
1085 ndr->flags = _flags_save_DATA_BLOB;
1088 if (ndr_flags & NDR_BUFFERS) {
1090 return NDR_ERR_SUCCESS;
1093 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DeviceMode(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DeviceMode *r)
1095 if (ndr_flags & NDR_SCALARS) {
1096 NDR_CHECK(ndr_pull_align(ndr, 4));
1097 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devicename, 32, sizeof(uint16_t), CH_UTF16));
1098 NDR_CHECK(ndr_pull_spoolss_DeviceModeSpecVersion(ndr, NDR_SCALARS, &r->specversion));
1099 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->driverversion));
1100 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
1101 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__driverextra_length));
1102 NDR_CHECK(ndr_pull_spoolss_DeviceModeFields(ndr, NDR_SCALARS, &r->fields));
1103 NDR_CHECK(ndr_pull_spoolss_DeviceModeOrientation(ndr, NDR_SCALARS, &r->orientation));
1104 NDR_CHECK(ndr_pull_spoolss_DeviceModePaperSize(ndr, NDR_SCALARS, &r->papersize));
1105 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->paperlength));
1106 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->paperwidth));
1107 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->scale));
1108 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->copies));
1109 NDR_CHECK(ndr_pull_spoolss_DeviceModeDefaultSource(ndr, NDR_SCALARS, &r->defaultsource));
1110 NDR_CHECK(ndr_pull_spoolss_DeviceModePrintQuality(ndr, NDR_SCALARS, &r->printquality));
1111 NDR_CHECK(ndr_pull_spoolss_DeviceModeColor(ndr, NDR_SCALARS, &r->color));
1112 NDR_CHECK(ndr_pull_spoolss_DeviceModeDuplex(ndr, NDR_SCALARS, &r->duplex));
1113 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->yresolution));
1114 NDR_CHECK(ndr_pull_spoolss_DeviceModeTTOption(ndr, NDR_SCALARS, &r->ttoption));
1115 NDR_CHECK(ndr_pull_spoolss_DeviceModeCollate(ndr, NDR_SCALARS, &r->collate));
1116 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->formname, 32, sizeof(uint16_t), CH_UTF16));
1117 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logpixels));
1118 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bitsperpel));
1119 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pelswidth));
1120 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pelsheight));
1121 NDR_CHECK(ndr_pull_spoolss_DeviceModeNUp(ndr, NDR_SCALARS, &r->displayflags));
1122 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->displayfrequency));
1123 NDR_CHECK(ndr_pull_spoolss_DeviceModeICMMethod(ndr, NDR_SCALARS, &r->icmmethod));
1124 NDR_CHECK(ndr_pull_spoolss_DeviceModeICMIntent(ndr, NDR_SCALARS, &r->icmintent));
1125 NDR_CHECK(ndr_pull_spoolss_DeviceModeMediaType(ndr, NDR_SCALARS, &r->mediatype));
1126 NDR_CHECK(ndr_pull_spoolss_DeviceModeDitherType(ndr, NDR_SCALARS, &r->dithertype));
1127 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
1128 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
1129 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->panningwidth));
1130 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->panningheight));
1132 uint32_t _flags_save_DATA_BLOB = ndr->flags;
1133 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
1135 struct ndr_pull *_ndr_driverextra_data;
1136 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_driverextra_data, 0, r->__driverextra_length));
1137 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_driverextra_data, NDR_SCALARS, &r->driverextra_data));
1138 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_driverextra_data, 0, r->__driverextra_length));
1140 ndr->flags = _flags_save_DATA_BLOB;
1143 if (ndr_flags & NDR_BUFFERS) {
1145 return NDR_ERR_SUCCESS;
1148 _PUBLIC_ void ndr_print_spoolss_DeviceMode(struct ndr_print *ndr, const char *name, const struct spoolss_DeviceMode *r)
1150 ndr_print_struct(ndr, name, "spoolss_DeviceMode");
1151 ndr->depth++;
1152 ndr_print_string(ndr, "devicename", r->devicename);
1153 ndr_print_spoolss_DeviceModeSpecVersion(ndr, "specversion", r->specversion);
1154 ndr_print_uint16(ndr, "driverversion", r->driverversion);
1155 ndr_print_uint16(ndr, "size", r->size);
1156 ndr_print_uint16(ndr, "__driverextra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->driverextra_data.length:r->__driverextra_length);
1157 ndr_print_spoolss_DeviceModeFields(ndr, "fields", r->fields);
1158 ndr_print_spoolss_DeviceModeOrientation(ndr, "orientation", r->orientation);
1159 ndr_print_spoolss_DeviceModePaperSize(ndr, "papersize", r->papersize);
1160 ndr_print_uint16(ndr, "paperlength", r->paperlength);
1161 ndr_print_uint16(ndr, "paperwidth", r->paperwidth);
1162 ndr_print_uint16(ndr, "scale", r->scale);
1163 ndr_print_uint16(ndr, "copies", r->copies);
1164 ndr_print_spoolss_DeviceModeDefaultSource(ndr, "defaultsource", r->defaultsource);
1165 ndr_print_spoolss_DeviceModePrintQuality(ndr, "printquality", r->printquality);
1166 ndr_print_spoolss_DeviceModeColor(ndr, "color", r->color);
1167 ndr_print_spoolss_DeviceModeDuplex(ndr, "duplex", r->duplex);
1168 ndr_print_uint16(ndr, "yresolution", r->yresolution);
1169 ndr_print_spoolss_DeviceModeTTOption(ndr, "ttoption", r->ttoption);
1170 ndr_print_spoolss_DeviceModeCollate(ndr, "collate", r->collate);
1171 ndr_print_string(ndr, "formname", r->formname);
1172 ndr_print_uint16(ndr, "logpixels", r->logpixels);
1173 ndr_print_uint32(ndr, "bitsperpel", r->bitsperpel);
1174 ndr_print_uint32(ndr, "pelswidth", r->pelswidth);
1175 ndr_print_uint32(ndr, "pelsheight", r->pelsheight);
1176 ndr_print_spoolss_DeviceModeNUp(ndr, "displayflags", r->displayflags);
1177 ndr_print_uint32(ndr, "displayfrequency", r->displayfrequency);
1178 ndr_print_spoolss_DeviceModeICMMethod(ndr, "icmmethod", r->icmmethod);
1179 ndr_print_spoolss_DeviceModeICMIntent(ndr, "icmintent", r->icmintent);
1180 ndr_print_spoolss_DeviceModeMediaType(ndr, "mediatype", r->mediatype);
1181 ndr_print_spoolss_DeviceModeDitherType(ndr, "dithertype", r->dithertype);
1182 ndr_print_uint32(ndr, "reserved1", r->reserved1);
1183 ndr_print_uint32(ndr, "reserved2", r->reserved2);
1184 ndr_print_uint32(ndr, "panningwidth", r->panningwidth);
1185 ndr_print_uint32(ndr, "panningheight", r->panningheight);
1186 ndr_print_DATA_BLOB(ndr, "driverextra_data", r->driverextra_data);
1187 ndr->depth--;
1190 _PUBLIC_ size_t ndr_size_spoolss_DeviceMode(const struct spoolss_DeviceMode *r, struct smb_iconv_convenience *ic, int flags)
1192 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DeviceMode, ic);
1195 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_EnumPrinterFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
1197 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1198 return NDR_ERR_SUCCESS;
1201 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
1203 uint32_t v;
1204 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1205 *r = v;
1206 return NDR_ERR_SUCCESS;
1209 _PUBLIC_ void ndr_print_spoolss_EnumPrinterFlags(struct ndr_print *ndr, const char *name, uint32_t r)
1211 ndr_print_uint32(ndr, name, r);
1212 ndr->depth++;
1213 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_DEFAULT", PRINTER_ENUM_DEFAULT, r);
1214 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL, r);
1215 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_CONNECTIONS", PRINTER_ENUM_CONNECTIONS, r);
1216 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_FAVORITE", PRINTER_ENUM_FAVORITE, r);
1217 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_NAME", PRINTER_ENUM_NAME, r);
1218 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_REMOTE", PRINTER_ENUM_REMOTE, r);
1219 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_SHARED", PRINTER_ENUM_SHARED, r);
1220 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_NETWORK", PRINTER_ENUM_NETWORK, r);
1221 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_EXPAND", PRINTER_ENUM_EXPAND, r);
1222 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_CONTAINER", PRINTER_ENUM_CONTAINER, r);
1223 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON1", PRINTER_ENUM_ICON1, r);
1224 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON2", PRINTER_ENUM_ICON2, r);
1225 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON3", PRINTER_ENUM_ICON3, r);
1226 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON4", PRINTER_ENUM_ICON4, r);
1227 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON5", PRINTER_ENUM_ICON5, r);
1228 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON6", PRINTER_ENUM_ICON6, r);
1229 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON7", PRINTER_ENUM_ICON7, r);
1230 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON8", PRINTER_ENUM_ICON8, r);
1231 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_HIDE", PRINTER_ENUM_HIDE, r);
1232 ndr->depth--;
1235 static enum ndr_err_code ndr_push_spoolss_PrinterAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
1237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
1238 return NDR_ERR_SUCCESS;
1241 static enum ndr_err_code ndr_pull_spoolss_PrinterAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
1243 uint32_t v;
1244 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
1245 *r = v;
1246 return NDR_ERR_SUCCESS;
1249 _PUBLIC_ void ndr_print_spoolss_PrinterAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
1251 ndr_print_uint32(ndr, name, r);
1252 ndr->depth++;
1253 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_QUEUED", PRINTER_ATTRIBUTE_QUEUED, r);
1254 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DIRECT", PRINTER_ATTRIBUTE_DIRECT, r);
1255 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DEFAULT", PRINTER_ATTRIBUTE_DEFAULT, r);
1256 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_SHARED", PRINTER_ATTRIBUTE_SHARED, r);
1257 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_NETWORK", PRINTER_ATTRIBUTE_NETWORK, r);
1258 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_HIDDEN", PRINTER_ATTRIBUTE_HIDDEN, r);
1259 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_LOCAL", PRINTER_ATTRIBUTE_LOCAL, r);
1260 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ, r);
1261 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, r);
1262 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, r);
1263 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_WORK_OFFLINE", PRINTER_ATTRIBUTE_WORK_OFFLINE, r);
1264 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_BIDI", PRINTER_ATTRIBUTE_ENABLE_BIDI, r);
1265 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_RAW_ONLY", PRINTER_ATTRIBUTE_RAW_ONLY, r);
1266 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_PUBLISHED", PRINTER_ATTRIBUTE_PUBLISHED, r);
1267 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_FAX", PRINTER_ATTRIBUTE_FAX, r);
1268 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_TS", PRINTER_ATTRIBUTE_TS, r);
1269 ndr->depth--;
1272 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo1 *r)
1274 if (ndr_flags & NDR_SCALARS) {
1275 NDR_CHECK(ndr_push_align(ndr, 4));
1276 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->flags));
1278 uint32_t _flags_save_string = ndr->flags;
1279 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1280 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
1281 ndr->flags = _flags_save_string;
1284 uint32_t _flags_save_string = ndr->flags;
1285 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1286 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name));
1287 ndr->flags = _flags_save_string;
1290 uint32_t _flags_save_string = ndr->flags;
1291 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1292 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment));
1293 ndr->flags = _flags_save_string;
1296 if (ndr_flags & NDR_BUFFERS) {
1298 uint32_t _flags_save_string = ndr->flags;
1299 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1300 if (r->description) {
1301 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->description));
1302 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
1304 ndr->flags = _flags_save_string;
1307 uint32_t _flags_save_string = ndr->flags;
1308 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1309 if (r->name) {
1310 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->name));
1311 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
1313 ndr->flags = _flags_save_string;
1316 uint32_t _flags_save_string = ndr->flags;
1317 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1318 if (r->comment) {
1319 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->comment));
1320 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->comment));
1322 ndr->flags = _flags_save_string;
1325 return NDR_ERR_SUCCESS;
1328 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo1 *r)
1330 uint32_t _ptr_description;
1331 TALLOC_CTX *_mem_save_description_0;
1332 uint32_t _ptr_name;
1333 TALLOC_CTX *_mem_save_name_0;
1334 uint32_t _ptr_comment;
1335 TALLOC_CTX *_mem_save_comment_0;
1336 if (ndr_flags & NDR_SCALARS) {
1337 NDR_CHECK(ndr_pull_align(ndr, 4));
1338 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->flags));
1340 uint32_t _flags_save_string = ndr->flags;
1341 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1342 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
1343 if (_ptr_description) {
1344 NDR_PULL_ALLOC(ndr, r->description);
1345 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
1346 } else {
1347 r->description = NULL;
1349 ndr->flags = _flags_save_string;
1352 uint32_t _flags_save_string = ndr->flags;
1353 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1354 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
1355 if (_ptr_name) {
1356 NDR_PULL_ALLOC(ndr, r->name);
1357 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name, _ptr_name));
1358 } else {
1359 r->name = NULL;
1361 ndr->flags = _flags_save_string;
1364 uint32_t _flags_save_string = ndr->flags;
1365 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1366 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1367 if (_ptr_comment) {
1368 NDR_PULL_ALLOC(ndr, r->comment);
1369 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->comment, _ptr_comment));
1370 } else {
1371 r->comment = NULL;
1373 ndr->flags = _flags_save_string;
1376 if (ndr_flags & NDR_BUFFERS) {
1378 uint32_t _flags_save_string = ndr->flags;
1379 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1380 if (r->description) {
1381 uint32_t _relative_save_offset;
1382 _relative_save_offset = ndr->offset;
1383 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
1384 _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
1385 NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
1386 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
1387 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
1388 ndr->offset = _relative_save_offset;
1390 ndr->flags = _flags_save_string;
1393 uint32_t _flags_save_string = ndr->flags;
1394 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1395 if (r->name) {
1396 uint32_t _relative_save_offset;
1397 _relative_save_offset = ndr->offset;
1398 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name));
1399 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1400 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
1401 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
1402 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
1403 ndr->offset = _relative_save_offset;
1405 ndr->flags = _flags_save_string;
1408 uint32_t _flags_save_string = ndr->flags;
1409 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1410 if (r->comment) {
1411 uint32_t _relative_save_offset;
1412 _relative_save_offset = ndr->offset;
1413 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->comment));
1414 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1415 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1416 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->comment));
1417 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1418 ndr->offset = _relative_save_offset;
1420 ndr->flags = _flags_save_string;
1423 return NDR_ERR_SUCCESS;
1426 _PUBLIC_ void ndr_print_spoolss_PrinterInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo1 *r)
1428 ndr_print_struct(ndr, name, "spoolss_PrinterInfo1");
1429 ndr->depth++;
1430 ndr_print_spoolss_PrinterAttributes(ndr, "flags", r->flags);
1431 ndr_print_ptr(ndr, "description", r->description);
1432 ndr->depth++;
1433 if (r->description) {
1434 ndr_print_string(ndr, "description", r->description);
1436 ndr->depth--;
1437 ndr_print_ptr(ndr, "name", r->name);
1438 ndr->depth++;
1439 if (r->name) {
1440 ndr_print_string(ndr, "name", r->name);
1442 ndr->depth--;
1443 ndr_print_ptr(ndr, "comment", r->comment);
1444 ndr->depth++;
1445 if (r->comment) {
1446 ndr_print_string(ndr, "comment", r->comment);
1448 ndr->depth--;
1449 ndr->depth--;
1452 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo1(const struct spoolss_PrinterInfo1 *r, struct smb_iconv_convenience *ic, int flags)
1454 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo1, ic);
1457 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo2 *r)
1459 if (ndr_flags & NDR_SCALARS) {
1460 NDR_CHECK(ndr_push_align(ndr, 4));
1462 uint32_t _flags_save_string = ndr->flags;
1463 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1464 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
1465 ndr->flags = _flags_save_string;
1468 uint32_t _flags_save_string = ndr->flags;
1469 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1470 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
1471 ndr->flags = _flags_save_string;
1474 uint32_t _flags_save_string = ndr->flags;
1475 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1476 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sharename));
1477 ndr->flags = _flags_save_string;
1480 uint32_t _flags_save_string = ndr->flags;
1481 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1482 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->portname));
1483 ndr->flags = _flags_save_string;
1486 uint32_t _flags_save_string = ndr->flags;
1487 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1488 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->drivername));
1489 ndr->flags = _flags_save_string;
1492 uint32_t _flags_save_string = ndr->flags;
1493 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1494 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment));
1495 ndr->flags = _flags_save_string;
1498 uint32_t _flags_save_string = ndr->flags;
1499 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1500 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->location));
1501 ndr->flags = _flags_save_string;
1503 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
1505 uint32_t _flags_save_string = ndr->flags;
1506 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1507 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->sepfile));
1508 ndr->flags = _flags_save_string;
1511 uint32_t _flags_save_string = ndr->flags;
1512 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1513 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printprocessor));
1514 ndr->flags = _flags_save_string;
1517 uint32_t _flags_save_string = ndr->flags;
1518 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1519 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->datatype));
1520 ndr->flags = _flags_save_string;
1523 uint32_t _flags_save_string = ndr->flags;
1524 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1525 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters));
1526 ndr->flags = _flags_save_string;
1528 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
1529 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
1530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
1531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->defaultpriority));
1532 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->starttime));
1533 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->untiltime));
1534 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
1535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
1536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm));
1538 if (ndr_flags & NDR_BUFFERS) {
1540 uint32_t _flags_save_string = ndr->flags;
1541 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1542 if (r->servername) {
1543 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->servername));
1544 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
1546 ndr->flags = _flags_save_string;
1549 uint32_t _flags_save_string = ndr->flags;
1550 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1551 if (r->printername) {
1552 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printername));
1553 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
1555 ndr->flags = _flags_save_string;
1558 uint32_t _flags_save_string = ndr->flags;
1559 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1560 if (r->sharename) {
1561 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->sharename));
1562 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sharename));
1564 ndr->flags = _flags_save_string;
1567 uint32_t _flags_save_string = ndr->flags;
1568 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1569 if (r->portname) {
1570 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->portname));
1571 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->portname));
1573 ndr->flags = _flags_save_string;
1576 uint32_t _flags_save_string = ndr->flags;
1577 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1578 if (r->drivername) {
1579 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->drivername));
1580 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->drivername));
1582 ndr->flags = _flags_save_string;
1585 uint32_t _flags_save_string = ndr->flags;
1586 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1587 if (r->comment) {
1588 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->comment));
1589 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->comment));
1591 ndr->flags = _flags_save_string;
1594 uint32_t _flags_save_string = ndr->flags;
1595 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1596 if (r->location) {
1597 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->location));
1598 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->location));
1600 ndr->flags = _flags_save_string;
1602 if (r->devmode) {
1603 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->devmode));
1605 struct ndr_push *_ndr_devmode;
1606 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
1607 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
1608 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
1612 uint32_t _flags_save_string = ndr->flags;
1613 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1614 if (r->sepfile) {
1615 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->sepfile));
1616 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->sepfile));
1618 ndr->flags = _flags_save_string;
1621 uint32_t _flags_save_string = ndr->flags;
1622 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1623 if (r->printprocessor) {
1624 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printprocessor));
1625 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printprocessor));
1627 ndr->flags = _flags_save_string;
1630 uint32_t _flags_save_string = ndr->flags;
1631 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1632 if (r->datatype) {
1633 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->datatype));
1634 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->datatype));
1636 ndr->flags = _flags_save_string;
1639 uint32_t _flags_save_string = ndr->flags;
1640 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1641 if (r->parameters) {
1642 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->parameters));
1643 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters));
1645 ndr->flags = _flags_save_string;
1647 if (r->secdesc) {
1648 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->secdesc));
1650 struct ndr_push *_ndr_secdesc;
1651 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
1652 NDR_CHECK(ndr_push_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
1653 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
1657 return NDR_ERR_SUCCESS;
1660 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo2 *r)
1662 uint32_t _ptr_servername;
1663 TALLOC_CTX *_mem_save_servername_0;
1664 uint32_t _ptr_printername;
1665 TALLOC_CTX *_mem_save_printername_0;
1666 uint32_t _ptr_sharename;
1667 TALLOC_CTX *_mem_save_sharename_0;
1668 uint32_t _ptr_portname;
1669 TALLOC_CTX *_mem_save_portname_0;
1670 uint32_t _ptr_drivername;
1671 TALLOC_CTX *_mem_save_drivername_0;
1672 uint32_t _ptr_comment;
1673 TALLOC_CTX *_mem_save_comment_0;
1674 uint32_t _ptr_location;
1675 TALLOC_CTX *_mem_save_location_0;
1676 uint32_t _ptr_devmode;
1677 TALLOC_CTX *_mem_save_devmode_0;
1678 uint32_t _ptr_sepfile;
1679 TALLOC_CTX *_mem_save_sepfile_0;
1680 uint32_t _ptr_printprocessor;
1681 TALLOC_CTX *_mem_save_printprocessor_0;
1682 uint32_t _ptr_datatype;
1683 TALLOC_CTX *_mem_save_datatype_0;
1684 uint32_t _ptr_parameters;
1685 TALLOC_CTX *_mem_save_parameters_0;
1686 uint32_t _ptr_secdesc;
1687 TALLOC_CTX *_mem_save_secdesc_0;
1688 if (ndr_flags & NDR_SCALARS) {
1689 NDR_CHECK(ndr_pull_align(ndr, 4));
1691 uint32_t _flags_save_string = ndr->flags;
1692 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1693 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
1694 if (_ptr_servername) {
1695 NDR_PULL_ALLOC(ndr, r->servername);
1696 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
1697 } else {
1698 r->servername = NULL;
1700 ndr->flags = _flags_save_string;
1703 uint32_t _flags_save_string = ndr->flags;
1704 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1705 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
1706 if (_ptr_printername) {
1707 NDR_PULL_ALLOC(ndr, r->printername);
1708 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
1709 } else {
1710 r->printername = NULL;
1712 ndr->flags = _flags_save_string;
1715 uint32_t _flags_save_string = ndr->flags;
1716 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1717 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
1718 if (_ptr_sharename) {
1719 NDR_PULL_ALLOC(ndr, r->sharename);
1720 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sharename, _ptr_sharename));
1721 } else {
1722 r->sharename = NULL;
1724 ndr->flags = _flags_save_string;
1727 uint32_t _flags_save_string = ndr->flags;
1728 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1729 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
1730 if (_ptr_portname) {
1731 NDR_PULL_ALLOC(ndr, r->portname);
1732 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->portname, _ptr_portname));
1733 } else {
1734 r->portname = NULL;
1736 ndr->flags = _flags_save_string;
1739 uint32_t _flags_save_string = ndr->flags;
1740 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1741 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_drivername));
1742 if (_ptr_drivername) {
1743 NDR_PULL_ALLOC(ndr, r->drivername);
1744 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->drivername, _ptr_drivername));
1745 } else {
1746 r->drivername = NULL;
1748 ndr->flags = _flags_save_string;
1751 uint32_t _flags_save_string = ndr->flags;
1752 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1753 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1754 if (_ptr_comment) {
1755 NDR_PULL_ALLOC(ndr, r->comment);
1756 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->comment, _ptr_comment));
1757 } else {
1758 r->comment = NULL;
1760 ndr->flags = _flags_save_string;
1763 uint32_t _flags_save_string = ndr->flags;
1764 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1765 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_location));
1766 if (_ptr_location) {
1767 NDR_PULL_ALLOC(ndr, r->location);
1768 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->location, _ptr_location));
1769 } else {
1770 r->location = NULL;
1772 ndr->flags = _flags_save_string;
1774 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
1775 if (_ptr_devmode) {
1776 NDR_PULL_ALLOC(ndr, r->devmode);
1777 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
1778 } else {
1779 r->devmode = NULL;
1782 uint32_t _flags_save_string = ndr->flags;
1783 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1784 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sepfile));
1785 if (_ptr_sepfile) {
1786 NDR_PULL_ALLOC(ndr, r->sepfile);
1787 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sepfile, _ptr_sepfile));
1788 } else {
1789 r->sepfile = NULL;
1791 ndr->flags = _flags_save_string;
1794 uint32_t _flags_save_string = ndr->flags;
1795 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1796 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printprocessor));
1797 if (_ptr_printprocessor) {
1798 NDR_PULL_ALLOC(ndr, r->printprocessor);
1799 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printprocessor, _ptr_printprocessor));
1800 } else {
1801 r->printprocessor = NULL;
1803 ndr->flags = _flags_save_string;
1806 uint32_t _flags_save_string = ndr->flags;
1807 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1808 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
1809 if (_ptr_datatype) {
1810 NDR_PULL_ALLOC(ndr, r->datatype);
1811 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->datatype, _ptr_datatype));
1812 } else {
1813 r->datatype = NULL;
1815 ndr->flags = _flags_save_string;
1818 uint32_t _flags_save_string = ndr->flags;
1819 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1820 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
1821 if (_ptr_parameters) {
1822 NDR_PULL_ALLOC(ndr, r->parameters);
1823 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
1824 } else {
1825 r->parameters = NULL;
1827 ndr->flags = _flags_save_string;
1829 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
1830 if (_ptr_secdesc) {
1831 NDR_PULL_ALLOC(ndr, r->secdesc);
1832 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
1833 } else {
1834 r->secdesc = NULL;
1836 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
1837 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
1838 if (r->priority > 99) {
1839 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1841 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->defaultpriority));
1842 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->starttime));
1843 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->untiltime));
1844 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
1845 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
1846 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->averageppm));
1848 if (ndr_flags & NDR_BUFFERS) {
1850 uint32_t _flags_save_string = ndr->flags;
1851 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1852 if (r->servername) {
1853 uint32_t _relative_save_offset;
1854 _relative_save_offset = ndr->offset;
1855 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
1856 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1857 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
1858 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
1859 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
1860 ndr->offset = _relative_save_offset;
1862 ndr->flags = _flags_save_string;
1865 uint32_t _flags_save_string = ndr->flags;
1866 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1867 if (r->printername) {
1868 uint32_t _relative_save_offset;
1869 _relative_save_offset = ndr->offset;
1870 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
1871 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1872 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
1873 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
1874 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
1875 ndr->offset = _relative_save_offset;
1877 ndr->flags = _flags_save_string;
1880 uint32_t _flags_save_string = ndr->flags;
1881 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1882 if (r->sharename) {
1883 uint32_t _relative_save_offset;
1884 _relative_save_offset = ndr->offset;
1885 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sharename));
1886 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
1887 NDR_PULL_SET_MEM_CTX(ndr, r->sharename, 0);
1888 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sharename));
1889 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
1890 ndr->offset = _relative_save_offset;
1892 ndr->flags = _flags_save_string;
1895 uint32_t _flags_save_string = ndr->flags;
1896 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1897 if (r->portname) {
1898 uint32_t _relative_save_offset;
1899 _relative_save_offset = ndr->offset;
1900 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->portname));
1901 _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
1902 NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
1903 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->portname));
1904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
1905 ndr->offset = _relative_save_offset;
1907 ndr->flags = _flags_save_string;
1910 uint32_t _flags_save_string = ndr->flags;
1911 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1912 if (r->drivername) {
1913 uint32_t _relative_save_offset;
1914 _relative_save_offset = ndr->offset;
1915 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->drivername));
1916 _mem_save_drivername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1917 NDR_PULL_SET_MEM_CTX(ndr, r->drivername, 0);
1918 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->drivername));
1919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_drivername_0, 0);
1920 ndr->offset = _relative_save_offset;
1922 ndr->flags = _flags_save_string;
1925 uint32_t _flags_save_string = ndr->flags;
1926 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1927 if (r->comment) {
1928 uint32_t _relative_save_offset;
1929 _relative_save_offset = ndr->offset;
1930 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->comment));
1931 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1932 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1933 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->comment));
1934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1935 ndr->offset = _relative_save_offset;
1937 ndr->flags = _flags_save_string;
1940 uint32_t _flags_save_string = ndr->flags;
1941 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1942 if (r->location) {
1943 uint32_t _relative_save_offset;
1944 _relative_save_offset = ndr->offset;
1945 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->location));
1946 _mem_save_location_0 = NDR_PULL_GET_MEM_CTX(ndr);
1947 NDR_PULL_SET_MEM_CTX(ndr, r->location, 0);
1948 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->location));
1949 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_location_0, 0);
1950 ndr->offset = _relative_save_offset;
1952 ndr->flags = _flags_save_string;
1954 if (r->devmode) {
1955 uint32_t _relative_save_offset;
1956 _relative_save_offset = ndr->offset;
1957 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
1958 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
1959 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
1961 struct ndr_pull *_ndr_devmode;
1962 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
1963 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
1964 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
1966 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
1967 ndr->offset = _relative_save_offset;
1970 uint32_t _flags_save_string = ndr->flags;
1971 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1972 if (r->sepfile) {
1973 uint32_t _relative_save_offset;
1974 _relative_save_offset = ndr->offset;
1975 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sepfile));
1976 _mem_save_sepfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
1977 NDR_PULL_SET_MEM_CTX(ndr, r->sepfile, 0);
1978 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sepfile));
1979 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sepfile_0, 0);
1980 ndr->offset = _relative_save_offset;
1982 ndr->flags = _flags_save_string;
1985 uint32_t _flags_save_string = ndr->flags;
1986 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
1987 if (r->printprocessor) {
1988 uint32_t _relative_save_offset;
1989 _relative_save_offset = ndr->offset;
1990 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printprocessor));
1991 _mem_save_printprocessor_0 = NDR_PULL_GET_MEM_CTX(ndr);
1992 NDR_PULL_SET_MEM_CTX(ndr, r->printprocessor, 0);
1993 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printprocessor));
1994 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printprocessor_0, 0);
1995 ndr->offset = _relative_save_offset;
1997 ndr->flags = _flags_save_string;
2000 uint32_t _flags_save_string = ndr->flags;
2001 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2002 if (r->datatype) {
2003 uint32_t _relative_save_offset;
2004 _relative_save_offset = ndr->offset;
2005 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->datatype));
2006 _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
2007 NDR_PULL_SET_MEM_CTX(ndr, r->datatype, 0);
2008 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->datatype));
2009 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
2010 ndr->offset = _relative_save_offset;
2012 ndr->flags = _flags_save_string;
2015 uint32_t _flags_save_string = ndr->flags;
2016 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2017 if (r->parameters) {
2018 uint32_t _relative_save_offset;
2019 _relative_save_offset = ndr->offset;
2020 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
2021 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
2022 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
2023 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
2024 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
2025 ndr->offset = _relative_save_offset;
2027 ndr->flags = _flags_save_string;
2029 if (r->secdesc) {
2030 uint32_t _relative_save_offset;
2031 _relative_save_offset = ndr->offset;
2032 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
2033 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
2034 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
2036 struct ndr_pull *_ndr_secdesc;
2037 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
2038 NDR_CHECK(ndr_pull_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
2039 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
2041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
2042 ndr->offset = _relative_save_offset;
2045 return NDR_ERR_SUCCESS;
2048 _PUBLIC_ void ndr_print_spoolss_PrinterInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo2 *r)
2050 ndr_print_struct(ndr, name, "spoolss_PrinterInfo2");
2051 ndr->depth++;
2052 ndr_print_ptr(ndr, "servername", r->servername);
2053 ndr->depth++;
2054 if (r->servername) {
2055 ndr_print_string(ndr, "servername", r->servername);
2057 ndr->depth--;
2058 ndr_print_ptr(ndr, "printername", r->printername);
2059 ndr->depth++;
2060 if (r->printername) {
2061 ndr_print_string(ndr, "printername", r->printername);
2063 ndr->depth--;
2064 ndr_print_ptr(ndr, "sharename", r->sharename);
2065 ndr->depth++;
2066 if (r->sharename) {
2067 ndr_print_string(ndr, "sharename", r->sharename);
2069 ndr->depth--;
2070 ndr_print_ptr(ndr, "portname", r->portname);
2071 ndr->depth++;
2072 if (r->portname) {
2073 ndr_print_string(ndr, "portname", r->portname);
2075 ndr->depth--;
2076 ndr_print_ptr(ndr, "drivername", r->drivername);
2077 ndr->depth++;
2078 if (r->drivername) {
2079 ndr_print_string(ndr, "drivername", r->drivername);
2081 ndr->depth--;
2082 ndr_print_ptr(ndr, "comment", r->comment);
2083 ndr->depth++;
2084 if (r->comment) {
2085 ndr_print_string(ndr, "comment", r->comment);
2087 ndr->depth--;
2088 ndr_print_ptr(ndr, "location", r->location);
2089 ndr->depth++;
2090 if (r->location) {
2091 ndr_print_string(ndr, "location", r->location);
2093 ndr->depth--;
2094 ndr_print_ptr(ndr, "devmode", r->devmode);
2095 ndr->depth++;
2096 if (r->devmode) {
2097 ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
2099 ndr->depth--;
2100 ndr_print_ptr(ndr, "sepfile", r->sepfile);
2101 ndr->depth++;
2102 if (r->sepfile) {
2103 ndr_print_string(ndr, "sepfile", r->sepfile);
2105 ndr->depth--;
2106 ndr_print_ptr(ndr, "printprocessor", r->printprocessor);
2107 ndr->depth++;
2108 if (r->printprocessor) {
2109 ndr_print_string(ndr, "printprocessor", r->printprocessor);
2111 ndr->depth--;
2112 ndr_print_ptr(ndr, "datatype", r->datatype);
2113 ndr->depth++;
2114 if (r->datatype) {
2115 ndr_print_string(ndr, "datatype", r->datatype);
2117 ndr->depth--;
2118 ndr_print_ptr(ndr, "parameters", r->parameters);
2119 ndr->depth++;
2120 if (r->parameters) {
2121 ndr_print_string(ndr, "parameters", r->parameters);
2123 ndr->depth--;
2124 ndr_print_ptr(ndr, "secdesc", r->secdesc);
2125 ndr->depth++;
2126 if (r->secdesc) {
2127 ndr_print_security_descriptor(ndr, "secdesc", r->secdesc);
2129 ndr->depth--;
2130 ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
2131 ndr_print_uint32(ndr, "priority", r->priority);
2132 ndr_print_uint32(ndr, "defaultpriority", r->defaultpriority);
2133 ndr_print_uint32(ndr, "starttime", r->starttime);
2134 ndr_print_uint32(ndr, "untiltime", r->untiltime);
2135 ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
2136 ndr_print_uint32(ndr, "cjobs", r->cjobs);
2137 ndr_print_uint32(ndr, "averageppm", r->averageppm);
2138 ndr->depth--;
2141 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo2(const struct spoolss_PrinterInfo2 *r, struct smb_iconv_convenience *ic, int flags)
2143 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo2, ic);
2146 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo3 *r)
2148 if (ndr_flags & NDR_SCALARS) {
2149 NDR_CHECK(ndr_push_align(ndr, 4));
2150 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
2152 if (ndr_flags & NDR_BUFFERS) {
2153 if (r->secdesc) {
2154 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->secdesc));
2156 struct ndr_push *_ndr_secdesc;
2157 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
2158 NDR_CHECK(ndr_push_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
2159 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
2163 return NDR_ERR_SUCCESS;
2166 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo3 *r)
2168 uint32_t _ptr_secdesc;
2169 TALLOC_CTX *_mem_save_secdesc_0;
2170 if (ndr_flags & NDR_SCALARS) {
2171 NDR_CHECK(ndr_pull_align(ndr, 4));
2172 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
2173 if (_ptr_secdesc) {
2174 NDR_PULL_ALLOC(ndr, r->secdesc);
2175 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
2176 } else {
2177 r->secdesc = NULL;
2180 if (ndr_flags & NDR_BUFFERS) {
2181 if (r->secdesc) {
2182 uint32_t _relative_save_offset;
2183 _relative_save_offset = ndr->offset;
2184 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
2185 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
2186 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
2188 struct ndr_pull *_ndr_secdesc;
2189 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
2190 NDR_CHECK(ndr_pull_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
2191 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
2193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
2194 ndr->offset = _relative_save_offset;
2197 return NDR_ERR_SUCCESS;
2200 _PUBLIC_ void ndr_print_spoolss_PrinterInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo3 *r)
2202 ndr_print_struct(ndr, name, "spoolss_PrinterInfo3");
2203 ndr->depth++;
2204 ndr_print_ptr(ndr, "secdesc", r->secdesc);
2205 ndr->depth++;
2206 if (r->secdesc) {
2207 ndr_print_security_descriptor(ndr, "secdesc", r->secdesc);
2209 ndr->depth--;
2210 ndr->depth--;
2213 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo3(const struct spoolss_PrinterInfo3 *r, struct smb_iconv_convenience *ic, int flags)
2215 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo3, ic);
2218 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo4 *r)
2220 if (ndr_flags & NDR_SCALARS) {
2221 NDR_CHECK(ndr_push_align(ndr, 4));
2223 uint32_t _flags_save_string = ndr->flags;
2224 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2225 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
2226 ndr->flags = _flags_save_string;
2229 uint32_t _flags_save_string = ndr->flags;
2230 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2231 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
2232 ndr->flags = _flags_save_string;
2234 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
2236 if (ndr_flags & NDR_BUFFERS) {
2238 uint32_t _flags_save_string = ndr->flags;
2239 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2240 if (r->printername) {
2241 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printername));
2242 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
2244 ndr->flags = _flags_save_string;
2247 uint32_t _flags_save_string = ndr->flags;
2248 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2249 if (r->servername) {
2250 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->servername));
2251 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
2253 ndr->flags = _flags_save_string;
2256 return NDR_ERR_SUCCESS;
2259 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo4 *r)
2261 uint32_t _ptr_printername;
2262 TALLOC_CTX *_mem_save_printername_0;
2263 uint32_t _ptr_servername;
2264 TALLOC_CTX *_mem_save_servername_0;
2265 if (ndr_flags & NDR_SCALARS) {
2266 NDR_CHECK(ndr_pull_align(ndr, 4));
2268 uint32_t _flags_save_string = ndr->flags;
2269 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2270 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
2271 if (_ptr_printername) {
2272 NDR_PULL_ALLOC(ndr, r->printername);
2273 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
2274 } else {
2275 r->printername = NULL;
2277 ndr->flags = _flags_save_string;
2280 uint32_t _flags_save_string = ndr->flags;
2281 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2282 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
2283 if (_ptr_servername) {
2284 NDR_PULL_ALLOC(ndr, r->servername);
2285 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
2286 } else {
2287 r->servername = NULL;
2289 ndr->flags = _flags_save_string;
2291 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
2293 if (ndr_flags & NDR_BUFFERS) {
2295 uint32_t _flags_save_string = ndr->flags;
2296 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2297 if (r->printername) {
2298 uint32_t _relative_save_offset;
2299 _relative_save_offset = ndr->offset;
2300 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
2301 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2302 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
2303 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
2304 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
2305 ndr->offset = _relative_save_offset;
2307 ndr->flags = _flags_save_string;
2310 uint32_t _flags_save_string = ndr->flags;
2311 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2312 if (r->servername) {
2313 uint32_t _relative_save_offset;
2314 _relative_save_offset = ndr->offset;
2315 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
2316 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2317 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
2318 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
2319 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
2320 ndr->offset = _relative_save_offset;
2322 ndr->flags = _flags_save_string;
2325 return NDR_ERR_SUCCESS;
2328 _PUBLIC_ void ndr_print_spoolss_PrinterInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo4 *r)
2330 ndr_print_struct(ndr, name, "spoolss_PrinterInfo4");
2331 ndr->depth++;
2332 ndr_print_ptr(ndr, "printername", r->printername);
2333 ndr->depth++;
2334 if (r->printername) {
2335 ndr_print_string(ndr, "printername", r->printername);
2337 ndr->depth--;
2338 ndr_print_ptr(ndr, "servername", r->servername);
2339 ndr->depth++;
2340 if (r->servername) {
2341 ndr_print_string(ndr, "servername", r->servername);
2343 ndr->depth--;
2344 ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
2345 ndr->depth--;
2348 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo4(const struct spoolss_PrinterInfo4 *r, struct smb_iconv_convenience *ic, int flags)
2350 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo4, ic);
2353 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo5(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo5 *r)
2355 if (ndr_flags & NDR_SCALARS) {
2356 NDR_CHECK(ndr_push_align(ndr, 4));
2358 uint32_t _flags_save_string = ndr->flags;
2359 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2360 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
2361 ndr->flags = _flags_save_string;
2364 uint32_t _flags_save_string = ndr->flags;
2365 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2366 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->portname));
2367 ndr->flags = _flags_save_string;
2369 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
2370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device_not_selected_timeout));
2371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->transmission_retry_timeout));
2373 if (ndr_flags & NDR_BUFFERS) {
2375 uint32_t _flags_save_string = ndr->flags;
2376 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2377 if (r->printername) {
2378 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printername));
2379 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
2381 ndr->flags = _flags_save_string;
2384 uint32_t _flags_save_string = ndr->flags;
2385 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2386 if (r->portname) {
2387 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->portname));
2388 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->portname));
2390 ndr->flags = _flags_save_string;
2393 return NDR_ERR_SUCCESS;
2396 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo5(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo5 *r)
2398 uint32_t _ptr_printername;
2399 TALLOC_CTX *_mem_save_printername_0;
2400 uint32_t _ptr_portname;
2401 TALLOC_CTX *_mem_save_portname_0;
2402 if (ndr_flags & NDR_SCALARS) {
2403 NDR_CHECK(ndr_pull_align(ndr, 4));
2405 uint32_t _flags_save_string = ndr->flags;
2406 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2407 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
2408 if (_ptr_printername) {
2409 NDR_PULL_ALLOC(ndr, r->printername);
2410 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
2411 } else {
2412 r->printername = NULL;
2414 ndr->flags = _flags_save_string;
2417 uint32_t _flags_save_string = ndr->flags;
2418 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2419 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
2420 if (_ptr_portname) {
2421 NDR_PULL_ALLOC(ndr, r->portname);
2422 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->portname, _ptr_portname));
2423 } else {
2424 r->portname = NULL;
2426 ndr->flags = _flags_save_string;
2428 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
2429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device_not_selected_timeout));
2430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->transmission_retry_timeout));
2432 if (ndr_flags & NDR_BUFFERS) {
2434 uint32_t _flags_save_string = ndr->flags;
2435 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2436 if (r->printername) {
2437 uint32_t _relative_save_offset;
2438 _relative_save_offset = ndr->offset;
2439 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
2440 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2441 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
2442 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
2443 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
2444 ndr->offset = _relative_save_offset;
2446 ndr->flags = _flags_save_string;
2449 uint32_t _flags_save_string = ndr->flags;
2450 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2451 if (r->portname) {
2452 uint32_t _relative_save_offset;
2453 _relative_save_offset = ndr->offset;
2454 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->portname));
2455 _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2456 NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
2457 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->portname));
2458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
2459 ndr->offset = _relative_save_offset;
2461 ndr->flags = _flags_save_string;
2464 return NDR_ERR_SUCCESS;
2467 _PUBLIC_ void ndr_print_spoolss_PrinterInfo5(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo5 *r)
2469 ndr_print_struct(ndr, name, "spoolss_PrinterInfo5");
2470 ndr->depth++;
2471 ndr_print_ptr(ndr, "printername", r->printername);
2472 ndr->depth++;
2473 if (r->printername) {
2474 ndr_print_string(ndr, "printername", r->printername);
2476 ndr->depth--;
2477 ndr_print_ptr(ndr, "portname", r->portname);
2478 ndr->depth++;
2479 if (r->portname) {
2480 ndr_print_string(ndr, "portname", r->portname);
2482 ndr->depth--;
2483 ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
2484 ndr_print_uint32(ndr, "device_not_selected_timeout", r->device_not_selected_timeout);
2485 ndr_print_uint32(ndr, "transmission_retry_timeout", r->transmission_retry_timeout);
2486 ndr->depth--;
2489 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo5(const struct spoolss_PrinterInfo5 *r, struct smb_iconv_convenience *ic, int flags)
2491 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo5, ic);
2494 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo6(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo6 *r)
2496 if (ndr_flags & NDR_SCALARS) {
2497 NDR_CHECK(ndr_push_align(ndr, 4));
2498 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
2500 if (ndr_flags & NDR_BUFFERS) {
2502 return NDR_ERR_SUCCESS;
2505 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo6(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo6 *r)
2507 if (ndr_flags & NDR_SCALARS) {
2508 NDR_CHECK(ndr_pull_align(ndr, 4));
2509 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
2511 if (ndr_flags & NDR_BUFFERS) {
2513 return NDR_ERR_SUCCESS;
2516 _PUBLIC_ void ndr_print_spoolss_PrinterInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo6 *r)
2518 ndr_print_struct(ndr, name, "spoolss_PrinterInfo6");
2519 ndr->depth++;
2520 ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
2521 ndr->depth--;
2524 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo6(const struct spoolss_PrinterInfo6 *r, struct smb_iconv_convenience *ic, int flags)
2526 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo6, ic);
2529 static enum ndr_err_code ndr_push_spoolss_DsPrintAction(struct ndr_push *ndr, int ndr_flags, uint32_t r)
2531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
2532 return NDR_ERR_SUCCESS;
2535 static enum ndr_err_code ndr_pull_spoolss_DsPrintAction(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
2537 uint32_t v;
2538 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
2539 *r = v;
2540 return NDR_ERR_SUCCESS;
2543 _PUBLIC_ void ndr_print_spoolss_DsPrintAction(struct ndr_print *ndr, const char *name, uint32_t r)
2545 ndr_print_uint32(ndr, name, r);
2546 ndr->depth++;
2547 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_PUBLISH", DSPRINT_PUBLISH, r);
2548 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_UPDATE", DSPRINT_UPDATE, r);
2549 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_UNPUBLISH", DSPRINT_UNPUBLISH, r);
2550 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_REPUBLISH", DSPRINT_REPUBLISH, r);
2551 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_PENDING", DSPRINT_PENDING, r);
2552 ndr->depth--;
2555 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo7(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo7 *r)
2557 if (ndr_flags & NDR_SCALARS) {
2558 NDR_CHECK(ndr_push_align(ndr, 4));
2560 uint32_t _flags_save_string = ndr->flags;
2561 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2562 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->guid));
2563 ndr->flags = _flags_save_string;
2565 NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr, NDR_SCALARS, r->action));
2567 if (ndr_flags & NDR_BUFFERS) {
2569 uint32_t _flags_save_string = ndr->flags;
2570 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2571 if (r->guid) {
2572 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->guid));
2573 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->guid));
2575 ndr->flags = _flags_save_string;
2578 return NDR_ERR_SUCCESS;
2581 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo7(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo7 *r)
2583 uint32_t _ptr_guid;
2584 TALLOC_CTX *_mem_save_guid_0;
2585 if (ndr_flags & NDR_SCALARS) {
2586 NDR_CHECK(ndr_pull_align(ndr, 4));
2588 uint32_t _flags_save_string = ndr->flags;
2589 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2590 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guid));
2591 if (_ptr_guid) {
2592 NDR_PULL_ALLOC(ndr, r->guid);
2593 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->guid, _ptr_guid));
2594 } else {
2595 r->guid = NULL;
2597 ndr->flags = _flags_save_string;
2599 NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr, NDR_SCALARS, &r->action));
2601 if (ndr_flags & NDR_BUFFERS) {
2603 uint32_t _flags_save_string = ndr->flags;
2604 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
2605 if (r->guid) {
2606 uint32_t _relative_save_offset;
2607 _relative_save_offset = ndr->offset;
2608 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->guid));
2609 _mem_save_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2610 NDR_PULL_SET_MEM_CTX(ndr, r->guid, 0);
2611 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->guid));
2612 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guid_0, 0);
2613 ndr->offset = _relative_save_offset;
2615 ndr->flags = _flags_save_string;
2618 return NDR_ERR_SUCCESS;
2621 _PUBLIC_ void ndr_print_spoolss_PrinterInfo7(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo7 *r)
2623 ndr_print_struct(ndr, name, "spoolss_PrinterInfo7");
2624 ndr->depth++;
2625 ndr_print_ptr(ndr, "guid", r->guid);
2626 ndr->depth++;
2627 if (r->guid) {
2628 ndr_print_string(ndr, "guid", r->guid);
2630 ndr->depth--;
2631 ndr_print_spoolss_DsPrintAction(ndr, "action", r->action);
2632 ndr->depth--;
2635 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo7(const struct spoolss_PrinterInfo7 *r, struct smb_iconv_convenience *ic, int flags)
2637 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo7, ic);
2640 static enum ndr_err_code ndr_push_spoolss_DeviceModeInfo(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DeviceModeInfo *r)
2642 if (ndr_flags & NDR_SCALARS) {
2643 NDR_CHECK(ndr_push_align(ndr, 4));
2644 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
2646 if (ndr_flags & NDR_BUFFERS) {
2647 if (r->devmode) {
2648 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->devmode));
2650 struct ndr_push *_ndr_devmode;
2651 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
2652 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
2653 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
2657 return NDR_ERR_SUCCESS;
2660 static enum ndr_err_code ndr_pull_spoolss_DeviceModeInfo(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DeviceModeInfo *r)
2662 uint32_t _ptr_devmode;
2663 TALLOC_CTX *_mem_save_devmode_0;
2664 if (ndr_flags & NDR_SCALARS) {
2665 NDR_CHECK(ndr_pull_align(ndr, 4));
2666 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
2667 if (_ptr_devmode) {
2668 NDR_PULL_ALLOC(ndr, r->devmode);
2669 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
2670 } else {
2671 r->devmode = NULL;
2674 if (ndr_flags & NDR_BUFFERS) {
2675 if (r->devmode) {
2676 uint32_t _relative_save_offset;
2677 _relative_save_offset = ndr->offset;
2678 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
2679 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
2680 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
2682 struct ndr_pull *_ndr_devmode;
2683 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
2684 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
2685 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
2687 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
2688 ndr->offset = _relative_save_offset;
2691 return NDR_ERR_SUCCESS;
2694 _PUBLIC_ void ndr_print_spoolss_DeviceModeInfo(struct ndr_print *ndr, const char *name, const struct spoolss_DeviceModeInfo *r)
2696 ndr_print_struct(ndr, name, "spoolss_DeviceModeInfo");
2697 ndr->depth++;
2698 ndr_print_ptr(ndr, "devmode", r->devmode);
2699 ndr->depth++;
2700 if (r->devmode) {
2701 ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
2703 ndr->depth--;
2704 ndr->depth--;
2707 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrinterInfo *r)
2709 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
2710 if (ndr_flags & NDR_SCALARS) {
2711 int level = ndr_push_get_switch_value(ndr, r);
2712 switch (level) {
2713 case 0: {
2714 NDR_CHECK(ndr_push_align(ndr, 4));
2715 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2716 NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr, NDR_SCALARS, &r->info0));
2717 break; }
2719 case 1: {
2720 NDR_CHECK(ndr_push_align(ndr, 4));
2721 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2722 NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1));
2723 break; }
2725 case 2: {
2726 NDR_CHECK(ndr_push_align(ndr, 4));
2727 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2728 NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2));
2729 break; }
2731 case 3: {
2732 NDR_CHECK(ndr_push_align(ndr, 4));
2733 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2734 NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3));
2735 break; }
2737 case 4: {
2738 NDR_CHECK(ndr_push_align(ndr, 4));
2739 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2740 NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4));
2741 break; }
2743 case 5: {
2744 NDR_CHECK(ndr_push_align(ndr, 4));
2745 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2746 NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5));
2747 break; }
2749 case 6: {
2750 NDR_CHECK(ndr_push_align(ndr, 4));
2751 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2752 NDR_CHECK(ndr_push_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6));
2753 break; }
2755 case 7: {
2756 NDR_CHECK(ndr_push_align(ndr, 4));
2757 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2758 NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7));
2759 break; }
2761 case 8: {
2762 NDR_CHECK(ndr_push_align(ndr, 4));
2763 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2764 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info8));
2765 break; }
2767 case 9: {
2768 NDR_CHECK(ndr_push_align(ndr, 4));
2769 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
2770 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info9));
2771 break; }
2773 default: {
2774 break; }
2778 if (ndr_flags & NDR_BUFFERS) {
2779 int level = ndr_push_get_switch_value(ndr, r);
2780 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
2781 switch (level) {
2782 case 0:
2783 NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr, NDR_BUFFERS, &r->info0));
2784 break;
2786 case 1:
2787 NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1));
2788 break;
2790 case 2:
2791 NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2));
2792 break;
2794 case 3:
2795 NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3));
2796 break;
2798 case 4:
2799 NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4));
2800 break;
2802 case 5:
2803 NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5));
2804 break;
2806 case 6:
2807 break;
2809 case 7:
2810 NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7));
2811 break;
2813 case 8:
2814 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info8));
2815 break;
2817 case 9:
2818 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info9));
2819 break;
2821 default:
2822 break;
2826 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
2827 return NDR_ERR_SUCCESS;
2830 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrinterInfo *r)
2832 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
2833 int level;
2834 level = ndr_pull_get_switch_value(ndr, r);
2835 if (ndr_flags & NDR_SCALARS) {
2836 switch (level) {
2837 case 0: {
2838 NDR_CHECK(ndr_pull_align(ndr, 4));
2839 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2840 NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr, NDR_SCALARS, &r->info0));
2841 break; }
2843 case 1: {
2844 NDR_CHECK(ndr_pull_align(ndr, 4));
2845 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2846 NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1));
2847 break; }
2849 case 2: {
2850 NDR_CHECK(ndr_pull_align(ndr, 4));
2851 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2852 NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2));
2853 break; }
2855 case 3: {
2856 NDR_CHECK(ndr_pull_align(ndr, 4));
2857 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2858 NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3));
2859 break; }
2861 case 4: {
2862 NDR_CHECK(ndr_pull_align(ndr, 4));
2863 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2864 NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4));
2865 break; }
2867 case 5: {
2868 NDR_CHECK(ndr_pull_align(ndr, 4));
2869 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2870 NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5));
2871 break; }
2873 case 6: {
2874 NDR_CHECK(ndr_pull_align(ndr, 4));
2875 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2876 NDR_CHECK(ndr_pull_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6));
2877 break; }
2879 case 7: {
2880 NDR_CHECK(ndr_pull_align(ndr, 4));
2881 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2882 NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7));
2883 break; }
2885 case 8: {
2886 NDR_CHECK(ndr_pull_align(ndr, 4));
2887 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2888 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info8));
2889 break; }
2891 case 9: {
2892 NDR_CHECK(ndr_pull_align(ndr, 4));
2893 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
2894 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info9));
2895 break; }
2897 default: {
2898 break; }
2902 if (ndr_flags & NDR_BUFFERS) {
2903 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
2904 switch (level) {
2905 case 0:
2906 NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr, NDR_BUFFERS, &r->info0));
2907 break;
2909 case 1:
2910 NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1));
2911 break;
2913 case 2:
2914 NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2));
2915 break;
2917 case 3:
2918 NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3));
2919 break;
2921 case 4:
2922 NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4));
2923 break;
2925 case 5:
2926 NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5));
2927 break;
2929 case 6:
2930 break;
2932 case 7:
2933 NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7));
2934 break;
2936 case 8:
2937 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info8));
2938 break;
2940 case 9:
2941 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info9));
2942 break;
2944 default:
2945 break;
2949 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
2950 return NDR_ERR_SUCCESS;
2953 _PUBLIC_ void ndr_print_spoolss_PrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrinterInfo *r)
2955 int level;
2956 level = ndr_print_get_switch_value(ndr, r);
2957 ndr_print_union(ndr, name, level, "spoolss_PrinterInfo");
2958 switch (level) {
2959 case 0:
2960 ndr_print_spoolss_PrinterInfo0(ndr, "info0", &r->info0);
2961 break;
2963 case 1:
2964 ndr_print_spoolss_PrinterInfo1(ndr, "info1", &r->info1);
2965 break;
2967 case 2:
2968 ndr_print_spoolss_PrinterInfo2(ndr, "info2", &r->info2);
2969 break;
2971 case 3:
2972 ndr_print_spoolss_PrinterInfo3(ndr, "info3", &r->info3);
2973 break;
2975 case 4:
2976 ndr_print_spoolss_PrinterInfo4(ndr, "info4", &r->info4);
2977 break;
2979 case 5:
2980 ndr_print_spoolss_PrinterInfo5(ndr, "info5", &r->info5);
2981 break;
2983 case 6:
2984 ndr_print_spoolss_PrinterInfo6(ndr, "info6", &r->info6);
2985 break;
2987 case 7:
2988 ndr_print_spoolss_PrinterInfo7(ndr, "info7", &r->info7);
2989 break;
2991 case 8:
2992 ndr_print_spoolss_DeviceModeInfo(ndr, "info8", &r->info8);
2993 break;
2995 case 9:
2996 ndr_print_spoolss_DeviceModeInfo(ndr, "info9", &r->info9);
2997 break;
2999 default:
3000 break;
3005 _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo(const union spoolss_PrinterInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
3007 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo, ic);
3010 static enum ndr_err_code ndr_push_spoolss_DevmodeContainer(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DevmodeContainer *r)
3012 if (ndr_flags & NDR_SCALARS) {
3013 NDR_CHECK(ndr_push_align(ndr, 4));
3014 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->iconv_convenience, ndr->flags)));
3015 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devmode));
3017 if (ndr_flags & NDR_BUFFERS) {
3018 if (r->devmode) {
3020 struct ndr_push *_ndr_devmode;
3021 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 4, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->iconv_convenience, ndr->flags)));
3022 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
3023 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 4, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->iconv_convenience, ndr->flags)));
3027 return NDR_ERR_SUCCESS;
3030 static enum ndr_err_code ndr_pull_spoolss_DevmodeContainer(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DevmodeContainer *r)
3032 uint32_t _ptr_devmode;
3033 TALLOC_CTX *_mem_save_devmode_0;
3034 if (ndr_flags & NDR_SCALARS) {
3035 NDR_CHECK(ndr_pull_align(ndr, 4));
3036 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
3037 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
3038 if (_ptr_devmode) {
3039 NDR_PULL_ALLOC(ndr, r->devmode);
3040 } else {
3041 r->devmode = NULL;
3044 if (ndr_flags & NDR_BUFFERS) {
3045 if (r->devmode) {
3046 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
3047 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
3049 struct ndr_pull *_ndr_devmode;
3050 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 4, r->_ndr_size));
3051 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
3052 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 4, r->_ndr_size));
3054 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
3057 return NDR_ERR_SUCCESS;
3060 _PUBLIC_ void ndr_print_spoolss_DevmodeContainer(struct ndr_print *ndr, const char *name, const struct spoolss_DevmodeContainer *r)
3062 ndr_print_struct(ndr, name, "spoolss_DevmodeContainer");
3063 ndr->depth++;
3064 ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_spoolss_DeviceMode(r->devmode, ndr->iconv_convenience, ndr->flags):r->_ndr_size);
3065 ndr_print_ptr(ndr, "devmode", r->devmode);
3066 ndr->depth++;
3067 if (r->devmode) {
3068 ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
3070 ndr->depth--;
3071 ndr->depth--;
3074 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfo1 *r)
3076 if (ndr_flags & NDR_SCALARS) {
3077 NDR_CHECK(ndr_push_align(ndr, 4));
3078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
3080 uint32_t _flags_save_string = ndr->flags;
3081 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3082 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
3083 ndr->flags = _flags_save_string;
3086 uint32_t _flags_save_string = ndr->flags;
3087 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3088 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
3089 ndr->flags = _flags_save_string;
3092 uint32_t _flags_save_string = ndr->flags;
3093 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3094 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
3095 ndr->flags = _flags_save_string;
3098 uint32_t _flags_save_string = ndr->flags;
3099 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3100 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
3101 ndr->flags = _flags_save_string;
3104 uint32_t _flags_save_string = ndr->flags;
3105 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3106 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
3107 ndr->flags = _flags_save_string;
3110 uint32_t _flags_save_string = ndr->flags;
3111 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3112 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
3113 ndr->flags = _flags_save_string;
3115 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
3116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
3117 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
3118 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
3119 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
3120 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
3122 if (ndr_flags & NDR_BUFFERS) {
3124 uint32_t _flags_save_string = ndr->flags;
3125 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3126 if (r->printer_name) {
3127 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printer_name));
3128 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
3130 ndr->flags = _flags_save_string;
3133 uint32_t _flags_save_string = ndr->flags;
3134 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3135 if (r->server_name) {
3136 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->server_name));
3137 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
3139 ndr->flags = _flags_save_string;
3142 uint32_t _flags_save_string = ndr->flags;
3143 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3144 if (r->user_name) {
3145 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->user_name));
3146 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
3148 ndr->flags = _flags_save_string;
3151 uint32_t _flags_save_string = ndr->flags;
3152 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3153 if (r->document_name) {
3154 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->document_name));
3155 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
3157 ndr->flags = _flags_save_string;
3160 uint32_t _flags_save_string = ndr->flags;
3161 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3162 if (r->data_type) {
3163 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_type));
3164 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
3166 ndr->flags = _flags_save_string;
3169 uint32_t _flags_save_string = ndr->flags;
3170 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3171 if (r->text_status) {
3172 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->text_status));
3173 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
3175 ndr->flags = _flags_save_string;
3178 return NDR_ERR_SUCCESS;
3181 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfo1 *r)
3183 uint32_t _ptr_printer_name;
3184 TALLOC_CTX *_mem_save_printer_name_0;
3185 uint32_t _ptr_server_name;
3186 TALLOC_CTX *_mem_save_server_name_0;
3187 uint32_t _ptr_user_name;
3188 TALLOC_CTX *_mem_save_user_name_0;
3189 uint32_t _ptr_document_name;
3190 TALLOC_CTX *_mem_save_document_name_0;
3191 uint32_t _ptr_data_type;
3192 TALLOC_CTX *_mem_save_data_type_0;
3193 uint32_t _ptr_text_status;
3194 TALLOC_CTX *_mem_save_text_status_0;
3195 if (ndr_flags & NDR_SCALARS) {
3196 NDR_CHECK(ndr_pull_align(ndr, 4));
3197 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
3199 uint32_t _flags_save_string = ndr->flags;
3200 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3201 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
3202 if (_ptr_printer_name) {
3203 NDR_PULL_ALLOC(ndr, r->printer_name);
3204 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
3205 } else {
3206 r->printer_name = NULL;
3208 ndr->flags = _flags_save_string;
3211 uint32_t _flags_save_string = ndr->flags;
3212 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3213 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
3214 if (_ptr_server_name) {
3215 NDR_PULL_ALLOC(ndr, r->server_name);
3216 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
3217 } else {
3218 r->server_name = NULL;
3220 ndr->flags = _flags_save_string;
3223 uint32_t _flags_save_string = ndr->flags;
3224 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3225 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
3226 if (_ptr_user_name) {
3227 NDR_PULL_ALLOC(ndr, r->user_name);
3228 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
3229 } else {
3230 r->user_name = NULL;
3232 ndr->flags = _flags_save_string;
3235 uint32_t _flags_save_string = ndr->flags;
3236 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3237 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
3238 if (_ptr_document_name) {
3239 NDR_PULL_ALLOC(ndr, r->document_name);
3240 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
3241 } else {
3242 r->document_name = NULL;
3244 ndr->flags = _flags_save_string;
3247 uint32_t _flags_save_string = ndr->flags;
3248 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3249 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
3250 if (_ptr_data_type) {
3251 NDR_PULL_ALLOC(ndr, r->data_type);
3252 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
3253 } else {
3254 r->data_type = NULL;
3256 ndr->flags = _flags_save_string;
3259 uint32_t _flags_save_string = ndr->flags;
3260 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3261 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
3262 if (_ptr_text_status) {
3263 NDR_PULL_ALLOC(ndr, r->text_status);
3264 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
3265 } else {
3266 r->text_status = NULL;
3268 ndr->flags = _flags_save_string;
3270 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
3271 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
3272 if (r->priority > 99) {
3273 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3275 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
3276 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
3277 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
3278 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
3280 if (ndr_flags & NDR_BUFFERS) {
3282 uint32_t _flags_save_string = ndr->flags;
3283 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3284 if (r->printer_name) {
3285 uint32_t _relative_save_offset;
3286 _relative_save_offset = ndr->offset;
3287 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
3288 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3289 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
3290 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
3291 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
3292 ndr->offset = _relative_save_offset;
3294 ndr->flags = _flags_save_string;
3297 uint32_t _flags_save_string = ndr->flags;
3298 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3299 if (r->server_name) {
3300 uint32_t _relative_save_offset;
3301 _relative_save_offset = ndr->offset;
3302 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
3303 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3304 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
3305 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
3306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
3307 ndr->offset = _relative_save_offset;
3309 ndr->flags = _flags_save_string;
3312 uint32_t _flags_save_string = ndr->flags;
3313 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3314 if (r->user_name) {
3315 uint32_t _relative_save_offset;
3316 _relative_save_offset = ndr->offset;
3317 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
3318 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3319 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
3320 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
3321 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
3322 ndr->offset = _relative_save_offset;
3324 ndr->flags = _flags_save_string;
3327 uint32_t _flags_save_string = ndr->flags;
3328 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3329 if (r->document_name) {
3330 uint32_t _relative_save_offset;
3331 _relative_save_offset = ndr->offset;
3332 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
3333 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3334 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
3335 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
3336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
3337 ndr->offset = _relative_save_offset;
3339 ndr->flags = _flags_save_string;
3342 uint32_t _flags_save_string = ndr->flags;
3343 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3344 if (r->data_type) {
3345 uint32_t _relative_save_offset;
3346 _relative_save_offset = ndr->offset;
3347 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
3348 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
3349 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
3350 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
3351 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
3352 ndr->offset = _relative_save_offset;
3354 ndr->flags = _flags_save_string;
3357 uint32_t _flags_save_string = ndr->flags;
3358 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3359 if (r->text_status) {
3360 uint32_t _relative_save_offset;
3361 _relative_save_offset = ndr->offset;
3362 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
3363 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3364 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
3365 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
3366 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
3367 ndr->offset = _relative_save_offset;
3369 ndr->flags = _flags_save_string;
3372 return NDR_ERR_SUCCESS;
3375 _PUBLIC_ void ndr_print_spoolss_JobInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo1 *r)
3377 ndr_print_struct(ndr, name, "spoolss_JobInfo1");
3378 ndr->depth++;
3379 ndr_print_uint32(ndr, "job_id", r->job_id);
3380 ndr_print_ptr(ndr, "printer_name", r->printer_name);
3381 ndr->depth++;
3382 if (r->printer_name) {
3383 ndr_print_string(ndr, "printer_name", r->printer_name);
3385 ndr->depth--;
3386 ndr_print_ptr(ndr, "server_name", r->server_name);
3387 ndr->depth++;
3388 if (r->server_name) {
3389 ndr_print_string(ndr, "server_name", r->server_name);
3391 ndr->depth--;
3392 ndr_print_ptr(ndr, "user_name", r->user_name);
3393 ndr->depth++;
3394 if (r->user_name) {
3395 ndr_print_string(ndr, "user_name", r->user_name);
3397 ndr->depth--;
3398 ndr_print_ptr(ndr, "document_name", r->document_name);
3399 ndr->depth++;
3400 if (r->document_name) {
3401 ndr_print_string(ndr, "document_name", r->document_name);
3403 ndr->depth--;
3404 ndr_print_ptr(ndr, "data_type", r->data_type);
3405 ndr->depth++;
3406 if (r->data_type) {
3407 ndr_print_string(ndr, "data_type", r->data_type);
3409 ndr->depth--;
3410 ndr_print_ptr(ndr, "text_status", r->text_status);
3411 ndr->depth++;
3412 if (r->text_status) {
3413 ndr_print_string(ndr, "text_status", r->text_status);
3415 ndr->depth--;
3416 ndr_print_spoolss_JobStatus(ndr, "status", r->status);
3417 ndr_print_uint32(ndr, "priority", r->priority);
3418 ndr_print_uint32(ndr, "position", r->position);
3419 ndr_print_uint32(ndr, "total_pages", r->total_pages);
3420 ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
3421 ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
3422 ndr->depth--;
3425 _PUBLIC_ size_t ndr_size_spoolss_JobInfo1(const struct spoolss_JobInfo1 *r, struct smb_iconv_convenience *ic, int flags)
3427 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo1, ic);
3430 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfo2 *r)
3432 if (ndr_flags & NDR_SCALARS) {
3433 NDR_CHECK(ndr_push_align(ndr, 4));
3434 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
3436 uint32_t _flags_save_string = ndr->flags;
3437 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3438 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
3439 ndr->flags = _flags_save_string;
3442 uint32_t _flags_save_string = ndr->flags;
3443 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3444 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
3445 ndr->flags = _flags_save_string;
3448 uint32_t _flags_save_string = ndr->flags;
3449 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3450 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
3451 ndr->flags = _flags_save_string;
3454 uint32_t _flags_save_string = ndr->flags;
3455 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3456 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
3457 ndr->flags = _flags_save_string;
3460 uint32_t _flags_save_string = ndr->flags;
3461 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3462 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->notify_name));
3463 ndr->flags = _flags_save_string;
3466 uint32_t _flags_save_string = ndr->flags;
3467 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3468 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
3469 ndr->flags = _flags_save_string;
3472 uint32_t _flags_save_string = ndr->flags;
3473 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3474 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor));
3475 ndr->flags = _flags_save_string;
3478 uint32_t _flags_save_string = ndr->flags;
3479 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3480 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters));
3481 ndr->flags = _flags_save_string;
3484 uint32_t _flags_save_string = ndr->flags;
3485 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3486 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
3487 ndr->flags = _flags_save_string;
3489 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
3491 uint32_t _flags_save_string = ndr->flags;
3492 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3493 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
3494 ndr->flags = _flags_save_string;
3496 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
3497 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
3498 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
3499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
3500 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
3501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
3502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
3503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
3504 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
3505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
3508 if (ndr_flags & NDR_BUFFERS) {
3510 uint32_t _flags_save_string = ndr->flags;
3511 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3512 if (r->printer_name) {
3513 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printer_name));
3514 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
3516 ndr->flags = _flags_save_string;
3519 uint32_t _flags_save_string = ndr->flags;
3520 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3521 if (r->server_name) {
3522 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->server_name));
3523 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
3525 ndr->flags = _flags_save_string;
3528 uint32_t _flags_save_string = ndr->flags;
3529 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3530 if (r->user_name) {
3531 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->user_name));
3532 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
3534 ndr->flags = _flags_save_string;
3537 uint32_t _flags_save_string = ndr->flags;
3538 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3539 if (r->document_name) {
3540 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->document_name));
3541 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
3543 ndr->flags = _flags_save_string;
3546 uint32_t _flags_save_string = ndr->flags;
3547 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3548 if (r->notify_name) {
3549 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->notify_name));
3550 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->notify_name));
3552 ndr->flags = _flags_save_string;
3555 uint32_t _flags_save_string = ndr->flags;
3556 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3557 if (r->data_type) {
3558 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_type));
3559 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
3561 ndr->flags = _flags_save_string;
3564 uint32_t _flags_save_string = ndr->flags;
3565 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3566 if (r->print_processor) {
3567 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->print_processor));
3568 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor));
3570 ndr->flags = _flags_save_string;
3573 uint32_t _flags_save_string = ndr->flags;
3574 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3575 if (r->parameters) {
3576 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->parameters));
3577 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters));
3579 ndr->flags = _flags_save_string;
3582 uint32_t _flags_save_string = ndr->flags;
3583 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3584 if (r->driver_name) {
3585 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
3586 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
3588 ndr->flags = _flags_save_string;
3590 if (r->devmode) {
3591 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->devmode));
3592 NDR_CHECK(ndr_push_spoolss_DeviceMode(ndr, NDR_SCALARS, r->devmode));
3595 uint32_t _flags_save_string = ndr->flags;
3596 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3597 if (r->text_status) {
3598 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->text_status));
3599 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
3601 ndr->flags = _flags_save_string;
3603 if (r->secdesc) {
3604 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->secdesc));
3605 NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
3608 return NDR_ERR_SUCCESS;
3611 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfo2 *r)
3613 uint32_t _ptr_printer_name;
3614 TALLOC_CTX *_mem_save_printer_name_0;
3615 uint32_t _ptr_server_name;
3616 TALLOC_CTX *_mem_save_server_name_0;
3617 uint32_t _ptr_user_name;
3618 TALLOC_CTX *_mem_save_user_name_0;
3619 uint32_t _ptr_document_name;
3620 TALLOC_CTX *_mem_save_document_name_0;
3621 uint32_t _ptr_notify_name;
3622 TALLOC_CTX *_mem_save_notify_name_0;
3623 uint32_t _ptr_data_type;
3624 TALLOC_CTX *_mem_save_data_type_0;
3625 uint32_t _ptr_print_processor;
3626 TALLOC_CTX *_mem_save_print_processor_0;
3627 uint32_t _ptr_parameters;
3628 TALLOC_CTX *_mem_save_parameters_0;
3629 uint32_t _ptr_driver_name;
3630 TALLOC_CTX *_mem_save_driver_name_0;
3631 uint32_t _ptr_devmode;
3632 TALLOC_CTX *_mem_save_devmode_0;
3633 uint32_t _ptr_text_status;
3634 TALLOC_CTX *_mem_save_text_status_0;
3635 uint32_t _ptr_secdesc;
3636 TALLOC_CTX *_mem_save_secdesc_0;
3637 if (ndr_flags & NDR_SCALARS) {
3638 NDR_CHECK(ndr_pull_align(ndr, 4));
3639 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
3641 uint32_t _flags_save_string = ndr->flags;
3642 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3643 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
3644 if (_ptr_printer_name) {
3645 NDR_PULL_ALLOC(ndr, r->printer_name);
3646 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
3647 } else {
3648 r->printer_name = NULL;
3650 ndr->flags = _flags_save_string;
3653 uint32_t _flags_save_string = ndr->flags;
3654 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3655 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
3656 if (_ptr_server_name) {
3657 NDR_PULL_ALLOC(ndr, r->server_name);
3658 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
3659 } else {
3660 r->server_name = NULL;
3662 ndr->flags = _flags_save_string;
3665 uint32_t _flags_save_string = ndr->flags;
3666 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3667 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
3668 if (_ptr_user_name) {
3669 NDR_PULL_ALLOC(ndr, r->user_name);
3670 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
3671 } else {
3672 r->user_name = NULL;
3674 ndr->flags = _flags_save_string;
3677 uint32_t _flags_save_string = ndr->flags;
3678 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3679 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
3680 if (_ptr_document_name) {
3681 NDR_PULL_ALLOC(ndr, r->document_name);
3682 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
3683 } else {
3684 r->document_name = NULL;
3686 ndr->flags = _flags_save_string;
3689 uint32_t _flags_save_string = ndr->flags;
3690 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3691 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
3692 if (_ptr_notify_name) {
3693 NDR_PULL_ALLOC(ndr, r->notify_name);
3694 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->notify_name, _ptr_notify_name));
3695 } else {
3696 r->notify_name = NULL;
3698 ndr->flags = _flags_save_string;
3701 uint32_t _flags_save_string = ndr->flags;
3702 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3703 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
3704 if (_ptr_data_type) {
3705 NDR_PULL_ALLOC(ndr, r->data_type);
3706 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
3707 } else {
3708 r->data_type = NULL;
3710 ndr->flags = _flags_save_string;
3713 uint32_t _flags_save_string = ndr->flags;
3714 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3715 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
3716 if (_ptr_print_processor) {
3717 NDR_PULL_ALLOC(ndr, r->print_processor);
3718 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor, _ptr_print_processor));
3719 } else {
3720 r->print_processor = NULL;
3722 ndr->flags = _flags_save_string;
3725 uint32_t _flags_save_string = ndr->flags;
3726 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3727 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
3728 if (_ptr_parameters) {
3729 NDR_PULL_ALLOC(ndr, r->parameters);
3730 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
3731 } else {
3732 r->parameters = NULL;
3734 ndr->flags = _flags_save_string;
3737 uint32_t _flags_save_string = ndr->flags;
3738 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3739 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
3740 if (_ptr_driver_name) {
3741 NDR_PULL_ALLOC(ndr, r->driver_name);
3742 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
3743 } else {
3744 r->driver_name = NULL;
3746 ndr->flags = _flags_save_string;
3748 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
3749 if (_ptr_devmode) {
3750 NDR_PULL_ALLOC(ndr, r->devmode);
3751 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
3752 } else {
3753 r->devmode = NULL;
3756 uint32_t _flags_save_string = ndr->flags;
3757 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3758 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
3759 if (_ptr_text_status) {
3760 NDR_PULL_ALLOC(ndr, r->text_status);
3761 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
3762 } else {
3763 r->text_status = NULL;
3765 ndr->flags = _flags_save_string;
3767 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
3768 if (_ptr_secdesc) {
3769 NDR_PULL_ALLOC(ndr, r->secdesc);
3770 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
3771 } else {
3772 r->secdesc = NULL;
3774 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
3775 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
3776 if (r->priority > 99) {
3777 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3779 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
3780 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
3781 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
3782 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
3783 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
3784 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
3785 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3786 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
3788 if (ndr_flags & NDR_BUFFERS) {
3790 uint32_t _flags_save_string = ndr->flags;
3791 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3792 if (r->printer_name) {
3793 uint32_t _relative_save_offset;
3794 _relative_save_offset = ndr->offset;
3795 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
3796 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3797 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
3798 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
3799 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
3800 ndr->offset = _relative_save_offset;
3802 ndr->flags = _flags_save_string;
3805 uint32_t _flags_save_string = ndr->flags;
3806 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3807 if (r->server_name) {
3808 uint32_t _relative_save_offset;
3809 _relative_save_offset = ndr->offset;
3810 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
3811 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3812 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
3813 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
3814 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
3815 ndr->offset = _relative_save_offset;
3817 ndr->flags = _flags_save_string;
3820 uint32_t _flags_save_string = ndr->flags;
3821 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3822 if (r->user_name) {
3823 uint32_t _relative_save_offset;
3824 _relative_save_offset = ndr->offset;
3825 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
3826 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3827 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
3828 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
3829 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
3830 ndr->offset = _relative_save_offset;
3832 ndr->flags = _flags_save_string;
3835 uint32_t _flags_save_string = ndr->flags;
3836 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3837 if (r->document_name) {
3838 uint32_t _relative_save_offset;
3839 _relative_save_offset = ndr->offset;
3840 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
3841 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3842 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
3843 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
3844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
3845 ndr->offset = _relative_save_offset;
3847 ndr->flags = _flags_save_string;
3850 uint32_t _flags_save_string = ndr->flags;
3851 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3852 if (r->notify_name) {
3853 uint32_t _relative_save_offset;
3854 _relative_save_offset = ndr->offset;
3855 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->notify_name));
3856 _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3857 NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
3858 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->notify_name));
3859 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
3860 ndr->offset = _relative_save_offset;
3862 ndr->flags = _flags_save_string;
3865 uint32_t _flags_save_string = ndr->flags;
3866 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3867 if (r->data_type) {
3868 uint32_t _relative_save_offset;
3869 _relative_save_offset = ndr->offset;
3870 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
3871 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
3872 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
3873 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
3874 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
3875 ndr->offset = _relative_save_offset;
3877 ndr->flags = _flags_save_string;
3880 uint32_t _flags_save_string = ndr->flags;
3881 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3882 if (r->print_processor) {
3883 uint32_t _relative_save_offset;
3884 _relative_save_offset = ndr->offset;
3885 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor));
3886 _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
3887 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
3888 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor));
3889 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
3890 ndr->offset = _relative_save_offset;
3892 ndr->flags = _flags_save_string;
3895 uint32_t _flags_save_string = ndr->flags;
3896 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3897 if (r->parameters) {
3898 uint32_t _relative_save_offset;
3899 _relative_save_offset = ndr->offset;
3900 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
3901 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
3902 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
3903 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
3904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
3905 ndr->offset = _relative_save_offset;
3907 ndr->flags = _flags_save_string;
3910 uint32_t _flags_save_string = ndr->flags;
3911 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3912 if (r->driver_name) {
3913 uint32_t _relative_save_offset;
3914 _relative_save_offset = ndr->offset;
3915 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
3916 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3917 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
3918 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
3919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
3920 ndr->offset = _relative_save_offset;
3922 ndr->flags = _flags_save_string;
3924 if (r->devmode) {
3925 uint32_t _relative_save_offset;
3926 _relative_save_offset = ndr->offset;
3927 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
3928 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
3929 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
3930 NDR_CHECK(ndr_pull_spoolss_DeviceMode(ndr, NDR_SCALARS, r->devmode));
3931 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
3932 ndr->offset = _relative_save_offset;
3935 uint32_t _flags_save_string = ndr->flags;
3936 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
3937 if (r->text_status) {
3938 uint32_t _relative_save_offset;
3939 _relative_save_offset = ndr->offset;
3940 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
3941 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3942 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
3943 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
3944 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
3945 ndr->offset = _relative_save_offset;
3947 ndr->flags = _flags_save_string;
3949 if (r->secdesc) {
3950 uint32_t _relative_save_offset;
3951 _relative_save_offset = ndr->offset;
3952 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
3953 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
3954 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
3955 NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
3956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
3957 ndr->offset = _relative_save_offset;
3960 return NDR_ERR_SUCCESS;
3963 _PUBLIC_ void ndr_print_spoolss_JobInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo2 *r)
3965 ndr_print_struct(ndr, name, "spoolss_JobInfo2");
3966 ndr->depth++;
3967 ndr_print_uint32(ndr, "job_id", r->job_id);
3968 ndr_print_ptr(ndr, "printer_name", r->printer_name);
3969 ndr->depth++;
3970 if (r->printer_name) {
3971 ndr_print_string(ndr, "printer_name", r->printer_name);
3973 ndr->depth--;
3974 ndr_print_ptr(ndr, "server_name", r->server_name);
3975 ndr->depth++;
3976 if (r->server_name) {
3977 ndr_print_string(ndr, "server_name", r->server_name);
3979 ndr->depth--;
3980 ndr_print_ptr(ndr, "user_name", r->user_name);
3981 ndr->depth++;
3982 if (r->user_name) {
3983 ndr_print_string(ndr, "user_name", r->user_name);
3985 ndr->depth--;
3986 ndr_print_ptr(ndr, "document_name", r->document_name);
3987 ndr->depth++;
3988 if (r->document_name) {
3989 ndr_print_string(ndr, "document_name", r->document_name);
3991 ndr->depth--;
3992 ndr_print_ptr(ndr, "notify_name", r->notify_name);
3993 ndr->depth++;
3994 if (r->notify_name) {
3995 ndr_print_string(ndr, "notify_name", r->notify_name);
3997 ndr->depth--;
3998 ndr_print_ptr(ndr, "data_type", r->data_type);
3999 ndr->depth++;
4000 if (r->data_type) {
4001 ndr_print_string(ndr, "data_type", r->data_type);
4003 ndr->depth--;
4004 ndr_print_ptr(ndr, "print_processor", r->print_processor);
4005 ndr->depth++;
4006 if (r->print_processor) {
4007 ndr_print_string(ndr, "print_processor", r->print_processor);
4009 ndr->depth--;
4010 ndr_print_ptr(ndr, "parameters", r->parameters);
4011 ndr->depth++;
4012 if (r->parameters) {
4013 ndr_print_string(ndr, "parameters", r->parameters);
4015 ndr->depth--;
4016 ndr_print_ptr(ndr, "driver_name", r->driver_name);
4017 ndr->depth++;
4018 if (r->driver_name) {
4019 ndr_print_string(ndr, "driver_name", r->driver_name);
4021 ndr->depth--;
4022 ndr_print_ptr(ndr, "devmode", r->devmode);
4023 ndr->depth++;
4024 if (r->devmode) {
4025 ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
4027 ndr->depth--;
4028 ndr_print_ptr(ndr, "text_status", r->text_status);
4029 ndr->depth++;
4030 if (r->text_status) {
4031 ndr_print_string(ndr, "text_status", r->text_status);
4033 ndr->depth--;
4034 ndr_print_ptr(ndr, "secdesc", r->secdesc);
4035 ndr->depth++;
4036 if (r->secdesc) {
4037 ndr_print_security_descriptor(ndr, "secdesc", r->secdesc);
4039 ndr->depth--;
4040 ndr_print_spoolss_JobStatus(ndr, "status", r->status);
4041 ndr_print_uint32(ndr, "priority", r->priority);
4042 ndr_print_uint32(ndr, "position", r->position);
4043 ndr_print_uint32(ndr, "start_time", r->start_time);
4044 ndr_print_uint32(ndr, "until_time", r->until_time);
4045 ndr_print_uint32(ndr, "total_pages", r->total_pages);
4046 ndr_print_uint32(ndr, "size", r->size);
4047 ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
4048 ndr_print_uint32(ndr, "time", r->time);
4049 ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
4050 ndr->depth--;
4053 _PUBLIC_ size_t ndr_size_spoolss_JobInfo2(const struct spoolss_JobInfo2 *r, struct smb_iconv_convenience *ic, int flags)
4055 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo2, ic);
4058 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfo3 *r)
4060 if (ndr_flags & NDR_SCALARS) {
4061 NDR_CHECK(ndr_push_align(ndr, 4));
4062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
4063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_job_id));
4064 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
4066 if (ndr_flags & NDR_BUFFERS) {
4068 return NDR_ERR_SUCCESS;
4071 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfo3 *r)
4073 if (ndr_flags & NDR_SCALARS) {
4074 NDR_CHECK(ndr_pull_align(ndr, 4));
4075 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
4076 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_job_id));
4077 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
4079 if (ndr_flags & NDR_BUFFERS) {
4081 return NDR_ERR_SUCCESS;
4084 _PUBLIC_ void ndr_print_spoolss_JobInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo3 *r)
4086 ndr_print_struct(ndr, name, "spoolss_JobInfo3");
4087 ndr->depth++;
4088 ndr_print_uint32(ndr, "job_id", r->job_id);
4089 ndr_print_uint32(ndr, "next_job_id", r->next_job_id);
4090 ndr_print_uint32(ndr, "reserved", r->reserved);
4091 ndr->depth--;
4094 _PUBLIC_ size_t ndr_size_spoolss_JobInfo3(const struct spoolss_JobInfo3 *r, struct smb_iconv_convenience *ic, int flags)
4096 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo3, ic);
4099 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfo4 *r)
4101 if (ndr_flags & NDR_SCALARS) {
4102 NDR_CHECK(ndr_push_align(ndr, 4));
4103 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
4105 uint32_t _flags_save_string = ndr->flags;
4106 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4107 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
4108 ndr->flags = _flags_save_string;
4111 uint32_t _flags_save_string = ndr->flags;
4112 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4113 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
4114 ndr->flags = _flags_save_string;
4117 uint32_t _flags_save_string = ndr->flags;
4118 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4119 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
4120 ndr->flags = _flags_save_string;
4123 uint32_t _flags_save_string = ndr->flags;
4124 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4125 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
4126 ndr->flags = _flags_save_string;
4129 uint32_t _flags_save_string = ndr->flags;
4130 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4131 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->notify_name));
4132 ndr->flags = _flags_save_string;
4135 uint32_t _flags_save_string = ndr->flags;
4136 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4137 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
4138 ndr->flags = _flags_save_string;
4141 uint32_t _flags_save_string = ndr->flags;
4142 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4143 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor));
4144 ndr->flags = _flags_save_string;
4147 uint32_t _flags_save_string = ndr->flags;
4148 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4149 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters));
4150 ndr->flags = _flags_save_string;
4153 uint32_t _flags_save_string = ndr->flags;
4154 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4155 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
4156 ndr->flags = _flags_save_string;
4158 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
4160 uint32_t _flags_save_string = ndr->flags;
4161 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4162 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
4163 ndr->flags = _flags_save_string;
4165 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
4166 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
4167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
4168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
4169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
4170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
4171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
4172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
4173 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
4174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
4175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
4176 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_high));
4178 if (ndr_flags & NDR_BUFFERS) {
4180 uint32_t _flags_save_string = ndr->flags;
4181 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4182 if (r->printer_name) {
4183 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->printer_name));
4184 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
4186 ndr->flags = _flags_save_string;
4189 uint32_t _flags_save_string = ndr->flags;
4190 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4191 if (r->server_name) {
4192 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->server_name));
4193 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
4195 ndr->flags = _flags_save_string;
4198 uint32_t _flags_save_string = ndr->flags;
4199 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4200 if (r->user_name) {
4201 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->user_name));
4202 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
4204 ndr->flags = _flags_save_string;
4207 uint32_t _flags_save_string = ndr->flags;
4208 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4209 if (r->document_name) {
4210 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->document_name));
4211 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
4213 ndr->flags = _flags_save_string;
4216 uint32_t _flags_save_string = ndr->flags;
4217 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4218 if (r->notify_name) {
4219 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->notify_name));
4220 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->notify_name));
4222 ndr->flags = _flags_save_string;
4225 uint32_t _flags_save_string = ndr->flags;
4226 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4227 if (r->data_type) {
4228 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_type));
4229 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
4231 ndr->flags = _flags_save_string;
4234 uint32_t _flags_save_string = ndr->flags;
4235 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4236 if (r->print_processor) {
4237 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->print_processor));
4238 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor));
4240 ndr->flags = _flags_save_string;
4243 uint32_t _flags_save_string = ndr->flags;
4244 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4245 if (r->parameters) {
4246 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->parameters));
4247 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters));
4249 ndr->flags = _flags_save_string;
4252 uint32_t _flags_save_string = ndr->flags;
4253 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4254 if (r->driver_name) {
4255 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
4256 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
4258 ndr->flags = _flags_save_string;
4260 if (r->devmode) {
4261 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->devmode));
4262 NDR_CHECK(ndr_push_spoolss_DeviceMode(ndr, NDR_SCALARS, r->devmode));
4265 uint32_t _flags_save_string = ndr->flags;
4266 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4267 if (r->text_status) {
4268 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->text_status));
4269 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
4271 ndr->flags = _flags_save_string;
4273 if (r->secdesc) {
4274 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->secdesc));
4275 NDR_CHECK(ndr_push_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
4278 return NDR_ERR_SUCCESS;
4281 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfo4 *r)
4283 uint32_t _ptr_printer_name;
4284 TALLOC_CTX *_mem_save_printer_name_0;
4285 uint32_t _ptr_server_name;
4286 TALLOC_CTX *_mem_save_server_name_0;
4287 uint32_t _ptr_user_name;
4288 TALLOC_CTX *_mem_save_user_name_0;
4289 uint32_t _ptr_document_name;
4290 TALLOC_CTX *_mem_save_document_name_0;
4291 uint32_t _ptr_notify_name;
4292 TALLOC_CTX *_mem_save_notify_name_0;
4293 uint32_t _ptr_data_type;
4294 TALLOC_CTX *_mem_save_data_type_0;
4295 uint32_t _ptr_print_processor;
4296 TALLOC_CTX *_mem_save_print_processor_0;
4297 uint32_t _ptr_parameters;
4298 TALLOC_CTX *_mem_save_parameters_0;
4299 uint32_t _ptr_driver_name;
4300 TALLOC_CTX *_mem_save_driver_name_0;
4301 uint32_t _ptr_devmode;
4302 TALLOC_CTX *_mem_save_devmode_0;
4303 uint32_t _ptr_text_status;
4304 TALLOC_CTX *_mem_save_text_status_0;
4305 uint32_t _ptr_secdesc;
4306 TALLOC_CTX *_mem_save_secdesc_0;
4307 if (ndr_flags & NDR_SCALARS) {
4308 NDR_CHECK(ndr_pull_align(ndr, 4));
4309 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
4311 uint32_t _flags_save_string = ndr->flags;
4312 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4313 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
4314 if (_ptr_printer_name) {
4315 NDR_PULL_ALLOC(ndr, r->printer_name);
4316 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
4317 } else {
4318 r->printer_name = NULL;
4320 ndr->flags = _flags_save_string;
4323 uint32_t _flags_save_string = ndr->flags;
4324 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4325 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
4326 if (_ptr_server_name) {
4327 NDR_PULL_ALLOC(ndr, r->server_name);
4328 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
4329 } else {
4330 r->server_name = NULL;
4332 ndr->flags = _flags_save_string;
4335 uint32_t _flags_save_string = ndr->flags;
4336 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4337 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
4338 if (_ptr_user_name) {
4339 NDR_PULL_ALLOC(ndr, r->user_name);
4340 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
4341 } else {
4342 r->user_name = NULL;
4344 ndr->flags = _flags_save_string;
4347 uint32_t _flags_save_string = ndr->flags;
4348 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4349 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
4350 if (_ptr_document_name) {
4351 NDR_PULL_ALLOC(ndr, r->document_name);
4352 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
4353 } else {
4354 r->document_name = NULL;
4356 ndr->flags = _flags_save_string;
4359 uint32_t _flags_save_string = ndr->flags;
4360 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4361 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
4362 if (_ptr_notify_name) {
4363 NDR_PULL_ALLOC(ndr, r->notify_name);
4364 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->notify_name, _ptr_notify_name));
4365 } else {
4366 r->notify_name = NULL;
4368 ndr->flags = _flags_save_string;
4371 uint32_t _flags_save_string = ndr->flags;
4372 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4373 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
4374 if (_ptr_data_type) {
4375 NDR_PULL_ALLOC(ndr, r->data_type);
4376 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
4377 } else {
4378 r->data_type = NULL;
4380 ndr->flags = _flags_save_string;
4383 uint32_t _flags_save_string = ndr->flags;
4384 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4385 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
4386 if (_ptr_print_processor) {
4387 NDR_PULL_ALLOC(ndr, r->print_processor);
4388 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor, _ptr_print_processor));
4389 } else {
4390 r->print_processor = NULL;
4392 ndr->flags = _flags_save_string;
4395 uint32_t _flags_save_string = ndr->flags;
4396 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4397 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
4398 if (_ptr_parameters) {
4399 NDR_PULL_ALLOC(ndr, r->parameters);
4400 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
4401 } else {
4402 r->parameters = NULL;
4404 ndr->flags = _flags_save_string;
4407 uint32_t _flags_save_string = ndr->flags;
4408 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4409 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
4410 if (_ptr_driver_name) {
4411 NDR_PULL_ALLOC(ndr, r->driver_name);
4412 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
4413 } else {
4414 r->driver_name = NULL;
4416 ndr->flags = _flags_save_string;
4418 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
4419 if (_ptr_devmode) {
4420 NDR_PULL_ALLOC(ndr, r->devmode);
4421 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
4422 } else {
4423 r->devmode = NULL;
4426 uint32_t _flags_save_string = ndr->flags;
4427 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4428 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
4429 if (_ptr_text_status) {
4430 NDR_PULL_ALLOC(ndr, r->text_status);
4431 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
4432 } else {
4433 r->text_status = NULL;
4435 ndr->flags = _flags_save_string;
4437 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
4438 if (_ptr_secdesc) {
4439 NDR_PULL_ALLOC(ndr, r->secdesc);
4440 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
4441 } else {
4442 r->secdesc = NULL;
4444 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
4445 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
4446 if (r->priority > 99) {
4447 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4449 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
4450 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
4451 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
4452 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
4453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
4454 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
4455 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
4456 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
4457 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_high));
4459 if (ndr_flags & NDR_BUFFERS) {
4461 uint32_t _flags_save_string = ndr->flags;
4462 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4463 if (r->printer_name) {
4464 uint32_t _relative_save_offset;
4465 _relative_save_offset = ndr->offset;
4466 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
4467 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4468 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
4469 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
4470 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
4471 ndr->offset = _relative_save_offset;
4473 ndr->flags = _flags_save_string;
4476 uint32_t _flags_save_string = ndr->flags;
4477 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4478 if (r->server_name) {
4479 uint32_t _relative_save_offset;
4480 _relative_save_offset = ndr->offset;
4481 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
4482 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4483 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
4484 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
4485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
4486 ndr->offset = _relative_save_offset;
4488 ndr->flags = _flags_save_string;
4491 uint32_t _flags_save_string = ndr->flags;
4492 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4493 if (r->user_name) {
4494 uint32_t _relative_save_offset;
4495 _relative_save_offset = ndr->offset;
4496 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
4497 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4498 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
4499 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
4500 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
4501 ndr->offset = _relative_save_offset;
4503 ndr->flags = _flags_save_string;
4506 uint32_t _flags_save_string = ndr->flags;
4507 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4508 if (r->document_name) {
4509 uint32_t _relative_save_offset;
4510 _relative_save_offset = ndr->offset;
4511 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
4512 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4513 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
4514 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
4515 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
4516 ndr->offset = _relative_save_offset;
4518 ndr->flags = _flags_save_string;
4521 uint32_t _flags_save_string = ndr->flags;
4522 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4523 if (r->notify_name) {
4524 uint32_t _relative_save_offset;
4525 _relative_save_offset = ndr->offset;
4526 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->notify_name));
4527 _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4528 NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
4529 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->notify_name));
4530 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
4531 ndr->offset = _relative_save_offset;
4533 ndr->flags = _flags_save_string;
4536 uint32_t _flags_save_string = ndr->flags;
4537 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4538 if (r->data_type) {
4539 uint32_t _relative_save_offset;
4540 _relative_save_offset = ndr->offset;
4541 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
4542 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
4543 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
4544 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
4545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
4546 ndr->offset = _relative_save_offset;
4548 ndr->flags = _flags_save_string;
4551 uint32_t _flags_save_string = ndr->flags;
4552 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4553 if (r->print_processor) {
4554 uint32_t _relative_save_offset;
4555 _relative_save_offset = ndr->offset;
4556 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor));
4557 _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
4558 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
4559 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor));
4560 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
4561 ndr->offset = _relative_save_offset;
4563 ndr->flags = _flags_save_string;
4566 uint32_t _flags_save_string = ndr->flags;
4567 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4568 if (r->parameters) {
4569 uint32_t _relative_save_offset;
4570 _relative_save_offset = ndr->offset;
4571 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
4572 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
4573 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
4574 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
4575 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
4576 ndr->offset = _relative_save_offset;
4578 ndr->flags = _flags_save_string;
4581 uint32_t _flags_save_string = ndr->flags;
4582 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4583 if (r->driver_name) {
4584 uint32_t _relative_save_offset;
4585 _relative_save_offset = ndr->offset;
4586 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
4587 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4588 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
4589 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
4590 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
4591 ndr->offset = _relative_save_offset;
4593 ndr->flags = _flags_save_string;
4595 if (r->devmode) {
4596 uint32_t _relative_save_offset;
4597 _relative_save_offset = ndr->offset;
4598 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
4599 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
4600 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
4601 NDR_CHECK(ndr_pull_spoolss_DeviceMode(ndr, NDR_SCALARS, r->devmode));
4602 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
4603 ndr->offset = _relative_save_offset;
4606 uint32_t _flags_save_string = ndr->flags;
4607 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
4608 if (r->text_status) {
4609 uint32_t _relative_save_offset;
4610 _relative_save_offset = ndr->offset;
4611 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
4612 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
4613 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
4614 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
4615 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
4616 ndr->offset = _relative_save_offset;
4618 ndr->flags = _flags_save_string;
4620 if (r->secdesc) {
4621 uint32_t _relative_save_offset;
4622 _relative_save_offset = ndr->offset;
4623 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
4624 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
4625 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
4626 NDR_CHECK(ndr_pull_security_descriptor(ndr, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
4627 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
4628 ndr->offset = _relative_save_offset;
4631 return NDR_ERR_SUCCESS;
4634 _PUBLIC_ void ndr_print_spoolss_JobInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo4 *r)
4636 ndr_print_struct(ndr, name, "spoolss_JobInfo4");
4637 ndr->depth++;
4638 ndr_print_uint32(ndr, "job_id", r->job_id);
4639 ndr_print_ptr(ndr, "printer_name", r->printer_name);
4640 ndr->depth++;
4641 if (r->printer_name) {
4642 ndr_print_string(ndr, "printer_name", r->printer_name);
4644 ndr->depth--;
4645 ndr_print_ptr(ndr, "server_name", r->server_name);
4646 ndr->depth++;
4647 if (r->server_name) {
4648 ndr_print_string(ndr, "server_name", r->server_name);
4650 ndr->depth--;
4651 ndr_print_ptr(ndr, "user_name", r->user_name);
4652 ndr->depth++;
4653 if (r->user_name) {
4654 ndr_print_string(ndr, "user_name", r->user_name);
4656 ndr->depth--;
4657 ndr_print_ptr(ndr, "document_name", r->document_name);
4658 ndr->depth++;
4659 if (r->document_name) {
4660 ndr_print_string(ndr, "document_name", r->document_name);
4662 ndr->depth--;
4663 ndr_print_ptr(ndr, "notify_name", r->notify_name);
4664 ndr->depth++;
4665 if (r->notify_name) {
4666 ndr_print_string(ndr, "notify_name", r->notify_name);
4668 ndr->depth--;
4669 ndr_print_ptr(ndr, "data_type", r->data_type);
4670 ndr->depth++;
4671 if (r->data_type) {
4672 ndr_print_string(ndr, "data_type", r->data_type);
4674 ndr->depth--;
4675 ndr_print_ptr(ndr, "print_processor", r->print_processor);
4676 ndr->depth++;
4677 if (r->print_processor) {
4678 ndr_print_string(ndr, "print_processor", r->print_processor);
4680 ndr->depth--;
4681 ndr_print_ptr(ndr, "parameters", r->parameters);
4682 ndr->depth++;
4683 if (r->parameters) {
4684 ndr_print_string(ndr, "parameters", r->parameters);
4686 ndr->depth--;
4687 ndr_print_ptr(ndr, "driver_name", r->driver_name);
4688 ndr->depth++;
4689 if (r->driver_name) {
4690 ndr_print_string(ndr, "driver_name", r->driver_name);
4692 ndr->depth--;
4693 ndr_print_ptr(ndr, "devmode", r->devmode);
4694 ndr->depth++;
4695 if (r->devmode) {
4696 ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
4698 ndr->depth--;
4699 ndr_print_ptr(ndr, "text_status", r->text_status);
4700 ndr->depth++;
4701 if (r->text_status) {
4702 ndr_print_string(ndr, "text_status", r->text_status);
4704 ndr->depth--;
4705 ndr_print_ptr(ndr, "secdesc", r->secdesc);
4706 ndr->depth++;
4707 if (r->secdesc) {
4708 ndr_print_security_descriptor(ndr, "secdesc", r->secdesc);
4710 ndr->depth--;
4711 ndr_print_spoolss_JobStatus(ndr, "status", r->status);
4712 ndr_print_uint32(ndr, "priority", r->priority);
4713 ndr_print_uint32(ndr, "position", r->position);
4714 ndr_print_uint32(ndr, "start_time", r->start_time);
4715 ndr_print_uint32(ndr, "until_time", r->until_time);
4716 ndr_print_uint32(ndr, "total_pages", r->total_pages);
4717 ndr_print_uint32(ndr, "size", r->size);
4718 ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
4719 ndr_print_uint32(ndr, "time", r->time);
4720 ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
4721 ndr_print_uint32(ndr, "size_high", r->size_high);
4722 ndr->depth--;
4725 _PUBLIC_ size_t ndr_size_spoolss_JobInfo4(const struct spoolss_JobInfo4 *r, struct smb_iconv_convenience *ic, int flags)
4727 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo4, ic);
4730 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_JobInfo *r)
4732 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
4733 if (ndr_flags & NDR_SCALARS) {
4734 int level = ndr_push_get_switch_value(ndr, r);
4735 switch (level) {
4736 case 1: {
4737 NDR_CHECK(ndr_push_align(ndr, 4));
4738 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
4739 NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr, NDR_SCALARS, &r->info1));
4740 break; }
4742 case 2: {
4743 NDR_CHECK(ndr_push_align(ndr, 4));
4744 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
4745 NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr, NDR_SCALARS, &r->info2));
4746 break; }
4748 case 3: {
4749 NDR_CHECK(ndr_push_align(ndr, 4));
4750 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
4751 NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr, NDR_SCALARS, &r->info3));
4752 break; }
4754 case 4: {
4755 NDR_CHECK(ndr_push_align(ndr, 4));
4756 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
4757 NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr, NDR_SCALARS, &r->info4));
4758 break; }
4760 default: {
4761 break; }
4765 if (ndr_flags & NDR_BUFFERS) {
4766 int level = ndr_push_get_switch_value(ndr, r);
4767 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
4768 switch (level) {
4769 case 1:
4770 NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr, NDR_BUFFERS, &r->info1));
4771 break;
4773 case 2:
4774 NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr, NDR_BUFFERS, &r->info2));
4775 break;
4777 case 3:
4778 break;
4780 case 4:
4781 NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr, NDR_BUFFERS, &r->info4));
4782 break;
4784 default:
4785 break;
4789 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
4790 return NDR_ERR_SUCCESS;
4793 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_JobInfo *r)
4795 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
4796 int level;
4797 level = ndr_pull_get_switch_value(ndr, r);
4798 if (ndr_flags & NDR_SCALARS) {
4799 switch (level) {
4800 case 1: {
4801 NDR_CHECK(ndr_pull_align(ndr, 4));
4802 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
4803 NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr, NDR_SCALARS, &r->info1));
4804 break; }
4806 case 2: {
4807 NDR_CHECK(ndr_pull_align(ndr, 4));
4808 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
4809 NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr, NDR_SCALARS, &r->info2));
4810 break; }
4812 case 3: {
4813 NDR_CHECK(ndr_pull_align(ndr, 4));
4814 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
4815 NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr, NDR_SCALARS, &r->info3));
4816 break; }
4818 case 4: {
4819 NDR_CHECK(ndr_pull_align(ndr, 4));
4820 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
4821 NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr, NDR_SCALARS, &r->info4));
4822 break; }
4824 default: {
4825 break; }
4829 if (ndr_flags & NDR_BUFFERS) {
4830 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
4831 switch (level) {
4832 case 1:
4833 NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr, NDR_BUFFERS, &r->info1));
4834 break;
4836 case 2:
4837 NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr, NDR_BUFFERS, &r->info2));
4838 break;
4840 case 3:
4841 break;
4843 case 4:
4844 NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr, NDR_BUFFERS, &r->info4));
4845 break;
4847 default:
4848 break;
4852 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
4853 return NDR_ERR_SUCCESS;
4856 _PUBLIC_ void ndr_print_spoolss_JobInfo(struct ndr_print *ndr, const char *name, const union spoolss_JobInfo *r)
4858 int level;
4859 level = ndr_print_get_switch_value(ndr, r);
4860 ndr_print_union(ndr, name, level, "spoolss_JobInfo");
4861 switch (level) {
4862 case 1:
4863 ndr_print_spoolss_JobInfo1(ndr, "info1", &r->info1);
4864 break;
4866 case 2:
4867 ndr_print_spoolss_JobInfo2(ndr, "info2", &r->info2);
4868 break;
4870 case 3:
4871 ndr_print_spoolss_JobInfo3(ndr, "info3", &r->info3);
4872 break;
4874 case 4:
4875 ndr_print_spoolss_JobInfo4(ndr, "info4", &r->info4);
4876 break;
4878 default:
4879 break;
4884 _PUBLIC_ size_t ndr_size_spoolss_JobInfo(const union spoolss_JobInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
4886 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo, ic);
4889 static enum ndr_err_code ndr_push_spoolss_SetJobInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetJobInfo1 *r)
4891 if (ndr_flags & NDR_SCALARS) {
4892 NDR_CHECK(ndr_push_align(ndr, 4));
4893 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
4894 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
4895 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
4896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
4897 NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
4898 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
4899 NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
4900 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
4901 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
4902 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
4903 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
4904 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
4905 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
4907 if (ndr_flags & NDR_BUFFERS) {
4908 if (r->printer_name) {
4909 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
4910 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4911 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
4912 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4914 if (r->server_name) {
4915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
4916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4917 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
4918 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4920 if (r->user_name) {
4921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
4922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4923 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
4924 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4926 if (r->document_name) {
4927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
4928 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4929 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
4930 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4932 if (r->data_type) {
4933 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
4934 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4935 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
4936 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4938 if (r->text_status) {
4939 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
4940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
4942 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4945 return NDR_ERR_SUCCESS;
4948 static enum ndr_err_code ndr_pull_spoolss_SetJobInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetJobInfo1 *r)
4950 uint32_t _ptr_printer_name;
4951 TALLOC_CTX *_mem_save_printer_name_0;
4952 uint32_t _ptr_server_name;
4953 TALLOC_CTX *_mem_save_server_name_0;
4954 uint32_t _ptr_user_name;
4955 TALLOC_CTX *_mem_save_user_name_0;
4956 uint32_t _ptr_document_name;
4957 TALLOC_CTX *_mem_save_document_name_0;
4958 uint32_t _ptr_data_type;
4959 TALLOC_CTX *_mem_save_data_type_0;
4960 uint32_t _ptr_text_status;
4961 TALLOC_CTX *_mem_save_text_status_0;
4962 if (ndr_flags & NDR_SCALARS) {
4963 NDR_CHECK(ndr_pull_align(ndr, 4));
4964 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
4965 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
4966 if (_ptr_printer_name) {
4967 NDR_PULL_ALLOC(ndr, r->printer_name);
4968 } else {
4969 r->printer_name = NULL;
4971 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
4972 if (_ptr_server_name) {
4973 NDR_PULL_ALLOC(ndr, r->server_name);
4974 } else {
4975 r->server_name = NULL;
4977 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
4978 if (_ptr_user_name) {
4979 NDR_PULL_ALLOC(ndr, r->user_name);
4980 } else {
4981 r->user_name = NULL;
4983 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
4984 if (_ptr_document_name) {
4985 NDR_PULL_ALLOC(ndr, r->document_name);
4986 } else {
4987 r->document_name = NULL;
4989 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
4990 if (_ptr_data_type) {
4991 NDR_PULL_ALLOC(ndr, r->data_type);
4992 } else {
4993 r->data_type = NULL;
4995 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
4996 if (_ptr_text_status) {
4997 NDR_PULL_ALLOC(ndr, r->text_status);
4998 } else {
4999 r->text_status = NULL;
5001 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
5002 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
5003 if (r->priority > 99) {
5004 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5006 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
5007 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
5008 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
5009 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
5011 if (ndr_flags & NDR_BUFFERS) {
5012 if (r->printer_name) {
5013 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5014 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
5015 NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
5016 NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
5017 if (ndr_get_array_length(ndr, &r->printer_name) > ndr_get_array_size(ndr, &r->printer_name)) {
5018 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->printer_name), ndr_get_array_length(ndr, &r->printer_name));
5020 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->printer_name), sizeof(uint16_t)));
5021 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, ndr_get_array_length(ndr, &r->printer_name), sizeof(uint16_t), CH_UTF16));
5022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
5024 if (r->server_name) {
5025 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5026 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
5027 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
5028 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
5029 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
5030 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
5032 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
5033 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
5034 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
5036 if (r->user_name) {
5037 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5038 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
5039 NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
5040 NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
5041 if (ndr_get_array_length(ndr, &r->user_name) > ndr_get_array_size(ndr, &r->user_name)) {
5042 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user_name), ndr_get_array_length(ndr, &r->user_name));
5044 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user_name), sizeof(uint16_t)));
5045 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, ndr_get_array_length(ndr, &r->user_name), sizeof(uint16_t), CH_UTF16));
5046 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
5048 if (r->document_name) {
5049 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5050 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
5051 NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
5052 NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
5053 if (ndr_get_array_length(ndr, &r->document_name) > ndr_get_array_size(ndr, &r->document_name)) {
5054 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->document_name), ndr_get_array_length(ndr, &r->document_name));
5056 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->document_name), sizeof(uint16_t)));
5057 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, ndr_get_array_length(ndr, &r->document_name), sizeof(uint16_t), CH_UTF16));
5058 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
5060 if (r->data_type) {
5061 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
5062 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
5063 NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
5064 NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
5065 if (ndr_get_array_length(ndr, &r->data_type) > ndr_get_array_size(ndr, &r->data_type)) {
5066 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data_type), ndr_get_array_length(ndr, &r->data_type));
5068 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->data_type), sizeof(uint16_t)));
5069 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, ndr_get_array_length(ndr, &r->data_type), sizeof(uint16_t), CH_UTF16));
5070 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
5072 if (r->text_status) {
5073 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5074 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
5075 NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
5076 NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
5077 if (ndr_get_array_length(ndr, &r->text_status) > ndr_get_array_size(ndr, &r->text_status)) {
5078 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->text_status), ndr_get_array_length(ndr, &r->text_status));
5080 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->text_status), sizeof(uint16_t)));
5081 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, ndr_get_array_length(ndr, &r->text_status), sizeof(uint16_t), CH_UTF16));
5082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
5085 return NDR_ERR_SUCCESS;
5088 _PUBLIC_ void ndr_print_spoolss_SetJobInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo1 *r)
5090 ndr_print_struct(ndr, name, "spoolss_SetJobInfo1");
5091 ndr->depth++;
5092 ndr_print_uint32(ndr, "job_id", r->job_id);
5093 ndr_print_ptr(ndr, "printer_name", r->printer_name);
5094 ndr->depth++;
5095 if (r->printer_name) {
5096 ndr_print_string(ndr, "printer_name", r->printer_name);
5098 ndr->depth--;
5099 ndr_print_ptr(ndr, "server_name", r->server_name);
5100 ndr->depth++;
5101 if (r->server_name) {
5102 ndr_print_string(ndr, "server_name", r->server_name);
5104 ndr->depth--;
5105 ndr_print_ptr(ndr, "user_name", r->user_name);
5106 ndr->depth++;
5107 if (r->user_name) {
5108 ndr_print_string(ndr, "user_name", r->user_name);
5110 ndr->depth--;
5111 ndr_print_ptr(ndr, "document_name", r->document_name);
5112 ndr->depth++;
5113 if (r->document_name) {
5114 ndr_print_string(ndr, "document_name", r->document_name);
5116 ndr->depth--;
5117 ndr_print_ptr(ndr, "data_type", r->data_type);
5118 ndr->depth++;
5119 if (r->data_type) {
5120 ndr_print_string(ndr, "data_type", r->data_type);
5122 ndr->depth--;
5123 ndr_print_ptr(ndr, "text_status", r->text_status);
5124 ndr->depth++;
5125 if (r->text_status) {
5126 ndr_print_string(ndr, "text_status", r->text_status);
5128 ndr->depth--;
5129 ndr_print_spoolss_JobStatus(ndr, "status", r->status);
5130 ndr_print_uint32(ndr, "priority", r->priority);
5131 ndr_print_uint32(ndr, "position", r->position);
5132 ndr_print_uint32(ndr, "total_pages", r->total_pages);
5133 ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
5134 ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
5135 ndr->depth--;
5138 static enum ndr_err_code ndr_push_spoolss_SetJobInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetJobInfo2 *r)
5140 if (ndr_flags & NDR_SCALARS) {
5141 NDR_CHECK(ndr_push_align(ndr, 4));
5142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
5143 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
5144 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
5145 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
5146 NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
5147 NDR_CHECK(ndr_push_unique_ptr(ndr, r->notify_name));
5148 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
5149 NDR_CHECK(ndr_push_unique_ptr(ndr, r->print_processor));
5150 NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
5151 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
5152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->_devmode_ptr));
5153 NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
5154 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->_secdesc_ptr));
5155 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
5156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
5157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
5158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
5159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
5160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
5161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
5162 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
5163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
5164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
5166 if (ndr_flags & NDR_BUFFERS) {
5167 if (r->printer_name) {
5168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
5169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
5171 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5173 if (r->server_name) {
5174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
5175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5176 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
5177 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5179 if (r->user_name) {
5180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
5181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5182 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
5183 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5185 if (r->document_name) {
5186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
5187 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5188 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
5189 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5191 if (r->notify_name) {
5192 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
5193 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
5195 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->notify_name, ndr_charset_length(r->notify_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5197 if (r->data_type) {
5198 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
5199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
5201 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5203 if (r->print_processor) {
5204 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
5205 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5206 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
5207 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->print_processor, ndr_charset_length(r->print_processor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5209 if (r->parameters) {
5210 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
5211 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5212 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
5213 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5215 if (r->driver_name) {
5216 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
5217 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5218 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
5219 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5221 if (r->text_status) {
5222 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
5223 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5224 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
5225 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5228 return NDR_ERR_SUCCESS;
5231 static enum ndr_err_code ndr_pull_spoolss_SetJobInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetJobInfo2 *r)
5233 uint32_t _ptr_printer_name;
5234 TALLOC_CTX *_mem_save_printer_name_0;
5235 uint32_t _ptr_server_name;
5236 TALLOC_CTX *_mem_save_server_name_0;
5237 uint32_t _ptr_user_name;
5238 TALLOC_CTX *_mem_save_user_name_0;
5239 uint32_t _ptr_document_name;
5240 TALLOC_CTX *_mem_save_document_name_0;
5241 uint32_t _ptr_notify_name;
5242 TALLOC_CTX *_mem_save_notify_name_0;
5243 uint32_t _ptr_data_type;
5244 TALLOC_CTX *_mem_save_data_type_0;
5245 uint32_t _ptr_print_processor;
5246 TALLOC_CTX *_mem_save_print_processor_0;
5247 uint32_t _ptr_parameters;
5248 TALLOC_CTX *_mem_save_parameters_0;
5249 uint32_t _ptr_driver_name;
5250 TALLOC_CTX *_mem_save_driver_name_0;
5251 uint32_t _ptr_text_status;
5252 TALLOC_CTX *_mem_save_text_status_0;
5253 if (ndr_flags & NDR_SCALARS) {
5254 NDR_CHECK(ndr_pull_align(ndr, 4));
5255 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
5256 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
5257 if (_ptr_printer_name) {
5258 NDR_PULL_ALLOC(ndr, r->printer_name);
5259 } else {
5260 r->printer_name = NULL;
5262 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
5263 if (_ptr_server_name) {
5264 NDR_PULL_ALLOC(ndr, r->server_name);
5265 } else {
5266 r->server_name = NULL;
5268 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
5269 if (_ptr_user_name) {
5270 NDR_PULL_ALLOC(ndr, r->user_name);
5271 } else {
5272 r->user_name = NULL;
5274 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
5275 if (_ptr_document_name) {
5276 NDR_PULL_ALLOC(ndr, r->document_name);
5277 } else {
5278 r->document_name = NULL;
5280 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
5281 if (_ptr_notify_name) {
5282 NDR_PULL_ALLOC(ndr, r->notify_name);
5283 } else {
5284 r->notify_name = NULL;
5286 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
5287 if (_ptr_data_type) {
5288 NDR_PULL_ALLOC(ndr, r->data_type);
5289 } else {
5290 r->data_type = NULL;
5292 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
5293 if (_ptr_print_processor) {
5294 NDR_PULL_ALLOC(ndr, r->print_processor);
5295 } else {
5296 r->print_processor = NULL;
5298 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
5299 if (_ptr_parameters) {
5300 NDR_PULL_ALLOC(ndr, r->parameters);
5301 } else {
5302 r->parameters = NULL;
5304 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
5305 if (_ptr_driver_name) {
5306 NDR_PULL_ALLOC(ndr, r->driver_name);
5307 } else {
5308 r->driver_name = NULL;
5310 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_devmode_ptr));
5311 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
5312 if (_ptr_text_status) {
5313 NDR_PULL_ALLOC(ndr, r->text_status);
5314 } else {
5315 r->text_status = NULL;
5317 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_secdesc_ptr));
5318 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
5319 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
5320 if (r->priority > 99) {
5321 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5323 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
5324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
5325 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
5326 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
5327 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
5328 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
5329 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
5330 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
5332 if (ndr_flags & NDR_BUFFERS) {
5333 if (r->printer_name) {
5334 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5335 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
5336 NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
5337 NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
5338 if (ndr_get_array_length(ndr, &r->printer_name) > ndr_get_array_size(ndr, &r->printer_name)) {
5339 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->printer_name), ndr_get_array_length(ndr, &r->printer_name));
5341 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->printer_name), sizeof(uint16_t)));
5342 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, ndr_get_array_length(ndr, &r->printer_name), sizeof(uint16_t), CH_UTF16));
5343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
5345 if (r->server_name) {
5346 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5347 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
5348 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
5349 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
5350 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
5351 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
5353 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
5354 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
5355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
5357 if (r->user_name) {
5358 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5359 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
5360 NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
5361 NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
5362 if (ndr_get_array_length(ndr, &r->user_name) > ndr_get_array_size(ndr, &r->user_name)) {
5363 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user_name), ndr_get_array_length(ndr, &r->user_name));
5365 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user_name), sizeof(uint16_t)));
5366 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, ndr_get_array_length(ndr, &r->user_name), sizeof(uint16_t), CH_UTF16));
5367 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
5369 if (r->document_name) {
5370 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5371 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
5372 NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
5373 NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
5374 if (ndr_get_array_length(ndr, &r->document_name) > ndr_get_array_size(ndr, &r->document_name)) {
5375 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->document_name), ndr_get_array_length(ndr, &r->document_name));
5377 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->document_name), sizeof(uint16_t)));
5378 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, ndr_get_array_length(ndr, &r->document_name), sizeof(uint16_t), CH_UTF16));
5379 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
5381 if (r->notify_name) {
5382 _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5383 NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
5384 NDR_CHECK(ndr_pull_array_size(ndr, &r->notify_name));
5385 NDR_CHECK(ndr_pull_array_length(ndr, &r->notify_name));
5386 if (ndr_get_array_length(ndr, &r->notify_name) > ndr_get_array_size(ndr, &r->notify_name)) {
5387 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->notify_name), ndr_get_array_length(ndr, &r->notify_name));
5389 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->notify_name), sizeof(uint16_t)));
5390 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->notify_name, ndr_get_array_length(ndr, &r->notify_name), sizeof(uint16_t), CH_UTF16));
5391 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
5393 if (r->data_type) {
5394 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
5395 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
5396 NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
5397 NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
5398 if (ndr_get_array_length(ndr, &r->data_type) > ndr_get_array_size(ndr, &r->data_type)) {
5399 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data_type), ndr_get_array_length(ndr, &r->data_type));
5401 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->data_type), sizeof(uint16_t)));
5402 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, ndr_get_array_length(ndr, &r->data_type), sizeof(uint16_t), CH_UTF16));
5403 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
5405 if (r->print_processor) {
5406 _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
5407 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
5408 NDR_CHECK(ndr_pull_array_size(ndr, &r->print_processor));
5409 NDR_CHECK(ndr_pull_array_length(ndr, &r->print_processor));
5410 if (ndr_get_array_length(ndr, &r->print_processor) > ndr_get_array_size(ndr, &r->print_processor)) {
5411 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->print_processor), ndr_get_array_length(ndr, &r->print_processor));
5413 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->print_processor), sizeof(uint16_t)));
5414 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->print_processor, ndr_get_array_length(ndr, &r->print_processor), sizeof(uint16_t), CH_UTF16));
5415 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
5417 if (r->parameters) {
5418 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
5419 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
5420 NDR_CHECK(ndr_pull_array_size(ndr, &r->parameters));
5421 NDR_CHECK(ndr_pull_array_length(ndr, &r->parameters));
5422 if (ndr_get_array_length(ndr, &r->parameters) > ndr_get_array_size(ndr, &r->parameters)) {
5423 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->parameters), ndr_get_array_length(ndr, &r->parameters));
5425 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->parameters), sizeof(uint16_t)));
5426 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->parameters, ndr_get_array_length(ndr, &r->parameters), sizeof(uint16_t), CH_UTF16));
5427 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
5429 if (r->driver_name) {
5430 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5431 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
5432 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
5433 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
5434 if (ndr_get_array_length(ndr, &r->driver_name) > ndr_get_array_size(ndr, &r->driver_name)) {
5435 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_name), ndr_get_array_length(ndr, &r->driver_name));
5437 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t)));
5438 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t), CH_UTF16));
5439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
5441 if (r->text_status) {
5442 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5443 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
5444 NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
5445 NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
5446 if (ndr_get_array_length(ndr, &r->text_status) > ndr_get_array_size(ndr, &r->text_status)) {
5447 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->text_status), ndr_get_array_length(ndr, &r->text_status));
5449 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->text_status), sizeof(uint16_t)));
5450 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, ndr_get_array_length(ndr, &r->text_status), sizeof(uint16_t), CH_UTF16));
5451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
5454 return NDR_ERR_SUCCESS;
5457 _PUBLIC_ void ndr_print_spoolss_SetJobInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo2 *r)
5459 ndr_print_struct(ndr, name, "spoolss_SetJobInfo2");
5460 ndr->depth++;
5461 ndr_print_uint32(ndr, "job_id", r->job_id);
5462 ndr_print_ptr(ndr, "printer_name", r->printer_name);
5463 ndr->depth++;
5464 if (r->printer_name) {
5465 ndr_print_string(ndr, "printer_name", r->printer_name);
5467 ndr->depth--;
5468 ndr_print_ptr(ndr, "server_name", r->server_name);
5469 ndr->depth++;
5470 if (r->server_name) {
5471 ndr_print_string(ndr, "server_name", r->server_name);
5473 ndr->depth--;
5474 ndr_print_ptr(ndr, "user_name", r->user_name);
5475 ndr->depth++;
5476 if (r->user_name) {
5477 ndr_print_string(ndr, "user_name", r->user_name);
5479 ndr->depth--;
5480 ndr_print_ptr(ndr, "document_name", r->document_name);
5481 ndr->depth++;
5482 if (r->document_name) {
5483 ndr_print_string(ndr, "document_name", r->document_name);
5485 ndr->depth--;
5486 ndr_print_ptr(ndr, "notify_name", r->notify_name);
5487 ndr->depth++;
5488 if (r->notify_name) {
5489 ndr_print_string(ndr, "notify_name", r->notify_name);
5491 ndr->depth--;
5492 ndr_print_ptr(ndr, "data_type", r->data_type);
5493 ndr->depth++;
5494 if (r->data_type) {
5495 ndr_print_string(ndr, "data_type", r->data_type);
5497 ndr->depth--;
5498 ndr_print_ptr(ndr, "print_processor", r->print_processor);
5499 ndr->depth++;
5500 if (r->print_processor) {
5501 ndr_print_string(ndr, "print_processor", r->print_processor);
5503 ndr->depth--;
5504 ndr_print_ptr(ndr, "parameters", r->parameters);
5505 ndr->depth++;
5506 if (r->parameters) {
5507 ndr_print_string(ndr, "parameters", r->parameters);
5509 ndr->depth--;
5510 ndr_print_ptr(ndr, "driver_name", r->driver_name);
5511 ndr->depth++;
5512 if (r->driver_name) {
5513 ndr_print_string(ndr, "driver_name", r->driver_name);
5515 ndr->depth--;
5516 ndr_print_uint32(ndr, "_devmode_ptr", r->_devmode_ptr);
5517 ndr_print_ptr(ndr, "text_status", r->text_status);
5518 ndr->depth++;
5519 if (r->text_status) {
5520 ndr_print_string(ndr, "text_status", r->text_status);
5522 ndr->depth--;
5523 ndr_print_uint32(ndr, "_secdesc_ptr", r->_secdesc_ptr);
5524 ndr_print_spoolss_JobStatus(ndr, "status", r->status);
5525 ndr_print_uint32(ndr, "priority", r->priority);
5526 ndr_print_uint32(ndr, "position", r->position);
5527 ndr_print_uint32(ndr, "start_time", r->start_time);
5528 ndr_print_uint32(ndr, "until_time", r->until_time);
5529 ndr_print_uint32(ndr, "total_pages", r->total_pages);
5530 ndr_print_uint32(ndr, "size", r->size);
5531 ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
5532 ndr_print_uint32(ndr, "time", r->time);
5533 ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
5534 ndr->depth--;
5537 static enum ndr_err_code ndr_push_spoolss_SetJobInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetJobInfo4 *r)
5539 if (ndr_flags & NDR_SCALARS) {
5540 NDR_CHECK(ndr_push_align(ndr, 4));
5541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
5542 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
5543 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
5544 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
5545 NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
5546 NDR_CHECK(ndr_push_unique_ptr(ndr, r->notify_name));
5547 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
5548 NDR_CHECK(ndr_push_unique_ptr(ndr, r->print_processor));
5549 NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
5550 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
5551 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->_devmode_ptr));
5552 NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
5553 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->_secdesc_ptr));
5554 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
5555 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
5556 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
5557 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
5558 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
5559 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
5560 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
5561 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
5562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
5563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
5564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_high));
5566 if (ndr_flags & NDR_BUFFERS) {
5567 if (r->printer_name) {
5568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
5569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
5571 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5573 if (r->server_name) {
5574 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
5575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
5577 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5579 if (r->user_name) {
5580 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
5581 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5582 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
5583 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5585 if (r->document_name) {
5586 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
5587 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5588 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
5589 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5591 if (r->notify_name) {
5592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
5593 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
5595 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->notify_name, ndr_charset_length(r->notify_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5597 if (r->data_type) {
5598 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
5599 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5600 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
5601 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5603 if (r->print_processor) {
5604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
5605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5606 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
5607 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->print_processor, ndr_charset_length(r->print_processor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5609 if (r->parameters) {
5610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
5611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5612 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
5613 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5615 if (r->driver_name) {
5616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
5617 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
5619 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5621 if (r->text_status) {
5622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
5623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
5625 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5628 return NDR_ERR_SUCCESS;
5631 static enum ndr_err_code ndr_pull_spoolss_SetJobInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetJobInfo4 *r)
5633 uint32_t _ptr_printer_name;
5634 TALLOC_CTX *_mem_save_printer_name_0;
5635 uint32_t _ptr_server_name;
5636 TALLOC_CTX *_mem_save_server_name_0;
5637 uint32_t _ptr_user_name;
5638 TALLOC_CTX *_mem_save_user_name_0;
5639 uint32_t _ptr_document_name;
5640 TALLOC_CTX *_mem_save_document_name_0;
5641 uint32_t _ptr_notify_name;
5642 TALLOC_CTX *_mem_save_notify_name_0;
5643 uint32_t _ptr_data_type;
5644 TALLOC_CTX *_mem_save_data_type_0;
5645 uint32_t _ptr_print_processor;
5646 TALLOC_CTX *_mem_save_print_processor_0;
5647 uint32_t _ptr_parameters;
5648 TALLOC_CTX *_mem_save_parameters_0;
5649 uint32_t _ptr_driver_name;
5650 TALLOC_CTX *_mem_save_driver_name_0;
5651 uint32_t _ptr_text_status;
5652 TALLOC_CTX *_mem_save_text_status_0;
5653 if (ndr_flags & NDR_SCALARS) {
5654 NDR_CHECK(ndr_pull_align(ndr, 4));
5655 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
5656 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
5657 if (_ptr_printer_name) {
5658 NDR_PULL_ALLOC(ndr, r->printer_name);
5659 } else {
5660 r->printer_name = NULL;
5662 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
5663 if (_ptr_server_name) {
5664 NDR_PULL_ALLOC(ndr, r->server_name);
5665 } else {
5666 r->server_name = NULL;
5668 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
5669 if (_ptr_user_name) {
5670 NDR_PULL_ALLOC(ndr, r->user_name);
5671 } else {
5672 r->user_name = NULL;
5674 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
5675 if (_ptr_document_name) {
5676 NDR_PULL_ALLOC(ndr, r->document_name);
5677 } else {
5678 r->document_name = NULL;
5680 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
5681 if (_ptr_notify_name) {
5682 NDR_PULL_ALLOC(ndr, r->notify_name);
5683 } else {
5684 r->notify_name = NULL;
5686 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
5687 if (_ptr_data_type) {
5688 NDR_PULL_ALLOC(ndr, r->data_type);
5689 } else {
5690 r->data_type = NULL;
5692 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
5693 if (_ptr_print_processor) {
5694 NDR_PULL_ALLOC(ndr, r->print_processor);
5695 } else {
5696 r->print_processor = NULL;
5698 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
5699 if (_ptr_parameters) {
5700 NDR_PULL_ALLOC(ndr, r->parameters);
5701 } else {
5702 r->parameters = NULL;
5704 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
5705 if (_ptr_driver_name) {
5706 NDR_PULL_ALLOC(ndr, r->driver_name);
5707 } else {
5708 r->driver_name = NULL;
5710 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_devmode_ptr));
5711 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
5712 if (_ptr_text_status) {
5713 NDR_PULL_ALLOC(ndr, r->text_status);
5714 } else {
5715 r->text_status = NULL;
5717 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_secdesc_ptr));
5718 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
5719 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
5720 if (r->priority > 99) {
5721 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5723 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
5724 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
5725 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
5726 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
5727 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
5728 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
5729 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
5730 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
5731 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_high));
5733 if (ndr_flags & NDR_BUFFERS) {
5734 if (r->printer_name) {
5735 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5736 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
5737 NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
5738 NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
5739 if (ndr_get_array_length(ndr, &r->printer_name) > ndr_get_array_size(ndr, &r->printer_name)) {
5740 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->printer_name), ndr_get_array_length(ndr, &r->printer_name));
5742 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->printer_name), sizeof(uint16_t)));
5743 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, ndr_get_array_length(ndr, &r->printer_name), sizeof(uint16_t), CH_UTF16));
5744 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
5746 if (r->server_name) {
5747 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5748 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
5749 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
5750 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
5751 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
5752 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
5754 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
5755 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
5756 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
5758 if (r->user_name) {
5759 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5760 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
5761 NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
5762 NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
5763 if (ndr_get_array_length(ndr, &r->user_name) > ndr_get_array_size(ndr, &r->user_name)) {
5764 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user_name), ndr_get_array_length(ndr, &r->user_name));
5766 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user_name), sizeof(uint16_t)));
5767 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, ndr_get_array_length(ndr, &r->user_name), sizeof(uint16_t), CH_UTF16));
5768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
5770 if (r->document_name) {
5771 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5772 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
5773 NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
5774 NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
5775 if (ndr_get_array_length(ndr, &r->document_name) > ndr_get_array_size(ndr, &r->document_name)) {
5776 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->document_name), ndr_get_array_length(ndr, &r->document_name));
5778 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->document_name), sizeof(uint16_t)));
5779 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, ndr_get_array_length(ndr, &r->document_name), sizeof(uint16_t), CH_UTF16));
5780 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
5782 if (r->notify_name) {
5783 _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5784 NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
5785 NDR_CHECK(ndr_pull_array_size(ndr, &r->notify_name));
5786 NDR_CHECK(ndr_pull_array_length(ndr, &r->notify_name));
5787 if (ndr_get_array_length(ndr, &r->notify_name) > ndr_get_array_size(ndr, &r->notify_name)) {
5788 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->notify_name), ndr_get_array_length(ndr, &r->notify_name));
5790 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->notify_name), sizeof(uint16_t)));
5791 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->notify_name, ndr_get_array_length(ndr, &r->notify_name), sizeof(uint16_t), CH_UTF16));
5792 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
5794 if (r->data_type) {
5795 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
5796 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
5797 NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
5798 NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
5799 if (ndr_get_array_length(ndr, &r->data_type) > ndr_get_array_size(ndr, &r->data_type)) {
5800 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data_type), ndr_get_array_length(ndr, &r->data_type));
5802 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->data_type), sizeof(uint16_t)));
5803 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, ndr_get_array_length(ndr, &r->data_type), sizeof(uint16_t), CH_UTF16));
5804 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
5806 if (r->print_processor) {
5807 _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
5808 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
5809 NDR_CHECK(ndr_pull_array_size(ndr, &r->print_processor));
5810 NDR_CHECK(ndr_pull_array_length(ndr, &r->print_processor));
5811 if (ndr_get_array_length(ndr, &r->print_processor) > ndr_get_array_size(ndr, &r->print_processor)) {
5812 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->print_processor), ndr_get_array_length(ndr, &r->print_processor));
5814 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->print_processor), sizeof(uint16_t)));
5815 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->print_processor, ndr_get_array_length(ndr, &r->print_processor), sizeof(uint16_t), CH_UTF16));
5816 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
5818 if (r->parameters) {
5819 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
5820 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
5821 NDR_CHECK(ndr_pull_array_size(ndr, &r->parameters));
5822 NDR_CHECK(ndr_pull_array_length(ndr, &r->parameters));
5823 if (ndr_get_array_length(ndr, &r->parameters) > ndr_get_array_size(ndr, &r->parameters)) {
5824 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->parameters), ndr_get_array_length(ndr, &r->parameters));
5826 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->parameters), sizeof(uint16_t)));
5827 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->parameters, ndr_get_array_length(ndr, &r->parameters), sizeof(uint16_t), CH_UTF16));
5828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
5830 if (r->driver_name) {
5831 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5832 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
5833 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
5834 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
5835 if (ndr_get_array_length(ndr, &r->driver_name) > ndr_get_array_size(ndr, &r->driver_name)) {
5836 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_name), ndr_get_array_length(ndr, &r->driver_name));
5838 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t)));
5839 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t), CH_UTF16));
5840 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
5842 if (r->text_status) {
5843 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5844 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
5845 NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
5846 NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
5847 if (ndr_get_array_length(ndr, &r->text_status) > ndr_get_array_size(ndr, &r->text_status)) {
5848 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->text_status), ndr_get_array_length(ndr, &r->text_status));
5850 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->text_status), sizeof(uint16_t)));
5851 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, ndr_get_array_length(ndr, &r->text_status), sizeof(uint16_t), CH_UTF16));
5852 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
5855 return NDR_ERR_SUCCESS;
5858 _PUBLIC_ void ndr_print_spoolss_SetJobInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo4 *r)
5860 ndr_print_struct(ndr, name, "spoolss_SetJobInfo4");
5861 ndr->depth++;
5862 ndr_print_uint32(ndr, "job_id", r->job_id);
5863 ndr_print_ptr(ndr, "printer_name", r->printer_name);
5864 ndr->depth++;
5865 if (r->printer_name) {
5866 ndr_print_string(ndr, "printer_name", r->printer_name);
5868 ndr->depth--;
5869 ndr_print_ptr(ndr, "server_name", r->server_name);
5870 ndr->depth++;
5871 if (r->server_name) {
5872 ndr_print_string(ndr, "server_name", r->server_name);
5874 ndr->depth--;
5875 ndr_print_ptr(ndr, "user_name", r->user_name);
5876 ndr->depth++;
5877 if (r->user_name) {
5878 ndr_print_string(ndr, "user_name", r->user_name);
5880 ndr->depth--;
5881 ndr_print_ptr(ndr, "document_name", r->document_name);
5882 ndr->depth++;
5883 if (r->document_name) {
5884 ndr_print_string(ndr, "document_name", r->document_name);
5886 ndr->depth--;
5887 ndr_print_ptr(ndr, "notify_name", r->notify_name);
5888 ndr->depth++;
5889 if (r->notify_name) {
5890 ndr_print_string(ndr, "notify_name", r->notify_name);
5892 ndr->depth--;
5893 ndr_print_ptr(ndr, "data_type", r->data_type);
5894 ndr->depth++;
5895 if (r->data_type) {
5896 ndr_print_string(ndr, "data_type", r->data_type);
5898 ndr->depth--;
5899 ndr_print_ptr(ndr, "print_processor", r->print_processor);
5900 ndr->depth++;
5901 if (r->print_processor) {
5902 ndr_print_string(ndr, "print_processor", r->print_processor);
5904 ndr->depth--;
5905 ndr_print_ptr(ndr, "parameters", r->parameters);
5906 ndr->depth++;
5907 if (r->parameters) {
5908 ndr_print_string(ndr, "parameters", r->parameters);
5910 ndr->depth--;
5911 ndr_print_ptr(ndr, "driver_name", r->driver_name);
5912 ndr->depth++;
5913 if (r->driver_name) {
5914 ndr_print_string(ndr, "driver_name", r->driver_name);
5916 ndr->depth--;
5917 ndr_print_uint32(ndr, "_devmode_ptr", r->_devmode_ptr);
5918 ndr_print_ptr(ndr, "text_status", r->text_status);
5919 ndr->depth++;
5920 if (r->text_status) {
5921 ndr_print_string(ndr, "text_status", r->text_status);
5923 ndr->depth--;
5924 ndr_print_uint32(ndr, "_secdesc_ptr", r->_secdesc_ptr);
5925 ndr_print_spoolss_JobStatus(ndr, "status", r->status);
5926 ndr_print_uint32(ndr, "priority", r->priority);
5927 ndr_print_uint32(ndr, "position", r->position);
5928 ndr_print_uint32(ndr, "start_time", r->start_time);
5929 ndr_print_uint32(ndr, "until_time", r->until_time);
5930 ndr_print_uint32(ndr, "total_pages", r->total_pages);
5931 ndr_print_uint32(ndr, "size", r->size);
5932 ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
5933 ndr_print_uint32(ndr, "time", r->time);
5934 ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
5935 ndr_print_uint32(ndr, "size_high", r->size_high);
5936 ndr->depth--;
5939 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetJobInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_SetJobInfo *r)
5941 if (ndr_flags & NDR_SCALARS) {
5942 int level = ndr_push_get_switch_value(ndr, r);
5943 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5944 switch (level) {
5945 case 1: {
5946 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
5947 break; }
5949 case 2: {
5950 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
5951 break; }
5953 case 3: {
5954 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
5955 break; }
5957 case 4: {
5958 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
5959 break; }
5961 default: {
5962 break; }
5966 if (ndr_flags & NDR_BUFFERS) {
5967 int level = ndr_push_get_switch_value(ndr, r);
5968 switch (level) {
5969 case 1:
5970 if (r->info1) {
5971 NDR_CHECK(ndr_push_spoolss_SetJobInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5973 break;
5975 case 2:
5976 if (r->info2) {
5977 NDR_CHECK(ndr_push_spoolss_SetJobInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5979 break;
5981 case 3:
5982 if (r->info3) {
5983 NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr, NDR_SCALARS, r->info3));
5985 break;
5987 case 4:
5988 if (r->info4) {
5989 NDR_CHECK(ndr_push_spoolss_SetJobInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
5991 break;
5993 default:
5994 break;
5998 return NDR_ERR_SUCCESS;
6001 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetJobInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_SetJobInfo *r)
6003 int level;
6004 uint32_t _level;
6005 TALLOC_CTX *_mem_save_info1_0;
6006 TALLOC_CTX *_mem_save_info2_0;
6007 TALLOC_CTX *_mem_save_info3_0;
6008 TALLOC_CTX *_mem_save_info4_0;
6009 level = ndr_pull_get_switch_value(ndr, r);
6010 if (ndr_flags & NDR_SCALARS) {
6011 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6012 if (_level != level) {
6013 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
6015 switch (level) {
6016 case 1: {
6017 uint32_t _ptr_info1;
6018 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
6019 if (_ptr_info1) {
6020 NDR_PULL_ALLOC(ndr, r->info1);
6021 } else {
6022 r->info1 = NULL;
6024 break; }
6026 case 2: {
6027 uint32_t _ptr_info2;
6028 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
6029 if (_ptr_info2) {
6030 NDR_PULL_ALLOC(ndr, r->info2);
6031 } else {
6032 r->info2 = NULL;
6034 break; }
6036 case 3: {
6037 uint32_t _ptr_info3;
6038 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
6039 if (_ptr_info3) {
6040 NDR_PULL_ALLOC(ndr, r->info3);
6041 } else {
6042 r->info3 = NULL;
6044 break; }
6046 case 4: {
6047 uint32_t _ptr_info4;
6048 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
6049 if (_ptr_info4) {
6050 NDR_PULL_ALLOC(ndr, r->info4);
6051 } else {
6052 r->info4 = NULL;
6054 break; }
6056 default: {
6057 break; }
6061 if (ndr_flags & NDR_BUFFERS) {
6062 switch (level) {
6063 case 1:
6064 if (r->info1) {
6065 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6066 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
6067 NDR_CHECK(ndr_pull_spoolss_SetJobInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
6068 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
6070 break;
6072 case 2:
6073 if (r->info2) {
6074 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6075 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
6076 NDR_CHECK(ndr_pull_spoolss_SetJobInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
6077 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
6079 break;
6081 case 3:
6082 if (r->info3) {
6083 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
6084 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
6085 NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr, NDR_SCALARS, r->info3));
6086 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
6088 break;
6090 case 4:
6091 if (r->info4) {
6092 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
6093 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
6094 NDR_CHECK(ndr_pull_spoolss_SetJobInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
6095 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
6097 break;
6099 default:
6100 break;
6104 return NDR_ERR_SUCCESS;
6107 _PUBLIC_ void ndr_print_spoolss_SetJobInfo(struct ndr_print *ndr, const char *name, const union spoolss_SetJobInfo *r)
6109 int level;
6110 level = ndr_print_get_switch_value(ndr, r);
6111 ndr_print_union(ndr, name, level, "spoolss_SetJobInfo");
6112 switch (level) {
6113 case 1:
6114 ndr_print_ptr(ndr, "info1", r->info1);
6115 ndr->depth++;
6116 if (r->info1) {
6117 ndr_print_spoolss_SetJobInfo1(ndr, "info1", r->info1);
6119 ndr->depth--;
6120 break;
6122 case 2:
6123 ndr_print_ptr(ndr, "info2", r->info2);
6124 ndr->depth++;
6125 if (r->info2) {
6126 ndr_print_spoolss_SetJobInfo2(ndr, "info2", r->info2);
6128 ndr->depth--;
6129 break;
6131 case 3:
6132 ndr_print_ptr(ndr, "info3", r->info3);
6133 ndr->depth++;
6134 if (r->info3) {
6135 ndr_print_spoolss_JobInfo3(ndr, "info3", r->info3);
6137 ndr->depth--;
6138 break;
6140 case 4:
6141 ndr_print_ptr(ndr, "info4", r->info4);
6142 ndr->depth++;
6143 if (r->info4) {
6144 ndr_print_spoolss_SetJobInfo4(ndr, "info4", r->info4);
6146 ndr->depth--;
6147 break;
6149 default:
6150 break;
6155 static enum ndr_err_code ndr_push_spoolss_JobInfoContainer(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfoContainer *r)
6157 if (ndr_flags & NDR_SCALARS) {
6158 NDR_CHECK(ndr_push_align(ndr, 4));
6159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
6160 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
6161 NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr, NDR_SCALARS, &r->info));
6163 if (ndr_flags & NDR_BUFFERS) {
6164 NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr, NDR_BUFFERS, &r->info));
6166 return NDR_ERR_SUCCESS;
6169 static enum ndr_err_code ndr_pull_spoolss_JobInfoContainer(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfoContainer *r)
6171 if (ndr_flags & NDR_SCALARS) {
6172 NDR_CHECK(ndr_pull_align(ndr, 4));
6173 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
6174 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
6175 NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr, NDR_SCALARS, &r->info));
6177 if (ndr_flags & NDR_BUFFERS) {
6178 NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr, NDR_BUFFERS, &r->info));
6180 return NDR_ERR_SUCCESS;
6183 _PUBLIC_ void ndr_print_spoolss_JobInfoContainer(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfoContainer *r)
6185 ndr_print_struct(ndr, name, "spoolss_JobInfoContainer");
6186 ndr->depth++;
6187 ndr_print_uint32(ndr, "level", r->level);
6188 ndr_print_set_switch_value(ndr, &r->info, r->level);
6189 ndr_print_spoolss_SetJobInfo(ndr, "info", &r->info);
6190 ndr->depth--;
6193 static enum ndr_err_code ndr_push_spoolss_JobControl(struct ndr_push *ndr, int ndr_flags, enum spoolss_JobControl r)
6195 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
6196 return NDR_ERR_SUCCESS;
6199 static enum ndr_err_code ndr_pull_spoolss_JobControl(struct ndr_pull *ndr, int ndr_flags, enum spoolss_JobControl *r)
6201 uint32_t v;
6202 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
6203 *r = v;
6204 return NDR_ERR_SUCCESS;
6207 _PUBLIC_ void ndr_print_spoolss_JobControl(struct ndr_print *ndr, const char *name, enum spoolss_JobControl r)
6209 const char *val = NULL;
6211 switch (r) {
6212 case SPOOLSS_JOB_CONTROL_PAUSE: val = "SPOOLSS_JOB_CONTROL_PAUSE"; break;
6213 case SPOOLSS_JOB_CONTROL_RESUME: val = "SPOOLSS_JOB_CONTROL_RESUME"; break;
6214 case SPOOLSS_JOB_CONTROL_CANCEL: val = "SPOOLSS_JOB_CONTROL_CANCEL"; break;
6215 case SPOOLSS_JOB_CONTROL_RESTART: val = "SPOOLSS_JOB_CONTROL_RESTART"; break;
6216 case SPOOLSS_JOB_CONTROL_DELETE: val = "SPOOLSS_JOB_CONTROL_DELETE"; break;
6217 case SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER: val = "SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER"; break;
6218 case SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED: val = "SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED"; break;
6219 case SPOOLSS_JOB_CONTROL_RETAIN: val = "SPOOLSS_JOB_CONTROL_RETAIN"; break;
6220 case SPOOLSS_JOB_CONTROL_RELEASE: val = "SPOOLSS_JOB_CONTROL_RELEASE"; break;
6222 ndr_print_enum(ndr, name, "ENUM", val, r);
6225 static enum ndr_err_code ndr_push_spoolss_PrinterControl(struct ndr_push *ndr, int ndr_flags, enum spoolss_PrinterControl r)
6227 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
6228 return NDR_ERR_SUCCESS;
6231 static enum ndr_err_code ndr_pull_spoolss_PrinterControl(struct ndr_pull *ndr, int ndr_flags, enum spoolss_PrinterControl *r)
6233 uint32_t v;
6234 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
6235 *r = v;
6236 return NDR_ERR_SUCCESS;
6239 _PUBLIC_ void ndr_print_spoolss_PrinterControl(struct ndr_print *ndr, const char *name, enum spoolss_PrinterControl r)
6241 const char *val = NULL;
6243 switch (r) {
6244 case SPOOLSS_PRINTER_CONTROL_UNPAUSE: val = "SPOOLSS_PRINTER_CONTROL_UNPAUSE"; break;
6245 case SPOOLSS_PRINTER_CONTROL_PAUSE: val = "SPOOLSS_PRINTER_CONTROL_PAUSE"; break;
6246 case SPOOLSS_PRINTER_CONTROL_RESUME: val = "SPOOLSS_PRINTER_CONTROL_RESUME"; break;
6247 case SPOOLSS_PRINTER_CONTROL_PURGE: val = "SPOOLSS_PRINTER_CONTROL_PURGE"; break;
6248 case SPOOLSS_PRINTER_CONTROL_SET_STATUS: val = "SPOOLSS_PRINTER_CONTROL_SET_STATUS"; break;
6250 ndr_print_enum(ndr, name, "ENUM", val, r);
6253 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo0(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo0 *r)
6255 if (ndr_flags & NDR_SCALARS) {
6256 NDR_CHECK(ndr_push_align(ndr, 4));
6257 NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername));
6258 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
6259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
6260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_jobs));
6261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_bytes));
6262 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->time));
6263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->global_counter));
6264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
6265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
6266 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->free_build));
6267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->spooling));
6268 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_spooling));
6269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_counter));
6270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_out_of_paper));
6271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_not_ready));
6272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_error));
6273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_of_processors));
6274 NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr, NDR_SCALARS, r->processor_type));
6275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high_part_total_bytes));
6276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->change_id));
6277 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_error));
6278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
6279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumerate_network_printers));
6280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->c_setprinter));
6281 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor_architecture));
6282 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->processor_level));
6283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_ic));
6284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
6285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved3));
6287 if (ndr_flags & NDR_BUFFERS) {
6288 if (r->servername) {
6289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
6290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
6292 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servername, ndr_charset_length(r->servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6294 if (r->printername) {
6295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
6296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6297 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
6298 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6301 return NDR_ERR_SUCCESS;
6304 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo0(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo0 *r)
6306 uint32_t _ptr_servername;
6307 TALLOC_CTX *_mem_save_servername_0;
6308 uint32_t _ptr_printername;
6309 TALLOC_CTX *_mem_save_printername_0;
6310 if (ndr_flags & NDR_SCALARS) {
6311 NDR_CHECK(ndr_pull_align(ndr, 4));
6312 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
6313 if (_ptr_servername) {
6314 NDR_PULL_ALLOC(ndr, r->servername);
6315 } else {
6316 r->servername = NULL;
6318 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
6319 if (_ptr_printername) {
6320 NDR_PULL_ALLOC(ndr, r->printername);
6321 } else {
6322 r->printername = NULL;
6324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
6325 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_jobs));
6326 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_bytes));
6327 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->time));
6328 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->global_counter));
6329 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
6330 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
6331 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->free_build));
6332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->spooling));
6333 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_spooling));
6334 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_counter));
6335 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_out_of_paper));
6336 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_not_ready));
6337 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_error));
6338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_of_processors));
6339 NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr, NDR_SCALARS, &r->processor_type));
6340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high_part_total_bytes));
6341 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->change_id));
6342 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_error));
6343 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
6344 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumerate_network_printers));
6345 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->c_setprinter));
6346 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor_architecture));
6347 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->processor_level));
6348 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_ic));
6349 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
6350 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
6352 if (ndr_flags & NDR_BUFFERS) {
6353 if (r->servername) {
6354 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
6355 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
6356 NDR_CHECK(ndr_pull_array_size(ndr, &r->servername));
6357 NDR_CHECK(ndr_pull_array_length(ndr, &r->servername));
6358 if (ndr_get_array_length(ndr, &r->servername) > ndr_get_array_size(ndr, &r->servername)) {
6359 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->servername), ndr_get_array_length(ndr, &r->servername));
6361 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->servername), sizeof(uint16_t)));
6362 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servername, ndr_get_array_length(ndr, &r->servername), sizeof(uint16_t), CH_UTF16));
6363 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
6365 if (r->printername) {
6366 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
6367 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
6368 NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
6369 NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
6370 if (ndr_get_array_length(ndr, &r->printername) > ndr_get_array_size(ndr, &r->printername)) {
6371 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->printername), ndr_get_array_length(ndr, &r->printername));
6373 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->printername), sizeof(uint16_t)));
6374 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, ndr_get_array_length(ndr, &r->printername), sizeof(uint16_t), CH_UTF16));
6375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
6378 return NDR_ERR_SUCCESS;
6381 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo0(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo0 *r)
6383 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo0");
6384 ndr->depth++;
6385 ndr_print_ptr(ndr, "servername", r->servername);
6386 ndr->depth++;
6387 if (r->servername) {
6388 ndr_print_string(ndr, "servername", r->servername);
6390 ndr->depth--;
6391 ndr_print_ptr(ndr, "printername", r->printername);
6392 ndr->depth++;
6393 if (r->printername) {
6394 ndr_print_string(ndr, "printername", r->printername);
6396 ndr->depth--;
6397 ndr_print_uint32(ndr, "cjobs", r->cjobs);
6398 ndr_print_uint32(ndr, "total_jobs", r->total_jobs);
6399 ndr_print_uint32(ndr, "total_bytes", r->total_bytes);
6400 ndr_print_spoolss_Time(ndr, "time", &r->time);
6401 ndr_print_uint32(ndr, "global_counter", r->global_counter);
6402 ndr_print_uint32(ndr, "total_pages", r->total_pages);
6403 ndr_print_uint32(ndr, "version", r->version);
6404 ndr_print_uint32(ndr, "free_build", r->free_build);
6405 ndr_print_uint32(ndr, "spooling", r->spooling);
6406 ndr_print_uint32(ndr, "max_spooling", r->max_spooling);
6407 ndr_print_uint32(ndr, "session_counter", r->session_counter);
6408 ndr_print_uint32(ndr, "num_error_out_of_paper", r->num_error_out_of_paper);
6409 ndr_print_uint32(ndr, "num_error_not_ready", r->num_error_not_ready);
6410 ndr_print_uint32(ndr, "job_error", r->job_error);
6411 ndr_print_uint32(ndr, "number_of_processors", r->number_of_processors);
6412 ndr_print_spoolss_ProcessorType(ndr, "processor_type", r->processor_type);
6413 ndr_print_uint32(ndr, "high_part_total_bytes", r->high_part_total_bytes);
6414 ndr_print_uint32(ndr, "change_id", r->change_id);
6415 ndr_print_WERROR(ndr, "last_error", r->last_error);
6416 ndr_print_uint32(ndr, "status", r->status);
6417 ndr_print_uint32(ndr, "enumerate_network_printers", r->enumerate_network_printers);
6418 ndr_print_uint32(ndr, "c_setprinter", r->c_setprinter);
6419 ndr_print_spoolss_ProcessorArchitecture(ndr, "processor_architecture", r->processor_architecture);
6420 ndr_print_uint16(ndr, "processor_level", r->processor_level);
6421 ndr_print_uint32(ndr, "ref_ic", r->ref_ic);
6422 ndr_print_uint32(ndr, "reserved2", r->reserved2);
6423 ndr_print_uint32(ndr, "reserved3", r->reserved3);
6424 ndr->depth--;
6427 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo1 *r)
6429 if (ndr_flags & NDR_SCALARS) {
6430 NDR_CHECK(ndr_push_align(ndr, 4));
6431 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->flags));
6432 NDR_CHECK(ndr_push_unique_ptr(ndr, r->description));
6433 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
6434 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6436 if (ndr_flags & NDR_BUFFERS) {
6437 if (r->description) {
6438 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->description, CH_UTF16)));
6439 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6440 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->description, CH_UTF16)));
6441 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->description, ndr_charset_length(r->description, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6443 if (r->name) {
6444 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
6445 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6446 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
6447 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6449 if (r->comment) {
6450 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6451 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6452 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6453 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6456 return NDR_ERR_SUCCESS;
6459 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo1 *r)
6461 uint32_t _ptr_description;
6462 TALLOC_CTX *_mem_save_description_0;
6463 uint32_t _ptr_name;
6464 TALLOC_CTX *_mem_save_name_0;
6465 uint32_t _ptr_comment;
6466 TALLOC_CTX *_mem_save_comment_0;
6467 if (ndr_flags & NDR_SCALARS) {
6468 NDR_CHECK(ndr_pull_align(ndr, 4));
6469 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->flags));
6470 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
6471 if (_ptr_description) {
6472 NDR_PULL_ALLOC(ndr, r->description);
6473 } else {
6474 r->description = NULL;
6476 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
6477 if (_ptr_name) {
6478 NDR_PULL_ALLOC(ndr, r->name);
6479 } else {
6480 r->name = NULL;
6482 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6483 if (_ptr_comment) {
6484 NDR_PULL_ALLOC(ndr, r->comment);
6485 } else {
6486 r->comment = NULL;
6489 if (ndr_flags & NDR_BUFFERS) {
6490 if (r->description) {
6491 _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
6492 NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
6493 NDR_CHECK(ndr_pull_array_size(ndr, &r->description));
6494 NDR_CHECK(ndr_pull_array_length(ndr, &r->description));
6495 if (ndr_get_array_length(ndr, &r->description) > ndr_get_array_size(ndr, &r->description)) {
6496 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->description), ndr_get_array_length(ndr, &r->description));
6498 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->description), sizeof(uint16_t)));
6499 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->description, ndr_get_array_length(ndr, &r->description), sizeof(uint16_t), CH_UTF16));
6500 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
6502 if (r->name) {
6503 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6504 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
6505 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
6506 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
6507 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
6508 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
6510 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
6511 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
6512 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
6514 if (r->comment) {
6515 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6516 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6517 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6518 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6519 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
6520 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
6522 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
6523 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
6524 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6527 return NDR_ERR_SUCCESS;
6530 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo1 *r)
6532 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo1");
6533 ndr->depth++;
6534 ndr_print_spoolss_PrinterAttributes(ndr, "flags", r->flags);
6535 ndr_print_ptr(ndr, "description", r->description);
6536 ndr->depth++;
6537 if (r->description) {
6538 ndr_print_string(ndr, "description", r->description);
6540 ndr->depth--;
6541 ndr_print_ptr(ndr, "name", r->name);
6542 ndr->depth++;
6543 if (r->name) {
6544 ndr_print_string(ndr, "name", r->name);
6546 ndr->depth--;
6547 ndr_print_ptr(ndr, "comment", r->comment);
6548 ndr->depth++;
6549 if (r->comment) {
6550 ndr_print_string(ndr, "comment", r->comment);
6552 ndr->depth--;
6553 ndr->depth--;
6556 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo2 *r)
6558 if (ndr_flags & NDR_SCALARS) {
6559 NDR_CHECK(ndr_push_align(ndr, 4));
6560 NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername));
6561 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
6562 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sharename));
6563 NDR_CHECK(ndr_push_unique_ptr(ndr, r->portname));
6564 NDR_CHECK(ndr_push_unique_ptr(ndr, r->drivername));
6565 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->location));
6567 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devmode));
6568 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sepfile));
6569 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printprocessor));
6570 NDR_CHECK(ndr_push_unique_ptr(ndr, r->datatype));
6571 NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
6572 NDR_CHECK(ndr_push_unique_ptr(ndr, r->secdesc));
6573 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
6574 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
6575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->defaultpriority));
6576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->starttime));
6577 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->untiltime));
6578 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
6579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
6580 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm));
6582 if (ndr_flags & NDR_BUFFERS) {
6583 if (r->servername) {
6584 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
6585 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6586 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
6587 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servername, ndr_charset_length(r->servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6589 if (r->printername) {
6590 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
6591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
6593 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6595 if (r->sharename) {
6596 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->sharename, CH_UTF16)));
6597 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6598 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->sharename, CH_UTF16)));
6599 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sharename, ndr_charset_length(r->sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6601 if (r->portname) {
6602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
6603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
6605 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, ndr_charset_length(r->portname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6607 if (r->drivername) {
6608 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->drivername, CH_UTF16)));
6609 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->drivername, CH_UTF16)));
6611 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->drivername, ndr_charset_length(r->drivername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6613 if (r->comment) {
6614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6617 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6619 if (r->location) {
6620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->location, CH_UTF16)));
6621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->location, CH_UTF16)));
6623 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->location, ndr_charset_length(r->location, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6625 if (r->devmode) {
6627 struct ndr_push *_ndr_devmode;
6628 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
6629 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
6630 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
6633 if (r->sepfile) {
6634 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->sepfile, CH_UTF16)));
6635 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->sepfile, CH_UTF16)));
6637 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sepfile, ndr_charset_length(r->sepfile, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6639 if (r->printprocessor) {
6640 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printprocessor, CH_UTF16)));
6641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6642 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printprocessor, CH_UTF16)));
6643 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printprocessor, ndr_charset_length(r->printprocessor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6645 if (r->datatype) {
6646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
6647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6648 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
6649 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->datatype, ndr_charset_length(r->datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6651 if (r->parameters) {
6652 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
6653 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6654 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
6655 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6657 if (r->secdesc) {
6659 struct ndr_push *_ndr_secdesc;
6660 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
6661 NDR_CHECK(ndr_push_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
6662 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
6666 return NDR_ERR_SUCCESS;
6669 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo2 *r)
6671 uint32_t _ptr_servername;
6672 TALLOC_CTX *_mem_save_servername_0;
6673 uint32_t _ptr_printername;
6674 TALLOC_CTX *_mem_save_printername_0;
6675 uint32_t _ptr_sharename;
6676 TALLOC_CTX *_mem_save_sharename_0;
6677 uint32_t _ptr_portname;
6678 TALLOC_CTX *_mem_save_portname_0;
6679 uint32_t _ptr_drivername;
6680 TALLOC_CTX *_mem_save_drivername_0;
6681 uint32_t _ptr_comment;
6682 TALLOC_CTX *_mem_save_comment_0;
6683 uint32_t _ptr_location;
6684 TALLOC_CTX *_mem_save_location_0;
6685 uint32_t _ptr_devmode;
6686 TALLOC_CTX *_mem_save_devmode_0;
6687 uint32_t _ptr_sepfile;
6688 TALLOC_CTX *_mem_save_sepfile_0;
6689 uint32_t _ptr_printprocessor;
6690 TALLOC_CTX *_mem_save_printprocessor_0;
6691 uint32_t _ptr_datatype;
6692 TALLOC_CTX *_mem_save_datatype_0;
6693 uint32_t _ptr_parameters;
6694 TALLOC_CTX *_mem_save_parameters_0;
6695 uint32_t _ptr_secdesc;
6696 TALLOC_CTX *_mem_save_secdesc_0;
6697 if (ndr_flags & NDR_SCALARS) {
6698 NDR_CHECK(ndr_pull_align(ndr, 4));
6699 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
6700 if (_ptr_servername) {
6701 NDR_PULL_ALLOC(ndr, r->servername);
6702 } else {
6703 r->servername = NULL;
6705 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
6706 if (_ptr_printername) {
6707 NDR_PULL_ALLOC(ndr, r->printername);
6708 } else {
6709 r->printername = NULL;
6711 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
6712 if (_ptr_sharename) {
6713 NDR_PULL_ALLOC(ndr, r->sharename);
6714 } else {
6715 r->sharename = NULL;
6717 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
6718 if (_ptr_portname) {
6719 NDR_PULL_ALLOC(ndr, r->portname);
6720 } else {
6721 r->portname = NULL;
6723 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_drivername));
6724 if (_ptr_drivername) {
6725 NDR_PULL_ALLOC(ndr, r->drivername);
6726 } else {
6727 r->drivername = NULL;
6729 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6730 if (_ptr_comment) {
6731 NDR_PULL_ALLOC(ndr, r->comment);
6732 } else {
6733 r->comment = NULL;
6735 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_location));
6736 if (_ptr_location) {
6737 NDR_PULL_ALLOC(ndr, r->location);
6738 } else {
6739 r->location = NULL;
6741 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
6742 if (_ptr_devmode) {
6743 NDR_PULL_ALLOC(ndr, r->devmode);
6744 } else {
6745 r->devmode = NULL;
6747 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sepfile));
6748 if (_ptr_sepfile) {
6749 NDR_PULL_ALLOC(ndr, r->sepfile);
6750 } else {
6751 r->sepfile = NULL;
6753 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printprocessor));
6754 if (_ptr_printprocessor) {
6755 NDR_PULL_ALLOC(ndr, r->printprocessor);
6756 } else {
6757 r->printprocessor = NULL;
6759 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
6760 if (_ptr_datatype) {
6761 NDR_PULL_ALLOC(ndr, r->datatype);
6762 } else {
6763 r->datatype = NULL;
6765 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
6766 if (_ptr_parameters) {
6767 NDR_PULL_ALLOC(ndr, r->parameters);
6768 } else {
6769 r->parameters = NULL;
6771 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
6772 if (_ptr_secdesc) {
6773 NDR_PULL_ALLOC(ndr, r->secdesc);
6774 } else {
6775 r->secdesc = NULL;
6777 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
6778 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
6779 if (r->priority > 99) {
6780 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6782 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->defaultpriority));
6783 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->starttime));
6784 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->untiltime));
6785 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
6786 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
6787 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->averageppm));
6789 if (ndr_flags & NDR_BUFFERS) {
6790 if (r->servername) {
6791 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
6792 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
6793 NDR_CHECK(ndr_pull_array_size(ndr, &r->servername));
6794 NDR_CHECK(ndr_pull_array_length(ndr, &r->servername));
6795 if (ndr_get_array_length(ndr, &r->servername) > ndr_get_array_size(ndr, &r->servername)) {
6796 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->servername), ndr_get_array_length(ndr, &r->servername));
6798 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->servername), sizeof(uint16_t)));
6799 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servername, ndr_get_array_length(ndr, &r->servername), sizeof(uint16_t), CH_UTF16));
6800 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
6802 if (r->printername) {
6803 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
6804 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
6805 NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
6806 NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
6807 if (ndr_get_array_length(ndr, &r->printername) > ndr_get_array_size(ndr, &r->printername)) {
6808 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->printername), ndr_get_array_length(ndr, &r->printername));
6810 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->printername), sizeof(uint16_t)));
6811 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, ndr_get_array_length(ndr, &r->printername), sizeof(uint16_t), CH_UTF16));
6812 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
6814 if (r->sharename) {
6815 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
6816 NDR_PULL_SET_MEM_CTX(ndr, r->sharename, 0);
6817 NDR_CHECK(ndr_pull_array_size(ndr, &r->sharename));
6818 NDR_CHECK(ndr_pull_array_length(ndr, &r->sharename));
6819 if (ndr_get_array_length(ndr, &r->sharename) > ndr_get_array_size(ndr, &r->sharename)) {
6820 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->sharename), ndr_get_array_length(ndr, &r->sharename));
6822 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->sharename), sizeof(uint16_t)));
6823 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sharename, ndr_get_array_length(ndr, &r->sharename), sizeof(uint16_t), CH_UTF16));
6824 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
6826 if (r->portname) {
6827 _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
6828 NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
6829 NDR_CHECK(ndr_pull_array_size(ndr, &r->portname));
6830 NDR_CHECK(ndr_pull_array_length(ndr, &r->portname));
6831 if (ndr_get_array_length(ndr, &r->portname) > ndr_get_array_size(ndr, &r->portname)) {
6832 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->portname), ndr_get_array_length(ndr, &r->portname));
6834 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->portname), sizeof(uint16_t)));
6835 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->portname, ndr_get_array_length(ndr, &r->portname), sizeof(uint16_t), CH_UTF16));
6836 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
6838 if (r->drivername) {
6839 _mem_save_drivername_0 = NDR_PULL_GET_MEM_CTX(ndr);
6840 NDR_PULL_SET_MEM_CTX(ndr, r->drivername, 0);
6841 NDR_CHECK(ndr_pull_array_size(ndr, &r->drivername));
6842 NDR_CHECK(ndr_pull_array_length(ndr, &r->drivername));
6843 if (ndr_get_array_length(ndr, &r->drivername) > ndr_get_array_size(ndr, &r->drivername)) {
6844 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->drivername), ndr_get_array_length(ndr, &r->drivername));
6846 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->drivername), sizeof(uint16_t)));
6847 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->drivername, ndr_get_array_length(ndr, &r->drivername), sizeof(uint16_t), CH_UTF16));
6848 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_drivername_0, 0);
6850 if (r->comment) {
6851 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6852 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6853 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6854 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6855 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
6856 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
6858 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
6859 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
6860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6862 if (r->location) {
6863 _mem_save_location_0 = NDR_PULL_GET_MEM_CTX(ndr);
6864 NDR_PULL_SET_MEM_CTX(ndr, r->location, 0);
6865 NDR_CHECK(ndr_pull_array_size(ndr, &r->location));
6866 NDR_CHECK(ndr_pull_array_length(ndr, &r->location));
6867 if (ndr_get_array_length(ndr, &r->location) > ndr_get_array_size(ndr, &r->location)) {
6868 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->location), ndr_get_array_length(ndr, &r->location));
6870 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->location), sizeof(uint16_t)));
6871 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->location, ndr_get_array_length(ndr, &r->location), sizeof(uint16_t), CH_UTF16));
6872 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_location_0, 0);
6874 if (r->devmode) {
6875 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
6876 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
6878 struct ndr_pull *_ndr_devmode;
6879 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
6880 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
6881 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
6883 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
6885 if (r->sepfile) {
6886 _mem_save_sepfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
6887 NDR_PULL_SET_MEM_CTX(ndr, r->sepfile, 0);
6888 NDR_CHECK(ndr_pull_array_size(ndr, &r->sepfile));
6889 NDR_CHECK(ndr_pull_array_length(ndr, &r->sepfile));
6890 if (ndr_get_array_length(ndr, &r->sepfile) > ndr_get_array_size(ndr, &r->sepfile)) {
6891 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->sepfile), ndr_get_array_length(ndr, &r->sepfile));
6893 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->sepfile), sizeof(uint16_t)));
6894 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->sepfile, ndr_get_array_length(ndr, &r->sepfile), sizeof(uint16_t), CH_UTF16));
6895 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sepfile_0, 0);
6897 if (r->printprocessor) {
6898 _mem_save_printprocessor_0 = NDR_PULL_GET_MEM_CTX(ndr);
6899 NDR_PULL_SET_MEM_CTX(ndr, r->printprocessor, 0);
6900 NDR_CHECK(ndr_pull_array_size(ndr, &r->printprocessor));
6901 NDR_CHECK(ndr_pull_array_length(ndr, &r->printprocessor));
6902 if (ndr_get_array_length(ndr, &r->printprocessor) > ndr_get_array_size(ndr, &r->printprocessor)) {
6903 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->printprocessor), ndr_get_array_length(ndr, &r->printprocessor));
6905 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->printprocessor), sizeof(uint16_t)));
6906 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printprocessor, ndr_get_array_length(ndr, &r->printprocessor), sizeof(uint16_t), CH_UTF16));
6907 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printprocessor_0, 0);
6909 if (r->datatype) {
6910 _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
6911 NDR_PULL_SET_MEM_CTX(ndr, r->datatype, 0);
6912 NDR_CHECK(ndr_pull_array_size(ndr, &r->datatype));
6913 NDR_CHECK(ndr_pull_array_length(ndr, &r->datatype));
6914 if (ndr_get_array_length(ndr, &r->datatype) > ndr_get_array_size(ndr, &r->datatype)) {
6915 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->datatype), ndr_get_array_length(ndr, &r->datatype));
6917 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->datatype), sizeof(uint16_t)));
6918 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->datatype, ndr_get_array_length(ndr, &r->datatype), sizeof(uint16_t), CH_UTF16));
6919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
6921 if (r->parameters) {
6922 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
6923 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
6924 NDR_CHECK(ndr_pull_array_size(ndr, &r->parameters));
6925 NDR_CHECK(ndr_pull_array_length(ndr, &r->parameters));
6926 if (ndr_get_array_length(ndr, &r->parameters) > ndr_get_array_size(ndr, &r->parameters)) {
6927 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->parameters), ndr_get_array_length(ndr, &r->parameters));
6929 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->parameters), sizeof(uint16_t)));
6930 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->parameters, ndr_get_array_length(ndr, &r->parameters), sizeof(uint16_t), CH_UTF16));
6931 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
6933 if (r->secdesc) {
6934 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
6935 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
6937 struct ndr_pull *_ndr_secdesc;
6938 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
6939 NDR_CHECK(ndr_pull_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
6940 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
6942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
6945 return NDR_ERR_SUCCESS;
6948 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo2 *r)
6950 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo2");
6951 ndr->depth++;
6952 ndr_print_ptr(ndr, "servername", r->servername);
6953 ndr->depth++;
6954 if (r->servername) {
6955 ndr_print_string(ndr, "servername", r->servername);
6957 ndr->depth--;
6958 ndr_print_ptr(ndr, "printername", r->printername);
6959 ndr->depth++;
6960 if (r->printername) {
6961 ndr_print_string(ndr, "printername", r->printername);
6963 ndr->depth--;
6964 ndr_print_ptr(ndr, "sharename", r->sharename);
6965 ndr->depth++;
6966 if (r->sharename) {
6967 ndr_print_string(ndr, "sharename", r->sharename);
6969 ndr->depth--;
6970 ndr_print_ptr(ndr, "portname", r->portname);
6971 ndr->depth++;
6972 if (r->portname) {
6973 ndr_print_string(ndr, "portname", r->portname);
6975 ndr->depth--;
6976 ndr_print_ptr(ndr, "drivername", r->drivername);
6977 ndr->depth++;
6978 if (r->drivername) {
6979 ndr_print_string(ndr, "drivername", r->drivername);
6981 ndr->depth--;
6982 ndr_print_ptr(ndr, "comment", r->comment);
6983 ndr->depth++;
6984 if (r->comment) {
6985 ndr_print_string(ndr, "comment", r->comment);
6987 ndr->depth--;
6988 ndr_print_ptr(ndr, "location", r->location);
6989 ndr->depth++;
6990 if (r->location) {
6991 ndr_print_string(ndr, "location", r->location);
6993 ndr->depth--;
6994 ndr_print_ptr(ndr, "devmode", r->devmode);
6995 ndr->depth++;
6996 if (r->devmode) {
6997 ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
6999 ndr->depth--;
7000 ndr_print_ptr(ndr, "sepfile", r->sepfile);
7001 ndr->depth++;
7002 if (r->sepfile) {
7003 ndr_print_string(ndr, "sepfile", r->sepfile);
7005 ndr->depth--;
7006 ndr_print_ptr(ndr, "printprocessor", r->printprocessor);
7007 ndr->depth++;
7008 if (r->printprocessor) {
7009 ndr_print_string(ndr, "printprocessor", r->printprocessor);
7011 ndr->depth--;
7012 ndr_print_ptr(ndr, "datatype", r->datatype);
7013 ndr->depth++;
7014 if (r->datatype) {
7015 ndr_print_string(ndr, "datatype", r->datatype);
7017 ndr->depth--;
7018 ndr_print_ptr(ndr, "parameters", r->parameters);
7019 ndr->depth++;
7020 if (r->parameters) {
7021 ndr_print_string(ndr, "parameters", r->parameters);
7023 ndr->depth--;
7024 ndr_print_ptr(ndr, "secdesc", r->secdesc);
7025 ndr->depth++;
7026 if (r->secdesc) {
7027 ndr_print_security_descriptor(ndr, "secdesc", r->secdesc);
7029 ndr->depth--;
7030 ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
7031 ndr_print_uint32(ndr, "priority", r->priority);
7032 ndr_print_uint32(ndr, "defaultpriority", r->defaultpriority);
7033 ndr_print_uint32(ndr, "starttime", r->starttime);
7034 ndr_print_uint32(ndr, "untiltime", r->untiltime);
7035 ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
7036 ndr_print_uint32(ndr, "cjobs", r->cjobs);
7037 ndr_print_uint32(ndr, "averageppm", r->averageppm);
7038 ndr->depth--;
7041 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo3 *r)
7043 if (ndr_flags & NDR_SCALARS) {
7044 NDR_CHECK(ndr_push_align(ndr, 4));
7045 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sec_desc_ptr));
7047 if (ndr_flags & NDR_BUFFERS) {
7049 return NDR_ERR_SUCCESS;
7052 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo3 *r)
7054 if (ndr_flags & NDR_SCALARS) {
7055 NDR_CHECK(ndr_pull_align(ndr, 4));
7056 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sec_desc_ptr));
7058 if (ndr_flags & NDR_BUFFERS) {
7060 return NDR_ERR_SUCCESS;
7063 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo3 *r)
7065 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo3");
7066 ndr->depth++;
7067 ndr_print_uint32(ndr, "sec_desc_ptr", r->sec_desc_ptr);
7068 ndr->depth--;
7071 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo4 *r)
7073 if (ndr_flags & NDR_SCALARS) {
7074 NDR_CHECK(ndr_push_align(ndr, 4));
7075 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
7076 NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername));
7077 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
7079 if (ndr_flags & NDR_BUFFERS) {
7080 if (r->printername) {
7081 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
7082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
7084 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7086 if (r->servername) {
7087 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
7088 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7089 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
7090 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servername, ndr_charset_length(r->servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7093 return NDR_ERR_SUCCESS;
7096 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo4 *r)
7098 uint32_t _ptr_printername;
7099 TALLOC_CTX *_mem_save_printername_0;
7100 uint32_t _ptr_servername;
7101 TALLOC_CTX *_mem_save_servername_0;
7102 if (ndr_flags & NDR_SCALARS) {
7103 NDR_CHECK(ndr_pull_align(ndr, 4));
7104 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
7105 if (_ptr_printername) {
7106 NDR_PULL_ALLOC(ndr, r->printername);
7107 } else {
7108 r->printername = NULL;
7110 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
7111 if (_ptr_servername) {
7112 NDR_PULL_ALLOC(ndr, r->servername);
7113 } else {
7114 r->servername = NULL;
7116 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
7118 if (ndr_flags & NDR_BUFFERS) {
7119 if (r->printername) {
7120 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
7121 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
7122 NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
7123 NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
7124 if (ndr_get_array_length(ndr, &r->printername) > ndr_get_array_size(ndr, &r->printername)) {
7125 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->printername), ndr_get_array_length(ndr, &r->printername));
7127 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->printername), sizeof(uint16_t)));
7128 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, ndr_get_array_length(ndr, &r->printername), sizeof(uint16_t), CH_UTF16));
7129 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
7131 if (r->servername) {
7132 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
7133 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
7134 NDR_CHECK(ndr_pull_array_size(ndr, &r->servername));
7135 NDR_CHECK(ndr_pull_array_length(ndr, &r->servername));
7136 if (ndr_get_array_length(ndr, &r->servername) > ndr_get_array_size(ndr, &r->servername)) {
7137 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->servername), ndr_get_array_length(ndr, &r->servername));
7139 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->servername), sizeof(uint16_t)));
7140 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servername, ndr_get_array_length(ndr, &r->servername), sizeof(uint16_t), CH_UTF16));
7141 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
7144 return NDR_ERR_SUCCESS;
7147 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo4 *r)
7149 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo4");
7150 ndr->depth++;
7151 ndr_print_ptr(ndr, "printername", r->printername);
7152 ndr->depth++;
7153 if (r->printername) {
7154 ndr_print_string(ndr, "printername", r->printername);
7156 ndr->depth--;
7157 ndr_print_ptr(ndr, "servername", r->servername);
7158 ndr->depth++;
7159 if (r->servername) {
7160 ndr_print_string(ndr, "servername", r->servername);
7162 ndr->depth--;
7163 ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
7164 ndr->depth--;
7167 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo5(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo5 *r)
7169 if (ndr_flags & NDR_SCALARS) {
7170 NDR_CHECK(ndr_push_align(ndr, 4));
7171 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
7172 NDR_CHECK(ndr_push_unique_ptr(ndr, r->portname));
7173 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
7174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device_not_selected_timeout));
7175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->transmission_retry_timeout));
7177 if (ndr_flags & NDR_BUFFERS) {
7178 if (r->printername) {
7179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
7180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
7182 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7184 if (r->portname) {
7185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
7186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7187 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
7188 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, ndr_charset_length(r->portname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7191 return NDR_ERR_SUCCESS;
7194 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo5(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo5 *r)
7196 uint32_t _ptr_printername;
7197 TALLOC_CTX *_mem_save_printername_0;
7198 uint32_t _ptr_portname;
7199 TALLOC_CTX *_mem_save_portname_0;
7200 if (ndr_flags & NDR_SCALARS) {
7201 NDR_CHECK(ndr_pull_align(ndr, 4));
7202 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
7203 if (_ptr_printername) {
7204 NDR_PULL_ALLOC(ndr, r->printername);
7205 } else {
7206 r->printername = NULL;
7208 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
7209 if (_ptr_portname) {
7210 NDR_PULL_ALLOC(ndr, r->portname);
7211 } else {
7212 r->portname = NULL;
7214 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
7215 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device_not_selected_timeout));
7216 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->transmission_retry_timeout));
7218 if (ndr_flags & NDR_BUFFERS) {
7219 if (r->printername) {
7220 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
7221 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
7222 NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
7223 NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
7224 if (ndr_get_array_length(ndr, &r->printername) > ndr_get_array_size(ndr, &r->printername)) {
7225 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->printername), ndr_get_array_length(ndr, &r->printername));
7227 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->printername), sizeof(uint16_t)));
7228 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, ndr_get_array_length(ndr, &r->printername), sizeof(uint16_t), CH_UTF16));
7229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
7231 if (r->portname) {
7232 _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
7233 NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
7234 NDR_CHECK(ndr_pull_array_size(ndr, &r->portname));
7235 NDR_CHECK(ndr_pull_array_length(ndr, &r->portname));
7236 if (ndr_get_array_length(ndr, &r->portname) > ndr_get_array_size(ndr, &r->portname)) {
7237 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->portname), ndr_get_array_length(ndr, &r->portname));
7239 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->portname), sizeof(uint16_t)));
7240 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->portname, ndr_get_array_length(ndr, &r->portname), sizeof(uint16_t), CH_UTF16));
7241 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
7244 return NDR_ERR_SUCCESS;
7247 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo5(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo5 *r)
7249 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo5");
7250 ndr->depth++;
7251 ndr_print_ptr(ndr, "printername", r->printername);
7252 ndr->depth++;
7253 if (r->printername) {
7254 ndr_print_string(ndr, "printername", r->printername);
7256 ndr->depth--;
7257 ndr_print_ptr(ndr, "portname", r->portname);
7258 ndr->depth++;
7259 if (r->portname) {
7260 ndr_print_string(ndr, "portname", r->portname);
7262 ndr->depth--;
7263 ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
7264 ndr_print_uint32(ndr, "device_not_selected_timeout", r->device_not_selected_timeout);
7265 ndr_print_uint32(ndr, "transmission_retry_timeout", r->transmission_retry_timeout);
7266 ndr->depth--;
7269 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo6(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo6 *r)
7271 if (ndr_flags & NDR_SCALARS) {
7272 NDR_CHECK(ndr_push_align(ndr, 4));
7273 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
7275 if (ndr_flags & NDR_BUFFERS) {
7277 return NDR_ERR_SUCCESS;
7280 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo6(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo6 *r)
7282 if (ndr_flags & NDR_SCALARS) {
7283 NDR_CHECK(ndr_pull_align(ndr, 4));
7284 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
7286 if (ndr_flags & NDR_BUFFERS) {
7288 return NDR_ERR_SUCCESS;
7291 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo6 *r)
7293 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo6");
7294 ndr->depth++;
7295 ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
7296 ndr->depth--;
7299 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo7(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo7 *r)
7301 if (ndr_flags & NDR_SCALARS) {
7302 NDR_CHECK(ndr_push_align(ndr, 4));
7303 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guid));
7304 NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr, NDR_SCALARS, r->action));
7306 if (ndr_flags & NDR_BUFFERS) {
7307 if (r->guid) {
7308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guid, CH_UTF16)));
7309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guid, CH_UTF16)));
7311 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guid, ndr_charset_length(r->guid, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7314 return NDR_ERR_SUCCESS;
7317 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo7(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo7 *r)
7319 uint32_t _ptr_guid;
7320 TALLOC_CTX *_mem_save_guid_0;
7321 if (ndr_flags & NDR_SCALARS) {
7322 NDR_CHECK(ndr_pull_align(ndr, 4));
7323 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guid));
7324 if (_ptr_guid) {
7325 NDR_PULL_ALLOC(ndr, r->guid);
7326 } else {
7327 r->guid = NULL;
7329 NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr, NDR_SCALARS, &r->action));
7331 if (ndr_flags & NDR_BUFFERS) {
7332 if (r->guid) {
7333 _mem_save_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
7334 NDR_PULL_SET_MEM_CTX(ndr, r->guid, 0);
7335 NDR_CHECK(ndr_pull_array_size(ndr, &r->guid));
7336 NDR_CHECK(ndr_pull_array_length(ndr, &r->guid));
7337 if (ndr_get_array_length(ndr, &r->guid) > ndr_get_array_size(ndr, &r->guid)) {
7338 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->guid), ndr_get_array_length(ndr, &r->guid));
7340 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guid), sizeof(uint16_t)));
7341 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guid, ndr_get_array_length(ndr, &r->guid), sizeof(uint16_t), CH_UTF16));
7342 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guid_0, 0);
7345 return NDR_ERR_SUCCESS;
7348 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo7(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo7 *r)
7350 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo7");
7351 ndr->depth++;
7352 ndr_print_ptr(ndr, "guid", r->guid);
7353 ndr->depth++;
7354 if (r->guid) {
7355 ndr_print_string(ndr, "guid", r->guid);
7357 ndr->depth--;
7358 ndr_print_spoolss_DsPrintAction(ndr, "action", r->action);
7359 ndr->depth--;
7362 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_SetPrinterInfo *r)
7364 if (ndr_flags & NDR_SCALARS) {
7365 int level = ndr_push_get_switch_value(ndr, r);
7366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
7367 switch (level) {
7368 case 0: {
7369 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
7370 break; }
7372 case 1: {
7373 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
7374 break; }
7376 case 2: {
7377 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
7378 break; }
7380 case 3: {
7381 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
7382 break; }
7384 case 4: {
7385 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
7386 break; }
7388 case 5: {
7389 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
7390 break; }
7392 case 6: {
7393 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
7394 break; }
7396 case 7: {
7397 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
7398 break; }
7400 case 8: {
7401 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info8));
7402 break; }
7404 case 9: {
7405 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info9));
7406 break; }
7408 default: {
7409 break; }
7413 if (ndr_flags & NDR_BUFFERS) {
7414 int level = ndr_push_get_switch_value(ndr, r);
7415 switch (level) {
7416 case 0:
7417 if (r->info0) {
7418 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
7420 break;
7422 case 1:
7423 if (r->info1) {
7424 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
7426 break;
7428 case 2:
7429 if (r->info2) {
7430 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
7432 break;
7434 case 3:
7435 if (r->info3) {
7436 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo3(ndr, NDR_SCALARS, r->info3));
7438 break;
7440 case 4:
7441 if (r->info4) {
7442 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
7444 break;
7446 case 5:
7447 if (r->info5) {
7448 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
7450 break;
7452 case 6:
7453 if (r->info6) {
7454 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo6(ndr, NDR_SCALARS, r->info6));
7456 break;
7458 case 7:
7459 if (r->info7) {
7460 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
7462 break;
7464 case 8:
7465 if (r->info8) {
7466 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info8));
7468 break;
7470 case 9:
7471 if (r->info9) {
7472 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info9));
7474 break;
7476 default:
7477 break;
7481 return NDR_ERR_SUCCESS;
7484 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_SetPrinterInfo *r)
7486 int level;
7487 uint32_t _level;
7488 TALLOC_CTX *_mem_save_info0_0;
7489 TALLOC_CTX *_mem_save_info1_0;
7490 TALLOC_CTX *_mem_save_info2_0;
7491 TALLOC_CTX *_mem_save_info3_0;
7492 TALLOC_CTX *_mem_save_info4_0;
7493 TALLOC_CTX *_mem_save_info5_0;
7494 TALLOC_CTX *_mem_save_info6_0;
7495 TALLOC_CTX *_mem_save_info7_0;
7496 TALLOC_CTX *_mem_save_info8_0;
7497 TALLOC_CTX *_mem_save_info9_0;
7498 level = ndr_pull_get_switch_value(ndr, r);
7499 if (ndr_flags & NDR_SCALARS) {
7500 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
7501 if (_level != level) {
7502 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
7504 switch (level) {
7505 case 0: {
7506 uint32_t _ptr_info0;
7507 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
7508 if (_ptr_info0) {
7509 NDR_PULL_ALLOC(ndr, r->info0);
7510 } else {
7511 r->info0 = NULL;
7513 break; }
7515 case 1: {
7516 uint32_t _ptr_info1;
7517 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
7518 if (_ptr_info1) {
7519 NDR_PULL_ALLOC(ndr, r->info1);
7520 } else {
7521 r->info1 = NULL;
7523 break; }
7525 case 2: {
7526 uint32_t _ptr_info2;
7527 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
7528 if (_ptr_info2) {
7529 NDR_PULL_ALLOC(ndr, r->info2);
7530 } else {
7531 r->info2 = NULL;
7533 break; }
7535 case 3: {
7536 uint32_t _ptr_info3;
7537 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
7538 if (_ptr_info3) {
7539 NDR_PULL_ALLOC(ndr, r->info3);
7540 } else {
7541 r->info3 = NULL;
7543 break; }
7545 case 4: {
7546 uint32_t _ptr_info4;
7547 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
7548 if (_ptr_info4) {
7549 NDR_PULL_ALLOC(ndr, r->info4);
7550 } else {
7551 r->info4 = NULL;
7553 break; }
7555 case 5: {
7556 uint32_t _ptr_info5;
7557 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
7558 if (_ptr_info5) {
7559 NDR_PULL_ALLOC(ndr, r->info5);
7560 } else {
7561 r->info5 = NULL;
7563 break; }
7565 case 6: {
7566 uint32_t _ptr_info6;
7567 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
7568 if (_ptr_info6) {
7569 NDR_PULL_ALLOC(ndr, r->info6);
7570 } else {
7571 r->info6 = NULL;
7573 break; }
7575 case 7: {
7576 uint32_t _ptr_info7;
7577 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
7578 if (_ptr_info7) {
7579 NDR_PULL_ALLOC(ndr, r->info7);
7580 } else {
7581 r->info7 = NULL;
7583 break; }
7585 case 8: {
7586 uint32_t _ptr_info8;
7587 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info8));
7588 if (_ptr_info8) {
7589 NDR_PULL_ALLOC(ndr, r->info8);
7590 } else {
7591 r->info8 = NULL;
7593 break; }
7595 case 9: {
7596 uint32_t _ptr_info9;
7597 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info9));
7598 if (_ptr_info9) {
7599 NDR_PULL_ALLOC(ndr, r->info9);
7600 } else {
7601 r->info9 = NULL;
7603 break; }
7605 default: {
7606 break; }
7610 if (ndr_flags & NDR_BUFFERS) {
7611 switch (level) {
7612 case 0:
7613 if (r->info0) {
7614 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
7615 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
7616 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
7617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
7619 break;
7621 case 1:
7622 if (r->info1) {
7623 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
7624 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
7625 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
7626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
7628 break;
7630 case 2:
7631 if (r->info2) {
7632 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
7633 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
7634 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
7635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
7637 break;
7639 case 3:
7640 if (r->info3) {
7641 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
7642 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
7643 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo3(ndr, NDR_SCALARS, r->info3));
7644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
7646 break;
7648 case 4:
7649 if (r->info4) {
7650 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
7651 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
7652 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
7653 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
7655 break;
7657 case 5:
7658 if (r->info5) {
7659 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
7660 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
7661 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
7662 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
7664 break;
7666 case 6:
7667 if (r->info6) {
7668 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
7669 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
7670 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo6(ndr, NDR_SCALARS, r->info6));
7671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
7673 break;
7675 case 7:
7676 if (r->info7) {
7677 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
7678 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
7679 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
7680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
7682 break;
7684 case 8:
7685 if (r->info8) {
7686 _mem_save_info8_0 = NDR_PULL_GET_MEM_CTX(ndr);
7687 NDR_PULL_SET_MEM_CTX(ndr, r->info8, 0);
7688 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info8));
7689 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info8_0, 0);
7691 break;
7693 case 9:
7694 if (r->info9) {
7695 _mem_save_info9_0 = NDR_PULL_GET_MEM_CTX(ndr);
7696 NDR_PULL_SET_MEM_CTX(ndr, r->info9, 0);
7697 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info9));
7698 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info9_0, 0);
7700 break;
7702 default:
7703 break;
7707 return NDR_ERR_SUCCESS;
7710 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_SetPrinterInfo *r)
7712 int level;
7713 level = ndr_print_get_switch_value(ndr, r);
7714 ndr_print_union(ndr, name, level, "spoolss_SetPrinterInfo");
7715 switch (level) {
7716 case 0:
7717 ndr_print_ptr(ndr, "info0", r->info0);
7718 ndr->depth++;
7719 if (r->info0) {
7720 ndr_print_spoolss_SetPrinterInfo0(ndr, "info0", r->info0);
7722 ndr->depth--;
7723 break;
7725 case 1:
7726 ndr_print_ptr(ndr, "info1", r->info1);
7727 ndr->depth++;
7728 if (r->info1) {
7729 ndr_print_spoolss_SetPrinterInfo1(ndr, "info1", r->info1);
7731 ndr->depth--;
7732 break;
7734 case 2:
7735 ndr_print_ptr(ndr, "info2", r->info2);
7736 ndr->depth++;
7737 if (r->info2) {
7738 ndr_print_spoolss_SetPrinterInfo2(ndr, "info2", r->info2);
7740 ndr->depth--;
7741 break;
7743 case 3:
7744 ndr_print_ptr(ndr, "info3", r->info3);
7745 ndr->depth++;
7746 if (r->info3) {
7747 ndr_print_spoolss_SetPrinterInfo3(ndr, "info3", r->info3);
7749 ndr->depth--;
7750 break;
7752 case 4:
7753 ndr_print_ptr(ndr, "info4", r->info4);
7754 ndr->depth++;
7755 if (r->info4) {
7756 ndr_print_spoolss_SetPrinterInfo4(ndr, "info4", r->info4);
7758 ndr->depth--;
7759 break;
7761 case 5:
7762 ndr_print_ptr(ndr, "info5", r->info5);
7763 ndr->depth++;
7764 if (r->info5) {
7765 ndr_print_spoolss_SetPrinterInfo5(ndr, "info5", r->info5);
7767 ndr->depth--;
7768 break;
7770 case 6:
7771 ndr_print_ptr(ndr, "info6", r->info6);
7772 ndr->depth++;
7773 if (r->info6) {
7774 ndr_print_spoolss_SetPrinterInfo6(ndr, "info6", r->info6);
7776 ndr->depth--;
7777 break;
7779 case 7:
7780 ndr_print_ptr(ndr, "info7", r->info7);
7781 ndr->depth++;
7782 if (r->info7) {
7783 ndr_print_spoolss_SetPrinterInfo7(ndr, "info7", r->info7);
7785 ndr->depth--;
7786 break;
7788 case 8:
7789 ndr_print_ptr(ndr, "info8", r->info8);
7790 ndr->depth++;
7791 if (r->info8) {
7792 ndr_print_spoolss_DeviceModeInfo(ndr, "info8", r->info8);
7794 ndr->depth--;
7795 break;
7797 case 9:
7798 ndr_print_ptr(ndr, "info9", r->info9);
7799 ndr->depth++;
7800 if (r->info9) {
7801 ndr_print_spoolss_DeviceModeInfo(ndr, "info9", r->info9);
7803 ndr->depth--;
7804 break;
7806 default:
7807 break;
7812 static enum ndr_err_code ndr_push_spoolss_SetPrinterInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfoCtr *r)
7814 if (ndr_flags & NDR_SCALARS) {
7815 NDR_CHECK(ndr_push_align(ndr, 4));
7816 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
7817 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
7818 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr, NDR_SCALARS, &r->info));
7820 if (ndr_flags & NDR_BUFFERS) {
7821 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr, NDR_BUFFERS, &r->info));
7823 return NDR_ERR_SUCCESS;
7826 static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfoCtr *r)
7828 if (ndr_flags & NDR_SCALARS) {
7829 NDR_CHECK(ndr_pull_align(ndr, 4));
7830 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
7831 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
7832 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr, NDR_SCALARS, &r->info));
7834 if (ndr_flags & NDR_BUFFERS) {
7835 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr, NDR_BUFFERS, &r->info));
7837 return NDR_ERR_SUCCESS;
7840 _PUBLIC_ void ndr_print_spoolss_SetPrinterInfoCtr(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfoCtr *r)
7842 ndr_print_struct(ndr, name, "spoolss_SetPrinterInfoCtr");
7843 ndr->depth++;
7844 ndr_print_uint32(ndr, "level", r->level);
7845 ndr_print_set_switch_value(ndr, &r->info, r->level);
7846 ndr_print_spoolss_SetPrinterInfo(ndr, "info", &r->info);
7847 ndr->depth--;
7850 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_StringArray(struct ndr_push *ndr, int ndr_flags, const struct spoolss_StringArray *r)
7852 if (ndr_flags & NDR_SCALARS) {
7853 NDR_CHECK(ndr_push_align(ndr, 4));
7854 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (ndr_size_spoolss_StringArray(r, ndr->iconv_convenience, ndr->flags) - 4) / 2));
7856 uint32_t _flags_save_string_array = ndr->flags;
7857 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
7858 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->string));
7859 ndr->flags = _flags_save_string_array;
7862 if (ndr_flags & NDR_BUFFERS) {
7864 return NDR_ERR_SUCCESS;
7867 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_StringArray(struct ndr_pull *ndr, int ndr_flags, struct spoolss_StringArray *r)
7869 if (ndr_flags & NDR_SCALARS) {
7870 NDR_CHECK(ndr_pull_align(ndr, 4));
7871 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
7873 uint32_t _flags_save_string_array = ndr->flags;
7874 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
7875 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->string));
7876 ndr->flags = _flags_save_string_array;
7879 if (ndr_flags & NDR_BUFFERS) {
7881 return NDR_ERR_SUCCESS;
7884 _PUBLIC_ void ndr_print_spoolss_StringArray(struct ndr_print *ndr, const char *name, const struct spoolss_StringArray *r)
7886 ndr_print_struct(ndr, name, "spoolss_StringArray");
7887 ndr->depth++;
7888 ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?(ndr_size_spoolss_StringArray(r, ndr->iconv_convenience, ndr->flags) - 4) / 2:r->_ndr_size);
7889 ndr_print_string_array(ndr, "string", r->string);
7890 ndr->depth--;
7893 static enum ndr_err_code ndr_push_spoolss_AddDriverInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddDriverInfo1 *r)
7895 if (ndr_flags & NDR_SCALARS) {
7896 NDR_CHECK(ndr_push_align(ndr, 4));
7897 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
7899 if (ndr_flags & NDR_BUFFERS) {
7900 if (r->driver_name) {
7901 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
7902 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7903 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
7904 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7907 return NDR_ERR_SUCCESS;
7910 static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddDriverInfo1 *r)
7912 uint32_t _ptr_driver_name;
7913 TALLOC_CTX *_mem_save_driver_name_0;
7914 if (ndr_flags & NDR_SCALARS) {
7915 NDR_CHECK(ndr_pull_align(ndr, 4));
7916 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
7917 if (_ptr_driver_name) {
7918 NDR_PULL_ALLOC(ndr, r->driver_name);
7919 } else {
7920 r->driver_name = NULL;
7923 if (ndr_flags & NDR_BUFFERS) {
7924 if (r->driver_name) {
7925 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7926 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
7927 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
7928 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
7929 if (ndr_get_array_length(ndr, &r->driver_name) > ndr_get_array_size(ndr, &r->driver_name)) {
7930 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_name), ndr_get_array_length(ndr, &r->driver_name));
7932 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t)));
7933 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t), CH_UTF16));
7934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
7937 return NDR_ERR_SUCCESS;
7940 _PUBLIC_ void ndr_print_spoolss_AddDriverInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo1 *r)
7942 ndr_print_struct(ndr, name, "spoolss_AddDriverInfo1");
7943 ndr->depth++;
7944 ndr_print_ptr(ndr, "driver_name", r->driver_name);
7945 ndr->depth++;
7946 if (r->driver_name) {
7947 ndr_print_string(ndr, "driver_name", r->driver_name);
7949 ndr->depth--;
7950 ndr->depth--;
7953 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverOSVersion(struct ndr_push *ndr, int ndr_flags, enum spoolss_DriverOSVersion r)
7955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
7956 return NDR_ERR_SUCCESS;
7959 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverOSVersion(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DriverOSVersion *r)
7961 uint32_t v;
7962 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
7963 *r = v;
7964 return NDR_ERR_SUCCESS;
7967 _PUBLIC_ void ndr_print_spoolss_DriverOSVersion(struct ndr_print *ndr, const char *name, enum spoolss_DriverOSVersion r)
7969 const char *val = NULL;
7971 switch (r) {
7972 case SPOOLSS_DRIVER_VERSION_9X: val = "SPOOLSS_DRIVER_VERSION_9X"; break;
7973 case SPOOLSS_DRIVER_VERSION_NT35: val = "SPOOLSS_DRIVER_VERSION_NT35"; break;
7974 case SPOOLSS_DRIVER_VERSION_NT4: val = "SPOOLSS_DRIVER_VERSION_NT4"; break;
7975 case SPOOLSS_DRIVER_VERSION_200X: val = "SPOOLSS_DRIVER_VERSION_200X"; break;
7977 ndr_print_enum(ndr, name, "ENUM", val, r);
7980 static enum ndr_err_code ndr_push_spoolss_AddDriverInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddDriverInfo2 *r)
7982 if (ndr_flags & NDR_SCALARS) {
7983 NDR_CHECK(ndr_push_align(ndr, 4));
7984 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
7985 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
7986 NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
7987 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
7988 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
7989 NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
7991 if (ndr_flags & NDR_BUFFERS) {
7992 if (r->driver_name) {
7993 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
7994 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7995 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
7996 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7998 if (r->architecture) {
7999 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
8000 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8001 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
8002 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8004 if (r->driver_path) {
8005 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
8006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8007 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
8008 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8010 if (r->data_file) {
8011 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
8012 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8013 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
8014 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8016 if (r->config_file) {
8017 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
8018 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8019 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
8020 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8023 return NDR_ERR_SUCCESS;
8026 static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddDriverInfo2 *r)
8028 uint32_t _ptr_driver_name;
8029 TALLOC_CTX *_mem_save_driver_name_0;
8030 uint32_t _ptr_architecture;
8031 TALLOC_CTX *_mem_save_architecture_0;
8032 uint32_t _ptr_driver_path;
8033 TALLOC_CTX *_mem_save_driver_path_0;
8034 uint32_t _ptr_data_file;
8035 TALLOC_CTX *_mem_save_data_file_0;
8036 uint32_t _ptr_config_file;
8037 TALLOC_CTX *_mem_save_config_file_0;
8038 if (ndr_flags & NDR_SCALARS) {
8039 NDR_CHECK(ndr_pull_align(ndr, 4));
8040 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
8041 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
8042 if (_ptr_driver_name) {
8043 NDR_PULL_ALLOC(ndr, r->driver_name);
8044 } else {
8045 r->driver_name = NULL;
8047 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
8048 if (_ptr_architecture) {
8049 NDR_PULL_ALLOC(ndr, r->architecture);
8050 } else {
8051 r->architecture = NULL;
8053 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
8054 if (_ptr_driver_path) {
8055 NDR_PULL_ALLOC(ndr, r->driver_path);
8056 } else {
8057 r->driver_path = NULL;
8059 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
8060 if (_ptr_data_file) {
8061 NDR_PULL_ALLOC(ndr, r->data_file);
8062 } else {
8063 r->data_file = NULL;
8065 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
8066 if (_ptr_config_file) {
8067 NDR_PULL_ALLOC(ndr, r->config_file);
8068 } else {
8069 r->config_file = NULL;
8072 if (ndr_flags & NDR_BUFFERS) {
8073 if (r->driver_name) {
8074 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8075 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
8076 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
8077 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
8078 if (ndr_get_array_length(ndr, &r->driver_name) > ndr_get_array_size(ndr, &r->driver_name)) {
8079 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_name), ndr_get_array_length(ndr, &r->driver_name));
8081 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t)));
8082 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t), CH_UTF16));
8083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
8085 if (r->architecture) {
8086 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
8087 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
8088 NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
8089 NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
8090 if (ndr_get_array_length(ndr, &r->architecture) > ndr_get_array_size(ndr, &r->architecture)) {
8091 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->architecture), ndr_get_array_length(ndr, &r->architecture));
8093 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t)));
8094 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t), CH_UTF16));
8095 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
8097 if (r->driver_path) {
8098 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
8099 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
8100 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
8101 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
8102 if (ndr_get_array_length(ndr, &r->driver_path) > ndr_get_array_size(ndr, &r->driver_path)) {
8103 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_path), ndr_get_array_length(ndr, &r->driver_path));
8105 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t)));
8106 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t), CH_UTF16));
8107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
8109 if (r->data_file) {
8110 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
8111 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
8112 NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
8113 NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
8114 if (ndr_get_array_length(ndr, &r->data_file) > ndr_get_array_size(ndr, &r->data_file)) {
8115 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data_file), ndr_get_array_length(ndr, &r->data_file));
8117 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t)));
8118 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t), CH_UTF16));
8119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
8121 if (r->config_file) {
8122 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
8123 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
8124 NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
8125 NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
8126 if (ndr_get_array_length(ndr, &r->config_file) > ndr_get_array_size(ndr, &r->config_file)) {
8127 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->config_file), ndr_get_array_length(ndr, &r->config_file));
8129 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t)));
8130 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t), CH_UTF16));
8131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
8134 return NDR_ERR_SUCCESS;
8137 _PUBLIC_ void ndr_print_spoolss_AddDriverInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo2 *r)
8139 ndr_print_struct(ndr, name, "spoolss_AddDriverInfo2");
8140 ndr->depth++;
8141 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
8142 ndr_print_ptr(ndr, "driver_name", r->driver_name);
8143 ndr->depth++;
8144 if (r->driver_name) {
8145 ndr_print_string(ndr, "driver_name", r->driver_name);
8147 ndr->depth--;
8148 ndr_print_ptr(ndr, "architecture", r->architecture);
8149 ndr->depth++;
8150 if (r->architecture) {
8151 ndr_print_string(ndr, "architecture", r->architecture);
8153 ndr->depth--;
8154 ndr_print_ptr(ndr, "driver_path", r->driver_path);
8155 ndr->depth++;
8156 if (r->driver_path) {
8157 ndr_print_string(ndr, "driver_path", r->driver_path);
8159 ndr->depth--;
8160 ndr_print_ptr(ndr, "data_file", r->data_file);
8161 ndr->depth++;
8162 if (r->data_file) {
8163 ndr_print_string(ndr, "data_file", r->data_file);
8165 ndr->depth--;
8166 ndr_print_ptr(ndr, "config_file", r->config_file);
8167 ndr->depth++;
8168 if (r->config_file) {
8169 ndr_print_string(ndr, "config_file", r->config_file);
8171 ndr->depth--;
8172 ndr->depth--;
8175 static enum ndr_err_code ndr_push_spoolss_AddDriverInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddDriverInfo3 *r)
8177 if (ndr_flags & NDR_SCALARS) {
8178 NDR_CHECK(ndr_push_align(ndr, 4));
8179 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
8180 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
8181 NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
8182 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
8183 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
8184 NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
8185 NDR_CHECK(ndr_push_unique_ptr(ndr, r->help_file));
8186 NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
8187 NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype));
8188 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
8189 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files));
8191 if (ndr_flags & NDR_BUFFERS) {
8192 if (r->driver_name) {
8193 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
8194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8195 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
8196 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8198 if (r->architecture) {
8199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
8200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8201 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
8202 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8204 if (r->driver_path) {
8205 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
8206 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8207 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
8208 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8210 if (r->data_file) {
8211 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
8212 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8213 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
8214 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8216 if (r->config_file) {
8217 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
8218 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8219 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
8220 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8222 if (r->help_file) {
8223 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
8224 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8225 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
8226 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->help_file, ndr_charset_length(r->help_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8228 if (r->monitor_name) {
8229 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
8230 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8231 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
8232 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8234 if (r->default_datatype) {
8235 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
8236 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
8238 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->default_datatype, ndr_charset_length(r->default_datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8240 if (r->dependent_files) {
8241 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
8244 return NDR_ERR_SUCCESS;
8247 static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddDriverInfo3 *r)
8249 uint32_t _ptr_driver_name;
8250 TALLOC_CTX *_mem_save_driver_name_0;
8251 uint32_t _ptr_architecture;
8252 TALLOC_CTX *_mem_save_architecture_0;
8253 uint32_t _ptr_driver_path;
8254 TALLOC_CTX *_mem_save_driver_path_0;
8255 uint32_t _ptr_data_file;
8256 TALLOC_CTX *_mem_save_data_file_0;
8257 uint32_t _ptr_config_file;
8258 TALLOC_CTX *_mem_save_config_file_0;
8259 uint32_t _ptr_help_file;
8260 TALLOC_CTX *_mem_save_help_file_0;
8261 uint32_t _ptr_monitor_name;
8262 TALLOC_CTX *_mem_save_monitor_name_0;
8263 uint32_t _ptr_default_datatype;
8264 TALLOC_CTX *_mem_save_default_datatype_0;
8265 uint32_t _ptr_dependent_files;
8266 TALLOC_CTX *_mem_save_dependent_files_0;
8267 if (ndr_flags & NDR_SCALARS) {
8268 NDR_CHECK(ndr_pull_align(ndr, 4));
8269 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
8270 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
8271 if (_ptr_driver_name) {
8272 NDR_PULL_ALLOC(ndr, r->driver_name);
8273 } else {
8274 r->driver_name = NULL;
8276 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
8277 if (_ptr_architecture) {
8278 NDR_PULL_ALLOC(ndr, r->architecture);
8279 } else {
8280 r->architecture = NULL;
8282 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
8283 if (_ptr_driver_path) {
8284 NDR_PULL_ALLOC(ndr, r->driver_path);
8285 } else {
8286 r->driver_path = NULL;
8288 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
8289 if (_ptr_data_file) {
8290 NDR_PULL_ALLOC(ndr, r->data_file);
8291 } else {
8292 r->data_file = NULL;
8294 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
8295 if (_ptr_config_file) {
8296 NDR_PULL_ALLOC(ndr, r->config_file);
8297 } else {
8298 r->config_file = NULL;
8300 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
8301 if (_ptr_help_file) {
8302 NDR_PULL_ALLOC(ndr, r->help_file);
8303 } else {
8304 r->help_file = NULL;
8306 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
8307 if (_ptr_monitor_name) {
8308 NDR_PULL_ALLOC(ndr, r->monitor_name);
8309 } else {
8310 r->monitor_name = NULL;
8312 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
8313 if (_ptr_default_datatype) {
8314 NDR_PULL_ALLOC(ndr, r->default_datatype);
8315 } else {
8316 r->default_datatype = NULL;
8318 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_dependent_files));
8319 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
8320 if (_ptr_dependent_files) {
8321 NDR_PULL_ALLOC(ndr, r->dependent_files);
8322 } else {
8323 r->dependent_files = NULL;
8326 if (ndr_flags & NDR_BUFFERS) {
8327 if (r->driver_name) {
8328 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8329 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
8330 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
8331 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
8332 if (ndr_get_array_length(ndr, &r->driver_name) > ndr_get_array_size(ndr, &r->driver_name)) {
8333 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_name), ndr_get_array_length(ndr, &r->driver_name));
8335 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t)));
8336 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t), CH_UTF16));
8337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
8339 if (r->architecture) {
8340 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
8341 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
8342 NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
8343 NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
8344 if (ndr_get_array_length(ndr, &r->architecture) > ndr_get_array_size(ndr, &r->architecture)) {
8345 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->architecture), ndr_get_array_length(ndr, &r->architecture));
8347 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t)));
8348 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t), CH_UTF16));
8349 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
8351 if (r->driver_path) {
8352 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
8353 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
8354 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
8355 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
8356 if (ndr_get_array_length(ndr, &r->driver_path) > ndr_get_array_size(ndr, &r->driver_path)) {
8357 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_path), ndr_get_array_length(ndr, &r->driver_path));
8359 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t)));
8360 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t), CH_UTF16));
8361 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
8363 if (r->data_file) {
8364 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
8365 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
8366 NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
8367 NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
8368 if (ndr_get_array_length(ndr, &r->data_file) > ndr_get_array_size(ndr, &r->data_file)) {
8369 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data_file), ndr_get_array_length(ndr, &r->data_file));
8371 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t)));
8372 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t), CH_UTF16));
8373 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
8375 if (r->config_file) {
8376 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
8377 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
8378 NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
8379 NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
8380 if (ndr_get_array_length(ndr, &r->config_file) > ndr_get_array_size(ndr, &r->config_file)) {
8381 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->config_file), ndr_get_array_length(ndr, &r->config_file));
8383 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t)));
8384 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t), CH_UTF16));
8385 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
8387 if (r->help_file) {
8388 _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
8389 NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
8390 NDR_CHECK(ndr_pull_array_size(ndr, &r->help_file));
8391 NDR_CHECK(ndr_pull_array_length(ndr, &r->help_file));
8392 if (ndr_get_array_length(ndr, &r->help_file) > ndr_get_array_size(ndr, &r->help_file)) {
8393 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->help_file), ndr_get_array_length(ndr, &r->help_file));
8395 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->help_file), sizeof(uint16_t)));
8396 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->help_file, ndr_get_array_length(ndr, &r->help_file), sizeof(uint16_t), CH_UTF16));
8397 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
8399 if (r->monitor_name) {
8400 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8401 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
8402 NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
8403 NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
8404 if (ndr_get_array_length(ndr, &r->monitor_name) > ndr_get_array_size(ndr, &r->monitor_name)) {
8405 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->monitor_name), ndr_get_array_length(ndr, &r->monitor_name));
8407 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->monitor_name), sizeof(uint16_t)));
8408 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, ndr_get_array_length(ndr, &r->monitor_name), sizeof(uint16_t), CH_UTF16));
8409 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
8411 if (r->default_datatype) {
8412 _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
8413 NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
8414 NDR_CHECK(ndr_pull_array_size(ndr, &r->default_datatype));
8415 NDR_CHECK(ndr_pull_array_length(ndr, &r->default_datatype));
8416 if (ndr_get_array_length(ndr, &r->default_datatype) > ndr_get_array_size(ndr, &r->default_datatype)) {
8417 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->default_datatype), ndr_get_array_length(ndr, &r->default_datatype));
8419 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->default_datatype), sizeof(uint16_t)));
8420 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->default_datatype, ndr_get_array_length(ndr, &r->default_datatype), sizeof(uint16_t), CH_UTF16));
8421 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
8423 if (r->dependent_files) {
8424 _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
8425 NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
8426 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
8427 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
8430 return NDR_ERR_SUCCESS;
8433 _PUBLIC_ void ndr_print_spoolss_AddDriverInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo3 *r)
8435 ndr_print_struct(ndr, name, "spoolss_AddDriverInfo3");
8436 ndr->depth++;
8437 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
8438 ndr_print_ptr(ndr, "driver_name", r->driver_name);
8439 ndr->depth++;
8440 if (r->driver_name) {
8441 ndr_print_string(ndr, "driver_name", r->driver_name);
8443 ndr->depth--;
8444 ndr_print_ptr(ndr, "architecture", r->architecture);
8445 ndr->depth++;
8446 if (r->architecture) {
8447 ndr_print_string(ndr, "architecture", r->architecture);
8449 ndr->depth--;
8450 ndr_print_ptr(ndr, "driver_path", r->driver_path);
8451 ndr->depth++;
8452 if (r->driver_path) {
8453 ndr_print_string(ndr, "driver_path", r->driver_path);
8455 ndr->depth--;
8456 ndr_print_ptr(ndr, "data_file", r->data_file);
8457 ndr->depth++;
8458 if (r->data_file) {
8459 ndr_print_string(ndr, "data_file", r->data_file);
8461 ndr->depth--;
8462 ndr_print_ptr(ndr, "config_file", r->config_file);
8463 ndr->depth++;
8464 if (r->config_file) {
8465 ndr_print_string(ndr, "config_file", r->config_file);
8467 ndr->depth--;
8468 ndr_print_ptr(ndr, "help_file", r->help_file);
8469 ndr->depth++;
8470 if (r->help_file) {
8471 ndr_print_string(ndr, "help_file", r->help_file);
8473 ndr->depth--;
8474 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
8475 ndr->depth++;
8476 if (r->monitor_name) {
8477 ndr_print_string(ndr, "monitor_name", r->monitor_name);
8479 ndr->depth--;
8480 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
8481 ndr->depth++;
8482 if (r->default_datatype) {
8483 ndr_print_string(ndr, "default_datatype", r->default_datatype);
8485 ndr->depth--;
8486 ndr_print_uint32(ndr, "_ndr_size_dependent_files", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_dependent_files);
8487 ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
8488 ndr->depth++;
8489 if (r->dependent_files) {
8490 ndr_print_spoolss_StringArray(ndr, "dependent_files", r->dependent_files);
8492 ndr->depth--;
8493 ndr->depth--;
8496 static enum ndr_err_code ndr_push_spoolss_AddDriverInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddDriverInfo4 *r)
8498 if (ndr_flags & NDR_SCALARS) {
8499 NDR_CHECK(ndr_push_align(ndr, 4));
8500 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
8501 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
8502 NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
8503 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
8504 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
8505 NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
8506 NDR_CHECK(ndr_push_unique_ptr(ndr, r->help_file));
8507 NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
8508 NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype));
8509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
8510 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files));
8511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->previous_names, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
8512 NDR_CHECK(ndr_push_unique_ptr(ndr, r->previous_names));
8514 if (ndr_flags & NDR_BUFFERS) {
8515 if (r->driver_name) {
8516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
8517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8518 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
8519 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8521 if (r->architecture) {
8522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
8523 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
8525 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8527 if (r->driver_path) {
8528 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
8529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
8531 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8533 if (r->data_file) {
8534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
8535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
8537 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8539 if (r->config_file) {
8540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
8541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
8543 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8545 if (r->help_file) {
8546 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
8547 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8548 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
8549 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->help_file, ndr_charset_length(r->help_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8551 if (r->monitor_name) {
8552 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
8553 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8554 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
8555 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8557 if (r->default_datatype) {
8558 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
8559 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8560 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
8561 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->default_datatype, ndr_charset_length(r->default_datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8563 if (r->dependent_files) {
8564 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
8566 if (r->previous_names) {
8567 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
8570 return NDR_ERR_SUCCESS;
8573 static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddDriverInfo4 *r)
8575 uint32_t _ptr_driver_name;
8576 TALLOC_CTX *_mem_save_driver_name_0;
8577 uint32_t _ptr_architecture;
8578 TALLOC_CTX *_mem_save_architecture_0;
8579 uint32_t _ptr_driver_path;
8580 TALLOC_CTX *_mem_save_driver_path_0;
8581 uint32_t _ptr_data_file;
8582 TALLOC_CTX *_mem_save_data_file_0;
8583 uint32_t _ptr_config_file;
8584 TALLOC_CTX *_mem_save_config_file_0;
8585 uint32_t _ptr_help_file;
8586 TALLOC_CTX *_mem_save_help_file_0;
8587 uint32_t _ptr_monitor_name;
8588 TALLOC_CTX *_mem_save_monitor_name_0;
8589 uint32_t _ptr_default_datatype;
8590 TALLOC_CTX *_mem_save_default_datatype_0;
8591 uint32_t _ptr_dependent_files;
8592 TALLOC_CTX *_mem_save_dependent_files_0;
8593 uint32_t _ptr_previous_names;
8594 TALLOC_CTX *_mem_save_previous_names_0;
8595 if (ndr_flags & NDR_SCALARS) {
8596 NDR_CHECK(ndr_pull_align(ndr, 4));
8597 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
8598 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
8599 if (_ptr_driver_name) {
8600 NDR_PULL_ALLOC(ndr, r->driver_name);
8601 } else {
8602 r->driver_name = NULL;
8604 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
8605 if (_ptr_architecture) {
8606 NDR_PULL_ALLOC(ndr, r->architecture);
8607 } else {
8608 r->architecture = NULL;
8610 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
8611 if (_ptr_driver_path) {
8612 NDR_PULL_ALLOC(ndr, r->driver_path);
8613 } else {
8614 r->driver_path = NULL;
8616 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
8617 if (_ptr_data_file) {
8618 NDR_PULL_ALLOC(ndr, r->data_file);
8619 } else {
8620 r->data_file = NULL;
8622 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
8623 if (_ptr_config_file) {
8624 NDR_PULL_ALLOC(ndr, r->config_file);
8625 } else {
8626 r->config_file = NULL;
8628 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
8629 if (_ptr_help_file) {
8630 NDR_PULL_ALLOC(ndr, r->help_file);
8631 } else {
8632 r->help_file = NULL;
8634 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
8635 if (_ptr_monitor_name) {
8636 NDR_PULL_ALLOC(ndr, r->monitor_name);
8637 } else {
8638 r->monitor_name = NULL;
8640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
8641 if (_ptr_default_datatype) {
8642 NDR_PULL_ALLOC(ndr, r->default_datatype);
8643 } else {
8644 r->default_datatype = NULL;
8646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_dependent_files));
8647 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
8648 if (_ptr_dependent_files) {
8649 NDR_PULL_ALLOC(ndr, r->dependent_files);
8650 } else {
8651 r->dependent_files = NULL;
8653 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_previous_names));
8654 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
8655 if (_ptr_previous_names) {
8656 NDR_PULL_ALLOC(ndr, r->previous_names);
8657 } else {
8658 r->previous_names = NULL;
8661 if (ndr_flags & NDR_BUFFERS) {
8662 if (r->driver_name) {
8663 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8664 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
8665 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
8666 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
8667 if (ndr_get_array_length(ndr, &r->driver_name) > ndr_get_array_size(ndr, &r->driver_name)) {
8668 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_name), ndr_get_array_length(ndr, &r->driver_name));
8670 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t)));
8671 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t), CH_UTF16));
8672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
8674 if (r->architecture) {
8675 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
8676 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
8677 NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
8678 NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
8679 if (ndr_get_array_length(ndr, &r->architecture) > ndr_get_array_size(ndr, &r->architecture)) {
8680 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->architecture), ndr_get_array_length(ndr, &r->architecture));
8682 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t)));
8683 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t), CH_UTF16));
8684 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
8686 if (r->driver_path) {
8687 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
8688 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
8689 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
8690 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
8691 if (ndr_get_array_length(ndr, &r->driver_path) > ndr_get_array_size(ndr, &r->driver_path)) {
8692 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_path), ndr_get_array_length(ndr, &r->driver_path));
8694 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t)));
8695 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t), CH_UTF16));
8696 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
8698 if (r->data_file) {
8699 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
8700 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
8701 NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
8702 NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
8703 if (ndr_get_array_length(ndr, &r->data_file) > ndr_get_array_size(ndr, &r->data_file)) {
8704 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data_file), ndr_get_array_length(ndr, &r->data_file));
8706 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t)));
8707 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t), CH_UTF16));
8708 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
8710 if (r->config_file) {
8711 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
8712 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
8713 NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
8714 NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
8715 if (ndr_get_array_length(ndr, &r->config_file) > ndr_get_array_size(ndr, &r->config_file)) {
8716 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->config_file), ndr_get_array_length(ndr, &r->config_file));
8718 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t)));
8719 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t), CH_UTF16));
8720 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
8722 if (r->help_file) {
8723 _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
8724 NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
8725 NDR_CHECK(ndr_pull_array_size(ndr, &r->help_file));
8726 NDR_CHECK(ndr_pull_array_length(ndr, &r->help_file));
8727 if (ndr_get_array_length(ndr, &r->help_file) > ndr_get_array_size(ndr, &r->help_file)) {
8728 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->help_file), ndr_get_array_length(ndr, &r->help_file));
8730 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->help_file), sizeof(uint16_t)));
8731 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->help_file, ndr_get_array_length(ndr, &r->help_file), sizeof(uint16_t), CH_UTF16));
8732 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
8734 if (r->monitor_name) {
8735 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8736 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
8737 NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
8738 NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
8739 if (ndr_get_array_length(ndr, &r->monitor_name) > ndr_get_array_size(ndr, &r->monitor_name)) {
8740 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->monitor_name), ndr_get_array_length(ndr, &r->monitor_name));
8742 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->monitor_name), sizeof(uint16_t)));
8743 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, ndr_get_array_length(ndr, &r->monitor_name), sizeof(uint16_t), CH_UTF16));
8744 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
8746 if (r->default_datatype) {
8747 _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
8748 NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
8749 NDR_CHECK(ndr_pull_array_size(ndr, &r->default_datatype));
8750 NDR_CHECK(ndr_pull_array_length(ndr, &r->default_datatype));
8751 if (ndr_get_array_length(ndr, &r->default_datatype) > ndr_get_array_size(ndr, &r->default_datatype)) {
8752 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->default_datatype), ndr_get_array_length(ndr, &r->default_datatype));
8754 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->default_datatype), sizeof(uint16_t)));
8755 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->default_datatype, ndr_get_array_length(ndr, &r->default_datatype), sizeof(uint16_t), CH_UTF16));
8756 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
8758 if (r->dependent_files) {
8759 _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
8760 NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
8761 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
8762 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
8764 if (r->previous_names) {
8765 _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
8766 NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
8767 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
8768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
8771 return NDR_ERR_SUCCESS;
8774 _PUBLIC_ void ndr_print_spoolss_AddDriverInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo4 *r)
8776 ndr_print_struct(ndr, name, "spoolss_AddDriverInfo4");
8777 ndr->depth++;
8778 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
8779 ndr_print_ptr(ndr, "driver_name", r->driver_name);
8780 ndr->depth++;
8781 if (r->driver_name) {
8782 ndr_print_string(ndr, "driver_name", r->driver_name);
8784 ndr->depth--;
8785 ndr_print_ptr(ndr, "architecture", r->architecture);
8786 ndr->depth++;
8787 if (r->architecture) {
8788 ndr_print_string(ndr, "architecture", r->architecture);
8790 ndr->depth--;
8791 ndr_print_ptr(ndr, "driver_path", r->driver_path);
8792 ndr->depth++;
8793 if (r->driver_path) {
8794 ndr_print_string(ndr, "driver_path", r->driver_path);
8796 ndr->depth--;
8797 ndr_print_ptr(ndr, "data_file", r->data_file);
8798 ndr->depth++;
8799 if (r->data_file) {
8800 ndr_print_string(ndr, "data_file", r->data_file);
8802 ndr->depth--;
8803 ndr_print_ptr(ndr, "config_file", r->config_file);
8804 ndr->depth++;
8805 if (r->config_file) {
8806 ndr_print_string(ndr, "config_file", r->config_file);
8808 ndr->depth--;
8809 ndr_print_ptr(ndr, "help_file", r->help_file);
8810 ndr->depth++;
8811 if (r->help_file) {
8812 ndr_print_string(ndr, "help_file", r->help_file);
8814 ndr->depth--;
8815 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
8816 ndr->depth++;
8817 if (r->monitor_name) {
8818 ndr_print_string(ndr, "monitor_name", r->monitor_name);
8820 ndr->depth--;
8821 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
8822 ndr->depth++;
8823 if (r->default_datatype) {
8824 ndr_print_string(ndr, "default_datatype", r->default_datatype);
8826 ndr->depth--;
8827 ndr_print_uint32(ndr, "_ndr_size_dependent_files", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_dependent_files);
8828 ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
8829 ndr->depth++;
8830 if (r->dependent_files) {
8831 ndr_print_spoolss_StringArray(ndr, "dependent_files", r->dependent_files);
8833 ndr->depth--;
8834 ndr_print_uint32(ndr, "_ndr_size_previous_names", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->previous_names, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_previous_names);
8835 ndr_print_ptr(ndr, "previous_names", r->previous_names);
8836 ndr->depth++;
8837 if (r->previous_names) {
8838 ndr_print_spoolss_StringArray(ndr, "previous_names", r->previous_names);
8840 ndr->depth--;
8841 ndr->depth--;
8844 static enum ndr_err_code ndr_push_spoolss_DriverAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
8846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
8847 return NDR_ERR_SUCCESS;
8850 static enum ndr_err_code ndr_pull_spoolss_DriverAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
8852 uint32_t v;
8853 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
8854 *r = v;
8855 return NDR_ERR_SUCCESS;
8858 _PUBLIC_ void ndr_print_spoolss_DriverAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
8860 ndr_print_uint32(ndr, name, r);
8861 ndr->depth++;
8862 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_DRIVER_PACKAGE_AWARE", PRINTER_DRIVER_PACKAGE_AWARE, r);
8863 ndr->depth--;
8866 static enum ndr_err_code ndr_push_spoolss_AddDriverInfo6(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddDriverInfo6 *r)
8868 if (ndr_flags & NDR_SCALARS) {
8869 NDR_CHECK(ndr_push_align(ndr, 8));
8870 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
8871 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
8872 NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
8873 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
8874 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
8875 NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
8876 NDR_CHECK(ndr_push_unique_ptr(ndr, r->help_file));
8877 NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
8878 NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype));
8879 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
8880 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files));
8881 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->previous_names, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
8882 NDR_CHECK(ndr_push_unique_ptr(ndr, r->previous_names));
8883 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
8884 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
8885 NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_name));
8886 NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_url));
8887 NDR_CHECK(ndr_push_unique_ptr(ndr, r->hardware_id));
8888 NDR_CHECK(ndr_push_unique_ptr(ndr, r->provider));
8890 if (ndr_flags & NDR_BUFFERS) {
8891 if (r->driver_name) {
8892 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
8893 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8894 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
8895 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8897 if (r->architecture) {
8898 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
8899 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8900 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
8901 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8903 if (r->driver_path) {
8904 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
8905 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
8907 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8909 if (r->data_file) {
8910 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
8911 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8912 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
8913 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8915 if (r->config_file) {
8916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
8917 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8918 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
8919 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8921 if (r->help_file) {
8922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
8923 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8924 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
8925 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->help_file, ndr_charset_length(r->help_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8927 if (r->monitor_name) {
8928 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
8929 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
8931 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8933 if (r->default_datatype) {
8934 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
8935 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
8937 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->default_datatype, ndr_charset_length(r->default_datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8939 if (r->dependent_files) {
8940 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
8942 if (r->previous_names) {
8943 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
8945 if (r->manufacturer_name) {
8946 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_name, CH_UTF16)));
8947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8948 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_name, CH_UTF16)));
8949 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->manufacturer_name, ndr_charset_length(r->manufacturer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8951 if (r->manufacturer_url) {
8952 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_url, CH_UTF16)));
8953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_url, CH_UTF16)));
8955 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->manufacturer_url, ndr_charset_length(r->manufacturer_url, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8957 if (r->hardware_id) {
8958 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->hardware_id, CH_UTF16)));
8959 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8960 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->hardware_id, CH_UTF16)));
8961 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hardware_id, ndr_charset_length(r->hardware_id, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8963 if (r->provider) {
8964 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->provider, CH_UTF16)));
8965 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
8966 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->provider, CH_UTF16)));
8967 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->provider, ndr_charset_length(r->provider, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8970 return NDR_ERR_SUCCESS;
8973 static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo6(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddDriverInfo6 *r)
8975 uint32_t _ptr_driver_name;
8976 TALLOC_CTX *_mem_save_driver_name_0;
8977 uint32_t _ptr_architecture;
8978 TALLOC_CTX *_mem_save_architecture_0;
8979 uint32_t _ptr_driver_path;
8980 TALLOC_CTX *_mem_save_driver_path_0;
8981 uint32_t _ptr_data_file;
8982 TALLOC_CTX *_mem_save_data_file_0;
8983 uint32_t _ptr_config_file;
8984 TALLOC_CTX *_mem_save_config_file_0;
8985 uint32_t _ptr_help_file;
8986 TALLOC_CTX *_mem_save_help_file_0;
8987 uint32_t _ptr_monitor_name;
8988 TALLOC_CTX *_mem_save_monitor_name_0;
8989 uint32_t _ptr_default_datatype;
8990 TALLOC_CTX *_mem_save_default_datatype_0;
8991 uint32_t _ptr_dependent_files;
8992 TALLOC_CTX *_mem_save_dependent_files_0;
8993 uint32_t _ptr_previous_names;
8994 TALLOC_CTX *_mem_save_previous_names_0;
8995 uint32_t _ptr_manufacturer_name;
8996 TALLOC_CTX *_mem_save_manufacturer_name_0;
8997 uint32_t _ptr_manufacturer_url;
8998 TALLOC_CTX *_mem_save_manufacturer_url_0;
8999 uint32_t _ptr_hardware_id;
9000 TALLOC_CTX *_mem_save_hardware_id_0;
9001 uint32_t _ptr_provider;
9002 TALLOC_CTX *_mem_save_provider_0;
9003 if (ndr_flags & NDR_SCALARS) {
9004 NDR_CHECK(ndr_pull_align(ndr, 8));
9005 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
9006 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
9007 if (_ptr_driver_name) {
9008 NDR_PULL_ALLOC(ndr, r->driver_name);
9009 } else {
9010 r->driver_name = NULL;
9012 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
9013 if (_ptr_architecture) {
9014 NDR_PULL_ALLOC(ndr, r->architecture);
9015 } else {
9016 r->architecture = NULL;
9018 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
9019 if (_ptr_driver_path) {
9020 NDR_PULL_ALLOC(ndr, r->driver_path);
9021 } else {
9022 r->driver_path = NULL;
9024 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
9025 if (_ptr_data_file) {
9026 NDR_PULL_ALLOC(ndr, r->data_file);
9027 } else {
9028 r->data_file = NULL;
9030 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
9031 if (_ptr_config_file) {
9032 NDR_PULL_ALLOC(ndr, r->config_file);
9033 } else {
9034 r->config_file = NULL;
9036 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
9037 if (_ptr_help_file) {
9038 NDR_PULL_ALLOC(ndr, r->help_file);
9039 } else {
9040 r->help_file = NULL;
9042 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
9043 if (_ptr_monitor_name) {
9044 NDR_PULL_ALLOC(ndr, r->monitor_name);
9045 } else {
9046 r->monitor_name = NULL;
9048 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
9049 if (_ptr_default_datatype) {
9050 NDR_PULL_ALLOC(ndr, r->default_datatype);
9051 } else {
9052 r->default_datatype = NULL;
9054 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_dependent_files));
9055 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
9056 if (_ptr_dependent_files) {
9057 NDR_PULL_ALLOC(ndr, r->dependent_files);
9058 } else {
9059 r->dependent_files = NULL;
9061 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_previous_names));
9062 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
9063 if (_ptr_previous_names) {
9064 NDR_PULL_ALLOC(ndr, r->previous_names);
9065 } else {
9066 r->previous_names = NULL;
9068 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
9069 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
9070 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_name));
9071 if (_ptr_manufacturer_name) {
9072 NDR_PULL_ALLOC(ndr, r->manufacturer_name);
9073 } else {
9074 r->manufacturer_name = NULL;
9076 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_url));
9077 if (_ptr_manufacturer_url) {
9078 NDR_PULL_ALLOC(ndr, r->manufacturer_url);
9079 } else {
9080 r->manufacturer_url = NULL;
9082 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hardware_id));
9083 if (_ptr_hardware_id) {
9084 NDR_PULL_ALLOC(ndr, r->hardware_id);
9085 } else {
9086 r->hardware_id = NULL;
9088 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_provider));
9089 if (_ptr_provider) {
9090 NDR_PULL_ALLOC(ndr, r->provider);
9091 } else {
9092 r->provider = NULL;
9095 if (ndr_flags & NDR_BUFFERS) {
9096 if (r->driver_name) {
9097 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9098 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
9099 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
9100 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
9101 if (ndr_get_array_length(ndr, &r->driver_name) > ndr_get_array_size(ndr, &r->driver_name)) {
9102 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_name), ndr_get_array_length(ndr, &r->driver_name));
9104 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t)));
9105 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t), CH_UTF16));
9106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
9108 if (r->architecture) {
9109 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
9110 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
9111 NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
9112 NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
9113 if (ndr_get_array_length(ndr, &r->architecture) > ndr_get_array_size(ndr, &r->architecture)) {
9114 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->architecture), ndr_get_array_length(ndr, &r->architecture));
9116 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t)));
9117 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t), CH_UTF16));
9118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
9120 if (r->driver_path) {
9121 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
9122 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
9123 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
9124 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
9125 if (ndr_get_array_length(ndr, &r->driver_path) > ndr_get_array_size(ndr, &r->driver_path)) {
9126 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_path), ndr_get_array_length(ndr, &r->driver_path));
9128 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t)));
9129 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t), CH_UTF16));
9130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
9132 if (r->data_file) {
9133 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9134 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
9135 NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
9136 NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
9137 if (ndr_get_array_length(ndr, &r->data_file) > ndr_get_array_size(ndr, &r->data_file)) {
9138 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data_file), ndr_get_array_length(ndr, &r->data_file));
9140 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t)));
9141 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t), CH_UTF16));
9142 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
9144 if (r->config_file) {
9145 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9146 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
9147 NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
9148 NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
9149 if (ndr_get_array_length(ndr, &r->config_file) > ndr_get_array_size(ndr, &r->config_file)) {
9150 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->config_file), ndr_get_array_length(ndr, &r->config_file));
9152 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t)));
9153 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t), CH_UTF16));
9154 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
9156 if (r->help_file) {
9157 _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9158 NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
9159 NDR_CHECK(ndr_pull_array_size(ndr, &r->help_file));
9160 NDR_CHECK(ndr_pull_array_length(ndr, &r->help_file));
9161 if (ndr_get_array_length(ndr, &r->help_file) > ndr_get_array_size(ndr, &r->help_file)) {
9162 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->help_file), ndr_get_array_length(ndr, &r->help_file));
9164 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->help_file), sizeof(uint16_t)));
9165 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->help_file, ndr_get_array_length(ndr, &r->help_file), sizeof(uint16_t), CH_UTF16));
9166 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
9168 if (r->monitor_name) {
9169 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9170 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
9171 NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
9172 NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
9173 if (ndr_get_array_length(ndr, &r->monitor_name) > ndr_get_array_size(ndr, &r->monitor_name)) {
9174 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->monitor_name), ndr_get_array_length(ndr, &r->monitor_name));
9176 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->monitor_name), sizeof(uint16_t)));
9177 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, ndr_get_array_length(ndr, &r->monitor_name), sizeof(uint16_t), CH_UTF16));
9178 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
9180 if (r->default_datatype) {
9181 _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
9182 NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
9183 NDR_CHECK(ndr_pull_array_size(ndr, &r->default_datatype));
9184 NDR_CHECK(ndr_pull_array_length(ndr, &r->default_datatype));
9185 if (ndr_get_array_length(ndr, &r->default_datatype) > ndr_get_array_size(ndr, &r->default_datatype)) {
9186 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->default_datatype), ndr_get_array_length(ndr, &r->default_datatype));
9188 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->default_datatype), sizeof(uint16_t)));
9189 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->default_datatype, ndr_get_array_length(ndr, &r->default_datatype), sizeof(uint16_t), CH_UTF16));
9190 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
9192 if (r->dependent_files) {
9193 _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
9194 NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
9195 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
9196 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
9198 if (r->previous_names) {
9199 _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
9200 NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
9201 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
9202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
9204 if (r->manufacturer_name) {
9205 _mem_save_manufacturer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9206 NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_name, 0);
9207 NDR_CHECK(ndr_pull_array_size(ndr, &r->manufacturer_name));
9208 NDR_CHECK(ndr_pull_array_length(ndr, &r->manufacturer_name));
9209 if (ndr_get_array_length(ndr, &r->manufacturer_name) > ndr_get_array_size(ndr, &r->manufacturer_name)) {
9210 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->manufacturer_name), ndr_get_array_length(ndr, &r->manufacturer_name));
9212 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->manufacturer_name), sizeof(uint16_t)));
9213 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->manufacturer_name, ndr_get_array_length(ndr, &r->manufacturer_name), sizeof(uint16_t), CH_UTF16));
9214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_name_0, 0);
9216 if (r->manufacturer_url) {
9217 _mem_save_manufacturer_url_0 = NDR_PULL_GET_MEM_CTX(ndr);
9218 NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_url, 0);
9219 NDR_CHECK(ndr_pull_array_size(ndr, &r->manufacturer_url));
9220 NDR_CHECK(ndr_pull_array_length(ndr, &r->manufacturer_url));
9221 if (ndr_get_array_length(ndr, &r->manufacturer_url) > ndr_get_array_size(ndr, &r->manufacturer_url)) {
9222 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->manufacturer_url), ndr_get_array_length(ndr, &r->manufacturer_url));
9224 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->manufacturer_url), sizeof(uint16_t)));
9225 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->manufacturer_url, ndr_get_array_length(ndr, &r->manufacturer_url), sizeof(uint16_t), CH_UTF16));
9226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_url_0, 0);
9228 if (r->hardware_id) {
9229 _mem_save_hardware_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
9230 NDR_PULL_SET_MEM_CTX(ndr, r->hardware_id, 0);
9231 NDR_CHECK(ndr_pull_array_size(ndr, &r->hardware_id));
9232 NDR_CHECK(ndr_pull_array_length(ndr, &r->hardware_id));
9233 if (ndr_get_array_length(ndr, &r->hardware_id) > ndr_get_array_size(ndr, &r->hardware_id)) {
9234 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->hardware_id), ndr_get_array_length(ndr, &r->hardware_id));
9236 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->hardware_id), sizeof(uint16_t)));
9237 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hardware_id, ndr_get_array_length(ndr, &r->hardware_id), sizeof(uint16_t), CH_UTF16));
9238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hardware_id_0, 0);
9240 if (r->provider) {
9241 _mem_save_provider_0 = NDR_PULL_GET_MEM_CTX(ndr);
9242 NDR_PULL_SET_MEM_CTX(ndr, r->provider, 0);
9243 NDR_CHECK(ndr_pull_array_size(ndr, &r->provider));
9244 NDR_CHECK(ndr_pull_array_length(ndr, &r->provider));
9245 if (ndr_get_array_length(ndr, &r->provider) > ndr_get_array_size(ndr, &r->provider)) {
9246 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->provider), ndr_get_array_length(ndr, &r->provider));
9248 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->provider), sizeof(uint16_t)));
9249 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->provider, ndr_get_array_length(ndr, &r->provider), sizeof(uint16_t), CH_UTF16));
9250 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_provider_0, 0);
9253 return NDR_ERR_SUCCESS;
9256 _PUBLIC_ void ndr_print_spoolss_AddDriverInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo6 *r)
9258 ndr_print_struct(ndr, name, "spoolss_AddDriverInfo6");
9259 ndr->depth++;
9260 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
9261 ndr_print_ptr(ndr, "driver_name", r->driver_name);
9262 ndr->depth++;
9263 if (r->driver_name) {
9264 ndr_print_string(ndr, "driver_name", r->driver_name);
9266 ndr->depth--;
9267 ndr_print_ptr(ndr, "architecture", r->architecture);
9268 ndr->depth++;
9269 if (r->architecture) {
9270 ndr_print_string(ndr, "architecture", r->architecture);
9272 ndr->depth--;
9273 ndr_print_ptr(ndr, "driver_path", r->driver_path);
9274 ndr->depth++;
9275 if (r->driver_path) {
9276 ndr_print_string(ndr, "driver_path", r->driver_path);
9278 ndr->depth--;
9279 ndr_print_ptr(ndr, "data_file", r->data_file);
9280 ndr->depth++;
9281 if (r->data_file) {
9282 ndr_print_string(ndr, "data_file", r->data_file);
9284 ndr->depth--;
9285 ndr_print_ptr(ndr, "config_file", r->config_file);
9286 ndr->depth++;
9287 if (r->config_file) {
9288 ndr_print_string(ndr, "config_file", r->config_file);
9290 ndr->depth--;
9291 ndr_print_ptr(ndr, "help_file", r->help_file);
9292 ndr->depth++;
9293 if (r->help_file) {
9294 ndr_print_string(ndr, "help_file", r->help_file);
9296 ndr->depth--;
9297 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
9298 ndr->depth++;
9299 if (r->monitor_name) {
9300 ndr_print_string(ndr, "monitor_name", r->monitor_name);
9302 ndr->depth--;
9303 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
9304 ndr->depth++;
9305 if (r->default_datatype) {
9306 ndr_print_string(ndr, "default_datatype", r->default_datatype);
9308 ndr->depth--;
9309 ndr_print_uint32(ndr, "_ndr_size_dependent_files", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_dependent_files);
9310 ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
9311 ndr->depth++;
9312 if (r->dependent_files) {
9313 ndr_print_spoolss_StringArray(ndr, "dependent_files", r->dependent_files);
9315 ndr->depth--;
9316 ndr_print_uint32(ndr, "_ndr_size_previous_names", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->previous_names, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_previous_names);
9317 ndr_print_ptr(ndr, "previous_names", r->previous_names);
9318 ndr->depth++;
9319 if (r->previous_names) {
9320 ndr_print_spoolss_StringArray(ndr, "previous_names", r->previous_names);
9322 ndr->depth--;
9323 ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
9324 ndr_print_hyper(ndr, "driver_version", r->driver_version);
9325 ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
9326 ndr->depth++;
9327 if (r->manufacturer_name) {
9328 ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
9330 ndr->depth--;
9331 ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
9332 ndr->depth++;
9333 if (r->manufacturer_url) {
9334 ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
9336 ndr->depth--;
9337 ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
9338 ndr->depth++;
9339 if (r->hardware_id) {
9340 ndr_print_string(ndr, "hardware_id", r->hardware_id);
9342 ndr->depth--;
9343 ndr_print_ptr(ndr, "provider", r->provider);
9344 ndr->depth++;
9345 if (r->provider) {
9346 ndr_print_string(ndr, "provider", r->provider);
9348 ndr->depth--;
9349 ndr->depth--;
9352 static enum ndr_err_code ndr_push_spoolss_AddDriverInfo8(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddDriverInfo8 *r)
9354 if (ndr_flags & NDR_SCALARS) {
9355 NDR_CHECK(ndr_push_align(ndr, 8));
9356 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
9357 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
9358 NDR_CHECK(ndr_push_unique_ptr(ndr, r->architecture));
9359 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_path));
9360 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_file));
9361 NDR_CHECK(ndr_push_unique_ptr(ndr, r->config_file));
9362 NDR_CHECK(ndr_push_unique_ptr(ndr, r->help_file));
9363 NDR_CHECK(ndr_push_unique_ptr(ndr, r->monitor_name));
9364 NDR_CHECK(ndr_push_unique_ptr(ndr, r->default_datatype));
9365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
9366 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependent_files));
9367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->previous_names, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
9368 NDR_CHECK(ndr_push_unique_ptr(ndr, r->previous_names));
9369 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
9370 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
9371 NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_name));
9372 NDR_CHECK(ndr_push_unique_ptr(ndr, r->manufacturer_url));
9373 NDR_CHECK(ndr_push_unique_ptr(ndr, r->hardware_id));
9374 NDR_CHECK(ndr_push_unique_ptr(ndr, r->provider));
9375 NDR_CHECK(ndr_push_unique_ptr(ndr, r->print_processor));
9376 NDR_CHECK(ndr_push_unique_ptr(ndr, r->vendor_setup));
9377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->color_profiles, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
9378 NDR_CHECK(ndr_push_unique_ptr(ndr, r->color_profiles));
9379 NDR_CHECK(ndr_push_unique_ptr(ndr, r->inf_path));
9380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->printer_driver_attributes));
9381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ((ndr_size_spoolss_StringArray(r->core_driver_dependencies, ndr->iconv_convenience, ndr->flags) - 4) / 2)));
9382 NDR_CHECK(ndr_push_unique_ptr(ndr, r->core_driver_dependencies));
9383 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->min_inbox_driver_ver_date));
9384 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->min_inbox_driver_ver_version));
9386 if (ndr_flags & NDR_BUFFERS) {
9387 if (r->driver_name) {
9388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
9391 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9393 if (r->architecture) {
9394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
9395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9396 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->architecture, CH_UTF16)));
9397 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->architecture, ndr_charset_length(r->architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9399 if (r->driver_path) {
9400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
9401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->driver_path, CH_UTF16)));
9403 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_path, ndr_charset_length(r->driver_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9405 if (r->data_file) {
9406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
9407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->data_file, CH_UTF16)));
9409 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_file, ndr_charset_length(r->data_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9411 if (r->config_file) {
9412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
9413 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9414 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->config_file, CH_UTF16)));
9415 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->config_file, ndr_charset_length(r->config_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9417 if (r->help_file) {
9418 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
9419 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9420 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->help_file, CH_UTF16)));
9421 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->help_file, ndr_charset_length(r->help_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9423 if (r->monitor_name) {
9424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
9425 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9426 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->monitor_name, CH_UTF16)));
9427 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->monitor_name, ndr_charset_length(r->monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9429 if (r->default_datatype) {
9430 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
9431 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9432 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->default_datatype, CH_UTF16)));
9433 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->default_datatype, ndr_charset_length(r->default_datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9435 if (r->dependent_files) {
9436 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
9438 if (r->previous_names) {
9439 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
9441 if (r->manufacturer_name) {
9442 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_name, CH_UTF16)));
9443 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9444 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_name, CH_UTF16)));
9445 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->manufacturer_name, ndr_charset_length(r->manufacturer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9447 if (r->manufacturer_url) {
9448 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_url, CH_UTF16)));
9449 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9450 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->manufacturer_url, CH_UTF16)));
9451 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->manufacturer_url, ndr_charset_length(r->manufacturer_url, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9453 if (r->hardware_id) {
9454 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->hardware_id, CH_UTF16)));
9455 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9456 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->hardware_id, CH_UTF16)));
9457 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hardware_id, ndr_charset_length(r->hardware_id, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9459 if (r->provider) {
9460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->provider, CH_UTF16)));
9461 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9462 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->provider, CH_UTF16)));
9463 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->provider, ndr_charset_length(r->provider, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9465 if (r->print_processor) {
9466 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
9467 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9468 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
9469 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->print_processor, ndr_charset_length(r->print_processor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9471 if (r->vendor_setup) {
9472 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->vendor_setup, CH_UTF16)));
9473 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9474 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->vendor_setup, CH_UTF16)));
9475 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->vendor_setup, ndr_charset_length(r->vendor_setup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9477 if (r->color_profiles) {
9478 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->color_profiles));
9480 if (r->inf_path) {
9481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->inf_path, CH_UTF16)));
9482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
9483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->inf_path, CH_UTF16)));
9484 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->inf_path, ndr_charset_length(r->inf_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9486 if (r->core_driver_dependencies) {
9487 NDR_CHECK(ndr_push_spoolss_StringArray(ndr, NDR_SCALARS, r->core_driver_dependencies));
9490 return NDR_ERR_SUCCESS;
9493 static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo8(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddDriverInfo8 *r)
9495 uint32_t _ptr_driver_name;
9496 TALLOC_CTX *_mem_save_driver_name_0;
9497 uint32_t _ptr_architecture;
9498 TALLOC_CTX *_mem_save_architecture_0;
9499 uint32_t _ptr_driver_path;
9500 TALLOC_CTX *_mem_save_driver_path_0;
9501 uint32_t _ptr_data_file;
9502 TALLOC_CTX *_mem_save_data_file_0;
9503 uint32_t _ptr_config_file;
9504 TALLOC_CTX *_mem_save_config_file_0;
9505 uint32_t _ptr_help_file;
9506 TALLOC_CTX *_mem_save_help_file_0;
9507 uint32_t _ptr_monitor_name;
9508 TALLOC_CTX *_mem_save_monitor_name_0;
9509 uint32_t _ptr_default_datatype;
9510 TALLOC_CTX *_mem_save_default_datatype_0;
9511 uint32_t _ptr_dependent_files;
9512 TALLOC_CTX *_mem_save_dependent_files_0;
9513 uint32_t _ptr_previous_names;
9514 TALLOC_CTX *_mem_save_previous_names_0;
9515 uint32_t _ptr_manufacturer_name;
9516 TALLOC_CTX *_mem_save_manufacturer_name_0;
9517 uint32_t _ptr_manufacturer_url;
9518 TALLOC_CTX *_mem_save_manufacturer_url_0;
9519 uint32_t _ptr_hardware_id;
9520 TALLOC_CTX *_mem_save_hardware_id_0;
9521 uint32_t _ptr_provider;
9522 TALLOC_CTX *_mem_save_provider_0;
9523 uint32_t _ptr_print_processor;
9524 TALLOC_CTX *_mem_save_print_processor_0;
9525 uint32_t _ptr_vendor_setup;
9526 TALLOC_CTX *_mem_save_vendor_setup_0;
9527 uint32_t _ptr_color_profiles;
9528 TALLOC_CTX *_mem_save_color_profiles_0;
9529 uint32_t _ptr_inf_path;
9530 TALLOC_CTX *_mem_save_inf_path_0;
9531 uint32_t _ptr_core_driver_dependencies;
9532 TALLOC_CTX *_mem_save_core_driver_dependencies_0;
9533 if (ndr_flags & NDR_SCALARS) {
9534 NDR_CHECK(ndr_pull_align(ndr, 8));
9535 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
9536 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
9537 if (_ptr_driver_name) {
9538 NDR_PULL_ALLOC(ndr, r->driver_name);
9539 } else {
9540 r->driver_name = NULL;
9542 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
9543 if (_ptr_architecture) {
9544 NDR_PULL_ALLOC(ndr, r->architecture);
9545 } else {
9546 r->architecture = NULL;
9548 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
9549 if (_ptr_driver_path) {
9550 NDR_PULL_ALLOC(ndr, r->driver_path);
9551 } else {
9552 r->driver_path = NULL;
9554 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
9555 if (_ptr_data_file) {
9556 NDR_PULL_ALLOC(ndr, r->data_file);
9557 } else {
9558 r->data_file = NULL;
9560 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
9561 if (_ptr_config_file) {
9562 NDR_PULL_ALLOC(ndr, r->config_file);
9563 } else {
9564 r->config_file = NULL;
9566 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
9567 if (_ptr_help_file) {
9568 NDR_PULL_ALLOC(ndr, r->help_file);
9569 } else {
9570 r->help_file = NULL;
9572 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
9573 if (_ptr_monitor_name) {
9574 NDR_PULL_ALLOC(ndr, r->monitor_name);
9575 } else {
9576 r->monitor_name = NULL;
9578 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
9579 if (_ptr_default_datatype) {
9580 NDR_PULL_ALLOC(ndr, r->default_datatype);
9581 } else {
9582 r->default_datatype = NULL;
9584 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_dependent_files));
9585 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
9586 if (_ptr_dependent_files) {
9587 NDR_PULL_ALLOC(ndr, r->dependent_files);
9588 } else {
9589 r->dependent_files = NULL;
9591 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_previous_names));
9592 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
9593 if (_ptr_previous_names) {
9594 NDR_PULL_ALLOC(ndr, r->previous_names);
9595 } else {
9596 r->previous_names = NULL;
9598 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
9599 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
9600 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_name));
9601 if (_ptr_manufacturer_name) {
9602 NDR_PULL_ALLOC(ndr, r->manufacturer_name);
9603 } else {
9604 r->manufacturer_name = NULL;
9606 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_url));
9607 if (_ptr_manufacturer_url) {
9608 NDR_PULL_ALLOC(ndr, r->manufacturer_url);
9609 } else {
9610 r->manufacturer_url = NULL;
9612 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hardware_id));
9613 if (_ptr_hardware_id) {
9614 NDR_PULL_ALLOC(ndr, r->hardware_id);
9615 } else {
9616 r->hardware_id = NULL;
9618 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_provider));
9619 if (_ptr_provider) {
9620 NDR_PULL_ALLOC(ndr, r->provider);
9621 } else {
9622 r->provider = NULL;
9624 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
9625 if (_ptr_print_processor) {
9626 NDR_PULL_ALLOC(ndr, r->print_processor);
9627 } else {
9628 r->print_processor = NULL;
9630 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_vendor_setup));
9631 if (_ptr_vendor_setup) {
9632 NDR_PULL_ALLOC(ndr, r->vendor_setup);
9633 } else {
9634 r->vendor_setup = NULL;
9636 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_color_profiles));
9637 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_color_profiles));
9638 if (_ptr_color_profiles) {
9639 NDR_PULL_ALLOC(ndr, r->color_profiles);
9640 } else {
9641 r->color_profiles = NULL;
9643 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_inf_path));
9644 if (_ptr_inf_path) {
9645 NDR_PULL_ALLOC(ndr, r->inf_path);
9646 } else {
9647 r->inf_path = NULL;
9649 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->printer_driver_attributes));
9650 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size_core_driver_dependencies));
9651 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_core_driver_dependencies));
9652 if (_ptr_core_driver_dependencies) {
9653 NDR_PULL_ALLOC(ndr, r->core_driver_dependencies);
9654 } else {
9655 r->core_driver_dependencies = NULL;
9657 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_date));
9658 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_version));
9660 if (ndr_flags & NDR_BUFFERS) {
9661 if (r->driver_name) {
9662 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9663 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
9664 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
9665 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
9666 if (ndr_get_array_length(ndr, &r->driver_name) > ndr_get_array_size(ndr, &r->driver_name)) {
9667 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_name), ndr_get_array_length(ndr, &r->driver_name));
9669 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t)));
9670 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, ndr_get_array_length(ndr, &r->driver_name), sizeof(uint16_t), CH_UTF16));
9671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
9673 if (r->architecture) {
9674 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
9675 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
9676 NDR_CHECK(ndr_pull_array_size(ndr, &r->architecture));
9677 NDR_CHECK(ndr_pull_array_length(ndr, &r->architecture));
9678 if (ndr_get_array_length(ndr, &r->architecture) > ndr_get_array_size(ndr, &r->architecture)) {
9679 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->architecture), ndr_get_array_length(ndr, &r->architecture));
9681 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t)));
9682 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->architecture, ndr_get_array_length(ndr, &r->architecture), sizeof(uint16_t), CH_UTF16));
9683 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
9685 if (r->driver_path) {
9686 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
9687 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
9688 NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_path));
9689 NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_path));
9690 if (ndr_get_array_length(ndr, &r->driver_path) > ndr_get_array_size(ndr, &r->driver_path)) {
9691 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->driver_path), ndr_get_array_length(ndr, &r->driver_path));
9693 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t)));
9694 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_path, ndr_get_array_length(ndr, &r->driver_path), sizeof(uint16_t), CH_UTF16));
9695 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
9697 if (r->data_file) {
9698 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9699 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
9700 NDR_CHECK(ndr_pull_array_size(ndr, &r->data_file));
9701 NDR_CHECK(ndr_pull_array_length(ndr, &r->data_file));
9702 if (ndr_get_array_length(ndr, &r->data_file) > ndr_get_array_size(ndr, &r->data_file)) {
9703 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->data_file), ndr_get_array_length(ndr, &r->data_file));
9705 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t)));
9706 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_file, ndr_get_array_length(ndr, &r->data_file), sizeof(uint16_t), CH_UTF16));
9707 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
9709 if (r->config_file) {
9710 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9711 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
9712 NDR_CHECK(ndr_pull_array_size(ndr, &r->config_file));
9713 NDR_CHECK(ndr_pull_array_length(ndr, &r->config_file));
9714 if (ndr_get_array_length(ndr, &r->config_file) > ndr_get_array_size(ndr, &r->config_file)) {
9715 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->config_file), ndr_get_array_length(ndr, &r->config_file));
9717 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t)));
9718 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->config_file, ndr_get_array_length(ndr, &r->config_file), sizeof(uint16_t), CH_UTF16));
9719 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
9721 if (r->help_file) {
9722 _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
9723 NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
9724 NDR_CHECK(ndr_pull_array_size(ndr, &r->help_file));
9725 NDR_CHECK(ndr_pull_array_length(ndr, &r->help_file));
9726 if (ndr_get_array_length(ndr, &r->help_file) > ndr_get_array_size(ndr, &r->help_file)) {
9727 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->help_file), ndr_get_array_length(ndr, &r->help_file));
9729 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->help_file), sizeof(uint16_t)));
9730 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->help_file, ndr_get_array_length(ndr, &r->help_file), sizeof(uint16_t), CH_UTF16));
9731 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
9733 if (r->monitor_name) {
9734 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9735 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
9736 NDR_CHECK(ndr_pull_array_size(ndr, &r->monitor_name));
9737 NDR_CHECK(ndr_pull_array_length(ndr, &r->monitor_name));
9738 if (ndr_get_array_length(ndr, &r->monitor_name) > ndr_get_array_size(ndr, &r->monitor_name)) {
9739 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->monitor_name), ndr_get_array_length(ndr, &r->monitor_name));
9741 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->monitor_name), sizeof(uint16_t)));
9742 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->monitor_name, ndr_get_array_length(ndr, &r->monitor_name), sizeof(uint16_t), CH_UTF16));
9743 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
9745 if (r->default_datatype) {
9746 _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
9747 NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
9748 NDR_CHECK(ndr_pull_array_size(ndr, &r->default_datatype));
9749 NDR_CHECK(ndr_pull_array_length(ndr, &r->default_datatype));
9750 if (ndr_get_array_length(ndr, &r->default_datatype) > ndr_get_array_size(ndr, &r->default_datatype)) {
9751 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->default_datatype), ndr_get_array_length(ndr, &r->default_datatype));
9753 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->default_datatype), sizeof(uint16_t)));
9754 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->default_datatype, ndr_get_array_length(ndr, &r->default_datatype), sizeof(uint16_t), CH_UTF16));
9755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
9757 if (r->dependent_files) {
9758 _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
9759 NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
9760 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->dependent_files));
9761 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
9763 if (r->previous_names) {
9764 _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
9765 NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
9766 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->previous_names));
9767 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
9769 if (r->manufacturer_name) {
9770 _mem_save_manufacturer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9771 NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_name, 0);
9772 NDR_CHECK(ndr_pull_array_size(ndr, &r->manufacturer_name));
9773 NDR_CHECK(ndr_pull_array_length(ndr, &r->manufacturer_name));
9774 if (ndr_get_array_length(ndr, &r->manufacturer_name) > ndr_get_array_size(ndr, &r->manufacturer_name)) {
9775 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->manufacturer_name), ndr_get_array_length(ndr, &r->manufacturer_name));
9777 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->manufacturer_name), sizeof(uint16_t)));
9778 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->manufacturer_name, ndr_get_array_length(ndr, &r->manufacturer_name), sizeof(uint16_t), CH_UTF16));
9779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_name_0, 0);
9781 if (r->manufacturer_url) {
9782 _mem_save_manufacturer_url_0 = NDR_PULL_GET_MEM_CTX(ndr);
9783 NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_url, 0);
9784 NDR_CHECK(ndr_pull_array_size(ndr, &r->manufacturer_url));
9785 NDR_CHECK(ndr_pull_array_length(ndr, &r->manufacturer_url));
9786 if (ndr_get_array_length(ndr, &r->manufacturer_url) > ndr_get_array_size(ndr, &r->manufacturer_url)) {
9787 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->manufacturer_url), ndr_get_array_length(ndr, &r->manufacturer_url));
9789 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->manufacturer_url), sizeof(uint16_t)));
9790 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->manufacturer_url, ndr_get_array_length(ndr, &r->manufacturer_url), sizeof(uint16_t), CH_UTF16));
9791 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_url_0, 0);
9793 if (r->hardware_id) {
9794 _mem_save_hardware_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
9795 NDR_PULL_SET_MEM_CTX(ndr, r->hardware_id, 0);
9796 NDR_CHECK(ndr_pull_array_size(ndr, &r->hardware_id));
9797 NDR_CHECK(ndr_pull_array_length(ndr, &r->hardware_id));
9798 if (ndr_get_array_length(ndr, &r->hardware_id) > ndr_get_array_size(ndr, &r->hardware_id)) {
9799 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->hardware_id), ndr_get_array_length(ndr, &r->hardware_id));
9801 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->hardware_id), sizeof(uint16_t)));
9802 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hardware_id, ndr_get_array_length(ndr, &r->hardware_id), sizeof(uint16_t), CH_UTF16));
9803 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hardware_id_0, 0);
9805 if (r->provider) {
9806 _mem_save_provider_0 = NDR_PULL_GET_MEM_CTX(ndr);
9807 NDR_PULL_SET_MEM_CTX(ndr, r->provider, 0);
9808 NDR_CHECK(ndr_pull_array_size(ndr, &r->provider));
9809 NDR_CHECK(ndr_pull_array_length(ndr, &r->provider));
9810 if (ndr_get_array_length(ndr, &r->provider) > ndr_get_array_size(ndr, &r->provider)) {
9811 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->provider), ndr_get_array_length(ndr, &r->provider));
9813 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->provider), sizeof(uint16_t)));
9814 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->provider, ndr_get_array_length(ndr, &r->provider), sizeof(uint16_t), CH_UTF16));
9815 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_provider_0, 0);
9817 if (r->print_processor) {
9818 _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
9819 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
9820 NDR_CHECK(ndr_pull_array_size(ndr, &r->print_processor));
9821 NDR_CHECK(ndr_pull_array_length(ndr, &r->print_processor));
9822 if (ndr_get_array_length(ndr, &r->print_processor) > ndr_get_array_size(ndr, &r->print_processor)) {
9823 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->print_processor), ndr_get_array_length(ndr, &r->print_processor));
9825 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->print_processor), sizeof(uint16_t)));
9826 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->print_processor, ndr_get_array_length(ndr, &r->print_processor), sizeof(uint16_t), CH_UTF16));
9827 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
9829 if (r->vendor_setup) {
9830 _mem_save_vendor_setup_0 = NDR_PULL_GET_MEM_CTX(ndr);
9831 NDR_PULL_SET_MEM_CTX(ndr, r->vendor_setup, 0);
9832 NDR_CHECK(ndr_pull_array_size(ndr, &r->vendor_setup));
9833 NDR_CHECK(ndr_pull_array_length(ndr, &r->vendor_setup));
9834 if (ndr_get_array_length(ndr, &r->vendor_setup) > ndr_get_array_size(ndr, &r->vendor_setup)) {
9835 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->vendor_setup), ndr_get_array_length(ndr, &r->vendor_setup));
9837 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->vendor_setup), sizeof(uint16_t)));
9838 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->vendor_setup, ndr_get_array_length(ndr, &r->vendor_setup), sizeof(uint16_t), CH_UTF16));
9839 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_vendor_setup_0, 0);
9841 if (r->color_profiles) {
9842 _mem_save_color_profiles_0 = NDR_PULL_GET_MEM_CTX(ndr);
9843 NDR_PULL_SET_MEM_CTX(ndr, r->color_profiles, 0);
9844 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->color_profiles));
9845 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_color_profiles_0, 0);
9847 if (r->inf_path) {
9848 _mem_save_inf_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
9849 NDR_PULL_SET_MEM_CTX(ndr, r->inf_path, 0);
9850 NDR_CHECK(ndr_pull_array_size(ndr, &r->inf_path));
9851 NDR_CHECK(ndr_pull_array_length(ndr, &r->inf_path));
9852 if (ndr_get_array_length(ndr, &r->inf_path) > ndr_get_array_size(ndr, &r->inf_path)) {
9853 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->inf_path), ndr_get_array_length(ndr, &r->inf_path));
9855 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->inf_path), sizeof(uint16_t)));
9856 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->inf_path, ndr_get_array_length(ndr, &r->inf_path), sizeof(uint16_t), CH_UTF16));
9857 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_inf_path_0, 0);
9859 if (r->core_driver_dependencies) {
9860 _mem_save_core_driver_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
9861 NDR_PULL_SET_MEM_CTX(ndr, r->core_driver_dependencies, 0);
9862 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr, NDR_SCALARS, r->core_driver_dependencies));
9863 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_core_driver_dependencies_0, 0);
9866 return NDR_ERR_SUCCESS;
9869 _PUBLIC_ void ndr_print_spoolss_AddDriverInfo8(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfo8 *r)
9871 ndr_print_struct(ndr, name, "spoolss_AddDriverInfo8");
9872 ndr->depth++;
9873 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
9874 ndr_print_ptr(ndr, "driver_name", r->driver_name);
9875 ndr->depth++;
9876 if (r->driver_name) {
9877 ndr_print_string(ndr, "driver_name", r->driver_name);
9879 ndr->depth--;
9880 ndr_print_ptr(ndr, "architecture", r->architecture);
9881 ndr->depth++;
9882 if (r->architecture) {
9883 ndr_print_string(ndr, "architecture", r->architecture);
9885 ndr->depth--;
9886 ndr_print_ptr(ndr, "driver_path", r->driver_path);
9887 ndr->depth++;
9888 if (r->driver_path) {
9889 ndr_print_string(ndr, "driver_path", r->driver_path);
9891 ndr->depth--;
9892 ndr_print_ptr(ndr, "data_file", r->data_file);
9893 ndr->depth++;
9894 if (r->data_file) {
9895 ndr_print_string(ndr, "data_file", r->data_file);
9897 ndr->depth--;
9898 ndr_print_ptr(ndr, "config_file", r->config_file);
9899 ndr->depth++;
9900 if (r->config_file) {
9901 ndr_print_string(ndr, "config_file", r->config_file);
9903 ndr->depth--;
9904 ndr_print_ptr(ndr, "help_file", r->help_file);
9905 ndr->depth++;
9906 if (r->help_file) {
9907 ndr_print_string(ndr, "help_file", r->help_file);
9909 ndr->depth--;
9910 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
9911 ndr->depth++;
9912 if (r->monitor_name) {
9913 ndr_print_string(ndr, "monitor_name", r->monitor_name);
9915 ndr->depth--;
9916 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
9917 ndr->depth++;
9918 if (r->default_datatype) {
9919 ndr_print_string(ndr, "default_datatype", r->default_datatype);
9921 ndr->depth--;
9922 ndr_print_uint32(ndr, "_ndr_size_dependent_files", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->dependent_files, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_dependent_files);
9923 ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
9924 ndr->depth++;
9925 if (r->dependent_files) {
9926 ndr_print_spoolss_StringArray(ndr, "dependent_files", r->dependent_files);
9928 ndr->depth--;
9929 ndr_print_uint32(ndr, "_ndr_size_previous_names", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->previous_names, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_previous_names);
9930 ndr_print_ptr(ndr, "previous_names", r->previous_names);
9931 ndr->depth++;
9932 if (r->previous_names) {
9933 ndr_print_spoolss_StringArray(ndr, "previous_names", r->previous_names);
9935 ndr->depth--;
9936 ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
9937 ndr_print_hyper(ndr, "driver_version", r->driver_version);
9938 ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
9939 ndr->depth++;
9940 if (r->manufacturer_name) {
9941 ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
9943 ndr->depth--;
9944 ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
9945 ndr->depth++;
9946 if (r->manufacturer_url) {
9947 ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
9949 ndr->depth--;
9950 ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
9951 ndr->depth++;
9952 if (r->hardware_id) {
9953 ndr_print_string(ndr, "hardware_id", r->hardware_id);
9955 ndr->depth--;
9956 ndr_print_ptr(ndr, "provider", r->provider);
9957 ndr->depth++;
9958 if (r->provider) {
9959 ndr_print_string(ndr, "provider", r->provider);
9961 ndr->depth--;
9962 ndr_print_ptr(ndr, "print_processor", r->print_processor);
9963 ndr->depth++;
9964 if (r->print_processor) {
9965 ndr_print_string(ndr, "print_processor", r->print_processor);
9967 ndr->depth--;
9968 ndr_print_ptr(ndr, "vendor_setup", r->vendor_setup);
9969 ndr->depth++;
9970 if (r->vendor_setup) {
9971 ndr_print_string(ndr, "vendor_setup", r->vendor_setup);
9973 ndr->depth--;
9974 ndr_print_uint32(ndr, "_ndr_size_color_profiles", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->color_profiles, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_color_profiles);
9975 ndr_print_ptr(ndr, "color_profiles", r->color_profiles);
9976 ndr->depth++;
9977 if (r->color_profiles) {
9978 ndr_print_spoolss_StringArray(ndr, "color_profiles", r->color_profiles);
9980 ndr->depth--;
9981 ndr_print_ptr(ndr, "inf_path", r->inf_path);
9982 ndr->depth++;
9983 if (r->inf_path) {
9984 ndr_print_string(ndr, "inf_path", r->inf_path);
9986 ndr->depth--;
9987 ndr_print_uint32(ndr, "printer_driver_attributes", r->printer_driver_attributes);
9988 ndr_print_uint32(ndr, "_ndr_size_core_driver_dependencies", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?((ndr_size_spoolss_StringArray(r->core_driver_dependencies, ndr->iconv_convenience, ndr->flags) - 4) / 2):r->_ndr_size_core_driver_dependencies);
9989 ndr_print_ptr(ndr, "core_driver_dependencies", r->core_driver_dependencies);
9990 ndr->depth++;
9991 if (r->core_driver_dependencies) {
9992 ndr_print_spoolss_StringArray(ndr, "core_driver_dependencies", r->core_driver_dependencies);
9994 ndr->depth--;
9995 ndr_print_NTTIME(ndr, "min_inbox_driver_ver_date", r->min_inbox_driver_ver_date);
9996 ndr_print_hyper(ndr, "min_inbox_driver_ver_version", r->min_inbox_driver_ver_version);
9997 ndr->depth--;
10000 static enum ndr_err_code ndr_push_spoolss_AddDriverInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_AddDriverInfo *r)
10002 if (ndr_flags & NDR_SCALARS) {
10003 int level = ndr_push_get_switch_value(ndr, r);
10004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
10005 switch (level) {
10006 case 1: {
10007 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
10008 break; }
10010 case 2: {
10011 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
10012 break; }
10014 case 3: {
10015 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
10016 break; }
10018 case 4: {
10019 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
10020 break; }
10022 case 6: {
10023 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
10024 break; }
10026 case 8: {
10027 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info8));
10028 break; }
10030 default:
10031 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
10034 if (ndr_flags & NDR_BUFFERS) {
10035 int level = ndr_push_get_switch_value(ndr, r);
10036 switch (level) {
10037 case 1:
10038 if (r->info1) {
10039 NDR_CHECK(ndr_push_spoolss_AddDriverInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
10041 break;
10043 case 2:
10044 if (r->info2) {
10045 NDR_CHECK(ndr_push_spoolss_AddDriverInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
10047 break;
10049 case 3:
10050 if (r->info3) {
10051 NDR_CHECK(ndr_push_spoolss_AddDriverInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
10053 break;
10055 case 4:
10056 if (r->info4) {
10057 NDR_CHECK(ndr_push_spoolss_AddDriverInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
10059 break;
10061 case 6:
10062 if (r->info6) {
10063 NDR_CHECK(ndr_push_spoolss_AddDriverInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
10065 break;
10067 case 8:
10068 if (r->info8) {
10069 NDR_CHECK(ndr_push_spoolss_AddDriverInfo8(ndr, NDR_SCALARS|NDR_BUFFERS, r->info8));
10071 break;
10073 default:
10074 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
10077 return NDR_ERR_SUCCESS;
10080 static enum ndr_err_code ndr_pull_spoolss_AddDriverInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_AddDriverInfo *r)
10082 int level;
10083 uint32_t _level;
10084 TALLOC_CTX *_mem_save_info1_0;
10085 TALLOC_CTX *_mem_save_info2_0;
10086 TALLOC_CTX *_mem_save_info3_0;
10087 TALLOC_CTX *_mem_save_info4_0;
10088 TALLOC_CTX *_mem_save_info6_0;
10089 TALLOC_CTX *_mem_save_info8_0;
10090 level = ndr_pull_get_switch_value(ndr, r);
10091 if (ndr_flags & NDR_SCALARS) {
10092 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
10093 if (_level != level) {
10094 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
10096 switch (level) {
10097 case 1: {
10098 uint32_t _ptr_info1;
10099 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
10100 if (_ptr_info1) {
10101 NDR_PULL_ALLOC(ndr, r->info1);
10102 } else {
10103 r->info1 = NULL;
10105 break; }
10107 case 2: {
10108 uint32_t _ptr_info2;
10109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
10110 if (_ptr_info2) {
10111 NDR_PULL_ALLOC(ndr, r->info2);
10112 } else {
10113 r->info2 = NULL;
10115 break; }
10117 case 3: {
10118 uint32_t _ptr_info3;
10119 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
10120 if (_ptr_info3) {
10121 NDR_PULL_ALLOC(ndr, r->info3);
10122 } else {
10123 r->info3 = NULL;
10125 break; }
10127 case 4: {
10128 uint32_t _ptr_info4;
10129 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
10130 if (_ptr_info4) {
10131 NDR_PULL_ALLOC(ndr, r->info4);
10132 } else {
10133 r->info4 = NULL;
10135 break; }
10137 case 6: {
10138 uint32_t _ptr_info6;
10139 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
10140 if (_ptr_info6) {
10141 NDR_PULL_ALLOC(ndr, r->info6);
10142 } else {
10143 r->info6 = NULL;
10145 break; }
10147 case 8: {
10148 uint32_t _ptr_info8;
10149 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info8));
10150 if (_ptr_info8) {
10151 NDR_PULL_ALLOC(ndr, r->info8);
10152 } else {
10153 r->info8 = NULL;
10155 break; }
10157 default:
10158 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
10161 if (ndr_flags & NDR_BUFFERS) {
10162 switch (level) {
10163 case 1:
10164 if (r->info1) {
10165 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
10166 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
10167 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
10168 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
10170 break;
10172 case 2:
10173 if (r->info2) {
10174 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
10175 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
10176 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
10177 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
10179 break;
10181 case 3:
10182 if (r->info3) {
10183 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
10184 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
10185 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
10186 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
10188 break;
10190 case 4:
10191 if (r->info4) {
10192 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
10193 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
10194 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
10195 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
10197 break;
10199 case 6:
10200 if (r->info6) {
10201 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
10202 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
10203 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
10204 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
10206 break;
10208 case 8:
10209 if (r->info8) {
10210 _mem_save_info8_0 = NDR_PULL_GET_MEM_CTX(ndr);
10211 NDR_PULL_SET_MEM_CTX(ndr, r->info8, 0);
10212 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo8(ndr, NDR_SCALARS|NDR_BUFFERS, r->info8));
10213 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info8_0, 0);
10215 break;
10217 default:
10218 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
10221 return NDR_ERR_SUCCESS;
10224 _PUBLIC_ void ndr_print_spoolss_AddDriverInfo(struct ndr_print *ndr, const char *name, const union spoolss_AddDriverInfo *r)
10226 int level;
10227 level = ndr_print_get_switch_value(ndr, r);
10228 ndr_print_union(ndr, name, level, "spoolss_AddDriverInfo");
10229 switch (level) {
10230 case 1:
10231 ndr_print_ptr(ndr, "info1", r->info1);
10232 ndr->depth++;
10233 if (r->info1) {
10234 ndr_print_spoolss_AddDriverInfo1(ndr, "info1", r->info1);
10236 ndr->depth--;
10237 break;
10239 case 2:
10240 ndr_print_ptr(ndr, "info2", r->info2);
10241 ndr->depth++;
10242 if (r->info2) {
10243 ndr_print_spoolss_AddDriverInfo2(ndr, "info2", r->info2);
10245 ndr->depth--;
10246 break;
10248 case 3:
10249 ndr_print_ptr(ndr, "info3", r->info3);
10250 ndr->depth++;
10251 if (r->info3) {
10252 ndr_print_spoolss_AddDriverInfo3(ndr, "info3", r->info3);
10254 ndr->depth--;
10255 break;
10257 case 4:
10258 ndr_print_ptr(ndr, "info4", r->info4);
10259 ndr->depth++;
10260 if (r->info4) {
10261 ndr_print_spoolss_AddDriverInfo4(ndr, "info4", r->info4);
10263 ndr->depth--;
10264 break;
10266 case 6:
10267 ndr_print_ptr(ndr, "info6", r->info6);
10268 ndr->depth++;
10269 if (r->info6) {
10270 ndr_print_spoolss_AddDriverInfo6(ndr, "info6", r->info6);
10272 ndr->depth--;
10273 break;
10275 case 8:
10276 ndr_print_ptr(ndr, "info8", r->info8);
10277 ndr->depth++;
10278 if (r->info8) {
10279 ndr_print_spoolss_AddDriverInfo8(ndr, "info8", r->info8);
10281 ndr->depth--;
10282 break;
10284 default:
10285 ndr_print_bad_level(ndr, name, level);
10289 static enum ndr_err_code ndr_push_spoolss_AddDriverInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddDriverInfoCtr *r)
10291 if (ndr_flags & NDR_SCALARS) {
10292 NDR_CHECK(ndr_push_align(ndr, 4));
10293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
10294 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
10295 NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr, NDR_SCALARS, &r->info));
10297 if (ndr_flags & NDR_BUFFERS) {
10298 NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr, NDR_BUFFERS, &r->info));
10300 return NDR_ERR_SUCCESS;
10303 static enum ndr_err_code ndr_pull_spoolss_AddDriverInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddDriverInfoCtr *r)
10305 if (ndr_flags & NDR_SCALARS) {
10306 NDR_CHECK(ndr_pull_align(ndr, 4));
10307 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
10308 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
10309 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr, NDR_SCALARS, &r->info));
10311 if (ndr_flags & NDR_BUFFERS) {
10312 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr, NDR_BUFFERS, &r->info));
10314 return NDR_ERR_SUCCESS;
10317 _PUBLIC_ void ndr_print_spoolss_AddDriverInfoCtr(struct ndr_print *ndr, const char *name, const struct spoolss_AddDriverInfoCtr *r)
10319 ndr_print_struct(ndr, name, "spoolss_AddDriverInfoCtr");
10320 ndr->depth++;
10321 ndr_print_uint32(ndr, "level", r->level);
10322 ndr_print_set_switch_value(ndr, &r->info, r->level);
10323 ndr_print_spoolss_AddDriverInfo(ndr, "info", &r->info);
10324 ndr->depth--;
10327 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo1 *r)
10329 if (ndr_flags & NDR_SCALARS) {
10330 NDR_CHECK(ndr_push_align(ndr, 4));
10332 uint32_t _flags_save_string = ndr->flags;
10333 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10334 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
10335 ndr->flags = _flags_save_string;
10338 if (ndr_flags & NDR_BUFFERS) {
10340 uint32_t _flags_save_string = ndr->flags;
10341 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10342 if (r->driver_name) {
10343 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
10344 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
10346 ndr->flags = _flags_save_string;
10349 return NDR_ERR_SUCCESS;
10352 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo1 *r)
10354 uint32_t _ptr_driver_name;
10355 TALLOC_CTX *_mem_save_driver_name_0;
10356 if (ndr_flags & NDR_SCALARS) {
10357 NDR_CHECK(ndr_pull_align(ndr, 4));
10359 uint32_t _flags_save_string = ndr->flags;
10360 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10361 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
10362 if (_ptr_driver_name) {
10363 NDR_PULL_ALLOC(ndr, r->driver_name);
10364 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
10365 } else {
10366 r->driver_name = NULL;
10368 ndr->flags = _flags_save_string;
10371 if (ndr_flags & NDR_BUFFERS) {
10373 uint32_t _flags_save_string = ndr->flags;
10374 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10375 if (r->driver_name) {
10376 uint32_t _relative_save_offset;
10377 _relative_save_offset = ndr->offset;
10378 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
10379 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10380 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
10381 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
10382 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
10383 ndr->offset = _relative_save_offset;
10385 ndr->flags = _flags_save_string;
10388 return NDR_ERR_SUCCESS;
10391 _PUBLIC_ void ndr_print_spoolss_DriverInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo1 *r)
10393 ndr_print_struct(ndr, name, "spoolss_DriverInfo1");
10394 ndr->depth++;
10395 ndr_print_ptr(ndr, "driver_name", r->driver_name);
10396 ndr->depth++;
10397 if (r->driver_name) {
10398 ndr_print_string(ndr, "driver_name", r->driver_name);
10400 ndr->depth--;
10401 ndr->depth--;
10404 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo1(const struct spoolss_DriverInfo1 *r, struct smb_iconv_convenience *ic, int flags)
10406 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo1, ic);
10409 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo2 *r)
10411 if (ndr_flags & NDR_SCALARS) {
10412 NDR_CHECK(ndr_push_align(ndr, 4));
10413 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
10415 uint32_t _flags_save_string = ndr->flags;
10416 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10417 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
10418 ndr->flags = _flags_save_string;
10421 uint32_t _flags_save_string = ndr->flags;
10422 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10423 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
10424 ndr->flags = _flags_save_string;
10427 uint32_t _flags_save_string = ndr->flags;
10428 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10429 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
10430 ndr->flags = _flags_save_string;
10433 uint32_t _flags_save_string = ndr->flags;
10434 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10435 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
10436 ndr->flags = _flags_save_string;
10439 uint32_t _flags_save_string = ndr->flags;
10440 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10441 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
10442 ndr->flags = _flags_save_string;
10445 if (ndr_flags & NDR_BUFFERS) {
10447 uint32_t _flags_save_string = ndr->flags;
10448 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10449 if (r->driver_name) {
10450 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
10451 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
10453 ndr->flags = _flags_save_string;
10456 uint32_t _flags_save_string = ndr->flags;
10457 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10458 if (r->architecture) {
10459 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->architecture));
10460 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
10462 ndr->flags = _flags_save_string;
10465 uint32_t _flags_save_string = ndr->flags;
10466 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10467 if (r->driver_path) {
10468 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_path));
10469 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
10471 ndr->flags = _flags_save_string;
10474 uint32_t _flags_save_string = ndr->flags;
10475 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10476 if (r->data_file) {
10477 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_file));
10478 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
10480 ndr->flags = _flags_save_string;
10483 uint32_t _flags_save_string = ndr->flags;
10484 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10485 if (r->config_file) {
10486 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->config_file));
10487 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
10489 ndr->flags = _flags_save_string;
10492 return NDR_ERR_SUCCESS;
10495 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo2 *r)
10497 uint32_t _ptr_driver_name;
10498 TALLOC_CTX *_mem_save_driver_name_0;
10499 uint32_t _ptr_architecture;
10500 TALLOC_CTX *_mem_save_architecture_0;
10501 uint32_t _ptr_driver_path;
10502 TALLOC_CTX *_mem_save_driver_path_0;
10503 uint32_t _ptr_data_file;
10504 TALLOC_CTX *_mem_save_data_file_0;
10505 uint32_t _ptr_config_file;
10506 TALLOC_CTX *_mem_save_config_file_0;
10507 if (ndr_flags & NDR_SCALARS) {
10508 NDR_CHECK(ndr_pull_align(ndr, 4));
10509 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
10511 uint32_t _flags_save_string = ndr->flags;
10512 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10513 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
10514 if (_ptr_driver_name) {
10515 NDR_PULL_ALLOC(ndr, r->driver_name);
10516 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
10517 } else {
10518 r->driver_name = NULL;
10520 ndr->flags = _flags_save_string;
10523 uint32_t _flags_save_string = ndr->flags;
10524 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10525 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
10526 if (_ptr_architecture) {
10527 NDR_PULL_ALLOC(ndr, r->architecture);
10528 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
10529 } else {
10530 r->architecture = NULL;
10532 ndr->flags = _flags_save_string;
10535 uint32_t _flags_save_string = ndr->flags;
10536 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10537 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
10538 if (_ptr_driver_path) {
10539 NDR_PULL_ALLOC(ndr, r->driver_path);
10540 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
10541 } else {
10542 r->driver_path = NULL;
10544 ndr->flags = _flags_save_string;
10547 uint32_t _flags_save_string = ndr->flags;
10548 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10549 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
10550 if (_ptr_data_file) {
10551 NDR_PULL_ALLOC(ndr, r->data_file);
10552 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
10553 } else {
10554 r->data_file = NULL;
10556 ndr->flags = _flags_save_string;
10559 uint32_t _flags_save_string = ndr->flags;
10560 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10561 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
10562 if (_ptr_config_file) {
10563 NDR_PULL_ALLOC(ndr, r->config_file);
10564 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
10565 } else {
10566 r->config_file = NULL;
10568 ndr->flags = _flags_save_string;
10571 if (ndr_flags & NDR_BUFFERS) {
10573 uint32_t _flags_save_string = ndr->flags;
10574 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10575 if (r->driver_name) {
10576 uint32_t _relative_save_offset;
10577 _relative_save_offset = ndr->offset;
10578 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
10579 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10580 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
10581 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
10582 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
10583 ndr->offset = _relative_save_offset;
10585 ndr->flags = _flags_save_string;
10588 uint32_t _flags_save_string = ndr->flags;
10589 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10590 if (r->architecture) {
10591 uint32_t _relative_save_offset;
10592 _relative_save_offset = ndr->offset;
10593 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
10594 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
10595 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
10596 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
10597 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
10598 ndr->offset = _relative_save_offset;
10600 ndr->flags = _flags_save_string;
10603 uint32_t _flags_save_string = ndr->flags;
10604 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10605 if (r->driver_path) {
10606 uint32_t _relative_save_offset;
10607 _relative_save_offset = ndr->offset;
10608 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
10609 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
10610 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
10611 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
10612 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
10613 ndr->offset = _relative_save_offset;
10615 ndr->flags = _flags_save_string;
10618 uint32_t _flags_save_string = ndr->flags;
10619 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10620 if (r->data_file) {
10621 uint32_t _relative_save_offset;
10622 _relative_save_offset = ndr->offset;
10623 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
10624 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
10625 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
10626 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
10627 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
10628 ndr->offset = _relative_save_offset;
10630 ndr->flags = _flags_save_string;
10633 uint32_t _flags_save_string = ndr->flags;
10634 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10635 if (r->config_file) {
10636 uint32_t _relative_save_offset;
10637 _relative_save_offset = ndr->offset;
10638 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
10639 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
10640 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
10641 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
10642 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
10643 ndr->offset = _relative_save_offset;
10645 ndr->flags = _flags_save_string;
10648 return NDR_ERR_SUCCESS;
10651 _PUBLIC_ void ndr_print_spoolss_DriverInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo2 *r)
10653 ndr_print_struct(ndr, name, "spoolss_DriverInfo2");
10654 ndr->depth++;
10655 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
10656 ndr_print_ptr(ndr, "driver_name", r->driver_name);
10657 ndr->depth++;
10658 if (r->driver_name) {
10659 ndr_print_string(ndr, "driver_name", r->driver_name);
10661 ndr->depth--;
10662 ndr_print_ptr(ndr, "architecture", r->architecture);
10663 ndr->depth++;
10664 if (r->architecture) {
10665 ndr_print_string(ndr, "architecture", r->architecture);
10667 ndr->depth--;
10668 ndr_print_ptr(ndr, "driver_path", r->driver_path);
10669 ndr->depth++;
10670 if (r->driver_path) {
10671 ndr_print_string(ndr, "driver_path", r->driver_path);
10673 ndr->depth--;
10674 ndr_print_ptr(ndr, "data_file", r->data_file);
10675 ndr->depth++;
10676 if (r->data_file) {
10677 ndr_print_string(ndr, "data_file", r->data_file);
10679 ndr->depth--;
10680 ndr_print_ptr(ndr, "config_file", r->config_file);
10681 ndr->depth++;
10682 if (r->config_file) {
10683 ndr_print_string(ndr, "config_file", r->config_file);
10685 ndr->depth--;
10686 ndr->depth--;
10689 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo2(const struct spoolss_DriverInfo2 *r, struct smb_iconv_convenience *ic, int flags)
10691 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo2, ic);
10694 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo3 *r)
10696 if (ndr_flags & NDR_SCALARS) {
10697 NDR_CHECK(ndr_push_align(ndr, 4));
10698 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
10700 uint32_t _flags_save_string = ndr->flags;
10701 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10702 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
10703 ndr->flags = _flags_save_string;
10706 uint32_t _flags_save_string = ndr->flags;
10707 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10708 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
10709 ndr->flags = _flags_save_string;
10712 uint32_t _flags_save_string = ndr->flags;
10713 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10714 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
10715 ndr->flags = _flags_save_string;
10718 uint32_t _flags_save_string = ndr->flags;
10719 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10720 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
10721 ndr->flags = _flags_save_string;
10724 uint32_t _flags_save_string = ndr->flags;
10725 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10726 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
10727 ndr->flags = _flags_save_string;
10730 uint32_t _flags_save_string = ndr->flags;
10731 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10732 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
10733 ndr->flags = _flags_save_string;
10736 uint32_t _flags_save_string_array = ndr->flags;
10737 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10738 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
10739 ndr->flags = _flags_save_string_array;
10742 uint32_t _flags_save_string = ndr->flags;
10743 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10744 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
10745 ndr->flags = _flags_save_string;
10748 uint32_t _flags_save_string = ndr->flags;
10749 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10750 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
10751 ndr->flags = _flags_save_string;
10754 if (ndr_flags & NDR_BUFFERS) {
10756 uint32_t _flags_save_string = ndr->flags;
10757 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10758 if (r->driver_name) {
10759 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
10760 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
10762 ndr->flags = _flags_save_string;
10765 uint32_t _flags_save_string = ndr->flags;
10766 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10767 if (r->architecture) {
10768 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->architecture));
10769 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
10771 ndr->flags = _flags_save_string;
10774 uint32_t _flags_save_string = ndr->flags;
10775 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10776 if (r->driver_path) {
10777 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_path));
10778 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
10780 ndr->flags = _flags_save_string;
10783 uint32_t _flags_save_string = ndr->flags;
10784 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10785 if (r->data_file) {
10786 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_file));
10787 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
10789 ndr->flags = _flags_save_string;
10792 uint32_t _flags_save_string = ndr->flags;
10793 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10794 if (r->config_file) {
10795 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->config_file));
10796 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
10798 ndr->flags = _flags_save_string;
10801 uint32_t _flags_save_string = ndr->flags;
10802 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10803 if (r->help_file) {
10804 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->help_file));
10805 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->help_file));
10807 ndr->flags = _flags_save_string;
10810 uint32_t _flags_save_string_array = ndr->flags;
10811 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10812 if (r->dependent_files) {
10813 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dependent_files));
10814 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
10816 ndr->flags = _flags_save_string_array;
10819 uint32_t _flags_save_string = ndr->flags;
10820 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10821 if (r->monitor_name) {
10822 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->monitor_name));
10823 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
10825 ndr->flags = _flags_save_string;
10828 uint32_t _flags_save_string = ndr->flags;
10829 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10830 if (r->default_datatype) {
10831 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->default_datatype));
10832 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
10834 ndr->flags = _flags_save_string;
10837 return NDR_ERR_SUCCESS;
10840 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo3 *r)
10842 uint32_t _ptr_driver_name;
10843 TALLOC_CTX *_mem_save_driver_name_0;
10844 uint32_t _ptr_architecture;
10845 TALLOC_CTX *_mem_save_architecture_0;
10846 uint32_t _ptr_driver_path;
10847 TALLOC_CTX *_mem_save_driver_path_0;
10848 uint32_t _ptr_data_file;
10849 TALLOC_CTX *_mem_save_data_file_0;
10850 uint32_t _ptr_config_file;
10851 TALLOC_CTX *_mem_save_config_file_0;
10852 uint32_t _ptr_help_file;
10853 TALLOC_CTX *_mem_save_help_file_0;
10854 uint32_t _ptr_dependent_files;
10855 TALLOC_CTX *_mem_save_dependent_files_0;
10856 uint32_t _ptr_monitor_name;
10857 TALLOC_CTX *_mem_save_monitor_name_0;
10858 uint32_t _ptr_default_datatype;
10859 TALLOC_CTX *_mem_save_default_datatype_0;
10860 if (ndr_flags & NDR_SCALARS) {
10861 NDR_CHECK(ndr_pull_align(ndr, 4));
10862 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
10864 uint32_t _flags_save_string = ndr->flags;
10865 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10866 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
10867 if (_ptr_driver_name) {
10868 NDR_PULL_ALLOC(ndr, r->driver_name);
10869 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
10870 } else {
10871 r->driver_name = NULL;
10873 ndr->flags = _flags_save_string;
10876 uint32_t _flags_save_string = ndr->flags;
10877 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10878 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
10879 if (_ptr_architecture) {
10880 NDR_PULL_ALLOC(ndr, r->architecture);
10881 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
10882 } else {
10883 r->architecture = NULL;
10885 ndr->flags = _flags_save_string;
10888 uint32_t _flags_save_string = ndr->flags;
10889 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10890 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
10891 if (_ptr_driver_path) {
10892 NDR_PULL_ALLOC(ndr, r->driver_path);
10893 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
10894 } else {
10895 r->driver_path = NULL;
10897 ndr->flags = _flags_save_string;
10900 uint32_t _flags_save_string = ndr->flags;
10901 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10902 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
10903 if (_ptr_data_file) {
10904 NDR_PULL_ALLOC(ndr, r->data_file);
10905 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
10906 } else {
10907 r->data_file = NULL;
10909 ndr->flags = _flags_save_string;
10912 uint32_t _flags_save_string = ndr->flags;
10913 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10914 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
10915 if (_ptr_config_file) {
10916 NDR_PULL_ALLOC(ndr, r->config_file);
10917 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
10918 } else {
10919 r->config_file = NULL;
10921 ndr->flags = _flags_save_string;
10924 uint32_t _flags_save_string = ndr->flags;
10925 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10926 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
10927 if (_ptr_help_file) {
10928 NDR_PULL_ALLOC(ndr, r->help_file);
10929 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->help_file, _ptr_help_file));
10930 } else {
10931 r->help_file = NULL;
10933 ndr->flags = _flags_save_string;
10936 uint32_t _flags_save_string_array = ndr->flags;
10937 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10938 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
10939 if (_ptr_dependent_files) {
10940 NDR_PULL_ALLOC(ndr, r->dependent_files);
10941 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
10942 } else {
10943 r->dependent_files = NULL;
10945 ndr->flags = _flags_save_string_array;
10948 uint32_t _flags_save_string = ndr->flags;
10949 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10950 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
10951 if (_ptr_monitor_name) {
10952 NDR_PULL_ALLOC(ndr, r->monitor_name);
10953 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
10954 } else {
10955 r->monitor_name = NULL;
10957 ndr->flags = _flags_save_string;
10960 uint32_t _flags_save_string = ndr->flags;
10961 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10962 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
10963 if (_ptr_default_datatype) {
10964 NDR_PULL_ALLOC(ndr, r->default_datatype);
10965 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->default_datatype, _ptr_default_datatype));
10966 } else {
10967 r->default_datatype = NULL;
10969 ndr->flags = _flags_save_string;
10972 if (ndr_flags & NDR_BUFFERS) {
10974 uint32_t _flags_save_string = ndr->flags;
10975 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10976 if (r->driver_name) {
10977 uint32_t _relative_save_offset;
10978 _relative_save_offset = ndr->offset;
10979 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
10980 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
10981 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
10982 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
10983 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
10984 ndr->offset = _relative_save_offset;
10986 ndr->flags = _flags_save_string;
10989 uint32_t _flags_save_string = ndr->flags;
10990 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
10991 if (r->architecture) {
10992 uint32_t _relative_save_offset;
10993 _relative_save_offset = ndr->offset;
10994 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
10995 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
10996 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
10997 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
10998 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
10999 ndr->offset = _relative_save_offset;
11001 ndr->flags = _flags_save_string;
11004 uint32_t _flags_save_string = ndr->flags;
11005 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11006 if (r->driver_path) {
11007 uint32_t _relative_save_offset;
11008 _relative_save_offset = ndr->offset;
11009 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
11010 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
11011 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
11012 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
11013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
11014 ndr->offset = _relative_save_offset;
11016 ndr->flags = _flags_save_string;
11019 uint32_t _flags_save_string = ndr->flags;
11020 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11021 if (r->data_file) {
11022 uint32_t _relative_save_offset;
11023 _relative_save_offset = ndr->offset;
11024 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
11025 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11026 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
11027 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
11028 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
11029 ndr->offset = _relative_save_offset;
11031 ndr->flags = _flags_save_string;
11034 uint32_t _flags_save_string = ndr->flags;
11035 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11036 if (r->config_file) {
11037 uint32_t _relative_save_offset;
11038 _relative_save_offset = ndr->offset;
11039 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
11040 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11041 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
11042 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
11043 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
11044 ndr->offset = _relative_save_offset;
11046 ndr->flags = _flags_save_string;
11049 uint32_t _flags_save_string = ndr->flags;
11050 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11051 if (r->help_file) {
11052 uint32_t _relative_save_offset;
11053 _relative_save_offset = ndr->offset;
11054 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->help_file));
11055 _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11056 NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
11057 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->help_file));
11058 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
11059 ndr->offset = _relative_save_offset;
11061 ndr->flags = _flags_save_string;
11064 uint32_t _flags_save_string_array = ndr->flags;
11065 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11066 if (r->dependent_files) {
11067 uint32_t _relative_save_offset;
11068 _relative_save_offset = ndr->offset;
11069 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
11070 _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
11071 NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
11072 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
11073 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
11074 ndr->offset = _relative_save_offset;
11076 ndr->flags = _flags_save_string_array;
11079 uint32_t _flags_save_string = ndr->flags;
11080 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11081 if (r->monitor_name) {
11082 uint32_t _relative_save_offset;
11083 _relative_save_offset = ndr->offset;
11084 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
11085 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11086 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
11087 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
11088 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
11089 ndr->offset = _relative_save_offset;
11091 ndr->flags = _flags_save_string;
11094 uint32_t _flags_save_string = ndr->flags;
11095 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11096 if (r->default_datatype) {
11097 uint32_t _relative_save_offset;
11098 _relative_save_offset = ndr->offset;
11099 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->default_datatype));
11100 _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
11101 NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
11102 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->default_datatype));
11103 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
11104 ndr->offset = _relative_save_offset;
11106 ndr->flags = _flags_save_string;
11109 return NDR_ERR_SUCCESS;
11112 _PUBLIC_ void ndr_print_spoolss_DriverInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo3 *r)
11114 ndr_print_struct(ndr, name, "spoolss_DriverInfo3");
11115 ndr->depth++;
11116 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
11117 ndr_print_ptr(ndr, "driver_name", r->driver_name);
11118 ndr->depth++;
11119 if (r->driver_name) {
11120 ndr_print_string(ndr, "driver_name", r->driver_name);
11122 ndr->depth--;
11123 ndr_print_ptr(ndr, "architecture", r->architecture);
11124 ndr->depth++;
11125 if (r->architecture) {
11126 ndr_print_string(ndr, "architecture", r->architecture);
11128 ndr->depth--;
11129 ndr_print_ptr(ndr, "driver_path", r->driver_path);
11130 ndr->depth++;
11131 if (r->driver_path) {
11132 ndr_print_string(ndr, "driver_path", r->driver_path);
11134 ndr->depth--;
11135 ndr_print_ptr(ndr, "data_file", r->data_file);
11136 ndr->depth++;
11137 if (r->data_file) {
11138 ndr_print_string(ndr, "data_file", r->data_file);
11140 ndr->depth--;
11141 ndr_print_ptr(ndr, "config_file", r->config_file);
11142 ndr->depth++;
11143 if (r->config_file) {
11144 ndr_print_string(ndr, "config_file", r->config_file);
11146 ndr->depth--;
11147 ndr_print_ptr(ndr, "help_file", r->help_file);
11148 ndr->depth++;
11149 if (r->help_file) {
11150 ndr_print_string(ndr, "help_file", r->help_file);
11152 ndr->depth--;
11153 ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
11154 ndr->depth++;
11155 if (r->dependent_files) {
11156 ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
11158 ndr->depth--;
11159 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
11160 ndr->depth++;
11161 if (r->monitor_name) {
11162 ndr_print_string(ndr, "monitor_name", r->monitor_name);
11164 ndr->depth--;
11165 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
11166 ndr->depth++;
11167 if (r->default_datatype) {
11168 ndr_print_string(ndr, "default_datatype", r->default_datatype);
11170 ndr->depth--;
11171 ndr->depth--;
11174 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo3(const struct spoolss_DriverInfo3 *r, struct smb_iconv_convenience *ic, int flags)
11176 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo3, ic);
11179 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo4 *r)
11181 if (ndr_flags & NDR_SCALARS) {
11182 NDR_CHECK(ndr_push_align(ndr, 4));
11183 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
11185 uint32_t _flags_save_string = ndr->flags;
11186 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11187 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
11188 ndr->flags = _flags_save_string;
11191 uint32_t _flags_save_string = ndr->flags;
11192 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11193 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
11194 ndr->flags = _flags_save_string;
11197 uint32_t _flags_save_string = ndr->flags;
11198 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11199 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
11200 ndr->flags = _flags_save_string;
11203 uint32_t _flags_save_string = ndr->flags;
11204 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11205 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
11206 ndr->flags = _flags_save_string;
11209 uint32_t _flags_save_string = ndr->flags;
11210 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11211 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
11212 ndr->flags = _flags_save_string;
11215 uint32_t _flags_save_string = ndr->flags;
11216 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11217 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
11218 ndr->flags = _flags_save_string;
11221 uint32_t _flags_save_string_array = ndr->flags;
11222 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11223 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
11224 ndr->flags = _flags_save_string_array;
11227 uint32_t _flags_save_string = ndr->flags;
11228 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11229 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
11230 ndr->flags = _flags_save_string;
11233 uint32_t _flags_save_string = ndr->flags;
11234 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11235 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
11236 ndr->flags = _flags_save_string;
11239 uint32_t _flags_save_string_array = ndr->flags;
11240 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11241 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->previous_names));
11242 ndr->flags = _flags_save_string_array;
11245 if (ndr_flags & NDR_BUFFERS) {
11247 uint32_t _flags_save_string = ndr->flags;
11248 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11249 if (r->driver_name) {
11250 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
11251 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
11253 ndr->flags = _flags_save_string;
11256 uint32_t _flags_save_string = ndr->flags;
11257 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11258 if (r->architecture) {
11259 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->architecture));
11260 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
11262 ndr->flags = _flags_save_string;
11265 uint32_t _flags_save_string = ndr->flags;
11266 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11267 if (r->driver_path) {
11268 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_path));
11269 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
11271 ndr->flags = _flags_save_string;
11274 uint32_t _flags_save_string = ndr->flags;
11275 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11276 if (r->data_file) {
11277 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_file));
11278 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
11280 ndr->flags = _flags_save_string;
11283 uint32_t _flags_save_string = ndr->flags;
11284 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11285 if (r->config_file) {
11286 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->config_file));
11287 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
11289 ndr->flags = _flags_save_string;
11292 uint32_t _flags_save_string = ndr->flags;
11293 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11294 if (r->help_file) {
11295 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->help_file));
11296 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->help_file));
11298 ndr->flags = _flags_save_string;
11301 uint32_t _flags_save_string_array = ndr->flags;
11302 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11303 if (r->dependent_files) {
11304 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dependent_files));
11305 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
11307 ndr->flags = _flags_save_string_array;
11310 uint32_t _flags_save_string = ndr->flags;
11311 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11312 if (r->monitor_name) {
11313 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->monitor_name));
11314 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
11316 ndr->flags = _flags_save_string;
11319 uint32_t _flags_save_string = ndr->flags;
11320 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11321 if (r->default_datatype) {
11322 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->default_datatype));
11323 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
11325 ndr->flags = _flags_save_string;
11328 uint32_t _flags_save_string_array = ndr->flags;
11329 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11330 if (r->previous_names) {
11331 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->previous_names));
11332 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->previous_names));
11334 ndr->flags = _flags_save_string_array;
11337 return NDR_ERR_SUCCESS;
11340 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo4 *r)
11342 uint32_t _ptr_driver_name;
11343 TALLOC_CTX *_mem_save_driver_name_0;
11344 uint32_t _ptr_architecture;
11345 TALLOC_CTX *_mem_save_architecture_0;
11346 uint32_t _ptr_driver_path;
11347 TALLOC_CTX *_mem_save_driver_path_0;
11348 uint32_t _ptr_data_file;
11349 TALLOC_CTX *_mem_save_data_file_0;
11350 uint32_t _ptr_config_file;
11351 TALLOC_CTX *_mem_save_config_file_0;
11352 uint32_t _ptr_help_file;
11353 TALLOC_CTX *_mem_save_help_file_0;
11354 uint32_t _ptr_dependent_files;
11355 TALLOC_CTX *_mem_save_dependent_files_0;
11356 uint32_t _ptr_monitor_name;
11357 TALLOC_CTX *_mem_save_monitor_name_0;
11358 uint32_t _ptr_default_datatype;
11359 TALLOC_CTX *_mem_save_default_datatype_0;
11360 uint32_t _ptr_previous_names;
11361 TALLOC_CTX *_mem_save_previous_names_0;
11362 if (ndr_flags & NDR_SCALARS) {
11363 NDR_CHECK(ndr_pull_align(ndr, 4));
11364 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
11366 uint32_t _flags_save_string = ndr->flags;
11367 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11368 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
11369 if (_ptr_driver_name) {
11370 NDR_PULL_ALLOC(ndr, r->driver_name);
11371 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
11372 } else {
11373 r->driver_name = NULL;
11375 ndr->flags = _flags_save_string;
11378 uint32_t _flags_save_string = ndr->flags;
11379 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11380 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
11381 if (_ptr_architecture) {
11382 NDR_PULL_ALLOC(ndr, r->architecture);
11383 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
11384 } else {
11385 r->architecture = NULL;
11387 ndr->flags = _flags_save_string;
11390 uint32_t _flags_save_string = ndr->flags;
11391 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11392 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
11393 if (_ptr_driver_path) {
11394 NDR_PULL_ALLOC(ndr, r->driver_path);
11395 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
11396 } else {
11397 r->driver_path = NULL;
11399 ndr->flags = _flags_save_string;
11402 uint32_t _flags_save_string = ndr->flags;
11403 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11404 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
11405 if (_ptr_data_file) {
11406 NDR_PULL_ALLOC(ndr, r->data_file);
11407 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
11408 } else {
11409 r->data_file = NULL;
11411 ndr->flags = _flags_save_string;
11414 uint32_t _flags_save_string = ndr->flags;
11415 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11416 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
11417 if (_ptr_config_file) {
11418 NDR_PULL_ALLOC(ndr, r->config_file);
11419 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
11420 } else {
11421 r->config_file = NULL;
11423 ndr->flags = _flags_save_string;
11426 uint32_t _flags_save_string = ndr->flags;
11427 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11428 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
11429 if (_ptr_help_file) {
11430 NDR_PULL_ALLOC(ndr, r->help_file);
11431 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->help_file, _ptr_help_file));
11432 } else {
11433 r->help_file = NULL;
11435 ndr->flags = _flags_save_string;
11438 uint32_t _flags_save_string_array = ndr->flags;
11439 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11440 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
11441 if (_ptr_dependent_files) {
11442 NDR_PULL_ALLOC(ndr, r->dependent_files);
11443 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
11444 } else {
11445 r->dependent_files = NULL;
11447 ndr->flags = _flags_save_string_array;
11450 uint32_t _flags_save_string = ndr->flags;
11451 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11452 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
11453 if (_ptr_monitor_name) {
11454 NDR_PULL_ALLOC(ndr, r->monitor_name);
11455 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
11456 } else {
11457 r->monitor_name = NULL;
11459 ndr->flags = _flags_save_string;
11462 uint32_t _flags_save_string = ndr->flags;
11463 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11464 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
11465 if (_ptr_default_datatype) {
11466 NDR_PULL_ALLOC(ndr, r->default_datatype);
11467 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->default_datatype, _ptr_default_datatype));
11468 } else {
11469 r->default_datatype = NULL;
11471 ndr->flags = _flags_save_string;
11474 uint32_t _flags_save_string_array = ndr->flags;
11475 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11476 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
11477 if (_ptr_previous_names) {
11478 NDR_PULL_ALLOC(ndr, r->previous_names);
11479 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous_names, _ptr_previous_names));
11480 } else {
11481 r->previous_names = NULL;
11483 ndr->flags = _flags_save_string_array;
11486 if (ndr_flags & NDR_BUFFERS) {
11488 uint32_t _flags_save_string = ndr->flags;
11489 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11490 if (r->driver_name) {
11491 uint32_t _relative_save_offset;
11492 _relative_save_offset = ndr->offset;
11493 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
11494 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11495 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
11496 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
11497 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
11498 ndr->offset = _relative_save_offset;
11500 ndr->flags = _flags_save_string;
11503 uint32_t _flags_save_string = ndr->flags;
11504 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11505 if (r->architecture) {
11506 uint32_t _relative_save_offset;
11507 _relative_save_offset = ndr->offset;
11508 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
11509 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
11510 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
11511 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
11512 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
11513 ndr->offset = _relative_save_offset;
11515 ndr->flags = _flags_save_string;
11518 uint32_t _flags_save_string = ndr->flags;
11519 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11520 if (r->driver_path) {
11521 uint32_t _relative_save_offset;
11522 _relative_save_offset = ndr->offset;
11523 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
11524 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
11525 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
11526 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
11527 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
11528 ndr->offset = _relative_save_offset;
11530 ndr->flags = _flags_save_string;
11533 uint32_t _flags_save_string = ndr->flags;
11534 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11535 if (r->data_file) {
11536 uint32_t _relative_save_offset;
11537 _relative_save_offset = ndr->offset;
11538 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
11539 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11540 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
11541 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
11542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
11543 ndr->offset = _relative_save_offset;
11545 ndr->flags = _flags_save_string;
11548 uint32_t _flags_save_string = ndr->flags;
11549 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11550 if (r->config_file) {
11551 uint32_t _relative_save_offset;
11552 _relative_save_offset = ndr->offset;
11553 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
11554 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11555 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
11556 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
11557 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
11558 ndr->offset = _relative_save_offset;
11560 ndr->flags = _flags_save_string;
11563 uint32_t _flags_save_string = ndr->flags;
11564 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11565 if (r->help_file) {
11566 uint32_t _relative_save_offset;
11567 _relative_save_offset = ndr->offset;
11568 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->help_file));
11569 _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11570 NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
11571 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->help_file));
11572 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
11573 ndr->offset = _relative_save_offset;
11575 ndr->flags = _flags_save_string;
11578 uint32_t _flags_save_string_array = ndr->flags;
11579 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11580 if (r->dependent_files) {
11581 uint32_t _relative_save_offset;
11582 _relative_save_offset = ndr->offset;
11583 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
11584 _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
11585 NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
11586 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
11587 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
11588 ndr->offset = _relative_save_offset;
11590 ndr->flags = _flags_save_string_array;
11593 uint32_t _flags_save_string = ndr->flags;
11594 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11595 if (r->monitor_name) {
11596 uint32_t _relative_save_offset;
11597 _relative_save_offset = ndr->offset;
11598 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
11599 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11600 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
11601 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
11602 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
11603 ndr->offset = _relative_save_offset;
11605 ndr->flags = _flags_save_string;
11608 uint32_t _flags_save_string = ndr->flags;
11609 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11610 if (r->default_datatype) {
11611 uint32_t _relative_save_offset;
11612 _relative_save_offset = ndr->offset;
11613 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->default_datatype));
11614 _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
11615 NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
11616 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->default_datatype));
11617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
11618 ndr->offset = _relative_save_offset;
11620 ndr->flags = _flags_save_string;
11623 uint32_t _flags_save_string_array = ndr->flags;
11624 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11625 if (r->previous_names) {
11626 uint32_t _relative_save_offset;
11627 _relative_save_offset = ndr->offset;
11628 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous_names));
11629 _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
11630 NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
11631 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->previous_names));
11632 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
11633 ndr->offset = _relative_save_offset;
11635 ndr->flags = _flags_save_string_array;
11638 return NDR_ERR_SUCCESS;
11641 _PUBLIC_ void ndr_print_spoolss_DriverInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo4 *r)
11643 ndr_print_struct(ndr, name, "spoolss_DriverInfo4");
11644 ndr->depth++;
11645 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
11646 ndr_print_ptr(ndr, "driver_name", r->driver_name);
11647 ndr->depth++;
11648 if (r->driver_name) {
11649 ndr_print_string(ndr, "driver_name", r->driver_name);
11651 ndr->depth--;
11652 ndr_print_ptr(ndr, "architecture", r->architecture);
11653 ndr->depth++;
11654 if (r->architecture) {
11655 ndr_print_string(ndr, "architecture", r->architecture);
11657 ndr->depth--;
11658 ndr_print_ptr(ndr, "driver_path", r->driver_path);
11659 ndr->depth++;
11660 if (r->driver_path) {
11661 ndr_print_string(ndr, "driver_path", r->driver_path);
11663 ndr->depth--;
11664 ndr_print_ptr(ndr, "data_file", r->data_file);
11665 ndr->depth++;
11666 if (r->data_file) {
11667 ndr_print_string(ndr, "data_file", r->data_file);
11669 ndr->depth--;
11670 ndr_print_ptr(ndr, "config_file", r->config_file);
11671 ndr->depth++;
11672 if (r->config_file) {
11673 ndr_print_string(ndr, "config_file", r->config_file);
11675 ndr->depth--;
11676 ndr_print_ptr(ndr, "help_file", r->help_file);
11677 ndr->depth++;
11678 if (r->help_file) {
11679 ndr_print_string(ndr, "help_file", r->help_file);
11681 ndr->depth--;
11682 ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
11683 ndr->depth++;
11684 if (r->dependent_files) {
11685 ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
11687 ndr->depth--;
11688 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
11689 ndr->depth++;
11690 if (r->monitor_name) {
11691 ndr_print_string(ndr, "monitor_name", r->monitor_name);
11693 ndr->depth--;
11694 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
11695 ndr->depth++;
11696 if (r->default_datatype) {
11697 ndr_print_string(ndr, "default_datatype", r->default_datatype);
11699 ndr->depth--;
11700 ndr_print_ptr(ndr, "previous_names", r->previous_names);
11701 ndr->depth++;
11702 if (r->previous_names) {
11703 ndr_print_string_array(ndr, "previous_names", r->previous_names);
11705 ndr->depth--;
11706 ndr->depth--;
11709 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo4(const struct spoolss_DriverInfo4 *r, struct smb_iconv_convenience *ic, int flags)
11711 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo4, ic);
11714 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo5(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo5 *r)
11716 if (ndr_flags & NDR_SCALARS) {
11717 NDR_CHECK(ndr_push_align(ndr, 4));
11718 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
11720 uint32_t _flags_save_string = ndr->flags;
11721 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11722 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
11723 ndr->flags = _flags_save_string;
11726 uint32_t _flags_save_string = ndr->flags;
11727 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11728 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
11729 ndr->flags = _flags_save_string;
11732 uint32_t _flags_save_string = ndr->flags;
11733 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11734 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
11735 ndr->flags = _flags_save_string;
11738 uint32_t _flags_save_string = ndr->flags;
11739 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11740 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
11741 ndr->flags = _flags_save_string;
11744 uint32_t _flags_save_string = ndr->flags;
11745 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11746 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
11747 ndr->flags = _flags_save_string;
11749 NDR_CHECK(ndr_push_spoolss_DriverAttributes(ndr, NDR_SCALARS, r->driver_attributes));
11750 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->config_version));
11751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->driver_version));
11753 if (ndr_flags & NDR_BUFFERS) {
11755 uint32_t _flags_save_string = ndr->flags;
11756 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11757 if (r->driver_name) {
11758 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
11759 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
11761 ndr->flags = _flags_save_string;
11764 uint32_t _flags_save_string = ndr->flags;
11765 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11766 if (r->architecture) {
11767 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->architecture));
11768 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
11770 ndr->flags = _flags_save_string;
11773 uint32_t _flags_save_string = ndr->flags;
11774 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11775 if (r->driver_path) {
11776 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_path));
11777 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
11779 ndr->flags = _flags_save_string;
11782 uint32_t _flags_save_string = ndr->flags;
11783 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11784 if (r->data_file) {
11785 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_file));
11786 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
11788 ndr->flags = _flags_save_string;
11791 uint32_t _flags_save_string = ndr->flags;
11792 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11793 if (r->config_file) {
11794 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->config_file));
11795 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
11797 ndr->flags = _flags_save_string;
11800 return NDR_ERR_SUCCESS;
11803 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo5(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo5 *r)
11805 uint32_t _ptr_driver_name;
11806 TALLOC_CTX *_mem_save_driver_name_0;
11807 uint32_t _ptr_architecture;
11808 TALLOC_CTX *_mem_save_architecture_0;
11809 uint32_t _ptr_driver_path;
11810 TALLOC_CTX *_mem_save_driver_path_0;
11811 uint32_t _ptr_data_file;
11812 TALLOC_CTX *_mem_save_data_file_0;
11813 uint32_t _ptr_config_file;
11814 TALLOC_CTX *_mem_save_config_file_0;
11815 if (ndr_flags & NDR_SCALARS) {
11816 NDR_CHECK(ndr_pull_align(ndr, 4));
11817 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
11819 uint32_t _flags_save_string = ndr->flags;
11820 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11821 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
11822 if (_ptr_driver_name) {
11823 NDR_PULL_ALLOC(ndr, r->driver_name);
11824 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
11825 } else {
11826 r->driver_name = NULL;
11828 ndr->flags = _flags_save_string;
11831 uint32_t _flags_save_string = ndr->flags;
11832 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11833 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
11834 if (_ptr_architecture) {
11835 NDR_PULL_ALLOC(ndr, r->architecture);
11836 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
11837 } else {
11838 r->architecture = NULL;
11840 ndr->flags = _flags_save_string;
11843 uint32_t _flags_save_string = ndr->flags;
11844 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11845 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
11846 if (_ptr_driver_path) {
11847 NDR_PULL_ALLOC(ndr, r->driver_path);
11848 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
11849 } else {
11850 r->driver_path = NULL;
11852 ndr->flags = _flags_save_string;
11855 uint32_t _flags_save_string = ndr->flags;
11856 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11857 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
11858 if (_ptr_data_file) {
11859 NDR_PULL_ALLOC(ndr, r->data_file);
11860 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
11861 } else {
11862 r->data_file = NULL;
11864 ndr->flags = _flags_save_string;
11867 uint32_t _flags_save_string = ndr->flags;
11868 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11869 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
11870 if (_ptr_config_file) {
11871 NDR_PULL_ALLOC(ndr, r->config_file);
11872 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
11873 } else {
11874 r->config_file = NULL;
11876 ndr->flags = _flags_save_string;
11878 NDR_CHECK(ndr_pull_spoolss_DriverAttributes(ndr, NDR_SCALARS, &r->driver_attributes));
11879 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->config_version));
11880 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->driver_version));
11882 if (ndr_flags & NDR_BUFFERS) {
11884 uint32_t _flags_save_string = ndr->flags;
11885 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11886 if (r->driver_name) {
11887 uint32_t _relative_save_offset;
11888 _relative_save_offset = ndr->offset;
11889 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
11890 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11891 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
11892 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
11893 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
11894 ndr->offset = _relative_save_offset;
11896 ndr->flags = _flags_save_string;
11899 uint32_t _flags_save_string = ndr->flags;
11900 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11901 if (r->architecture) {
11902 uint32_t _relative_save_offset;
11903 _relative_save_offset = ndr->offset;
11904 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
11905 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
11906 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
11907 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
11908 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
11909 ndr->offset = _relative_save_offset;
11911 ndr->flags = _flags_save_string;
11914 uint32_t _flags_save_string = ndr->flags;
11915 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11916 if (r->driver_path) {
11917 uint32_t _relative_save_offset;
11918 _relative_save_offset = ndr->offset;
11919 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
11920 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
11921 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
11922 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
11923 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
11924 ndr->offset = _relative_save_offset;
11926 ndr->flags = _flags_save_string;
11929 uint32_t _flags_save_string = ndr->flags;
11930 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11931 if (r->data_file) {
11932 uint32_t _relative_save_offset;
11933 _relative_save_offset = ndr->offset;
11934 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
11935 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11936 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
11937 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
11938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
11939 ndr->offset = _relative_save_offset;
11941 ndr->flags = _flags_save_string;
11944 uint32_t _flags_save_string = ndr->flags;
11945 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
11946 if (r->config_file) {
11947 uint32_t _relative_save_offset;
11948 _relative_save_offset = ndr->offset;
11949 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
11950 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
11951 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
11952 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
11953 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
11954 ndr->offset = _relative_save_offset;
11956 ndr->flags = _flags_save_string;
11959 return NDR_ERR_SUCCESS;
11962 _PUBLIC_ void ndr_print_spoolss_DriverInfo5(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo5 *r)
11964 ndr_print_struct(ndr, name, "spoolss_DriverInfo5");
11965 ndr->depth++;
11966 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
11967 ndr_print_ptr(ndr, "driver_name", r->driver_name);
11968 ndr->depth++;
11969 if (r->driver_name) {
11970 ndr_print_string(ndr, "driver_name", r->driver_name);
11972 ndr->depth--;
11973 ndr_print_ptr(ndr, "architecture", r->architecture);
11974 ndr->depth++;
11975 if (r->architecture) {
11976 ndr_print_string(ndr, "architecture", r->architecture);
11978 ndr->depth--;
11979 ndr_print_ptr(ndr, "driver_path", r->driver_path);
11980 ndr->depth++;
11981 if (r->driver_path) {
11982 ndr_print_string(ndr, "driver_path", r->driver_path);
11984 ndr->depth--;
11985 ndr_print_ptr(ndr, "data_file", r->data_file);
11986 ndr->depth++;
11987 if (r->data_file) {
11988 ndr_print_string(ndr, "data_file", r->data_file);
11990 ndr->depth--;
11991 ndr_print_ptr(ndr, "config_file", r->config_file);
11992 ndr->depth++;
11993 if (r->config_file) {
11994 ndr_print_string(ndr, "config_file", r->config_file);
11996 ndr->depth--;
11997 ndr_print_spoolss_DriverAttributes(ndr, "driver_attributes", r->driver_attributes);
11998 ndr_print_uint32(ndr, "config_version", r->config_version);
11999 ndr_print_uint32(ndr, "driver_version", r->driver_version);
12000 ndr->depth--;
12003 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo5(const struct spoolss_DriverInfo5 *r, struct smb_iconv_convenience *ic, int flags)
12005 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo5, ic);
12008 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo6(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo6 *r)
12010 if (ndr_flags & NDR_SCALARS) {
12011 NDR_CHECK(ndr_push_align(ndr, 8));
12012 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
12014 uint32_t _flags_save_string = ndr->flags;
12015 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12016 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
12017 ndr->flags = _flags_save_string;
12020 uint32_t _flags_save_string = ndr->flags;
12021 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12022 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
12023 ndr->flags = _flags_save_string;
12026 uint32_t _flags_save_string = ndr->flags;
12027 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12028 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
12029 ndr->flags = _flags_save_string;
12032 uint32_t _flags_save_string = ndr->flags;
12033 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12034 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
12035 ndr->flags = _flags_save_string;
12038 uint32_t _flags_save_string = ndr->flags;
12039 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12040 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
12041 ndr->flags = _flags_save_string;
12044 uint32_t _flags_save_string = ndr->flags;
12045 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12046 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
12047 ndr->flags = _flags_save_string;
12050 uint32_t _flags_save_string_array = ndr->flags;
12051 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12052 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
12053 ndr->flags = _flags_save_string_array;
12056 uint32_t _flags_save_string = ndr->flags;
12057 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12058 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
12059 ndr->flags = _flags_save_string;
12062 uint32_t _flags_save_string = ndr->flags;
12063 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12064 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
12065 ndr->flags = _flags_save_string;
12068 uint32_t _flags_save_string_array = ndr->flags;
12069 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12070 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->previous_names));
12071 ndr->flags = _flags_save_string_array;
12073 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
12074 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
12076 uint32_t _flags_save_string = ndr->flags;
12077 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12078 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->manufacturer_name));
12079 ndr->flags = _flags_save_string;
12082 uint32_t _flags_save_string = ndr->flags;
12083 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12084 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->manufacturer_url));
12085 ndr->flags = _flags_save_string;
12088 uint32_t _flags_save_string = ndr->flags;
12089 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12090 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->hardware_id));
12091 ndr->flags = _flags_save_string;
12094 uint32_t _flags_save_string = ndr->flags;
12095 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12096 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->provider));
12097 ndr->flags = _flags_save_string;
12100 if (ndr_flags & NDR_BUFFERS) {
12102 uint32_t _flags_save_string = ndr->flags;
12103 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12104 if (r->driver_name) {
12105 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
12106 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
12108 ndr->flags = _flags_save_string;
12111 uint32_t _flags_save_string = ndr->flags;
12112 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12113 if (r->architecture) {
12114 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->architecture));
12115 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
12117 ndr->flags = _flags_save_string;
12120 uint32_t _flags_save_string = ndr->flags;
12121 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12122 if (r->driver_path) {
12123 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_path));
12124 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
12126 ndr->flags = _flags_save_string;
12129 uint32_t _flags_save_string = ndr->flags;
12130 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12131 if (r->data_file) {
12132 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_file));
12133 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
12135 ndr->flags = _flags_save_string;
12138 uint32_t _flags_save_string = ndr->flags;
12139 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12140 if (r->config_file) {
12141 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->config_file));
12142 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
12144 ndr->flags = _flags_save_string;
12147 uint32_t _flags_save_string = ndr->flags;
12148 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12149 if (r->help_file) {
12150 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->help_file));
12151 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->help_file));
12153 ndr->flags = _flags_save_string;
12156 uint32_t _flags_save_string_array = ndr->flags;
12157 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12158 if (r->dependent_files) {
12159 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dependent_files));
12160 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
12162 ndr->flags = _flags_save_string_array;
12165 uint32_t _flags_save_string = ndr->flags;
12166 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12167 if (r->monitor_name) {
12168 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->monitor_name));
12169 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
12171 ndr->flags = _flags_save_string;
12174 uint32_t _flags_save_string = ndr->flags;
12175 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12176 if (r->default_datatype) {
12177 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->default_datatype));
12178 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
12180 ndr->flags = _flags_save_string;
12183 uint32_t _flags_save_string_array = ndr->flags;
12184 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12185 if (r->previous_names) {
12186 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->previous_names));
12187 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->previous_names));
12189 ndr->flags = _flags_save_string_array;
12192 uint32_t _flags_save_string = ndr->flags;
12193 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12194 if (r->manufacturer_name) {
12195 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->manufacturer_name));
12196 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_name));
12198 ndr->flags = _flags_save_string;
12201 uint32_t _flags_save_string = ndr->flags;
12202 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12203 if (r->manufacturer_url) {
12204 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->manufacturer_url));
12205 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_url));
12207 ndr->flags = _flags_save_string;
12210 uint32_t _flags_save_string = ndr->flags;
12211 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12212 if (r->hardware_id) {
12213 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->hardware_id));
12214 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->hardware_id));
12216 ndr->flags = _flags_save_string;
12219 uint32_t _flags_save_string = ndr->flags;
12220 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12221 if (r->provider) {
12222 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->provider));
12223 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->provider));
12225 ndr->flags = _flags_save_string;
12228 return NDR_ERR_SUCCESS;
12231 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo6(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo6 *r)
12233 uint32_t _ptr_driver_name;
12234 TALLOC_CTX *_mem_save_driver_name_0;
12235 uint32_t _ptr_architecture;
12236 TALLOC_CTX *_mem_save_architecture_0;
12237 uint32_t _ptr_driver_path;
12238 TALLOC_CTX *_mem_save_driver_path_0;
12239 uint32_t _ptr_data_file;
12240 TALLOC_CTX *_mem_save_data_file_0;
12241 uint32_t _ptr_config_file;
12242 TALLOC_CTX *_mem_save_config_file_0;
12243 uint32_t _ptr_help_file;
12244 TALLOC_CTX *_mem_save_help_file_0;
12245 uint32_t _ptr_dependent_files;
12246 TALLOC_CTX *_mem_save_dependent_files_0;
12247 uint32_t _ptr_monitor_name;
12248 TALLOC_CTX *_mem_save_monitor_name_0;
12249 uint32_t _ptr_default_datatype;
12250 TALLOC_CTX *_mem_save_default_datatype_0;
12251 uint32_t _ptr_previous_names;
12252 TALLOC_CTX *_mem_save_previous_names_0;
12253 uint32_t _ptr_manufacturer_name;
12254 TALLOC_CTX *_mem_save_manufacturer_name_0;
12255 uint32_t _ptr_manufacturer_url;
12256 TALLOC_CTX *_mem_save_manufacturer_url_0;
12257 uint32_t _ptr_hardware_id;
12258 TALLOC_CTX *_mem_save_hardware_id_0;
12259 uint32_t _ptr_provider;
12260 TALLOC_CTX *_mem_save_provider_0;
12261 if (ndr_flags & NDR_SCALARS) {
12262 NDR_CHECK(ndr_pull_align(ndr, 8));
12263 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
12265 uint32_t _flags_save_string = ndr->flags;
12266 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12267 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
12268 if (_ptr_driver_name) {
12269 NDR_PULL_ALLOC(ndr, r->driver_name);
12270 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
12271 } else {
12272 r->driver_name = NULL;
12274 ndr->flags = _flags_save_string;
12277 uint32_t _flags_save_string = ndr->flags;
12278 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12279 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
12280 if (_ptr_architecture) {
12281 NDR_PULL_ALLOC(ndr, r->architecture);
12282 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
12283 } else {
12284 r->architecture = NULL;
12286 ndr->flags = _flags_save_string;
12289 uint32_t _flags_save_string = ndr->flags;
12290 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12291 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
12292 if (_ptr_driver_path) {
12293 NDR_PULL_ALLOC(ndr, r->driver_path);
12294 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
12295 } else {
12296 r->driver_path = NULL;
12298 ndr->flags = _flags_save_string;
12301 uint32_t _flags_save_string = ndr->flags;
12302 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12303 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
12304 if (_ptr_data_file) {
12305 NDR_PULL_ALLOC(ndr, r->data_file);
12306 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
12307 } else {
12308 r->data_file = NULL;
12310 ndr->flags = _flags_save_string;
12313 uint32_t _flags_save_string = ndr->flags;
12314 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12315 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
12316 if (_ptr_config_file) {
12317 NDR_PULL_ALLOC(ndr, r->config_file);
12318 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
12319 } else {
12320 r->config_file = NULL;
12322 ndr->flags = _flags_save_string;
12325 uint32_t _flags_save_string = ndr->flags;
12326 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12327 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
12328 if (_ptr_help_file) {
12329 NDR_PULL_ALLOC(ndr, r->help_file);
12330 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->help_file, _ptr_help_file));
12331 } else {
12332 r->help_file = NULL;
12334 ndr->flags = _flags_save_string;
12337 uint32_t _flags_save_string_array = ndr->flags;
12338 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12339 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
12340 if (_ptr_dependent_files) {
12341 NDR_PULL_ALLOC(ndr, r->dependent_files);
12342 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
12343 } else {
12344 r->dependent_files = NULL;
12346 ndr->flags = _flags_save_string_array;
12349 uint32_t _flags_save_string = ndr->flags;
12350 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12351 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
12352 if (_ptr_monitor_name) {
12353 NDR_PULL_ALLOC(ndr, r->monitor_name);
12354 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
12355 } else {
12356 r->monitor_name = NULL;
12358 ndr->flags = _flags_save_string;
12361 uint32_t _flags_save_string = ndr->flags;
12362 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12363 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
12364 if (_ptr_default_datatype) {
12365 NDR_PULL_ALLOC(ndr, r->default_datatype);
12366 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->default_datatype, _ptr_default_datatype));
12367 } else {
12368 r->default_datatype = NULL;
12370 ndr->flags = _flags_save_string;
12373 uint32_t _flags_save_string_array = ndr->flags;
12374 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12375 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
12376 if (_ptr_previous_names) {
12377 NDR_PULL_ALLOC(ndr, r->previous_names);
12378 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous_names, _ptr_previous_names));
12379 } else {
12380 r->previous_names = NULL;
12382 ndr->flags = _flags_save_string_array;
12384 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
12385 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
12387 uint32_t _flags_save_string = ndr->flags;
12388 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12389 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_name));
12390 if (_ptr_manufacturer_name) {
12391 NDR_PULL_ALLOC(ndr, r->manufacturer_name);
12392 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->manufacturer_name, _ptr_manufacturer_name));
12393 } else {
12394 r->manufacturer_name = NULL;
12396 ndr->flags = _flags_save_string;
12399 uint32_t _flags_save_string = ndr->flags;
12400 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12401 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_url));
12402 if (_ptr_manufacturer_url) {
12403 NDR_PULL_ALLOC(ndr, r->manufacturer_url);
12404 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->manufacturer_url, _ptr_manufacturer_url));
12405 } else {
12406 r->manufacturer_url = NULL;
12408 ndr->flags = _flags_save_string;
12411 uint32_t _flags_save_string = ndr->flags;
12412 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12413 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hardware_id));
12414 if (_ptr_hardware_id) {
12415 NDR_PULL_ALLOC(ndr, r->hardware_id);
12416 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->hardware_id, _ptr_hardware_id));
12417 } else {
12418 r->hardware_id = NULL;
12420 ndr->flags = _flags_save_string;
12423 uint32_t _flags_save_string = ndr->flags;
12424 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12425 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_provider));
12426 if (_ptr_provider) {
12427 NDR_PULL_ALLOC(ndr, r->provider);
12428 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->provider, _ptr_provider));
12429 } else {
12430 r->provider = NULL;
12432 ndr->flags = _flags_save_string;
12435 if (ndr_flags & NDR_BUFFERS) {
12437 uint32_t _flags_save_string = ndr->flags;
12438 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12439 if (r->driver_name) {
12440 uint32_t _relative_save_offset;
12441 _relative_save_offset = ndr->offset;
12442 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
12443 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12444 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
12445 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
12446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
12447 ndr->offset = _relative_save_offset;
12449 ndr->flags = _flags_save_string;
12452 uint32_t _flags_save_string = ndr->flags;
12453 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12454 if (r->architecture) {
12455 uint32_t _relative_save_offset;
12456 _relative_save_offset = ndr->offset;
12457 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
12458 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
12459 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
12460 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
12461 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
12462 ndr->offset = _relative_save_offset;
12464 ndr->flags = _flags_save_string;
12467 uint32_t _flags_save_string = ndr->flags;
12468 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12469 if (r->driver_path) {
12470 uint32_t _relative_save_offset;
12471 _relative_save_offset = ndr->offset;
12472 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
12473 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
12474 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
12475 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
12476 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
12477 ndr->offset = _relative_save_offset;
12479 ndr->flags = _flags_save_string;
12482 uint32_t _flags_save_string = ndr->flags;
12483 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12484 if (r->data_file) {
12485 uint32_t _relative_save_offset;
12486 _relative_save_offset = ndr->offset;
12487 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
12488 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
12489 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
12490 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
12491 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
12492 ndr->offset = _relative_save_offset;
12494 ndr->flags = _flags_save_string;
12497 uint32_t _flags_save_string = ndr->flags;
12498 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12499 if (r->config_file) {
12500 uint32_t _relative_save_offset;
12501 _relative_save_offset = ndr->offset;
12502 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
12503 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
12504 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
12505 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
12506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
12507 ndr->offset = _relative_save_offset;
12509 ndr->flags = _flags_save_string;
12512 uint32_t _flags_save_string = ndr->flags;
12513 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12514 if (r->help_file) {
12515 uint32_t _relative_save_offset;
12516 _relative_save_offset = ndr->offset;
12517 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->help_file));
12518 _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
12519 NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
12520 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->help_file));
12521 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
12522 ndr->offset = _relative_save_offset;
12524 ndr->flags = _flags_save_string;
12527 uint32_t _flags_save_string_array = ndr->flags;
12528 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12529 if (r->dependent_files) {
12530 uint32_t _relative_save_offset;
12531 _relative_save_offset = ndr->offset;
12532 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
12533 _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
12534 NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
12535 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
12536 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
12537 ndr->offset = _relative_save_offset;
12539 ndr->flags = _flags_save_string_array;
12542 uint32_t _flags_save_string = ndr->flags;
12543 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12544 if (r->monitor_name) {
12545 uint32_t _relative_save_offset;
12546 _relative_save_offset = ndr->offset;
12547 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
12548 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12549 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
12550 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
12551 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
12552 ndr->offset = _relative_save_offset;
12554 ndr->flags = _flags_save_string;
12557 uint32_t _flags_save_string = ndr->flags;
12558 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12559 if (r->default_datatype) {
12560 uint32_t _relative_save_offset;
12561 _relative_save_offset = ndr->offset;
12562 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->default_datatype));
12563 _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
12564 NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
12565 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->default_datatype));
12566 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
12567 ndr->offset = _relative_save_offset;
12569 ndr->flags = _flags_save_string;
12572 uint32_t _flags_save_string_array = ndr->flags;
12573 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12574 if (r->previous_names) {
12575 uint32_t _relative_save_offset;
12576 _relative_save_offset = ndr->offset;
12577 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous_names));
12578 _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
12579 NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
12580 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->previous_names));
12581 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
12582 ndr->offset = _relative_save_offset;
12584 ndr->flags = _flags_save_string_array;
12587 uint32_t _flags_save_string = ndr->flags;
12588 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12589 if (r->manufacturer_name) {
12590 uint32_t _relative_save_offset;
12591 _relative_save_offset = ndr->offset;
12592 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->manufacturer_name));
12593 _mem_save_manufacturer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12594 NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_name, 0);
12595 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->manufacturer_name));
12596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_name_0, 0);
12597 ndr->offset = _relative_save_offset;
12599 ndr->flags = _flags_save_string;
12602 uint32_t _flags_save_string = ndr->flags;
12603 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12604 if (r->manufacturer_url) {
12605 uint32_t _relative_save_offset;
12606 _relative_save_offset = ndr->offset;
12607 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->manufacturer_url));
12608 _mem_save_manufacturer_url_0 = NDR_PULL_GET_MEM_CTX(ndr);
12609 NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_url, 0);
12610 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->manufacturer_url));
12611 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_url_0, 0);
12612 ndr->offset = _relative_save_offset;
12614 ndr->flags = _flags_save_string;
12617 uint32_t _flags_save_string = ndr->flags;
12618 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12619 if (r->hardware_id) {
12620 uint32_t _relative_save_offset;
12621 _relative_save_offset = ndr->offset;
12622 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->hardware_id));
12623 _mem_save_hardware_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
12624 NDR_PULL_SET_MEM_CTX(ndr, r->hardware_id, 0);
12625 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->hardware_id));
12626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hardware_id_0, 0);
12627 ndr->offset = _relative_save_offset;
12629 ndr->flags = _flags_save_string;
12632 uint32_t _flags_save_string = ndr->flags;
12633 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12634 if (r->provider) {
12635 uint32_t _relative_save_offset;
12636 _relative_save_offset = ndr->offset;
12637 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->provider));
12638 _mem_save_provider_0 = NDR_PULL_GET_MEM_CTX(ndr);
12639 NDR_PULL_SET_MEM_CTX(ndr, r->provider, 0);
12640 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->provider));
12641 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_provider_0, 0);
12642 ndr->offset = _relative_save_offset;
12644 ndr->flags = _flags_save_string;
12647 return NDR_ERR_SUCCESS;
12650 _PUBLIC_ void ndr_print_spoolss_DriverInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo6 *r)
12652 ndr_print_struct(ndr, name, "spoolss_DriverInfo6");
12653 ndr->depth++;
12654 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
12655 ndr_print_ptr(ndr, "driver_name", r->driver_name);
12656 ndr->depth++;
12657 if (r->driver_name) {
12658 ndr_print_string(ndr, "driver_name", r->driver_name);
12660 ndr->depth--;
12661 ndr_print_ptr(ndr, "architecture", r->architecture);
12662 ndr->depth++;
12663 if (r->architecture) {
12664 ndr_print_string(ndr, "architecture", r->architecture);
12666 ndr->depth--;
12667 ndr_print_ptr(ndr, "driver_path", r->driver_path);
12668 ndr->depth++;
12669 if (r->driver_path) {
12670 ndr_print_string(ndr, "driver_path", r->driver_path);
12672 ndr->depth--;
12673 ndr_print_ptr(ndr, "data_file", r->data_file);
12674 ndr->depth++;
12675 if (r->data_file) {
12676 ndr_print_string(ndr, "data_file", r->data_file);
12678 ndr->depth--;
12679 ndr_print_ptr(ndr, "config_file", r->config_file);
12680 ndr->depth++;
12681 if (r->config_file) {
12682 ndr_print_string(ndr, "config_file", r->config_file);
12684 ndr->depth--;
12685 ndr_print_ptr(ndr, "help_file", r->help_file);
12686 ndr->depth++;
12687 if (r->help_file) {
12688 ndr_print_string(ndr, "help_file", r->help_file);
12690 ndr->depth--;
12691 ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
12692 ndr->depth++;
12693 if (r->dependent_files) {
12694 ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
12696 ndr->depth--;
12697 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
12698 ndr->depth++;
12699 if (r->monitor_name) {
12700 ndr_print_string(ndr, "monitor_name", r->monitor_name);
12702 ndr->depth--;
12703 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
12704 ndr->depth++;
12705 if (r->default_datatype) {
12706 ndr_print_string(ndr, "default_datatype", r->default_datatype);
12708 ndr->depth--;
12709 ndr_print_ptr(ndr, "previous_names", r->previous_names);
12710 ndr->depth++;
12711 if (r->previous_names) {
12712 ndr_print_string_array(ndr, "previous_names", r->previous_names);
12714 ndr->depth--;
12715 ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
12716 ndr_print_hyper(ndr, "driver_version", r->driver_version);
12717 ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
12718 ndr->depth++;
12719 if (r->manufacturer_name) {
12720 ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
12722 ndr->depth--;
12723 ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
12724 ndr->depth++;
12725 if (r->manufacturer_url) {
12726 ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
12728 ndr->depth--;
12729 ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
12730 ndr->depth++;
12731 if (r->hardware_id) {
12732 ndr_print_string(ndr, "hardware_id", r->hardware_id);
12734 ndr->depth--;
12735 ndr_print_ptr(ndr, "provider", r->provider);
12736 ndr->depth++;
12737 if (r->provider) {
12738 ndr_print_string(ndr, "provider", r->provider);
12740 ndr->depth--;
12741 ndr->depth--;
12744 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo6(const struct spoolss_DriverInfo6 *r, struct smb_iconv_convenience *ic, int flags)
12746 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo6, ic);
12749 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo8(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo8 *r)
12751 if (ndr_flags & NDR_SCALARS) {
12752 NDR_CHECK(ndr_push_align(ndr, 8));
12753 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr, NDR_SCALARS, r->version));
12755 uint32_t _flags_save_string = ndr->flags;
12756 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12757 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
12758 ndr->flags = _flags_save_string;
12761 uint32_t _flags_save_string = ndr->flags;
12762 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12763 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->architecture));
12764 ndr->flags = _flags_save_string;
12767 uint32_t _flags_save_string = ndr->flags;
12768 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12769 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_path));
12770 ndr->flags = _flags_save_string;
12773 uint32_t _flags_save_string = ndr->flags;
12774 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12775 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_file));
12776 ndr->flags = _flags_save_string;
12779 uint32_t _flags_save_string = ndr->flags;
12780 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12781 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->config_file));
12782 ndr->flags = _flags_save_string;
12785 uint32_t _flags_save_string = ndr->flags;
12786 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12787 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->help_file));
12788 ndr->flags = _flags_save_string;
12791 uint32_t _flags_save_string = ndr->flags;
12792 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12793 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
12794 ndr->flags = _flags_save_string;
12797 uint32_t _flags_save_string = ndr->flags;
12798 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12799 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->default_datatype));
12800 ndr->flags = _flags_save_string;
12803 uint32_t _flags_save_string_array = ndr->flags;
12804 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12805 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dependent_files));
12806 ndr->flags = _flags_save_string_array;
12809 uint32_t _flags_save_string_array = ndr->flags;
12810 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12811 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->previous_names));
12812 ndr->flags = _flags_save_string_array;
12814 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
12815 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
12817 uint32_t _flags_save_string = ndr->flags;
12818 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12819 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->manufacturer_name));
12820 ndr->flags = _flags_save_string;
12823 uint32_t _flags_save_string = ndr->flags;
12824 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12825 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->manufacturer_url));
12826 ndr->flags = _flags_save_string;
12829 uint32_t _flags_save_string = ndr->flags;
12830 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12831 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->hardware_id));
12832 ndr->flags = _flags_save_string;
12835 uint32_t _flags_save_string = ndr->flags;
12836 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12837 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->provider));
12838 ndr->flags = _flags_save_string;
12841 uint32_t _flags_save_string = ndr->flags;
12842 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12843 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor));
12844 ndr->flags = _flags_save_string;
12847 uint32_t _flags_save_string = ndr->flags;
12848 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12849 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->vendor_setup));
12850 ndr->flags = _flags_save_string;
12853 uint32_t _flags_save_string_array = ndr->flags;
12854 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12855 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->color_profiles));
12856 ndr->flags = _flags_save_string_array;
12859 uint32_t _flags_save_string = ndr->flags;
12860 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12861 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->inf_path));
12862 ndr->flags = _flags_save_string;
12864 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->printer_driver_attributes));
12866 uint32_t _flags_save_string_array = ndr->flags;
12867 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12868 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->core_driver_dependencies));
12869 ndr->flags = _flags_save_string_array;
12871 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->min_inbox_driver_ver_date));
12872 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->min_inbox_driver_ver_version));
12874 if (ndr_flags & NDR_BUFFERS) {
12876 uint32_t _flags_save_string = ndr->flags;
12877 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12878 if (r->driver_name) {
12879 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_name));
12880 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
12882 ndr->flags = _flags_save_string;
12885 uint32_t _flags_save_string = ndr->flags;
12886 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12887 if (r->architecture) {
12888 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->architecture));
12889 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->architecture));
12891 ndr->flags = _flags_save_string;
12894 uint32_t _flags_save_string = ndr->flags;
12895 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12896 if (r->driver_path) {
12897 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->driver_path));
12898 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_path));
12900 ndr->flags = _flags_save_string;
12903 uint32_t _flags_save_string = ndr->flags;
12904 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12905 if (r->data_file) {
12906 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data_file));
12907 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_file));
12909 ndr->flags = _flags_save_string;
12912 uint32_t _flags_save_string = ndr->flags;
12913 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12914 if (r->config_file) {
12915 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->config_file));
12916 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->config_file));
12918 ndr->flags = _flags_save_string;
12921 uint32_t _flags_save_string = ndr->flags;
12922 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12923 if (r->help_file) {
12924 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->help_file));
12925 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->help_file));
12927 ndr->flags = _flags_save_string;
12930 uint32_t _flags_save_string = ndr->flags;
12931 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12932 if (r->monitor_name) {
12933 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->monitor_name));
12934 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
12936 ndr->flags = _flags_save_string;
12939 uint32_t _flags_save_string = ndr->flags;
12940 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12941 if (r->default_datatype) {
12942 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->default_datatype));
12943 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->default_datatype));
12945 ndr->flags = _flags_save_string;
12948 uint32_t _flags_save_string_array = ndr->flags;
12949 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12950 if (r->dependent_files) {
12951 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dependent_files));
12952 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->dependent_files));
12954 ndr->flags = _flags_save_string_array;
12957 uint32_t _flags_save_string_array = ndr->flags;
12958 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12959 if (r->previous_names) {
12960 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->previous_names));
12961 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->previous_names));
12963 ndr->flags = _flags_save_string_array;
12966 uint32_t _flags_save_string = ndr->flags;
12967 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12968 if (r->manufacturer_name) {
12969 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->manufacturer_name));
12970 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_name));
12972 ndr->flags = _flags_save_string;
12975 uint32_t _flags_save_string = ndr->flags;
12976 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12977 if (r->manufacturer_url) {
12978 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->manufacturer_url));
12979 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->manufacturer_url));
12981 ndr->flags = _flags_save_string;
12984 uint32_t _flags_save_string = ndr->flags;
12985 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12986 if (r->hardware_id) {
12987 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->hardware_id));
12988 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->hardware_id));
12990 ndr->flags = _flags_save_string;
12993 uint32_t _flags_save_string = ndr->flags;
12994 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
12995 if (r->provider) {
12996 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->provider));
12997 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->provider));
12999 ndr->flags = _flags_save_string;
13002 uint32_t _flags_save_string = ndr->flags;
13003 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13004 if (r->print_processor) {
13005 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->print_processor));
13006 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor));
13008 ndr->flags = _flags_save_string;
13011 uint32_t _flags_save_string = ndr->flags;
13012 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13013 if (r->vendor_setup) {
13014 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->vendor_setup));
13015 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->vendor_setup));
13017 ndr->flags = _flags_save_string;
13020 uint32_t _flags_save_string_array = ndr->flags;
13021 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13022 if (r->color_profiles) {
13023 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->color_profiles));
13024 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->color_profiles));
13026 ndr->flags = _flags_save_string_array;
13029 uint32_t _flags_save_string = ndr->flags;
13030 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13031 if (r->inf_path) {
13032 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->inf_path));
13033 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->inf_path));
13035 ndr->flags = _flags_save_string;
13038 uint32_t _flags_save_string_array = ndr->flags;
13039 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13040 if (r->core_driver_dependencies) {
13041 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->core_driver_dependencies));
13042 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->core_driver_dependencies));
13044 ndr->flags = _flags_save_string_array;
13047 return NDR_ERR_SUCCESS;
13050 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo8(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverInfo8 *r)
13052 uint32_t _ptr_driver_name;
13053 TALLOC_CTX *_mem_save_driver_name_0;
13054 uint32_t _ptr_architecture;
13055 TALLOC_CTX *_mem_save_architecture_0;
13056 uint32_t _ptr_driver_path;
13057 TALLOC_CTX *_mem_save_driver_path_0;
13058 uint32_t _ptr_data_file;
13059 TALLOC_CTX *_mem_save_data_file_0;
13060 uint32_t _ptr_config_file;
13061 TALLOC_CTX *_mem_save_config_file_0;
13062 uint32_t _ptr_help_file;
13063 TALLOC_CTX *_mem_save_help_file_0;
13064 uint32_t _ptr_monitor_name;
13065 TALLOC_CTX *_mem_save_monitor_name_0;
13066 uint32_t _ptr_default_datatype;
13067 TALLOC_CTX *_mem_save_default_datatype_0;
13068 uint32_t _ptr_dependent_files;
13069 TALLOC_CTX *_mem_save_dependent_files_0;
13070 uint32_t _ptr_previous_names;
13071 TALLOC_CTX *_mem_save_previous_names_0;
13072 uint32_t _ptr_manufacturer_name;
13073 TALLOC_CTX *_mem_save_manufacturer_name_0;
13074 uint32_t _ptr_manufacturer_url;
13075 TALLOC_CTX *_mem_save_manufacturer_url_0;
13076 uint32_t _ptr_hardware_id;
13077 TALLOC_CTX *_mem_save_hardware_id_0;
13078 uint32_t _ptr_provider;
13079 TALLOC_CTX *_mem_save_provider_0;
13080 uint32_t _ptr_print_processor;
13081 TALLOC_CTX *_mem_save_print_processor_0;
13082 uint32_t _ptr_vendor_setup;
13083 TALLOC_CTX *_mem_save_vendor_setup_0;
13084 uint32_t _ptr_color_profiles;
13085 TALLOC_CTX *_mem_save_color_profiles_0;
13086 uint32_t _ptr_inf_path;
13087 TALLOC_CTX *_mem_save_inf_path_0;
13088 uint32_t _ptr_core_driver_dependencies;
13089 TALLOC_CTX *_mem_save_core_driver_dependencies_0;
13090 if (ndr_flags & NDR_SCALARS) {
13091 NDR_CHECK(ndr_pull_align(ndr, 8));
13092 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr, NDR_SCALARS, &r->version));
13094 uint32_t _flags_save_string = ndr->flags;
13095 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13096 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
13097 if (_ptr_driver_name) {
13098 NDR_PULL_ALLOC(ndr, r->driver_name);
13099 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
13100 } else {
13101 r->driver_name = NULL;
13103 ndr->flags = _flags_save_string;
13106 uint32_t _flags_save_string = ndr->flags;
13107 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13108 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
13109 if (_ptr_architecture) {
13110 NDR_PULL_ALLOC(ndr, r->architecture);
13111 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->architecture, _ptr_architecture));
13112 } else {
13113 r->architecture = NULL;
13115 ndr->flags = _flags_save_string;
13118 uint32_t _flags_save_string = ndr->flags;
13119 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13120 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_path));
13121 if (_ptr_driver_path) {
13122 NDR_PULL_ALLOC(ndr, r->driver_path);
13123 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_path, _ptr_driver_path));
13124 } else {
13125 r->driver_path = NULL;
13127 ndr->flags = _flags_save_string;
13130 uint32_t _flags_save_string = ndr->flags;
13131 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13132 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_file));
13133 if (_ptr_data_file) {
13134 NDR_PULL_ALLOC(ndr, r->data_file);
13135 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_file, _ptr_data_file));
13136 } else {
13137 r->data_file = NULL;
13139 ndr->flags = _flags_save_string;
13142 uint32_t _flags_save_string = ndr->flags;
13143 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13144 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_config_file));
13145 if (_ptr_config_file) {
13146 NDR_PULL_ALLOC(ndr, r->config_file);
13147 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->config_file, _ptr_config_file));
13148 } else {
13149 r->config_file = NULL;
13151 ndr->flags = _flags_save_string;
13154 uint32_t _flags_save_string = ndr->flags;
13155 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13156 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_help_file));
13157 if (_ptr_help_file) {
13158 NDR_PULL_ALLOC(ndr, r->help_file);
13159 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->help_file, _ptr_help_file));
13160 } else {
13161 r->help_file = NULL;
13163 ndr->flags = _flags_save_string;
13166 uint32_t _flags_save_string = ndr->flags;
13167 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13168 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
13169 if (_ptr_monitor_name) {
13170 NDR_PULL_ALLOC(ndr, r->monitor_name);
13171 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
13172 } else {
13173 r->monitor_name = NULL;
13175 ndr->flags = _flags_save_string;
13178 uint32_t _flags_save_string = ndr->flags;
13179 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13180 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_default_datatype));
13181 if (_ptr_default_datatype) {
13182 NDR_PULL_ALLOC(ndr, r->default_datatype);
13183 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->default_datatype, _ptr_default_datatype));
13184 } else {
13185 r->default_datatype = NULL;
13187 ndr->flags = _flags_save_string;
13190 uint32_t _flags_save_string_array = ndr->flags;
13191 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13192 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependent_files));
13193 if (_ptr_dependent_files) {
13194 NDR_PULL_ALLOC(ndr, r->dependent_files);
13195 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dependent_files, _ptr_dependent_files));
13196 } else {
13197 r->dependent_files = NULL;
13199 ndr->flags = _flags_save_string_array;
13202 uint32_t _flags_save_string_array = ndr->flags;
13203 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13204 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_previous_names));
13205 if (_ptr_previous_names) {
13206 NDR_PULL_ALLOC(ndr, r->previous_names);
13207 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->previous_names, _ptr_previous_names));
13208 } else {
13209 r->previous_names = NULL;
13211 ndr->flags = _flags_save_string_array;
13213 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
13214 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
13216 uint32_t _flags_save_string = ndr->flags;
13217 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13218 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_name));
13219 if (_ptr_manufacturer_name) {
13220 NDR_PULL_ALLOC(ndr, r->manufacturer_name);
13221 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->manufacturer_name, _ptr_manufacturer_name));
13222 } else {
13223 r->manufacturer_name = NULL;
13225 ndr->flags = _flags_save_string;
13228 uint32_t _flags_save_string = ndr->flags;
13229 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13230 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_manufacturer_url));
13231 if (_ptr_manufacturer_url) {
13232 NDR_PULL_ALLOC(ndr, r->manufacturer_url);
13233 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->manufacturer_url, _ptr_manufacturer_url));
13234 } else {
13235 r->manufacturer_url = NULL;
13237 ndr->flags = _flags_save_string;
13240 uint32_t _flags_save_string = ndr->flags;
13241 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13242 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hardware_id));
13243 if (_ptr_hardware_id) {
13244 NDR_PULL_ALLOC(ndr, r->hardware_id);
13245 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->hardware_id, _ptr_hardware_id));
13246 } else {
13247 r->hardware_id = NULL;
13249 ndr->flags = _flags_save_string;
13252 uint32_t _flags_save_string = ndr->flags;
13253 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13254 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_provider));
13255 if (_ptr_provider) {
13256 NDR_PULL_ALLOC(ndr, r->provider);
13257 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->provider, _ptr_provider));
13258 } else {
13259 r->provider = NULL;
13261 ndr->flags = _flags_save_string;
13264 uint32_t _flags_save_string = ndr->flags;
13265 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13266 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
13267 if (_ptr_print_processor) {
13268 NDR_PULL_ALLOC(ndr, r->print_processor);
13269 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor, _ptr_print_processor));
13270 } else {
13271 r->print_processor = NULL;
13273 ndr->flags = _flags_save_string;
13276 uint32_t _flags_save_string = ndr->flags;
13277 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13278 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_vendor_setup));
13279 if (_ptr_vendor_setup) {
13280 NDR_PULL_ALLOC(ndr, r->vendor_setup);
13281 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->vendor_setup, _ptr_vendor_setup));
13282 } else {
13283 r->vendor_setup = NULL;
13285 ndr->flags = _flags_save_string;
13288 uint32_t _flags_save_string_array = ndr->flags;
13289 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13290 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_color_profiles));
13291 if (_ptr_color_profiles) {
13292 NDR_PULL_ALLOC(ndr, r->color_profiles);
13293 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->color_profiles, _ptr_color_profiles));
13294 } else {
13295 r->color_profiles = NULL;
13297 ndr->flags = _flags_save_string_array;
13300 uint32_t _flags_save_string = ndr->flags;
13301 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13302 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_inf_path));
13303 if (_ptr_inf_path) {
13304 NDR_PULL_ALLOC(ndr, r->inf_path);
13305 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->inf_path, _ptr_inf_path));
13306 } else {
13307 r->inf_path = NULL;
13309 ndr->flags = _flags_save_string;
13311 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->printer_driver_attributes));
13313 uint32_t _flags_save_string_array = ndr->flags;
13314 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13315 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_core_driver_dependencies));
13316 if (_ptr_core_driver_dependencies) {
13317 NDR_PULL_ALLOC(ndr, r->core_driver_dependencies);
13318 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->core_driver_dependencies, _ptr_core_driver_dependencies));
13319 } else {
13320 r->core_driver_dependencies = NULL;
13322 ndr->flags = _flags_save_string_array;
13324 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_date));
13325 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->min_inbox_driver_ver_version));
13327 if (ndr_flags & NDR_BUFFERS) {
13329 uint32_t _flags_save_string = ndr->flags;
13330 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13331 if (r->driver_name) {
13332 uint32_t _relative_save_offset;
13333 _relative_save_offset = ndr->offset;
13334 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
13335 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13336 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
13337 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
13338 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
13339 ndr->offset = _relative_save_offset;
13341 ndr->flags = _flags_save_string;
13344 uint32_t _flags_save_string = ndr->flags;
13345 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13346 if (r->architecture) {
13347 uint32_t _relative_save_offset;
13348 _relative_save_offset = ndr->offset;
13349 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->architecture));
13350 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
13351 NDR_PULL_SET_MEM_CTX(ndr, r->architecture, 0);
13352 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->architecture));
13353 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
13354 ndr->offset = _relative_save_offset;
13356 ndr->flags = _flags_save_string;
13359 uint32_t _flags_save_string = ndr->flags;
13360 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13361 if (r->driver_path) {
13362 uint32_t _relative_save_offset;
13363 _relative_save_offset = ndr->offset;
13364 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_path));
13365 _mem_save_driver_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
13366 NDR_PULL_SET_MEM_CTX(ndr, r->driver_path, 0);
13367 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_path));
13368 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_path_0, 0);
13369 ndr->offset = _relative_save_offset;
13371 ndr->flags = _flags_save_string;
13374 uint32_t _flags_save_string = ndr->flags;
13375 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13376 if (r->data_file) {
13377 uint32_t _relative_save_offset;
13378 _relative_save_offset = ndr->offset;
13379 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_file));
13380 _mem_save_data_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
13381 NDR_PULL_SET_MEM_CTX(ndr, r->data_file, 0);
13382 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_file));
13383 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_file_0, 0);
13384 ndr->offset = _relative_save_offset;
13386 ndr->flags = _flags_save_string;
13389 uint32_t _flags_save_string = ndr->flags;
13390 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13391 if (r->config_file) {
13392 uint32_t _relative_save_offset;
13393 _relative_save_offset = ndr->offset;
13394 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->config_file));
13395 _mem_save_config_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
13396 NDR_PULL_SET_MEM_CTX(ndr, r->config_file, 0);
13397 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->config_file));
13398 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_config_file_0, 0);
13399 ndr->offset = _relative_save_offset;
13401 ndr->flags = _flags_save_string;
13404 uint32_t _flags_save_string = ndr->flags;
13405 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13406 if (r->help_file) {
13407 uint32_t _relative_save_offset;
13408 _relative_save_offset = ndr->offset;
13409 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->help_file));
13410 _mem_save_help_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
13411 NDR_PULL_SET_MEM_CTX(ndr, r->help_file, 0);
13412 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->help_file));
13413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_help_file_0, 0);
13414 ndr->offset = _relative_save_offset;
13416 ndr->flags = _flags_save_string;
13419 uint32_t _flags_save_string = ndr->flags;
13420 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13421 if (r->monitor_name) {
13422 uint32_t _relative_save_offset;
13423 _relative_save_offset = ndr->offset;
13424 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
13425 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13426 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
13427 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
13428 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
13429 ndr->offset = _relative_save_offset;
13431 ndr->flags = _flags_save_string;
13434 uint32_t _flags_save_string = ndr->flags;
13435 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13436 if (r->default_datatype) {
13437 uint32_t _relative_save_offset;
13438 _relative_save_offset = ndr->offset;
13439 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->default_datatype));
13440 _mem_save_default_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
13441 NDR_PULL_SET_MEM_CTX(ndr, r->default_datatype, 0);
13442 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->default_datatype));
13443 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_default_datatype_0, 0);
13444 ndr->offset = _relative_save_offset;
13446 ndr->flags = _flags_save_string;
13449 uint32_t _flags_save_string_array = ndr->flags;
13450 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13451 if (r->dependent_files) {
13452 uint32_t _relative_save_offset;
13453 _relative_save_offset = ndr->offset;
13454 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dependent_files));
13455 _mem_save_dependent_files_0 = NDR_PULL_GET_MEM_CTX(ndr);
13456 NDR_PULL_SET_MEM_CTX(ndr, r->dependent_files, 0);
13457 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->dependent_files));
13458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependent_files_0, 0);
13459 ndr->offset = _relative_save_offset;
13461 ndr->flags = _flags_save_string_array;
13464 uint32_t _flags_save_string_array = ndr->flags;
13465 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13466 if (r->previous_names) {
13467 uint32_t _relative_save_offset;
13468 _relative_save_offset = ndr->offset;
13469 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->previous_names));
13470 _mem_save_previous_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
13471 NDR_PULL_SET_MEM_CTX(ndr, r->previous_names, 0);
13472 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->previous_names));
13473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_previous_names_0, 0);
13474 ndr->offset = _relative_save_offset;
13476 ndr->flags = _flags_save_string_array;
13479 uint32_t _flags_save_string = ndr->flags;
13480 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13481 if (r->manufacturer_name) {
13482 uint32_t _relative_save_offset;
13483 _relative_save_offset = ndr->offset;
13484 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->manufacturer_name));
13485 _mem_save_manufacturer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13486 NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_name, 0);
13487 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->manufacturer_name));
13488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_name_0, 0);
13489 ndr->offset = _relative_save_offset;
13491 ndr->flags = _flags_save_string;
13494 uint32_t _flags_save_string = ndr->flags;
13495 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13496 if (r->manufacturer_url) {
13497 uint32_t _relative_save_offset;
13498 _relative_save_offset = ndr->offset;
13499 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->manufacturer_url));
13500 _mem_save_manufacturer_url_0 = NDR_PULL_GET_MEM_CTX(ndr);
13501 NDR_PULL_SET_MEM_CTX(ndr, r->manufacturer_url, 0);
13502 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->manufacturer_url));
13503 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_manufacturer_url_0, 0);
13504 ndr->offset = _relative_save_offset;
13506 ndr->flags = _flags_save_string;
13509 uint32_t _flags_save_string = ndr->flags;
13510 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13511 if (r->hardware_id) {
13512 uint32_t _relative_save_offset;
13513 _relative_save_offset = ndr->offset;
13514 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->hardware_id));
13515 _mem_save_hardware_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
13516 NDR_PULL_SET_MEM_CTX(ndr, r->hardware_id, 0);
13517 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->hardware_id));
13518 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hardware_id_0, 0);
13519 ndr->offset = _relative_save_offset;
13521 ndr->flags = _flags_save_string;
13524 uint32_t _flags_save_string = ndr->flags;
13525 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13526 if (r->provider) {
13527 uint32_t _relative_save_offset;
13528 _relative_save_offset = ndr->offset;
13529 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->provider));
13530 _mem_save_provider_0 = NDR_PULL_GET_MEM_CTX(ndr);
13531 NDR_PULL_SET_MEM_CTX(ndr, r->provider, 0);
13532 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->provider));
13533 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_provider_0, 0);
13534 ndr->offset = _relative_save_offset;
13536 ndr->flags = _flags_save_string;
13539 uint32_t _flags_save_string = ndr->flags;
13540 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13541 if (r->print_processor) {
13542 uint32_t _relative_save_offset;
13543 _relative_save_offset = ndr->offset;
13544 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor));
13545 _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
13546 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
13547 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor));
13548 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
13549 ndr->offset = _relative_save_offset;
13551 ndr->flags = _flags_save_string;
13554 uint32_t _flags_save_string = ndr->flags;
13555 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13556 if (r->vendor_setup) {
13557 uint32_t _relative_save_offset;
13558 _relative_save_offset = ndr->offset;
13559 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->vendor_setup));
13560 _mem_save_vendor_setup_0 = NDR_PULL_GET_MEM_CTX(ndr);
13561 NDR_PULL_SET_MEM_CTX(ndr, r->vendor_setup, 0);
13562 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->vendor_setup));
13563 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_vendor_setup_0, 0);
13564 ndr->offset = _relative_save_offset;
13566 ndr->flags = _flags_save_string;
13569 uint32_t _flags_save_string_array = ndr->flags;
13570 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13571 if (r->color_profiles) {
13572 uint32_t _relative_save_offset;
13573 _relative_save_offset = ndr->offset;
13574 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->color_profiles));
13575 _mem_save_color_profiles_0 = NDR_PULL_GET_MEM_CTX(ndr);
13576 NDR_PULL_SET_MEM_CTX(ndr, r->color_profiles, 0);
13577 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->color_profiles));
13578 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_color_profiles_0, 0);
13579 ndr->offset = _relative_save_offset;
13581 ndr->flags = _flags_save_string_array;
13584 uint32_t _flags_save_string = ndr->flags;
13585 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13586 if (r->inf_path) {
13587 uint32_t _relative_save_offset;
13588 _relative_save_offset = ndr->offset;
13589 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->inf_path));
13590 _mem_save_inf_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
13591 NDR_PULL_SET_MEM_CTX(ndr, r->inf_path, 0);
13592 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->inf_path));
13593 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_inf_path_0, 0);
13594 ndr->offset = _relative_save_offset;
13596 ndr->flags = _flags_save_string;
13599 uint32_t _flags_save_string_array = ndr->flags;
13600 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13601 if (r->core_driver_dependencies) {
13602 uint32_t _relative_save_offset;
13603 _relative_save_offset = ndr->offset;
13604 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->core_driver_dependencies));
13605 _mem_save_core_driver_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
13606 NDR_PULL_SET_MEM_CTX(ndr, r->core_driver_dependencies, 0);
13607 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->core_driver_dependencies));
13608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_core_driver_dependencies_0, 0);
13609 ndr->offset = _relative_save_offset;
13611 ndr->flags = _flags_save_string_array;
13614 return NDR_ERR_SUCCESS;
13617 _PUBLIC_ void ndr_print_spoolss_DriverInfo8(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo8 *r)
13619 ndr_print_struct(ndr, name, "spoolss_DriverInfo8");
13620 ndr->depth++;
13621 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
13622 ndr_print_ptr(ndr, "driver_name", r->driver_name);
13623 ndr->depth++;
13624 if (r->driver_name) {
13625 ndr_print_string(ndr, "driver_name", r->driver_name);
13627 ndr->depth--;
13628 ndr_print_ptr(ndr, "architecture", r->architecture);
13629 ndr->depth++;
13630 if (r->architecture) {
13631 ndr_print_string(ndr, "architecture", r->architecture);
13633 ndr->depth--;
13634 ndr_print_ptr(ndr, "driver_path", r->driver_path);
13635 ndr->depth++;
13636 if (r->driver_path) {
13637 ndr_print_string(ndr, "driver_path", r->driver_path);
13639 ndr->depth--;
13640 ndr_print_ptr(ndr, "data_file", r->data_file);
13641 ndr->depth++;
13642 if (r->data_file) {
13643 ndr_print_string(ndr, "data_file", r->data_file);
13645 ndr->depth--;
13646 ndr_print_ptr(ndr, "config_file", r->config_file);
13647 ndr->depth++;
13648 if (r->config_file) {
13649 ndr_print_string(ndr, "config_file", r->config_file);
13651 ndr->depth--;
13652 ndr_print_ptr(ndr, "help_file", r->help_file);
13653 ndr->depth++;
13654 if (r->help_file) {
13655 ndr_print_string(ndr, "help_file", r->help_file);
13657 ndr->depth--;
13658 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
13659 ndr->depth++;
13660 if (r->monitor_name) {
13661 ndr_print_string(ndr, "monitor_name", r->monitor_name);
13663 ndr->depth--;
13664 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
13665 ndr->depth++;
13666 if (r->default_datatype) {
13667 ndr_print_string(ndr, "default_datatype", r->default_datatype);
13669 ndr->depth--;
13670 ndr_print_ptr(ndr, "dependent_files", r->dependent_files);
13671 ndr->depth++;
13672 if (r->dependent_files) {
13673 ndr_print_string_array(ndr, "dependent_files", r->dependent_files);
13675 ndr->depth--;
13676 ndr_print_ptr(ndr, "previous_names", r->previous_names);
13677 ndr->depth++;
13678 if (r->previous_names) {
13679 ndr_print_string_array(ndr, "previous_names", r->previous_names);
13681 ndr->depth--;
13682 ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
13683 ndr_print_hyper(ndr, "driver_version", r->driver_version);
13684 ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
13685 ndr->depth++;
13686 if (r->manufacturer_name) {
13687 ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
13689 ndr->depth--;
13690 ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
13691 ndr->depth++;
13692 if (r->manufacturer_url) {
13693 ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
13695 ndr->depth--;
13696 ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
13697 ndr->depth++;
13698 if (r->hardware_id) {
13699 ndr_print_string(ndr, "hardware_id", r->hardware_id);
13701 ndr->depth--;
13702 ndr_print_ptr(ndr, "provider", r->provider);
13703 ndr->depth++;
13704 if (r->provider) {
13705 ndr_print_string(ndr, "provider", r->provider);
13707 ndr->depth--;
13708 ndr_print_ptr(ndr, "print_processor", r->print_processor);
13709 ndr->depth++;
13710 if (r->print_processor) {
13711 ndr_print_string(ndr, "print_processor", r->print_processor);
13713 ndr->depth--;
13714 ndr_print_ptr(ndr, "vendor_setup", r->vendor_setup);
13715 ndr->depth++;
13716 if (r->vendor_setup) {
13717 ndr_print_string(ndr, "vendor_setup", r->vendor_setup);
13719 ndr->depth--;
13720 ndr_print_ptr(ndr, "color_profiles", r->color_profiles);
13721 ndr->depth++;
13722 if (r->color_profiles) {
13723 ndr_print_string_array(ndr, "color_profiles", r->color_profiles);
13725 ndr->depth--;
13726 ndr_print_ptr(ndr, "inf_path", r->inf_path);
13727 ndr->depth++;
13728 if (r->inf_path) {
13729 ndr_print_string(ndr, "inf_path", r->inf_path);
13731 ndr->depth--;
13732 ndr_print_uint32(ndr, "printer_driver_attributes", r->printer_driver_attributes);
13733 ndr_print_ptr(ndr, "core_driver_dependencies", r->core_driver_dependencies);
13734 ndr->depth++;
13735 if (r->core_driver_dependencies) {
13736 ndr_print_string_array(ndr, "core_driver_dependencies", r->core_driver_dependencies);
13738 ndr->depth--;
13739 ndr_print_NTTIME(ndr, "min_inbox_driver_ver_date", r->min_inbox_driver_ver_date);
13740 ndr_print_hyper(ndr, "min_inbox_driver_ver_version", r->min_inbox_driver_ver_version);
13741 ndr->depth--;
13744 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo8(const struct spoolss_DriverInfo8 *r, struct smb_iconv_convenience *ic, int flags)
13746 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo8, ic);
13749 static enum ndr_err_code ndr_push_spoolss_DriverFileType(struct ndr_push *ndr, int ndr_flags, enum spoolss_DriverFileType r)
13751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
13752 return NDR_ERR_SUCCESS;
13755 static enum ndr_err_code ndr_pull_spoolss_DriverFileType(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DriverFileType *r)
13757 uint32_t v;
13758 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
13759 *r = v;
13760 return NDR_ERR_SUCCESS;
13763 _PUBLIC_ void ndr_print_spoolss_DriverFileType(struct ndr_print *ndr, const char *name, enum spoolss_DriverFileType r)
13765 const char *val = NULL;
13767 switch (r) {
13768 case SPOOLSS_DRIVER_FILE_TYPE_RENDERING: val = "SPOOLSS_DRIVER_FILE_TYPE_RENDERING"; break;
13769 case SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION: val = "SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION"; break;
13770 case SPOOLSS_DRIVER_FILE_TYPE_DATA: val = "SPOOLSS_DRIVER_FILE_TYPE_DATA"; break;
13771 case SPOOLSS_DRIVER_FILE_TYPE_HELP: val = "SPOOLSS_DRIVER_FILE_TYPE_HELP"; break;
13772 case SPOOLSS_DRIVER_FILE_TYPE_OTHER: val = "SPOOLSS_DRIVER_FILE_TYPE_OTHER"; break;
13774 ndr_print_enum(ndr, name, "ENUM", val, r);
13777 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverFileInfo(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverFileInfo *r)
13779 if (ndr_flags & NDR_SCALARS) {
13780 NDR_CHECK(ndr_push_align(ndr, 4));
13782 uint32_t _flags_save_string = ndr->flags;
13783 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13784 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->file_name));
13785 ndr->flags = _flags_save_string;
13787 NDR_CHECK(ndr_push_spoolss_DriverFileType(ndr, NDR_SCALARS, r->file_type));
13788 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->file_version));
13790 if (ndr_flags & NDR_BUFFERS) {
13792 uint32_t _flags_save_string = ndr->flags;
13793 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13794 if (r->file_name) {
13795 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->file_name));
13796 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->file_name));
13798 ndr->flags = _flags_save_string;
13801 return NDR_ERR_SUCCESS;
13804 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverFileInfo(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverFileInfo *r)
13806 uint32_t _ptr_file_name;
13807 TALLOC_CTX *_mem_save_file_name_0;
13808 if (ndr_flags & NDR_SCALARS) {
13809 NDR_CHECK(ndr_pull_align(ndr, 4));
13811 uint32_t _flags_save_string = ndr->flags;
13812 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13813 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_file_name));
13814 if (_ptr_file_name) {
13815 NDR_PULL_ALLOC(ndr, r->file_name);
13816 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->file_name, _ptr_file_name));
13817 } else {
13818 r->file_name = NULL;
13820 ndr->flags = _flags_save_string;
13822 NDR_CHECK(ndr_pull_spoolss_DriverFileType(ndr, NDR_SCALARS, &r->file_type));
13823 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->file_version));
13825 if (ndr_flags & NDR_BUFFERS) {
13827 uint32_t _flags_save_string = ndr->flags;
13828 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
13829 if (r->file_name) {
13830 uint32_t _relative_save_offset;
13831 _relative_save_offset = ndr->offset;
13832 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->file_name));
13833 _mem_save_file_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13834 NDR_PULL_SET_MEM_CTX(ndr, r->file_name, 0);
13835 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->file_name));
13836 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_file_name_0, 0);
13837 ndr->offset = _relative_save_offset;
13839 ndr->flags = _flags_save_string;
13842 return NDR_ERR_SUCCESS;
13845 _PUBLIC_ void ndr_print_spoolss_DriverFileInfo(struct ndr_print *ndr, const char *name, const struct spoolss_DriverFileInfo *r)
13847 ndr_print_struct(ndr, name, "spoolss_DriverFileInfo");
13848 ndr->depth++;
13849 ndr_print_ptr(ndr, "file_name", r->file_name);
13850 ndr->depth++;
13851 if (r->file_name) {
13852 ndr_print_string(ndr, "file_name", r->file_name);
13854 ndr->depth--;
13855 ndr_print_spoolss_DriverFileType(ndr, "file_type", r->file_type);
13856 ndr_print_uint32(ndr, "file_version", r->file_version);
13857 ndr->depth--;
13860 _PUBLIC_ void ndr_print_spoolss_DriverInfo101(struct ndr_print *ndr, const char *name, const struct spoolss_DriverInfo101 *r)
13862 uint32_t cntr_file_info_1;
13863 ndr_print_struct(ndr, name, "spoolss_DriverInfo101");
13864 ndr->depth++;
13865 ndr_print_spoolss_DriverOSVersion(ndr, "version", r->version);
13866 ndr_print_ptr(ndr, "driver_name", r->driver_name);
13867 ndr->depth++;
13868 if (r->driver_name) {
13869 ndr_print_string(ndr, "driver_name", r->driver_name);
13871 ndr->depth--;
13872 ndr_print_ptr(ndr, "architecture", r->architecture);
13873 ndr->depth++;
13874 if (r->architecture) {
13875 ndr_print_string(ndr, "architecture", r->architecture);
13877 ndr->depth--;
13878 ndr_print_ptr(ndr, "file_info", r->file_info);
13879 ndr->depth++;
13880 if (r->file_info) {
13881 ndr->print(ndr, "%s: ARRAY(%d)", "file_info", (int)r->file_count);
13882 ndr->depth++;
13883 for (cntr_file_info_1=0;cntr_file_info_1<r->file_count;cntr_file_info_1++) {
13884 char *idx_1=NULL;
13885 if (asprintf(&idx_1, "[%d]", cntr_file_info_1) != -1) {
13886 ndr_print_spoolss_DriverFileInfo(ndr, "file_info", &r->file_info[cntr_file_info_1]);
13887 free(idx_1);
13890 ndr->depth--;
13892 ndr->depth--;
13893 ndr_print_uint32(ndr, "file_count", r->file_count);
13894 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
13895 ndr->depth++;
13896 if (r->monitor_name) {
13897 ndr_print_string(ndr, "monitor_name", r->monitor_name);
13899 ndr->depth--;
13900 ndr_print_ptr(ndr, "default_datatype", r->default_datatype);
13901 ndr->depth++;
13902 if (r->default_datatype) {
13903 ndr_print_string(ndr, "default_datatype", r->default_datatype);
13905 ndr->depth--;
13906 ndr_print_ptr(ndr, "previous_names", r->previous_names);
13907 ndr->depth++;
13908 if (r->previous_names) {
13909 ndr_print_string_array(ndr, "previous_names", r->previous_names);
13911 ndr->depth--;
13912 ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
13913 ndr_print_hyper(ndr, "driver_version", r->driver_version);
13914 ndr_print_ptr(ndr, "manufacturer_name", r->manufacturer_name);
13915 ndr->depth++;
13916 if (r->manufacturer_name) {
13917 ndr_print_string(ndr, "manufacturer_name", r->manufacturer_name);
13919 ndr->depth--;
13920 ndr_print_ptr(ndr, "manufacturer_url", r->manufacturer_url);
13921 ndr->depth++;
13922 if (r->manufacturer_url) {
13923 ndr_print_string(ndr, "manufacturer_url", r->manufacturer_url);
13925 ndr->depth--;
13926 ndr_print_ptr(ndr, "hardware_id", r->hardware_id);
13927 ndr->depth++;
13928 if (r->hardware_id) {
13929 ndr_print_string(ndr, "hardware_id", r->hardware_id);
13931 ndr->depth--;
13932 ndr_print_ptr(ndr, "provider", r->provider);
13933 ndr->depth++;
13934 if (r->provider) {
13935 ndr_print_string(ndr, "provider", r->provider);
13937 ndr->depth--;
13938 ndr->depth--;
13941 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo101(const struct spoolss_DriverInfo101 *r, struct smb_iconv_convenience *ic, int flags)
13943 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo101, ic);
13946 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_DriverInfo *r)
13948 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
13949 if (ndr_flags & NDR_SCALARS) {
13950 int level = ndr_push_get_switch_value(ndr, r);
13951 switch (level) {
13952 case 1: {
13953 NDR_CHECK(ndr_push_align(ndr, 4));
13954 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
13955 NDR_CHECK(ndr_push_spoolss_DriverInfo1(ndr, NDR_SCALARS, &r->info1));
13956 break; }
13958 case 2: {
13959 NDR_CHECK(ndr_push_align(ndr, 4));
13960 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
13961 NDR_CHECK(ndr_push_spoolss_DriverInfo2(ndr, NDR_SCALARS, &r->info2));
13962 break; }
13964 case 3: {
13965 NDR_CHECK(ndr_push_align(ndr, 4));
13966 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
13967 NDR_CHECK(ndr_push_spoolss_DriverInfo3(ndr, NDR_SCALARS, &r->info3));
13968 break; }
13970 case 4: {
13971 NDR_CHECK(ndr_push_align(ndr, 4));
13972 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
13973 NDR_CHECK(ndr_push_spoolss_DriverInfo4(ndr, NDR_SCALARS, &r->info4));
13974 break; }
13976 case 5: {
13977 NDR_CHECK(ndr_push_align(ndr, 4));
13978 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
13979 NDR_CHECK(ndr_push_spoolss_DriverInfo5(ndr, NDR_SCALARS, &r->info5));
13980 break; }
13982 case 6: {
13983 NDR_CHECK(ndr_push_align(ndr, 8));
13984 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
13985 NDR_CHECK(ndr_push_spoolss_DriverInfo6(ndr, NDR_SCALARS, &r->info6));
13986 break; }
13988 case 8: {
13989 NDR_CHECK(ndr_push_align(ndr, 8));
13990 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
13991 NDR_CHECK(ndr_push_spoolss_DriverInfo8(ndr, NDR_SCALARS, &r->info8));
13992 break; }
13994 case 101: {
13995 NDR_CHECK(ndr_push_align(ndr, 8));
13996 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
13997 NDR_CHECK(ndr_push_spoolss_DriverInfo101(ndr, NDR_SCALARS, &r->info101));
13998 break; }
14000 default: {
14001 break; }
14005 if (ndr_flags & NDR_BUFFERS) {
14006 int level = ndr_push_get_switch_value(ndr, r);
14007 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
14008 switch (level) {
14009 case 1:
14010 NDR_CHECK(ndr_push_spoolss_DriverInfo1(ndr, NDR_BUFFERS, &r->info1));
14011 break;
14013 case 2:
14014 NDR_CHECK(ndr_push_spoolss_DriverInfo2(ndr, NDR_BUFFERS, &r->info2));
14015 break;
14017 case 3:
14018 NDR_CHECK(ndr_push_spoolss_DriverInfo3(ndr, NDR_BUFFERS, &r->info3));
14019 break;
14021 case 4:
14022 NDR_CHECK(ndr_push_spoolss_DriverInfo4(ndr, NDR_BUFFERS, &r->info4));
14023 break;
14025 case 5:
14026 NDR_CHECK(ndr_push_spoolss_DriverInfo5(ndr, NDR_BUFFERS, &r->info5));
14027 break;
14029 case 6:
14030 NDR_CHECK(ndr_push_spoolss_DriverInfo6(ndr, NDR_BUFFERS, &r->info6));
14031 break;
14033 case 8:
14034 NDR_CHECK(ndr_push_spoolss_DriverInfo8(ndr, NDR_BUFFERS, &r->info8));
14035 break;
14037 case 101:
14038 NDR_CHECK(ndr_push_spoolss_DriverInfo101(ndr, NDR_BUFFERS, &r->info101));
14039 break;
14041 default:
14042 break;
14046 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
14047 return NDR_ERR_SUCCESS;
14050 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_DriverInfo *r)
14052 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
14053 int level;
14054 level = ndr_pull_get_switch_value(ndr, r);
14055 if (ndr_flags & NDR_SCALARS) {
14056 switch (level) {
14057 case 1: {
14058 NDR_CHECK(ndr_pull_align(ndr, 4));
14059 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14060 NDR_CHECK(ndr_pull_spoolss_DriverInfo1(ndr, NDR_SCALARS, &r->info1));
14061 break; }
14063 case 2: {
14064 NDR_CHECK(ndr_pull_align(ndr, 4));
14065 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14066 NDR_CHECK(ndr_pull_spoolss_DriverInfo2(ndr, NDR_SCALARS, &r->info2));
14067 break; }
14069 case 3: {
14070 NDR_CHECK(ndr_pull_align(ndr, 4));
14071 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14072 NDR_CHECK(ndr_pull_spoolss_DriverInfo3(ndr, NDR_SCALARS, &r->info3));
14073 break; }
14075 case 4: {
14076 NDR_CHECK(ndr_pull_align(ndr, 4));
14077 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14078 NDR_CHECK(ndr_pull_spoolss_DriverInfo4(ndr, NDR_SCALARS, &r->info4));
14079 break; }
14081 case 5: {
14082 NDR_CHECK(ndr_pull_align(ndr, 4));
14083 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14084 NDR_CHECK(ndr_pull_spoolss_DriverInfo5(ndr, NDR_SCALARS, &r->info5));
14085 break; }
14087 case 6: {
14088 NDR_CHECK(ndr_pull_align(ndr, 8));
14089 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14090 NDR_CHECK(ndr_pull_spoolss_DriverInfo6(ndr, NDR_SCALARS, &r->info6));
14091 break; }
14093 case 8: {
14094 NDR_CHECK(ndr_pull_align(ndr, 8));
14095 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14096 NDR_CHECK(ndr_pull_spoolss_DriverInfo8(ndr, NDR_SCALARS, &r->info8));
14097 break; }
14099 case 101: {
14100 NDR_CHECK(ndr_pull_align(ndr, 8));
14101 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14102 NDR_CHECK(ndr_pull_spoolss_DriverInfo101(ndr, NDR_SCALARS, &r->info101));
14103 break; }
14105 default: {
14106 break; }
14110 if (ndr_flags & NDR_BUFFERS) {
14111 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
14112 switch (level) {
14113 case 1:
14114 NDR_CHECK(ndr_pull_spoolss_DriverInfo1(ndr, NDR_BUFFERS, &r->info1));
14115 break;
14117 case 2:
14118 NDR_CHECK(ndr_pull_spoolss_DriverInfo2(ndr, NDR_BUFFERS, &r->info2));
14119 break;
14121 case 3:
14122 NDR_CHECK(ndr_pull_spoolss_DriverInfo3(ndr, NDR_BUFFERS, &r->info3));
14123 break;
14125 case 4:
14126 NDR_CHECK(ndr_pull_spoolss_DriverInfo4(ndr, NDR_BUFFERS, &r->info4));
14127 break;
14129 case 5:
14130 NDR_CHECK(ndr_pull_spoolss_DriverInfo5(ndr, NDR_BUFFERS, &r->info5));
14131 break;
14133 case 6:
14134 NDR_CHECK(ndr_pull_spoolss_DriverInfo6(ndr, NDR_BUFFERS, &r->info6));
14135 break;
14137 case 8:
14138 NDR_CHECK(ndr_pull_spoolss_DriverInfo8(ndr, NDR_BUFFERS, &r->info8));
14139 break;
14141 case 101:
14142 NDR_CHECK(ndr_pull_spoolss_DriverInfo101(ndr, NDR_BUFFERS, &r->info101));
14143 break;
14145 default:
14146 break;
14150 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
14151 return NDR_ERR_SUCCESS;
14154 _PUBLIC_ void ndr_print_spoolss_DriverInfo(struct ndr_print *ndr, const char *name, const union spoolss_DriverInfo *r)
14156 int level;
14157 level = ndr_print_get_switch_value(ndr, r);
14158 ndr_print_union(ndr, name, level, "spoolss_DriverInfo");
14159 switch (level) {
14160 case 1:
14161 ndr_print_spoolss_DriverInfo1(ndr, "info1", &r->info1);
14162 break;
14164 case 2:
14165 ndr_print_spoolss_DriverInfo2(ndr, "info2", &r->info2);
14166 break;
14168 case 3:
14169 ndr_print_spoolss_DriverInfo3(ndr, "info3", &r->info3);
14170 break;
14172 case 4:
14173 ndr_print_spoolss_DriverInfo4(ndr, "info4", &r->info4);
14174 break;
14176 case 5:
14177 ndr_print_spoolss_DriverInfo5(ndr, "info5", &r->info5);
14178 break;
14180 case 6:
14181 ndr_print_spoolss_DriverInfo6(ndr, "info6", &r->info6);
14182 break;
14184 case 8:
14185 ndr_print_spoolss_DriverInfo8(ndr, "info8", &r->info8);
14186 break;
14188 case 101:
14189 ndr_print_spoolss_DriverInfo101(ndr, "info101", &r->info101);
14190 break;
14192 default:
14193 break;
14198 _PUBLIC_ size_t ndr_size_spoolss_DriverInfo(const union spoolss_DriverInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
14200 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverInfo, ic);
14203 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverDirectoryInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverDirectoryInfo1 *r)
14205 if (ndr_flags & NDR_SCALARS) {
14206 NDR_CHECK(ndr_push_align(ndr, 4));
14208 uint32_t _flags_save_string = ndr->flags;
14209 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14210 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->directory_name));
14211 ndr->flags = _flags_save_string;
14214 if (ndr_flags & NDR_BUFFERS) {
14216 return NDR_ERR_SUCCESS;
14219 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverDirectoryInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DriverDirectoryInfo1 *r)
14221 if (ndr_flags & NDR_SCALARS) {
14222 NDR_CHECK(ndr_pull_align(ndr, 4));
14224 uint32_t _flags_save_string = ndr->flags;
14225 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14226 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->directory_name));
14227 ndr->flags = _flags_save_string;
14230 if (ndr_flags & NDR_BUFFERS) {
14232 return NDR_ERR_SUCCESS;
14235 _PUBLIC_ void ndr_print_spoolss_DriverDirectoryInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_DriverDirectoryInfo1 *r)
14237 ndr_print_struct(ndr, name, "spoolss_DriverDirectoryInfo1");
14238 ndr->depth++;
14239 ndr_print_string(ndr, "directory_name", r->directory_name);
14240 ndr->depth--;
14243 _PUBLIC_ size_t ndr_size_spoolss_DriverDirectoryInfo1(const struct spoolss_DriverDirectoryInfo1 *r, struct smb_iconv_convenience *ic, int flags)
14245 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverDirectoryInfo1, ic);
14248 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverDirectoryInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_DriverDirectoryInfo *r)
14250 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
14251 if (ndr_flags & NDR_SCALARS) {
14252 int level = ndr_push_get_switch_value(ndr, r);
14253 switch (level) {
14254 case 1: {
14255 NDR_CHECK(ndr_push_align(ndr, 4));
14256 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
14257 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
14258 break; }
14260 default: {
14261 NDR_CHECK(ndr_push_align(ndr, 4));
14262 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
14263 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
14264 break; }
14268 if (ndr_flags & NDR_BUFFERS) {
14269 int level = ndr_push_get_switch_value(ndr, r);
14270 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
14271 switch (level) {
14272 case 1:
14273 break;
14275 default:
14276 break;
14280 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
14281 return NDR_ERR_SUCCESS;
14284 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DriverDirectoryInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_DriverDirectoryInfo *r)
14286 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
14287 int level;
14288 level = ndr_pull_get_switch_value(ndr, r);
14289 if (ndr_flags & NDR_SCALARS) {
14290 switch (level) {
14291 case 1: {
14292 NDR_CHECK(ndr_pull_align(ndr, 4));
14293 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14294 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
14295 break; }
14297 default: {
14298 NDR_CHECK(ndr_pull_align(ndr, 4));
14299 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14300 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
14301 break; }
14305 if (ndr_flags & NDR_BUFFERS) {
14306 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
14307 switch (level) {
14308 case 1:
14309 break;
14311 default:
14312 break;
14316 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
14317 return NDR_ERR_SUCCESS;
14320 _PUBLIC_ void ndr_print_spoolss_DriverDirectoryInfo(struct ndr_print *ndr, const char *name, const union spoolss_DriverDirectoryInfo *r)
14322 int level;
14323 level = ndr_print_get_switch_value(ndr, r);
14324 ndr_print_union(ndr, name, level, "spoolss_DriverDirectoryInfo");
14325 switch (level) {
14326 case 1:
14327 ndr_print_spoolss_DriverDirectoryInfo1(ndr, "info1", &r->info1);
14328 break;
14330 default:
14331 ndr_print_spoolss_DriverDirectoryInfo1(ndr, "info1", &r->info1);
14332 break;
14337 _PUBLIC_ size_t ndr_size_spoolss_DriverDirectoryInfo(const union spoolss_DriverDirectoryInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
14339 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_DriverDirectoryInfo, ic);
14342 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcessorInfo1 *r)
14344 if (ndr_flags & NDR_SCALARS) {
14345 NDR_CHECK(ndr_push_align(ndr, 4));
14347 uint32_t _flags_save_string = ndr->flags;
14348 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14349 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor_name));
14350 ndr->flags = _flags_save_string;
14353 if (ndr_flags & NDR_BUFFERS) {
14355 uint32_t _flags_save_string = ndr->flags;
14356 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14357 if (r->print_processor_name) {
14358 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->print_processor_name));
14359 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor_name));
14361 ndr->flags = _flags_save_string;
14364 return NDR_ERR_SUCCESS;
14367 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcessorInfo1 *r)
14369 uint32_t _ptr_print_processor_name;
14370 TALLOC_CTX *_mem_save_print_processor_name_0;
14371 if (ndr_flags & NDR_SCALARS) {
14372 NDR_CHECK(ndr_pull_align(ndr, 4));
14374 uint32_t _flags_save_string = ndr->flags;
14375 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14376 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor_name));
14377 if (_ptr_print_processor_name) {
14378 NDR_PULL_ALLOC(ndr, r->print_processor_name);
14379 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor_name, _ptr_print_processor_name));
14380 } else {
14381 r->print_processor_name = NULL;
14383 ndr->flags = _flags_save_string;
14386 if (ndr_flags & NDR_BUFFERS) {
14388 uint32_t _flags_save_string = ndr->flags;
14389 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14390 if (r->print_processor_name) {
14391 uint32_t _relative_save_offset;
14392 _relative_save_offset = ndr->offset;
14393 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor_name));
14394 _mem_save_print_processor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14395 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor_name, 0);
14396 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor_name));
14397 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_name_0, 0);
14398 ndr->offset = _relative_save_offset;
14400 ndr->flags = _flags_save_string;
14403 return NDR_ERR_SUCCESS;
14406 _PUBLIC_ void ndr_print_spoolss_PrintProcessorInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcessorInfo1 *r)
14408 ndr_print_struct(ndr, name, "spoolss_PrintProcessorInfo1");
14409 ndr->depth++;
14410 ndr_print_ptr(ndr, "print_processor_name", r->print_processor_name);
14411 ndr->depth++;
14412 if (r->print_processor_name) {
14413 ndr_print_string(ndr, "print_processor_name", r->print_processor_name);
14415 ndr->depth--;
14416 ndr->depth--;
14419 _PUBLIC_ size_t ndr_size_spoolss_PrintProcessorInfo1(const struct spoolss_PrintProcessorInfo1 *r, struct smb_iconv_convenience *ic, int flags)
14421 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorInfo1, ic);
14424 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcessorInfo *r)
14426 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
14427 if (ndr_flags & NDR_SCALARS) {
14428 int level = ndr_push_get_switch_value(ndr, r);
14429 switch (level) {
14430 case 1: {
14431 NDR_CHECK(ndr_push_align(ndr, 4));
14432 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
14433 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo1(ndr, NDR_SCALARS, &r->info1));
14434 break; }
14436 default: {
14437 break; }
14441 if (ndr_flags & NDR_BUFFERS) {
14442 int level = ndr_push_get_switch_value(ndr, r);
14443 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
14444 switch (level) {
14445 case 1:
14446 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo1(ndr, NDR_BUFFERS, &r->info1));
14447 break;
14449 default:
14450 break;
14454 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
14455 return NDR_ERR_SUCCESS;
14458 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcessorInfo *r)
14460 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
14461 int level;
14462 level = ndr_pull_get_switch_value(ndr, r);
14463 if (ndr_flags & NDR_SCALARS) {
14464 switch (level) {
14465 case 1: {
14466 NDR_CHECK(ndr_pull_align(ndr, 4));
14467 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14468 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo1(ndr, NDR_SCALARS, &r->info1));
14469 break; }
14471 default: {
14472 break; }
14476 if (ndr_flags & NDR_BUFFERS) {
14477 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
14478 switch (level) {
14479 case 1:
14480 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo1(ndr, NDR_BUFFERS, &r->info1));
14481 break;
14483 default:
14484 break;
14488 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
14489 return NDR_ERR_SUCCESS;
14492 _PUBLIC_ void ndr_print_spoolss_PrintProcessorInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcessorInfo *r)
14494 int level;
14495 level = ndr_print_get_switch_value(ndr, r);
14496 ndr_print_union(ndr, name, level, "spoolss_PrintProcessorInfo");
14497 switch (level) {
14498 case 1:
14499 ndr_print_spoolss_PrintProcessorInfo1(ndr, "info1", &r->info1);
14500 break;
14502 default:
14503 break;
14508 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcessorDirectoryInfo1 *r)
14510 if (ndr_flags & NDR_SCALARS) {
14511 NDR_CHECK(ndr_push_align(ndr, 4));
14513 uint32_t _flags_save_string = ndr->flags;
14514 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14515 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->directory_name));
14516 ndr->flags = _flags_save_string;
14519 if (ndr_flags & NDR_BUFFERS) {
14521 return NDR_ERR_SUCCESS;
14524 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcessorDirectoryInfo1 *r)
14526 if (ndr_flags & NDR_SCALARS) {
14527 NDR_CHECK(ndr_pull_align(ndr, 4));
14529 uint32_t _flags_save_string = ndr->flags;
14530 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14531 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->directory_name));
14532 ndr->flags = _flags_save_string;
14535 if (ndr_flags & NDR_BUFFERS) {
14537 return NDR_ERR_SUCCESS;
14540 _PUBLIC_ void ndr_print_spoolss_PrintProcessorDirectoryInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcessorDirectoryInfo1 *r)
14542 ndr_print_struct(ndr, name, "spoolss_PrintProcessorDirectoryInfo1");
14543 ndr->depth++;
14544 ndr_print_string(ndr, "directory_name", r->directory_name);
14545 ndr->depth--;
14548 _PUBLIC_ size_t ndr_size_spoolss_PrintProcessorDirectoryInfo1(const struct spoolss_PrintProcessorDirectoryInfo1 *r, struct smb_iconv_convenience *ic, int flags)
14550 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorDirectoryInfo1, ic);
14553 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcessorDirectoryInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcessorDirectoryInfo *r)
14555 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
14556 if (ndr_flags & NDR_SCALARS) {
14557 int level = ndr_push_get_switch_value(ndr, r);
14558 switch (level) {
14559 case 1: {
14560 NDR_CHECK(ndr_push_align(ndr, 4));
14561 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
14562 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
14563 break; }
14565 default: {
14566 NDR_CHECK(ndr_push_align(ndr, 4));
14567 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
14568 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
14569 break; }
14573 if (ndr_flags & NDR_BUFFERS) {
14574 int level = ndr_push_get_switch_value(ndr, r);
14575 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
14576 switch (level) {
14577 case 1:
14578 break;
14580 default:
14581 break;
14585 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
14586 return NDR_ERR_SUCCESS;
14589 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcessorDirectoryInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcessorDirectoryInfo *r)
14591 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
14592 int level;
14593 level = ndr_pull_get_switch_value(ndr, r);
14594 if (ndr_flags & NDR_SCALARS) {
14595 switch (level) {
14596 case 1: {
14597 NDR_CHECK(ndr_pull_align(ndr, 4));
14598 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14599 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
14600 break; }
14602 default: {
14603 NDR_CHECK(ndr_pull_align(ndr, 4));
14604 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
14605 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr, NDR_SCALARS, &r->info1));
14606 break; }
14610 if (ndr_flags & NDR_BUFFERS) {
14611 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
14612 switch (level) {
14613 case 1:
14614 break;
14616 default:
14617 break;
14621 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
14622 return NDR_ERR_SUCCESS;
14625 _PUBLIC_ void ndr_print_spoolss_PrintProcessorDirectoryInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcessorDirectoryInfo *r)
14627 int level;
14628 level = ndr_print_get_switch_value(ndr, r);
14629 ndr_print_union(ndr, name, level, "spoolss_PrintProcessorDirectoryInfo");
14630 switch (level) {
14631 case 1:
14632 ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr, "info1", &r->info1);
14633 break;
14635 default:
14636 ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr, "info1", &r->info1);
14637 break;
14642 _PUBLIC_ size_t ndr_size_spoolss_PrintProcessorDirectoryInfo(const union spoolss_PrintProcessorDirectoryInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
14644 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcessorDirectoryInfo, ic);
14647 static enum ndr_err_code ndr_push_spoolss_DocumentInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DocumentInfo1 *r)
14649 if (ndr_flags & NDR_SCALARS) {
14650 NDR_CHECK(ndr_push_align(ndr, 4));
14651 NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
14652 NDR_CHECK(ndr_push_unique_ptr(ndr, r->output_file));
14653 NDR_CHECK(ndr_push_unique_ptr(ndr, r->datatype));
14655 if (ndr_flags & NDR_BUFFERS) {
14656 if (r->document_name) {
14657 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
14658 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14659 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
14660 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14662 if (r->output_file) {
14663 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->output_file, CH_UTF16)));
14664 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->output_file, CH_UTF16)));
14666 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->output_file, ndr_charset_length(r->output_file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14668 if (r->datatype) {
14669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
14670 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
14672 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->datatype, ndr_charset_length(r->datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14675 return NDR_ERR_SUCCESS;
14678 static enum ndr_err_code ndr_pull_spoolss_DocumentInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DocumentInfo1 *r)
14680 uint32_t _ptr_document_name;
14681 TALLOC_CTX *_mem_save_document_name_0;
14682 uint32_t _ptr_output_file;
14683 TALLOC_CTX *_mem_save_output_file_0;
14684 uint32_t _ptr_datatype;
14685 TALLOC_CTX *_mem_save_datatype_0;
14686 if (ndr_flags & NDR_SCALARS) {
14687 NDR_CHECK(ndr_pull_align(ndr, 4));
14688 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
14689 if (_ptr_document_name) {
14690 NDR_PULL_ALLOC(ndr, r->document_name);
14691 } else {
14692 r->document_name = NULL;
14694 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_output_file));
14695 if (_ptr_output_file) {
14696 NDR_PULL_ALLOC(ndr, r->output_file);
14697 } else {
14698 r->output_file = NULL;
14700 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
14701 if (_ptr_datatype) {
14702 NDR_PULL_ALLOC(ndr, r->datatype);
14703 } else {
14704 r->datatype = NULL;
14707 if (ndr_flags & NDR_BUFFERS) {
14708 if (r->document_name) {
14709 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
14710 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
14711 NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
14712 NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
14713 if (ndr_get_array_length(ndr, &r->document_name) > ndr_get_array_size(ndr, &r->document_name)) {
14714 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->document_name), ndr_get_array_length(ndr, &r->document_name));
14716 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->document_name), sizeof(uint16_t)));
14717 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, ndr_get_array_length(ndr, &r->document_name), sizeof(uint16_t), CH_UTF16));
14718 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
14720 if (r->output_file) {
14721 _mem_save_output_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
14722 NDR_PULL_SET_MEM_CTX(ndr, r->output_file, 0);
14723 NDR_CHECK(ndr_pull_array_size(ndr, &r->output_file));
14724 NDR_CHECK(ndr_pull_array_length(ndr, &r->output_file));
14725 if (ndr_get_array_length(ndr, &r->output_file) > ndr_get_array_size(ndr, &r->output_file)) {
14726 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->output_file), ndr_get_array_length(ndr, &r->output_file));
14728 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->output_file), sizeof(uint16_t)));
14729 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->output_file, ndr_get_array_length(ndr, &r->output_file), sizeof(uint16_t), CH_UTF16));
14730 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_output_file_0, 0);
14732 if (r->datatype) {
14733 _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
14734 NDR_PULL_SET_MEM_CTX(ndr, r->datatype, 0);
14735 NDR_CHECK(ndr_pull_array_size(ndr, &r->datatype));
14736 NDR_CHECK(ndr_pull_array_length(ndr, &r->datatype));
14737 if (ndr_get_array_length(ndr, &r->datatype) > ndr_get_array_size(ndr, &r->datatype)) {
14738 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->datatype), ndr_get_array_length(ndr, &r->datatype));
14740 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->datatype), sizeof(uint16_t)));
14741 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->datatype, ndr_get_array_length(ndr, &r->datatype), sizeof(uint16_t), CH_UTF16));
14742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
14745 return NDR_ERR_SUCCESS;
14748 _PUBLIC_ void ndr_print_spoolss_DocumentInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_DocumentInfo1 *r)
14750 ndr_print_struct(ndr, name, "spoolss_DocumentInfo1");
14751 ndr->depth++;
14752 ndr_print_ptr(ndr, "document_name", r->document_name);
14753 ndr->depth++;
14754 if (r->document_name) {
14755 ndr_print_string(ndr, "document_name", r->document_name);
14757 ndr->depth--;
14758 ndr_print_ptr(ndr, "output_file", r->output_file);
14759 ndr->depth++;
14760 if (r->output_file) {
14761 ndr_print_string(ndr, "output_file", r->output_file);
14763 ndr->depth--;
14764 ndr_print_ptr(ndr, "datatype", r->datatype);
14765 ndr->depth++;
14766 if (r->datatype) {
14767 ndr_print_string(ndr, "datatype", r->datatype);
14769 ndr->depth--;
14770 ndr->depth--;
14773 static enum ndr_err_code ndr_push_spoolss_DocumentInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_DocumentInfo *r)
14775 if (ndr_flags & NDR_SCALARS) {
14776 int level = ndr_push_get_switch_value(ndr, r);
14777 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
14778 switch (level) {
14779 case 1: {
14780 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
14781 break; }
14783 case 2: {
14784 break; }
14786 case 3: {
14787 break; }
14789 default: {
14790 break; }
14794 if (ndr_flags & NDR_BUFFERS) {
14795 int level = ndr_push_get_switch_value(ndr, r);
14796 switch (level) {
14797 case 1:
14798 if (r->info1) {
14799 NDR_CHECK(ndr_push_spoolss_DocumentInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
14801 break;
14803 case 2:
14804 break;
14806 case 3:
14807 break;
14809 default:
14810 break;
14814 return NDR_ERR_SUCCESS;
14817 static enum ndr_err_code ndr_pull_spoolss_DocumentInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_DocumentInfo *r)
14819 int level;
14820 uint32_t _level;
14821 TALLOC_CTX *_mem_save_info1_0;
14822 level = ndr_pull_get_switch_value(ndr, r);
14823 if (ndr_flags & NDR_SCALARS) {
14824 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
14825 if (_level != level) {
14826 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
14828 switch (level) {
14829 case 1: {
14830 uint32_t _ptr_info1;
14831 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
14832 if (_ptr_info1) {
14833 NDR_PULL_ALLOC(ndr, r->info1);
14834 } else {
14835 r->info1 = NULL;
14837 break; }
14839 case 2: {
14840 break; }
14842 case 3: {
14843 break; }
14845 default: {
14846 break; }
14850 if (ndr_flags & NDR_BUFFERS) {
14851 switch (level) {
14852 case 1:
14853 if (r->info1) {
14854 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
14855 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
14856 NDR_CHECK(ndr_pull_spoolss_DocumentInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
14857 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
14859 break;
14861 case 2:
14862 break;
14864 case 3:
14865 break;
14867 default:
14868 break;
14872 return NDR_ERR_SUCCESS;
14875 _PUBLIC_ void ndr_print_spoolss_DocumentInfo(struct ndr_print *ndr, const char *name, const union spoolss_DocumentInfo *r)
14877 int level;
14878 level = ndr_print_get_switch_value(ndr, r);
14879 ndr_print_union(ndr, name, level, "spoolss_DocumentInfo");
14880 switch (level) {
14881 case 1:
14882 ndr_print_ptr(ndr, "info1", r->info1);
14883 ndr->depth++;
14884 if (r->info1) {
14885 ndr_print_spoolss_DocumentInfo1(ndr, "info1", r->info1);
14887 ndr->depth--;
14888 break;
14890 case 2:
14891 break;
14893 case 3:
14894 break;
14896 default:
14897 break;
14902 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OSVersion(struct ndr_push *ndr, int ndr_flags, const struct spoolss_OSVersion *r)
14904 if (ndr_flags & NDR_SCALARS) {
14905 NDR_CHECK(ndr_push_align(ndr, 4));
14906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_OSVersion(r, ndr->iconv_convenience, ndr->flags)));
14907 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->major));
14908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minor));
14909 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->build));
14910 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
14912 uint32_t _flags_save_string = ndr->flags;
14913 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14915 struct ndr_push *_ndr_extra_string;
14916 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_extra_string, 0, 256));
14917 NDR_CHECK(ndr_push_string(_ndr_extra_string, NDR_SCALARS, r->extra_string));
14918 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_extra_string, 0, 256));
14920 ndr->flags = _flags_save_string;
14923 if (ndr_flags & NDR_BUFFERS) {
14925 return NDR_ERR_SUCCESS;
14928 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersion(struct ndr_pull *ndr, int ndr_flags, struct spoolss_OSVersion *r)
14930 if (ndr_flags & NDR_SCALARS) {
14931 NDR_CHECK(ndr_pull_align(ndr, 4));
14932 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
14933 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->major));
14934 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minor));
14935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build));
14936 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->platform_id));
14938 uint32_t _flags_save_string = ndr->flags;
14939 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14941 struct ndr_pull *_ndr_extra_string;
14942 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_extra_string, 0, 256));
14943 NDR_CHECK(ndr_pull_string(_ndr_extra_string, NDR_SCALARS, &r->extra_string));
14944 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_extra_string, 0, 256));
14946 ndr->flags = _flags_save_string;
14949 if (ndr_flags & NDR_BUFFERS) {
14951 return NDR_ERR_SUCCESS;
14954 _PUBLIC_ void ndr_print_spoolss_OSVersion(struct ndr_print *ndr, const char *name, const struct spoolss_OSVersion *r)
14956 ndr_print_struct(ndr, name, "spoolss_OSVersion");
14957 ndr->depth++;
14958 ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_OSVersion(r, ndr->iconv_convenience, ndr->flags):r->_ndr_size);
14959 ndr_print_uint32(ndr, "major", r->major);
14960 ndr_print_uint32(ndr, "minor", r->minor);
14961 ndr_print_uint32(ndr, "build", r->build);
14962 ndr_print_uint32(ndr, "platform_id", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->platform_id);
14963 ndr_print_string(ndr, "extra_string", r->extra_string);
14964 ndr->depth--;
14967 _PUBLIC_ size_t ndr_size_spoolss_OSVersion(const struct spoolss_OSVersion *r, struct smb_iconv_convenience *ic, int flags)
14969 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersion, ic);
14972 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OSVersionEx(struct ndr_push *ndr, int ndr_flags, const struct spoolss_OSVersionEx *r)
14974 if (ndr_flags & NDR_SCALARS) {
14975 NDR_CHECK(ndr_push_align(ndr, 4));
14976 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_OSVersionEx(r, ndr->iconv_convenience, ndr->flags)));
14977 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->major));
14978 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minor));
14979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->build));
14980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
14982 uint32_t _flags_save_string = ndr->flags;
14983 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
14985 struct ndr_push *_ndr_extra_string;
14986 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_extra_string, 0, 256));
14987 NDR_CHECK(ndr_push_string(_ndr_extra_string, NDR_SCALARS, r->extra_string));
14988 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_extra_string, 0, 256));
14990 ndr->flags = _flags_save_string;
14992 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->service_pack_major));
14993 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->service_pack_minor));
14994 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->suite_mask));
14995 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->product_type));
14996 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->reserved));
14998 if (ndr_flags & NDR_BUFFERS) {
15000 return NDR_ERR_SUCCESS;
15003 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OSVersionEx(struct ndr_pull *ndr, int ndr_flags, struct spoolss_OSVersionEx *r)
15005 if (ndr_flags & NDR_SCALARS) {
15006 NDR_CHECK(ndr_pull_align(ndr, 4));
15007 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
15008 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->major));
15009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minor));
15010 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build));
15011 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->platform_id));
15013 uint32_t _flags_save_string = ndr->flags;
15014 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15016 struct ndr_pull *_ndr_extra_string;
15017 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_extra_string, 0, 256));
15018 NDR_CHECK(ndr_pull_string(_ndr_extra_string, NDR_SCALARS, &r->extra_string));
15019 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_extra_string, 0, 256));
15021 ndr->flags = _flags_save_string;
15023 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_pack_major));
15024 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->service_pack_minor));
15025 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->suite_mask));
15026 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->product_type));
15027 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->reserved));
15029 if (ndr_flags & NDR_BUFFERS) {
15031 return NDR_ERR_SUCCESS;
15034 _PUBLIC_ void ndr_print_spoolss_OSVersionEx(struct ndr_print *ndr, const char *name, const struct spoolss_OSVersionEx *r)
15036 ndr_print_struct(ndr, name, "spoolss_OSVersionEx");
15037 ndr->depth++;
15038 ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_OSVersionEx(r, ndr->iconv_convenience, ndr->flags):r->_ndr_size);
15039 ndr_print_uint32(ndr, "major", r->major);
15040 ndr_print_uint32(ndr, "minor", r->minor);
15041 ndr_print_uint32(ndr, "build", r->build);
15042 ndr_print_uint32(ndr, "platform_id", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->platform_id);
15043 ndr_print_string(ndr, "extra_string", r->extra_string);
15044 ndr_print_uint16(ndr, "service_pack_major", r->service_pack_major);
15045 ndr_print_uint16(ndr, "service_pack_minor", r->service_pack_minor);
15046 ndr_print_uint16(ndr, "suite_mask", r->suite_mask);
15047 ndr_print_uint8(ndr, "product_type", r->product_type);
15048 ndr_print_uint8(ndr, "reserved", r->reserved);
15049 ndr->depth--;
15052 _PUBLIC_ size_t ndr_size_spoolss_OSVersionEx(const struct spoolss_OSVersionEx *r, struct smb_iconv_convenience *ic, int flags)
15054 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_OSVersionEx, ic);
15057 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterData(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrinterData *r)
15059 if (ndr_flags & NDR_SCALARS) {
15060 int level = ndr_push_get_switch_value(ndr, r);
15061 switch (level) {
15062 case REG_NONE: {
15063 break; }
15065 case REG_SZ: {
15067 uint32_t _flags_save_string = ndr->flags;
15068 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15069 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->string));
15070 ndr->flags = _flags_save_string;
15072 break; }
15074 case REG_BINARY: {
15076 uint32_t _flags_save_DATA_BLOB = ndr->flags;
15077 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
15078 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->binary));
15079 ndr->flags = _flags_save_DATA_BLOB;
15081 break; }
15083 case REG_DWORD: {
15084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->value));
15085 break; }
15087 case REG_MULTI_SZ: {
15089 uint32_t _flags_save_string_array = ndr->flags;
15090 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15091 NDR_CHECK(ndr_push_string_array(ndr, NDR_SCALARS, r->string_array));
15092 ndr->flags = _flags_save_string_array;
15094 break; }
15096 default: {
15098 uint32_t _flags_save_DATA_BLOB = ndr->flags;
15099 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
15100 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
15101 ndr->flags = _flags_save_DATA_BLOB;
15103 break; }
15107 if (ndr_flags & NDR_BUFFERS) {
15108 int level = ndr_push_get_switch_value(ndr, r);
15109 switch (level) {
15110 case REG_NONE:
15111 break;
15113 case REG_SZ:
15114 break;
15116 case REG_BINARY:
15117 break;
15119 case REG_DWORD:
15120 break;
15122 case REG_MULTI_SZ:
15123 break;
15125 default:
15126 break;
15130 return NDR_ERR_SUCCESS;
15133 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterData(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrinterData *r)
15135 int level;
15136 level = ndr_pull_get_switch_value(ndr, r);
15137 if (ndr_flags & NDR_SCALARS) {
15138 switch (level) {
15139 case REG_NONE: {
15140 break; }
15142 case REG_SZ: {
15144 uint32_t _flags_save_string = ndr->flags;
15145 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15146 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->string));
15147 ndr->flags = _flags_save_string;
15149 break; }
15151 case REG_BINARY: {
15153 uint32_t _flags_save_DATA_BLOB = ndr->flags;
15154 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
15155 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->binary));
15156 ndr->flags = _flags_save_DATA_BLOB;
15158 break; }
15160 case REG_DWORD: {
15161 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value));
15162 break; }
15164 case REG_MULTI_SZ: {
15166 uint32_t _flags_save_string_array = ndr->flags;
15167 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15168 NDR_CHECK(ndr_pull_string_array(ndr, NDR_SCALARS, &r->string_array));
15169 ndr->flags = _flags_save_string_array;
15171 break; }
15173 default: {
15175 uint32_t _flags_save_DATA_BLOB = ndr->flags;
15176 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
15177 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
15178 ndr->flags = _flags_save_DATA_BLOB;
15180 break; }
15184 if (ndr_flags & NDR_BUFFERS) {
15185 switch (level) {
15186 case REG_NONE:
15187 break;
15189 case REG_SZ:
15190 break;
15192 case REG_BINARY:
15193 break;
15195 case REG_DWORD:
15196 break;
15198 case REG_MULTI_SZ:
15199 break;
15201 default:
15202 break;
15206 return NDR_ERR_SUCCESS;
15209 _PUBLIC_ void ndr_print_spoolss_PrinterData(struct ndr_print *ndr, const char *name, const union spoolss_PrinterData *r)
15211 int level;
15212 level = ndr_print_get_switch_value(ndr, r);
15213 ndr_print_union(ndr, name, level, "spoolss_PrinterData");
15214 switch (level) {
15215 case REG_NONE:
15216 break;
15218 case REG_SZ:
15219 ndr_print_string(ndr, "string", r->string);
15220 break;
15222 case REG_BINARY:
15223 ndr_print_DATA_BLOB(ndr, "binary", r->binary);
15224 break;
15226 case REG_DWORD:
15227 ndr_print_uint32(ndr, "value", r->value);
15228 break;
15230 case REG_MULTI_SZ:
15231 ndr_print_string_array(ndr, "string_array", r->string_array);
15232 break;
15234 default:
15235 ndr_print_DATA_BLOB(ndr, "data", r->data);
15236 break;
15241 _PUBLIC_ size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
15243 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterData, ic);
15246 static enum ndr_err_code ndr_push_spoolss_FormFlags(struct ndr_push *ndr, int ndr_flags, enum spoolss_FormFlags r)
15248 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
15249 return NDR_ERR_SUCCESS;
15252 static enum ndr_err_code ndr_pull_spoolss_FormFlags(struct ndr_pull *ndr, int ndr_flags, enum spoolss_FormFlags *r)
15254 uint32_t v;
15255 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
15256 *r = v;
15257 return NDR_ERR_SUCCESS;
15260 _PUBLIC_ void ndr_print_spoolss_FormFlags(struct ndr_print *ndr, const char *name, enum spoolss_FormFlags r)
15262 const char *val = NULL;
15264 switch (r) {
15265 case SPOOLSS_FORM_USER: val = "SPOOLSS_FORM_USER"; break;
15266 case SPOOLSS_FORM_BUILTIN: val = "SPOOLSS_FORM_BUILTIN"; break;
15267 case SPOOLSS_FORM_PRINTER: val = "SPOOLSS_FORM_PRINTER"; break;
15269 ndr_print_enum(ndr, name, "ENUM", val, r);
15272 static enum ndr_err_code ndr_push_spoolss_FormSize(struct ndr_push *ndr, int ndr_flags, const struct spoolss_FormSize *r)
15274 if (ndr_flags & NDR_SCALARS) {
15275 NDR_CHECK(ndr_push_align(ndr, 4));
15276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->width));
15277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->height));
15279 if (ndr_flags & NDR_BUFFERS) {
15281 return NDR_ERR_SUCCESS;
15284 static enum ndr_err_code ndr_pull_spoolss_FormSize(struct ndr_pull *ndr, int ndr_flags, struct spoolss_FormSize *r)
15286 if (ndr_flags & NDR_SCALARS) {
15287 NDR_CHECK(ndr_pull_align(ndr, 4));
15288 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->width));
15289 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->height));
15291 if (ndr_flags & NDR_BUFFERS) {
15293 return NDR_ERR_SUCCESS;
15296 _PUBLIC_ void ndr_print_spoolss_FormSize(struct ndr_print *ndr, const char *name, const struct spoolss_FormSize *r)
15298 ndr_print_struct(ndr, name, "spoolss_FormSize");
15299 ndr->depth++;
15300 ndr_print_uint32(ndr, "width", r->width);
15301 ndr_print_uint32(ndr, "height", r->height);
15302 ndr->depth--;
15305 static enum ndr_err_code ndr_push_spoolss_FormArea(struct ndr_push *ndr, int ndr_flags, const struct spoolss_FormArea *r)
15307 if (ndr_flags & NDR_SCALARS) {
15308 NDR_CHECK(ndr_push_align(ndr, 4));
15309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->left));
15310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->top));
15311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->right));
15312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bottom));
15314 if (ndr_flags & NDR_BUFFERS) {
15316 return NDR_ERR_SUCCESS;
15319 static enum ndr_err_code ndr_pull_spoolss_FormArea(struct ndr_pull *ndr, int ndr_flags, struct spoolss_FormArea *r)
15321 if (ndr_flags & NDR_SCALARS) {
15322 NDR_CHECK(ndr_pull_align(ndr, 4));
15323 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->left));
15324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->top));
15325 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->right));
15326 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bottom));
15328 if (ndr_flags & NDR_BUFFERS) {
15330 return NDR_ERR_SUCCESS;
15333 _PUBLIC_ void ndr_print_spoolss_FormArea(struct ndr_print *ndr, const char *name, const struct spoolss_FormArea *r)
15335 ndr_print_struct(ndr, name, "spoolss_FormArea");
15336 ndr->depth++;
15337 ndr_print_uint32(ndr, "left", r->left);
15338 ndr_print_uint32(ndr, "top", r->top);
15339 ndr_print_uint32(ndr, "right", r->right);
15340 ndr_print_uint32(ndr, "bottom", r->bottom);
15341 ndr->depth--;
15344 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_FormInfo1 *r)
15346 if (ndr_flags & NDR_SCALARS) {
15347 NDR_CHECK(ndr_push_align(ndr, 4));
15348 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr, NDR_SCALARS, r->flags));
15350 uint32_t _flags_save_string = ndr->flags;
15351 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15352 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->form_name));
15353 ndr->flags = _flags_save_string;
15355 NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
15356 NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
15358 if (ndr_flags & NDR_BUFFERS) {
15360 uint32_t _flags_save_string = ndr->flags;
15361 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15362 if (r->form_name) {
15363 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->form_name));
15364 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->form_name));
15366 ndr->flags = _flags_save_string;
15369 return NDR_ERR_SUCCESS;
15372 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_FormInfo1 *r)
15374 uint32_t _ptr_form_name;
15375 TALLOC_CTX *_mem_save_form_name_0;
15376 if (ndr_flags & NDR_SCALARS) {
15377 NDR_CHECK(ndr_pull_align(ndr, 4));
15378 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr, NDR_SCALARS, &r->flags));
15380 uint32_t _flags_save_string = ndr->flags;
15381 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15382 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_form_name));
15383 if (_ptr_form_name) {
15384 NDR_PULL_ALLOC(ndr, r->form_name);
15385 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->form_name, _ptr_form_name));
15386 } else {
15387 r->form_name = NULL;
15389 ndr->flags = _flags_save_string;
15391 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
15392 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
15394 if (ndr_flags & NDR_BUFFERS) {
15396 uint32_t _flags_save_string = ndr->flags;
15397 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15398 if (r->form_name) {
15399 uint32_t _relative_save_offset;
15400 _relative_save_offset = ndr->offset;
15401 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->form_name));
15402 _mem_save_form_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15403 NDR_PULL_SET_MEM_CTX(ndr, r->form_name, 0);
15404 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->form_name));
15405 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_form_name_0, 0);
15406 ndr->offset = _relative_save_offset;
15408 ndr->flags = _flags_save_string;
15411 return NDR_ERR_SUCCESS;
15414 _PUBLIC_ void ndr_print_spoolss_FormInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_FormInfo1 *r)
15416 ndr_print_struct(ndr, name, "spoolss_FormInfo1");
15417 ndr->depth++;
15418 ndr_print_spoolss_FormFlags(ndr, "flags", r->flags);
15419 ndr_print_ptr(ndr, "form_name", r->form_name);
15420 ndr->depth++;
15421 if (r->form_name) {
15422 ndr_print_string(ndr, "form_name", r->form_name);
15424 ndr->depth--;
15425 ndr_print_spoolss_FormSize(ndr, "size", &r->size);
15426 ndr_print_spoolss_FormArea(ndr, "area", &r->area);
15427 ndr->depth--;
15430 _PUBLIC_ size_t ndr_size_spoolss_FormInfo1(const struct spoolss_FormInfo1 *r, struct smb_iconv_convenience *ic, int flags)
15432 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_FormInfo1, ic);
15435 static enum ndr_err_code ndr_push_spoolss_FormStringType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
15437 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
15438 return NDR_ERR_SUCCESS;
15441 static enum ndr_err_code ndr_pull_spoolss_FormStringType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
15443 uint32_t v;
15444 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
15445 *r = v;
15446 return NDR_ERR_SUCCESS;
15449 _PUBLIC_ void ndr_print_spoolss_FormStringType(struct ndr_print *ndr, const char *name, uint32_t r)
15451 ndr_print_uint32(ndr, name, r);
15452 ndr->depth++;
15453 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_NONE", SPOOLSS_FORM_STRING_TYPE_NONE, r);
15454 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_MUI_DLL", SPOOLSS_FORM_STRING_TYPE_MUI_DLL, r);
15455 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_LANG_PAIR", SPOOLSS_FORM_STRING_TYPE_LANG_PAIR, r);
15456 ndr->depth--;
15459 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_FormInfo2 *r)
15461 if (ndr_flags & NDR_SCALARS) {
15462 NDR_CHECK(ndr_push_align(ndr, 4));
15463 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr, NDR_SCALARS, r->flags));
15465 uint32_t _flags_save_string = ndr->flags;
15466 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15467 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->form_name));
15468 ndr->flags = _flags_save_string;
15470 NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
15471 NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
15473 uint32_t _flags_save_string = ndr->flags;
15474 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
15475 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->keyword));
15476 ndr->flags = _flags_save_string;
15478 NDR_CHECK(ndr_push_spoolss_FormStringType(ndr, NDR_SCALARS, r->string_type));
15480 uint32_t _flags_save_string = ndr->flags;
15481 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15482 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->mui_dll));
15483 ndr->flags = _flags_save_string;
15485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ressource_id));
15487 uint32_t _flags_save_string = ndr->flags;
15488 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15489 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
15490 ndr->flags = _flags_save_string;
15492 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lang_id));
15494 if (ndr_flags & NDR_BUFFERS) {
15496 uint32_t _flags_save_string = ndr->flags;
15497 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15498 if (r->form_name) {
15499 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->form_name));
15500 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->form_name));
15502 ndr->flags = _flags_save_string;
15505 uint32_t _flags_save_string = ndr->flags;
15506 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
15507 if (r->keyword) {
15508 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->keyword));
15509 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->keyword));
15511 ndr->flags = _flags_save_string;
15514 uint32_t _flags_save_string = ndr->flags;
15515 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15516 if (r->mui_dll) {
15517 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->mui_dll));
15518 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->mui_dll));
15520 ndr->flags = _flags_save_string;
15523 uint32_t _flags_save_string = ndr->flags;
15524 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15525 if (r->display_name) {
15526 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->display_name));
15527 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
15529 ndr->flags = _flags_save_string;
15532 return NDR_ERR_SUCCESS;
15535 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_FormInfo2 *r)
15537 uint32_t _ptr_form_name;
15538 TALLOC_CTX *_mem_save_form_name_0;
15539 uint32_t _ptr_keyword;
15540 TALLOC_CTX *_mem_save_keyword_0;
15541 uint32_t _ptr_mui_dll;
15542 TALLOC_CTX *_mem_save_mui_dll_0;
15543 uint32_t _ptr_display_name;
15544 TALLOC_CTX *_mem_save_display_name_0;
15545 if (ndr_flags & NDR_SCALARS) {
15546 NDR_CHECK(ndr_pull_align(ndr, 4));
15547 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr, NDR_SCALARS, &r->flags));
15549 uint32_t _flags_save_string = ndr->flags;
15550 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15551 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_form_name));
15552 if (_ptr_form_name) {
15553 NDR_PULL_ALLOC(ndr, r->form_name);
15554 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->form_name, _ptr_form_name));
15555 } else {
15556 r->form_name = NULL;
15558 ndr->flags = _flags_save_string;
15560 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
15561 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
15563 uint32_t _flags_save_string = ndr->flags;
15564 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
15565 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyword));
15566 if (_ptr_keyword) {
15567 NDR_PULL_ALLOC(ndr, r->keyword);
15568 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->keyword, _ptr_keyword));
15569 } else {
15570 r->keyword = NULL;
15572 ndr->flags = _flags_save_string;
15574 NDR_CHECK(ndr_pull_spoolss_FormStringType(ndr, NDR_SCALARS, &r->string_type));
15576 uint32_t _flags_save_string = ndr->flags;
15577 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15578 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mui_dll));
15579 if (_ptr_mui_dll) {
15580 NDR_PULL_ALLOC(ndr, r->mui_dll);
15581 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->mui_dll, _ptr_mui_dll));
15582 } else {
15583 r->mui_dll = NULL;
15585 ndr->flags = _flags_save_string;
15587 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ressource_id));
15589 uint32_t _flags_save_string = ndr->flags;
15590 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15591 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
15592 if (_ptr_display_name) {
15593 NDR_PULL_ALLOC(ndr, r->display_name);
15594 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
15595 } else {
15596 r->display_name = NULL;
15598 ndr->flags = _flags_save_string;
15600 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lang_id));
15602 if (ndr_flags & NDR_BUFFERS) {
15604 uint32_t _flags_save_string = ndr->flags;
15605 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15606 if (r->form_name) {
15607 uint32_t _relative_save_offset;
15608 _relative_save_offset = ndr->offset;
15609 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->form_name));
15610 _mem_save_form_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15611 NDR_PULL_SET_MEM_CTX(ndr, r->form_name, 0);
15612 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->form_name));
15613 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_form_name_0, 0);
15614 ndr->offset = _relative_save_offset;
15616 ndr->flags = _flags_save_string;
15619 uint32_t _flags_save_string = ndr->flags;
15620 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
15621 if (r->keyword) {
15622 uint32_t _relative_save_offset;
15623 _relative_save_offset = ndr->offset;
15624 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->keyword));
15625 _mem_save_keyword_0 = NDR_PULL_GET_MEM_CTX(ndr);
15626 NDR_PULL_SET_MEM_CTX(ndr, r->keyword, 0);
15627 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->keyword));
15628 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyword_0, 0);
15629 ndr->offset = _relative_save_offset;
15631 ndr->flags = _flags_save_string;
15634 uint32_t _flags_save_string = ndr->flags;
15635 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15636 if (r->mui_dll) {
15637 uint32_t _relative_save_offset;
15638 _relative_save_offset = ndr->offset;
15639 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->mui_dll));
15640 _mem_save_mui_dll_0 = NDR_PULL_GET_MEM_CTX(ndr);
15641 NDR_PULL_SET_MEM_CTX(ndr, r->mui_dll, 0);
15642 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->mui_dll));
15643 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mui_dll_0, 0);
15644 ndr->offset = _relative_save_offset;
15646 ndr->flags = _flags_save_string;
15649 uint32_t _flags_save_string = ndr->flags;
15650 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
15651 if (r->display_name) {
15652 uint32_t _relative_save_offset;
15653 _relative_save_offset = ndr->offset;
15654 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
15655 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15656 NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
15657 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
15658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
15659 ndr->offset = _relative_save_offset;
15661 ndr->flags = _flags_save_string;
15664 return NDR_ERR_SUCCESS;
15667 _PUBLIC_ void ndr_print_spoolss_FormInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_FormInfo2 *r)
15669 ndr_print_struct(ndr, name, "spoolss_FormInfo2");
15670 ndr->depth++;
15671 ndr_print_spoolss_FormFlags(ndr, "flags", r->flags);
15672 ndr_print_ptr(ndr, "form_name", r->form_name);
15673 ndr->depth++;
15674 if (r->form_name) {
15675 ndr_print_string(ndr, "form_name", r->form_name);
15677 ndr->depth--;
15678 ndr_print_spoolss_FormSize(ndr, "size", &r->size);
15679 ndr_print_spoolss_FormArea(ndr, "area", &r->area);
15680 ndr_print_ptr(ndr, "keyword", r->keyword);
15681 ndr->depth++;
15682 if (r->keyword) {
15683 ndr_print_string(ndr, "keyword", r->keyword);
15685 ndr->depth--;
15686 ndr_print_spoolss_FormStringType(ndr, "string_type", r->string_type);
15687 ndr_print_ptr(ndr, "mui_dll", r->mui_dll);
15688 ndr->depth++;
15689 if (r->mui_dll) {
15690 ndr_print_string(ndr, "mui_dll", r->mui_dll);
15692 ndr->depth--;
15693 ndr_print_uint32(ndr, "ressource_id", r->ressource_id);
15694 ndr_print_ptr(ndr, "display_name", r->display_name);
15695 ndr->depth++;
15696 if (r->display_name) {
15697 ndr_print_string(ndr, "display_name", r->display_name);
15699 ndr->depth--;
15700 ndr_print_uint32(ndr, "lang_id", r->lang_id);
15701 ndr->depth--;
15704 _PUBLIC_ size_t ndr_size_spoolss_FormInfo2(const struct spoolss_FormInfo2 *r, struct smb_iconv_convenience *ic, int flags)
15706 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_FormInfo2, ic);
15709 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FormInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_FormInfo *r)
15711 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
15712 if (ndr_flags & NDR_SCALARS) {
15713 int level = ndr_push_get_switch_value(ndr, r);
15714 switch (level) {
15715 case 1: {
15716 NDR_CHECK(ndr_push_align(ndr, 4));
15717 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
15718 NDR_CHECK(ndr_push_spoolss_FormInfo1(ndr, NDR_SCALARS, &r->info1));
15719 break; }
15721 case 2: {
15722 NDR_CHECK(ndr_push_align(ndr, 4));
15723 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
15724 NDR_CHECK(ndr_push_spoolss_FormInfo2(ndr, NDR_SCALARS, &r->info2));
15725 break; }
15727 default: {
15728 break; }
15732 if (ndr_flags & NDR_BUFFERS) {
15733 int level = ndr_push_get_switch_value(ndr, r);
15734 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
15735 switch (level) {
15736 case 1:
15737 NDR_CHECK(ndr_push_spoolss_FormInfo1(ndr, NDR_BUFFERS, &r->info1));
15738 break;
15740 case 2:
15741 NDR_CHECK(ndr_push_spoolss_FormInfo2(ndr, NDR_BUFFERS, &r->info2));
15742 break;
15744 default:
15745 break;
15749 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
15750 return NDR_ERR_SUCCESS;
15753 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FormInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_FormInfo *r)
15755 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
15756 int level;
15757 level = ndr_pull_get_switch_value(ndr, r);
15758 if (ndr_flags & NDR_SCALARS) {
15759 switch (level) {
15760 case 1: {
15761 NDR_CHECK(ndr_pull_align(ndr, 4));
15762 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
15763 NDR_CHECK(ndr_pull_spoolss_FormInfo1(ndr, NDR_SCALARS, &r->info1));
15764 break; }
15766 case 2: {
15767 NDR_CHECK(ndr_pull_align(ndr, 4));
15768 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
15769 NDR_CHECK(ndr_pull_spoolss_FormInfo2(ndr, NDR_SCALARS, &r->info2));
15770 break; }
15772 default: {
15773 break; }
15777 if (ndr_flags & NDR_BUFFERS) {
15778 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
15779 switch (level) {
15780 case 1:
15781 NDR_CHECK(ndr_pull_spoolss_FormInfo1(ndr, NDR_BUFFERS, &r->info1));
15782 break;
15784 case 2:
15785 NDR_CHECK(ndr_pull_spoolss_FormInfo2(ndr, NDR_BUFFERS, &r->info2));
15786 break;
15788 default:
15789 break;
15793 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
15794 return NDR_ERR_SUCCESS;
15797 _PUBLIC_ void ndr_print_spoolss_FormInfo(struct ndr_print *ndr, const char *name, const union spoolss_FormInfo *r)
15799 int level;
15800 level = ndr_print_get_switch_value(ndr, r);
15801 ndr_print_union(ndr, name, level, "spoolss_FormInfo");
15802 switch (level) {
15803 case 1:
15804 ndr_print_spoolss_FormInfo1(ndr, "info1", &r->info1);
15805 break;
15807 case 2:
15808 ndr_print_spoolss_FormInfo2(ndr, "info2", &r->info2);
15809 break;
15811 default:
15812 break;
15817 _PUBLIC_ size_t ndr_size_spoolss_FormInfo(const union spoolss_FormInfo *r, uint32_t level, struct smb_iconv_convenience *ic, int flags)
15819 return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_FormInfo, ic);
15822 static enum ndr_err_code ndr_push_spoolss_AddFormInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddFormInfo1 *r)
15824 if (ndr_flags & NDR_SCALARS) {
15825 NDR_CHECK(ndr_push_align(ndr, 4));
15826 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr, NDR_SCALARS, r->flags));
15827 NDR_CHECK(ndr_push_unique_ptr(ndr, r->form_name));
15828 NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
15829 NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
15831 if (ndr_flags & NDR_BUFFERS) {
15832 if (r->form_name) {
15833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->form_name, CH_UTF16)));
15834 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->form_name, CH_UTF16)));
15836 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->form_name, ndr_charset_length(r->form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15839 return NDR_ERR_SUCCESS;
15842 static enum ndr_err_code ndr_pull_spoolss_AddFormInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddFormInfo1 *r)
15844 uint32_t _ptr_form_name;
15845 TALLOC_CTX *_mem_save_form_name_0;
15846 if (ndr_flags & NDR_SCALARS) {
15847 NDR_CHECK(ndr_pull_align(ndr, 4));
15848 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr, NDR_SCALARS, &r->flags));
15849 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_form_name));
15850 if (_ptr_form_name) {
15851 NDR_PULL_ALLOC(ndr, r->form_name);
15852 } else {
15853 r->form_name = NULL;
15855 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
15856 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
15858 if (ndr_flags & NDR_BUFFERS) {
15859 if (r->form_name) {
15860 _mem_save_form_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15861 NDR_PULL_SET_MEM_CTX(ndr, r->form_name, 0);
15862 NDR_CHECK(ndr_pull_array_size(ndr, &r->form_name));
15863 NDR_CHECK(ndr_pull_array_length(ndr, &r->form_name));
15864 if (ndr_get_array_length(ndr, &r->form_name) > ndr_get_array_size(ndr, &r->form_name)) {
15865 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->form_name), ndr_get_array_length(ndr, &r->form_name));
15867 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->form_name), sizeof(uint16_t)));
15868 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->form_name, ndr_get_array_length(ndr, &r->form_name), sizeof(uint16_t), CH_UTF16));
15869 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_form_name_0, 0);
15872 return NDR_ERR_SUCCESS;
15875 _PUBLIC_ void ndr_print_spoolss_AddFormInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_AddFormInfo1 *r)
15877 ndr_print_struct(ndr, name, "spoolss_AddFormInfo1");
15878 ndr->depth++;
15879 ndr_print_spoolss_FormFlags(ndr, "flags", r->flags);
15880 ndr_print_ptr(ndr, "form_name", r->form_name);
15881 ndr->depth++;
15882 if (r->form_name) {
15883 ndr_print_string(ndr, "form_name", r->form_name);
15885 ndr->depth--;
15886 ndr_print_spoolss_FormSize(ndr, "size", &r->size);
15887 ndr_print_spoolss_FormArea(ndr, "area", &r->area);
15888 ndr->depth--;
15891 static enum ndr_err_code ndr_push_spoolss_AddFormInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_AddFormInfo2 *r)
15893 if (ndr_flags & NDR_SCALARS) {
15894 NDR_CHECK(ndr_push_align(ndr, 4));
15895 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr, NDR_SCALARS, r->flags));
15896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->form_name));
15897 NDR_CHECK(ndr_push_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
15898 NDR_CHECK(ndr_push_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
15899 NDR_CHECK(ndr_push_unique_ptr(ndr, r->keyword));
15900 NDR_CHECK(ndr_push_spoolss_FormStringType(ndr, NDR_SCALARS, r->string_type));
15901 NDR_CHECK(ndr_push_unique_ptr(ndr, r->mui_dll));
15902 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ressource_id));
15903 NDR_CHECK(ndr_push_unique_ptr(ndr, r->display_name));
15904 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lang_id));
15906 if (ndr_flags & NDR_BUFFERS) {
15907 if (r->form_name) {
15908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->form_name, CH_UTF16)));
15909 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15910 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->form_name, CH_UTF16)));
15911 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->form_name, ndr_charset_length(r->form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15913 if (r->keyword) {
15914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->keyword, CH_DOS)));
15915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->keyword, CH_DOS)));
15917 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->keyword, ndr_charset_length(r->keyword, CH_DOS), sizeof(uint8_t), CH_DOS));
15919 if (r->mui_dll) {
15920 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->mui_dll, CH_UTF16)));
15921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->mui_dll, CH_UTF16)));
15923 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->mui_dll, ndr_charset_length(r->mui_dll, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15925 if (r->display_name) {
15926 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->display_name, CH_UTF16)));
15927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15928 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->display_name, CH_UTF16)));
15929 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->display_name, ndr_charset_length(r->display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15932 return NDR_ERR_SUCCESS;
15935 static enum ndr_err_code ndr_pull_spoolss_AddFormInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_AddFormInfo2 *r)
15937 uint32_t _ptr_form_name;
15938 TALLOC_CTX *_mem_save_form_name_0;
15939 uint32_t _ptr_keyword;
15940 TALLOC_CTX *_mem_save_keyword_0;
15941 uint32_t _ptr_mui_dll;
15942 TALLOC_CTX *_mem_save_mui_dll_0;
15943 uint32_t _ptr_display_name;
15944 TALLOC_CTX *_mem_save_display_name_0;
15945 if (ndr_flags & NDR_SCALARS) {
15946 NDR_CHECK(ndr_pull_align(ndr, 4));
15947 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr, NDR_SCALARS, &r->flags));
15948 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_form_name));
15949 if (_ptr_form_name) {
15950 NDR_PULL_ALLOC(ndr, r->form_name);
15951 } else {
15952 r->form_name = NULL;
15954 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr, NDR_SCALARS, &r->size));
15955 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr, NDR_SCALARS, &r->area));
15956 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyword));
15957 if (_ptr_keyword) {
15958 NDR_PULL_ALLOC(ndr, r->keyword);
15959 } else {
15960 r->keyword = NULL;
15962 NDR_CHECK(ndr_pull_spoolss_FormStringType(ndr, NDR_SCALARS, &r->string_type));
15963 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_mui_dll));
15964 if (_ptr_mui_dll) {
15965 NDR_PULL_ALLOC(ndr, r->mui_dll);
15966 } else {
15967 r->mui_dll = NULL;
15969 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ressource_id));
15970 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
15971 if (_ptr_display_name) {
15972 NDR_PULL_ALLOC(ndr, r->display_name);
15973 } else {
15974 r->display_name = NULL;
15976 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lang_id));
15978 if (ndr_flags & NDR_BUFFERS) {
15979 if (r->form_name) {
15980 _mem_save_form_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
15981 NDR_PULL_SET_MEM_CTX(ndr, r->form_name, 0);
15982 NDR_CHECK(ndr_pull_array_size(ndr, &r->form_name));
15983 NDR_CHECK(ndr_pull_array_length(ndr, &r->form_name));
15984 if (ndr_get_array_length(ndr, &r->form_name) > ndr_get_array_size(ndr, &r->form_name)) {
15985 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->form_name), ndr_get_array_length(ndr, &r->form_name));
15987 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->form_name), sizeof(uint16_t)));
15988 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->form_name, ndr_get_array_length(ndr, &r->form_name), sizeof(uint16_t), CH_UTF16));
15989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_form_name_0, 0);
15991 if (r->keyword) {
15992 _mem_save_keyword_0 = NDR_PULL_GET_MEM_CTX(ndr);
15993 NDR_PULL_SET_MEM_CTX(ndr, r->keyword, 0);
15994 NDR_CHECK(ndr_pull_array_size(ndr, &r->keyword));
15995 NDR_CHECK(ndr_pull_array_length(ndr, &r->keyword));
15996 if (ndr_get_array_length(ndr, &r->keyword) > ndr_get_array_size(ndr, &r->keyword)) {
15997 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->keyword), ndr_get_array_length(ndr, &r->keyword));
15999 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->keyword), sizeof(uint8_t)));
16000 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->keyword, ndr_get_array_length(ndr, &r->keyword), sizeof(uint8_t), CH_DOS));
16001 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyword_0, 0);
16003 if (r->mui_dll) {
16004 _mem_save_mui_dll_0 = NDR_PULL_GET_MEM_CTX(ndr);
16005 NDR_PULL_SET_MEM_CTX(ndr, r->mui_dll, 0);
16006 NDR_CHECK(ndr_pull_array_size(ndr, &r->mui_dll));
16007 NDR_CHECK(ndr_pull_array_length(ndr, &r->mui_dll));
16008 if (ndr_get_array_length(ndr, &r->mui_dll) > ndr_get_array_size(ndr, &r->mui_dll)) {
16009 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->mui_dll), ndr_get_array_length(ndr, &r->mui_dll));
16011 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->mui_dll), sizeof(uint16_t)));
16012 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->mui_dll, ndr_get_array_length(ndr, &r->mui_dll), sizeof(uint16_t), CH_UTF16));
16013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_mui_dll_0, 0);
16015 if (r->display_name) {
16016 _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16017 NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
16018 NDR_CHECK(ndr_pull_array_size(ndr, &r->display_name));
16019 NDR_CHECK(ndr_pull_array_length(ndr, &r->display_name));
16020 if (ndr_get_array_length(ndr, &r->display_name) > ndr_get_array_size(ndr, &r->display_name)) {
16021 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->display_name), ndr_get_array_length(ndr, &r->display_name));
16023 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->display_name), sizeof(uint16_t)));
16024 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->display_name, ndr_get_array_length(ndr, &r->display_name), sizeof(uint16_t), CH_UTF16));
16025 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
16028 return NDR_ERR_SUCCESS;
16031 _PUBLIC_ void ndr_print_spoolss_AddFormInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_AddFormInfo2 *r)
16033 ndr_print_struct(ndr, name, "spoolss_AddFormInfo2");
16034 ndr->depth++;
16035 ndr_print_spoolss_FormFlags(ndr, "flags", r->flags);
16036 ndr_print_ptr(ndr, "form_name", r->form_name);
16037 ndr->depth++;
16038 if (r->form_name) {
16039 ndr_print_string(ndr, "form_name", r->form_name);
16041 ndr->depth--;
16042 ndr_print_spoolss_FormSize(ndr, "size", &r->size);
16043 ndr_print_spoolss_FormArea(ndr, "area", &r->area);
16044 ndr_print_ptr(ndr, "keyword", r->keyword);
16045 ndr->depth++;
16046 if (r->keyword) {
16047 ndr_print_string(ndr, "keyword", r->keyword);
16049 ndr->depth--;
16050 ndr_print_spoolss_FormStringType(ndr, "string_type", r->string_type);
16051 ndr_print_ptr(ndr, "mui_dll", r->mui_dll);
16052 ndr->depth++;
16053 if (r->mui_dll) {
16054 ndr_print_string(ndr, "mui_dll", r->mui_dll);
16056 ndr->depth--;
16057 ndr_print_uint32(ndr, "ressource_id", r->ressource_id);
16058 ndr_print_ptr(ndr, "display_name", r->display_name);
16059 ndr->depth++;
16060 if (r->display_name) {
16061 ndr_print_string(ndr, "display_name", r->display_name);
16063 ndr->depth--;
16064 ndr_print_uint32(ndr, "lang_id", r->lang_id);
16065 ndr->depth--;
16068 static enum ndr_err_code ndr_push_spoolss_AddFormInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_AddFormInfo *r)
16070 if (ndr_flags & NDR_SCALARS) {
16071 int level = ndr_push_get_switch_value(ndr, r);
16072 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
16073 switch (level) {
16074 case 1: {
16075 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
16076 break; }
16078 case 2: {
16079 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
16080 break; }
16082 default:
16083 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
16086 if (ndr_flags & NDR_BUFFERS) {
16087 int level = ndr_push_get_switch_value(ndr, r);
16088 switch (level) {
16089 case 1:
16090 if (r->info1) {
16091 NDR_CHECK(ndr_push_spoolss_AddFormInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
16093 break;
16095 case 2:
16096 if (r->info2) {
16097 NDR_CHECK(ndr_push_spoolss_AddFormInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
16099 break;
16101 default:
16102 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
16105 return NDR_ERR_SUCCESS;
16108 static enum ndr_err_code ndr_pull_spoolss_AddFormInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_AddFormInfo *r)
16110 int level;
16111 uint32_t _level;
16112 TALLOC_CTX *_mem_save_info1_0;
16113 TALLOC_CTX *_mem_save_info2_0;
16114 level = ndr_pull_get_switch_value(ndr, r);
16115 if (ndr_flags & NDR_SCALARS) {
16116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
16117 if (_level != level) {
16118 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
16120 switch (level) {
16121 case 1: {
16122 uint32_t _ptr_info1;
16123 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
16124 if (_ptr_info1) {
16125 NDR_PULL_ALLOC(ndr, r->info1);
16126 } else {
16127 r->info1 = NULL;
16129 break; }
16131 case 2: {
16132 uint32_t _ptr_info2;
16133 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
16134 if (_ptr_info2) {
16135 NDR_PULL_ALLOC(ndr, r->info2);
16136 } else {
16137 r->info2 = NULL;
16139 break; }
16141 default:
16142 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
16145 if (ndr_flags & NDR_BUFFERS) {
16146 switch (level) {
16147 case 1:
16148 if (r->info1) {
16149 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
16150 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
16151 NDR_CHECK(ndr_pull_spoolss_AddFormInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
16152 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
16154 break;
16156 case 2:
16157 if (r->info2) {
16158 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
16159 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
16160 NDR_CHECK(ndr_pull_spoolss_AddFormInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
16161 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
16163 break;
16165 default:
16166 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
16169 return NDR_ERR_SUCCESS;
16172 _PUBLIC_ void ndr_print_spoolss_AddFormInfo(struct ndr_print *ndr, const char *name, const union spoolss_AddFormInfo *r)
16174 int level;
16175 level = ndr_print_get_switch_value(ndr, r);
16176 ndr_print_union(ndr, name, level, "spoolss_AddFormInfo");
16177 switch (level) {
16178 case 1:
16179 ndr_print_ptr(ndr, "info1", r->info1);
16180 ndr->depth++;
16181 if (r->info1) {
16182 ndr_print_spoolss_AddFormInfo1(ndr, "info1", r->info1);
16184 ndr->depth--;
16185 break;
16187 case 2:
16188 ndr_print_ptr(ndr, "info2", r->info2);
16189 ndr->depth++;
16190 if (r->info2) {
16191 ndr_print_spoolss_AddFormInfo2(ndr, "info2", r->info2);
16193 ndr->depth--;
16194 break;
16196 default:
16197 ndr_print_bad_level(ndr, name, level);
16201 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo1 *r)
16203 if (ndr_flags & NDR_SCALARS) {
16204 NDR_CHECK(ndr_push_align(ndr, 4));
16206 uint32_t _flags_save_string = ndr->flags;
16207 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16208 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->port_name));
16209 ndr->flags = _flags_save_string;
16212 if (ndr_flags & NDR_BUFFERS) {
16214 uint32_t _flags_save_string = ndr->flags;
16215 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16216 if (r->port_name) {
16217 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->port_name));
16218 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->port_name));
16220 ndr->flags = _flags_save_string;
16223 return NDR_ERR_SUCCESS;
16226 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo1 *r)
16228 uint32_t _ptr_port_name;
16229 TALLOC_CTX *_mem_save_port_name_0;
16230 if (ndr_flags & NDR_SCALARS) {
16231 NDR_CHECK(ndr_pull_align(ndr, 4));
16233 uint32_t _flags_save_string = ndr->flags;
16234 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16235 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
16236 if (_ptr_port_name) {
16237 NDR_PULL_ALLOC(ndr, r->port_name);
16238 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->port_name, _ptr_port_name));
16239 } else {
16240 r->port_name = NULL;
16242 ndr->flags = _flags_save_string;
16245 if (ndr_flags & NDR_BUFFERS) {
16247 uint32_t _flags_save_string = ndr->flags;
16248 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16249 if (r->port_name) {
16250 uint32_t _relative_save_offset;
16251 _relative_save_offset = ndr->offset;
16252 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->port_name));
16253 _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16254 NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
16255 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->port_name));
16256 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
16257 ndr->offset = _relative_save_offset;
16259 ndr->flags = _flags_save_string;
16262 return NDR_ERR_SUCCESS;
16265 _PUBLIC_ void ndr_print_spoolss_PortInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo1 *r)
16267 ndr_print_struct(ndr, name, "spoolss_PortInfo1");
16268 ndr->depth++;
16269 ndr_print_ptr(ndr, "port_name", r->port_name);
16270 ndr->depth++;
16271 if (r->port_name) {
16272 ndr_print_string(ndr, "port_name", r->port_name);
16274 ndr->depth--;
16275 ndr->depth--;
16278 _PUBLIC_ size_t ndr_size_spoolss_PortInfo1(const struct spoolss_PortInfo1 *r, struct smb_iconv_convenience *ic, int flags)
16280 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo1, ic);
16283 static enum ndr_err_code ndr_push_spoolss_PortType(struct ndr_push *ndr, int ndr_flags, uint32_t r)
16285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
16286 return NDR_ERR_SUCCESS;
16289 static enum ndr_err_code ndr_pull_spoolss_PortType(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
16291 uint32_t v;
16292 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
16293 *r = v;
16294 return NDR_ERR_SUCCESS;
16297 _PUBLIC_ void ndr_print_spoolss_PortType(struct ndr_print *ndr, const char *name, uint32_t r)
16299 ndr_print_uint32(ndr, name, r);
16300 ndr->depth++;
16301 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_WRITE", SPOOLSS_PORT_TYPE_WRITE, r);
16302 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_READ", SPOOLSS_PORT_TYPE_READ, r);
16303 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_REDIRECTED", SPOOLSS_PORT_TYPE_REDIRECTED, r);
16304 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_NET_ATTACHED", SPOOLSS_PORT_TYPE_NET_ATTACHED, r);
16305 ndr->depth--;
16308 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo2 *r)
16310 if (ndr_flags & NDR_SCALARS) {
16311 NDR_CHECK(ndr_push_align(ndr, 4));
16313 uint32_t _flags_save_string = ndr->flags;
16314 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16315 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->port_name));
16316 ndr->flags = _flags_save_string;
16319 uint32_t _flags_save_string = ndr->flags;
16320 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16321 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
16322 ndr->flags = _flags_save_string;
16325 uint32_t _flags_save_string = ndr->flags;
16326 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16327 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
16328 ndr->flags = _flags_save_string;
16330 NDR_CHECK(ndr_push_spoolss_PortType(ndr, NDR_SCALARS, r->port_type));
16331 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
16333 if (ndr_flags & NDR_BUFFERS) {
16335 uint32_t _flags_save_string = ndr->flags;
16336 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16337 if (r->port_name) {
16338 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->port_name));
16339 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->port_name));
16341 ndr->flags = _flags_save_string;
16344 uint32_t _flags_save_string = ndr->flags;
16345 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16346 if (r->monitor_name) {
16347 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->monitor_name));
16348 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
16350 ndr->flags = _flags_save_string;
16353 uint32_t _flags_save_string = ndr->flags;
16354 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16355 if (r->description) {
16356 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->description));
16357 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
16359 ndr->flags = _flags_save_string;
16362 return NDR_ERR_SUCCESS;
16365 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo2 *r)
16367 uint32_t _ptr_port_name;
16368 TALLOC_CTX *_mem_save_port_name_0;
16369 uint32_t _ptr_monitor_name;
16370 TALLOC_CTX *_mem_save_monitor_name_0;
16371 uint32_t _ptr_description;
16372 TALLOC_CTX *_mem_save_description_0;
16373 if (ndr_flags & NDR_SCALARS) {
16374 NDR_CHECK(ndr_pull_align(ndr, 4));
16376 uint32_t _flags_save_string = ndr->flags;
16377 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16378 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
16379 if (_ptr_port_name) {
16380 NDR_PULL_ALLOC(ndr, r->port_name);
16381 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->port_name, _ptr_port_name));
16382 } else {
16383 r->port_name = NULL;
16385 ndr->flags = _flags_save_string;
16388 uint32_t _flags_save_string = ndr->flags;
16389 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16390 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
16391 if (_ptr_monitor_name) {
16392 NDR_PULL_ALLOC(ndr, r->monitor_name);
16393 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
16394 } else {
16395 r->monitor_name = NULL;
16397 ndr->flags = _flags_save_string;
16400 uint32_t _flags_save_string = ndr->flags;
16401 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16402 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
16403 if (_ptr_description) {
16404 NDR_PULL_ALLOC(ndr, r->description);
16405 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
16406 } else {
16407 r->description = NULL;
16409 ndr->flags = _flags_save_string;
16411 NDR_CHECK(ndr_pull_spoolss_PortType(ndr, NDR_SCALARS, &r->port_type));
16412 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
16414 if (ndr_flags & NDR_BUFFERS) {
16416 uint32_t _flags_save_string = ndr->flags;
16417 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16418 if (r->port_name) {
16419 uint32_t _relative_save_offset;
16420 _relative_save_offset = ndr->offset;
16421 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->port_name));
16422 _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16423 NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
16424 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->port_name));
16425 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
16426 ndr->offset = _relative_save_offset;
16428 ndr->flags = _flags_save_string;
16431 uint32_t _flags_save_string = ndr->flags;
16432 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16433 if (r->monitor_name) {
16434 uint32_t _relative_save_offset;
16435 _relative_save_offset = ndr->offset;
16436 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
16437 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16438 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
16439 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
16440 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
16441 ndr->offset = _relative_save_offset;
16443 ndr->flags = _flags_save_string;
16446 uint32_t _flags_save_string = ndr->flags;
16447 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16448 if (r->description) {
16449 uint32_t _relative_save_offset;
16450 _relative_save_offset = ndr->offset;
16451 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
16452 _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
16453 NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
16454 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
16455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
16456 ndr->offset = _relative_save_offset;
16458 ndr->flags = _flags_save_string;
16461 return NDR_ERR_SUCCESS;
16464 _PUBLIC_ void ndr_print_spoolss_PortInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo2 *r)
16466 ndr_print_struct(ndr, name, "spoolss_PortInfo2");
16467 ndr->depth++;
16468 ndr_print_ptr(ndr, "port_name", r->port_name);
16469 ndr->depth++;
16470 if (r->port_name) {
16471 ndr_print_string(ndr, "port_name", r->port_name);
16473 ndr->depth--;
16474 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
16475 ndr->depth++;
16476 if (r->monitor_name) {
16477 ndr_print_string(ndr, "monitor_name", r->monitor_name);
16479 ndr->depth--;
16480 ndr_print_ptr(ndr, "description", r->description);
16481 ndr->depth++;
16482 if (r->description) {
16483 ndr_print_string(ndr, "description", r->description);
16485 ndr->depth--;
16486 ndr_print_spoolss_PortType(ndr, "port_type", r->port_type);
16487 ndr_print_uint32(ndr, "reserved", r->reserved);
16488 ndr->depth--;
16491 _PUBLIC_ size_t ndr_size_spoolss_PortInfo2(const struct spoolss_PortInfo2 *r, struct smb_iconv_convenience *ic, int flags)
16493 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo2, ic);
16496 static enum ndr_err_code ndr_push_spoolss_PortStatus(struct ndr_push *ndr, int ndr_flags, enum spoolss_PortStatus r)
16498 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
16499 return NDR_ERR_SUCCESS;
16502 static enum ndr_err_code ndr_pull_spoolss_PortStatus(struct ndr_pull *ndr, int ndr_flags, enum spoolss_PortStatus *r)
16504 uint32_t v;
16505 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
16506 *r = v;
16507 return NDR_ERR_SUCCESS;
16510 _PUBLIC_ void ndr_print_spoolss_PortStatus(struct ndr_print *ndr, const char *name, enum spoolss_PortStatus r)
16512 const char *val = NULL;
16514 switch (r) {
16515 case PORT_STATUS_CLEAR: val = "PORT_STATUS_CLEAR"; break;
16516 case PORT_STATUS_OFFLINE: val = "PORT_STATUS_OFFLINE"; break;
16517 case PORT_STATUS_PAPER_JAM: val = "PORT_STATUS_PAPER_JAM"; break;
16518 case PORT_STATUS_PAPER_OUT: val = "PORT_STATUS_PAPER_OUT"; break;
16519 case PORT_STATUS_OUTPUT_BIN_FULL: val = "PORT_STATUS_OUTPUT_BIN_FULL"; break;
16520 case PORT_STATUS_PAPER_PROBLEM: val = "PORT_STATUS_PAPER_PROBLEM"; break;
16521 case PORT_STATUS_NO_TONER: val = "PORT_STATUS_NO_TONER"; break;
16522 case PORT_STATUS_DOOR_OPEN: val = "PORT_STATUS_DOOR_OPEN"; break;
16523 case PORT_STATUS_USER_INTERVENTION: val = "PORT_STATUS_USER_INTERVENTION"; break;
16524 case PORT_STATUS_OUT_OF_MEMORY: val = "PORT_STATUS_OUT_OF_MEMORY"; break;
16525 case PORT_STATUS_TONER_LOW: val = "PORT_STATUS_TONER_LOW"; break;
16526 case PORT_STATUS_WARMING_UP: val = "PORT_STATUS_WARMING_UP"; break;
16527 case PORT_STATUS_POWER_SAVE: val = "PORT_STATUS_POWER_SAVE"; break;
16529 ndr_print_enum(ndr, name, "ENUM", val, r);
16532 static enum ndr_err_code ndr_push_spoolss_PortSeverity(struct ndr_push *ndr, int ndr_flags, enum spoolss_PortSeverity r)
16534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
16535 return NDR_ERR_SUCCESS;
16538 static enum ndr_err_code ndr_pull_spoolss_PortSeverity(struct ndr_pull *ndr, int ndr_flags, enum spoolss_PortSeverity *r)
16540 uint32_t v;
16541 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
16542 *r = v;
16543 return NDR_ERR_SUCCESS;
16546 _PUBLIC_ void ndr_print_spoolss_PortSeverity(struct ndr_print *ndr, const char *name, enum spoolss_PortSeverity r)
16548 const char *val = NULL;
16550 switch (r) {
16551 case PORT_STATUS_TYPE_ERROR: val = "PORT_STATUS_TYPE_ERROR"; break;
16552 case PORT_STATUS_TYPE_WARNING: val = "PORT_STATUS_TYPE_WARNING"; break;
16553 case PORT_STATUS_TYPE_INFO: val = "PORT_STATUS_TYPE_INFO"; break;
16555 ndr_print_enum(ndr, name, "ENUM", val, r);
16558 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfo3 *r)
16560 if (ndr_flags & NDR_SCALARS) {
16561 NDR_CHECK(ndr_push_align(ndr, 4));
16562 NDR_CHECK(ndr_push_spoolss_PortStatus(ndr, NDR_SCALARS, r->status));
16564 uint32_t _flags_save_string = ndr->flags;
16565 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16566 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->status_string));
16567 ndr->flags = _flags_save_string;
16569 NDR_CHECK(ndr_push_spoolss_PortSeverity(ndr, NDR_SCALARS, r->severity));
16571 if (ndr_flags & NDR_BUFFERS) {
16573 uint32_t _flags_save_string = ndr->flags;
16574 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16575 if (r->status_string) {
16576 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->status_string));
16577 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->status_string));
16579 ndr->flags = _flags_save_string;
16582 return NDR_ERR_SUCCESS;
16585 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfo3 *r)
16587 uint32_t _ptr_status_string;
16588 TALLOC_CTX *_mem_save_status_string_0;
16589 if (ndr_flags & NDR_SCALARS) {
16590 NDR_CHECK(ndr_pull_align(ndr, 4));
16591 NDR_CHECK(ndr_pull_spoolss_PortStatus(ndr, NDR_SCALARS, &r->status));
16593 uint32_t _flags_save_string = ndr->flags;
16594 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16595 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_status_string));
16596 if (_ptr_status_string) {
16597 NDR_PULL_ALLOC(ndr, r->status_string);
16598 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->status_string, _ptr_status_string));
16599 } else {
16600 r->status_string = NULL;
16602 ndr->flags = _flags_save_string;
16604 NDR_CHECK(ndr_pull_spoolss_PortSeverity(ndr, NDR_SCALARS, &r->severity));
16606 if (ndr_flags & NDR_BUFFERS) {
16608 uint32_t _flags_save_string = ndr->flags;
16609 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16610 if (r->status_string) {
16611 uint32_t _relative_save_offset;
16612 _relative_save_offset = ndr->offset;
16613 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->status_string));
16614 _mem_save_status_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
16615 NDR_PULL_SET_MEM_CTX(ndr, r->status_string, 0);
16616 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->status_string));
16617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_string_0, 0);
16618 ndr->offset = _relative_save_offset;
16620 ndr->flags = _flags_save_string;
16623 return NDR_ERR_SUCCESS;
16626 _PUBLIC_ void ndr_print_spoolss_PortInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfo3 *r)
16628 ndr_print_struct(ndr, name, "spoolss_PortInfo3");
16629 ndr->depth++;
16630 ndr_print_spoolss_PortStatus(ndr, "status", r->status);
16631 ndr_print_ptr(ndr, "status_string", r->status_string);
16632 ndr->depth++;
16633 if (r->status_string) {
16634 ndr_print_string(ndr, "status_string", r->status_string);
16636 ndr->depth--;
16637 ndr_print_spoolss_PortSeverity(ndr, "severity", r->severity);
16638 ndr->depth--;
16641 _PUBLIC_ size_t ndr_size_spoolss_PortInfo3(const struct spoolss_PortInfo3 *r, struct smb_iconv_convenience *ic, int flags)
16643 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfo3, ic);
16646 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfoFF(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortInfoFF *r)
16648 if (ndr_flags & NDR_SCALARS) {
16649 NDR_CHECK(ndr_push_align(ndr, 4));
16651 uint32_t _flags_save_string = ndr->flags;
16652 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16653 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->port_name));
16654 ndr->flags = _flags_save_string;
16656 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->monitor_data));
16658 if (ndr_flags & NDR_BUFFERS) {
16660 uint32_t _flags_save_string = ndr->flags;
16661 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16662 if (r->port_name) {
16663 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->port_name));
16664 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->port_name));
16666 ndr->flags = _flags_save_string;
16669 return NDR_ERR_SUCCESS;
16672 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfoFF(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortInfoFF *r)
16674 uint32_t _ptr_port_name;
16675 TALLOC_CTX *_mem_save_port_name_0;
16676 if (ndr_flags & NDR_SCALARS) {
16677 NDR_CHECK(ndr_pull_align(ndr, 4));
16679 uint32_t _flags_save_string = ndr->flags;
16680 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16681 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_port_name));
16682 if (_ptr_port_name) {
16683 NDR_PULL_ALLOC(ndr, r->port_name);
16684 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->port_name, _ptr_port_name));
16685 } else {
16686 r->port_name = NULL;
16688 ndr->flags = _flags_save_string;
16690 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->monitor_data));
16692 if (ndr_flags & NDR_BUFFERS) {
16694 uint32_t _flags_save_string = ndr->flags;
16695 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16696 if (r->port_name) {
16697 uint32_t _relative_save_offset;
16698 _relative_save_offset = ndr->offset;
16699 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->port_name));
16700 _mem_save_port_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16701 NDR_PULL_SET_MEM_CTX(ndr, r->port_name, 0);
16702 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->port_name));
16703 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_port_name_0, 0);
16704 ndr->offset = _relative_save_offset;
16706 ndr->flags = _flags_save_string;
16709 return NDR_ERR_SUCCESS;
16712 _PUBLIC_ void ndr_print_spoolss_PortInfoFF(struct ndr_print *ndr, const char *name, const struct spoolss_PortInfoFF *r)
16714 ndr_print_struct(ndr, name, "spoolss_PortInfoFF");
16715 ndr->depth++;
16716 ndr_print_ptr(ndr, "port_name", r->port_name);
16717 ndr->depth++;
16718 if (r->port_name) {
16719 ndr_print_string(ndr, "port_name", r->port_name);
16721 ndr->depth--;
16722 ndr_print_DATA_BLOB(ndr, "monitor_data", r->monitor_data);
16723 ndr->depth--;
16726 _PUBLIC_ size_t ndr_size_spoolss_PortInfoFF(const struct spoolss_PortInfoFF *r, struct smb_iconv_convenience *ic, int flags)
16728 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PortInfoFF, ic);
16731 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PortInfo *r)
16733 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
16734 if (ndr_flags & NDR_SCALARS) {
16735 int level = ndr_push_get_switch_value(ndr, r);
16736 switch (level) {
16737 case 1: {
16738 NDR_CHECK(ndr_push_align(ndr, 4));
16739 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16740 NDR_CHECK(ndr_push_spoolss_PortInfo1(ndr, NDR_SCALARS, &r->info1));
16741 break; }
16743 case 2: {
16744 NDR_CHECK(ndr_push_align(ndr, 4));
16745 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16746 NDR_CHECK(ndr_push_spoolss_PortInfo2(ndr, NDR_SCALARS, &r->info2));
16747 break; }
16749 case 3: {
16750 NDR_CHECK(ndr_push_align(ndr, 4));
16751 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16752 NDR_CHECK(ndr_push_spoolss_PortInfo3(ndr, NDR_SCALARS, &r->info3));
16753 break; }
16755 case 0xff: {
16756 NDR_CHECK(ndr_push_align(ndr, 4));
16757 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
16758 NDR_CHECK(ndr_push_spoolss_PortInfoFF(ndr, NDR_SCALARS, &r->infoFF));
16759 break; }
16761 default: {
16762 break; }
16766 if (ndr_flags & NDR_BUFFERS) {
16767 int level = ndr_push_get_switch_value(ndr, r);
16768 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
16769 switch (level) {
16770 case 1:
16771 NDR_CHECK(ndr_push_spoolss_PortInfo1(ndr, NDR_BUFFERS, &r->info1));
16772 break;
16774 case 2:
16775 NDR_CHECK(ndr_push_spoolss_PortInfo2(ndr, NDR_BUFFERS, &r->info2));
16776 break;
16778 case 3:
16779 NDR_CHECK(ndr_push_spoolss_PortInfo3(ndr, NDR_BUFFERS, &r->info3));
16780 break;
16782 case 0xff:
16783 NDR_CHECK(ndr_push_spoolss_PortInfoFF(ndr, NDR_BUFFERS, &r->infoFF));
16784 break;
16786 default:
16787 break;
16791 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
16792 return NDR_ERR_SUCCESS;
16795 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PortInfo *r)
16797 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
16798 int level;
16799 level = ndr_pull_get_switch_value(ndr, r);
16800 if (ndr_flags & NDR_SCALARS) {
16801 switch (level) {
16802 case 1: {
16803 NDR_CHECK(ndr_pull_align(ndr, 4));
16804 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16805 NDR_CHECK(ndr_pull_spoolss_PortInfo1(ndr, NDR_SCALARS, &r->info1));
16806 break; }
16808 case 2: {
16809 NDR_CHECK(ndr_pull_align(ndr, 4));
16810 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16811 NDR_CHECK(ndr_pull_spoolss_PortInfo2(ndr, NDR_SCALARS, &r->info2));
16812 break; }
16814 case 3: {
16815 NDR_CHECK(ndr_pull_align(ndr, 4));
16816 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16817 NDR_CHECK(ndr_pull_spoolss_PortInfo3(ndr, NDR_SCALARS, &r->info3));
16818 break; }
16820 case 0xff: {
16821 NDR_CHECK(ndr_pull_align(ndr, 4));
16822 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
16823 NDR_CHECK(ndr_pull_spoolss_PortInfoFF(ndr, NDR_SCALARS, &r->infoFF));
16824 break; }
16826 default: {
16827 break; }
16831 if (ndr_flags & NDR_BUFFERS) {
16832 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
16833 switch (level) {
16834 case 1:
16835 NDR_CHECK(ndr_pull_spoolss_PortInfo1(ndr, NDR_BUFFERS, &r->info1));
16836 break;
16838 case 2:
16839 NDR_CHECK(ndr_pull_spoolss_PortInfo2(ndr, NDR_BUFFERS, &r->info2));
16840 break;
16842 case 3:
16843 NDR_CHECK(ndr_pull_spoolss_PortInfo3(ndr, NDR_BUFFERS, &r->info3));
16844 break;
16846 case 0xff:
16847 NDR_CHECK(ndr_pull_spoolss_PortInfoFF(ndr, NDR_BUFFERS, &r->infoFF));
16848 break;
16850 default:
16851 break;
16855 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
16856 return NDR_ERR_SUCCESS;
16859 _PUBLIC_ void ndr_print_spoolss_PortInfo(struct ndr_print *ndr, const char *name, const union spoolss_PortInfo *r)
16861 int level;
16862 level = ndr_print_get_switch_value(ndr, r);
16863 ndr_print_union(ndr, name, level, "spoolss_PortInfo");
16864 switch (level) {
16865 case 1:
16866 ndr_print_spoolss_PortInfo1(ndr, "info1", &r->info1);
16867 break;
16869 case 2:
16870 ndr_print_spoolss_PortInfo2(ndr, "info2", &r->info2);
16871 break;
16873 case 3:
16874 ndr_print_spoolss_PortInfo3(ndr, "info3", &r->info3);
16875 break;
16877 case 0xff:
16878 ndr_print_spoolss_PortInfoFF(ndr, "infoFF", &r->infoFF);
16879 break;
16881 default:
16882 break;
16887 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorInfo1 *r)
16889 if (ndr_flags & NDR_SCALARS) {
16890 NDR_CHECK(ndr_push_align(ndr, 4));
16892 uint32_t _flags_save_string = ndr->flags;
16893 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16894 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
16895 ndr->flags = _flags_save_string;
16898 if (ndr_flags & NDR_BUFFERS) {
16900 uint32_t _flags_save_string = ndr->flags;
16901 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16902 if (r->monitor_name) {
16903 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->monitor_name));
16904 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
16906 ndr->flags = _flags_save_string;
16909 return NDR_ERR_SUCCESS;
16912 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorInfo1 *r)
16914 uint32_t _ptr_monitor_name;
16915 TALLOC_CTX *_mem_save_monitor_name_0;
16916 if (ndr_flags & NDR_SCALARS) {
16917 NDR_CHECK(ndr_pull_align(ndr, 4));
16919 uint32_t _flags_save_string = ndr->flags;
16920 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16921 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
16922 if (_ptr_monitor_name) {
16923 NDR_PULL_ALLOC(ndr, r->monitor_name);
16924 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
16925 } else {
16926 r->monitor_name = NULL;
16928 ndr->flags = _flags_save_string;
16931 if (ndr_flags & NDR_BUFFERS) {
16933 uint32_t _flags_save_string = ndr->flags;
16934 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16935 if (r->monitor_name) {
16936 uint32_t _relative_save_offset;
16937 _relative_save_offset = ndr->offset;
16938 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
16939 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
16940 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
16941 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
16942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
16943 ndr->offset = _relative_save_offset;
16945 ndr->flags = _flags_save_string;
16948 return NDR_ERR_SUCCESS;
16951 _PUBLIC_ void ndr_print_spoolss_MonitorInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorInfo1 *r)
16953 ndr_print_struct(ndr, name, "spoolss_MonitorInfo1");
16954 ndr->depth++;
16955 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
16956 ndr->depth++;
16957 if (r->monitor_name) {
16958 ndr_print_string(ndr, "monitor_name", r->monitor_name);
16960 ndr->depth--;
16961 ndr->depth--;
16964 _PUBLIC_ size_t ndr_size_spoolss_MonitorInfo1(const struct spoolss_MonitorInfo1 *r, struct smb_iconv_convenience *ic, int flags)
16966 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_MonitorInfo1, ic);
16969 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorInfo2 *r)
16971 if (ndr_flags & NDR_SCALARS) {
16972 NDR_CHECK(ndr_push_align(ndr, 4));
16974 uint32_t _flags_save_string = ndr->flags;
16975 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16976 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->monitor_name));
16977 ndr->flags = _flags_save_string;
16980 uint32_t _flags_save_string = ndr->flags;
16981 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16982 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->environment));
16983 ndr->flags = _flags_save_string;
16986 uint32_t _flags_save_string = ndr->flags;
16987 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16988 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->dll_name));
16989 ndr->flags = _flags_save_string;
16992 if (ndr_flags & NDR_BUFFERS) {
16994 uint32_t _flags_save_string = ndr->flags;
16995 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
16996 if (r->monitor_name) {
16997 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->monitor_name));
16998 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->monitor_name));
17000 ndr->flags = _flags_save_string;
17003 uint32_t _flags_save_string = ndr->flags;
17004 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17005 if (r->environment) {
17006 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->environment));
17007 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->environment));
17009 ndr->flags = _flags_save_string;
17012 uint32_t _flags_save_string = ndr->flags;
17013 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17014 if (r->dll_name) {
17015 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->dll_name));
17016 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dll_name));
17018 ndr->flags = _flags_save_string;
17021 return NDR_ERR_SUCCESS;
17024 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorInfo2 *r)
17026 uint32_t _ptr_monitor_name;
17027 TALLOC_CTX *_mem_save_monitor_name_0;
17028 uint32_t _ptr_environment;
17029 TALLOC_CTX *_mem_save_environment_0;
17030 uint32_t _ptr_dll_name;
17031 TALLOC_CTX *_mem_save_dll_name_0;
17032 if (ndr_flags & NDR_SCALARS) {
17033 NDR_CHECK(ndr_pull_align(ndr, 4));
17035 uint32_t _flags_save_string = ndr->flags;
17036 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17037 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_monitor_name));
17038 if (_ptr_monitor_name) {
17039 NDR_PULL_ALLOC(ndr, r->monitor_name);
17040 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->monitor_name, _ptr_monitor_name));
17041 } else {
17042 r->monitor_name = NULL;
17044 ndr->flags = _flags_save_string;
17047 uint32_t _flags_save_string = ndr->flags;
17048 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17049 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
17050 if (_ptr_environment) {
17051 NDR_PULL_ALLOC(ndr, r->environment);
17052 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->environment, _ptr_environment));
17053 } else {
17054 r->environment = NULL;
17056 ndr->flags = _flags_save_string;
17059 uint32_t _flags_save_string = ndr->flags;
17060 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17061 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dll_name));
17062 if (_ptr_dll_name) {
17063 NDR_PULL_ALLOC(ndr, r->dll_name);
17064 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->dll_name, _ptr_dll_name));
17065 } else {
17066 r->dll_name = NULL;
17068 ndr->flags = _flags_save_string;
17071 if (ndr_flags & NDR_BUFFERS) {
17073 uint32_t _flags_save_string = ndr->flags;
17074 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17075 if (r->monitor_name) {
17076 uint32_t _relative_save_offset;
17077 _relative_save_offset = ndr->offset;
17078 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->monitor_name));
17079 _mem_save_monitor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17080 NDR_PULL_SET_MEM_CTX(ndr, r->monitor_name, 0);
17081 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->monitor_name));
17082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_monitor_name_0, 0);
17083 ndr->offset = _relative_save_offset;
17085 ndr->flags = _flags_save_string;
17088 uint32_t _flags_save_string = ndr->flags;
17089 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17090 if (r->environment) {
17091 uint32_t _relative_save_offset;
17092 _relative_save_offset = ndr->offset;
17093 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->environment));
17094 _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
17095 NDR_PULL_SET_MEM_CTX(ndr, r->environment, 0);
17096 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->environment));
17097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
17098 ndr->offset = _relative_save_offset;
17100 ndr->flags = _flags_save_string;
17103 uint32_t _flags_save_string = ndr->flags;
17104 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17105 if (r->dll_name) {
17106 uint32_t _relative_save_offset;
17107 _relative_save_offset = ndr->offset;
17108 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->dll_name));
17109 _mem_save_dll_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
17110 NDR_PULL_SET_MEM_CTX(ndr, r->dll_name, 0);
17111 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dll_name));
17112 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dll_name_0, 0);
17113 ndr->offset = _relative_save_offset;
17115 ndr->flags = _flags_save_string;
17118 return NDR_ERR_SUCCESS;
17121 _PUBLIC_ void ndr_print_spoolss_MonitorInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorInfo2 *r)
17123 ndr_print_struct(ndr, name, "spoolss_MonitorInfo2");
17124 ndr->depth++;
17125 ndr_print_ptr(ndr, "monitor_name", r->monitor_name);
17126 ndr->depth++;
17127 if (r->monitor_name) {
17128 ndr_print_string(ndr, "monitor_name", r->monitor_name);
17130 ndr->depth--;
17131 ndr_print_ptr(ndr, "environment", r->environment);
17132 ndr->depth++;
17133 if (r->environment) {
17134 ndr_print_string(ndr, "environment", r->environment);
17136 ndr->depth--;
17137 ndr_print_ptr(ndr, "dll_name", r->dll_name);
17138 ndr->depth++;
17139 if (r->dll_name) {
17140 ndr_print_string(ndr, "dll_name", r->dll_name);
17142 ndr->depth--;
17143 ndr->depth--;
17146 _PUBLIC_ size_t ndr_size_spoolss_MonitorInfo2(const struct spoolss_MonitorInfo2 *r, struct smb_iconv_convenience *ic, int flags)
17148 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_MonitorInfo2, ic);
17151 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_MonitorInfo *r)
17153 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
17154 if (ndr_flags & NDR_SCALARS) {
17155 int level = ndr_push_get_switch_value(ndr, r);
17156 switch (level) {
17157 case 1: {
17158 NDR_CHECK(ndr_push_align(ndr, 4));
17159 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
17160 NDR_CHECK(ndr_push_spoolss_MonitorInfo1(ndr, NDR_SCALARS, &r->info1));
17161 break; }
17163 case 2: {
17164 NDR_CHECK(ndr_push_align(ndr, 4));
17165 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
17166 NDR_CHECK(ndr_push_spoolss_MonitorInfo2(ndr, NDR_SCALARS, &r->info2));
17167 break; }
17169 default: {
17170 break; }
17174 if (ndr_flags & NDR_BUFFERS) {
17175 int level = ndr_push_get_switch_value(ndr, r);
17176 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
17177 switch (level) {
17178 case 1:
17179 NDR_CHECK(ndr_push_spoolss_MonitorInfo1(ndr, NDR_BUFFERS, &r->info1));
17180 break;
17182 case 2:
17183 NDR_CHECK(ndr_push_spoolss_MonitorInfo2(ndr, NDR_BUFFERS, &r->info2));
17184 break;
17186 default:
17187 break;
17191 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
17192 return NDR_ERR_SUCCESS;
17195 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_MonitorInfo *r)
17197 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
17198 int level;
17199 level = ndr_pull_get_switch_value(ndr, r);
17200 if (ndr_flags & NDR_SCALARS) {
17201 switch (level) {
17202 case 1: {
17203 NDR_CHECK(ndr_pull_align(ndr, 4));
17204 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
17205 NDR_CHECK(ndr_pull_spoolss_MonitorInfo1(ndr, NDR_SCALARS, &r->info1));
17206 break; }
17208 case 2: {
17209 NDR_CHECK(ndr_pull_align(ndr, 4));
17210 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
17211 NDR_CHECK(ndr_pull_spoolss_MonitorInfo2(ndr, NDR_SCALARS, &r->info2));
17212 break; }
17214 default: {
17215 break; }
17219 if (ndr_flags & NDR_BUFFERS) {
17220 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
17221 switch (level) {
17222 case 1:
17223 NDR_CHECK(ndr_pull_spoolss_MonitorInfo1(ndr, NDR_BUFFERS, &r->info1));
17224 break;
17226 case 2:
17227 NDR_CHECK(ndr_pull_spoolss_MonitorInfo2(ndr, NDR_BUFFERS, &r->info2));
17228 break;
17230 default:
17231 break;
17235 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
17236 return NDR_ERR_SUCCESS;
17239 _PUBLIC_ void ndr_print_spoolss_MonitorInfo(struct ndr_print *ndr, const char *name, const union spoolss_MonitorInfo *r)
17241 int level;
17242 level = ndr_print_get_switch_value(ndr, r);
17243 ndr_print_union(ndr, name, level, "spoolss_MonitorInfo");
17244 switch (level) {
17245 case 1:
17246 ndr_print_spoolss_MonitorInfo1(ndr, "info1", &r->info1);
17247 break;
17249 case 2:
17250 ndr_print_spoolss_MonitorInfo2(ndr, "info2", &r->info2);
17251 break;
17253 default:
17254 break;
17259 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrintProcDataTypesInfo1 *r)
17261 if (ndr_flags & NDR_SCALARS) {
17262 NDR_CHECK(ndr_push_align(ndr, 4));
17264 uint32_t _flags_save_string = ndr->flags;
17265 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17266 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name_array));
17267 ndr->flags = _flags_save_string;
17270 if (ndr_flags & NDR_BUFFERS) {
17272 uint32_t _flags_save_string = ndr->flags;
17273 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17274 if (r->name_array) {
17275 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->name_array));
17276 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name_array));
17278 ndr->flags = _flags_save_string;
17281 return NDR_ERR_SUCCESS;
17284 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrintProcDataTypesInfo1 *r)
17286 uint32_t _ptr_name_array;
17287 TALLOC_CTX *_mem_save_name_array_0;
17288 if (ndr_flags & NDR_SCALARS) {
17289 NDR_CHECK(ndr_pull_align(ndr, 4));
17291 uint32_t _flags_save_string = ndr->flags;
17292 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17293 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name_array));
17294 if (_ptr_name_array) {
17295 NDR_PULL_ALLOC(ndr, r->name_array);
17296 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name_array, _ptr_name_array));
17297 } else {
17298 r->name_array = NULL;
17300 ndr->flags = _flags_save_string;
17303 if (ndr_flags & NDR_BUFFERS) {
17305 uint32_t _flags_save_string = ndr->flags;
17306 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
17307 if (r->name_array) {
17308 uint32_t _relative_save_offset;
17309 _relative_save_offset = ndr->offset;
17310 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name_array));
17311 _mem_save_name_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
17312 NDR_PULL_SET_MEM_CTX(ndr, r->name_array, 0);
17313 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name_array));
17314 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_array_0, 0);
17315 ndr->offset = _relative_save_offset;
17317 ndr->flags = _flags_save_string;
17320 return NDR_ERR_SUCCESS;
17323 _PUBLIC_ void ndr_print_spoolss_PrintProcDataTypesInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrintProcDataTypesInfo1 *r)
17325 ndr_print_struct(ndr, name, "spoolss_PrintProcDataTypesInfo1");
17326 ndr->depth++;
17327 ndr_print_ptr(ndr, "name_array", r->name_array);
17328 ndr->depth++;
17329 if (r->name_array) {
17330 ndr_print_string(ndr, "name_array", r->name_array);
17332 ndr->depth--;
17333 ndr->depth--;
17336 _PUBLIC_ size_t ndr_size_spoolss_PrintProcDataTypesInfo1(const struct spoolss_PrintProcDataTypesInfo1 *r, struct smb_iconv_convenience *ic, int flags)
17338 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrintProcDataTypesInfo1, ic);
17341 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintProcDataTypesInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrintProcDataTypesInfo *r)
17343 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
17344 if (ndr_flags & NDR_SCALARS) {
17345 int level = ndr_push_get_switch_value(ndr, r);
17346 switch (level) {
17347 case 1: {
17348 NDR_CHECK(ndr_push_align(ndr, 4));
17349 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
17350 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr, NDR_SCALARS, &r->info1));
17351 break; }
17353 default: {
17354 break; }
17358 if (ndr_flags & NDR_BUFFERS) {
17359 int level = ndr_push_get_switch_value(ndr, r);
17360 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
17361 switch (level) {
17362 case 1:
17363 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr, NDR_BUFFERS, &r->info1));
17364 break;
17366 default:
17367 break;
17371 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
17372 return NDR_ERR_SUCCESS;
17375 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintProcDataTypesInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrintProcDataTypesInfo *r)
17377 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
17378 int level;
17379 level = ndr_pull_get_switch_value(ndr, r);
17380 if (ndr_flags & NDR_SCALARS) {
17381 switch (level) {
17382 case 1: {
17383 NDR_CHECK(ndr_pull_align(ndr, 4));
17384 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
17385 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr, NDR_SCALARS, &r->info1));
17386 break; }
17388 default: {
17389 break; }
17393 if (ndr_flags & NDR_BUFFERS) {
17394 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
17395 switch (level) {
17396 case 1:
17397 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr, NDR_BUFFERS, &r->info1));
17398 break;
17400 default:
17401 break;
17405 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
17406 return NDR_ERR_SUCCESS;
17409 _PUBLIC_ void ndr_print_spoolss_PrintProcDataTypesInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrintProcDataTypesInfo *r)
17411 int level;
17412 level = ndr_print_get_switch_value(ndr, r);
17413 ndr_print_union(ndr, name, level, "spoolss_PrintProcDataTypesInfo");
17414 switch (level) {
17415 case 1:
17416 ndr_print_spoolss_PrintProcDataTypesInfo1(ndr, "info1", &r->info1);
17417 break;
17419 default:
17420 break;
17425 static enum ndr_err_code ndr_push_spoolss_PrinterChangeFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
17427 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
17428 return NDR_ERR_SUCCESS;
17431 static enum ndr_err_code ndr_pull_spoolss_PrinterChangeFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
17433 uint32_t v;
17434 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
17435 *r = v;
17436 return NDR_ERR_SUCCESS;
17439 _PUBLIC_ void ndr_print_spoolss_PrinterChangeFlags(struct ndr_print *ndr, const char *name, uint32_t r)
17441 ndr_print_uint32(ndr, name, r);
17442 ndr->depth++;
17443 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINTER", PRINTER_CHANGE_ADD_PRINTER, r);
17444 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SET_PRINTER", PRINTER_CHANGE_SET_PRINTER, r);
17445 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINTER", PRINTER_CHANGE_DELETE_PRINTER, r);
17446 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_FAILED_CONNECTION_PRINTER", PRINTER_CHANGE_FAILED_CONNECTION_PRINTER, r);
17447 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_JOB", PRINTER_CHANGE_ADD_JOB, r);
17448 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SET_JOB", PRINTER_CHANGE_SET_JOB, r);
17449 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_JOB", PRINTER_CHANGE_DELETE_JOB, r);
17450 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_WRITE_JOB", PRINTER_CHANGE_WRITE_JOB, r);
17451 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_FORM", PRINTER_CHANGE_ADD_FORM, r);
17452 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SET_FORM", PRINTER_CHANGE_SET_FORM, r);
17453 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_FORM", PRINTER_CHANGE_DELETE_FORM, r);
17454 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PORT", PRINTER_CHANGE_ADD_PORT, r);
17455 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_CONFIGURE_PORT", PRINTER_CHANGE_CONFIGURE_PORT, r);
17456 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PORT", PRINTER_CHANGE_DELETE_PORT, r);
17457 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINT_PROCESSOR", PRINTER_CHANGE_ADD_PRINT_PROCESSOR, r);
17458 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINT_PROCESSOR", PRINTER_CHANGE_DELETE_PRINT_PROCESSOR, r);
17459 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SERVER", PRINTER_CHANGE_SERVER, r);
17460 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINTER_DRIVER", PRINTER_CHANGE_ADD_PRINTER_DRIVER, r);
17461 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_SET_PRINTER_DRIVER", PRINTER_CHANGE_SET_PRINTER_DRIVER, r);
17462 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINTER_DRIVER", PRINTER_CHANGE_DELETE_PRINTER_DRIVER, r);
17463 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_CHANGE_TIMEOUT", PRINTER_CHANGE_TIMEOUT, r);
17464 ndr->depth--;
17467 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobNotifyField(struct ndr_push *ndr, int ndr_flags, enum spoolss_JobNotifyField r)
17469 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
17470 return NDR_ERR_SUCCESS;
17473 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobNotifyField(struct ndr_pull *ndr, int ndr_flags, enum spoolss_JobNotifyField *r)
17475 uint16_t v;
17476 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
17477 *r = v;
17478 return NDR_ERR_SUCCESS;
17481 _PUBLIC_ void ndr_print_spoolss_JobNotifyField(struct ndr_print *ndr, const char *name, enum spoolss_JobNotifyField r)
17483 const char *val = NULL;
17485 switch (r) {
17486 case JOB_NOTIFY_FIELD_PRINTER_NAME: val = "JOB_NOTIFY_FIELD_PRINTER_NAME"; break;
17487 case JOB_NOTIFY_FIELD_MACHINE_NAME: val = "JOB_NOTIFY_FIELD_MACHINE_NAME"; break;
17488 case JOB_NOTIFY_FIELD_PORT_NAME: val = "JOB_NOTIFY_FIELD_PORT_NAME"; break;
17489 case JOB_NOTIFY_FIELD_USER_NAME: val = "JOB_NOTIFY_FIELD_USER_NAME"; break;
17490 case JOB_NOTIFY_FIELD_NOTIFY_NAME: val = "JOB_NOTIFY_FIELD_NOTIFY_NAME"; break;
17491 case JOB_NOTIFY_FIELD_DATATYPE: val = "JOB_NOTIFY_FIELD_DATATYPE"; break;
17492 case JOB_NOTIFY_FIELD_PRINT_PROCESSOR: val = "JOB_NOTIFY_FIELD_PRINT_PROCESSOR"; break;
17493 case JOB_NOTIFY_FIELD_PARAMETERS: val = "JOB_NOTIFY_FIELD_PARAMETERS"; break;
17494 case JOB_NOTIFY_FIELD_DRIVER_NAME: val = "JOB_NOTIFY_FIELD_DRIVER_NAME"; break;
17495 case JOB_NOTIFY_FIELD_DEVMODE: val = "JOB_NOTIFY_FIELD_DEVMODE"; break;
17496 case JOB_NOTIFY_FIELD_STATUS: val = "JOB_NOTIFY_FIELD_STATUS"; break;
17497 case JOB_NOTIFY_FIELD_STATUS_STRING: val = "JOB_NOTIFY_FIELD_STATUS_STRING"; break;
17498 case JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR: val = "JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR"; break;
17499 case JOB_NOTIFY_FIELD_DOCUMENT: val = "JOB_NOTIFY_FIELD_DOCUMENT"; break;
17500 case JOB_NOTIFY_FIELD_PRIORITY: val = "JOB_NOTIFY_FIELD_PRIORITY"; break;
17501 case JOB_NOTIFY_FIELD_POSITION: val = "JOB_NOTIFY_FIELD_POSITION"; break;
17502 case JOB_NOTIFY_FIELD_SUBMITTED: val = "JOB_NOTIFY_FIELD_SUBMITTED"; break;
17503 case JOB_NOTIFY_FIELD_START_TIME: val = "JOB_NOTIFY_FIELD_START_TIME"; break;
17504 case JOB_NOTIFY_FIELD_UNTIL_TIME: val = "JOB_NOTIFY_FIELD_UNTIL_TIME"; break;
17505 case JOB_NOTIFY_FIELD_TIME: val = "JOB_NOTIFY_FIELD_TIME"; break;
17506 case JOB_NOTIFY_FIELD_TOTAL_PAGES: val = "JOB_NOTIFY_FIELD_TOTAL_PAGES"; break;
17507 case JOB_NOTIFY_FIELD_PAGES_PRINTED: val = "JOB_NOTIFY_FIELD_PAGES_PRINTED"; break;
17508 case JOB_NOTIFY_FIELD_TOTAL_BYTES: val = "JOB_NOTIFY_FIELD_TOTAL_BYTES"; break;
17509 case JOB_NOTIFY_FIELD_BYTES_PRINTED: val = "JOB_NOTIFY_FIELD_BYTES_PRINTED"; break;
17511 ndr_print_enum(ndr, name, "ENUM", val, r);
17514 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrintNotifyField(struct ndr_push *ndr, int ndr_flags, enum spoolss_PrintNotifyField r)
17516 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
17517 return NDR_ERR_SUCCESS;
17520 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrintNotifyField(struct ndr_pull *ndr, int ndr_flags, enum spoolss_PrintNotifyField *r)
17522 uint16_t v;
17523 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
17524 *r = v;
17525 return NDR_ERR_SUCCESS;
17528 _PUBLIC_ void ndr_print_spoolss_PrintNotifyField(struct ndr_print *ndr, const char *name, enum spoolss_PrintNotifyField r)
17530 const char *val = NULL;
17532 switch (r) {
17533 case PRINTER_NOTIFY_FIELD_SERVER_NAME: val = "PRINTER_NOTIFY_FIELD_SERVER_NAME"; break;
17534 case PRINTER_NOTIFY_FIELD_PRINTER_NAME: val = "PRINTER_NOTIFY_FIELD_PRINTER_NAME"; break;
17535 case PRINTER_NOTIFY_FIELD_SHARE_NAME: val = "PRINTER_NOTIFY_FIELD_SHARE_NAME"; break;
17536 case PRINTER_NOTIFY_FIELD_PORT_NAME: val = "PRINTER_NOTIFY_FIELD_PORT_NAME"; break;
17537 case PRINTER_NOTIFY_FIELD_DRIVER_NAME: val = "PRINTER_NOTIFY_FIELD_DRIVER_NAME"; break;
17538 case PRINTER_NOTIFY_FIELD_COMMENT: val = "PRINTER_NOTIFY_FIELD_COMMENT"; break;
17539 case PRINTER_NOTIFY_FIELD_LOCATION: val = "PRINTER_NOTIFY_FIELD_LOCATION"; break;
17540 case PRINTER_NOTIFY_FIELD_DEVMODE: val = "PRINTER_NOTIFY_FIELD_DEVMODE"; break;
17541 case PRINTER_NOTIFY_FIELD_SEPFILE: val = "PRINTER_NOTIFY_FIELD_SEPFILE"; break;
17542 case PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR: val = "PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR"; break;
17543 case PRINTER_NOTIFY_FIELD_PARAMETERS: val = "PRINTER_NOTIFY_FIELD_PARAMETERS"; break;
17544 case PRINTER_NOTIFY_FIELD_DATATYPE: val = "PRINTER_NOTIFY_FIELD_DATATYPE"; break;
17545 case PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR: val = "PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR"; break;
17546 case PRINTER_NOTIFY_FIELD_ATTRIBUTES: val = "PRINTER_NOTIFY_FIELD_ATTRIBUTES"; break;
17547 case PRINTER_NOTIFY_FIELD_PRIORITY: val = "PRINTER_NOTIFY_FIELD_PRIORITY"; break;
17548 case PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY: val = "PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY"; break;
17549 case PRINTER_NOTIFY_FIELD_START_TIME: val = "PRINTER_NOTIFY_FIELD_START_TIME"; break;
17550 case PRINTER_NOTIFY_FIELD_UNTIL_TIME: val = "PRINTER_NOTIFY_FIELD_UNTIL_TIME"; break;
17551 case PRINTER_NOTIFY_FIELD_STATUS: val = "PRINTER_NOTIFY_FIELD_STATUS"; break;
17552 case PRINTER_NOTIFY_FIELD_STATUS_STRING: val = "PRINTER_NOTIFY_FIELD_STATUS_STRING"; break;
17553 case PRINTER_NOTIFY_FIELD_CJOBS: val = "PRINTER_NOTIFY_FIELD_CJOBS"; break;
17554 case PRINTER_NOTIFY_FIELD_AVERAGE_PPM: val = "PRINTER_NOTIFY_FIELD_AVERAGE_PPM"; break;
17555 case PRINTER_NOTIFY_FIELD_TOTAL_PAGES: val = "PRINTER_NOTIFY_FIELD_TOTAL_PAGES"; break;
17556 case PRINTER_NOTIFY_FIELD_PAGES_PRINTED: val = "PRINTER_NOTIFY_FIELD_PAGES_PRINTED"; break;
17557 case PRINTER_NOTIFY_FIELD_TOTAL_BYTES: val = "PRINTER_NOTIFY_FIELD_TOTAL_BYTES"; break;
17558 case PRINTER_NOTIFY_FIELD_BYTES_PRINTED: val = "PRINTER_NOTIFY_FIELD_BYTES_PRINTED"; break;
17559 case PRINTER_NOTIFY_FIELD_OBJECT_GUID: val = "PRINTER_NOTIFY_FIELD_OBJECT_GUID"; break;
17560 case PRINTER_NOTIFY_FIELD_FRIENDLY_NAME: val = "PRINTER_NOTIFY_FIELD_FRIENDLY_NAME"; break;
17562 ndr_print_enum(ndr, name, "ENUM", val, r);
17565 static enum ndr_err_code ndr_push_spoolss_NotifyType(struct ndr_push *ndr, int ndr_flags, enum spoolss_NotifyType r)
17567 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
17568 return NDR_ERR_SUCCESS;
17571 static enum ndr_err_code ndr_pull_spoolss_NotifyType(struct ndr_pull *ndr, int ndr_flags, enum spoolss_NotifyType *r)
17573 uint16_t v;
17574 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
17575 *r = v;
17576 return NDR_ERR_SUCCESS;
17579 _PUBLIC_ void ndr_print_spoolss_NotifyType(struct ndr_print *ndr, const char *name, enum spoolss_NotifyType r)
17581 const char *val = NULL;
17583 switch (r) {
17584 case PRINTER_NOTIFY_TYPE: val = "PRINTER_NOTIFY_TYPE"; break;
17585 case JOB_NOTIFY_TYPE: val = "JOB_NOTIFY_TYPE"; break;
17587 ndr_print_enum(ndr, name, "ENUM", val, r);
17590 static enum ndr_err_code ndr_push_spoolss_Field(struct ndr_push *ndr, int ndr_flags, const union spoolss_Field *r)
17592 if (ndr_flags & NDR_SCALARS) {
17593 int level = ndr_push_get_switch_value(ndr, r);
17594 switch (level) {
17595 case PRINTER_NOTIFY_TYPE: {
17596 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->field));
17597 break; }
17599 case JOB_NOTIFY_TYPE: {
17600 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->field));
17601 break; }
17603 default: {
17604 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->field));
17605 break; }
17609 if (ndr_flags & NDR_BUFFERS) {
17610 int level = ndr_push_get_switch_value(ndr, r);
17611 switch (level) {
17612 case PRINTER_NOTIFY_TYPE:
17613 break;
17615 case JOB_NOTIFY_TYPE:
17616 break;
17618 default:
17619 break;
17623 return NDR_ERR_SUCCESS;
17626 static enum ndr_err_code ndr_pull_spoolss_Field(struct ndr_pull *ndr, int ndr_flags, union spoolss_Field *r)
17628 int level;
17629 level = ndr_pull_get_switch_value(ndr, r);
17630 if (ndr_flags & NDR_SCALARS) {
17631 switch (level) {
17632 case PRINTER_NOTIFY_TYPE: {
17633 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->field));
17634 break; }
17636 case JOB_NOTIFY_TYPE: {
17637 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->field));
17638 break; }
17640 default: {
17641 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->field));
17642 break; }
17646 if (ndr_flags & NDR_BUFFERS) {
17647 switch (level) {
17648 case PRINTER_NOTIFY_TYPE:
17649 break;
17651 case JOB_NOTIFY_TYPE:
17652 break;
17654 default:
17655 break;
17659 return NDR_ERR_SUCCESS;
17662 static enum ndr_err_code ndr_push_spoolss_NotifyOptionType(struct ndr_push *ndr, int ndr_flags, const struct spoolss_NotifyOptionType *r)
17664 uint32_t cntr_fields_1;
17665 if (ndr_flags & NDR_SCALARS) {
17666 NDR_CHECK(ndr_push_align(ndr, 4));
17667 NDR_CHECK(ndr_push_spoolss_NotifyType(ndr, NDR_SCALARS, r->type));
17668 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->u1));
17669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u2));
17670 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->u3));
17671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
17672 NDR_CHECK(ndr_push_unique_ptr(ndr, r->fields));
17674 if (ndr_flags & NDR_BUFFERS) {
17675 if (r->fields) {
17676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
17677 for (cntr_fields_1 = 0; cntr_fields_1 < r->count; cntr_fields_1++) {
17678 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->fields[cntr_fields_1], r->type));
17679 NDR_CHECK(ndr_push_spoolss_Field(ndr, NDR_SCALARS, &r->fields[cntr_fields_1]));
17683 return NDR_ERR_SUCCESS;
17686 static enum ndr_err_code ndr_pull_spoolss_NotifyOptionType(struct ndr_pull *ndr, int ndr_flags, struct spoolss_NotifyOptionType *r)
17688 uint32_t _ptr_fields;
17689 uint32_t cntr_fields_1;
17690 TALLOC_CTX *_mem_save_fields_0;
17691 TALLOC_CTX *_mem_save_fields_1;
17692 if (ndr_flags & NDR_SCALARS) {
17693 NDR_CHECK(ndr_pull_align(ndr, 4));
17694 NDR_CHECK(ndr_pull_spoolss_NotifyType(ndr, NDR_SCALARS, &r->type));
17695 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->u1));
17696 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u2));
17697 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->u3));
17698 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
17699 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_fields));
17700 if (_ptr_fields) {
17701 NDR_PULL_ALLOC(ndr, r->fields);
17702 } else {
17703 r->fields = NULL;
17706 if (ndr_flags & NDR_BUFFERS) {
17707 if (r->fields) {
17708 _mem_save_fields_0 = NDR_PULL_GET_MEM_CTX(ndr);
17709 NDR_PULL_SET_MEM_CTX(ndr, r->fields, 0);
17710 NDR_CHECK(ndr_pull_array_size(ndr, &r->fields));
17711 NDR_PULL_ALLOC_N(ndr, r->fields, ndr_get_array_size(ndr, &r->fields));
17712 _mem_save_fields_1 = NDR_PULL_GET_MEM_CTX(ndr);
17713 NDR_PULL_SET_MEM_CTX(ndr, r->fields, 0);
17714 for (cntr_fields_1 = 0; cntr_fields_1 < r->count; cntr_fields_1++) {
17715 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->fields[cntr_fields_1], r->type));
17716 NDR_CHECK(ndr_pull_spoolss_Field(ndr, NDR_SCALARS, &r->fields[cntr_fields_1]));
17718 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_fields_1, 0);
17719 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_fields_0, 0);
17721 if (r->fields) {
17722 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->fields, r->count));
17725 return NDR_ERR_SUCCESS;
17728 _PUBLIC_ void ndr_print_spoolss_NotifyOptionType(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyOptionType *r)
17730 uint32_t cntr_fields_1;
17731 ndr_print_struct(ndr, name, "spoolss_NotifyOptionType");
17732 ndr->depth++;
17733 ndr_print_spoolss_NotifyType(ndr, "type", r->type);
17734 ndr_print_uint16(ndr, "u1", r->u1);
17735 ndr_print_uint32(ndr, "u2", r->u2);
17736 ndr_print_uint32(ndr, "u3", r->u3);
17737 ndr_print_uint32(ndr, "count", r->count);
17738 ndr_print_ptr(ndr, "fields", r->fields);
17739 ndr->depth++;
17740 if (r->fields) {
17741 ndr->print(ndr, "%s: ARRAY(%d)", "fields", (int)r->count);
17742 ndr->depth++;
17743 for (cntr_fields_1=0;cntr_fields_1<r->count;cntr_fields_1++) {
17744 char *idx_1=NULL;
17745 if (asprintf(&idx_1, "[%d]", cntr_fields_1) != -1) {
17746 ndr_print_set_switch_value(ndr, &r->fields[cntr_fields_1], r->type);
17747 ndr_print_spoolss_Field(ndr, "fields", &r->fields[cntr_fields_1]);
17748 free(idx_1);
17751 ndr->depth--;
17753 ndr->depth--;
17754 ndr->depth--;
17757 static enum ndr_err_code ndr_push_spoolssNotifyOptionFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
17759 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
17760 return NDR_ERR_SUCCESS;
17763 static enum ndr_err_code ndr_pull_spoolssNotifyOptionFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
17765 uint32_t v;
17766 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
17767 *r = v;
17768 return NDR_ERR_SUCCESS;
17771 _PUBLIC_ void ndr_print_spoolssNotifyOptionFlags(struct ndr_print *ndr, const char *name, uint32_t r)
17773 ndr_print_uint32(ndr, name, r);
17774 ndr->depth++;
17775 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_OPTIONS_REFRESH", PRINTER_NOTIFY_OPTIONS_REFRESH, r);
17776 ndr->depth--;
17779 static enum ndr_err_code ndr_push_spoolss_NotifyOption(struct ndr_push *ndr, int ndr_flags, const struct spoolss_NotifyOption *r)
17781 uint32_t cntr_types_1;
17782 if (ndr_flags & NDR_SCALARS) {
17783 NDR_CHECK(ndr_push_align(ndr, 4));
17784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
17785 NDR_CHECK(ndr_push_spoolssNotifyOptionFlags(ndr, NDR_SCALARS, r->flags));
17786 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
17787 NDR_CHECK(ndr_push_unique_ptr(ndr, r->types));
17789 if (ndr_flags & NDR_BUFFERS) {
17790 if (r->types) {
17791 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
17792 for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
17793 NDR_CHECK(ndr_push_spoolss_NotifyOptionType(ndr, NDR_SCALARS, &r->types[cntr_types_1]));
17795 for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
17796 NDR_CHECK(ndr_push_spoolss_NotifyOptionType(ndr, NDR_BUFFERS, &r->types[cntr_types_1]));
17800 return NDR_ERR_SUCCESS;
17803 static enum ndr_err_code ndr_pull_spoolss_NotifyOption(struct ndr_pull *ndr, int ndr_flags, struct spoolss_NotifyOption *r)
17805 uint32_t _ptr_types;
17806 uint32_t cntr_types_1;
17807 TALLOC_CTX *_mem_save_types_0;
17808 TALLOC_CTX *_mem_save_types_1;
17809 if (ndr_flags & NDR_SCALARS) {
17810 NDR_CHECK(ndr_pull_align(ndr, 4));
17811 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
17812 NDR_CHECK(ndr_pull_spoolssNotifyOptionFlags(ndr, NDR_SCALARS, &r->flags));
17813 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
17814 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_types));
17815 if (_ptr_types) {
17816 NDR_PULL_ALLOC(ndr, r->types);
17817 } else {
17818 r->types = NULL;
17821 if (ndr_flags & NDR_BUFFERS) {
17822 if (r->types) {
17823 _mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
17824 NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
17825 NDR_CHECK(ndr_pull_array_size(ndr, &r->types));
17826 NDR_PULL_ALLOC_N(ndr, r->types, ndr_get_array_size(ndr, &r->types));
17827 _mem_save_types_1 = NDR_PULL_GET_MEM_CTX(ndr);
17828 NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
17829 for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
17830 NDR_CHECK(ndr_pull_spoolss_NotifyOptionType(ndr, NDR_SCALARS, &r->types[cntr_types_1]));
17832 for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
17833 NDR_CHECK(ndr_pull_spoolss_NotifyOptionType(ndr, NDR_BUFFERS, &r->types[cntr_types_1]));
17835 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_1, 0);
17836 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_0, 0);
17838 if (r->types) {
17839 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->types, r->count));
17842 return NDR_ERR_SUCCESS;
17845 _PUBLIC_ void ndr_print_spoolss_NotifyOption(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyOption *r)
17847 uint32_t cntr_types_1;
17848 ndr_print_struct(ndr, name, "spoolss_NotifyOption");
17849 ndr->depth++;
17850 ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->version);
17851 ndr_print_spoolssNotifyOptionFlags(ndr, "flags", r->flags);
17852 ndr_print_uint32(ndr, "count", r->count);
17853 ndr_print_ptr(ndr, "types", r->types);
17854 ndr->depth++;
17855 if (r->types) {
17856 ndr->print(ndr, "%s: ARRAY(%d)", "types", (int)r->count);
17857 ndr->depth++;
17858 for (cntr_types_1=0;cntr_types_1<r->count;cntr_types_1++) {
17859 char *idx_1=NULL;
17860 if (asprintf(&idx_1, "[%d]", cntr_types_1) != -1) {
17861 ndr_print_spoolss_NotifyOptionType(ndr, "types", &r->types[cntr_types_1]);
17862 free(idx_1);
17865 ndr->depth--;
17867 ndr->depth--;
17868 ndr->depth--;
17871 static enum ndr_err_code ndr_push_spoolss_NotifyString(struct ndr_push *ndr, int ndr_flags, const struct spoolss_NotifyString *r)
17873 if (ndr_flags & NDR_SCALARS) {
17874 NDR_CHECK(ndr_push_align(ndr, 4));
17875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
17876 NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
17878 if (ndr_flags & NDR_BUFFERS) {
17879 if (r->string) {
17880 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size / 2));
17881 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, r->size / 2, sizeof(uint16_t), CH_UTF16));
17884 return NDR_ERR_SUCCESS;
17887 static enum ndr_err_code ndr_pull_spoolss_NotifyString(struct ndr_pull *ndr, int ndr_flags, struct spoolss_NotifyString *r)
17889 uint32_t _ptr_string;
17890 TALLOC_CTX *_mem_save_string_0;
17891 if (ndr_flags & NDR_SCALARS) {
17892 NDR_CHECK(ndr_pull_align(ndr, 4));
17893 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
17894 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
17895 if (_ptr_string) {
17896 NDR_PULL_ALLOC(ndr, r->string);
17897 } else {
17898 r->string = NULL;
17901 if (ndr_flags & NDR_BUFFERS) {
17902 if (r->string) {
17903 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
17904 NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
17905 NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
17906 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, ndr_get_array_size(ndr, &r->string), sizeof(uint16_t), CH_UTF16));
17907 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
17909 if (r->string) {
17910 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->string, r->size / 2));
17913 return NDR_ERR_SUCCESS;
17916 _PUBLIC_ void ndr_print_spoolss_NotifyString(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyString *r)
17918 ndr_print_struct(ndr, name, "spoolss_NotifyString");
17919 ndr->depth++;
17920 ndr_print_uint32(ndr, "size", r->size);
17921 ndr_print_ptr(ndr, "string", r->string);
17922 ndr->depth++;
17923 if (r->string) {
17924 ndr_print_string(ndr, "string", r->string);
17926 ndr->depth--;
17927 ndr->depth--;
17930 static enum ndr_err_code ndr_push_spoolss_NotifyTable(struct ndr_push *ndr, int ndr_flags, enum spoolss_NotifyTable r)
17932 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
17933 return NDR_ERR_SUCCESS;
17936 static enum ndr_err_code ndr_pull_spoolss_NotifyTable(struct ndr_pull *ndr, int ndr_flags, enum spoolss_NotifyTable *r)
17938 uint32_t v;
17939 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
17940 *r = v;
17941 return NDR_ERR_SUCCESS;
17944 _PUBLIC_ void ndr_print_spoolss_NotifyTable(struct ndr_print *ndr, const char *name, enum spoolss_NotifyTable r)
17946 const char *val = NULL;
17948 switch (r) {
17949 case NOTIFY_TABLE_DWORD: val = "NOTIFY_TABLE_DWORD"; break;
17950 case NOTIFY_TABLE_STRING: val = "NOTIFY_TABLE_STRING"; break;
17951 case NOTIFY_TABLE_DEVMODE: val = "NOTIFY_TABLE_DEVMODE"; break;
17952 case NOTIFY_TABLE_TIME: val = "NOTIFY_TABLE_TIME"; break;
17953 case NOTIFY_TABLE_SECURITYDESCRIPTOR: val = "NOTIFY_TABLE_SECURITYDESCRIPTOR"; break;
17955 ndr_print_enum(ndr, name, "ENUM", val, r);
17958 static enum ndr_err_code ndr_push_spoolss_NotifyData(struct ndr_push *ndr, int ndr_flags, const union spoolss_NotifyData *r)
17960 if (ndr_flags & NDR_SCALARS) {
17961 int level = ndr_push_get_switch_value(ndr, r);
17962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
17963 switch (level) {
17964 case 1: {
17965 uint32_t cntr_integer_0;
17966 for (cntr_integer_0 = 0; cntr_integer_0 < 2; cntr_integer_0++) {
17967 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->integer[cntr_integer_0]));
17969 break; }
17971 case 2: {
17972 NDR_CHECK(ndr_push_spoolss_NotifyString(ndr, NDR_SCALARS, &r->string));
17973 break; }
17975 case 3: {
17976 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS, &r->devmode));
17977 break; }
17979 case 4: {
17980 NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr, NDR_SCALARS, &r->time));
17981 break; }
17983 case 5: {
17984 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sd));
17985 break; }
17987 default:
17988 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
17991 if (ndr_flags & NDR_BUFFERS) {
17992 int level = ndr_push_get_switch_value(ndr, r);
17993 switch (level) {
17994 case 1:
17995 break;
17997 case 2:
17998 NDR_CHECK(ndr_push_spoolss_NotifyString(ndr, NDR_BUFFERS, &r->string));
17999 break;
18001 case 3:
18002 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_BUFFERS, &r->devmode));
18003 break;
18005 case 4:
18006 NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr, NDR_BUFFERS, &r->time));
18007 break;
18009 case 5:
18010 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd));
18011 break;
18013 default:
18014 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18017 return NDR_ERR_SUCCESS;
18020 static enum ndr_err_code ndr_pull_spoolss_NotifyData(struct ndr_pull *ndr, int ndr_flags, union spoolss_NotifyData *r)
18022 int level;
18023 uint32_t _level;
18024 level = ndr_pull_get_switch_value(ndr, r);
18025 if (ndr_flags & NDR_SCALARS) {
18026 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
18027 if (_level != level) {
18028 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
18030 switch (level) {
18031 case 1: {
18032 uint32_t cntr_integer_0;
18033 for (cntr_integer_0 = 0; cntr_integer_0 < 2; cntr_integer_0++) {
18034 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->integer[cntr_integer_0]));
18036 break; }
18038 case 2: {
18039 NDR_CHECK(ndr_pull_spoolss_NotifyString(ndr, NDR_SCALARS, &r->string));
18040 break; }
18042 case 3: {
18043 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS, &r->devmode));
18044 break; }
18046 case 4: {
18047 NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr, NDR_SCALARS, &r->time));
18048 break; }
18050 case 5: {
18051 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sd));
18052 break; }
18054 default:
18055 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18058 if (ndr_flags & NDR_BUFFERS) {
18059 switch (level) {
18060 case 1:
18061 break;
18063 case 2:
18064 NDR_CHECK(ndr_pull_spoolss_NotifyString(ndr, NDR_BUFFERS, &r->string));
18065 break;
18067 case 3:
18068 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_BUFFERS, &r->devmode));
18069 break;
18071 case 4:
18072 NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr, NDR_BUFFERS, &r->time));
18073 break;
18075 case 5:
18076 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd));
18077 break;
18079 default:
18080 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18083 return NDR_ERR_SUCCESS;
18086 _PUBLIC_ void ndr_print_spoolss_NotifyData(struct ndr_print *ndr, const char *name, const union spoolss_NotifyData *r)
18088 int level;
18089 uint32_t cntr_integer_0;
18090 level = ndr_print_get_switch_value(ndr, r);
18091 ndr_print_union(ndr, name, level, "spoolss_NotifyData");
18092 switch (level) {
18093 case 1:
18094 ndr->print(ndr, "%s: ARRAY(%d)", "integer", (int)2);
18095 ndr->depth++;
18096 for (cntr_integer_0=0;cntr_integer_0<2;cntr_integer_0++) {
18097 char *idx_0=NULL;
18098 if (asprintf(&idx_0, "[%d]", cntr_integer_0) != -1) {
18099 ndr_print_uint32(ndr, "integer", r->integer[cntr_integer_0]);
18100 free(idx_0);
18103 ndr->depth--;
18104 break;
18106 case 2:
18107 ndr_print_spoolss_NotifyString(ndr, "string", &r->string);
18108 break;
18110 case 3:
18111 ndr_print_spoolss_DevmodeContainer(ndr, "devmode", &r->devmode);
18112 break;
18114 case 4:
18115 ndr_print_spoolss_TimeCtr(ndr, "time", &r->time);
18116 break;
18118 case 5:
18119 ndr_print_sec_desc_buf(ndr, "sd", &r->sd);
18120 break;
18122 default:
18123 ndr_print_bad_level(ndr, name, level);
18127 static enum ndr_err_code ndr_push_spoolss_Notify(struct ndr_push *ndr, int ndr_flags, const struct spoolss_Notify *r)
18129 if (ndr_flags & NDR_SCALARS) {
18130 NDR_CHECK(ndr_push_align(ndr, 4));
18131 NDR_CHECK(ndr_push_spoolss_NotifyType(ndr, NDR_SCALARS, r->type));
18132 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->field, r->type));
18133 NDR_CHECK(ndr_push_spoolss_Field(ndr, NDR_SCALARS, &r->field));
18134 NDR_CHECK(ndr_push_spoolss_NotifyTable(ndr, NDR_SCALARS, r->variable_type));
18135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
18136 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->data, r->variable_type));
18137 NDR_CHECK(ndr_push_spoolss_NotifyData(ndr, NDR_SCALARS, &r->data));
18139 if (ndr_flags & NDR_BUFFERS) {
18140 NDR_CHECK(ndr_push_spoolss_NotifyData(ndr, NDR_BUFFERS, &r->data));
18142 return NDR_ERR_SUCCESS;
18145 static enum ndr_err_code ndr_pull_spoolss_Notify(struct ndr_pull *ndr, int ndr_flags, struct spoolss_Notify *r)
18147 if (ndr_flags & NDR_SCALARS) {
18148 NDR_CHECK(ndr_pull_align(ndr, 4));
18149 NDR_CHECK(ndr_pull_spoolss_NotifyType(ndr, NDR_SCALARS, &r->type));
18150 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->field, r->type));
18151 NDR_CHECK(ndr_pull_spoolss_Field(ndr, NDR_SCALARS, &r->field));
18152 NDR_CHECK(ndr_pull_spoolss_NotifyTable(ndr, NDR_SCALARS, &r->variable_type));
18153 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
18154 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->data, r->variable_type));
18155 NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr, NDR_SCALARS, &r->data));
18157 if (ndr_flags & NDR_BUFFERS) {
18158 NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr, NDR_BUFFERS, &r->data));
18160 return NDR_ERR_SUCCESS;
18163 _PUBLIC_ void ndr_print_spoolss_Notify(struct ndr_print *ndr, const char *name, const struct spoolss_Notify *r)
18165 ndr_print_struct(ndr, name, "spoolss_Notify");
18166 ndr->depth++;
18167 ndr_print_spoolss_NotifyType(ndr, "type", r->type);
18168 ndr_print_set_switch_value(ndr, &r->field, r->type);
18169 ndr_print_spoolss_Field(ndr, "field", &r->field);
18170 ndr_print_spoolss_NotifyTable(ndr, "variable_type", r->variable_type);
18171 ndr_print_uint32(ndr, "job_id", r->job_id);
18172 ndr_print_set_switch_value(ndr, &r->data, r->variable_type);
18173 ndr_print_spoolss_NotifyData(ndr, "data", &r->data);
18174 ndr->depth--;
18177 static enum ndr_err_code ndr_push_spoolss_NotifyInfo(struct ndr_push *ndr, int ndr_flags, const struct spoolss_NotifyInfo *r)
18179 uint32_t cntr_notifies_0;
18180 if (ndr_flags & NDR_SCALARS) {
18181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
18182 NDR_CHECK(ndr_push_align(ndr, 4));
18183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2));
18184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
18185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
18186 for (cntr_notifies_0 = 0; cntr_notifies_0 < r->count; cntr_notifies_0++) {
18187 NDR_CHECK(ndr_push_spoolss_Notify(ndr, NDR_SCALARS, &r->notifies[cntr_notifies_0]));
18190 if (ndr_flags & NDR_BUFFERS) {
18191 for (cntr_notifies_0 = 0; cntr_notifies_0 < r->count; cntr_notifies_0++) {
18192 NDR_CHECK(ndr_push_spoolss_Notify(ndr, NDR_BUFFERS, &r->notifies[cntr_notifies_0]));
18195 return NDR_ERR_SUCCESS;
18198 static enum ndr_err_code ndr_pull_spoolss_NotifyInfo(struct ndr_pull *ndr, int ndr_flags, struct spoolss_NotifyInfo *r)
18200 uint32_t cntr_notifies_0;
18201 TALLOC_CTX *_mem_save_notifies_0;
18202 if (ndr_flags & NDR_SCALARS) {
18203 NDR_CHECK(ndr_pull_array_size(ndr, &r->notifies));
18204 NDR_CHECK(ndr_pull_align(ndr, 4));
18205 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
18206 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
18207 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
18208 NDR_PULL_ALLOC_N(ndr, r->notifies, ndr_get_array_size(ndr, &r->notifies));
18209 _mem_save_notifies_0 = NDR_PULL_GET_MEM_CTX(ndr);
18210 NDR_PULL_SET_MEM_CTX(ndr, r->notifies, 0);
18211 for (cntr_notifies_0 = 0; cntr_notifies_0 < r->count; cntr_notifies_0++) {
18212 NDR_CHECK(ndr_pull_spoolss_Notify(ndr, NDR_SCALARS, &r->notifies[cntr_notifies_0]));
18214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notifies_0, 0);
18215 if (r->notifies) {
18216 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->notifies, r->count));
18219 if (ndr_flags & NDR_BUFFERS) {
18220 _mem_save_notifies_0 = NDR_PULL_GET_MEM_CTX(ndr);
18221 NDR_PULL_SET_MEM_CTX(ndr, r->notifies, 0);
18222 for (cntr_notifies_0 = 0; cntr_notifies_0 < r->count; cntr_notifies_0++) {
18223 NDR_CHECK(ndr_pull_spoolss_Notify(ndr, NDR_BUFFERS, &r->notifies[cntr_notifies_0]));
18225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notifies_0, 0);
18227 return NDR_ERR_SUCCESS;
18230 _PUBLIC_ void ndr_print_spoolss_NotifyInfo(struct ndr_print *ndr, const char *name, const struct spoolss_NotifyInfo *r)
18232 uint32_t cntr_notifies_0;
18233 ndr_print_struct(ndr, name, "spoolss_NotifyInfo");
18234 ndr->depth++;
18235 ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2:r->version);
18236 ndr_print_uint32(ndr, "flags", r->flags);
18237 ndr_print_uint32(ndr, "count", r->count);
18238 ndr->print(ndr, "%s: ARRAY(%d)", "notifies", (int)r->count);
18239 ndr->depth++;
18240 for (cntr_notifies_0=0;cntr_notifies_0<r->count;cntr_notifies_0++) {
18241 char *idx_0=NULL;
18242 if (asprintf(&idx_0, "[%d]", cntr_notifies_0) != -1) {
18243 ndr_print_spoolss_Notify(ndr, "notifies", &r->notifies[cntr_notifies_0]);
18244 free(idx_0);
18247 ndr->depth--;
18248 ndr->depth--;
18251 static enum ndr_err_code ndr_push_spoolss_ReplyPrinterInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_ReplyPrinterInfo *r)
18253 if (ndr_flags & NDR_SCALARS) {
18254 int level = ndr_push_get_switch_value(ndr, r);
18255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
18256 switch (level) {
18257 case 0: {
18258 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
18259 break; }
18261 default:
18262 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18265 if (ndr_flags & NDR_BUFFERS) {
18266 int level = ndr_push_get_switch_value(ndr, r);
18267 switch (level) {
18268 case 0:
18269 if (r->info0) {
18270 NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
18272 break;
18274 default:
18275 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18278 return NDR_ERR_SUCCESS;
18281 static enum ndr_err_code ndr_pull_spoolss_ReplyPrinterInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_ReplyPrinterInfo *r)
18283 int level;
18284 uint32_t _level;
18285 TALLOC_CTX *_mem_save_info0_0;
18286 level = ndr_pull_get_switch_value(ndr, r);
18287 if (ndr_flags & NDR_SCALARS) {
18288 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
18289 if (_level != level) {
18290 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
18292 switch (level) {
18293 case 0: {
18294 uint32_t _ptr_info0;
18295 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
18296 if (_ptr_info0) {
18297 NDR_PULL_ALLOC(ndr, r->info0);
18298 } else {
18299 r->info0 = NULL;
18301 break; }
18303 default:
18304 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18307 if (ndr_flags & NDR_BUFFERS) {
18308 switch (level) {
18309 case 0:
18310 if (r->info0) {
18311 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
18312 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
18313 NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
18314 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
18316 break;
18318 default:
18319 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18322 return NDR_ERR_SUCCESS;
18325 _PUBLIC_ void ndr_print_spoolss_ReplyPrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_ReplyPrinterInfo *r)
18327 int level;
18328 level = ndr_print_get_switch_value(ndr, r);
18329 ndr_print_union(ndr, name, level, "spoolss_ReplyPrinterInfo");
18330 switch (level) {
18331 case 0:
18332 ndr_print_ptr(ndr, "info0", r->info0);
18333 ndr->depth++;
18334 if (r->info0) {
18335 ndr_print_spoolss_NotifyInfo(ndr, "info0", r->info0);
18337 ndr->depth--;
18338 break;
18340 default:
18341 ndr_print_bad_level(ndr, name, level);
18345 static enum ndr_err_code ndr_push_spoolss_PrinterNotifyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
18347 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
18348 return NDR_ERR_SUCCESS;
18351 static enum ndr_err_code ndr_pull_spoolss_PrinterNotifyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
18353 uint32_t v;
18354 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
18355 *r = v;
18356 return NDR_ERR_SUCCESS;
18359 _PUBLIC_ void ndr_print_spoolss_PrinterNotifyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
18361 ndr_print_uint32(ndr, name, r);
18362 ndr->depth++;
18363 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDED", PRINTER_NOTIFY_INFO_DISCARDED, r);
18364 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDNOTED", PRINTER_NOTIFY_INFO_DISCARDNOTED, r);
18365 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_COLOR_MISMATCH", PRINTER_NOTIFY_INFO_COLOR_MISMATCH, r);
18366 ndr->depth--;
18369 static enum ndr_err_code ndr_push_spoolss_UserLevel1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_UserLevel1 *r)
18371 if (ndr_flags & NDR_SCALARS) {
18372 NDR_CHECK(ndr_push_align(ndr, 4));
18373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
18374 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
18375 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
18376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->build));
18377 NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr, NDR_SCALARS, r->major));
18378 NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr, NDR_SCALARS, r->minor));
18379 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor));
18381 if (ndr_flags & NDR_BUFFERS) {
18382 if (r->client) {
18383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
18384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
18386 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18388 if (r->user) {
18389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
18390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
18392 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18395 return NDR_ERR_SUCCESS;
18398 static enum ndr_err_code ndr_pull_spoolss_UserLevel1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_UserLevel1 *r)
18400 uint32_t _ptr_client;
18401 TALLOC_CTX *_mem_save_client_0;
18402 uint32_t _ptr_user;
18403 TALLOC_CTX *_mem_save_user_0;
18404 if (ndr_flags & NDR_SCALARS) {
18405 NDR_CHECK(ndr_pull_align(ndr, 4));
18406 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
18407 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
18408 if (_ptr_client) {
18409 NDR_PULL_ALLOC(ndr, r->client);
18410 } else {
18411 r->client = NULL;
18413 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
18414 if (_ptr_user) {
18415 NDR_PULL_ALLOC(ndr, r->user);
18416 } else {
18417 r->user = NULL;
18419 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build));
18420 NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr, NDR_SCALARS, &r->major));
18421 NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr, NDR_SCALARS, &r->minor));
18422 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor));
18424 if (ndr_flags & NDR_BUFFERS) {
18425 if (r->client) {
18426 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
18427 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
18428 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
18429 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
18430 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
18431 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
18433 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
18434 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
18435 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
18437 if (r->user) {
18438 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
18439 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
18440 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
18441 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
18442 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
18443 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
18445 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
18446 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
18447 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
18450 return NDR_ERR_SUCCESS;
18453 _PUBLIC_ void ndr_print_spoolss_UserLevel1(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevel1 *r)
18455 ndr_print_struct(ndr, name, "spoolss_UserLevel1");
18456 ndr->depth++;
18457 ndr_print_uint32(ndr, "size", r->size);
18458 ndr_print_ptr(ndr, "client", r->client);
18459 ndr->depth++;
18460 if (r->client) {
18461 ndr_print_string(ndr, "client", r->client);
18463 ndr->depth--;
18464 ndr_print_ptr(ndr, "user", r->user);
18465 ndr->depth++;
18466 if (r->user) {
18467 ndr_print_string(ndr, "user", r->user);
18469 ndr->depth--;
18470 ndr_print_uint32(ndr, "build", r->build);
18471 ndr_print_spoolss_MajorVersion(ndr, "major", r->major);
18472 ndr_print_spoolss_MinorVersion(ndr, "minor", r->minor);
18473 ndr_print_spoolss_ProcessorArchitecture(ndr, "processor", r->processor);
18474 ndr->depth--;
18477 static enum ndr_err_code ndr_push_spoolss_UserLevel2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_UserLevel2 *r)
18479 if (ndr_flags & NDR_SCALARS) {
18480 NDR_CHECK(ndr_push_align(ndr, 4));
18481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->not_used));
18483 if (ndr_flags & NDR_BUFFERS) {
18485 return NDR_ERR_SUCCESS;
18488 static enum ndr_err_code ndr_pull_spoolss_UserLevel2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_UserLevel2 *r)
18490 if (ndr_flags & NDR_SCALARS) {
18491 NDR_CHECK(ndr_pull_align(ndr, 4));
18492 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->not_used));
18494 if (ndr_flags & NDR_BUFFERS) {
18496 return NDR_ERR_SUCCESS;
18499 _PUBLIC_ void ndr_print_spoolss_UserLevel2(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevel2 *r)
18501 ndr_print_struct(ndr, name, "spoolss_UserLevel2");
18502 ndr->depth++;
18503 ndr_print_uint32(ndr, "not_used", r->not_used);
18504 ndr->depth--;
18507 static enum ndr_err_code ndr_push_spoolss_UserLevel3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_UserLevel3 *r)
18509 if (ndr_flags & NDR_SCALARS) {
18510 NDR_CHECK(ndr_push_align(ndr, 4));
18511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
18512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
18513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size2));
18514 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
18515 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
18516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->build));
18517 NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr, NDR_SCALARS, r->major));
18518 NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr, NDR_SCALARS, r->minor));
18519 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor));
18520 NDR_CHECK(ndr_push_udlong(ndr, NDR_SCALARS, r->reserved));
18522 if (ndr_flags & NDR_BUFFERS) {
18523 if (r->client) {
18524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
18525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18526 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
18527 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18529 if (r->user) {
18530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
18531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18532 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
18533 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18536 return NDR_ERR_SUCCESS;
18539 static enum ndr_err_code ndr_pull_spoolss_UserLevel3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_UserLevel3 *r)
18541 uint32_t _ptr_client;
18542 TALLOC_CTX *_mem_save_client_0;
18543 uint32_t _ptr_user;
18544 TALLOC_CTX *_mem_save_user_0;
18545 if (ndr_flags & NDR_SCALARS) {
18546 NDR_CHECK(ndr_pull_align(ndr, 4));
18547 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
18548 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
18549 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size2));
18550 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
18551 if (_ptr_client) {
18552 NDR_PULL_ALLOC(ndr, r->client);
18553 } else {
18554 r->client = NULL;
18556 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
18557 if (_ptr_user) {
18558 NDR_PULL_ALLOC(ndr, r->user);
18559 } else {
18560 r->user = NULL;
18562 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->build));
18563 NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr, NDR_SCALARS, &r->major));
18564 NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr, NDR_SCALARS, &r->minor));
18565 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor));
18566 NDR_CHECK(ndr_pull_udlong(ndr, NDR_SCALARS, &r->reserved));
18568 if (ndr_flags & NDR_BUFFERS) {
18569 if (r->client) {
18570 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
18571 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
18572 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
18573 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
18574 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
18575 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
18577 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
18578 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
18579 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
18581 if (r->user) {
18582 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
18583 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
18584 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
18585 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
18586 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
18587 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
18589 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
18590 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
18591 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
18594 return NDR_ERR_SUCCESS;
18597 _PUBLIC_ void ndr_print_spoolss_UserLevel3(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevel3 *r)
18599 ndr_print_struct(ndr, name, "spoolss_UserLevel3");
18600 ndr->depth++;
18601 ndr_print_uint32(ndr, "size", r->size);
18602 ndr_print_uint32(ndr, "flags", r->flags);
18603 ndr_print_uint32(ndr, "size2", r->size2);
18604 ndr_print_ptr(ndr, "client", r->client);
18605 ndr->depth++;
18606 if (r->client) {
18607 ndr_print_string(ndr, "client", r->client);
18609 ndr->depth--;
18610 ndr_print_ptr(ndr, "user", r->user);
18611 ndr->depth++;
18612 if (r->user) {
18613 ndr_print_string(ndr, "user", r->user);
18615 ndr->depth--;
18616 ndr_print_uint32(ndr, "build", r->build);
18617 ndr_print_spoolss_MajorVersion(ndr, "major", r->major);
18618 ndr_print_spoolss_MinorVersion(ndr, "minor", r->minor);
18619 ndr_print_spoolss_ProcessorArchitecture(ndr, "processor", r->processor);
18620 ndr_print_udlong(ndr, "reserved", r->reserved);
18621 ndr->depth--;
18624 static enum ndr_err_code ndr_push_spoolss_UserLevel(struct ndr_push *ndr, int ndr_flags, const union spoolss_UserLevel *r)
18626 if (ndr_flags & NDR_SCALARS) {
18627 int level = ndr_push_get_switch_value(ndr, r);
18628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
18629 switch (level) {
18630 case 1: {
18631 NDR_CHECK(ndr_push_unique_ptr(ndr, r->level1));
18632 break; }
18634 case 2: {
18635 NDR_CHECK(ndr_push_unique_ptr(ndr, r->level2));
18636 break; }
18638 case 3: {
18639 NDR_CHECK(ndr_push_unique_ptr(ndr, r->level3));
18640 break; }
18642 default:
18643 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18646 if (ndr_flags & NDR_BUFFERS) {
18647 int level = ndr_push_get_switch_value(ndr, r);
18648 switch (level) {
18649 case 1:
18650 if (r->level1) {
18651 NDR_CHECK(ndr_push_spoolss_UserLevel1(ndr, NDR_SCALARS|NDR_BUFFERS, r->level1));
18653 break;
18655 case 2:
18656 if (r->level2) {
18657 NDR_CHECK(ndr_push_spoolss_UserLevel2(ndr, NDR_SCALARS, r->level2));
18659 break;
18661 case 3:
18662 if (r->level3) {
18663 NDR_CHECK(ndr_push_spoolss_UserLevel3(ndr, NDR_SCALARS|NDR_BUFFERS, r->level3));
18665 break;
18667 default:
18668 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18671 return NDR_ERR_SUCCESS;
18674 static enum ndr_err_code ndr_pull_spoolss_UserLevel(struct ndr_pull *ndr, int ndr_flags, union spoolss_UserLevel *r)
18676 int level;
18677 uint32_t _level;
18678 TALLOC_CTX *_mem_save_level1_0;
18679 TALLOC_CTX *_mem_save_level2_0;
18680 TALLOC_CTX *_mem_save_level3_0;
18681 level = ndr_pull_get_switch_value(ndr, r);
18682 if (ndr_flags & NDR_SCALARS) {
18683 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
18684 if (_level != level) {
18685 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
18687 switch (level) {
18688 case 1: {
18689 uint32_t _ptr_level1;
18690 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_level1));
18691 if (_ptr_level1) {
18692 NDR_PULL_ALLOC(ndr, r->level1);
18693 } else {
18694 r->level1 = NULL;
18696 break; }
18698 case 2: {
18699 uint32_t _ptr_level2;
18700 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_level2));
18701 if (_ptr_level2) {
18702 NDR_PULL_ALLOC(ndr, r->level2);
18703 } else {
18704 r->level2 = NULL;
18706 break; }
18708 case 3: {
18709 uint32_t _ptr_level3;
18710 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_level3));
18711 if (_ptr_level3) {
18712 NDR_PULL_ALLOC(ndr, r->level3);
18713 } else {
18714 r->level3 = NULL;
18716 break; }
18718 default:
18719 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18722 if (ndr_flags & NDR_BUFFERS) {
18723 switch (level) {
18724 case 1:
18725 if (r->level1) {
18726 _mem_save_level1_0 = NDR_PULL_GET_MEM_CTX(ndr);
18727 NDR_PULL_SET_MEM_CTX(ndr, r->level1, 0);
18728 NDR_CHECK(ndr_pull_spoolss_UserLevel1(ndr, NDR_SCALARS|NDR_BUFFERS, r->level1));
18729 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level1_0, 0);
18731 break;
18733 case 2:
18734 if (r->level2) {
18735 _mem_save_level2_0 = NDR_PULL_GET_MEM_CTX(ndr);
18736 NDR_PULL_SET_MEM_CTX(ndr, r->level2, 0);
18737 NDR_CHECK(ndr_pull_spoolss_UserLevel2(ndr, NDR_SCALARS, r->level2));
18738 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level2_0, 0);
18740 break;
18742 case 3:
18743 if (r->level3) {
18744 _mem_save_level3_0 = NDR_PULL_GET_MEM_CTX(ndr);
18745 NDR_PULL_SET_MEM_CTX(ndr, r->level3, 0);
18746 NDR_CHECK(ndr_pull_spoolss_UserLevel3(ndr, NDR_SCALARS|NDR_BUFFERS, r->level3));
18747 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level3_0, 0);
18749 break;
18751 default:
18752 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
18755 return NDR_ERR_SUCCESS;
18758 _PUBLIC_ void ndr_print_spoolss_UserLevel(struct ndr_print *ndr, const char *name, const union spoolss_UserLevel *r)
18760 int level;
18761 level = ndr_print_get_switch_value(ndr, r);
18762 ndr_print_union(ndr, name, level, "spoolss_UserLevel");
18763 switch (level) {
18764 case 1:
18765 ndr_print_ptr(ndr, "level1", r->level1);
18766 ndr->depth++;
18767 if (r->level1) {
18768 ndr_print_spoolss_UserLevel1(ndr, "level1", r->level1);
18770 ndr->depth--;
18771 break;
18773 case 2:
18774 ndr_print_ptr(ndr, "level2", r->level2);
18775 ndr->depth++;
18776 if (r->level2) {
18777 ndr_print_spoolss_UserLevel2(ndr, "level2", r->level2);
18779 ndr->depth--;
18780 break;
18782 case 3:
18783 ndr_print_ptr(ndr, "level3", r->level3);
18784 ndr->depth++;
18785 if (r->level3) {
18786 ndr_print_spoolss_UserLevel3(ndr, "level3", r->level3);
18788 ndr->depth--;
18789 break;
18791 default:
18792 ndr_print_bad_level(ndr, name, level);
18796 static enum ndr_err_code ndr_push_spoolss_UserLevelCtr(struct ndr_push *ndr, int ndr_flags, const struct spoolss_UserLevelCtr *r)
18798 if (ndr_flags & NDR_SCALARS) {
18799 NDR_CHECK(ndr_push_align(ndr, 4));
18800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
18801 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->user_info, r->level));
18802 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_SCALARS, &r->user_info));
18804 if (ndr_flags & NDR_BUFFERS) {
18805 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_BUFFERS, &r->user_info));
18807 return NDR_ERR_SUCCESS;
18810 static enum ndr_err_code ndr_pull_spoolss_UserLevelCtr(struct ndr_pull *ndr, int ndr_flags, struct spoolss_UserLevelCtr *r)
18812 if (ndr_flags & NDR_SCALARS) {
18813 NDR_CHECK(ndr_pull_align(ndr, 4));
18814 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
18815 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->user_info, r->level));
18816 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr, NDR_SCALARS, &r->user_info));
18818 if (ndr_flags & NDR_BUFFERS) {
18819 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr, NDR_BUFFERS, &r->user_info));
18821 return NDR_ERR_SUCCESS;
18824 _PUBLIC_ void ndr_print_spoolss_UserLevelCtr(struct ndr_print *ndr, const char *name, const struct spoolss_UserLevelCtr *r)
18826 ndr_print_struct(ndr, name, "spoolss_UserLevelCtr");
18827 ndr->depth++;
18828 ndr_print_uint32(ndr, "level", r->level);
18829 ndr_print_set_switch_value(ndr, &r->user_info, r->level);
18830 ndr_print_spoolss_UserLevel(ndr, "user_info", &r->user_info);
18831 ndr->depth--;
18834 static enum ndr_err_code ndr_push_spoolss_AccessRights(struct ndr_push *ndr, int ndr_flags, uint32_t r)
18836 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
18837 return NDR_ERR_SUCCESS;
18840 static enum ndr_err_code ndr_pull_spoolss_AccessRights(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
18842 uint32_t v;
18843 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
18844 *r = v;
18845 return NDR_ERR_SUCCESS;
18848 _PUBLIC_ void ndr_print_spoolss_AccessRights(struct ndr_print *ndr, const char *name, uint32_t r)
18850 ndr_print_uint32(ndr, name, r);
18851 ndr->depth++;
18852 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SERVER_ACCESS_ADMINISTER", SERVER_ACCESS_ADMINISTER, r);
18853 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SERVER_ACCESS_ENUMERATE", SERVER_ACCESS_ENUMERATE, r);
18854 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ACCESS_ADMINISTER", PRINTER_ACCESS_ADMINISTER, r);
18855 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ACCESS_USE", PRINTER_ACCESS_USE, r);
18856 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_ACCESS_ADMINISTER", JOB_ACCESS_ADMINISTER, r);
18857 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_ACCESS_READ", JOB_ACCESS_READ, r);
18858 ndr->depth--;
18861 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterEnumValues(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterEnumValues *r)
18863 uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
18864 if (ndr_flags & NDR_SCALARS) {
18865 NDR_CHECK(ndr_push_align(ndr, 4));
18866 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
18868 uint32_t _flags_save_string = ndr->flags;
18869 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
18870 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->value_name));
18871 ndr->flags = _flags_save_string;
18873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->value_name)));
18874 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->type));
18875 NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data));
18876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_PrinterData(r->data, r->type, ndr->iconv_convenience, ndr->flags)));
18878 if (ndr_flags & NDR_BUFFERS) {
18879 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
18881 uint32_t _flags_save_string = ndr->flags;
18882 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
18883 if (r->value_name) {
18884 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->value_name));
18885 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->value_name));
18887 ndr->flags = _flags_save_string;
18889 if (r->data) {
18890 NDR_CHECK(ndr_push_relative_ptr2(ndr, r->data));
18892 struct ndr_push *_ndr_data;
18893 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_data, 0, r->data_length));
18894 NDR_CHECK(ndr_push_set_switch_value(_ndr_data, r->data, r->type));
18895 NDR_CHECK(ndr_push_spoolss_PrinterData(_ndr_data, NDR_SCALARS|NDR_BUFFERS, r->data));
18896 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_data, 0, r->data_length));
18900 ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
18901 return NDR_ERR_SUCCESS;
18904 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterEnumValues(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterEnumValues *r)
18906 uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
18907 uint32_t _ptr_value_name;
18908 TALLOC_CTX *_mem_save_value_name_0;
18909 uint32_t _ptr_data;
18910 TALLOC_CTX *_mem_save_data_0;
18911 if (ndr_flags & NDR_SCALARS) {
18912 NDR_CHECK(ndr_pull_align(ndr, 4));
18913 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
18915 uint32_t _flags_save_string = ndr->flags;
18916 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
18917 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value_name));
18918 if (_ptr_value_name) {
18919 NDR_PULL_ALLOC(ndr, r->value_name);
18920 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->value_name, _ptr_value_name));
18921 } else {
18922 r->value_name = NULL;
18924 ndr->flags = _flags_save_string;
18926 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->value_name_len));
18927 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->type));
18928 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
18929 if (_ptr_data) {
18930 NDR_PULL_ALLOC(ndr, r->data);
18931 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data, _ptr_data));
18932 } else {
18933 r->data = NULL;
18935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length));
18937 if (ndr_flags & NDR_BUFFERS) {
18938 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
18940 uint32_t _flags_save_string = ndr->flags;
18941 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
18942 if (r->value_name) {
18943 uint32_t _relative_save_offset;
18944 _relative_save_offset = ndr->offset;
18945 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->value_name));
18946 _mem_save_value_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
18947 NDR_PULL_SET_MEM_CTX(ndr, r->value_name, 0);
18948 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->value_name));
18949 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_name_0, 0);
18950 ndr->offset = _relative_save_offset;
18952 ndr->flags = _flags_save_string;
18954 if (r->data) {
18955 uint32_t _relative_save_offset;
18956 _relative_save_offset = ndr->offset;
18957 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data));
18958 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
18959 NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
18961 struct ndr_pull *_ndr_data;
18962 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_data, 0, r->data_length));
18963 NDR_CHECK(ndr_pull_set_switch_value(_ndr_data, r->data, r->type));
18964 NDR_CHECK(ndr_pull_spoolss_PrinterData(_ndr_data, NDR_SCALARS|NDR_BUFFERS, r->data));
18965 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_data, 0, r->data_length));
18967 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
18968 ndr->offset = _relative_save_offset;
18971 ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
18972 return NDR_ERR_SUCCESS;
18975 _PUBLIC_ void ndr_print_spoolss_PrinterEnumValues(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterEnumValues *r)
18977 ndr_print_struct(ndr, name, "spoolss_PrinterEnumValues");
18978 ndr->depth++;
18979 ndr_print_ptr(ndr, "value_name", r->value_name);
18980 ndr->depth++;
18981 if (r->value_name) {
18982 ndr_print_string(ndr, "value_name", r->value_name);
18984 ndr->depth--;
18985 ndr_print_uint32(ndr, "value_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->value_name):r->value_name_len);
18986 ndr_print_winreg_Type(ndr, "type", r->type);
18987 ndr_print_ptr(ndr, "data", r->data);
18988 ndr->depth++;
18989 if (r->data) {
18990 ndr_print_set_switch_value(ndr, r->data, r->type);
18991 ndr_print_spoolss_PrinterData(ndr, "data", r->data);
18993 ndr->depth--;
18994 ndr_print_uint32(ndr, "data_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_PrinterData(r->data, r->type, ndr->iconv_convenience, ndr->flags):r->data_length);
18995 ndr->depth--;
18998 _PUBLIC_ size_t ndr_size_spoolss_PrinterEnumValues(const struct spoolss_PrinterEnumValues *r, struct smb_iconv_convenience *ic, int flags)
19000 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterEnumValues, ic);
19003 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DeleteDriverFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
19005 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
19006 return NDR_ERR_SUCCESS;
19009 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DeleteDriverFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
19011 uint32_t v;
19012 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
19013 *r = v;
19014 return NDR_ERR_SUCCESS;
19017 _PUBLIC_ void ndr_print_spoolss_DeleteDriverFlags(struct ndr_print *ndr, const char *name, uint32_t r)
19019 ndr_print_uint32(ndr, name, r);
19020 ndr->depth++;
19021 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DPD_DELETE_UNUSED_FILES", DPD_DELETE_UNUSED_FILES, r);
19022 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DPD_DELETE_SPECIFIC_VERSION", DPD_DELETE_SPECIFIC_VERSION, r);
19023 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DPD_DELETE_ALL_FILES", DPD_DELETE_ALL_FILES, r);
19024 ndr->depth--;
19027 static enum ndr_err_code ndr_push_spoolss_PortProtocol(struct ndr_push *ndr, int ndr_flags, enum spoolss_PortProtocol r)
19029 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
19030 return NDR_ERR_SUCCESS;
19033 static enum ndr_err_code ndr_pull_spoolss_PortProtocol(struct ndr_pull *ndr, int ndr_flags, enum spoolss_PortProtocol *r)
19035 uint32_t v;
19036 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
19037 *r = v;
19038 return NDR_ERR_SUCCESS;
19041 _PUBLIC_ void ndr_print_spoolss_PortProtocol(struct ndr_print *ndr, const char *name, enum spoolss_PortProtocol r)
19043 const char *val = NULL;
19045 switch (r) {
19046 case PROTOCOL_RAWTCP_TYPE: val = "PROTOCOL_RAWTCP_TYPE"; break;
19047 case PROTOCOL_LPR_TYPE: val = "PROTOCOL_LPR_TYPE"; break;
19049 ndr_print_enum(ndr, name, "ENUM", val, r);
19052 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortData1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortData1 *r)
19054 if (ndr_flags & NDR_SCALARS) {
19055 NDR_CHECK(ndr_push_align(ndr, 4));
19056 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, 64, sizeof(uint16_t), CH_UTF16));
19057 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000001));
19058 NDR_CHECK(ndr_push_spoolss_PortProtocol(ndr, NDR_SCALARS, r->protocol));
19059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, sizeof(r)));
19060 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
19061 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hostaddress, 49, sizeof(uint16_t), CH_UTF16));
19062 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->snmpcommunity, 33, sizeof(uint16_t), CH_UTF16));
19063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dblspool));
19064 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->queue, 33, sizeof(uint16_t), CH_UTF16));
19065 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ip_address, 16, sizeof(uint16_t), CH_UTF16));
19066 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hardware_address, 13, sizeof(uint16_t), CH_UTF16));
19067 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device_type, 257, sizeof(uint16_t), CH_UTF16));
19068 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port_number));
19069 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_enabled));
19070 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_dev_index));
19072 if (ndr_flags & NDR_BUFFERS) {
19074 return NDR_ERR_SUCCESS;
19077 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortData1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortData1 *r)
19079 if (ndr_flags & NDR_SCALARS) {
19080 NDR_CHECK(ndr_pull_align(ndr, 4));
19081 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->portname, 64, sizeof(uint16_t), CH_UTF16));
19082 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
19083 NDR_CHECK(ndr_pull_spoolss_PortProtocol(ndr, NDR_SCALARS, &r->protocol));
19084 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
19085 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
19086 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hostaddress, 49, sizeof(uint16_t), CH_UTF16));
19087 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->snmpcommunity, 33, sizeof(uint16_t), CH_UTF16));
19088 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dblspool));
19089 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->queue, 33, sizeof(uint16_t), CH_UTF16));
19090 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ip_address, 16, sizeof(uint16_t), CH_UTF16));
19091 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hardware_address, 13, sizeof(uint16_t), CH_UTF16));
19092 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device_type, 257, sizeof(uint16_t), CH_UTF16));
19093 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port_number));
19094 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_enabled));
19095 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_dev_index));
19097 if (ndr_flags & NDR_BUFFERS) {
19099 return NDR_ERR_SUCCESS;
19102 _PUBLIC_ void ndr_print_spoolss_PortData1(struct ndr_print *ndr, const char *name, const struct spoolss_PortData1 *r)
19104 ndr_print_struct(ndr, name, "spoolss_PortData1");
19105 ndr->depth++;
19106 ndr_print_string(ndr, "portname", r->portname);
19107 ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000001:r->version);
19108 ndr_print_spoolss_PortProtocol(ndr, "protocol", r->protocol);
19109 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?sizeof(r):r->size);
19110 ndr_print_uint32(ndr, "reserved", r->reserved);
19111 ndr_print_string(ndr, "hostaddress", r->hostaddress);
19112 ndr_print_string(ndr, "snmpcommunity", r->snmpcommunity);
19113 ndr_print_uint32(ndr, "dblspool", r->dblspool);
19114 ndr_print_string(ndr, "queue", r->queue);
19115 ndr_print_string(ndr, "ip_address", r->ip_address);
19116 ndr_print_string(ndr, "hardware_address", r->hardware_address);
19117 ndr_print_string(ndr, "device_type", r->device_type);
19118 ndr_print_uint32(ndr, "port_number", r->port_number);
19119 ndr_print_uint32(ndr, "snmp_enabled", r->snmp_enabled);
19120 ndr_print_uint32(ndr, "snmp_dev_index", r->snmp_dev_index);
19121 ndr->depth--;
19124 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PortData2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PortData2 *r)
19126 if (ndr_flags & NDR_SCALARS) {
19127 NDR_CHECK(ndr_push_align(ndr, 4));
19128 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, 64, sizeof(uint16_t), CH_UTF16));
19129 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000002));
19130 NDR_CHECK(ndr_push_spoolss_PortProtocol(ndr, NDR_SCALARS, r->protocol));
19131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, sizeof(r)));
19132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
19133 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->hostaddress, 128, sizeof(uint16_t), CH_UTF16));
19134 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->snmpcommunity, 33, sizeof(uint16_t), CH_UTF16));
19135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dblspool));
19136 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->queue, 33, sizeof(uint16_t), CH_UTF16));
19137 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device_type, 257, sizeof(uint16_t), CH_UTF16));
19138 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port_number));
19139 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_enabled));
19140 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->snmp_dev_index));
19141 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->port_monitor_mib_index));
19143 if (ndr_flags & NDR_BUFFERS) {
19145 return NDR_ERR_SUCCESS;
19148 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PortData2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PortData2 *r)
19150 if (ndr_flags & NDR_SCALARS) {
19151 NDR_CHECK(ndr_pull_align(ndr, 4));
19152 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->portname, 64, sizeof(uint16_t), CH_UTF16));
19153 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
19154 NDR_CHECK(ndr_pull_spoolss_PortProtocol(ndr, NDR_SCALARS, &r->protocol));
19155 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
19156 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
19157 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->hostaddress, 128, sizeof(uint16_t), CH_UTF16));
19158 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->snmpcommunity, 33, sizeof(uint16_t), CH_UTF16));
19159 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dblspool));
19160 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->queue, 33, sizeof(uint16_t), CH_UTF16));
19161 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device_type, 257, sizeof(uint16_t), CH_UTF16));
19162 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port_number));
19163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_enabled));
19164 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->snmp_dev_index));
19165 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->port_monitor_mib_index));
19167 if (ndr_flags & NDR_BUFFERS) {
19169 return NDR_ERR_SUCCESS;
19172 _PUBLIC_ void ndr_print_spoolss_PortData2(struct ndr_print *ndr, const char *name, const struct spoolss_PortData2 *r)
19174 ndr_print_struct(ndr, name, "spoolss_PortData2");
19175 ndr->depth++;
19176 ndr_print_string(ndr, "portname", r->portname);
19177 ndr_print_uint32(ndr, "version", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000002:r->version);
19178 ndr_print_spoolss_PortProtocol(ndr, "protocol", r->protocol);
19179 ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?sizeof(r):r->size);
19180 ndr_print_uint32(ndr, "reserved", r->reserved);
19181 ndr_print_string(ndr, "hostaddress", r->hostaddress);
19182 ndr_print_string(ndr, "snmpcommunity", r->snmpcommunity);
19183 ndr_print_uint32(ndr, "dblspool", r->dblspool);
19184 ndr_print_string(ndr, "queue", r->queue);
19185 ndr_print_string(ndr, "device_type", r->device_type);
19186 ndr_print_uint32(ndr, "port_number", r->port_number);
19187 ndr_print_uint32(ndr, "snmp_enabled", r->snmp_enabled);
19188 ndr_print_uint32(ndr, "snmp_dev_index", r->snmp_dev_index);
19189 ndr_print_uint32(ndr, "port_monitor_mib_index", r->port_monitor_mib_index);
19190 ndr->depth--;
19193 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_MonitorUi(struct ndr_push *ndr, int ndr_flags, const struct spoolss_MonitorUi *r)
19195 if (ndr_flags & NDR_SCALARS) {
19196 NDR_CHECK(ndr_push_align(ndr, 4));
19198 uint32_t _flags_save_string = ndr->flags;
19199 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
19200 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->dll_name));
19201 ndr->flags = _flags_save_string;
19204 if (ndr_flags & NDR_BUFFERS) {
19206 return NDR_ERR_SUCCESS;
19209 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_MonitorUi(struct ndr_pull *ndr, int ndr_flags, struct spoolss_MonitorUi *r)
19211 if (ndr_flags & NDR_SCALARS) {
19212 NDR_CHECK(ndr_pull_align(ndr, 4));
19214 uint32_t _flags_save_string = ndr->flags;
19215 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
19216 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->dll_name));
19217 ndr->flags = _flags_save_string;
19220 if (ndr_flags & NDR_BUFFERS) {
19222 return NDR_ERR_SUCCESS;
19225 _PUBLIC_ void ndr_print_spoolss_MonitorUi(struct ndr_print *ndr, const char *name, const struct spoolss_MonitorUi *r)
19227 ndr_print_struct(ndr, name, "spoolss_MonitorUi");
19228 ndr->depth++;
19229 ndr_print_string(ndr, "dll_name", r->dll_name);
19230 ndr->depth--;
19233 static enum ndr_err_code ndr_push_spoolss_AddPrinterDriverExFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
19235 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
19236 return NDR_ERR_SUCCESS;
19239 static enum ndr_err_code ndr_pull_spoolss_AddPrinterDriverExFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
19241 uint32_t v;
19242 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
19243 *r = v;
19244 return NDR_ERR_SUCCESS;
19247 _PUBLIC_ void ndr_print_spoolss_AddPrinterDriverExFlags(struct ndr_print *ndr, const char *name, uint32_t r)
19249 ndr_print_uint32(ndr, name, r);
19250 ndr->depth++;
19251 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_STRICT_UPGRADE", APD_STRICT_UPGRADE, r);
19252 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_STRICT_DOWNGRADE", APD_STRICT_DOWNGRADE, r);
19253 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_ALL_FILES", APD_COPY_ALL_FILES, r);
19254 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_NEW_FILES", APD_COPY_NEW_FILES, r);
19255 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_FROM_DIRECTORY", APD_COPY_FROM_DIRECTORY, r);
19256 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_DONT_COPY_FILES_TO_CLUSTER", APD_DONT_COPY_FILES_TO_CLUSTER, r);
19257 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_COPY_TO_ALL_SPOOLERS", APD_COPY_TO_ALL_SPOOLERS, r);
19258 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "APD_RETURN_BLOCKING_STATUS_CODE", APD_RETURN_BLOCKING_STATUS_CODE, r);
19259 ndr->depth--;
19262 static enum ndr_err_code ndr_push_spoolss_CorePrinterDriver(struct ndr_push *ndr, int ndr_flags, const struct spoolss_CorePrinterDriver *r)
19264 if (ndr_flags & NDR_SCALARS) {
19265 NDR_CHECK(ndr_push_align(ndr, 8));
19266 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->core_driver_guid));
19267 NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, r->driver_date));
19268 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->driver_version));
19269 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->formname, 520, sizeof(uint8_t), CH_UTF8));
19271 if (ndr_flags & NDR_BUFFERS) {
19273 return NDR_ERR_SUCCESS;
19276 static enum ndr_err_code ndr_pull_spoolss_CorePrinterDriver(struct ndr_pull *ndr, int ndr_flags, struct spoolss_CorePrinterDriver *r)
19278 if (ndr_flags & NDR_SCALARS) {
19279 NDR_CHECK(ndr_pull_align(ndr, 8));
19280 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->core_driver_guid));
19281 NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, &r->driver_date));
19282 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->driver_version));
19283 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->formname, 520, sizeof(uint8_t), CH_UTF8));
19285 if (ndr_flags & NDR_BUFFERS) {
19287 return NDR_ERR_SUCCESS;
19290 _PUBLIC_ void ndr_print_spoolss_CorePrinterDriver(struct ndr_print *ndr, const char *name, const struct spoolss_CorePrinterDriver *r)
19292 ndr_print_struct(ndr, name, "spoolss_CorePrinterDriver");
19293 ndr->depth++;
19294 ndr_print_GUID(ndr, "core_driver_guid", &r->core_driver_guid);
19295 ndr_print_NTTIME(ndr, "driver_date", r->driver_date);
19296 ndr_print_hyper(ndr, "driver_version", r->driver_version);
19297 ndr_print_string(ndr, "formname", r->formname);
19298 ndr->depth--;
19301 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinters(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrinters *r)
19303 if (flags & NDR_IN) {
19304 NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, r->in.flags));
19305 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
19306 if (r->in.server) {
19307 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
19308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
19310 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
19313 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
19314 if (r->in.buffer) {
19315 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
19317 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
19319 if (flags & NDR_OUT) {
19320 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
19321 if (r->out.info) {
19322 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
19324 if (r->out.needed == NULL) {
19325 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19327 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
19328 if (r->out.count == NULL) {
19329 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19331 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
19332 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19334 return NDR_ERR_SUCCESS;
19337 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinters(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrinters *r)
19339 uint32_t _ptr_server;
19340 uint32_t _ptr_buffer;
19341 uint32_t _ptr_info;
19342 TALLOC_CTX *_mem_save_server_0;
19343 TALLOC_CTX *_mem_save_buffer_0;
19344 TALLOC_CTX *_mem_save_info_0;
19345 TALLOC_CTX *_mem_save_needed_0;
19346 TALLOC_CTX *_mem_save_count_0;
19347 if (flags & NDR_IN) {
19348 ZERO_STRUCT(r->out);
19350 NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, &r->in.flags));
19351 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
19352 if (_ptr_server) {
19353 NDR_PULL_ALLOC(ndr, r->in.server);
19354 } else {
19355 r->in.server = NULL;
19357 if (r->in.server) {
19358 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
19359 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
19360 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
19361 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
19362 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
19363 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
19365 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
19366 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
19367 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
19369 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
19370 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
19371 if (_ptr_buffer) {
19372 NDR_PULL_ALLOC(ndr, r->in.buffer);
19373 } else {
19374 r->in.buffer = NULL;
19376 if (r->in.buffer) {
19377 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
19378 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
19379 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
19380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
19382 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
19383 NDR_PULL_ALLOC(ndr, r->out.needed);
19384 ZERO_STRUCTP(r->out.needed);
19385 NDR_PULL_ALLOC(ndr, r->out.count);
19386 ZERO_STRUCTP(r->out.count);
19388 if (flags & NDR_OUT) {
19389 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
19390 if (_ptr_info) {
19391 NDR_PULL_ALLOC(ndr, r->out.info);
19392 } else {
19393 r->out.info = NULL;
19395 if (r->out.info) {
19396 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
19397 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
19398 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
19399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
19401 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19402 NDR_PULL_ALLOC(ndr, r->out.needed);
19404 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
19405 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
19406 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
19407 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
19408 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19409 NDR_PULL_ALLOC(ndr, r->out.count);
19411 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
19412 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
19413 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
19414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
19415 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19417 return NDR_ERR_SUCCESS;
19420 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrinters(struct ndr_push *ndr, int flags, const struct __spoolss_EnumPrinters *r)
19422 uint32_t cntr_info_0;
19423 if (flags & NDR_IN) {
19424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
19425 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
19427 if (flags & NDR_OUT) {
19428 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
19429 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
19430 NDR_CHECK(ndr_push_spoolss_PrinterInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
19432 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
19433 NDR_CHECK(ndr_push_spoolss_PrinterInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
19436 return NDR_ERR_SUCCESS;
19439 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrinters(struct ndr_pull *ndr, int flags, struct __spoolss_EnumPrinters *r)
19441 uint32_t cntr_info_0;
19442 TALLOC_CTX *_mem_save_info_0;
19443 if (flags & NDR_IN) {
19444 ZERO_STRUCT(r->out);
19446 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
19447 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
19449 if (flags & NDR_OUT) {
19450 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
19451 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
19452 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
19453 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
19454 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
19455 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
19457 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
19458 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
19460 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
19462 return NDR_ERR_SUCCESS;
19465 _PUBLIC_ void ndr_print_spoolss_EnumPrinters(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrinters *r)
19467 uint32_t cntr_info_2;
19468 ndr_print_struct(ndr, name, "spoolss_EnumPrinters");
19469 ndr->depth++;
19470 if (flags & NDR_SET_VALUES) {
19471 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19473 if (flags & NDR_IN) {
19474 ndr_print_struct(ndr, "in", "spoolss_EnumPrinters");
19475 ndr->depth++;
19476 ndr_print_spoolss_EnumPrinterFlags(ndr, "flags", r->in.flags);
19477 ndr_print_ptr(ndr, "server", r->in.server);
19478 ndr->depth++;
19479 if (r->in.server) {
19480 ndr_print_string(ndr, "server", r->in.server);
19482 ndr->depth--;
19483 ndr_print_uint32(ndr, "level", r->in.level);
19484 ndr_print_ptr(ndr, "buffer", r->in.buffer);
19485 ndr->depth++;
19486 if (r->in.buffer) {
19487 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
19489 ndr->depth--;
19490 ndr_print_uint32(ndr, "offered", r->in.offered);
19491 ndr->depth--;
19493 if (flags & NDR_OUT) {
19494 ndr_print_struct(ndr, "out", "spoolss_EnumPrinters");
19495 ndr->depth++;
19496 ndr_print_ptr(ndr, "count", r->out.count);
19497 ndr->depth++;
19498 ndr_print_uint32(ndr, "count", *r->out.count);
19499 ndr->depth--;
19500 ndr_print_ptr(ndr, "info", r->out.info);
19501 ndr->depth++;
19502 ndr_print_ptr(ndr, "info", *r->out.info);
19503 ndr->depth++;
19504 if (*r->out.info) {
19505 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
19506 ndr->depth++;
19507 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
19508 char *idx_2=NULL;
19509 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
19510 ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
19511 ndr_print_spoolss_PrinterInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
19512 free(idx_2);
19515 ndr->depth--;
19517 ndr->depth--;
19518 ndr->depth--;
19519 ndr_print_ptr(ndr, "needed", r->out.needed);
19520 ndr->depth++;
19521 ndr_print_uint32(ndr, "needed", *r->out.needed);
19522 ndr->depth--;
19523 ndr_print_WERROR(ndr, "result", r->out.result);
19524 ndr->depth--;
19526 ndr->depth--;
19529 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OpenPrinter(struct ndr_push *ndr, int flags, const struct spoolss_OpenPrinter *r)
19531 if (flags & NDR_IN) {
19532 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.printername));
19533 if (r->in.printername) {
19534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
19535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
19537 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.printername, ndr_charset_length(r->in.printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19539 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.datatype));
19540 if (r->in.datatype) {
19541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.datatype, CH_UTF16)));
19542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.datatype, CH_UTF16)));
19544 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.datatype, ndr_charset_length(r->in.datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19546 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr));
19547 NDR_CHECK(ndr_push_spoolss_AccessRights(ndr, NDR_SCALARS, r->in.access_mask));
19549 if (flags & NDR_OUT) {
19550 if (r->out.handle == NULL) {
19551 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19553 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
19554 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19556 return NDR_ERR_SUCCESS;
19559 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OpenPrinter(struct ndr_pull *ndr, int flags, struct spoolss_OpenPrinter *r)
19561 uint32_t _ptr_printername;
19562 uint32_t _ptr_datatype;
19563 TALLOC_CTX *_mem_save_printername_0;
19564 TALLOC_CTX *_mem_save_datatype_0;
19565 TALLOC_CTX *_mem_save_handle_0;
19566 if (flags & NDR_IN) {
19567 ZERO_STRUCT(r->out);
19569 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
19570 if (_ptr_printername) {
19571 NDR_PULL_ALLOC(ndr, r->in.printername);
19572 } else {
19573 r->in.printername = NULL;
19575 if (r->in.printername) {
19576 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
19577 NDR_PULL_SET_MEM_CTX(ndr, r->in.printername, 0);
19578 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.printername));
19579 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.printername));
19580 if (ndr_get_array_length(ndr, &r->in.printername) > ndr_get_array_size(ndr, &r->in.printername)) {
19581 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.printername), ndr_get_array_length(ndr, &r->in.printername));
19583 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.printername), sizeof(uint16_t)));
19584 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.printername, ndr_get_array_length(ndr, &r->in.printername), sizeof(uint16_t), CH_UTF16));
19585 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
19587 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
19588 if (_ptr_datatype) {
19589 NDR_PULL_ALLOC(ndr, r->in.datatype);
19590 } else {
19591 r->in.datatype = NULL;
19593 if (r->in.datatype) {
19594 _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
19595 NDR_PULL_SET_MEM_CTX(ndr, r->in.datatype, 0);
19596 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.datatype));
19597 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.datatype));
19598 if (ndr_get_array_length(ndr, &r->in.datatype) > ndr_get_array_size(ndr, &r->in.datatype)) {
19599 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.datatype), ndr_get_array_length(ndr, &r->in.datatype));
19601 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.datatype), sizeof(uint16_t)));
19602 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.datatype, ndr_get_array_length(ndr, &r->in.datatype), sizeof(uint16_t), CH_UTF16));
19603 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
19605 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr));
19606 NDR_CHECK(ndr_pull_spoolss_AccessRights(ndr, NDR_SCALARS, &r->in.access_mask));
19607 NDR_PULL_ALLOC(ndr, r->out.handle);
19608 ZERO_STRUCTP(r->out.handle);
19610 if (flags & NDR_OUT) {
19611 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19612 NDR_PULL_ALLOC(ndr, r->out.handle);
19614 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
19615 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
19616 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
19617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
19618 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19620 return NDR_ERR_SUCCESS;
19623 _PUBLIC_ void ndr_print_spoolss_OpenPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_OpenPrinter *r)
19625 ndr_print_struct(ndr, name, "spoolss_OpenPrinter");
19626 ndr->depth++;
19627 if (flags & NDR_SET_VALUES) {
19628 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19630 if (flags & NDR_IN) {
19631 ndr_print_struct(ndr, "in", "spoolss_OpenPrinter");
19632 ndr->depth++;
19633 ndr_print_ptr(ndr, "printername", r->in.printername);
19634 ndr->depth++;
19635 if (r->in.printername) {
19636 ndr_print_string(ndr, "printername", r->in.printername);
19638 ndr->depth--;
19639 ndr_print_ptr(ndr, "datatype", r->in.datatype);
19640 ndr->depth++;
19641 if (r->in.datatype) {
19642 ndr_print_string(ndr, "datatype", r->in.datatype);
19644 ndr->depth--;
19645 ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", &r->in.devmode_ctr);
19646 ndr_print_spoolss_AccessRights(ndr, "access_mask", r->in.access_mask);
19647 ndr->depth--;
19649 if (flags & NDR_OUT) {
19650 ndr_print_struct(ndr, "out", "spoolss_OpenPrinter");
19651 ndr->depth++;
19652 ndr_print_ptr(ndr, "handle", r->out.handle);
19653 ndr->depth++;
19654 ndr_print_policy_handle(ndr, "handle", r->out.handle);
19655 ndr->depth--;
19656 ndr_print_WERROR(ndr, "result", r->out.result);
19657 ndr->depth--;
19659 ndr->depth--;
19662 static enum ndr_err_code ndr_push_spoolss_SetJob(struct ndr_push *ndr, int flags, const struct spoolss_SetJob *r)
19664 if (flags & NDR_IN) {
19665 if (r->in.handle == NULL) {
19666 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19668 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
19669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.job_id));
19670 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ctr));
19671 if (r->in.ctr) {
19672 NDR_CHECK(ndr_push_spoolss_JobInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
19674 NDR_CHECK(ndr_push_spoolss_JobControl(ndr, NDR_SCALARS, r->in.command));
19676 if (flags & NDR_OUT) {
19677 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19679 return NDR_ERR_SUCCESS;
19682 static enum ndr_err_code ndr_pull_spoolss_SetJob(struct ndr_pull *ndr, int flags, struct spoolss_SetJob *r)
19684 uint32_t _ptr_ctr;
19685 TALLOC_CTX *_mem_save_handle_0;
19686 TALLOC_CTX *_mem_save_ctr_0;
19687 if (flags & NDR_IN) {
19688 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19689 NDR_PULL_ALLOC(ndr, r->in.handle);
19691 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
19692 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
19693 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
19694 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
19695 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.job_id));
19696 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr));
19697 if (_ptr_ctr) {
19698 NDR_PULL_ALLOC(ndr, r->in.ctr);
19699 } else {
19700 r->in.ctr = NULL;
19702 if (r->in.ctr) {
19703 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
19704 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, 0);
19705 NDR_CHECK(ndr_pull_spoolss_JobInfoContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
19706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, 0);
19708 NDR_CHECK(ndr_pull_spoolss_JobControl(ndr, NDR_SCALARS, &r->in.command));
19710 if (flags & NDR_OUT) {
19711 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19713 return NDR_ERR_SUCCESS;
19716 _PUBLIC_ void ndr_print_spoolss_SetJob(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_SetJob *r)
19718 ndr_print_struct(ndr, name, "spoolss_SetJob");
19719 ndr->depth++;
19720 if (flags & NDR_SET_VALUES) {
19721 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19723 if (flags & NDR_IN) {
19724 ndr_print_struct(ndr, "in", "spoolss_SetJob");
19725 ndr->depth++;
19726 ndr_print_ptr(ndr, "handle", r->in.handle);
19727 ndr->depth++;
19728 ndr_print_policy_handle(ndr, "handle", r->in.handle);
19729 ndr->depth--;
19730 ndr_print_uint32(ndr, "job_id", r->in.job_id);
19731 ndr_print_ptr(ndr, "ctr", r->in.ctr);
19732 ndr->depth++;
19733 if (r->in.ctr) {
19734 ndr_print_spoolss_JobInfoContainer(ndr, "ctr", r->in.ctr);
19736 ndr->depth--;
19737 ndr_print_spoolss_JobControl(ndr, "command", r->in.command);
19738 ndr->depth--;
19740 if (flags & NDR_OUT) {
19741 ndr_print_struct(ndr, "out", "spoolss_SetJob");
19742 ndr->depth++;
19743 ndr_print_WERROR(ndr, "result", r->out.result);
19744 ndr->depth--;
19746 ndr->depth--;
19749 static enum ndr_err_code ndr_push_spoolss_GetJob(struct ndr_push *ndr, int flags, const struct spoolss_GetJob *r)
19751 if (flags & NDR_IN) {
19752 if (r->in.handle == NULL) {
19753 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19755 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
19756 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.job_id));
19757 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
19758 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
19759 if (r->in.buffer) {
19760 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
19762 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
19764 if (flags & NDR_OUT) {
19765 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
19766 if (r->out.info) {
19768 struct ndr_push *_ndr_info;
19769 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
19770 NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
19771 NDR_CHECK(ndr_push_spoolss_JobInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
19772 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
19775 if (r->out.needed == NULL) {
19776 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19778 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
19779 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19781 return NDR_ERR_SUCCESS;
19784 static enum ndr_err_code ndr_pull_spoolss_GetJob(struct ndr_pull *ndr, int flags, struct spoolss_GetJob *r)
19786 uint32_t _ptr_buffer;
19787 uint32_t _ptr_info;
19788 TALLOC_CTX *_mem_save_handle_0;
19789 TALLOC_CTX *_mem_save_buffer_0;
19790 TALLOC_CTX *_mem_save_info_0;
19791 TALLOC_CTX *_mem_save_needed_0;
19792 if (flags & NDR_IN) {
19793 ZERO_STRUCT(r->out);
19795 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19796 NDR_PULL_ALLOC(ndr, r->in.handle);
19798 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
19799 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
19800 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
19801 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
19802 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.job_id));
19803 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
19804 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
19805 if (_ptr_buffer) {
19806 NDR_PULL_ALLOC(ndr, r->in.buffer);
19807 } else {
19808 r->in.buffer = NULL;
19810 if (r->in.buffer) {
19811 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
19812 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
19813 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
19814 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
19816 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
19817 NDR_PULL_ALLOC(ndr, r->out.needed);
19818 ZERO_STRUCTP(r->out.needed);
19820 if (flags & NDR_OUT) {
19821 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
19822 if (_ptr_info) {
19823 NDR_PULL_ALLOC(ndr, r->out.info);
19824 } else {
19825 r->out.info = NULL;
19827 if (r->out.info) {
19828 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
19829 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
19831 struct ndr_pull *_ndr_info;
19832 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
19833 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
19834 NDR_CHECK(ndr_pull_spoolss_JobInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
19835 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
19837 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
19839 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19840 NDR_PULL_ALLOC(ndr, r->out.needed);
19842 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
19843 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
19844 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
19845 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
19846 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19848 return NDR_ERR_SUCCESS;
19851 _PUBLIC_ void ndr_print_spoolss_GetJob(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetJob *r)
19853 ndr_print_struct(ndr, name, "spoolss_GetJob");
19854 ndr->depth++;
19855 if (flags & NDR_SET_VALUES) {
19856 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19858 if (flags & NDR_IN) {
19859 ndr_print_struct(ndr, "in", "spoolss_GetJob");
19860 ndr->depth++;
19861 ndr_print_ptr(ndr, "handle", r->in.handle);
19862 ndr->depth++;
19863 ndr_print_policy_handle(ndr, "handle", r->in.handle);
19864 ndr->depth--;
19865 ndr_print_uint32(ndr, "job_id", r->in.job_id);
19866 ndr_print_uint32(ndr, "level", r->in.level);
19867 ndr_print_ptr(ndr, "buffer", r->in.buffer);
19868 ndr->depth++;
19869 if (r->in.buffer) {
19870 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
19872 ndr->depth--;
19873 ndr_print_uint32(ndr, "offered", r->in.offered);
19874 ndr->depth--;
19876 if (flags & NDR_OUT) {
19877 ndr_print_struct(ndr, "out", "spoolss_GetJob");
19878 ndr->depth++;
19879 ndr_print_ptr(ndr, "info", r->out.info);
19880 ndr->depth++;
19881 if (r->out.info) {
19882 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
19883 ndr_print_spoolss_JobInfo(ndr, "info", r->out.info);
19885 ndr->depth--;
19886 ndr_print_ptr(ndr, "needed", r->out.needed);
19887 ndr->depth++;
19888 ndr_print_uint32(ndr, "needed", *r->out.needed);
19889 ndr->depth--;
19890 ndr_print_WERROR(ndr, "result", r->out.result);
19891 ndr->depth--;
19893 ndr->depth--;
19896 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumJobs(struct ndr_push *ndr, int flags, const struct _spoolss_EnumJobs *r)
19898 if (flags & NDR_IN) {
19899 if (r->in.handle == NULL) {
19900 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19902 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
19903 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.firstjob));
19904 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.numjobs));
19905 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
19906 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
19907 if (r->in.buffer) {
19908 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
19910 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
19912 if (flags & NDR_OUT) {
19913 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
19914 if (r->out.info) {
19915 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
19917 if (r->out.needed == NULL) {
19918 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19920 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
19921 if (r->out.count == NULL) {
19922 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19924 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
19925 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19927 return NDR_ERR_SUCCESS;
19930 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumJobs(struct ndr_pull *ndr, int flags, struct _spoolss_EnumJobs *r)
19932 uint32_t _ptr_buffer;
19933 uint32_t _ptr_info;
19934 TALLOC_CTX *_mem_save_handle_0;
19935 TALLOC_CTX *_mem_save_buffer_0;
19936 TALLOC_CTX *_mem_save_info_0;
19937 TALLOC_CTX *_mem_save_needed_0;
19938 TALLOC_CTX *_mem_save_count_0;
19939 if (flags & NDR_IN) {
19940 ZERO_STRUCT(r->out);
19942 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19943 NDR_PULL_ALLOC(ndr, r->in.handle);
19945 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
19946 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
19947 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
19948 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
19949 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.firstjob));
19950 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.numjobs));
19951 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
19952 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
19953 if (_ptr_buffer) {
19954 NDR_PULL_ALLOC(ndr, r->in.buffer);
19955 } else {
19956 r->in.buffer = NULL;
19958 if (r->in.buffer) {
19959 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
19960 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
19961 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
19962 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
19964 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
19965 NDR_PULL_ALLOC(ndr, r->out.needed);
19966 ZERO_STRUCTP(r->out.needed);
19967 NDR_PULL_ALLOC(ndr, r->out.count);
19968 ZERO_STRUCTP(r->out.count);
19970 if (flags & NDR_OUT) {
19971 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
19972 if (_ptr_info) {
19973 NDR_PULL_ALLOC(ndr, r->out.info);
19974 } else {
19975 r->out.info = NULL;
19977 if (r->out.info) {
19978 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
19979 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
19980 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
19981 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
19983 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19984 NDR_PULL_ALLOC(ndr, r->out.needed);
19986 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
19987 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
19988 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
19989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
19990 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19991 NDR_PULL_ALLOC(ndr, r->out.count);
19993 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
19994 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
19995 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
19996 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
19997 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19999 return NDR_ERR_SUCCESS;
20002 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumJobs(struct ndr_push *ndr, int flags, const struct __spoolss_EnumJobs *r)
20004 uint32_t cntr_info_0;
20005 if (flags & NDR_IN) {
20006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
20007 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
20009 if (flags & NDR_OUT) {
20010 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
20011 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
20012 NDR_CHECK(ndr_push_spoolss_JobInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
20014 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
20015 NDR_CHECK(ndr_push_spoolss_JobInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
20018 return NDR_ERR_SUCCESS;
20021 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumJobs(struct ndr_pull *ndr, int flags, struct __spoolss_EnumJobs *r)
20023 uint32_t cntr_info_0;
20024 TALLOC_CTX *_mem_save_info_0;
20025 if (flags & NDR_IN) {
20026 ZERO_STRUCT(r->out);
20028 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
20029 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
20031 if (flags & NDR_OUT) {
20032 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
20033 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
20034 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
20035 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
20036 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
20037 NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
20039 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
20040 NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
20042 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
20044 return NDR_ERR_SUCCESS;
20047 _PUBLIC_ void ndr_print_spoolss_EnumJobs(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumJobs *r)
20049 uint32_t cntr_info_2;
20050 ndr_print_struct(ndr, name, "spoolss_EnumJobs");
20051 ndr->depth++;
20052 if (flags & NDR_SET_VALUES) {
20053 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20055 if (flags & NDR_IN) {
20056 ndr_print_struct(ndr, "in", "spoolss_EnumJobs");
20057 ndr->depth++;
20058 ndr_print_ptr(ndr, "handle", r->in.handle);
20059 ndr->depth++;
20060 ndr_print_policy_handle(ndr, "handle", r->in.handle);
20061 ndr->depth--;
20062 ndr_print_uint32(ndr, "firstjob", r->in.firstjob);
20063 ndr_print_uint32(ndr, "numjobs", r->in.numjobs);
20064 ndr_print_uint32(ndr, "level", r->in.level);
20065 ndr_print_ptr(ndr, "buffer", r->in.buffer);
20066 ndr->depth++;
20067 if (r->in.buffer) {
20068 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
20070 ndr->depth--;
20071 ndr_print_uint32(ndr, "offered", r->in.offered);
20072 ndr->depth--;
20074 if (flags & NDR_OUT) {
20075 ndr_print_struct(ndr, "out", "spoolss_EnumJobs");
20076 ndr->depth++;
20077 ndr_print_ptr(ndr, "count", r->out.count);
20078 ndr->depth++;
20079 ndr_print_uint32(ndr, "count", *r->out.count);
20080 ndr->depth--;
20081 ndr_print_ptr(ndr, "info", r->out.info);
20082 ndr->depth++;
20083 ndr_print_ptr(ndr, "info", *r->out.info);
20084 ndr->depth++;
20085 if (*r->out.info) {
20086 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
20087 ndr->depth++;
20088 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
20089 char *idx_2=NULL;
20090 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
20091 ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
20092 ndr_print_spoolss_JobInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
20093 free(idx_2);
20096 ndr->depth--;
20098 ndr->depth--;
20099 ndr->depth--;
20100 ndr_print_ptr(ndr, "needed", r->out.needed);
20101 ndr->depth++;
20102 ndr_print_uint32(ndr, "needed", *r->out.needed);
20103 ndr->depth--;
20104 ndr_print_WERROR(ndr, "result", r->out.result);
20105 ndr->depth--;
20107 ndr->depth--;
20110 static enum ndr_err_code ndr_push_spoolss_AddPrinter(struct ndr_push *ndr, int flags, const struct spoolss_AddPrinter *r)
20112 if (flags & NDR_IN) {
20113 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
20114 if (r->in.server) {
20115 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
20116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
20117 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
20118 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20120 if (r->in.info_ctr == NULL) {
20121 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20123 NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
20124 if (r->in.devmode_ctr == NULL) {
20125 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20127 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
20128 if (r->in.secdesc_ctr == NULL) {
20129 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20131 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
20133 if (flags & NDR_OUT) {
20134 if (r->out.handle == NULL) {
20135 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20137 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
20138 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20140 return NDR_ERR_SUCCESS;
20143 static enum ndr_err_code ndr_pull_spoolss_AddPrinter(struct ndr_pull *ndr, int flags, struct spoolss_AddPrinter *r)
20145 uint32_t _ptr_server;
20146 TALLOC_CTX *_mem_save_server_0;
20147 TALLOC_CTX *_mem_save_info_ctr_0;
20148 TALLOC_CTX *_mem_save_devmode_ctr_0;
20149 TALLOC_CTX *_mem_save_secdesc_ctr_0;
20150 TALLOC_CTX *_mem_save_handle_0;
20151 if (flags & NDR_IN) {
20152 ZERO_STRUCT(r->out);
20154 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
20155 if (_ptr_server) {
20156 NDR_PULL_ALLOC(ndr, r->in.server);
20157 } else {
20158 r->in.server = NULL;
20160 if (r->in.server) {
20161 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
20162 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
20163 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
20164 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
20165 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
20166 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
20168 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
20169 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
20170 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
20172 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20173 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
20175 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
20176 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
20177 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
20178 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
20179 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20180 NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
20182 _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
20183 NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
20184 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
20185 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
20186 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20187 NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
20189 _mem_save_secdesc_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
20190 NDR_PULL_SET_MEM_CTX(ndr, r->in.secdesc_ctr, LIBNDR_FLAG_REF_ALLOC);
20191 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
20192 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_ctr_0, LIBNDR_FLAG_REF_ALLOC);
20193 NDR_PULL_ALLOC(ndr, r->out.handle);
20194 ZERO_STRUCTP(r->out.handle);
20196 if (flags & NDR_OUT) {
20197 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20198 NDR_PULL_ALLOC(ndr, r->out.handle);
20200 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
20201 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
20202 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
20203 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
20204 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20206 return NDR_ERR_SUCCESS;
20209 _PUBLIC_ void ndr_print_spoolss_AddPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPrinter *r)
20211 ndr_print_struct(ndr, name, "spoolss_AddPrinter");
20212 ndr->depth++;
20213 if (flags & NDR_SET_VALUES) {
20214 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20216 if (flags & NDR_IN) {
20217 ndr_print_struct(ndr, "in", "spoolss_AddPrinter");
20218 ndr->depth++;
20219 ndr_print_ptr(ndr, "server", r->in.server);
20220 ndr->depth++;
20221 if (r->in.server) {
20222 ndr_print_string(ndr, "server", r->in.server);
20224 ndr->depth--;
20225 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
20226 ndr->depth++;
20227 ndr_print_spoolss_SetPrinterInfoCtr(ndr, "info_ctr", r->in.info_ctr);
20228 ndr->depth--;
20229 ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
20230 ndr->depth++;
20231 ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
20232 ndr->depth--;
20233 ndr_print_ptr(ndr, "secdesc_ctr", r->in.secdesc_ctr);
20234 ndr->depth++;
20235 ndr_print_sec_desc_buf(ndr, "secdesc_ctr", r->in.secdesc_ctr);
20236 ndr->depth--;
20237 ndr->depth--;
20239 if (flags & NDR_OUT) {
20240 ndr_print_struct(ndr, "out", "spoolss_AddPrinter");
20241 ndr->depth++;
20242 ndr_print_ptr(ndr, "handle", r->out.handle);
20243 ndr->depth++;
20244 ndr_print_policy_handle(ndr, "handle", r->out.handle);
20245 ndr->depth--;
20246 ndr_print_WERROR(ndr, "result", r->out.result);
20247 ndr->depth--;
20249 ndr->depth--;
20252 static enum ndr_err_code ndr_push_spoolss_DeletePrinter(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinter *r)
20254 if (flags & NDR_IN) {
20255 if (r->in.handle == NULL) {
20256 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20258 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
20260 if (flags & NDR_OUT) {
20261 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20263 return NDR_ERR_SUCCESS;
20266 static enum ndr_err_code ndr_pull_spoolss_DeletePrinter(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinter *r)
20268 TALLOC_CTX *_mem_save_handle_0;
20269 if (flags & NDR_IN) {
20270 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20271 NDR_PULL_ALLOC(ndr, r->in.handle);
20273 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
20274 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
20275 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
20276 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
20278 if (flags & NDR_OUT) {
20279 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20281 return NDR_ERR_SUCCESS;
20284 _PUBLIC_ void ndr_print_spoolss_DeletePrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrinter *r)
20286 ndr_print_struct(ndr, name, "spoolss_DeletePrinter");
20287 ndr->depth++;
20288 if (flags & NDR_SET_VALUES) {
20289 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20291 if (flags & NDR_IN) {
20292 ndr_print_struct(ndr, "in", "spoolss_DeletePrinter");
20293 ndr->depth++;
20294 ndr_print_ptr(ndr, "handle", r->in.handle);
20295 ndr->depth++;
20296 ndr_print_policy_handle(ndr, "handle", r->in.handle);
20297 ndr->depth--;
20298 ndr->depth--;
20300 if (flags & NDR_OUT) {
20301 ndr_print_struct(ndr, "out", "spoolss_DeletePrinter");
20302 ndr->depth++;
20303 ndr_print_WERROR(ndr, "result", r->out.result);
20304 ndr->depth--;
20306 ndr->depth--;
20309 static enum ndr_err_code ndr_push_spoolss_SetPrinter(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinter *r)
20311 if (flags & NDR_IN) {
20312 if (r->in.handle == NULL) {
20313 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20315 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
20316 if (r->in.info_ctr == NULL) {
20317 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20319 NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
20320 if (r->in.devmode_ctr == NULL) {
20321 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20323 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
20324 if (r->in.secdesc_ctr == NULL) {
20325 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20327 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
20328 NDR_CHECK(ndr_push_spoolss_PrinterControl(ndr, NDR_SCALARS, r->in.command));
20330 if (flags & NDR_OUT) {
20331 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20333 return NDR_ERR_SUCCESS;
20336 static enum ndr_err_code ndr_pull_spoolss_SetPrinter(struct ndr_pull *ndr, int flags, struct spoolss_SetPrinter *r)
20338 TALLOC_CTX *_mem_save_handle_0;
20339 TALLOC_CTX *_mem_save_info_ctr_0;
20340 TALLOC_CTX *_mem_save_devmode_ctr_0;
20341 TALLOC_CTX *_mem_save_secdesc_ctr_0;
20342 if (flags & NDR_IN) {
20343 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20344 NDR_PULL_ALLOC(ndr, r->in.handle);
20346 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
20347 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
20348 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
20349 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
20350 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20351 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
20353 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
20354 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
20355 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
20356 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
20357 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20358 NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
20360 _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
20361 NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
20362 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
20363 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
20364 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20365 NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
20367 _mem_save_secdesc_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
20368 NDR_PULL_SET_MEM_CTX(ndr, r->in.secdesc_ctr, LIBNDR_FLAG_REF_ALLOC);
20369 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
20370 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_ctr_0, LIBNDR_FLAG_REF_ALLOC);
20371 NDR_CHECK(ndr_pull_spoolss_PrinterControl(ndr, NDR_SCALARS, &r->in.command));
20373 if (flags & NDR_OUT) {
20374 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20376 return NDR_ERR_SUCCESS;
20379 _PUBLIC_ void ndr_print_spoolss_SetPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_SetPrinter *r)
20381 ndr_print_struct(ndr, name, "spoolss_SetPrinter");
20382 ndr->depth++;
20383 if (flags & NDR_SET_VALUES) {
20384 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20386 if (flags & NDR_IN) {
20387 ndr_print_struct(ndr, "in", "spoolss_SetPrinter");
20388 ndr->depth++;
20389 ndr_print_ptr(ndr, "handle", r->in.handle);
20390 ndr->depth++;
20391 ndr_print_policy_handle(ndr, "handle", r->in.handle);
20392 ndr->depth--;
20393 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
20394 ndr->depth++;
20395 ndr_print_spoolss_SetPrinterInfoCtr(ndr, "info_ctr", r->in.info_ctr);
20396 ndr->depth--;
20397 ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
20398 ndr->depth++;
20399 ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
20400 ndr->depth--;
20401 ndr_print_ptr(ndr, "secdesc_ctr", r->in.secdesc_ctr);
20402 ndr->depth++;
20403 ndr_print_sec_desc_buf(ndr, "secdesc_ctr", r->in.secdesc_ctr);
20404 ndr->depth--;
20405 ndr_print_spoolss_PrinterControl(ndr, "command", r->in.command);
20406 ndr->depth--;
20408 if (flags & NDR_OUT) {
20409 ndr_print_struct(ndr, "out", "spoolss_SetPrinter");
20410 ndr->depth++;
20411 ndr_print_WERROR(ndr, "result", r->out.result);
20412 ndr->depth--;
20414 ndr->depth--;
20417 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_GetPrinter(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinter *r)
20419 if (flags & NDR_IN) {
20420 if (r->in.handle == NULL) {
20421 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20423 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
20424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
20425 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
20426 if (r->in.buffer) {
20427 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
20429 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
20431 if (flags & NDR_OUT) {
20432 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
20433 if (r->out.info) {
20435 struct ndr_push *_ndr_info;
20436 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
20437 NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
20438 NDR_CHECK(ndr_push_spoolss_PrinterInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
20439 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
20442 if (r->out.needed == NULL) {
20443 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20445 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
20446 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20448 return NDR_ERR_SUCCESS;
20451 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_GetPrinter(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinter *r)
20453 uint32_t _ptr_buffer;
20454 uint32_t _ptr_info;
20455 TALLOC_CTX *_mem_save_handle_0;
20456 TALLOC_CTX *_mem_save_buffer_0;
20457 TALLOC_CTX *_mem_save_info_0;
20458 TALLOC_CTX *_mem_save_needed_0;
20459 if (flags & NDR_IN) {
20460 ZERO_STRUCT(r->out);
20462 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20463 NDR_PULL_ALLOC(ndr, r->in.handle);
20465 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
20466 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
20467 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
20468 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
20469 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
20470 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
20471 if (_ptr_buffer) {
20472 NDR_PULL_ALLOC(ndr, r->in.buffer);
20473 } else {
20474 r->in.buffer = NULL;
20476 if (r->in.buffer) {
20477 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
20478 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
20479 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
20480 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
20482 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
20483 NDR_PULL_ALLOC(ndr, r->out.needed);
20484 ZERO_STRUCTP(r->out.needed);
20486 if (flags & NDR_OUT) {
20487 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
20488 if (_ptr_info) {
20489 NDR_PULL_ALLOC(ndr, r->out.info);
20490 } else {
20491 r->out.info = NULL;
20493 if (r->out.info) {
20494 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
20495 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
20497 struct ndr_pull *_ndr_info;
20498 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
20499 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
20500 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
20501 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
20503 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
20505 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20506 NDR_PULL_ALLOC(ndr, r->out.needed);
20508 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
20509 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
20510 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
20511 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
20512 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20514 return NDR_ERR_SUCCESS;
20517 _PUBLIC_ void ndr_print_spoolss_GetPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinter *r)
20519 ndr_print_struct(ndr, name, "spoolss_GetPrinter");
20520 ndr->depth++;
20521 if (flags & NDR_SET_VALUES) {
20522 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20524 if (flags & NDR_IN) {
20525 ndr_print_struct(ndr, "in", "spoolss_GetPrinter");
20526 ndr->depth++;
20527 ndr_print_ptr(ndr, "handle", r->in.handle);
20528 ndr->depth++;
20529 ndr_print_policy_handle(ndr, "handle", r->in.handle);
20530 ndr->depth--;
20531 ndr_print_uint32(ndr, "level", r->in.level);
20532 ndr_print_ptr(ndr, "buffer", r->in.buffer);
20533 ndr->depth++;
20534 if (r->in.buffer) {
20535 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
20537 ndr->depth--;
20538 ndr_print_uint32(ndr, "offered", r->in.offered);
20539 ndr->depth--;
20541 if (flags & NDR_OUT) {
20542 ndr_print_struct(ndr, "out", "spoolss_GetPrinter");
20543 ndr->depth++;
20544 ndr_print_ptr(ndr, "info", r->out.info);
20545 ndr->depth++;
20546 if (r->out.info) {
20547 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
20548 ndr_print_spoolss_PrinterInfo(ndr, "info", r->out.info);
20550 ndr->depth--;
20551 ndr_print_ptr(ndr, "needed", r->out.needed);
20552 ndr->depth++;
20553 ndr_print_uint32(ndr, "needed", *r->out.needed);
20554 ndr->depth--;
20555 ndr_print_WERROR(ndr, "result", r->out.result);
20556 ndr->depth--;
20558 ndr->depth--;
20561 static enum ndr_err_code ndr_push_spoolss_AddPrinterDriver(struct ndr_push *ndr, int flags, const struct spoolss_AddPrinterDriver *r)
20563 if (flags & NDR_IN) {
20564 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
20565 if (r->in.servername) {
20566 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
20567 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
20568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
20569 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20571 if (r->in.info_ctr == NULL) {
20572 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20574 NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
20576 if (flags & NDR_OUT) {
20577 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20579 return NDR_ERR_SUCCESS;
20582 static enum ndr_err_code ndr_pull_spoolss_AddPrinterDriver(struct ndr_pull *ndr, int flags, struct spoolss_AddPrinterDriver *r)
20584 uint32_t _ptr_servername;
20585 TALLOC_CTX *_mem_save_servername_0;
20586 TALLOC_CTX *_mem_save_info_ctr_0;
20587 if (flags & NDR_IN) {
20588 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
20589 if (_ptr_servername) {
20590 NDR_PULL_ALLOC(ndr, r->in.servername);
20591 } else {
20592 r->in.servername = NULL;
20594 if (r->in.servername) {
20595 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
20596 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
20597 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
20598 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
20599 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
20600 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
20602 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
20603 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
20604 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
20606 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20607 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
20609 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
20610 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
20611 NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
20612 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
20614 if (flags & NDR_OUT) {
20615 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20617 return NDR_ERR_SUCCESS;
20620 _PUBLIC_ void ndr_print_spoolss_AddPrinterDriver(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPrinterDriver *r)
20622 ndr_print_struct(ndr, name, "spoolss_AddPrinterDriver");
20623 ndr->depth++;
20624 if (flags & NDR_SET_VALUES) {
20625 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20627 if (flags & NDR_IN) {
20628 ndr_print_struct(ndr, "in", "spoolss_AddPrinterDriver");
20629 ndr->depth++;
20630 ndr_print_ptr(ndr, "servername", r->in.servername);
20631 ndr->depth++;
20632 if (r->in.servername) {
20633 ndr_print_string(ndr, "servername", r->in.servername);
20635 ndr->depth--;
20636 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
20637 ndr->depth++;
20638 ndr_print_spoolss_AddDriverInfoCtr(ndr, "info_ctr", r->in.info_ctr);
20639 ndr->depth--;
20640 ndr->depth--;
20642 if (flags & NDR_OUT) {
20643 ndr_print_struct(ndr, "out", "spoolss_AddPrinterDriver");
20644 ndr->depth++;
20645 ndr_print_WERROR(ndr, "result", r->out.result);
20646 ndr->depth--;
20648 ndr->depth--;
20651 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinterDrivers(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrinterDrivers *r)
20653 if (flags & NDR_IN) {
20654 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
20655 if (r->in.server) {
20656 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
20657 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
20658 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
20659 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20661 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
20662 if (r->in.environment) {
20663 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
20664 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
20665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
20666 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
20669 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
20670 if (r->in.buffer) {
20671 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
20673 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
20675 if (flags & NDR_OUT) {
20676 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
20677 if (r->out.info) {
20678 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
20680 if (r->out.needed == NULL) {
20681 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20683 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
20684 if (r->out.count == NULL) {
20685 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
20688 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20690 return NDR_ERR_SUCCESS;
20693 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrinterDrivers *r)
20695 uint32_t _ptr_server;
20696 uint32_t _ptr_environment;
20697 uint32_t _ptr_buffer;
20698 uint32_t _ptr_info;
20699 TALLOC_CTX *_mem_save_server_0;
20700 TALLOC_CTX *_mem_save_environment_0;
20701 TALLOC_CTX *_mem_save_buffer_0;
20702 TALLOC_CTX *_mem_save_info_0;
20703 TALLOC_CTX *_mem_save_needed_0;
20704 TALLOC_CTX *_mem_save_count_0;
20705 if (flags & NDR_IN) {
20706 ZERO_STRUCT(r->out);
20708 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
20709 if (_ptr_server) {
20710 NDR_PULL_ALLOC(ndr, r->in.server);
20711 } else {
20712 r->in.server = NULL;
20714 if (r->in.server) {
20715 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
20716 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
20717 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
20718 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
20719 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
20720 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
20722 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
20723 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
20724 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
20726 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
20727 if (_ptr_environment) {
20728 NDR_PULL_ALLOC(ndr, r->in.environment);
20729 } else {
20730 r->in.environment = NULL;
20732 if (r->in.environment) {
20733 _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
20734 NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
20735 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
20736 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
20737 if (ndr_get_array_length(ndr, &r->in.environment) > ndr_get_array_size(ndr, &r->in.environment)) {
20738 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.environment), ndr_get_array_length(ndr, &r->in.environment));
20740 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t)));
20741 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t), CH_UTF16));
20742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
20744 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
20745 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
20746 if (_ptr_buffer) {
20747 NDR_PULL_ALLOC(ndr, r->in.buffer);
20748 } else {
20749 r->in.buffer = NULL;
20751 if (r->in.buffer) {
20752 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
20753 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
20754 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
20755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
20757 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
20758 NDR_PULL_ALLOC(ndr, r->out.needed);
20759 ZERO_STRUCTP(r->out.needed);
20760 NDR_PULL_ALLOC(ndr, r->out.count);
20761 ZERO_STRUCTP(r->out.count);
20763 if (flags & NDR_OUT) {
20764 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
20765 if (_ptr_info) {
20766 NDR_PULL_ALLOC(ndr, r->out.info);
20767 } else {
20768 r->out.info = NULL;
20770 if (r->out.info) {
20771 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
20772 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
20773 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
20774 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
20776 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20777 NDR_PULL_ALLOC(ndr, r->out.needed);
20779 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
20780 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
20781 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
20782 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
20783 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20784 NDR_PULL_ALLOC(ndr, r->out.count);
20786 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
20787 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
20788 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
20789 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
20790 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20792 return NDR_ERR_SUCCESS;
20795 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrinterDrivers(struct ndr_push *ndr, int flags, const struct __spoolss_EnumPrinterDrivers *r)
20797 uint32_t cntr_info_0;
20798 if (flags & NDR_IN) {
20799 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
20800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
20802 if (flags & NDR_OUT) {
20803 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
20804 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
20805 NDR_CHECK(ndr_push_spoolss_DriverInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
20807 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
20808 NDR_CHECK(ndr_push_spoolss_DriverInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
20811 return NDR_ERR_SUCCESS;
20814 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int flags, struct __spoolss_EnumPrinterDrivers *r)
20816 uint32_t cntr_info_0;
20817 TALLOC_CTX *_mem_save_info_0;
20818 if (flags & NDR_IN) {
20819 ZERO_STRUCT(r->out);
20821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
20822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
20824 if (flags & NDR_OUT) {
20825 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
20826 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
20827 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
20828 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
20829 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
20830 NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
20832 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
20833 NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
20835 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
20837 return NDR_ERR_SUCCESS;
20840 _PUBLIC_ void ndr_print_spoolss_EnumPrinterDrivers(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrinterDrivers *r)
20842 uint32_t cntr_info_2;
20843 ndr_print_struct(ndr, name, "spoolss_EnumPrinterDrivers");
20844 ndr->depth++;
20845 if (flags & NDR_SET_VALUES) {
20846 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20848 if (flags & NDR_IN) {
20849 ndr_print_struct(ndr, "in", "spoolss_EnumPrinterDrivers");
20850 ndr->depth++;
20851 ndr_print_ptr(ndr, "server", r->in.server);
20852 ndr->depth++;
20853 if (r->in.server) {
20854 ndr_print_string(ndr, "server", r->in.server);
20856 ndr->depth--;
20857 ndr_print_ptr(ndr, "environment", r->in.environment);
20858 ndr->depth++;
20859 if (r->in.environment) {
20860 ndr_print_string(ndr, "environment", r->in.environment);
20862 ndr->depth--;
20863 ndr_print_uint32(ndr, "level", r->in.level);
20864 ndr_print_ptr(ndr, "buffer", r->in.buffer);
20865 ndr->depth++;
20866 if (r->in.buffer) {
20867 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
20869 ndr->depth--;
20870 ndr_print_uint32(ndr, "offered", r->in.offered);
20871 ndr->depth--;
20873 if (flags & NDR_OUT) {
20874 ndr_print_struct(ndr, "out", "spoolss_EnumPrinterDrivers");
20875 ndr->depth++;
20876 ndr_print_ptr(ndr, "count", r->out.count);
20877 ndr->depth++;
20878 ndr_print_uint32(ndr, "count", *r->out.count);
20879 ndr->depth--;
20880 ndr_print_ptr(ndr, "info", r->out.info);
20881 ndr->depth++;
20882 ndr_print_ptr(ndr, "info", *r->out.info);
20883 ndr->depth++;
20884 if (*r->out.info) {
20885 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
20886 ndr->depth++;
20887 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
20888 char *idx_2=NULL;
20889 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
20890 ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
20891 ndr_print_spoolss_DriverInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
20892 free(idx_2);
20895 ndr->depth--;
20897 ndr->depth--;
20898 ndr->depth--;
20899 ndr_print_ptr(ndr, "needed", r->out.needed);
20900 ndr->depth++;
20901 ndr_print_uint32(ndr, "needed", *r->out.needed);
20902 ndr->depth--;
20903 ndr_print_WERROR(ndr, "result", r->out.result);
20904 ndr->depth--;
20906 ndr->depth--;
20909 static enum ndr_err_code ndr_push_spoolss_GetPrinterDriver(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDriver *r)
20911 if (flags & NDR_IN) {
20912 if (r->in.handle == NULL) {
20913 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20915 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
20916 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.architecture));
20917 if (r->in.architecture) {
20918 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
20919 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
20920 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
20921 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
20923 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
20924 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
20925 if (r->in.buffer) {
20926 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
20928 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
20930 if (flags & NDR_OUT) {
20931 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
20932 if (r->out.info) {
20934 struct ndr_push *_ndr_info;
20935 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
20936 NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
20937 NDR_CHECK(ndr_push_spoolss_DriverInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
20938 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
20941 if (r->out.needed == NULL) {
20942 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
20944 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
20945 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20947 return NDR_ERR_SUCCESS;
20950 static enum ndr_err_code ndr_pull_spoolss_GetPrinterDriver(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDriver *r)
20952 uint32_t _ptr_architecture;
20953 uint32_t _ptr_buffer;
20954 uint32_t _ptr_info;
20955 TALLOC_CTX *_mem_save_handle_0;
20956 TALLOC_CTX *_mem_save_architecture_0;
20957 TALLOC_CTX *_mem_save_buffer_0;
20958 TALLOC_CTX *_mem_save_info_0;
20959 TALLOC_CTX *_mem_save_needed_0;
20960 if (flags & NDR_IN) {
20961 ZERO_STRUCT(r->out);
20963 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
20964 NDR_PULL_ALLOC(ndr, r->in.handle);
20966 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
20967 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
20968 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
20969 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
20970 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
20971 if (_ptr_architecture) {
20972 NDR_PULL_ALLOC(ndr, r->in.architecture);
20973 } else {
20974 r->in.architecture = NULL;
20976 if (r->in.architecture) {
20977 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
20978 NDR_PULL_SET_MEM_CTX(ndr, r->in.architecture, 0);
20979 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
20980 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
20981 if (ndr_get_array_length(ndr, &r->in.architecture) > ndr_get_array_size(ndr, &r->in.architecture)) {
20982 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.architecture), ndr_get_array_length(ndr, &r->in.architecture));
20984 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t)));
20985 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t), CH_UTF16));
20986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
20988 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
20989 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
20990 if (_ptr_buffer) {
20991 NDR_PULL_ALLOC(ndr, r->in.buffer);
20992 } else {
20993 r->in.buffer = NULL;
20995 if (r->in.buffer) {
20996 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
20997 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
20998 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
20999 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
21001 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
21002 NDR_PULL_ALLOC(ndr, r->out.needed);
21003 ZERO_STRUCTP(r->out.needed);
21005 if (flags & NDR_OUT) {
21006 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
21007 if (_ptr_info) {
21008 NDR_PULL_ALLOC(ndr, r->out.info);
21009 } else {
21010 r->out.info = NULL;
21012 if (r->out.info) {
21013 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
21014 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
21016 struct ndr_pull *_ndr_info;
21017 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
21018 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
21019 NDR_CHECK(ndr_pull_spoolss_DriverInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
21020 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
21022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
21024 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
21025 NDR_PULL_ALLOC(ndr, r->out.needed);
21027 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
21028 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
21029 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
21030 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
21031 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
21033 return NDR_ERR_SUCCESS;
21036 _PUBLIC_ void ndr_print_spoolss_GetPrinterDriver(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterDriver *r)
21038 ndr_print_struct(ndr, name, "spoolss_GetPrinterDriver");
21039 ndr->depth++;
21040 if (flags & NDR_SET_VALUES) {
21041 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
21043 if (flags & NDR_IN) {
21044 ndr_print_struct(ndr, "in", "spoolss_GetPrinterDriver");
21045 ndr->depth++;
21046 ndr_print_ptr(ndr, "handle", r->in.handle);
21047 ndr->depth++;
21048 ndr_print_policy_handle(ndr, "handle", r->in.handle);
21049 ndr->depth--;
21050 ndr_print_ptr(ndr, "architecture", r->in.architecture);
21051 ndr->depth++;
21052 if (r->in.architecture) {
21053 ndr_print_string(ndr, "architecture", r->in.architecture);
21055 ndr->depth--;
21056 ndr_print_uint32(ndr, "level", r->in.level);
21057 ndr_print_ptr(ndr, "buffer", r->in.buffer);
21058 ndr->depth++;
21059 if (r->in.buffer) {
21060 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
21062 ndr->depth--;
21063 ndr_print_uint32(ndr, "offered", r->in.offered);
21064 ndr->depth--;
21066 if (flags & NDR_OUT) {
21067 ndr_print_struct(ndr, "out", "spoolss_GetPrinterDriver");
21068 ndr->depth++;
21069 ndr_print_ptr(ndr, "info", r->out.info);
21070 ndr->depth++;
21071 if (r->out.info) {
21072 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
21073 ndr_print_spoolss_DriverInfo(ndr, "info", r->out.info);
21075 ndr->depth--;
21076 ndr_print_ptr(ndr, "needed", r->out.needed);
21077 ndr->depth++;
21078 ndr_print_uint32(ndr, "needed", *r->out.needed);
21079 ndr->depth--;
21080 ndr_print_WERROR(ndr, "result", r->out.result);
21081 ndr->depth--;
21083 ndr->depth--;
21086 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_GetPrinterDriverDirectory(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDriverDirectory *r)
21088 if (flags & NDR_IN) {
21089 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
21090 if (r->in.server) {
21091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
21092 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21093 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
21094 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21096 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
21097 if (r->in.environment) {
21098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
21099 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21100 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
21101 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21103 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
21104 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
21105 if (r->in.buffer) {
21106 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
21108 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
21110 if (flags & NDR_OUT) {
21111 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
21112 if (r->out.info) {
21114 struct ndr_push *_ndr_info;
21115 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
21116 NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
21117 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo(_ndr_info, NDR_SCALARS, r->out.info));
21118 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
21121 if (r->out.needed == NULL) {
21122 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
21124 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
21125 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
21127 return NDR_ERR_SUCCESS;
21130 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_GetPrinterDriverDirectory(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDriverDirectory *r)
21132 uint32_t _ptr_server;
21133 uint32_t _ptr_environment;
21134 uint32_t _ptr_buffer;
21135 uint32_t _ptr_info;
21136 TALLOC_CTX *_mem_save_server_0;
21137 TALLOC_CTX *_mem_save_environment_0;
21138 TALLOC_CTX *_mem_save_buffer_0;
21139 TALLOC_CTX *_mem_save_info_0;
21140 TALLOC_CTX *_mem_save_needed_0;
21141 if (flags & NDR_IN) {
21142 ZERO_STRUCT(r->out);
21144 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
21145 if (_ptr_server) {
21146 NDR_PULL_ALLOC(ndr, r->in.server);
21147 } else {
21148 r->in.server = NULL;
21150 if (r->in.server) {
21151 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
21152 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
21153 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
21154 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
21155 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
21156 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
21158 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
21159 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
21160 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
21162 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
21163 if (_ptr_environment) {
21164 NDR_PULL_ALLOC(ndr, r->in.environment);
21165 } else {
21166 r->in.environment = NULL;
21168 if (r->in.environment) {
21169 _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
21170 NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
21171 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
21172 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
21173 if (ndr_get_array_length(ndr, &r->in.environment) > ndr_get_array_size(ndr, &r->in.environment)) {
21174 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.environment), ndr_get_array_length(ndr, &r->in.environment));
21176 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t)));
21177 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t), CH_UTF16));
21178 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
21180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
21181 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
21182 if (_ptr_buffer) {
21183 NDR_PULL_ALLOC(ndr, r->in.buffer);
21184 } else {
21185 r->in.buffer = NULL;
21187 if (r->in.buffer) {
21188 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
21189 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
21190 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
21191 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
21193 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
21194 NDR_PULL_ALLOC(ndr, r->out.needed);
21195 ZERO_STRUCTP(r->out.needed);
21197 if (flags & NDR_OUT) {
21198 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
21199 if (_ptr_info) {
21200 NDR_PULL_ALLOC(ndr, r->out.info);
21201 } else {
21202 r->out.info = NULL;
21204 if (r->out.info) {
21205 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
21206 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
21208 struct ndr_pull *_ndr_info;
21209 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
21210 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
21211 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo(_ndr_info, NDR_SCALARS, r->out.info));
21212 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
21214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
21216 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
21217 NDR_PULL_ALLOC(ndr, r->out.needed);
21219 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
21220 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
21221 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
21222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
21223 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
21225 return NDR_ERR_SUCCESS;
21228 _PUBLIC_ void ndr_print_spoolss_GetPrinterDriverDirectory(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterDriverDirectory *r)
21230 ndr_print_struct(ndr, name, "spoolss_GetPrinterDriverDirectory");
21231 ndr->depth++;
21232 if (flags & NDR_SET_VALUES) {
21233 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
21235 if (flags & NDR_IN) {
21236 ndr_print_struct(ndr, "in", "spoolss_GetPrinterDriverDirectory");
21237 ndr->depth++;
21238 ndr_print_ptr(ndr, "server", r->in.server);
21239 ndr->depth++;
21240 if (r->in.server) {
21241 ndr_print_string(ndr, "server", r->in.server);
21243 ndr->depth--;
21244 ndr_print_ptr(ndr, "environment", r->in.environment);
21245 ndr->depth++;
21246 if (r->in.environment) {
21247 ndr_print_string(ndr, "environment", r->in.environment);
21249 ndr->depth--;
21250 ndr_print_uint32(ndr, "level", r->in.level);
21251 ndr_print_ptr(ndr, "buffer", r->in.buffer);
21252 ndr->depth++;
21253 if (r->in.buffer) {
21254 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
21256 ndr->depth--;
21257 ndr_print_uint32(ndr, "offered", r->in.offered);
21258 ndr->depth--;
21260 if (flags & NDR_OUT) {
21261 ndr_print_struct(ndr, "out", "spoolss_GetPrinterDriverDirectory");
21262 ndr->depth++;
21263 ndr_print_ptr(ndr, "info", r->out.info);
21264 ndr->depth++;
21265 if (r->out.info) {
21266 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
21267 ndr_print_spoolss_DriverDirectoryInfo(ndr, "info", r->out.info);
21269 ndr->depth--;
21270 ndr_print_ptr(ndr, "needed", r->out.needed);
21271 ndr->depth++;
21272 ndr_print_uint32(ndr, "needed", *r->out.needed);
21273 ndr->depth--;
21274 ndr_print_WERROR(ndr, "result", r->out.result);
21275 ndr->depth--;
21277 ndr->depth--;
21280 static enum ndr_err_code ndr_push_spoolss_DeletePrinterDriver(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterDriver *r)
21282 if (flags & NDR_IN) {
21283 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
21284 if (r->in.server) {
21285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
21286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
21288 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
21291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
21293 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.driver, CH_UTF16)));
21295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.driver, CH_UTF16)));
21297 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.driver, ndr_charset_length(r->in.driver, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21299 if (flags & NDR_OUT) {
21300 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
21302 return NDR_ERR_SUCCESS;
21305 static enum ndr_err_code ndr_pull_spoolss_DeletePrinterDriver(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterDriver *r)
21307 uint32_t _ptr_server;
21308 TALLOC_CTX *_mem_save_server_0;
21309 if (flags & NDR_IN) {
21310 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
21311 if (_ptr_server) {
21312 NDR_PULL_ALLOC(ndr, r->in.server);
21313 } else {
21314 r->in.server = NULL;
21316 if (r->in.server) {
21317 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
21318 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
21319 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
21320 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
21321 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
21322 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
21324 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
21325 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
21326 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
21328 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
21329 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
21330 if (ndr_get_array_length(ndr, &r->in.architecture) > ndr_get_array_size(ndr, &r->in.architecture)) {
21331 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.architecture), ndr_get_array_length(ndr, &r->in.architecture));
21333 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t)));
21334 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t), CH_UTF16));
21335 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.driver));
21336 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.driver));
21337 if (ndr_get_array_length(ndr, &r->in.driver) > ndr_get_array_size(ndr, &r->in.driver)) {
21338 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.driver), ndr_get_array_length(ndr, &r->in.driver));
21340 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.driver), sizeof(uint16_t)));
21341 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.driver, ndr_get_array_length(ndr, &r->in.driver), sizeof(uint16_t), CH_UTF16));
21343 if (flags & NDR_OUT) {
21344 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
21346 return NDR_ERR_SUCCESS;
21349 _PUBLIC_ void ndr_print_spoolss_DeletePrinterDriver(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrinterDriver *r)
21351 ndr_print_struct(ndr, name, "spoolss_DeletePrinterDriver");
21352 ndr->depth++;
21353 if (flags & NDR_SET_VALUES) {
21354 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
21356 if (flags & NDR_IN) {
21357 ndr_print_struct(ndr, "in", "spoolss_DeletePrinterDriver");
21358 ndr->depth++;
21359 ndr_print_ptr(ndr, "server", r->in.server);
21360 ndr->depth++;
21361 if (r->in.server) {
21362 ndr_print_string(ndr, "server", r->in.server);
21364 ndr->depth--;
21365 ndr_print_string(ndr, "architecture", r->in.architecture);
21366 ndr_print_string(ndr, "driver", r->in.driver);
21367 ndr->depth--;
21369 if (flags & NDR_OUT) {
21370 ndr_print_struct(ndr, "out", "spoolss_DeletePrinterDriver");
21371 ndr->depth++;
21372 ndr_print_WERROR(ndr, "result", r->out.result);
21373 ndr->depth--;
21375 ndr->depth--;
21378 static enum ndr_err_code ndr_push_spoolss_AddPrintProcessor(struct ndr_push *ndr, int flags, const struct spoolss_AddPrintProcessor *r)
21380 if (flags & NDR_IN) {
21381 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
21382 if (r->in.server) {
21383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
21384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
21386 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
21389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
21391 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path_name, CH_UTF16)));
21393 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path_name, CH_UTF16)));
21395 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path_name, ndr_charset_length(r->in.path_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21396 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
21397 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
21399 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.print_processor_name, ndr_charset_length(r->in.print_processor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21401 if (flags & NDR_OUT) {
21402 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
21404 return NDR_ERR_SUCCESS;
21407 static enum ndr_err_code ndr_pull_spoolss_AddPrintProcessor(struct ndr_pull *ndr, int flags, struct spoolss_AddPrintProcessor *r)
21409 uint32_t _ptr_server;
21410 TALLOC_CTX *_mem_save_server_0;
21411 if (flags & NDR_IN) {
21412 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
21413 if (_ptr_server) {
21414 NDR_PULL_ALLOC(ndr, r->in.server);
21415 } else {
21416 r->in.server = NULL;
21418 if (r->in.server) {
21419 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
21420 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
21421 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
21422 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
21423 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
21424 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
21426 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
21427 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
21428 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
21430 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
21431 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
21432 if (ndr_get_array_length(ndr, &r->in.architecture) > ndr_get_array_size(ndr, &r->in.architecture)) {
21433 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.architecture), ndr_get_array_length(ndr, &r->in.architecture));
21435 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t)));
21436 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t), CH_UTF16));
21437 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path_name));
21438 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path_name));
21439 if (ndr_get_array_length(ndr, &r->in.path_name) > ndr_get_array_size(ndr, &r->in.path_name)) {
21440 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path_name), ndr_get_array_length(ndr, &r->in.path_name));
21442 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path_name), sizeof(uint16_t)));
21443 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path_name, ndr_get_array_length(ndr, &r->in.path_name), sizeof(uint16_t), CH_UTF16));
21444 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.print_processor_name));
21445 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.print_processor_name));
21446 if (ndr_get_array_length(ndr, &r->in.print_processor_name) > ndr_get_array_size(ndr, &r->in.print_processor_name)) {
21447 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.print_processor_name), ndr_get_array_length(ndr, &r->in.print_processor_name));
21449 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.print_processor_name), sizeof(uint16_t)));
21450 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.print_processor_name, ndr_get_array_length(ndr, &r->in.print_processor_name), sizeof(uint16_t), CH_UTF16));
21452 if (flags & NDR_OUT) {
21453 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
21455 return NDR_ERR_SUCCESS;
21458 _PUBLIC_ void ndr_print_spoolss_AddPrintProcessor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPrintProcessor *r)
21460 ndr_print_struct(ndr, name, "spoolss_AddPrintProcessor");
21461 ndr->depth++;
21462 if (flags & NDR_SET_VALUES) {
21463 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
21465 if (flags & NDR_IN) {
21466 ndr_print_struct(ndr, "in", "spoolss_AddPrintProcessor");
21467 ndr->depth++;
21468 ndr_print_ptr(ndr, "server", r->in.server);
21469 ndr->depth++;
21470 if (r->in.server) {
21471 ndr_print_string(ndr, "server", r->in.server);
21473 ndr->depth--;
21474 ndr_print_string(ndr, "architecture", r->in.architecture);
21475 ndr_print_string(ndr, "path_name", r->in.path_name);
21476 ndr_print_string(ndr, "print_processor_name", r->in.print_processor_name);
21477 ndr->depth--;
21479 if (flags & NDR_OUT) {
21480 ndr_print_struct(ndr, "out", "spoolss_AddPrintProcessor");
21481 ndr->depth++;
21482 ndr_print_WERROR(ndr, "result", r->out.result);
21483 ndr->depth--;
21485 ndr->depth--;
21488 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrintProcessors(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrintProcessors *r)
21490 if (flags & NDR_IN) {
21491 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
21492 if (r->in.servername) {
21493 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
21494 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
21496 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21498 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
21499 if (r->in.environment) {
21500 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
21501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
21503 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
21506 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
21507 if (r->in.buffer) {
21508 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
21510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
21512 if (flags & NDR_OUT) {
21513 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
21514 if (r->out.info) {
21515 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
21517 if (r->out.needed == NULL) {
21518 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
21520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
21521 if (r->out.count == NULL) {
21522 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
21524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
21525 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
21527 return NDR_ERR_SUCCESS;
21530 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrintProcessors *r)
21532 uint32_t _ptr_servername;
21533 uint32_t _ptr_environment;
21534 uint32_t _ptr_buffer;
21535 uint32_t _ptr_info;
21536 TALLOC_CTX *_mem_save_servername_0;
21537 TALLOC_CTX *_mem_save_environment_0;
21538 TALLOC_CTX *_mem_save_buffer_0;
21539 TALLOC_CTX *_mem_save_info_0;
21540 TALLOC_CTX *_mem_save_needed_0;
21541 TALLOC_CTX *_mem_save_count_0;
21542 if (flags & NDR_IN) {
21543 ZERO_STRUCT(r->out);
21545 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
21546 if (_ptr_servername) {
21547 NDR_PULL_ALLOC(ndr, r->in.servername);
21548 } else {
21549 r->in.servername = NULL;
21551 if (r->in.servername) {
21552 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
21553 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
21554 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
21555 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
21556 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
21557 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
21559 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
21560 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
21561 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
21563 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
21564 if (_ptr_environment) {
21565 NDR_PULL_ALLOC(ndr, r->in.environment);
21566 } else {
21567 r->in.environment = NULL;
21569 if (r->in.environment) {
21570 _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
21571 NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
21572 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
21573 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
21574 if (ndr_get_array_length(ndr, &r->in.environment) > ndr_get_array_size(ndr, &r->in.environment)) {
21575 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.environment), ndr_get_array_length(ndr, &r->in.environment));
21577 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t)));
21578 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t), CH_UTF16));
21579 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
21581 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
21582 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
21583 if (_ptr_buffer) {
21584 NDR_PULL_ALLOC(ndr, r->in.buffer);
21585 } else {
21586 r->in.buffer = NULL;
21588 if (r->in.buffer) {
21589 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
21590 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
21591 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
21592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
21594 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
21595 NDR_PULL_ALLOC(ndr, r->out.needed);
21596 ZERO_STRUCTP(r->out.needed);
21597 NDR_PULL_ALLOC(ndr, r->out.count);
21598 ZERO_STRUCTP(r->out.count);
21600 if (flags & NDR_OUT) {
21601 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
21602 if (_ptr_info) {
21603 NDR_PULL_ALLOC(ndr, r->out.info);
21604 } else {
21605 r->out.info = NULL;
21607 if (r->out.info) {
21608 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
21609 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
21610 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
21611 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
21613 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
21614 NDR_PULL_ALLOC(ndr, r->out.needed);
21616 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
21617 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
21618 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
21619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
21620 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
21621 NDR_PULL_ALLOC(ndr, r->out.count);
21623 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
21624 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
21625 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
21626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
21627 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
21629 return NDR_ERR_SUCCESS;
21632 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrintProcessors(struct ndr_push *ndr, int flags, const struct __spoolss_EnumPrintProcessors *r)
21634 uint32_t cntr_info_0;
21635 if (flags & NDR_IN) {
21636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
21637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
21639 if (flags & NDR_OUT) {
21640 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
21641 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
21642 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
21644 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
21645 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
21648 return NDR_ERR_SUCCESS;
21651 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int flags, struct __spoolss_EnumPrintProcessors *r)
21653 uint32_t cntr_info_0;
21654 TALLOC_CTX *_mem_save_info_0;
21655 if (flags & NDR_IN) {
21656 ZERO_STRUCT(r->out);
21658 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
21659 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
21661 if (flags & NDR_OUT) {
21662 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
21663 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
21664 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
21665 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
21666 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
21667 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
21669 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
21670 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
21672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
21674 return NDR_ERR_SUCCESS;
21677 _PUBLIC_ void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrintProcessors *r)
21679 uint32_t cntr_info_2;
21680 ndr_print_struct(ndr, name, "spoolss_EnumPrintProcessors");
21681 ndr->depth++;
21682 if (flags & NDR_SET_VALUES) {
21683 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
21685 if (flags & NDR_IN) {
21686 ndr_print_struct(ndr, "in", "spoolss_EnumPrintProcessors");
21687 ndr->depth++;
21688 ndr_print_ptr(ndr, "servername", r->in.servername);
21689 ndr->depth++;
21690 if (r->in.servername) {
21691 ndr_print_string(ndr, "servername", r->in.servername);
21693 ndr->depth--;
21694 ndr_print_ptr(ndr, "environment", r->in.environment);
21695 ndr->depth++;
21696 if (r->in.environment) {
21697 ndr_print_string(ndr, "environment", r->in.environment);
21699 ndr->depth--;
21700 ndr_print_uint32(ndr, "level", r->in.level);
21701 ndr_print_ptr(ndr, "buffer", r->in.buffer);
21702 ndr->depth++;
21703 if (r->in.buffer) {
21704 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
21706 ndr->depth--;
21707 ndr_print_uint32(ndr, "offered", r->in.offered);
21708 ndr->depth--;
21710 if (flags & NDR_OUT) {
21711 ndr_print_struct(ndr, "out", "spoolss_EnumPrintProcessors");
21712 ndr->depth++;
21713 ndr_print_ptr(ndr, "count", r->out.count);
21714 ndr->depth++;
21715 ndr_print_uint32(ndr, "count", *r->out.count);
21716 ndr->depth--;
21717 ndr_print_ptr(ndr, "info", r->out.info);
21718 ndr->depth++;
21719 ndr_print_ptr(ndr, "info", *r->out.info);
21720 ndr->depth++;
21721 if (*r->out.info) {
21722 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
21723 ndr->depth++;
21724 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
21725 char *idx_2=NULL;
21726 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
21727 ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
21728 ndr_print_spoolss_PrintProcessorInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
21729 free(idx_2);
21732 ndr->depth--;
21734 ndr->depth--;
21735 ndr->depth--;
21736 ndr_print_ptr(ndr, "needed", r->out.needed);
21737 ndr->depth++;
21738 ndr_print_uint32(ndr, "needed", *r->out.needed);
21739 ndr->depth--;
21740 ndr_print_WERROR(ndr, "result", r->out.result);
21741 ndr->depth--;
21743 ndr->depth--;
21746 static enum ndr_err_code ndr_push_spoolss_GetPrintProcessorDirectory(struct ndr_push *ndr, int flags, const struct spoolss_GetPrintProcessorDirectory *r)
21748 if (flags & NDR_IN) {
21749 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
21750 if (r->in.server) {
21751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
21752 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21753 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
21754 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21756 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.environment));
21757 if (r->in.environment) {
21758 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
21759 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
21760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.environment, CH_UTF16)));
21761 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.environment, ndr_charset_length(r->in.environment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
21763 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
21764 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
21765 if (r->in.buffer) {
21766 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
21768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
21770 if (flags & NDR_OUT) {
21771 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
21772 if (r->out.info) {
21774 struct ndr_push *_ndr_info;
21775 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
21776 NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
21777 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo(_ndr_info, NDR_SCALARS, r->out.info));
21778 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
21781 if (r->out.needed == NULL) {
21782 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
21784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
21785 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
21787 return NDR_ERR_SUCCESS;
21790 static enum ndr_err_code ndr_pull_spoolss_GetPrintProcessorDirectory(struct ndr_pull *ndr, int flags, struct spoolss_GetPrintProcessorDirectory *r)
21792 uint32_t _ptr_server;
21793 uint32_t _ptr_environment;
21794 uint32_t _ptr_buffer;
21795 uint32_t _ptr_info;
21796 TALLOC_CTX *_mem_save_server_0;
21797 TALLOC_CTX *_mem_save_environment_0;
21798 TALLOC_CTX *_mem_save_buffer_0;
21799 TALLOC_CTX *_mem_save_info_0;
21800 TALLOC_CTX *_mem_save_needed_0;
21801 if (flags & NDR_IN) {
21802 ZERO_STRUCT(r->out);
21804 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
21805 if (_ptr_server) {
21806 NDR_PULL_ALLOC(ndr, r->in.server);
21807 } else {
21808 r->in.server = NULL;
21810 if (r->in.server) {
21811 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
21812 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
21813 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
21814 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
21815 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
21816 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
21818 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
21819 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
21820 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
21822 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_environment));
21823 if (_ptr_environment) {
21824 NDR_PULL_ALLOC(ndr, r->in.environment);
21825 } else {
21826 r->in.environment = NULL;
21828 if (r->in.environment) {
21829 _mem_save_environment_0 = NDR_PULL_GET_MEM_CTX(ndr);
21830 NDR_PULL_SET_MEM_CTX(ndr, r->in.environment, 0);
21831 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.environment));
21832 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.environment));
21833 if (ndr_get_array_length(ndr, &r->in.environment) > ndr_get_array_size(ndr, &r->in.environment)) {
21834 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.environment), ndr_get_array_length(ndr, &r->in.environment));
21836 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t)));
21837 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.environment, ndr_get_array_length(ndr, &r->in.environment), sizeof(uint16_t), CH_UTF16));
21838 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_environment_0, 0);
21840 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
21841 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
21842 if (_ptr_buffer) {
21843 NDR_PULL_ALLOC(ndr, r->in.buffer);
21844 } else {
21845 r->in.buffer = NULL;
21847 if (r->in.buffer) {
21848 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
21849 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
21850 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
21851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
21853 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
21854 NDR_PULL_ALLOC(ndr, r->out.needed);
21855 ZERO_STRUCTP(r->out.needed);
21857 if (flags & NDR_OUT) {
21858 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
21859 if (_ptr_info) {
21860 NDR_PULL_ALLOC(ndr, r->out.info);
21861 } else {
21862 r->out.info = NULL;
21864 if (r->out.info) {
21865 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
21866 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
21868 struct ndr_pull *_ndr_info;
21869 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
21870 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
21871 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo(_ndr_info, NDR_SCALARS, r->out.info));
21872 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
21874 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
21876 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
21877 NDR_PULL_ALLOC(ndr, r->out.needed);
21879 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
21880 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
21881 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
21882 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
21883 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
21885 return NDR_ERR_SUCCESS;
21888 _PUBLIC_ void ndr_print_spoolss_GetPrintProcessorDirectory(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrintProcessorDirectory *r)
21890 ndr_print_struct(ndr, name, "spoolss_GetPrintProcessorDirectory");
21891 ndr->depth++;
21892 if (flags & NDR_SET_VALUES) {
21893 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
21895 if (flags & NDR_IN) {
21896 ndr_print_struct(ndr, "in", "spoolss_GetPrintProcessorDirectory");
21897 ndr->depth++;
21898 ndr_print_ptr(ndr, "server", r->in.server);
21899 ndr->depth++;
21900 if (r->in.server) {
21901 ndr_print_string(ndr, "server", r->in.server);
21903 ndr->depth--;
21904 ndr_print_ptr(ndr, "environment", r->in.environment);
21905 ndr->depth++;
21906 if (r->in.environment) {
21907 ndr_print_string(ndr, "environment", r->in.environment);
21909 ndr->depth--;
21910 ndr_print_uint32(ndr, "level", r->in.level);
21911 ndr_print_ptr(ndr, "buffer", r->in.buffer);
21912 ndr->depth++;
21913 if (r->in.buffer) {
21914 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
21916 ndr->depth--;
21917 ndr_print_uint32(ndr, "offered", r->in.offered);
21918 ndr->depth--;
21920 if (flags & NDR_OUT) {
21921 ndr_print_struct(ndr, "out", "spoolss_GetPrintProcessorDirectory");
21922 ndr->depth++;
21923 ndr_print_ptr(ndr, "info", r->out.info);
21924 ndr->depth++;
21925 if (r->out.info) {
21926 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
21927 ndr_print_spoolss_PrintProcessorDirectoryInfo(ndr, "info", r->out.info);
21929 ndr->depth--;
21930 ndr_print_ptr(ndr, "needed", r->out.needed);
21931 ndr->depth++;
21932 ndr_print_uint32(ndr, "needed", *r->out.needed);
21933 ndr->depth--;
21934 ndr_print_WERROR(ndr, "result", r->out.result);
21935 ndr->depth--;
21937 ndr->depth--;
21940 static enum ndr_err_code ndr_push_spoolss_StartDocPrinter(struct ndr_push *ndr, int flags, const struct spoolss_StartDocPrinter *r)
21942 if (flags & NDR_IN) {
21943 if (r->in.handle == NULL) {
21944 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
21946 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
21947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
21948 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
21949 NDR_CHECK(ndr_push_spoolss_DocumentInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
21951 if (flags & NDR_OUT) {
21952 if (r->out.job_id == NULL) {
21953 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
21955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.job_id));
21956 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
21958 return NDR_ERR_SUCCESS;
21961 static enum ndr_err_code ndr_pull_spoolss_StartDocPrinter(struct ndr_pull *ndr, int flags, struct spoolss_StartDocPrinter *r)
21963 TALLOC_CTX *_mem_save_handle_0;
21964 TALLOC_CTX *_mem_save_job_id_0;
21965 if (flags & NDR_IN) {
21966 ZERO_STRUCT(r->out);
21968 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
21969 NDR_PULL_ALLOC(ndr, r->in.handle);
21971 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
21972 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
21973 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
21974 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
21975 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
21976 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
21977 NDR_CHECK(ndr_pull_spoolss_DocumentInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
21978 NDR_PULL_ALLOC(ndr, r->out.job_id);
21979 ZERO_STRUCTP(r->out.job_id);
21981 if (flags & NDR_OUT) {
21982 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
21983 NDR_PULL_ALLOC(ndr, r->out.job_id);
21985 _mem_save_job_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
21986 NDR_PULL_SET_MEM_CTX(ndr, r->out.job_id, LIBNDR_FLAG_REF_ALLOC);
21987 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.job_id));
21988 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_job_id_0, LIBNDR_FLAG_REF_ALLOC);
21989 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
21991 return NDR_ERR_SUCCESS;
21994 _PUBLIC_ void ndr_print_spoolss_StartDocPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_StartDocPrinter *r)
21996 ndr_print_struct(ndr, name, "spoolss_StartDocPrinter");
21997 ndr->depth++;
21998 if (flags & NDR_SET_VALUES) {
21999 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22001 if (flags & NDR_IN) {
22002 ndr_print_struct(ndr, "in", "spoolss_StartDocPrinter");
22003 ndr->depth++;
22004 ndr_print_ptr(ndr, "handle", r->in.handle);
22005 ndr->depth++;
22006 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22007 ndr->depth--;
22008 ndr_print_uint32(ndr, "level", r->in.level);
22009 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
22010 ndr_print_spoolss_DocumentInfo(ndr, "info", &r->in.info);
22011 ndr->depth--;
22013 if (flags & NDR_OUT) {
22014 ndr_print_struct(ndr, "out", "spoolss_StartDocPrinter");
22015 ndr->depth++;
22016 ndr_print_ptr(ndr, "job_id", r->out.job_id);
22017 ndr->depth++;
22018 ndr_print_uint32(ndr, "job_id", *r->out.job_id);
22019 ndr->depth--;
22020 ndr_print_WERROR(ndr, "result", r->out.result);
22021 ndr->depth--;
22023 ndr->depth--;
22026 static enum ndr_err_code ndr_push_spoolss_StartPagePrinter(struct ndr_push *ndr, int flags, const struct spoolss_StartPagePrinter *r)
22028 if (flags & NDR_IN) {
22029 if (r->in.handle == NULL) {
22030 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22032 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22034 if (flags & NDR_OUT) {
22035 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22037 return NDR_ERR_SUCCESS;
22040 static enum ndr_err_code ndr_pull_spoolss_StartPagePrinter(struct ndr_pull *ndr, int flags, struct spoolss_StartPagePrinter *r)
22042 TALLOC_CTX *_mem_save_handle_0;
22043 if (flags & NDR_IN) {
22044 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22045 NDR_PULL_ALLOC(ndr, r->in.handle);
22047 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22048 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22049 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22050 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22052 if (flags & NDR_OUT) {
22053 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22055 return NDR_ERR_SUCCESS;
22058 _PUBLIC_ void ndr_print_spoolss_StartPagePrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_StartPagePrinter *r)
22060 ndr_print_struct(ndr, name, "spoolss_StartPagePrinter");
22061 ndr->depth++;
22062 if (flags & NDR_SET_VALUES) {
22063 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22065 if (flags & NDR_IN) {
22066 ndr_print_struct(ndr, "in", "spoolss_StartPagePrinter");
22067 ndr->depth++;
22068 ndr_print_ptr(ndr, "handle", r->in.handle);
22069 ndr->depth++;
22070 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22071 ndr->depth--;
22072 ndr->depth--;
22074 if (flags & NDR_OUT) {
22075 ndr_print_struct(ndr, "out", "spoolss_StartPagePrinter");
22076 ndr->depth++;
22077 ndr_print_WERROR(ndr, "result", r->out.result);
22078 ndr->depth--;
22080 ndr->depth--;
22083 static enum ndr_err_code ndr_push_spoolss_WritePrinter(struct ndr_push *ndr, int flags, const struct spoolss_WritePrinter *r)
22085 if (flags & NDR_IN) {
22086 if (r->in.handle == NULL) {
22087 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22089 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22090 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->in.data));
22091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data.length));
22093 if (flags & NDR_OUT) {
22094 if (r->out.num_written == NULL) {
22095 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22097 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_written));
22098 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22100 return NDR_ERR_SUCCESS;
22103 static enum ndr_err_code ndr_pull_spoolss_WritePrinter(struct ndr_pull *ndr, int flags, struct spoolss_WritePrinter *r)
22105 TALLOC_CTX *_mem_save_handle_0;
22106 TALLOC_CTX *_mem_save_num_written_0;
22107 if (flags & NDR_IN) {
22108 ZERO_STRUCT(r->out);
22110 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22111 NDR_PULL_ALLOC(ndr, r->in.handle);
22113 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22114 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22115 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22116 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22117 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->in.data));
22118 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in._data_size));
22119 NDR_PULL_ALLOC(ndr, r->out.num_written);
22120 ZERO_STRUCTP(r->out.num_written);
22122 if (flags & NDR_OUT) {
22123 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22124 NDR_PULL_ALLOC(ndr, r->out.num_written);
22126 _mem_save_num_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
22127 NDR_PULL_SET_MEM_CTX(ndr, r->out.num_written, LIBNDR_FLAG_REF_ALLOC);
22128 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_written));
22129 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_written_0, LIBNDR_FLAG_REF_ALLOC);
22130 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22132 return NDR_ERR_SUCCESS;
22135 _PUBLIC_ void ndr_print_spoolss_WritePrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_WritePrinter *r)
22137 ndr_print_struct(ndr, name, "spoolss_WritePrinter");
22138 ndr->depth++;
22139 if (flags & NDR_SET_VALUES) {
22140 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22142 if (flags & NDR_IN) {
22143 ndr_print_struct(ndr, "in", "spoolss_WritePrinter");
22144 ndr->depth++;
22145 ndr_print_ptr(ndr, "handle", r->in.handle);
22146 ndr->depth++;
22147 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22148 ndr->depth--;
22149 ndr_print_DATA_BLOB(ndr, "data", r->in.data);
22150 ndr_print_uint32(ndr, "_data_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->in.data.length:r->in._data_size);
22151 ndr->depth--;
22153 if (flags & NDR_OUT) {
22154 ndr_print_struct(ndr, "out", "spoolss_WritePrinter");
22155 ndr->depth++;
22156 ndr_print_ptr(ndr, "num_written", r->out.num_written);
22157 ndr->depth++;
22158 ndr_print_uint32(ndr, "num_written", *r->out.num_written);
22159 ndr->depth--;
22160 ndr_print_WERROR(ndr, "result", r->out.result);
22161 ndr->depth--;
22163 ndr->depth--;
22166 static enum ndr_err_code ndr_push_spoolss_EndPagePrinter(struct ndr_push *ndr, int flags, const struct spoolss_EndPagePrinter *r)
22168 if (flags & NDR_IN) {
22169 if (r->in.handle == NULL) {
22170 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22172 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22174 if (flags & NDR_OUT) {
22175 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22177 return NDR_ERR_SUCCESS;
22180 static enum ndr_err_code ndr_pull_spoolss_EndPagePrinter(struct ndr_pull *ndr, int flags, struct spoolss_EndPagePrinter *r)
22182 TALLOC_CTX *_mem_save_handle_0;
22183 if (flags & NDR_IN) {
22184 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22185 NDR_PULL_ALLOC(ndr, r->in.handle);
22187 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22188 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22189 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22190 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22192 if (flags & NDR_OUT) {
22193 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22195 return NDR_ERR_SUCCESS;
22198 _PUBLIC_ void ndr_print_spoolss_EndPagePrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EndPagePrinter *r)
22200 ndr_print_struct(ndr, name, "spoolss_EndPagePrinter");
22201 ndr->depth++;
22202 if (flags & NDR_SET_VALUES) {
22203 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22205 if (flags & NDR_IN) {
22206 ndr_print_struct(ndr, "in", "spoolss_EndPagePrinter");
22207 ndr->depth++;
22208 ndr_print_ptr(ndr, "handle", r->in.handle);
22209 ndr->depth++;
22210 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22211 ndr->depth--;
22212 ndr->depth--;
22214 if (flags & NDR_OUT) {
22215 ndr_print_struct(ndr, "out", "spoolss_EndPagePrinter");
22216 ndr->depth++;
22217 ndr_print_WERROR(ndr, "result", r->out.result);
22218 ndr->depth--;
22220 ndr->depth--;
22223 static enum ndr_err_code ndr_push_spoolss_AbortPrinter(struct ndr_push *ndr, int flags, const struct spoolss_AbortPrinter *r)
22225 if (flags & NDR_IN) {
22226 if (r->in.handle == NULL) {
22227 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22229 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22231 if (flags & NDR_OUT) {
22232 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22234 return NDR_ERR_SUCCESS;
22237 static enum ndr_err_code ndr_pull_spoolss_AbortPrinter(struct ndr_pull *ndr, int flags, struct spoolss_AbortPrinter *r)
22239 TALLOC_CTX *_mem_save_handle_0;
22240 if (flags & NDR_IN) {
22241 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22242 NDR_PULL_ALLOC(ndr, r->in.handle);
22244 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22245 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22246 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22247 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22249 if (flags & NDR_OUT) {
22250 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22252 return NDR_ERR_SUCCESS;
22255 _PUBLIC_ void ndr_print_spoolss_AbortPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AbortPrinter *r)
22257 ndr_print_struct(ndr, name, "spoolss_AbortPrinter");
22258 ndr->depth++;
22259 if (flags & NDR_SET_VALUES) {
22260 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22262 if (flags & NDR_IN) {
22263 ndr_print_struct(ndr, "in", "spoolss_AbortPrinter");
22264 ndr->depth++;
22265 ndr_print_ptr(ndr, "handle", r->in.handle);
22266 ndr->depth++;
22267 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22268 ndr->depth--;
22269 ndr->depth--;
22271 if (flags & NDR_OUT) {
22272 ndr_print_struct(ndr, "out", "spoolss_AbortPrinter");
22273 ndr->depth++;
22274 ndr_print_WERROR(ndr, "result", r->out.result);
22275 ndr->depth--;
22277 ndr->depth--;
22280 static enum ndr_err_code ndr_push_spoolss_ReadPrinter(struct ndr_push *ndr, int flags, const struct spoolss_ReadPrinter *r)
22282 if (flags & NDR_IN) {
22283 if (r->in.handle == NULL) {
22284 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22286 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
22289 if (flags & NDR_OUT) {
22290 if (r->out.data == NULL) {
22291 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
22294 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.data_size));
22295 if (r->out._data_size == NULL) {
22296 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22298 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out._data_size));
22299 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22301 return NDR_ERR_SUCCESS;
22304 static enum ndr_err_code ndr_pull_spoolss_ReadPrinter(struct ndr_pull *ndr, int flags, struct spoolss_ReadPrinter *r)
22306 TALLOC_CTX *_mem_save_handle_0;
22307 TALLOC_CTX *_mem_save__data_size_0;
22308 if (flags & NDR_IN) {
22309 ZERO_STRUCT(r->out);
22311 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22312 NDR_PULL_ALLOC(ndr, r->in.handle);
22314 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22315 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22316 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22317 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22318 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
22319 NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.data_size);
22320 memset(r->out.data, 0, (r->in.data_size) * sizeof(*r->out.data));
22321 NDR_PULL_ALLOC(ndr, r->out._data_size);
22322 ZERO_STRUCTP(r->out._data_size);
22324 if (flags & NDR_OUT) {
22325 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
22326 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22327 NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data));
22329 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_size(ndr, &r->out.data)));
22330 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22331 NDR_PULL_ALLOC(ndr, r->out._data_size);
22333 _mem_save__data_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
22334 NDR_PULL_SET_MEM_CTX(ndr, r->out._data_size, LIBNDR_FLAG_REF_ALLOC);
22335 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out._data_size));
22336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save__data_size_0, LIBNDR_FLAG_REF_ALLOC);
22337 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22338 if (r->out.data) {
22339 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.data_size));
22342 return NDR_ERR_SUCCESS;
22345 _PUBLIC_ void ndr_print_spoolss_ReadPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ReadPrinter *r)
22347 ndr_print_struct(ndr, name, "spoolss_ReadPrinter");
22348 ndr->depth++;
22349 if (flags & NDR_SET_VALUES) {
22350 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22352 if (flags & NDR_IN) {
22353 ndr_print_struct(ndr, "in", "spoolss_ReadPrinter");
22354 ndr->depth++;
22355 ndr_print_ptr(ndr, "handle", r->in.handle);
22356 ndr->depth++;
22357 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22358 ndr->depth--;
22359 ndr_print_uint32(ndr, "data_size", r->in.data_size);
22360 ndr->depth--;
22362 if (flags & NDR_OUT) {
22363 ndr_print_struct(ndr, "out", "spoolss_ReadPrinter");
22364 ndr->depth++;
22365 ndr_print_ptr(ndr, "data", r->out.data);
22366 ndr->depth++;
22367 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.data_size);
22368 ndr->depth--;
22369 ndr_print_ptr(ndr, "_data_size", r->out._data_size);
22370 ndr->depth++;
22371 ndr_print_uint32(ndr, "_data_size", *r->out._data_size);
22372 ndr->depth--;
22373 ndr_print_WERROR(ndr, "result", r->out.result);
22374 ndr->depth--;
22376 ndr->depth--;
22379 static enum ndr_err_code ndr_push_spoolss_EndDocPrinter(struct ndr_push *ndr, int flags, const struct spoolss_EndDocPrinter *r)
22381 if (flags & NDR_IN) {
22382 if (r->in.handle == NULL) {
22383 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22385 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22387 if (flags & NDR_OUT) {
22388 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22390 return NDR_ERR_SUCCESS;
22393 static enum ndr_err_code ndr_pull_spoolss_EndDocPrinter(struct ndr_pull *ndr, int flags, struct spoolss_EndDocPrinter *r)
22395 TALLOC_CTX *_mem_save_handle_0;
22396 if (flags & NDR_IN) {
22397 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22398 NDR_PULL_ALLOC(ndr, r->in.handle);
22400 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22401 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22402 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22403 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22405 if (flags & NDR_OUT) {
22406 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22408 return NDR_ERR_SUCCESS;
22411 _PUBLIC_ void ndr_print_spoolss_EndDocPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EndDocPrinter *r)
22413 ndr_print_struct(ndr, name, "spoolss_EndDocPrinter");
22414 ndr->depth++;
22415 if (flags & NDR_SET_VALUES) {
22416 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22418 if (flags & NDR_IN) {
22419 ndr_print_struct(ndr, "in", "spoolss_EndDocPrinter");
22420 ndr->depth++;
22421 ndr_print_ptr(ndr, "handle", r->in.handle);
22422 ndr->depth++;
22423 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22424 ndr->depth--;
22425 ndr->depth--;
22427 if (flags & NDR_OUT) {
22428 ndr_print_struct(ndr, "out", "spoolss_EndDocPrinter");
22429 ndr->depth++;
22430 ndr_print_WERROR(ndr, "result", r->out.result);
22431 ndr->depth--;
22433 ndr->depth--;
22436 static enum ndr_err_code ndr_push_spoolss_AddJob(struct ndr_push *ndr, int flags, const struct spoolss_AddJob *r)
22438 if (flags & NDR_IN) {
22439 if (r->in.handle == NULL) {
22440 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22442 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22443 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
22444 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
22445 if (r->in.buffer) {
22446 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
22447 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
22449 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
22451 if (flags & NDR_OUT) {
22452 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.buffer));
22453 if (r->out.buffer) {
22454 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
22455 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
22457 if (r->out.needed == NULL) {
22458 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
22461 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22463 return NDR_ERR_SUCCESS;
22466 static enum ndr_err_code ndr_pull_spoolss_AddJob(struct ndr_pull *ndr, int flags, struct spoolss_AddJob *r)
22468 uint32_t _ptr_buffer;
22469 TALLOC_CTX *_mem_save_handle_0;
22470 TALLOC_CTX *_mem_save_buffer_0;
22471 TALLOC_CTX *_mem_save_needed_0;
22472 if (flags & NDR_IN) {
22473 ZERO_STRUCT(r->out);
22475 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22476 NDR_PULL_ALLOC(ndr, r->in.handle);
22478 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22479 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22480 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22481 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22482 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
22483 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
22484 if (_ptr_buffer) {
22485 NDR_PULL_ALLOC(ndr, r->in.buffer);
22486 } else {
22487 r->in.buffer = NULL;
22489 if (r->in.buffer) {
22490 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
22491 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
22492 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
22493 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
22494 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
22495 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
22497 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
22498 NDR_PULL_ALLOC(ndr, r->out.needed);
22499 ZERO_STRUCTP(r->out.needed);
22500 if (r->in.buffer) {
22501 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
22504 if (flags & NDR_OUT) {
22505 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
22506 if (_ptr_buffer) {
22507 NDR_PULL_ALLOC(ndr, r->out.buffer);
22508 } else {
22509 r->out.buffer = NULL;
22511 if (r->out.buffer) {
22512 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
22513 NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
22514 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
22515 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
22516 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
22517 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
22519 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22520 NDR_PULL_ALLOC(ndr, r->out.needed);
22522 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
22523 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
22524 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
22525 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
22526 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22527 if (r->out.buffer) {
22528 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
22531 return NDR_ERR_SUCCESS;
22534 _PUBLIC_ void ndr_print_spoolss_AddJob(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddJob *r)
22536 ndr_print_struct(ndr, name, "spoolss_AddJob");
22537 ndr->depth++;
22538 if (flags & NDR_SET_VALUES) {
22539 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22541 if (flags & NDR_IN) {
22542 ndr_print_struct(ndr, "in", "spoolss_AddJob");
22543 ndr->depth++;
22544 ndr_print_ptr(ndr, "handle", r->in.handle);
22545 ndr->depth++;
22546 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22547 ndr->depth--;
22548 ndr_print_uint32(ndr, "level", r->in.level);
22549 ndr_print_ptr(ndr, "buffer", r->in.buffer);
22550 ndr->depth++;
22551 if (r->in.buffer) {
22552 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
22554 ndr->depth--;
22555 ndr_print_uint32(ndr, "offered", r->in.offered);
22556 ndr->depth--;
22558 if (flags & NDR_OUT) {
22559 ndr_print_struct(ndr, "out", "spoolss_AddJob");
22560 ndr->depth++;
22561 ndr_print_ptr(ndr, "buffer", r->out.buffer);
22562 ndr->depth++;
22563 if (r->out.buffer) {
22564 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
22566 ndr->depth--;
22567 ndr_print_ptr(ndr, "needed", r->out.needed);
22568 ndr->depth++;
22569 ndr_print_uint32(ndr, "needed", *r->out.needed);
22570 ndr->depth--;
22571 ndr_print_WERROR(ndr, "result", r->out.result);
22572 ndr->depth--;
22574 ndr->depth--;
22577 static enum ndr_err_code ndr_push_spoolss_ScheduleJob(struct ndr_push *ndr, int flags, const struct spoolss_ScheduleJob *r)
22579 if (flags & NDR_IN) {
22580 if (r->in.handle == NULL) {
22581 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22583 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22584 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.jobid));
22586 if (flags & NDR_OUT) {
22587 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22589 return NDR_ERR_SUCCESS;
22592 static enum ndr_err_code ndr_pull_spoolss_ScheduleJob(struct ndr_pull *ndr, int flags, struct spoolss_ScheduleJob *r)
22594 TALLOC_CTX *_mem_save_handle_0;
22595 if (flags & NDR_IN) {
22596 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22597 NDR_PULL_ALLOC(ndr, r->in.handle);
22599 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22600 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22601 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22602 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22603 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.jobid));
22605 if (flags & NDR_OUT) {
22606 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22608 return NDR_ERR_SUCCESS;
22611 _PUBLIC_ void ndr_print_spoolss_ScheduleJob(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ScheduleJob *r)
22613 ndr_print_struct(ndr, name, "spoolss_ScheduleJob");
22614 ndr->depth++;
22615 if (flags & NDR_SET_VALUES) {
22616 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22618 if (flags & NDR_IN) {
22619 ndr_print_struct(ndr, "in", "spoolss_ScheduleJob");
22620 ndr->depth++;
22621 ndr_print_ptr(ndr, "handle", r->in.handle);
22622 ndr->depth++;
22623 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22624 ndr->depth--;
22625 ndr_print_uint32(ndr, "jobid", r->in.jobid);
22626 ndr->depth--;
22628 if (flags & NDR_OUT) {
22629 ndr_print_struct(ndr, "out", "spoolss_ScheduleJob");
22630 ndr->depth++;
22631 ndr_print_WERROR(ndr, "result", r->out.result);
22632 ndr->depth--;
22634 ndr->depth--;
22637 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct _spoolss_GetPrinterData *r)
22639 if (flags & NDR_IN) {
22640 if (r->in.handle == NULL) {
22641 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22643 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22644 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
22645 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
22646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
22647 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
22648 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
22650 if (flags & NDR_OUT) {
22651 if (r->out.type == NULL) {
22652 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22654 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
22655 if (r->out.data == NULL) {
22656 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22658 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.data));
22659 if (r->out.needed == NULL) {
22660 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
22663 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22665 return NDR_ERR_SUCCESS;
22668 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct _spoolss_GetPrinterData *r)
22670 TALLOC_CTX *_mem_save_handle_0;
22671 TALLOC_CTX *_mem_save_type_0;
22672 TALLOC_CTX *_mem_save_data_0;
22673 TALLOC_CTX *_mem_save_needed_0;
22674 if (flags & NDR_IN) {
22675 ZERO_STRUCT(r->out);
22677 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22678 NDR_PULL_ALLOC(ndr, r->in.handle);
22680 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22681 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22682 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22683 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22684 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
22685 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
22686 if (ndr_get_array_length(ndr, &r->in.value_name) > ndr_get_array_size(ndr, &r->in.value_name)) {
22687 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.value_name), ndr_get_array_length(ndr, &r->in.value_name));
22689 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t)));
22690 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t), CH_UTF16));
22691 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
22692 NDR_PULL_ALLOC(ndr, r->out.type);
22693 ZERO_STRUCTP(r->out.type);
22694 NDR_PULL_ALLOC(ndr, r->out.data);
22695 ZERO_STRUCTP(r->out.data);
22696 NDR_PULL_ALLOC(ndr, r->out.needed);
22697 ZERO_STRUCTP(r->out.needed);
22699 if (flags & NDR_OUT) {
22700 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22701 NDR_PULL_ALLOC(ndr, r->out.type);
22703 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
22704 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
22705 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
22706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
22707 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22708 NDR_PULL_ALLOC(ndr, r->out.data);
22710 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
22711 NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
22712 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.data));
22713 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
22714 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22715 NDR_PULL_ALLOC(ndr, r->out.needed);
22717 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
22718 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
22719 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
22720 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
22721 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22723 return NDR_ERR_SUCCESS;
22726 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct __spoolss_GetPrinterData *r)
22728 if (flags & NDR_IN) {
22729 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
22731 if (flags & NDR_OUT) {
22732 if (r->out.data == NULL) {
22733 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22735 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.data, r->in.type));
22736 NDR_CHECK(ndr_push_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data));
22738 return NDR_ERR_SUCCESS;
22741 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct __spoolss_GetPrinterData *r)
22743 TALLOC_CTX *_mem_save_data_0;
22744 if (flags & NDR_IN) {
22745 ZERO_STRUCT(r->out);
22747 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
22748 NDR_PULL_ALLOC(ndr, r->out.data);
22749 ZERO_STRUCTP(r->out.data);
22751 if (flags & NDR_OUT) {
22752 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22753 NDR_PULL_ALLOC(ndr, r->out.data);
22755 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
22756 NDR_PULL_SET_MEM_CTX(ndr, r->out.data, LIBNDR_FLAG_REF_ALLOC);
22757 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.data, r->in.type));
22758 NDR_CHECK(ndr_pull_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data));
22759 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, LIBNDR_FLAG_REF_ALLOC);
22761 return NDR_ERR_SUCCESS;
22764 _PUBLIC_ void ndr_print_spoolss_GetPrinterData(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterData *r)
22766 ndr_print_struct(ndr, name, "spoolss_GetPrinterData");
22767 ndr->depth++;
22768 if (flags & NDR_SET_VALUES) {
22769 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22771 if (flags & NDR_IN) {
22772 ndr_print_struct(ndr, "in", "spoolss_GetPrinterData");
22773 ndr->depth++;
22774 ndr_print_ptr(ndr, "handle", r->in.handle);
22775 ndr->depth++;
22776 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22777 ndr->depth--;
22778 ndr_print_string(ndr, "value_name", r->in.value_name);
22779 ndr_print_uint32(ndr, "offered", r->in.offered);
22780 ndr->depth--;
22782 if (flags & NDR_OUT) {
22783 ndr_print_struct(ndr, "out", "spoolss_GetPrinterData");
22784 ndr->depth++;
22785 ndr_print_ptr(ndr, "type", r->out.type);
22786 ndr->depth++;
22787 ndr_print_winreg_Type(ndr, "type", *r->out.type);
22788 ndr->depth--;
22789 ndr_print_ptr(ndr, "data", r->out.data);
22790 ndr->depth++;
22791 ndr_print_set_switch_value(ndr, r->out.data, *r->out.type);
22792 ndr_print_spoolss_PrinterData(ndr, "data", r->out.data);
22793 ndr->depth--;
22794 ndr_print_ptr(ndr, "needed", r->out.needed);
22795 ndr->depth++;
22796 ndr_print_uint32(ndr, "needed", *r->out.needed);
22797 ndr->depth--;
22798 ndr_print_WERROR(ndr, "result", r->out.result);
22799 ndr->depth--;
22801 ndr->depth--;
22804 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const struct _spoolss_SetPrinterData *r)
22806 if (flags & NDR_IN) {
22807 if (r->in.handle == NULL) {
22808 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22810 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22811 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
22812 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
22813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
22814 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
22815 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
22816 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->in.data));
22817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in._offered));
22819 if (flags & NDR_OUT) {
22820 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22822 return NDR_ERR_SUCCESS;
22825 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const struct __spoolss_SetPrinterData *r)
22827 if (flags & NDR_IN) {
22828 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
22830 if (flags & NDR_OUT) {
22831 if (r->out.data == NULL) {
22832 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22834 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.data, r->in.type));
22835 NDR_CHECK(ndr_push_spoolss_PrinterData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.data));
22837 return NDR_ERR_SUCCESS;
22840 static enum ndr_err_code ndr_pull_spoolss_SetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_SetPrinterData *r)
22842 TALLOC_CTX *_mem_save_handle_0;
22843 if (flags & NDR_IN) {
22844 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22845 NDR_PULL_ALLOC(ndr, r->in.handle);
22847 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22848 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22849 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22850 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22851 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
22852 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
22853 if (ndr_get_array_length(ndr, &r->in.value_name) > ndr_get_array_size(ndr, &r->in.value_name)) {
22854 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.value_name), ndr_get_array_length(ndr, &r->in.value_name));
22856 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t)));
22857 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t), CH_UTF16));
22858 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
22860 struct ndr_pull *_ndr_data;
22861 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_data, 4, -1));
22862 NDR_CHECK(ndr_pull_set_switch_value(_ndr_data, &r->in.data, r->in.type));
22863 NDR_CHECK(ndr_pull_spoolss_PrinterData(_ndr_data, NDR_SCALARS|NDR_BUFFERS, &r->in.data));
22864 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_data, 4, -1));
22866 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in._offered));
22868 if (flags & NDR_OUT) {
22869 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22871 return NDR_ERR_SUCCESS;
22874 _PUBLIC_ void ndr_print_spoolss_SetPrinterData(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_SetPrinterData *r)
22876 ndr_print_struct(ndr, name, "spoolss_SetPrinterData");
22877 ndr->depth++;
22878 if (flags & NDR_SET_VALUES) {
22879 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22881 if (flags & NDR_IN) {
22882 ndr_print_struct(ndr, "in", "spoolss_SetPrinterData");
22883 ndr->depth++;
22884 ndr_print_ptr(ndr, "handle", r->in.handle);
22885 ndr->depth++;
22886 ndr_print_policy_handle(ndr, "handle", r->in.handle);
22887 ndr->depth--;
22888 ndr_print_string(ndr, "value_name", r->in.value_name);
22889 ndr_print_winreg_Type(ndr, "type", r->in.type);
22890 ndr_print_set_switch_value(ndr, &r->in.data, r->in.type);
22891 ndr_print_spoolss_PrinterData(ndr, "data", &r->in.data);
22892 ndr_print_uint32(ndr, "_offered", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_PrinterData(&r->in.data, r->in.type, ndr->iconv_convenience, flags):r->in._offered);
22893 ndr->depth--;
22895 if (flags & NDR_OUT) {
22896 ndr_print_struct(ndr, "out", "spoolss_SetPrinterData");
22897 ndr->depth++;
22898 ndr_print_WERROR(ndr, "result", r->out.result);
22899 ndr->depth--;
22901 ndr->depth--;
22904 static enum ndr_err_code ndr_push_spoolss_WaitForPrinterChange(struct ndr_push *ndr, int flags, const struct spoolss_WaitForPrinterChange *r)
22906 if (flags & NDR_IN) {
22908 if (flags & NDR_OUT) {
22909 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22911 return NDR_ERR_SUCCESS;
22914 static enum ndr_err_code ndr_pull_spoolss_WaitForPrinterChange(struct ndr_pull *ndr, int flags, struct spoolss_WaitForPrinterChange *r)
22916 if (flags & NDR_IN) {
22918 if (flags & NDR_OUT) {
22919 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22921 return NDR_ERR_SUCCESS;
22924 _PUBLIC_ void ndr_print_spoolss_WaitForPrinterChange(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_WaitForPrinterChange *r)
22926 ndr_print_struct(ndr, name, "spoolss_WaitForPrinterChange");
22927 ndr->depth++;
22928 if (flags & NDR_SET_VALUES) {
22929 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22931 if (flags & NDR_IN) {
22932 ndr_print_struct(ndr, "in", "spoolss_WaitForPrinterChange");
22933 ndr->depth++;
22934 ndr->depth--;
22936 if (flags & NDR_OUT) {
22937 ndr_print_struct(ndr, "out", "spoolss_WaitForPrinterChange");
22938 ndr->depth++;
22939 ndr_print_WERROR(ndr, "result", r->out.result);
22940 ndr->depth--;
22942 ndr->depth--;
22945 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_ClosePrinter(struct ndr_push *ndr, int flags, const struct spoolss_ClosePrinter *r)
22947 if (flags & NDR_IN) {
22948 if (r->in.handle == NULL) {
22949 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22951 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22953 if (flags & NDR_OUT) {
22954 if (r->out.handle == NULL) {
22955 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
22957 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
22958 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
22960 return NDR_ERR_SUCCESS;
22963 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_ClosePrinter(struct ndr_pull *ndr, int flags, struct spoolss_ClosePrinter *r)
22965 TALLOC_CTX *_mem_save_handle_0;
22966 if (flags & NDR_IN) {
22967 ZERO_STRUCT(r->out);
22969 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22970 NDR_PULL_ALLOC(ndr, r->in.handle);
22972 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22973 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
22974 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
22975 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22976 NDR_PULL_ALLOC(ndr, r->out.handle);
22977 *r->out.handle = *r->in.handle;
22979 if (flags & NDR_OUT) {
22980 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
22981 NDR_PULL_ALLOC(ndr, r->out.handle);
22983 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
22984 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
22985 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
22986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
22987 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
22989 return NDR_ERR_SUCCESS;
22992 _PUBLIC_ void ndr_print_spoolss_ClosePrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ClosePrinter *r)
22994 ndr_print_struct(ndr, name, "spoolss_ClosePrinter");
22995 ndr->depth++;
22996 if (flags & NDR_SET_VALUES) {
22997 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
22999 if (flags & NDR_IN) {
23000 ndr_print_struct(ndr, "in", "spoolss_ClosePrinter");
23001 ndr->depth++;
23002 ndr_print_ptr(ndr, "handle", r->in.handle);
23003 ndr->depth++;
23004 ndr_print_policy_handle(ndr, "handle", r->in.handle);
23005 ndr->depth--;
23006 ndr->depth--;
23008 if (flags & NDR_OUT) {
23009 ndr_print_struct(ndr, "out", "spoolss_ClosePrinter");
23010 ndr->depth++;
23011 ndr_print_ptr(ndr, "handle", r->out.handle);
23012 ndr->depth++;
23013 ndr_print_policy_handle(ndr, "handle", r->out.handle);
23014 ndr->depth--;
23015 ndr_print_WERROR(ndr, "result", r->out.result);
23016 ndr->depth--;
23018 ndr->depth--;
23021 static enum ndr_err_code ndr_push_spoolss_AddForm(struct ndr_push *ndr, int flags, const struct spoolss_AddForm *r)
23023 if (flags & NDR_IN) {
23024 if (r->in.handle == NULL) {
23025 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23027 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23028 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23029 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
23030 NDR_CHECK(ndr_push_spoolss_AddFormInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
23032 if (flags & NDR_OUT) {
23033 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
23035 return NDR_ERR_SUCCESS;
23038 static enum ndr_err_code ndr_pull_spoolss_AddForm(struct ndr_pull *ndr, int flags, struct spoolss_AddForm *r)
23040 TALLOC_CTX *_mem_save_handle_0;
23041 if (flags & NDR_IN) {
23042 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23043 NDR_PULL_ALLOC(ndr, r->in.handle);
23045 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
23046 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
23047 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23048 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
23049 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23050 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
23051 NDR_CHECK(ndr_pull_spoolss_AddFormInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
23053 if (flags & NDR_OUT) {
23054 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
23056 return NDR_ERR_SUCCESS;
23059 _PUBLIC_ void ndr_print_spoolss_AddForm(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddForm *r)
23061 ndr_print_struct(ndr, name, "spoolss_AddForm");
23062 ndr->depth++;
23063 if (flags & NDR_SET_VALUES) {
23064 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
23066 if (flags & NDR_IN) {
23067 ndr_print_struct(ndr, "in", "spoolss_AddForm");
23068 ndr->depth++;
23069 ndr_print_ptr(ndr, "handle", r->in.handle);
23070 ndr->depth++;
23071 ndr_print_policy_handle(ndr, "handle", r->in.handle);
23072 ndr->depth--;
23073 ndr_print_uint32(ndr, "level", r->in.level);
23074 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
23075 ndr_print_spoolss_AddFormInfo(ndr, "info", &r->in.info);
23076 ndr->depth--;
23078 if (flags & NDR_OUT) {
23079 ndr_print_struct(ndr, "out", "spoolss_AddForm");
23080 ndr->depth++;
23081 ndr_print_WERROR(ndr, "result", r->out.result);
23082 ndr->depth--;
23084 ndr->depth--;
23087 static enum ndr_err_code ndr_push_spoolss_DeleteForm(struct ndr_push *ndr, int flags, const struct spoolss_DeleteForm *r)
23089 if (flags & NDR_IN) {
23090 if (r->in.handle == NULL) {
23091 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23093 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23094 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
23095 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
23096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
23097 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.form_name, ndr_charset_length(r->in.form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23099 if (flags & NDR_OUT) {
23100 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
23102 return NDR_ERR_SUCCESS;
23105 static enum ndr_err_code ndr_pull_spoolss_DeleteForm(struct ndr_pull *ndr, int flags, struct spoolss_DeleteForm *r)
23107 TALLOC_CTX *_mem_save_handle_0;
23108 if (flags & NDR_IN) {
23109 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23110 NDR_PULL_ALLOC(ndr, r->in.handle);
23112 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
23113 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
23114 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23115 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
23116 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.form_name));
23117 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.form_name));
23118 if (ndr_get_array_length(ndr, &r->in.form_name) > ndr_get_array_size(ndr, &r->in.form_name)) {
23119 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.form_name), ndr_get_array_length(ndr, &r->in.form_name));
23121 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.form_name), sizeof(uint16_t)));
23122 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.form_name, ndr_get_array_length(ndr, &r->in.form_name), sizeof(uint16_t), CH_UTF16));
23124 if (flags & NDR_OUT) {
23125 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
23127 return NDR_ERR_SUCCESS;
23130 _PUBLIC_ void ndr_print_spoolss_DeleteForm(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeleteForm *r)
23132 ndr_print_struct(ndr, name, "spoolss_DeleteForm");
23133 ndr->depth++;
23134 if (flags & NDR_SET_VALUES) {
23135 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
23137 if (flags & NDR_IN) {
23138 ndr_print_struct(ndr, "in", "spoolss_DeleteForm");
23139 ndr->depth++;
23140 ndr_print_ptr(ndr, "handle", r->in.handle);
23141 ndr->depth++;
23142 ndr_print_policy_handle(ndr, "handle", r->in.handle);
23143 ndr->depth--;
23144 ndr_print_string(ndr, "form_name", r->in.form_name);
23145 ndr->depth--;
23147 if (flags & NDR_OUT) {
23148 ndr_print_struct(ndr, "out", "spoolss_DeleteForm");
23149 ndr->depth++;
23150 ndr_print_WERROR(ndr, "result", r->out.result);
23151 ndr->depth--;
23153 ndr->depth--;
23156 static enum ndr_err_code ndr_push_spoolss_GetForm(struct ndr_push *ndr, int flags, const struct spoolss_GetForm *r)
23158 if (flags & NDR_IN) {
23159 if (r->in.handle == NULL) {
23160 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23162 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
23164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
23165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
23166 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.form_name, ndr_charset_length(r->in.form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23168 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
23169 if (r->in.buffer) {
23170 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
23172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
23174 if (flags & NDR_OUT) {
23175 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
23176 if (r->out.info) {
23178 struct ndr_push *_ndr_info;
23179 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
23180 NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
23181 NDR_CHECK(ndr_push_spoolss_FormInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
23182 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
23185 if (r->out.needed == NULL) {
23186 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23188 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
23189 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
23191 return NDR_ERR_SUCCESS;
23194 static enum ndr_err_code ndr_pull_spoolss_GetForm(struct ndr_pull *ndr, int flags, struct spoolss_GetForm *r)
23196 uint32_t _ptr_buffer;
23197 uint32_t _ptr_info;
23198 TALLOC_CTX *_mem_save_handle_0;
23199 TALLOC_CTX *_mem_save_buffer_0;
23200 TALLOC_CTX *_mem_save_info_0;
23201 TALLOC_CTX *_mem_save_needed_0;
23202 if (flags & NDR_IN) {
23203 ZERO_STRUCT(r->out);
23205 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23206 NDR_PULL_ALLOC(ndr, r->in.handle);
23208 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
23209 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
23210 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
23212 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.form_name));
23213 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.form_name));
23214 if (ndr_get_array_length(ndr, &r->in.form_name) > ndr_get_array_size(ndr, &r->in.form_name)) {
23215 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.form_name), ndr_get_array_length(ndr, &r->in.form_name));
23217 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.form_name), sizeof(uint16_t)));
23218 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.form_name, ndr_get_array_length(ndr, &r->in.form_name), sizeof(uint16_t), CH_UTF16));
23219 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23220 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
23221 if (_ptr_buffer) {
23222 NDR_PULL_ALLOC(ndr, r->in.buffer);
23223 } else {
23224 r->in.buffer = NULL;
23226 if (r->in.buffer) {
23227 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
23228 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
23229 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
23230 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
23232 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
23233 NDR_PULL_ALLOC(ndr, r->out.needed);
23234 ZERO_STRUCTP(r->out.needed);
23236 if (flags & NDR_OUT) {
23237 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
23238 if (_ptr_info) {
23239 NDR_PULL_ALLOC(ndr, r->out.info);
23240 } else {
23241 r->out.info = NULL;
23243 if (r->out.info) {
23244 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
23245 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
23247 struct ndr_pull *_ndr_info;
23248 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
23249 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
23250 NDR_CHECK(ndr_pull_spoolss_FormInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
23251 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
23253 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
23255 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23256 NDR_PULL_ALLOC(ndr, r->out.needed);
23258 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
23259 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
23260 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
23261 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
23262 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
23264 return NDR_ERR_SUCCESS;
23267 _PUBLIC_ void ndr_print_spoolss_GetForm(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetForm *r)
23269 ndr_print_struct(ndr, name, "spoolss_GetForm");
23270 ndr->depth++;
23271 if (flags & NDR_SET_VALUES) {
23272 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
23274 if (flags & NDR_IN) {
23275 ndr_print_struct(ndr, "in", "spoolss_GetForm");
23276 ndr->depth++;
23277 ndr_print_ptr(ndr, "handle", r->in.handle);
23278 ndr->depth++;
23279 ndr_print_policy_handle(ndr, "handle", r->in.handle);
23280 ndr->depth--;
23281 ndr_print_string(ndr, "form_name", r->in.form_name);
23282 ndr_print_uint32(ndr, "level", r->in.level);
23283 ndr_print_ptr(ndr, "buffer", r->in.buffer);
23284 ndr->depth++;
23285 if (r->in.buffer) {
23286 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
23288 ndr->depth--;
23289 ndr_print_uint32(ndr, "offered", r->in.offered);
23290 ndr->depth--;
23292 if (flags & NDR_OUT) {
23293 ndr_print_struct(ndr, "out", "spoolss_GetForm");
23294 ndr->depth++;
23295 ndr_print_ptr(ndr, "info", r->out.info);
23296 ndr->depth++;
23297 if (r->out.info) {
23298 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
23299 ndr_print_spoolss_FormInfo(ndr, "info", r->out.info);
23301 ndr->depth--;
23302 ndr_print_ptr(ndr, "needed", r->out.needed);
23303 ndr->depth++;
23304 ndr_print_uint32(ndr, "needed", *r->out.needed);
23305 ndr->depth--;
23306 ndr_print_WERROR(ndr, "result", r->out.result);
23307 ndr->depth--;
23309 ndr->depth--;
23312 static enum ndr_err_code ndr_push_spoolss_SetForm(struct ndr_push *ndr, int flags, const struct spoolss_SetForm *r)
23314 if (flags & NDR_IN) {
23315 if (r->in.handle == NULL) {
23316 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23318 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
23320 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
23321 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.form_name, CH_UTF16)));
23322 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.form_name, ndr_charset_length(r->in.form_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23323 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23324 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
23325 NDR_CHECK(ndr_push_spoolss_AddFormInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
23327 if (flags & NDR_OUT) {
23328 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
23330 return NDR_ERR_SUCCESS;
23333 static enum ndr_err_code ndr_pull_spoolss_SetForm(struct ndr_pull *ndr, int flags, struct spoolss_SetForm *r)
23335 TALLOC_CTX *_mem_save_handle_0;
23336 if (flags & NDR_IN) {
23337 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23338 NDR_PULL_ALLOC(ndr, r->in.handle);
23340 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
23341 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
23342 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
23344 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.form_name));
23345 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.form_name));
23346 if (ndr_get_array_length(ndr, &r->in.form_name) > ndr_get_array_size(ndr, &r->in.form_name)) {
23347 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.form_name), ndr_get_array_length(ndr, &r->in.form_name));
23349 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.form_name), sizeof(uint16_t)));
23350 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.form_name, ndr_get_array_length(ndr, &r->in.form_name), sizeof(uint16_t), CH_UTF16));
23351 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23352 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
23353 NDR_CHECK(ndr_pull_spoolss_AddFormInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
23355 if (flags & NDR_OUT) {
23356 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
23358 return NDR_ERR_SUCCESS;
23361 _PUBLIC_ void ndr_print_spoolss_SetForm(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_SetForm *r)
23363 ndr_print_struct(ndr, name, "spoolss_SetForm");
23364 ndr->depth++;
23365 if (flags & NDR_SET_VALUES) {
23366 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
23368 if (flags & NDR_IN) {
23369 ndr_print_struct(ndr, "in", "spoolss_SetForm");
23370 ndr->depth++;
23371 ndr_print_ptr(ndr, "handle", r->in.handle);
23372 ndr->depth++;
23373 ndr_print_policy_handle(ndr, "handle", r->in.handle);
23374 ndr->depth--;
23375 ndr_print_string(ndr, "form_name", r->in.form_name);
23376 ndr_print_uint32(ndr, "level", r->in.level);
23377 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
23378 ndr_print_spoolss_AddFormInfo(ndr, "info", &r->in.info);
23379 ndr->depth--;
23381 if (flags & NDR_OUT) {
23382 ndr_print_struct(ndr, "out", "spoolss_SetForm");
23383 ndr->depth++;
23384 ndr_print_WERROR(ndr, "result", r->out.result);
23385 ndr->depth--;
23387 ndr->depth--;
23390 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumForms(struct ndr_push *ndr, int flags, const struct _spoolss_EnumForms *r)
23392 if (flags & NDR_IN) {
23393 if (r->in.handle == NULL) {
23394 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23396 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23397 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23398 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
23399 if (r->in.buffer) {
23400 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
23402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
23404 if (flags & NDR_OUT) {
23405 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
23406 if (r->out.info) {
23407 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
23409 if (r->out.needed == NULL) {
23410 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
23413 if (r->out.count == NULL) {
23414 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
23417 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
23419 return NDR_ERR_SUCCESS;
23422 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumForms(struct ndr_pull *ndr, int flags, struct _spoolss_EnumForms *r)
23424 uint32_t _ptr_buffer;
23425 uint32_t _ptr_info;
23426 TALLOC_CTX *_mem_save_handle_0;
23427 TALLOC_CTX *_mem_save_buffer_0;
23428 TALLOC_CTX *_mem_save_info_0;
23429 TALLOC_CTX *_mem_save_needed_0;
23430 TALLOC_CTX *_mem_save_count_0;
23431 if (flags & NDR_IN) {
23432 ZERO_STRUCT(r->out);
23434 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23435 NDR_PULL_ALLOC(ndr, r->in.handle);
23437 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
23438 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
23439 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
23440 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
23441 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
23443 if (_ptr_buffer) {
23444 NDR_PULL_ALLOC(ndr, r->in.buffer);
23445 } else {
23446 r->in.buffer = NULL;
23448 if (r->in.buffer) {
23449 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
23450 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
23451 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
23452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
23454 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
23455 NDR_PULL_ALLOC(ndr, r->out.needed);
23456 ZERO_STRUCTP(r->out.needed);
23457 NDR_PULL_ALLOC(ndr, r->out.count);
23458 ZERO_STRUCTP(r->out.count);
23460 if (flags & NDR_OUT) {
23461 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
23462 if (_ptr_info) {
23463 NDR_PULL_ALLOC(ndr, r->out.info);
23464 } else {
23465 r->out.info = NULL;
23467 if (r->out.info) {
23468 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
23469 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
23470 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
23471 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
23473 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23474 NDR_PULL_ALLOC(ndr, r->out.needed);
23476 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
23477 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
23478 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
23479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
23480 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23481 NDR_PULL_ALLOC(ndr, r->out.count);
23483 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
23484 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
23485 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
23486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
23487 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
23489 return NDR_ERR_SUCCESS;
23492 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumForms(struct ndr_push *ndr, int flags, const struct __spoolss_EnumForms *r)
23494 uint32_t cntr_info_0;
23495 if (flags & NDR_IN) {
23496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
23499 if (flags & NDR_OUT) {
23500 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23501 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
23502 NDR_CHECK(ndr_push_spoolss_FormInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
23504 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23505 NDR_CHECK(ndr_push_spoolss_FormInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
23508 return NDR_ERR_SUCCESS;
23511 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumForms(struct ndr_pull *ndr, int flags, struct __spoolss_EnumForms *r)
23513 uint32_t cntr_info_0;
23514 TALLOC_CTX *_mem_save_info_0;
23515 if (flags & NDR_IN) {
23516 ZERO_STRUCT(r->out);
23518 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23519 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
23521 if (flags & NDR_OUT) {
23522 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
23523 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
23524 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
23525 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23526 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
23527 NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
23529 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23530 NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
23532 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
23534 return NDR_ERR_SUCCESS;
23537 _PUBLIC_ void ndr_print_spoolss_EnumForms(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumForms *r)
23539 uint32_t cntr_info_2;
23540 ndr_print_struct(ndr, name, "spoolss_EnumForms");
23541 ndr->depth++;
23542 if (flags & NDR_SET_VALUES) {
23543 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
23545 if (flags & NDR_IN) {
23546 ndr_print_struct(ndr, "in", "spoolss_EnumForms");
23547 ndr->depth++;
23548 ndr_print_ptr(ndr, "handle", r->in.handle);
23549 ndr->depth++;
23550 ndr_print_policy_handle(ndr, "handle", r->in.handle);
23551 ndr->depth--;
23552 ndr_print_uint32(ndr, "level", r->in.level);
23553 ndr_print_ptr(ndr, "buffer", r->in.buffer);
23554 ndr->depth++;
23555 if (r->in.buffer) {
23556 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
23558 ndr->depth--;
23559 ndr_print_uint32(ndr, "offered", r->in.offered);
23560 ndr->depth--;
23562 if (flags & NDR_OUT) {
23563 ndr_print_struct(ndr, "out", "spoolss_EnumForms");
23564 ndr->depth++;
23565 ndr_print_ptr(ndr, "count", r->out.count);
23566 ndr->depth++;
23567 ndr_print_uint32(ndr, "count", *r->out.count);
23568 ndr->depth--;
23569 ndr_print_ptr(ndr, "info", r->out.info);
23570 ndr->depth++;
23571 ndr_print_ptr(ndr, "info", *r->out.info);
23572 ndr->depth++;
23573 if (*r->out.info) {
23574 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
23575 ndr->depth++;
23576 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
23577 char *idx_2=NULL;
23578 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
23579 ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
23580 ndr_print_spoolss_FormInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
23581 free(idx_2);
23584 ndr->depth--;
23586 ndr->depth--;
23587 ndr->depth--;
23588 ndr_print_ptr(ndr, "needed", r->out.needed);
23589 ndr->depth++;
23590 ndr_print_uint32(ndr, "needed", *r->out.needed);
23591 ndr->depth--;
23592 ndr_print_WERROR(ndr, "result", r->out.result);
23593 ndr->depth--;
23595 ndr->depth--;
23598 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPorts(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPorts *r)
23600 if (flags & NDR_IN) {
23601 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
23602 if (r->in.servername) {
23603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
23604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
23605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
23606 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23608 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23609 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
23610 if (r->in.buffer) {
23611 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
23613 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
23615 if (flags & NDR_OUT) {
23616 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
23617 if (r->out.info) {
23618 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
23620 if (r->out.needed == NULL) {
23621 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
23624 if (r->out.count == NULL) {
23625 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
23628 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
23630 return NDR_ERR_SUCCESS;
23633 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPorts(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPorts *r)
23635 uint32_t _ptr_servername;
23636 uint32_t _ptr_buffer;
23637 uint32_t _ptr_info;
23638 TALLOC_CTX *_mem_save_servername_0;
23639 TALLOC_CTX *_mem_save_buffer_0;
23640 TALLOC_CTX *_mem_save_info_0;
23641 TALLOC_CTX *_mem_save_needed_0;
23642 TALLOC_CTX *_mem_save_count_0;
23643 if (flags & NDR_IN) {
23644 ZERO_STRUCT(r->out);
23646 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
23647 if (_ptr_servername) {
23648 NDR_PULL_ALLOC(ndr, r->in.servername);
23649 } else {
23650 r->in.servername = NULL;
23652 if (r->in.servername) {
23653 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
23654 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
23655 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
23656 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
23657 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
23658 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
23660 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
23661 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
23662 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
23664 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23665 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
23666 if (_ptr_buffer) {
23667 NDR_PULL_ALLOC(ndr, r->in.buffer);
23668 } else {
23669 r->in.buffer = NULL;
23671 if (r->in.buffer) {
23672 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
23673 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
23674 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
23675 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
23677 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
23678 NDR_PULL_ALLOC(ndr, r->out.needed);
23679 ZERO_STRUCTP(r->out.needed);
23680 NDR_PULL_ALLOC(ndr, r->out.count);
23681 ZERO_STRUCTP(r->out.count);
23683 if (flags & NDR_OUT) {
23684 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
23685 if (_ptr_info) {
23686 NDR_PULL_ALLOC(ndr, r->out.info);
23687 } else {
23688 r->out.info = NULL;
23690 if (r->out.info) {
23691 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
23692 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
23693 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
23694 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
23696 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23697 NDR_PULL_ALLOC(ndr, r->out.needed);
23699 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
23700 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
23701 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
23702 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
23703 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23704 NDR_PULL_ALLOC(ndr, r->out.count);
23706 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
23707 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
23708 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
23709 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
23710 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
23712 return NDR_ERR_SUCCESS;
23715 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPorts(struct ndr_push *ndr, int flags, const struct __spoolss_EnumPorts *r)
23717 uint32_t cntr_info_0;
23718 if (flags & NDR_IN) {
23719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
23722 if (flags & NDR_OUT) {
23723 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23724 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
23725 NDR_CHECK(ndr_push_spoolss_PortInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
23727 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23728 NDR_CHECK(ndr_push_spoolss_PortInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
23731 return NDR_ERR_SUCCESS;
23734 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPorts(struct ndr_pull *ndr, int flags, struct __spoolss_EnumPorts *r)
23736 uint32_t cntr_info_0;
23737 TALLOC_CTX *_mem_save_info_0;
23738 if (flags & NDR_IN) {
23739 ZERO_STRUCT(r->out);
23741 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23742 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
23744 if (flags & NDR_OUT) {
23745 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
23746 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
23747 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
23748 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23749 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
23750 NDR_CHECK(ndr_pull_spoolss_PortInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
23752 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23753 NDR_CHECK(ndr_pull_spoolss_PortInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
23755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
23757 return NDR_ERR_SUCCESS;
23760 _PUBLIC_ void ndr_print_spoolss_EnumPorts(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPorts *r)
23762 uint32_t cntr_info_2;
23763 ndr_print_struct(ndr, name, "spoolss_EnumPorts");
23764 ndr->depth++;
23765 if (flags & NDR_SET_VALUES) {
23766 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
23768 if (flags & NDR_IN) {
23769 ndr_print_struct(ndr, "in", "spoolss_EnumPorts");
23770 ndr->depth++;
23771 ndr_print_ptr(ndr, "servername", r->in.servername);
23772 ndr->depth++;
23773 if (r->in.servername) {
23774 ndr_print_string(ndr, "servername", r->in.servername);
23776 ndr->depth--;
23777 ndr_print_uint32(ndr, "level", r->in.level);
23778 ndr_print_ptr(ndr, "buffer", r->in.buffer);
23779 ndr->depth++;
23780 if (r->in.buffer) {
23781 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
23783 ndr->depth--;
23784 ndr_print_uint32(ndr, "offered", r->in.offered);
23785 ndr->depth--;
23787 if (flags & NDR_OUT) {
23788 ndr_print_struct(ndr, "out", "spoolss_EnumPorts");
23789 ndr->depth++;
23790 ndr_print_ptr(ndr, "count", r->out.count);
23791 ndr->depth++;
23792 ndr_print_uint32(ndr, "count", *r->out.count);
23793 ndr->depth--;
23794 ndr_print_ptr(ndr, "info", r->out.info);
23795 ndr->depth++;
23796 ndr_print_ptr(ndr, "info", *r->out.info);
23797 ndr->depth++;
23798 if (*r->out.info) {
23799 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
23800 ndr->depth++;
23801 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
23802 char *idx_2=NULL;
23803 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
23804 ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
23805 ndr_print_spoolss_PortInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
23806 free(idx_2);
23809 ndr->depth--;
23811 ndr->depth--;
23812 ndr->depth--;
23813 ndr_print_ptr(ndr, "needed", r->out.needed);
23814 ndr->depth++;
23815 ndr_print_uint32(ndr, "needed", *r->out.needed);
23816 ndr->depth--;
23817 ndr_print_WERROR(ndr, "result", r->out.result);
23818 ndr->depth--;
23820 ndr->depth--;
23823 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumMonitors(struct ndr_push *ndr, int flags, const struct _spoolss_EnumMonitors *r)
23825 if (flags & NDR_IN) {
23826 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
23827 if (r->in.servername) {
23828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
23829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
23830 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
23831 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23834 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
23835 if (r->in.buffer) {
23836 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
23838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
23840 if (flags & NDR_OUT) {
23841 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
23842 if (r->out.info) {
23843 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
23845 if (r->out.needed == NULL) {
23846 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23848 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
23849 if (r->out.count == NULL) {
23850 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
23852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
23853 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
23855 return NDR_ERR_SUCCESS;
23858 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumMonitors(struct ndr_pull *ndr, int flags, struct _spoolss_EnumMonitors *r)
23860 uint32_t _ptr_servername;
23861 uint32_t _ptr_buffer;
23862 uint32_t _ptr_info;
23863 TALLOC_CTX *_mem_save_servername_0;
23864 TALLOC_CTX *_mem_save_buffer_0;
23865 TALLOC_CTX *_mem_save_info_0;
23866 TALLOC_CTX *_mem_save_needed_0;
23867 TALLOC_CTX *_mem_save_count_0;
23868 if (flags & NDR_IN) {
23869 ZERO_STRUCT(r->out);
23871 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
23872 if (_ptr_servername) {
23873 NDR_PULL_ALLOC(ndr, r->in.servername);
23874 } else {
23875 r->in.servername = NULL;
23877 if (r->in.servername) {
23878 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
23879 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
23880 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
23881 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
23882 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
23883 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
23885 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
23886 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
23887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
23889 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23890 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
23891 if (_ptr_buffer) {
23892 NDR_PULL_ALLOC(ndr, r->in.buffer);
23893 } else {
23894 r->in.buffer = NULL;
23896 if (r->in.buffer) {
23897 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
23898 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
23899 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
23900 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
23902 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
23903 NDR_PULL_ALLOC(ndr, r->out.needed);
23904 ZERO_STRUCTP(r->out.needed);
23905 NDR_PULL_ALLOC(ndr, r->out.count);
23906 ZERO_STRUCTP(r->out.count);
23908 if (flags & NDR_OUT) {
23909 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
23910 if (_ptr_info) {
23911 NDR_PULL_ALLOC(ndr, r->out.info);
23912 } else {
23913 r->out.info = NULL;
23915 if (r->out.info) {
23916 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
23917 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
23918 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
23919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
23921 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23922 NDR_PULL_ALLOC(ndr, r->out.needed);
23924 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
23925 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
23926 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
23927 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
23928 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
23929 NDR_PULL_ALLOC(ndr, r->out.count);
23931 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
23932 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
23933 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
23934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
23935 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
23937 return NDR_ERR_SUCCESS;
23940 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumMonitors(struct ndr_push *ndr, int flags, const struct __spoolss_EnumMonitors *r)
23942 uint32_t cntr_info_0;
23943 if (flags & NDR_IN) {
23944 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
23945 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
23947 if (flags & NDR_OUT) {
23948 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23949 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
23950 NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
23952 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23953 NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
23956 return NDR_ERR_SUCCESS;
23959 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumMonitors(struct ndr_pull *ndr, int flags, struct __spoolss_EnumMonitors *r)
23961 uint32_t cntr_info_0;
23962 TALLOC_CTX *_mem_save_info_0;
23963 if (flags & NDR_IN) {
23964 ZERO_STRUCT(r->out);
23966 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
23967 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
23969 if (flags & NDR_OUT) {
23970 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
23971 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
23972 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
23973 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23974 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
23975 NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
23977 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
23978 NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
23980 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
23982 return NDR_ERR_SUCCESS;
23985 _PUBLIC_ void ndr_print_spoolss_EnumMonitors(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumMonitors *r)
23987 uint32_t cntr_info_2;
23988 ndr_print_struct(ndr, name, "spoolss_EnumMonitors");
23989 ndr->depth++;
23990 if (flags & NDR_SET_VALUES) {
23991 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
23993 if (flags & NDR_IN) {
23994 ndr_print_struct(ndr, "in", "spoolss_EnumMonitors");
23995 ndr->depth++;
23996 ndr_print_ptr(ndr, "servername", r->in.servername);
23997 ndr->depth++;
23998 if (r->in.servername) {
23999 ndr_print_string(ndr, "servername", r->in.servername);
24001 ndr->depth--;
24002 ndr_print_uint32(ndr, "level", r->in.level);
24003 ndr_print_ptr(ndr, "buffer", r->in.buffer);
24004 ndr->depth++;
24005 if (r->in.buffer) {
24006 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
24008 ndr->depth--;
24009 ndr_print_uint32(ndr, "offered", r->in.offered);
24010 ndr->depth--;
24012 if (flags & NDR_OUT) {
24013 ndr_print_struct(ndr, "out", "spoolss_EnumMonitors");
24014 ndr->depth++;
24015 ndr_print_ptr(ndr, "count", r->out.count);
24016 ndr->depth++;
24017 ndr_print_uint32(ndr, "count", *r->out.count);
24018 ndr->depth--;
24019 ndr_print_ptr(ndr, "info", r->out.info);
24020 ndr->depth++;
24021 ndr_print_ptr(ndr, "info", *r->out.info);
24022 ndr->depth++;
24023 if (*r->out.info) {
24024 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
24025 ndr->depth++;
24026 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
24027 char *idx_2=NULL;
24028 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
24029 ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
24030 ndr_print_spoolss_MonitorInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
24031 free(idx_2);
24034 ndr->depth--;
24036 ndr->depth--;
24037 ndr->depth--;
24038 ndr_print_ptr(ndr, "needed", r->out.needed);
24039 ndr->depth++;
24040 ndr_print_uint32(ndr, "needed", *r->out.needed);
24041 ndr->depth--;
24042 ndr_print_WERROR(ndr, "result", r->out.result);
24043 ndr->depth--;
24045 ndr->depth--;
24048 static enum ndr_err_code ndr_push_spoolss_AddPort(struct ndr_push *ndr, int flags, const struct spoolss_AddPort *r)
24050 if (flags & NDR_IN) {
24051 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_name));
24052 if (r->in.server_name) {
24053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
24054 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
24055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
24056 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
24059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.monitor_name, CH_UTF16)));
24060 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
24061 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.monitor_name, CH_UTF16)));
24062 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.monitor_name, ndr_charset_length(r->in.monitor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24064 if (flags & NDR_OUT) {
24065 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24067 return NDR_ERR_SUCCESS;
24070 static enum ndr_err_code ndr_pull_spoolss_AddPort(struct ndr_pull *ndr, int flags, struct spoolss_AddPort *r)
24072 uint32_t _ptr_server_name;
24073 TALLOC_CTX *_mem_save_server_name_0;
24074 if (flags & NDR_IN) {
24075 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
24076 if (_ptr_server_name) {
24077 NDR_PULL_ALLOC(ndr, r->in.server_name);
24078 } else {
24079 r->in.server_name = NULL;
24081 if (r->in.server_name) {
24082 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
24083 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_name, 0);
24084 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
24085 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
24086 if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
24087 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
24089 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
24090 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
24091 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
24093 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
24094 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.monitor_name));
24095 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.monitor_name));
24096 if (ndr_get_array_length(ndr, &r->in.monitor_name) > ndr_get_array_size(ndr, &r->in.monitor_name)) {
24097 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.monitor_name), ndr_get_array_length(ndr, &r->in.monitor_name));
24099 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.monitor_name), sizeof(uint16_t)));
24100 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.monitor_name, ndr_get_array_length(ndr, &r->in.monitor_name), sizeof(uint16_t), CH_UTF16));
24102 if (flags & NDR_OUT) {
24103 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24105 return NDR_ERR_SUCCESS;
24108 _PUBLIC_ void ndr_print_spoolss_AddPort(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPort *r)
24110 ndr_print_struct(ndr, name, "spoolss_AddPort");
24111 ndr->depth++;
24112 if (flags & NDR_SET_VALUES) {
24113 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24115 if (flags & NDR_IN) {
24116 ndr_print_struct(ndr, "in", "spoolss_AddPort");
24117 ndr->depth++;
24118 ndr_print_ptr(ndr, "server_name", r->in.server_name);
24119 ndr->depth++;
24120 if (r->in.server_name) {
24121 ndr_print_string(ndr, "server_name", r->in.server_name);
24123 ndr->depth--;
24124 ndr_print_uint32(ndr, "unknown", r->in.unknown);
24125 ndr_print_string(ndr, "monitor_name", r->in.monitor_name);
24126 ndr->depth--;
24128 if (flags & NDR_OUT) {
24129 ndr_print_struct(ndr, "out", "spoolss_AddPort");
24130 ndr->depth++;
24131 ndr_print_WERROR(ndr, "result", r->out.result);
24132 ndr->depth--;
24134 ndr->depth--;
24137 static enum ndr_err_code ndr_push_spoolss_ConfigurePort(struct ndr_push *ndr, int flags, const struct spoolss_ConfigurePort *r)
24139 if (flags & NDR_IN) {
24141 if (flags & NDR_OUT) {
24142 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24144 return NDR_ERR_SUCCESS;
24147 static enum ndr_err_code ndr_pull_spoolss_ConfigurePort(struct ndr_pull *ndr, int flags, struct spoolss_ConfigurePort *r)
24149 if (flags & NDR_IN) {
24151 if (flags & NDR_OUT) {
24152 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24154 return NDR_ERR_SUCCESS;
24157 _PUBLIC_ void ndr_print_spoolss_ConfigurePort(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ConfigurePort *r)
24159 ndr_print_struct(ndr, name, "spoolss_ConfigurePort");
24160 ndr->depth++;
24161 if (flags & NDR_SET_VALUES) {
24162 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24164 if (flags & NDR_IN) {
24165 ndr_print_struct(ndr, "in", "spoolss_ConfigurePort");
24166 ndr->depth++;
24167 ndr->depth--;
24169 if (flags & NDR_OUT) {
24170 ndr_print_struct(ndr, "out", "spoolss_ConfigurePort");
24171 ndr->depth++;
24172 ndr_print_WERROR(ndr, "result", r->out.result);
24173 ndr->depth--;
24175 ndr->depth--;
24178 static enum ndr_err_code ndr_push_spoolss_DeletePort(struct ndr_push *ndr, int flags, const struct spoolss_DeletePort *r)
24180 if (flags & NDR_IN) {
24182 if (flags & NDR_OUT) {
24183 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24185 return NDR_ERR_SUCCESS;
24188 static enum ndr_err_code ndr_pull_spoolss_DeletePort(struct ndr_pull *ndr, int flags, struct spoolss_DeletePort *r)
24190 if (flags & NDR_IN) {
24192 if (flags & NDR_OUT) {
24193 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24195 return NDR_ERR_SUCCESS;
24198 _PUBLIC_ void ndr_print_spoolss_DeletePort(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePort *r)
24200 ndr_print_struct(ndr, name, "spoolss_DeletePort");
24201 ndr->depth++;
24202 if (flags & NDR_SET_VALUES) {
24203 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24205 if (flags & NDR_IN) {
24206 ndr_print_struct(ndr, "in", "spoolss_DeletePort");
24207 ndr->depth++;
24208 ndr->depth--;
24210 if (flags & NDR_OUT) {
24211 ndr_print_struct(ndr, "out", "spoolss_DeletePort");
24212 ndr->depth++;
24213 ndr_print_WERROR(ndr, "result", r->out.result);
24214 ndr->depth--;
24216 ndr->depth--;
24219 static enum ndr_err_code ndr_push_spoolss_CreatePrinterIC(struct ndr_push *ndr, int flags, const struct spoolss_CreatePrinterIC *r)
24221 if (flags & NDR_IN) {
24222 if (r->in.handle == NULL) {
24223 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
24225 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
24226 if (r->in.devmode_ctr == NULL) {
24227 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
24229 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
24231 if (flags & NDR_OUT) {
24232 if (r->out.gdi_handle == NULL) {
24233 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
24235 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle));
24236 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24238 return NDR_ERR_SUCCESS;
24241 static enum ndr_err_code ndr_pull_spoolss_CreatePrinterIC(struct ndr_pull *ndr, int flags, struct spoolss_CreatePrinterIC *r)
24243 TALLOC_CTX *_mem_save_handle_0;
24244 TALLOC_CTX *_mem_save_gdi_handle_0;
24245 TALLOC_CTX *_mem_save_devmode_ctr_0;
24246 if (flags & NDR_IN) {
24247 ZERO_STRUCT(r->out);
24249 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
24250 NDR_PULL_ALLOC(ndr, r->in.handle);
24252 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
24253 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
24254 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
24255 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
24256 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
24257 NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
24259 _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
24260 NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
24261 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
24262 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
24263 NDR_PULL_ALLOC(ndr, r->out.gdi_handle);
24264 ZERO_STRUCTP(r->out.gdi_handle);
24266 if (flags & NDR_OUT) {
24267 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
24268 NDR_PULL_ALLOC(ndr, r->out.gdi_handle);
24270 _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
24271 NDR_PULL_SET_MEM_CTX(ndr, r->out.gdi_handle, LIBNDR_FLAG_REF_ALLOC);
24272 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle));
24273 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC);
24274 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24276 return NDR_ERR_SUCCESS;
24279 _PUBLIC_ void ndr_print_spoolss_CreatePrinterIC(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_CreatePrinterIC *r)
24281 ndr_print_struct(ndr, name, "spoolss_CreatePrinterIC");
24282 ndr->depth++;
24283 if (flags & NDR_SET_VALUES) {
24284 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24286 if (flags & NDR_IN) {
24287 ndr_print_struct(ndr, "in", "spoolss_CreatePrinterIC");
24288 ndr->depth++;
24289 ndr_print_ptr(ndr, "handle", r->in.handle);
24290 ndr->depth++;
24291 ndr_print_policy_handle(ndr, "handle", r->in.handle);
24292 ndr->depth--;
24293 ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
24294 ndr->depth++;
24295 ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
24296 ndr->depth--;
24297 ndr->depth--;
24299 if (flags & NDR_OUT) {
24300 ndr_print_struct(ndr, "out", "spoolss_CreatePrinterIC");
24301 ndr->depth++;
24302 ndr_print_ptr(ndr, "gdi_handle", r->out.gdi_handle);
24303 ndr->depth++;
24304 ndr_print_policy_handle(ndr, "gdi_handle", r->out.gdi_handle);
24305 ndr->depth--;
24306 ndr_print_WERROR(ndr, "result", r->out.result);
24307 ndr->depth--;
24309 ndr->depth--;
24312 static enum ndr_err_code ndr_push_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_push *ndr, int flags, const struct spoolss_PlayGDIScriptOnPrinterIC *r)
24314 if (flags & NDR_IN) {
24316 if (flags & NDR_OUT) {
24317 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24319 return NDR_ERR_SUCCESS;
24322 static enum ndr_err_code ndr_pull_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_pull *ndr, int flags, struct spoolss_PlayGDIScriptOnPrinterIC *r)
24324 if (flags & NDR_IN) {
24326 if (flags & NDR_OUT) {
24327 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24329 return NDR_ERR_SUCCESS;
24332 _PUBLIC_ void ndr_print_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_PlayGDIScriptOnPrinterIC *r)
24334 ndr_print_struct(ndr, name, "spoolss_PlayGDIScriptOnPrinterIC");
24335 ndr->depth++;
24336 if (flags & NDR_SET_VALUES) {
24337 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24339 if (flags & NDR_IN) {
24340 ndr_print_struct(ndr, "in", "spoolss_PlayGDIScriptOnPrinterIC");
24341 ndr->depth++;
24342 ndr->depth--;
24344 if (flags & NDR_OUT) {
24345 ndr_print_struct(ndr, "out", "spoolss_PlayGDIScriptOnPrinterIC");
24346 ndr->depth++;
24347 ndr_print_WERROR(ndr, "result", r->out.result);
24348 ndr->depth--;
24350 ndr->depth--;
24353 static enum ndr_err_code ndr_push_spoolss_DeletePrinterIC(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterIC *r)
24355 if (flags & NDR_IN) {
24356 if (r->in.gdi_handle == NULL) {
24357 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
24359 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle));
24361 if (flags & NDR_OUT) {
24362 if (r->out.gdi_handle == NULL) {
24363 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
24365 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle));
24366 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24368 return NDR_ERR_SUCCESS;
24371 static enum ndr_err_code ndr_pull_spoolss_DeletePrinterIC(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterIC *r)
24373 TALLOC_CTX *_mem_save_gdi_handle_0;
24374 if (flags & NDR_IN) {
24375 ZERO_STRUCT(r->out);
24377 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
24378 NDR_PULL_ALLOC(ndr, r->in.gdi_handle);
24380 _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
24381 NDR_PULL_SET_MEM_CTX(ndr, r->in.gdi_handle, LIBNDR_FLAG_REF_ALLOC);
24382 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.gdi_handle));
24383 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC);
24384 NDR_PULL_ALLOC(ndr, r->out.gdi_handle);
24385 *r->out.gdi_handle = *r->in.gdi_handle;
24387 if (flags & NDR_OUT) {
24388 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
24389 NDR_PULL_ALLOC(ndr, r->out.gdi_handle);
24391 _mem_save_gdi_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
24392 NDR_PULL_SET_MEM_CTX(ndr, r->out.gdi_handle, LIBNDR_FLAG_REF_ALLOC);
24393 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.gdi_handle));
24394 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_gdi_handle_0, LIBNDR_FLAG_REF_ALLOC);
24395 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24397 return NDR_ERR_SUCCESS;
24400 _PUBLIC_ void ndr_print_spoolss_DeletePrinterIC(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrinterIC *r)
24402 ndr_print_struct(ndr, name, "spoolss_DeletePrinterIC");
24403 ndr->depth++;
24404 if (flags & NDR_SET_VALUES) {
24405 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24407 if (flags & NDR_IN) {
24408 ndr_print_struct(ndr, "in", "spoolss_DeletePrinterIC");
24409 ndr->depth++;
24410 ndr_print_ptr(ndr, "gdi_handle", r->in.gdi_handle);
24411 ndr->depth++;
24412 ndr_print_policy_handle(ndr, "gdi_handle", r->in.gdi_handle);
24413 ndr->depth--;
24414 ndr->depth--;
24416 if (flags & NDR_OUT) {
24417 ndr_print_struct(ndr, "out", "spoolss_DeletePrinterIC");
24418 ndr->depth++;
24419 ndr_print_ptr(ndr, "gdi_handle", r->out.gdi_handle);
24420 ndr->depth++;
24421 ndr_print_policy_handle(ndr, "gdi_handle", r->out.gdi_handle);
24422 ndr->depth--;
24423 ndr_print_WERROR(ndr, "result", r->out.result);
24424 ndr->depth--;
24426 ndr->depth--;
24429 static enum ndr_err_code ndr_push_spoolss_AddPrinterConnection(struct ndr_push *ndr, int flags, const struct spoolss_AddPrinterConnection *r)
24431 if (flags & NDR_IN) {
24433 if (flags & NDR_OUT) {
24434 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24436 return NDR_ERR_SUCCESS;
24439 static enum ndr_err_code ndr_pull_spoolss_AddPrinterConnection(struct ndr_pull *ndr, int flags, struct spoolss_AddPrinterConnection *r)
24441 if (flags & NDR_IN) {
24443 if (flags & NDR_OUT) {
24444 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24446 return NDR_ERR_SUCCESS;
24449 _PUBLIC_ void ndr_print_spoolss_AddPrinterConnection(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPrinterConnection *r)
24451 ndr_print_struct(ndr, name, "spoolss_AddPrinterConnection");
24452 ndr->depth++;
24453 if (flags & NDR_SET_VALUES) {
24454 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24456 if (flags & NDR_IN) {
24457 ndr_print_struct(ndr, "in", "spoolss_AddPrinterConnection");
24458 ndr->depth++;
24459 ndr->depth--;
24461 if (flags & NDR_OUT) {
24462 ndr_print_struct(ndr, "out", "spoolss_AddPrinterConnection");
24463 ndr->depth++;
24464 ndr_print_WERROR(ndr, "result", r->out.result);
24465 ndr->depth--;
24467 ndr->depth--;
24470 static enum ndr_err_code ndr_push_spoolss_DeletePrinterConnection(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterConnection *r)
24472 if (flags & NDR_IN) {
24474 if (flags & NDR_OUT) {
24475 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24477 return NDR_ERR_SUCCESS;
24480 static enum ndr_err_code ndr_pull_spoolss_DeletePrinterConnection(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterConnection *r)
24482 if (flags & NDR_IN) {
24484 if (flags & NDR_OUT) {
24485 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24487 return NDR_ERR_SUCCESS;
24490 _PUBLIC_ void ndr_print_spoolss_DeletePrinterConnection(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrinterConnection *r)
24492 ndr_print_struct(ndr, name, "spoolss_DeletePrinterConnection");
24493 ndr->depth++;
24494 if (flags & NDR_SET_VALUES) {
24495 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24497 if (flags & NDR_IN) {
24498 ndr_print_struct(ndr, "in", "spoolss_DeletePrinterConnection");
24499 ndr->depth++;
24500 ndr->depth--;
24502 if (flags & NDR_OUT) {
24503 ndr_print_struct(ndr, "out", "spoolss_DeletePrinterConnection");
24504 ndr->depth++;
24505 ndr_print_WERROR(ndr, "result", r->out.result);
24506 ndr->depth--;
24508 ndr->depth--;
24511 static enum ndr_err_code ndr_push_spoolss_PrinterMessageBox(struct ndr_push *ndr, int flags, const struct spoolss_PrinterMessageBox *r)
24513 if (flags & NDR_IN) {
24515 if (flags & NDR_OUT) {
24516 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24518 return NDR_ERR_SUCCESS;
24521 static enum ndr_err_code ndr_pull_spoolss_PrinterMessageBox(struct ndr_pull *ndr, int flags, struct spoolss_PrinterMessageBox *r)
24523 if (flags & NDR_IN) {
24525 if (flags & NDR_OUT) {
24526 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24528 return NDR_ERR_SUCCESS;
24531 _PUBLIC_ void ndr_print_spoolss_PrinterMessageBox(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_PrinterMessageBox *r)
24533 ndr_print_struct(ndr, name, "spoolss_PrinterMessageBox");
24534 ndr->depth++;
24535 if (flags & NDR_SET_VALUES) {
24536 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24538 if (flags & NDR_IN) {
24539 ndr_print_struct(ndr, "in", "spoolss_PrinterMessageBox");
24540 ndr->depth++;
24541 ndr->depth--;
24543 if (flags & NDR_OUT) {
24544 ndr_print_struct(ndr, "out", "spoolss_PrinterMessageBox");
24545 ndr->depth++;
24546 ndr_print_WERROR(ndr, "result", r->out.result);
24547 ndr->depth--;
24549 ndr->depth--;
24552 static enum ndr_err_code ndr_push_spoolss_AddMonitor(struct ndr_push *ndr, int flags, const struct spoolss_AddMonitor *r)
24554 if (flags & NDR_IN) {
24556 if (flags & NDR_OUT) {
24557 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24559 return NDR_ERR_SUCCESS;
24562 static enum ndr_err_code ndr_pull_spoolss_AddMonitor(struct ndr_pull *ndr, int flags, struct spoolss_AddMonitor *r)
24564 if (flags & NDR_IN) {
24566 if (flags & NDR_OUT) {
24567 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24569 return NDR_ERR_SUCCESS;
24572 _PUBLIC_ void ndr_print_spoolss_AddMonitor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddMonitor *r)
24574 ndr_print_struct(ndr, name, "spoolss_AddMonitor");
24575 ndr->depth++;
24576 if (flags & NDR_SET_VALUES) {
24577 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24579 if (flags & NDR_IN) {
24580 ndr_print_struct(ndr, "in", "spoolss_AddMonitor");
24581 ndr->depth++;
24582 ndr->depth--;
24584 if (flags & NDR_OUT) {
24585 ndr_print_struct(ndr, "out", "spoolss_AddMonitor");
24586 ndr->depth++;
24587 ndr_print_WERROR(ndr, "result", r->out.result);
24588 ndr->depth--;
24590 ndr->depth--;
24593 static enum ndr_err_code ndr_push_spoolss_DeleteMonitor(struct ndr_push *ndr, int flags, const struct spoolss_DeleteMonitor *r)
24595 if (flags & NDR_IN) {
24597 if (flags & NDR_OUT) {
24598 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24600 return NDR_ERR_SUCCESS;
24603 static enum ndr_err_code ndr_pull_spoolss_DeleteMonitor(struct ndr_pull *ndr, int flags, struct spoolss_DeleteMonitor *r)
24605 if (flags & NDR_IN) {
24607 if (flags & NDR_OUT) {
24608 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24610 return NDR_ERR_SUCCESS;
24613 _PUBLIC_ void ndr_print_spoolss_DeleteMonitor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeleteMonitor *r)
24615 ndr_print_struct(ndr, name, "spoolss_DeleteMonitor");
24616 ndr->depth++;
24617 if (flags & NDR_SET_VALUES) {
24618 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24620 if (flags & NDR_IN) {
24621 ndr_print_struct(ndr, "in", "spoolss_DeleteMonitor");
24622 ndr->depth++;
24623 ndr->depth--;
24625 if (flags & NDR_OUT) {
24626 ndr_print_struct(ndr, "out", "spoolss_DeleteMonitor");
24627 ndr->depth++;
24628 ndr_print_WERROR(ndr, "result", r->out.result);
24629 ndr->depth--;
24631 ndr->depth--;
24634 static enum ndr_err_code ndr_push_spoolss_DeletePrintProcessor(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrintProcessor *r)
24636 if (flags & NDR_IN) {
24638 if (flags & NDR_OUT) {
24639 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24641 return NDR_ERR_SUCCESS;
24644 static enum ndr_err_code ndr_pull_spoolss_DeletePrintProcessor(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrintProcessor *r)
24646 if (flags & NDR_IN) {
24648 if (flags & NDR_OUT) {
24649 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24651 return NDR_ERR_SUCCESS;
24654 _PUBLIC_ void ndr_print_spoolss_DeletePrintProcessor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrintProcessor *r)
24656 ndr_print_struct(ndr, name, "spoolss_DeletePrintProcessor");
24657 ndr->depth++;
24658 if (flags & NDR_SET_VALUES) {
24659 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24661 if (flags & NDR_IN) {
24662 ndr_print_struct(ndr, "in", "spoolss_DeletePrintProcessor");
24663 ndr->depth++;
24664 ndr->depth--;
24666 if (flags & NDR_OUT) {
24667 ndr_print_struct(ndr, "out", "spoolss_DeletePrintProcessor");
24668 ndr->depth++;
24669 ndr_print_WERROR(ndr, "result", r->out.result);
24670 ndr->depth--;
24672 ndr->depth--;
24675 static enum ndr_err_code ndr_push_spoolss_AddPrintProvidor(struct ndr_push *ndr, int flags, const struct spoolss_AddPrintProvidor *r)
24677 if (flags & NDR_IN) {
24679 if (flags & NDR_OUT) {
24680 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24682 return NDR_ERR_SUCCESS;
24685 static enum ndr_err_code ndr_pull_spoolss_AddPrintProvidor(struct ndr_pull *ndr, int flags, struct spoolss_AddPrintProvidor *r)
24687 if (flags & NDR_IN) {
24689 if (flags & NDR_OUT) {
24690 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24692 return NDR_ERR_SUCCESS;
24695 _PUBLIC_ void ndr_print_spoolss_AddPrintProvidor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPrintProvidor *r)
24697 ndr_print_struct(ndr, name, "spoolss_AddPrintProvidor");
24698 ndr->depth++;
24699 if (flags & NDR_SET_VALUES) {
24700 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24702 if (flags & NDR_IN) {
24703 ndr_print_struct(ndr, "in", "spoolss_AddPrintProvidor");
24704 ndr->depth++;
24705 ndr->depth--;
24707 if (flags & NDR_OUT) {
24708 ndr_print_struct(ndr, "out", "spoolss_AddPrintProvidor");
24709 ndr->depth++;
24710 ndr_print_WERROR(ndr, "result", r->out.result);
24711 ndr->depth--;
24713 ndr->depth--;
24716 static enum ndr_err_code ndr_push_spoolss_DeletePrintProvidor(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrintProvidor *r)
24718 if (flags & NDR_IN) {
24720 if (flags & NDR_OUT) {
24721 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24723 return NDR_ERR_SUCCESS;
24726 static enum ndr_err_code ndr_pull_spoolss_DeletePrintProvidor(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrintProvidor *r)
24728 if (flags & NDR_IN) {
24730 if (flags & NDR_OUT) {
24731 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24733 return NDR_ERR_SUCCESS;
24736 _PUBLIC_ void ndr_print_spoolss_DeletePrintProvidor(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrintProvidor *r)
24738 ndr_print_struct(ndr, name, "spoolss_DeletePrintProvidor");
24739 ndr->depth++;
24740 if (flags & NDR_SET_VALUES) {
24741 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24743 if (flags & NDR_IN) {
24744 ndr_print_struct(ndr, "in", "spoolss_DeletePrintProvidor");
24745 ndr->depth++;
24746 ndr->depth--;
24748 if (flags & NDR_OUT) {
24749 ndr_print_struct(ndr, "out", "spoolss_DeletePrintProvidor");
24750 ndr->depth++;
24751 ndr_print_WERROR(ndr, "result", r->out.result);
24752 ndr->depth--;
24754 ndr->depth--;
24757 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrintProcDataTypes *r)
24759 if (flags & NDR_IN) {
24760 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
24761 if (r->in.servername) {
24762 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
24763 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
24764 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
24765 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24767 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.print_processor_name));
24768 if (r->in.print_processor_name) {
24769 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
24770 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
24771 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.print_processor_name, CH_UTF16)));
24772 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.print_processor_name, ndr_charset_length(r->in.print_processor_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24774 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
24775 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
24776 if (r->in.buffer) {
24777 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
24779 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
24781 if (flags & NDR_OUT) {
24782 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
24783 if (r->out.info) {
24784 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->out.info));
24786 if (r->out.needed == NULL) {
24787 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
24789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
24790 if (r->out.count == NULL) {
24791 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
24793 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
24794 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
24796 return NDR_ERR_SUCCESS;
24799 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrintProcDataTypes *r)
24801 uint32_t _ptr_servername;
24802 uint32_t _ptr_print_processor_name;
24803 uint32_t _ptr_buffer;
24804 uint32_t _ptr_info;
24805 TALLOC_CTX *_mem_save_servername_0;
24806 TALLOC_CTX *_mem_save_print_processor_name_0;
24807 TALLOC_CTX *_mem_save_buffer_0;
24808 TALLOC_CTX *_mem_save_info_0;
24809 TALLOC_CTX *_mem_save_needed_0;
24810 TALLOC_CTX *_mem_save_count_0;
24811 if (flags & NDR_IN) {
24812 ZERO_STRUCT(r->out);
24814 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
24815 if (_ptr_servername) {
24816 NDR_PULL_ALLOC(ndr, r->in.servername);
24817 } else {
24818 r->in.servername = NULL;
24820 if (r->in.servername) {
24821 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
24822 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
24823 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
24824 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
24825 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
24826 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
24828 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
24829 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
24830 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
24832 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor_name));
24833 if (_ptr_print_processor_name) {
24834 NDR_PULL_ALLOC(ndr, r->in.print_processor_name);
24835 } else {
24836 r->in.print_processor_name = NULL;
24838 if (r->in.print_processor_name) {
24839 _mem_save_print_processor_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
24840 NDR_PULL_SET_MEM_CTX(ndr, r->in.print_processor_name, 0);
24841 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.print_processor_name));
24842 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.print_processor_name));
24843 if (ndr_get_array_length(ndr, &r->in.print_processor_name) > ndr_get_array_size(ndr, &r->in.print_processor_name)) {
24844 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.print_processor_name), ndr_get_array_length(ndr, &r->in.print_processor_name));
24846 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.print_processor_name), sizeof(uint16_t)));
24847 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.print_processor_name, ndr_get_array_length(ndr, &r->in.print_processor_name), sizeof(uint16_t), CH_UTF16));
24848 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_name_0, 0);
24850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
24851 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
24852 if (_ptr_buffer) {
24853 NDR_PULL_ALLOC(ndr, r->in.buffer);
24854 } else {
24855 r->in.buffer = NULL;
24857 if (r->in.buffer) {
24858 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
24859 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
24860 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
24861 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
24863 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
24864 NDR_PULL_ALLOC(ndr, r->out.needed);
24865 ZERO_STRUCTP(r->out.needed);
24866 NDR_PULL_ALLOC(ndr, r->out.count);
24867 ZERO_STRUCTP(r->out.count);
24869 if (flags & NDR_OUT) {
24870 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
24871 if (_ptr_info) {
24872 NDR_PULL_ALLOC(ndr, r->out.info);
24873 } else {
24874 r->out.info = NULL;
24876 if (r->out.info) {
24877 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
24878 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
24879 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
24880 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
24882 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
24883 NDR_PULL_ALLOC(ndr, r->out.needed);
24885 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
24886 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
24887 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
24888 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
24889 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
24890 NDR_PULL_ALLOC(ndr, r->out.count);
24892 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
24893 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
24894 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
24895 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
24896 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
24898 return NDR_ERR_SUCCESS;
24901 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrintProcDataTypes(struct ndr_push *ndr, int flags, const struct __spoolss_EnumPrintProcDataTypes *r)
24903 uint32_t cntr_info_0;
24904 if (flags & NDR_IN) {
24905 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
24906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
24908 if (flags & NDR_OUT) {
24909 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
24910 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
24911 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
24913 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
24914 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
24917 return NDR_ERR_SUCCESS;
24920 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrintProcDataTypes(struct ndr_pull *ndr, int flags, struct __spoolss_EnumPrintProcDataTypes *r)
24922 uint32_t cntr_info_0;
24923 TALLOC_CTX *_mem_save_info_0;
24924 if (flags & NDR_IN) {
24925 ZERO_STRUCT(r->out);
24927 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
24928 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
24930 if (flags & NDR_OUT) {
24931 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
24932 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
24933 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
24934 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
24935 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->out.info[cntr_info_0], r->in.level));
24936 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
24938 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
24939 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
24941 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
24943 return NDR_ERR_SUCCESS;
24946 _PUBLIC_ void ndr_print_spoolss_EnumPrintProcDataTypes(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrintProcDataTypes *r)
24948 uint32_t cntr_info_2;
24949 ndr_print_struct(ndr, name, "spoolss_EnumPrintProcDataTypes");
24950 ndr->depth++;
24951 if (flags & NDR_SET_VALUES) {
24952 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
24954 if (flags & NDR_IN) {
24955 ndr_print_struct(ndr, "in", "spoolss_EnumPrintProcDataTypes");
24956 ndr->depth++;
24957 ndr_print_ptr(ndr, "servername", r->in.servername);
24958 ndr->depth++;
24959 if (r->in.servername) {
24960 ndr_print_string(ndr, "servername", r->in.servername);
24962 ndr->depth--;
24963 ndr_print_ptr(ndr, "print_processor_name", r->in.print_processor_name);
24964 ndr->depth++;
24965 if (r->in.print_processor_name) {
24966 ndr_print_string(ndr, "print_processor_name", r->in.print_processor_name);
24968 ndr->depth--;
24969 ndr_print_uint32(ndr, "level", r->in.level);
24970 ndr_print_ptr(ndr, "buffer", r->in.buffer);
24971 ndr->depth++;
24972 if (r->in.buffer) {
24973 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
24975 ndr->depth--;
24976 ndr_print_uint32(ndr, "offered", r->in.offered);
24977 ndr->depth--;
24979 if (flags & NDR_OUT) {
24980 ndr_print_struct(ndr, "out", "spoolss_EnumPrintProcDataTypes");
24981 ndr->depth++;
24982 ndr_print_ptr(ndr, "count", r->out.count);
24983 ndr->depth++;
24984 ndr_print_uint32(ndr, "count", *r->out.count);
24985 ndr->depth--;
24986 ndr_print_ptr(ndr, "info", r->out.info);
24987 ndr->depth++;
24988 ndr_print_ptr(ndr, "info", *r->out.info);
24989 ndr->depth++;
24990 if (*r->out.info) {
24991 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
24992 ndr->depth++;
24993 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
24994 char *idx_2=NULL;
24995 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
24996 ndr_print_set_switch_value(ndr, &(*r->out.info)[cntr_info_2], r->in.level);
24997 ndr_print_spoolss_PrintProcDataTypesInfo(ndr, "info", &(*r->out.info)[cntr_info_2]);
24998 free(idx_2);
25001 ndr->depth--;
25003 ndr->depth--;
25004 ndr->depth--;
25005 ndr_print_ptr(ndr, "needed", r->out.needed);
25006 ndr->depth++;
25007 ndr_print_uint32(ndr, "needed", *r->out.needed);
25008 ndr->depth--;
25009 ndr_print_WERROR(ndr, "result", r->out.result);
25010 ndr->depth--;
25012 ndr->depth--;
25015 static enum ndr_err_code ndr_push_spoolss_ResetPrinter(struct ndr_push *ndr, int flags, const struct spoolss_ResetPrinter *r)
25017 if (flags & NDR_IN) {
25018 if (r->in.handle == NULL) {
25019 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25021 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25022 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_type));
25023 if (r->in.data_type) {
25024 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.data_type, CH_UTF16)));
25025 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
25026 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.data_type, CH_UTF16)));
25027 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.data_type, ndr_charset_length(r->in.data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25029 if (r->in.devmode_ctr == NULL) {
25030 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25032 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
25034 if (flags & NDR_OUT) {
25035 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25037 return NDR_ERR_SUCCESS;
25040 static enum ndr_err_code ndr_pull_spoolss_ResetPrinter(struct ndr_pull *ndr, int flags, struct spoolss_ResetPrinter *r)
25042 uint32_t _ptr_data_type;
25043 TALLOC_CTX *_mem_save_handle_0;
25044 TALLOC_CTX *_mem_save_data_type_0;
25045 TALLOC_CTX *_mem_save_devmode_ctr_0;
25046 if (flags & NDR_IN) {
25047 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25048 NDR_PULL_ALLOC(ndr, r->in.handle);
25050 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
25051 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
25052 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25053 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
25054 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
25055 if (_ptr_data_type) {
25056 NDR_PULL_ALLOC(ndr, r->in.data_type);
25057 } else {
25058 r->in.data_type = NULL;
25060 if (r->in.data_type) {
25061 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
25062 NDR_PULL_SET_MEM_CTX(ndr, r->in.data_type, 0);
25063 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data_type));
25064 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.data_type));
25065 if (ndr_get_array_length(ndr, &r->in.data_type) > ndr_get_array_size(ndr, &r->in.data_type)) {
25066 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.data_type), ndr_get_array_length(ndr, &r->in.data_type));
25068 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.data_type), sizeof(uint16_t)));
25069 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.data_type, ndr_get_array_length(ndr, &r->in.data_type), sizeof(uint16_t), CH_UTF16));
25070 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
25072 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25073 NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
25075 _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
25076 NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
25077 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
25078 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
25080 if (flags & NDR_OUT) {
25081 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25083 return NDR_ERR_SUCCESS;
25086 _PUBLIC_ void ndr_print_spoolss_ResetPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ResetPrinter *r)
25088 ndr_print_struct(ndr, name, "spoolss_ResetPrinter");
25089 ndr->depth++;
25090 if (flags & NDR_SET_VALUES) {
25091 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25093 if (flags & NDR_IN) {
25094 ndr_print_struct(ndr, "in", "spoolss_ResetPrinter");
25095 ndr->depth++;
25096 ndr_print_ptr(ndr, "handle", r->in.handle);
25097 ndr->depth++;
25098 ndr_print_policy_handle(ndr, "handle", r->in.handle);
25099 ndr->depth--;
25100 ndr_print_ptr(ndr, "data_type", r->in.data_type);
25101 ndr->depth++;
25102 if (r->in.data_type) {
25103 ndr_print_string(ndr, "data_type", r->in.data_type);
25105 ndr->depth--;
25106 ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
25107 ndr->depth++;
25108 ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
25109 ndr->depth--;
25110 ndr->depth--;
25112 if (flags & NDR_OUT) {
25113 ndr_print_struct(ndr, "out", "spoolss_ResetPrinter");
25114 ndr->depth++;
25115 ndr_print_WERROR(ndr, "result", r->out.result);
25116 ndr->depth--;
25118 ndr->depth--;
25121 static enum ndr_err_code ndr_push_spoolss_GetPrinterDriver2(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDriver2 *r)
25123 if (flags & NDR_IN) {
25124 if (r->in.handle == NULL) {
25125 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25127 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25128 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.architecture));
25129 if (r->in.architecture) {
25130 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
25131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
25132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
25133 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
25136 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
25137 if (r->in.buffer) {
25138 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, *r->in.buffer));
25140 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
25141 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_major_version));
25142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.client_minor_version));
25144 if (flags & NDR_OUT) {
25145 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
25146 if (r->out.info) {
25148 struct ndr_push *_ndr_info;
25149 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
25150 NDR_CHECK(ndr_push_set_switch_value(_ndr_info, r->out.info, r->in.level));
25151 NDR_CHECK(ndr_push_spoolss_DriverInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
25152 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
25155 if (r->out.needed == NULL) {
25156 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
25159 if (r->out.server_major_version == NULL) {
25160 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.server_major_version));
25163 if (r->out.server_minor_version == NULL) {
25164 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.server_minor_version));
25167 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25169 return NDR_ERR_SUCCESS;
25172 static enum ndr_err_code ndr_pull_spoolss_GetPrinterDriver2(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDriver2 *r)
25174 uint32_t _ptr_architecture;
25175 uint32_t _ptr_buffer;
25176 uint32_t _ptr_info;
25177 TALLOC_CTX *_mem_save_handle_0;
25178 TALLOC_CTX *_mem_save_architecture_0;
25179 TALLOC_CTX *_mem_save_buffer_0;
25180 TALLOC_CTX *_mem_save_info_0;
25181 TALLOC_CTX *_mem_save_needed_0;
25182 TALLOC_CTX *_mem_save_server_major_version_0;
25183 TALLOC_CTX *_mem_save_server_minor_version_0;
25184 if (flags & NDR_IN) {
25185 ZERO_STRUCT(r->out);
25187 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25188 NDR_PULL_ALLOC(ndr, r->in.handle);
25190 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
25191 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
25192 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
25194 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_architecture));
25195 if (_ptr_architecture) {
25196 NDR_PULL_ALLOC(ndr, r->in.architecture);
25197 } else {
25198 r->in.architecture = NULL;
25200 if (r->in.architecture) {
25201 _mem_save_architecture_0 = NDR_PULL_GET_MEM_CTX(ndr);
25202 NDR_PULL_SET_MEM_CTX(ndr, r->in.architecture, 0);
25203 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
25204 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
25205 if (ndr_get_array_length(ndr, &r->in.architecture) > ndr_get_array_size(ndr, &r->in.architecture)) {
25206 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.architecture), ndr_get_array_length(ndr, &r->in.architecture));
25208 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t)));
25209 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t), CH_UTF16));
25210 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_architecture_0, 0);
25212 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
25213 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
25214 if (_ptr_buffer) {
25215 NDR_PULL_ALLOC(ndr, r->in.buffer);
25216 } else {
25217 r->in.buffer = NULL;
25219 if (r->in.buffer) {
25220 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
25221 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
25222 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, r->in.buffer));
25223 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
25225 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
25226 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_major_version));
25227 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.client_minor_version));
25228 NDR_PULL_ALLOC(ndr, r->out.needed);
25229 ZERO_STRUCTP(r->out.needed);
25230 NDR_PULL_ALLOC(ndr, r->out.server_major_version);
25231 ZERO_STRUCTP(r->out.server_major_version);
25232 NDR_PULL_ALLOC(ndr, r->out.server_minor_version);
25233 ZERO_STRUCTP(r->out.server_minor_version);
25235 if (flags & NDR_OUT) {
25236 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
25237 if (_ptr_info) {
25238 NDR_PULL_ALLOC(ndr, r->out.info);
25239 } else {
25240 r->out.info = NULL;
25242 if (r->out.info) {
25243 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
25244 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
25246 struct ndr_pull *_ndr_info;
25247 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_info, 4, r->in.offered));
25248 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info, r->out.info, r->in.level));
25249 NDR_CHECK(ndr_pull_spoolss_DriverInfo(_ndr_info, NDR_SCALARS|NDR_BUFFERS, r->out.info));
25250 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_info, 4, r->in.offered));
25252 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
25254 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25255 NDR_PULL_ALLOC(ndr, r->out.needed);
25257 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
25258 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
25259 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
25260 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
25261 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25262 NDR_PULL_ALLOC(ndr, r->out.server_major_version);
25264 _mem_save_server_major_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
25265 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_major_version, LIBNDR_FLAG_REF_ALLOC);
25266 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.server_major_version));
25267 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_major_version_0, LIBNDR_FLAG_REF_ALLOC);
25268 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25269 NDR_PULL_ALLOC(ndr, r->out.server_minor_version);
25271 _mem_save_server_minor_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
25272 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_minor_version, LIBNDR_FLAG_REF_ALLOC);
25273 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.server_minor_version));
25274 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_minor_version_0, LIBNDR_FLAG_REF_ALLOC);
25275 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25277 return NDR_ERR_SUCCESS;
25280 _PUBLIC_ void ndr_print_spoolss_GetPrinterDriver2(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterDriver2 *r)
25282 ndr_print_struct(ndr, name, "spoolss_GetPrinterDriver2");
25283 ndr->depth++;
25284 if (flags & NDR_SET_VALUES) {
25285 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25287 if (flags & NDR_IN) {
25288 ndr_print_struct(ndr, "in", "spoolss_GetPrinterDriver2");
25289 ndr->depth++;
25290 ndr_print_ptr(ndr, "handle", r->in.handle);
25291 ndr->depth++;
25292 ndr_print_policy_handle(ndr, "handle", r->in.handle);
25293 ndr->depth--;
25294 ndr_print_ptr(ndr, "architecture", r->in.architecture);
25295 ndr->depth++;
25296 if (r->in.architecture) {
25297 ndr_print_string(ndr, "architecture", r->in.architecture);
25299 ndr->depth--;
25300 ndr_print_uint32(ndr, "level", r->in.level);
25301 ndr_print_ptr(ndr, "buffer", r->in.buffer);
25302 ndr->depth++;
25303 if (r->in.buffer) {
25304 ndr_print_DATA_BLOB(ndr, "buffer", *r->in.buffer);
25306 ndr->depth--;
25307 ndr_print_uint32(ndr, "offered", r->in.offered);
25308 ndr_print_uint32(ndr, "client_major_version", r->in.client_major_version);
25309 ndr_print_uint32(ndr, "client_minor_version", r->in.client_minor_version);
25310 ndr->depth--;
25312 if (flags & NDR_OUT) {
25313 ndr_print_struct(ndr, "out", "spoolss_GetPrinterDriver2");
25314 ndr->depth++;
25315 ndr_print_ptr(ndr, "info", r->out.info);
25316 ndr->depth++;
25317 if (r->out.info) {
25318 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
25319 ndr_print_spoolss_DriverInfo(ndr, "info", r->out.info);
25321 ndr->depth--;
25322 ndr_print_ptr(ndr, "needed", r->out.needed);
25323 ndr->depth++;
25324 ndr_print_uint32(ndr, "needed", *r->out.needed);
25325 ndr->depth--;
25326 ndr_print_ptr(ndr, "server_major_version", r->out.server_major_version);
25327 ndr->depth++;
25328 ndr_print_uint32(ndr, "server_major_version", *r->out.server_major_version);
25329 ndr->depth--;
25330 ndr_print_ptr(ndr, "server_minor_version", r->out.server_minor_version);
25331 ndr->depth++;
25332 ndr_print_uint32(ndr, "server_minor_version", *r->out.server_minor_version);
25333 ndr->depth--;
25334 ndr_print_WERROR(ndr, "result", r->out.result);
25335 ndr->depth--;
25337 ndr->depth--;
25340 static enum ndr_err_code ndr_push_spoolss_FindFirstPrinterChangeNotification(struct ndr_push *ndr, int flags, const struct spoolss_FindFirstPrinterChangeNotification *r)
25342 if (flags & NDR_IN) {
25344 if (flags & NDR_OUT) {
25345 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25347 return NDR_ERR_SUCCESS;
25350 static enum ndr_err_code ndr_pull_spoolss_FindFirstPrinterChangeNotification(struct ndr_pull *ndr, int flags, struct spoolss_FindFirstPrinterChangeNotification *r)
25352 if (flags & NDR_IN) {
25354 if (flags & NDR_OUT) {
25355 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25357 return NDR_ERR_SUCCESS;
25360 _PUBLIC_ void ndr_print_spoolss_FindFirstPrinterChangeNotification(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_FindFirstPrinterChangeNotification *r)
25362 ndr_print_struct(ndr, name, "spoolss_FindFirstPrinterChangeNotification");
25363 ndr->depth++;
25364 if (flags & NDR_SET_VALUES) {
25365 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25367 if (flags & NDR_IN) {
25368 ndr_print_struct(ndr, "in", "spoolss_FindFirstPrinterChangeNotification");
25369 ndr->depth++;
25370 ndr->depth--;
25372 if (flags & NDR_OUT) {
25373 ndr_print_struct(ndr, "out", "spoolss_FindFirstPrinterChangeNotification");
25374 ndr->depth++;
25375 ndr_print_WERROR(ndr, "result", r->out.result);
25376 ndr->depth--;
25378 ndr->depth--;
25381 static enum ndr_err_code ndr_push_spoolss_FindNextPrinterChangeNotification(struct ndr_push *ndr, int flags, const struct spoolss_FindNextPrinterChangeNotification *r)
25383 if (flags & NDR_IN) {
25385 if (flags & NDR_OUT) {
25386 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25388 return NDR_ERR_SUCCESS;
25391 static enum ndr_err_code ndr_pull_spoolss_FindNextPrinterChangeNotification(struct ndr_pull *ndr, int flags, struct spoolss_FindNextPrinterChangeNotification *r)
25393 if (flags & NDR_IN) {
25395 if (flags & NDR_OUT) {
25396 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25398 return NDR_ERR_SUCCESS;
25401 _PUBLIC_ void ndr_print_spoolss_FindNextPrinterChangeNotification(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_FindNextPrinterChangeNotification *r)
25403 ndr_print_struct(ndr, name, "spoolss_FindNextPrinterChangeNotification");
25404 ndr->depth++;
25405 if (flags & NDR_SET_VALUES) {
25406 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25408 if (flags & NDR_IN) {
25409 ndr_print_struct(ndr, "in", "spoolss_FindNextPrinterChangeNotification");
25410 ndr->depth++;
25411 ndr->depth--;
25413 if (flags & NDR_OUT) {
25414 ndr_print_struct(ndr, "out", "spoolss_FindNextPrinterChangeNotification");
25415 ndr->depth++;
25416 ndr_print_WERROR(ndr, "result", r->out.result);
25417 ndr->depth--;
25419 ndr->depth--;
25422 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_FindClosePrinterNotify(struct ndr_push *ndr, int flags, const struct spoolss_FindClosePrinterNotify *r)
25424 if (flags & NDR_IN) {
25425 if (r->in.handle == NULL) {
25426 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25428 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25430 if (flags & NDR_OUT) {
25431 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25433 return NDR_ERR_SUCCESS;
25436 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_FindClosePrinterNotify(struct ndr_pull *ndr, int flags, struct spoolss_FindClosePrinterNotify *r)
25438 TALLOC_CTX *_mem_save_handle_0;
25439 if (flags & NDR_IN) {
25440 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25441 NDR_PULL_ALLOC(ndr, r->in.handle);
25443 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
25444 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
25445 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
25448 if (flags & NDR_OUT) {
25449 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25451 return NDR_ERR_SUCCESS;
25454 _PUBLIC_ void ndr_print_spoolss_FindClosePrinterNotify(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_FindClosePrinterNotify *r)
25456 ndr_print_struct(ndr, name, "spoolss_FindClosePrinterNotify");
25457 ndr->depth++;
25458 if (flags & NDR_SET_VALUES) {
25459 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25461 if (flags & NDR_IN) {
25462 ndr_print_struct(ndr, "in", "spoolss_FindClosePrinterNotify");
25463 ndr->depth++;
25464 ndr_print_ptr(ndr, "handle", r->in.handle);
25465 ndr->depth++;
25466 ndr_print_policy_handle(ndr, "handle", r->in.handle);
25467 ndr->depth--;
25468 ndr->depth--;
25470 if (flags & NDR_OUT) {
25471 ndr_print_struct(ndr, "out", "spoolss_FindClosePrinterNotify");
25472 ndr->depth++;
25473 ndr_print_WERROR(ndr, "result", r->out.result);
25474 ndr->depth--;
25476 ndr->depth--;
25479 static enum ndr_err_code ndr_push_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_push *ndr, int flags, const struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
25481 if (flags & NDR_IN) {
25483 if (flags & NDR_OUT) {
25484 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25486 return NDR_ERR_SUCCESS;
25489 static enum ndr_err_code ndr_pull_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_pull *ndr, int flags, struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
25491 if (flags & NDR_IN) {
25493 if (flags & NDR_OUT) {
25494 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25496 return NDR_ERR_SUCCESS;
25499 _PUBLIC_ void ndr_print_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterFindFirstPrinterChangeNotificationOld *r)
25501 ndr_print_struct(ndr, name, "spoolss_RouterFindFirstPrinterChangeNotificationOld");
25502 ndr->depth++;
25503 if (flags & NDR_SET_VALUES) {
25504 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25506 if (flags & NDR_IN) {
25507 ndr_print_struct(ndr, "in", "spoolss_RouterFindFirstPrinterChangeNotificationOld");
25508 ndr->depth++;
25509 ndr->depth--;
25511 if (flags & NDR_OUT) {
25512 ndr_print_struct(ndr, "out", "spoolss_RouterFindFirstPrinterChangeNotificationOld");
25513 ndr->depth++;
25514 ndr_print_WERROR(ndr, "result", r->out.result);
25515 ndr->depth--;
25517 ndr->depth--;
25520 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_ReplyOpenPrinter(struct ndr_push *ndr, int flags, const struct spoolss_ReplyOpenPrinter *r)
25522 if (flags & NDR_IN) {
25523 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
25524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
25525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_name, CH_UTF16)));
25526 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_name, ndr_charset_length(r->in.server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25527 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.printer_local));
25528 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
25529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
25530 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
25531 if (r->in.buffer) {
25532 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
25533 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.bufsize));
25536 if (flags & NDR_OUT) {
25537 if (r->out.handle == NULL) {
25538 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25540 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
25541 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25543 return NDR_ERR_SUCCESS;
25546 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_ReplyOpenPrinter(struct ndr_pull *ndr, int flags, struct spoolss_ReplyOpenPrinter *r)
25548 uint32_t _ptr_buffer;
25549 TALLOC_CTX *_mem_save_buffer_0;
25550 TALLOC_CTX *_mem_save_handle_0;
25551 if (flags & NDR_IN) {
25552 ZERO_STRUCT(r->out);
25554 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_name));
25555 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_name));
25556 if (ndr_get_array_length(ndr, &r->in.server_name) > ndr_get_array_size(ndr, &r->in.server_name)) {
25557 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_name), ndr_get_array_length(ndr, &r->in.server_name));
25559 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t)));
25560 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_name, ndr_get_array_length(ndr, &r->in.server_name), sizeof(uint16_t), CH_UTF16));
25561 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.printer_local));
25562 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
25563 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
25564 if (r->in.bufsize > 512) {
25565 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
25567 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
25568 if (_ptr_buffer) {
25569 NDR_PULL_ALLOC(ndr, r->in.buffer);
25570 } else {
25571 r->in.buffer = NULL;
25573 if (r->in.buffer) {
25574 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
25575 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
25576 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
25577 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
25578 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
25579 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
25581 NDR_PULL_ALLOC(ndr, r->out.handle);
25582 ZERO_STRUCTP(r->out.handle);
25583 if (r->in.buffer) {
25584 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.bufsize));
25587 if (flags & NDR_OUT) {
25588 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25589 NDR_PULL_ALLOC(ndr, r->out.handle);
25591 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
25592 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
25593 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
25594 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
25595 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25597 return NDR_ERR_SUCCESS;
25600 _PUBLIC_ void ndr_print_spoolss_ReplyOpenPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ReplyOpenPrinter *r)
25602 ndr_print_struct(ndr, name, "spoolss_ReplyOpenPrinter");
25603 ndr->depth++;
25604 if (flags & NDR_SET_VALUES) {
25605 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25607 if (flags & NDR_IN) {
25608 ndr_print_struct(ndr, "in", "spoolss_ReplyOpenPrinter");
25609 ndr->depth++;
25610 ndr_print_string(ndr, "server_name", r->in.server_name);
25611 ndr_print_uint32(ndr, "printer_local", r->in.printer_local);
25612 ndr_print_winreg_Type(ndr, "type", r->in.type);
25613 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
25614 ndr_print_ptr(ndr, "buffer", r->in.buffer);
25615 ndr->depth++;
25616 if (r->in.buffer) {
25617 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.bufsize);
25619 ndr->depth--;
25620 ndr->depth--;
25622 if (flags & NDR_OUT) {
25623 ndr_print_struct(ndr, "out", "spoolss_ReplyOpenPrinter");
25624 ndr->depth++;
25625 ndr_print_ptr(ndr, "handle", r->out.handle);
25626 ndr->depth++;
25627 ndr_print_policy_handle(ndr, "handle", r->out.handle);
25628 ndr->depth--;
25629 ndr_print_WERROR(ndr, "result", r->out.result);
25630 ndr->depth--;
25632 ndr->depth--;
25635 static enum ndr_err_code ndr_push_spoolss_RouterReplyPrinter(struct ndr_push *ndr, int flags, const struct spoolss_RouterReplyPrinter *r)
25637 if (flags & NDR_IN) {
25638 if (r->in.handle == NULL) {
25639 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25641 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25642 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, r->in.flags));
25643 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
25644 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
25645 if (r->in.buffer) {
25646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
25647 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.bufsize));
25650 if (flags & NDR_OUT) {
25651 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25653 return NDR_ERR_SUCCESS;
25656 static enum ndr_err_code ndr_pull_spoolss_RouterReplyPrinter(struct ndr_pull *ndr, int flags, struct spoolss_RouterReplyPrinter *r)
25658 uint32_t _ptr_buffer;
25659 TALLOC_CTX *_mem_save_handle_0;
25660 TALLOC_CTX *_mem_save_buffer_0;
25661 if (flags & NDR_IN) {
25662 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25663 NDR_PULL_ALLOC(ndr, r->in.handle);
25665 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
25666 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
25667 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25668 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
25669 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, &r->in.flags));
25670 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
25671 if (r->in.bufsize > 512) {
25672 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
25674 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
25675 if (_ptr_buffer) {
25676 NDR_PULL_ALLOC(ndr, r->in.buffer);
25677 } else {
25678 r->in.buffer = NULL;
25680 if (r->in.buffer) {
25681 _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
25682 NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
25683 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
25684 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
25685 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
25686 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
25688 if (r->in.buffer) {
25689 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.bufsize));
25692 if (flags & NDR_OUT) {
25693 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25695 return NDR_ERR_SUCCESS;
25698 _PUBLIC_ void ndr_print_spoolss_RouterReplyPrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterReplyPrinter *r)
25700 ndr_print_struct(ndr, name, "spoolss_RouterReplyPrinter");
25701 ndr->depth++;
25702 if (flags & NDR_SET_VALUES) {
25703 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25705 if (flags & NDR_IN) {
25706 ndr_print_struct(ndr, "in", "spoolss_RouterReplyPrinter");
25707 ndr->depth++;
25708 ndr_print_ptr(ndr, "handle", r->in.handle);
25709 ndr->depth++;
25710 ndr_print_policy_handle(ndr, "handle", r->in.handle);
25711 ndr->depth--;
25712 ndr_print_spoolss_PrinterChangeFlags(ndr, "flags", r->in.flags);
25713 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
25714 ndr_print_ptr(ndr, "buffer", r->in.buffer);
25715 ndr->depth++;
25716 if (r->in.buffer) {
25717 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.bufsize);
25719 ndr->depth--;
25720 ndr->depth--;
25722 if (flags & NDR_OUT) {
25723 ndr_print_struct(ndr, "out", "spoolss_RouterReplyPrinter");
25724 ndr->depth++;
25725 ndr_print_WERROR(ndr, "result", r->out.result);
25726 ndr->depth--;
25728 ndr->depth--;
25731 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_ReplyClosePrinter(struct ndr_push *ndr, int flags, const struct spoolss_ReplyClosePrinter *r)
25733 if (flags & NDR_IN) {
25734 if (r->in.handle == NULL) {
25735 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25737 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25739 if (flags & NDR_OUT) {
25740 if (r->out.handle == NULL) {
25741 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25743 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
25744 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25746 return NDR_ERR_SUCCESS;
25749 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_ReplyClosePrinter(struct ndr_pull *ndr, int flags, struct spoolss_ReplyClosePrinter *r)
25751 TALLOC_CTX *_mem_save_handle_0;
25752 if (flags & NDR_IN) {
25753 ZERO_STRUCT(r->out);
25755 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25756 NDR_PULL_ALLOC(ndr, r->in.handle);
25758 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
25759 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
25760 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25761 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
25762 NDR_PULL_ALLOC(ndr, r->out.handle);
25763 *r->out.handle = *r->in.handle;
25765 if (flags & NDR_OUT) {
25766 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
25767 NDR_PULL_ALLOC(ndr, r->out.handle);
25769 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
25770 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
25771 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
25772 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
25773 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25775 return NDR_ERR_SUCCESS;
25778 _PUBLIC_ void ndr_print_spoolss_ReplyClosePrinter(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ReplyClosePrinter *r)
25780 ndr_print_struct(ndr, name, "spoolss_ReplyClosePrinter");
25781 ndr->depth++;
25782 if (flags & NDR_SET_VALUES) {
25783 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25785 if (flags & NDR_IN) {
25786 ndr_print_struct(ndr, "in", "spoolss_ReplyClosePrinter");
25787 ndr->depth++;
25788 ndr_print_ptr(ndr, "handle", r->in.handle);
25789 ndr->depth++;
25790 ndr_print_policy_handle(ndr, "handle", r->in.handle);
25791 ndr->depth--;
25792 ndr->depth--;
25794 if (flags & NDR_OUT) {
25795 ndr_print_struct(ndr, "out", "spoolss_ReplyClosePrinter");
25796 ndr->depth++;
25797 ndr_print_ptr(ndr, "handle", r->out.handle);
25798 ndr->depth++;
25799 ndr_print_policy_handle(ndr, "handle", r->out.handle);
25800 ndr->depth--;
25801 ndr_print_WERROR(ndr, "result", r->out.result);
25802 ndr->depth--;
25804 ndr->depth--;
25807 static enum ndr_err_code ndr_push_spoolss_AddPortEx(struct ndr_push *ndr, int flags, const struct spoolss_AddPortEx *r)
25809 if (flags & NDR_IN) {
25811 if (flags & NDR_OUT) {
25812 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25814 return NDR_ERR_SUCCESS;
25817 static enum ndr_err_code ndr_pull_spoolss_AddPortEx(struct ndr_pull *ndr, int flags, struct spoolss_AddPortEx *r)
25819 if (flags & NDR_IN) {
25821 if (flags & NDR_OUT) {
25822 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25824 return NDR_ERR_SUCCESS;
25827 _PUBLIC_ void ndr_print_spoolss_AddPortEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPortEx *r)
25829 ndr_print_struct(ndr, name, "spoolss_AddPortEx");
25830 ndr->depth++;
25831 if (flags & NDR_SET_VALUES) {
25832 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25834 if (flags & NDR_IN) {
25835 ndr_print_struct(ndr, "in", "spoolss_AddPortEx");
25836 ndr->depth++;
25837 ndr->depth--;
25839 if (flags & NDR_OUT) {
25840 ndr_print_struct(ndr, "out", "spoolss_AddPortEx");
25841 ndr->depth++;
25842 ndr_print_WERROR(ndr, "result", r->out.result);
25843 ndr->depth--;
25845 ndr->depth--;
25848 static enum ndr_err_code ndr_push_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_push *ndr, int flags, const struct spoolss_RouterFindFirstPrinterChangeNotification *r)
25850 if (flags & NDR_IN) {
25852 if (flags & NDR_OUT) {
25853 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25855 return NDR_ERR_SUCCESS;
25858 static enum ndr_err_code ndr_pull_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_pull *ndr, int flags, struct spoolss_RouterFindFirstPrinterChangeNotification *r)
25860 if (flags & NDR_IN) {
25862 if (flags & NDR_OUT) {
25863 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25865 return NDR_ERR_SUCCESS;
25868 _PUBLIC_ void ndr_print_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterFindFirstPrinterChangeNotification *r)
25870 ndr_print_struct(ndr, name, "spoolss_RouterFindFirstPrinterChangeNotification");
25871 ndr->depth++;
25872 if (flags & NDR_SET_VALUES) {
25873 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25875 if (flags & NDR_IN) {
25876 ndr_print_struct(ndr, "in", "spoolss_RouterFindFirstPrinterChangeNotification");
25877 ndr->depth++;
25878 ndr->depth--;
25880 if (flags & NDR_OUT) {
25881 ndr_print_struct(ndr, "out", "spoolss_RouterFindFirstPrinterChangeNotification");
25882 ndr->depth++;
25883 ndr_print_WERROR(ndr, "result", r->out.result);
25884 ndr->depth--;
25886 ndr->depth--;
25889 static enum ndr_err_code ndr_push_spoolss_SpoolerInit(struct ndr_push *ndr, int flags, const struct spoolss_SpoolerInit *r)
25891 if (flags & NDR_IN) {
25893 if (flags & NDR_OUT) {
25894 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25896 return NDR_ERR_SUCCESS;
25899 static enum ndr_err_code ndr_pull_spoolss_SpoolerInit(struct ndr_pull *ndr, int flags, struct spoolss_SpoolerInit *r)
25901 if (flags & NDR_IN) {
25903 if (flags & NDR_OUT) {
25904 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25906 return NDR_ERR_SUCCESS;
25909 _PUBLIC_ void ndr_print_spoolss_SpoolerInit(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_SpoolerInit *r)
25911 ndr_print_struct(ndr, name, "spoolss_SpoolerInit");
25912 ndr->depth++;
25913 if (flags & NDR_SET_VALUES) {
25914 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25916 if (flags & NDR_IN) {
25917 ndr_print_struct(ndr, "in", "spoolss_SpoolerInit");
25918 ndr->depth++;
25919 ndr->depth--;
25921 if (flags & NDR_OUT) {
25922 ndr_print_struct(ndr, "out", "spoolss_SpoolerInit");
25923 ndr->depth++;
25924 ndr_print_WERROR(ndr, "result", r->out.result);
25925 ndr->depth--;
25927 ndr->depth--;
25930 static enum ndr_err_code ndr_push_spoolss_ResetPrinterEx(struct ndr_push *ndr, int flags, const struct spoolss_ResetPrinterEx *r)
25932 if (flags & NDR_IN) {
25934 if (flags & NDR_OUT) {
25935 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25937 return NDR_ERR_SUCCESS;
25940 static enum ndr_err_code ndr_pull_spoolss_ResetPrinterEx(struct ndr_pull *ndr, int flags, struct spoolss_ResetPrinterEx *r)
25942 if (flags & NDR_IN) {
25944 if (flags & NDR_OUT) {
25945 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
25947 return NDR_ERR_SUCCESS;
25950 _PUBLIC_ void ndr_print_spoolss_ResetPrinterEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_ResetPrinterEx *r)
25952 ndr_print_struct(ndr, name, "spoolss_ResetPrinterEx");
25953 ndr->depth++;
25954 if (flags & NDR_SET_VALUES) {
25955 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
25957 if (flags & NDR_IN) {
25958 ndr_print_struct(ndr, "in", "spoolss_ResetPrinterEx");
25959 ndr->depth++;
25960 ndr->depth--;
25962 if (flags & NDR_OUT) {
25963 ndr_print_struct(ndr, "out", "spoolss_ResetPrinterEx");
25964 ndr->depth++;
25965 ndr_print_WERROR(ndr, "result", r->out.result);
25966 ndr->depth--;
25968 ndr->depth--;
25971 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_push *ndr, int flags, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
25973 if (flags & NDR_IN) {
25974 if (r->in.handle == NULL) {
25975 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
25977 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
25978 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, r->in.flags));
25979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
25980 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.local_machine));
25981 if (r->in.local_machine) {
25982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.local_machine, CH_UTF16)));
25983 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
25984 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.local_machine, CH_UTF16)));
25985 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.local_machine, ndr_charset_length(r->in.local_machine, CH_UTF16), sizeof(uint16_t), CH_UTF16));
25987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.printer_local));
25988 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.notify_options));
25989 if (r->in.notify_options) {
25990 NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.notify_options));
25993 if (flags & NDR_OUT) {
25994 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
25996 return NDR_ERR_SUCCESS;
25999 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_pull *ndr, int flags, struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
26001 uint32_t _ptr_local_machine;
26002 uint32_t _ptr_notify_options;
26003 TALLOC_CTX *_mem_save_handle_0;
26004 TALLOC_CTX *_mem_save_local_machine_0;
26005 TALLOC_CTX *_mem_save_notify_options_0;
26006 if (flags & NDR_IN) {
26007 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26008 NDR_PULL_ALLOC(ndr, r->in.handle);
26010 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26011 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26012 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26014 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, &r->in.flags));
26015 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
26016 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_local_machine));
26017 if (_ptr_local_machine) {
26018 NDR_PULL_ALLOC(ndr, r->in.local_machine);
26019 } else {
26020 r->in.local_machine = NULL;
26022 if (r->in.local_machine) {
26023 _mem_save_local_machine_0 = NDR_PULL_GET_MEM_CTX(ndr);
26024 NDR_PULL_SET_MEM_CTX(ndr, r->in.local_machine, 0);
26025 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.local_machine));
26026 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.local_machine));
26027 if (ndr_get_array_length(ndr, &r->in.local_machine) > ndr_get_array_size(ndr, &r->in.local_machine)) {
26028 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.local_machine), ndr_get_array_length(ndr, &r->in.local_machine));
26030 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.local_machine), sizeof(uint16_t)));
26031 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.local_machine, ndr_get_array_length(ndr, &r->in.local_machine), sizeof(uint16_t), CH_UTF16));
26032 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_local_machine_0, 0);
26034 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.printer_local));
26035 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_options));
26036 if (_ptr_notify_options) {
26037 NDR_PULL_ALLOC(ndr, r->in.notify_options);
26038 } else {
26039 r->in.notify_options = NULL;
26041 if (r->in.notify_options) {
26042 _mem_save_notify_options_0 = NDR_PULL_GET_MEM_CTX(ndr);
26043 NDR_PULL_SET_MEM_CTX(ndr, r->in.notify_options, 0);
26044 NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.notify_options));
26045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_options_0, 0);
26048 if (flags & NDR_OUT) {
26049 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26051 return NDR_ERR_SUCCESS;
26054 _PUBLIC_ void ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx *r)
26056 ndr_print_struct(ndr, name, "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
26057 ndr->depth++;
26058 if (flags & NDR_SET_VALUES) {
26059 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26061 if (flags & NDR_IN) {
26062 ndr_print_struct(ndr, "in", "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
26063 ndr->depth++;
26064 ndr_print_ptr(ndr, "handle", r->in.handle);
26065 ndr->depth++;
26066 ndr_print_policy_handle(ndr, "handle", r->in.handle);
26067 ndr->depth--;
26068 ndr_print_spoolss_PrinterChangeFlags(ndr, "flags", r->in.flags);
26069 ndr_print_uint32(ndr, "options", r->in.options);
26070 ndr_print_ptr(ndr, "local_machine", r->in.local_machine);
26071 ndr->depth++;
26072 if (r->in.local_machine) {
26073 ndr_print_string(ndr, "local_machine", r->in.local_machine);
26075 ndr->depth--;
26076 ndr_print_uint32(ndr, "printer_local", r->in.printer_local);
26077 ndr_print_ptr(ndr, "notify_options", r->in.notify_options);
26078 ndr->depth++;
26079 if (r->in.notify_options) {
26080 ndr_print_spoolss_NotifyOption(ndr, "notify_options", r->in.notify_options);
26082 ndr->depth--;
26083 ndr->depth--;
26085 if (flags & NDR_OUT) {
26086 ndr_print_struct(ndr, "out", "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
26087 ndr->depth++;
26088 ndr_print_WERROR(ndr, "result", r->out.result);
26089 ndr->depth--;
26091 ndr->depth--;
26094 static enum ndr_err_code ndr_push_spoolss_RouterReplyPrinterEx(struct ndr_push *ndr, int flags, const struct spoolss_RouterReplyPrinterEx *r)
26096 if (flags & NDR_IN) {
26097 if (r->in.handle == NULL) {
26098 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26100 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26101 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.color));
26102 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, r->in.flags));
26103 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reply_type));
26104 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.reply_type));
26105 NDR_CHECK(ndr_push_spoolss_ReplyPrinterInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
26107 if (flags & NDR_OUT) {
26108 if (r->out.reply_result == NULL) {
26109 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26111 NDR_CHECK(ndr_push_spoolss_PrinterNotifyFlags(ndr, NDR_SCALARS, *r->out.reply_result));
26112 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26114 return NDR_ERR_SUCCESS;
26117 static enum ndr_err_code ndr_pull_spoolss_RouterReplyPrinterEx(struct ndr_pull *ndr, int flags, struct spoolss_RouterReplyPrinterEx *r)
26119 TALLOC_CTX *_mem_save_handle_0;
26120 TALLOC_CTX *_mem_save_reply_result_0;
26121 if (flags & NDR_IN) {
26122 ZERO_STRUCT(r->out);
26124 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26125 NDR_PULL_ALLOC(ndr, r->in.handle);
26127 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26128 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26129 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26131 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.color));
26132 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr, NDR_SCALARS, &r->in.flags));
26133 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reply_type));
26134 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.reply_type));
26135 NDR_CHECK(ndr_pull_spoolss_ReplyPrinterInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
26136 NDR_PULL_ALLOC(ndr, r->out.reply_result);
26137 ZERO_STRUCTP(r->out.reply_result);
26139 if (flags & NDR_OUT) {
26140 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26141 NDR_PULL_ALLOC(ndr, r->out.reply_result);
26143 _mem_save_reply_result_0 = NDR_PULL_GET_MEM_CTX(ndr);
26144 NDR_PULL_SET_MEM_CTX(ndr, r->out.reply_result, LIBNDR_FLAG_REF_ALLOC);
26145 NDR_CHECK(ndr_pull_spoolss_PrinterNotifyFlags(ndr, NDR_SCALARS, r->out.reply_result));
26146 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reply_result_0, LIBNDR_FLAG_REF_ALLOC);
26147 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26149 return NDR_ERR_SUCCESS;
26152 _PUBLIC_ void ndr_print_spoolss_RouterReplyPrinterEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterReplyPrinterEx *r)
26154 ndr_print_struct(ndr, name, "spoolss_RouterReplyPrinterEx");
26155 ndr->depth++;
26156 if (flags & NDR_SET_VALUES) {
26157 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26159 if (flags & NDR_IN) {
26160 ndr_print_struct(ndr, "in", "spoolss_RouterReplyPrinterEx");
26161 ndr->depth++;
26162 ndr_print_ptr(ndr, "handle", r->in.handle);
26163 ndr->depth++;
26164 ndr_print_policy_handle(ndr, "handle", r->in.handle);
26165 ndr->depth--;
26166 ndr_print_uint32(ndr, "color", r->in.color);
26167 ndr_print_spoolss_PrinterChangeFlags(ndr, "flags", r->in.flags);
26168 ndr_print_uint32(ndr, "reply_type", r->in.reply_type);
26169 ndr_print_set_switch_value(ndr, &r->in.info, r->in.reply_type);
26170 ndr_print_spoolss_ReplyPrinterInfo(ndr, "info", &r->in.info);
26171 ndr->depth--;
26173 if (flags & NDR_OUT) {
26174 ndr_print_struct(ndr, "out", "spoolss_RouterReplyPrinterEx");
26175 ndr->depth++;
26176 ndr_print_ptr(ndr, "reply_result", r->out.reply_result);
26177 ndr->depth++;
26178 ndr_print_spoolss_PrinterNotifyFlags(ndr, "reply_result", *r->out.reply_result);
26179 ndr->depth--;
26180 ndr_print_WERROR(ndr, "result", r->out.result);
26181 ndr->depth--;
26183 ndr->depth--;
26186 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_push *ndr, int flags, const struct spoolss_RouterRefreshPrinterChangeNotify *r)
26188 if (flags & NDR_IN) {
26189 if (r->in.handle == NULL) {
26190 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26192 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26193 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.change_low));
26194 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.options));
26195 if (r->in.options) {
26196 NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.options));
26199 if (flags & NDR_OUT) {
26200 if (r->out.info == NULL) {
26201 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26203 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
26204 if (*r->out.info) {
26205 NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
26207 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26209 return NDR_ERR_SUCCESS;
26212 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_pull *ndr, int flags, struct spoolss_RouterRefreshPrinterChangeNotify *r)
26214 uint32_t _ptr_options;
26215 uint32_t _ptr_info;
26216 TALLOC_CTX *_mem_save_handle_0;
26217 TALLOC_CTX *_mem_save_options_0;
26218 TALLOC_CTX *_mem_save_info_0;
26219 TALLOC_CTX *_mem_save_info_1;
26220 if (flags & NDR_IN) {
26221 ZERO_STRUCT(r->out);
26223 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26224 NDR_PULL_ALLOC(ndr, r->in.handle);
26226 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26227 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26228 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26230 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.change_low));
26231 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_options));
26232 if (_ptr_options) {
26233 NDR_PULL_ALLOC(ndr, r->in.options);
26234 } else {
26235 r->in.options = NULL;
26237 if (r->in.options) {
26238 _mem_save_options_0 = NDR_PULL_GET_MEM_CTX(ndr);
26239 NDR_PULL_SET_MEM_CTX(ndr, r->in.options, 0);
26240 NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.options));
26241 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_options_0, 0);
26243 NDR_PULL_ALLOC(ndr, r->out.info);
26244 ZERO_STRUCTP(r->out.info);
26246 if (flags & NDR_OUT) {
26247 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26248 NDR_PULL_ALLOC(ndr, r->out.info);
26250 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
26251 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
26252 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
26253 if (_ptr_info) {
26254 NDR_PULL_ALLOC(ndr, *r->out.info);
26255 } else {
26256 *r->out.info = NULL;
26258 if (*r->out.info) {
26259 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
26260 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
26261 NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
26262 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
26264 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
26265 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26267 return NDR_ERR_SUCCESS;
26270 _PUBLIC_ void ndr_print_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_RouterRefreshPrinterChangeNotify *r)
26272 ndr_print_struct(ndr, name, "spoolss_RouterRefreshPrinterChangeNotify");
26273 ndr->depth++;
26274 if (flags & NDR_SET_VALUES) {
26275 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26277 if (flags & NDR_IN) {
26278 ndr_print_struct(ndr, "in", "spoolss_RouterRefreshPrinterChangeNotify");
26279 ndr->depth++;
26280 ndr_print_ptr(ndr, "handle", r->in.handle);
26281 ndr->depth++;
26282 ndr_print_policy_handle(ndr, "handle", r->in.handle);
26283 ndr->depth--;
26284 ndr_print_uint32(ndr, "change_low", r->in.change_low);
26285 ndr_print_ptr(ndr, "options", r->in.options);
26286 ndr->depth++;
26287 if (r->in.options) {
26288 ndr_print_spoolss_NotifyOption(ndr, "options", r->in.options);
26290 ndr->depth--;
26291 ndr->depth--;
26293 if (flags & NDR_OUT) {
26294 ndr_print_struct(ndr, "out", "spoolss_RouterRefreshPrinterChangeNotify");
26295 ndr->depth++;
26296 ndr_print_ptr(ndr, "info", r->out.info);
26297 ndr->depth++;
26298 ndr_print_ptr(ndr, "info", *r->out.info);
26299 ndr->depth++;
26300 if (*r->out.info) {
26301 ndr_print_spoolss_NotifyInfo(ndr, "info", *r->out.info);
26303 ndr->depth--;
26304 ndr->depth--;
26305 ndr_print_WERROR(ndr, "result", r->out.result);
26306 ndr->depth--;
26308 ndr->depth--;
26311 static enum ndr_err_code ndr_push_spoolss_44(struct ndr_push *ndr, int flags, const struct spoolss_44 *r)
26313 if (flags & NDR_IN) {
26315 if (flags & NDR_OUT) {
26316 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26318 return NDR_ERR_SUCCESS;
26321 static enum ndr_err_code ndr_pull_spoolss_44(struct ndr_pull *ndr, int flags, struct spoolss_44 *r)
26323 if (flags & NDR_IN) {
26325 if (flags & NDR_OUT) {
26326 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26328 return NDR_ERR_SUCCESS;
26331 _PUBLIC_ void ndr_print_spoolss_44(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_44 *r)
26333 ndr_print_struct(ndr, name, "spoolss_44");
26334 ndr->depth++;
26335 if (flags & NDR_SET_VALUES) {
26336 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26338 if (flags & NDR_IN) {
26339 ndr_print_struct(ndr, "in", "spoolss_44");
26340 ndr->depth++;
26341 ndr->depth--;
26343 if (flags & NDR_OUT) {
26344 ndr_print_struct(ndr, "out", "spoolss_44");
26345 ndr->depth++;
26346 ndr_print_WERROR(ndr, "result", r->out.result);
26347 ndr->depth--;
26349 ndr->depth--;
26352 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_OpenPrinterEx(struct ndr_push *ndr, int flags, const struct spoolss_OpenPrinterEx *r)
26354 if (flags & NDR_IN) {
26355 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.printername));
26356 if (r->in.printername) {
26357 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
26358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
26359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.printername, CH_UTF16)));
26360 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.printername, ndr_charset_length(r->in.printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
26362 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.datatype));
26363 if (r->in.datatype) {
26364 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.datatype, CH_UTF16)));
26365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
26366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.datatype, CH_UTF16)));
26367 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.datatype, ndr_charset_length(r->in.datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
26369 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr));
26370 NDR_CHECK(ndr_push_spoolss_AccessRights(ndr, NDR_SCALARS, r->in.access_mask));
26371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
26372 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.userlevel, r->in.level));
26373 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.userlevel));
26375 if (flags & NDR_OUT) {
26376 if (r->out.handle == NULL) {
26377 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26379 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
26380 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26382 return NDR_ERR_SUCCESS;
26385 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_OpenPrinterEx(struct ndr_pull *ndr, int flags, struct spoolss_OpenPrinterEx *r)
26387 uint32_t _ptr_printername;
26388 uint32_t _ptr_datatype;
26389 TALLOC_CTX *_mem_save_printername_0;
26390 TALLOC_CTX *_mem_save_datatype_0;
26391 TALLOC_CTX *_mem_save_handle_0;
26392 if (flags & NDR_IN) {
26393 ZERO_STRUCT(r->out);
26395 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
26396 if (_ptr_printername) {
26397 NDR_PULL_ALLOC(ndr, r->in.printername);
26398 } else {
26399 r->in.printername = NULL;
26401 if (r->in.printername) {
26402 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
26403 NDR_PULL_SET_MEM_CTX(ndr, r->in.printername, 0);
26404 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.printername));
26405 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.printername));
26406 if (ndr_get_array_length(ndr, &r->in.printername) > ndr_get_array_size(ndr, &r->in.printername)) {
26407 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.printername), ndr_get_array_length(ndr, &r->in.printername));
26409 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.printername), sizeof(uint16_t)));
26410 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.printername, ndr_get_array_length(ndr, &r->in.printername), sizeof(uint16_t), CH_UTF16));
26411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
26413 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
26414 if (_ptr_datatype) {
26415 NDR_PULL_ALLOC(ndr, r->in.datatype);
26416 } else {
26417 r->in.datatype = NULL;
26419 if (r->in.datatype) {
26420 _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
26421 NDR_PULL_SET_MEM_CTX(ndr, r->in.datatype, 0);
26422 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.datatype));
26423 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.datatype));
26424 if (ndr_get_array_length(ndr, &r->in.datatype) > ndr_get_array_size(ndr, &r->in.datatype)) {
26425 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.datatype), ndr_get_array_length(ndr, &r->in.datatype));
26427 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.datatype), sizeof(uint16_t)));
26428 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.datatype, ndr_get_array_length(ndr, &r->in.datatype), sizeof(uint16_t), CH_UTF16));
26429 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
26431 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr));
26432 NDR_CHECK(ndr_pull_spoolss_AccessRights(ndr, NDR_SCALARS, &r->in.access_mask));
26433 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
26434 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.userlevel, r->in.level));
26435 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.userlevel));
26436 NDR_PULL_ALLOC(ndr, r->out.handle);
26437 ZERO_STRUCTP(r->out.handle);
26439 if (flags & NDR_OUT) {
26440 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26441 NDR_PULL_ALLOC(ndr, r->out.handle);
26443 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26444 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
26445 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
26446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26447 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26449 return NDR_ERR_SUCCESS;
26452 _PUBLIC_ void ndr_print_spoolss_OpenPrinterEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_OpenPrinterEx *r)
26454 ndr_print_struct(ndr, name, "spoolss_OpenPrinterEx");
26455 ndr->depth++;
26456 if (flags & NDR_SET_VALUES) {
26457 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26459 if (flags & NDR_IN) {
26460 ndr_print_struct(ndr, "in", "spoolss_OpenPrinterEx");
26461 ndr->depth++;
26462 ndr_print_ptr(ndr, "printername", r->in.printername);
26463 ndr->depth++;
26464 if (r->in.printername) {
26465 ndr_print_string(ndr, "printername", r->in.printername);
26467 ndr->depth--;
26468 ndr_print_ptr(ndr, "datatype", r->in.datatype);
26469 ndr->depth++;
26470 if (r->in.datatype) {
26471 ndr_print_string(ndr, "datatype", r->in.datatype);
26473 ndr->depth--;
26474 ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", &r->in.devmode_ctr);
26475 ndr_print_spoolss_AccessRights(ndr, "access_mask", r->in.access_mask);
26476 ndr_print_uint32(ndr, "level", r->in.level);
26477 ndr_print_set_switch_value(ndr, &r->in.userlevel, r->in.level);
26478 ndr_print_spoolss_UserLevel(ndr, "userlevel", &r->in.userlevel);
26479 ndr->depth--;
26481 if (flags & NDR_OUT) {
26482 ndr_print_struct(ndr, "out", "spoolss_OpenPrinterEx");
26483 ndr->depth++;
26484 ndr_print_ptr(ndr, "handle", r->out.handle);
26485 ndr->depth++;
26486 ndr_print_policy_handle(ndr, "handle", r->out.handle);
26487 ndr->depth--;
26488 ndr_print_WERROR(ndr, "result", r->out.result);
26489 ndr->depth--;
26491 ndr->depth--;
26494 static enum ndr_err_code ndr_push_spoolss_AddPrinterEx(struct ndr_push *ndr, int flags, const struct spoolss_AddPrinterEx *r)
26496 if (flags & NDR_IN) {
26497 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
26498 if (r->in.server) {
26499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
26500 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
26501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
26502 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
26504 if (r->in.info_ctr == NULL) {
26505 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26507 NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
26508 if (r->in.devmode_ctr == NULL) {
26509 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26511 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
26512 if (r->in.secdesc_ctr == NULL) {
26513 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26515 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
26516 if (r->in.userlevel_ctr == NULL) {
26517 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26519 NDR_CHECK(ndr_push_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.userlevel_ctr));
26521 if (flags & NDR_OUT) {
26522 if (r->out.handle == NULL) {
26523 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26525 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
26526 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26528 return NDR_ERR_SUCCESS;
26531 static enum ndr_err_code ndr_pull_spoolss_AddPrinterEx(struct ndr_pull *ndr, int flags, struct spoolss_AddPrinterEx *r)
26533 uint32_t _ptr_server;
26534 TALLOC_CTX *_mem_save_server_0;
26535 TALLOC_CTX *_mem_save_info_ctr_0;
26536 TALLOC_CTX *_mem_save_devmode_ctr_0;
26537 TALLOC_CTX *_mem_save_secdesc_ctr_0;
26538 TALLOC_CTX *_mem_save_userlevel_ctr_0;
26539 TALLOC_CTX *_mem_save_handle_0;
26540 if (flags & NDR_IN) {
26541 ZERO_STRUCT(r->out);
26543 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
26544 if (_ptr_server) {
26545 NDR_PULL_ALLOC(ndr, r->in.server);
26546 } else {
26547 r->in.server = NULL;
26549 if (r->in.server) {
26550 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
26551 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
26552 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
26553 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
26554 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
26555 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
26557 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
26558 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
26559 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
26561 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26562 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
26564 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
26565 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
26566 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
26567 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
26568 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26569 NDR_PULL_ALLOC(ndr, r->in.devmode_ctr);
26571 _mem_save_devmode_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
26572 NDR_PULL_SET_MEM_CTX(ndr, r->in.devmode_ctr, LIBNDR_FLAG_REF_ALLOC);
26573 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.devmode_ctr));
26574 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_ctr_0, LIBNDR_FLAG_REF_ALLOC);
26575 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26576 NDR_PULL_ALLOC(ndr, r->in.secdesc_ctr);
26578 _mem_save_secdesc_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
26579 NDR_PULL_SET_MEM_CTX(ndr, r->in.secdesc_ctr, LIBNDR_FLAG_REF_ALLOC);
26580 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc_ctr));
26581 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_ctr_0, LIBNDR_FLAG_REF_ALLOC);
26582 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26583 NDR_PULL_ALLOC(ndr, r->in.userlevel_ctr);
26585 _mem_save_userlevel_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
26586 NDR_PULL_SET_MEM_CTX(ndr, r->in.userlevel_ctr, LIBNDR_FLAG_REF_ALLOC);
26587 NDR_CHECK(ndr_pull_spoolss_UserLevelCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.userlevel_ctr));
26588 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userlevel_ctr_0, LIBNDR_FLAG_REF_ALLOC);
26589 NDR_PULL_ALLOC(ndr, r->out.handle);
26590 ZERO_STRUCTP(r->out.handle);
26592 if (flags & NDR_OUT) {
26593 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26594 NDR_PULL_ALLOC(ndr, r->out.handle);
26596 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26597 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
26598 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
26599 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26600 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26602 return NDR_ERR_SUCCESS;
26605 _PUBLIC_ void ndr_print_spoolss_AddPrinterEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPrinterEx *r)
26607 ndr_print_struct(ndr, name, "spoolss_AddPrinterEx");
26608 ndr->depth++;
26609 if (flags & NDR_SET_VALUES) {
26610 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26612 if (flags & NDR_IN) {
26613 ndr_print_struct(ndr, "in", "spoolss_AddPrinterEx");
26614 ndr->depth++;
26615 ndr_print_ptr(ndr, "server", r->in.server);
26616 ndr->depth++;
26617 if (r->in.server) {
26618 ndr_print_string(ndr, "server", r->in.server);
26620 ndr->depth--;
26621 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
26622 ndr->depth++;
26623 ndr_print_spoolss_SetPrinterInfoCtr(ndr, "info_ctr", r->in.info_ctr);
26624 ndr->depth--;
26625 ndr_print_ptr(ndr, "devmode_ctr", r->in.devmode_ctr);
26626 ndr->depth++;
26627 ndr_print_spoolss_DevmodeContainer(ndr, "devmode_ctr", r->in.devmode_ctr);
26628 ndr->depth--;
26629 ndr_print_ptr(ndr, "secdesc_ctr", r->in.secdesc_ctr);
26630 ndr->depth++;
26631 ndr_print_sec_desc_buf(ndr, "secdesc_ctr", r->in.secdesc_ctr);
26632 ndr->depth--;
26633 ndr_print_ptr(ndr, "userlevel_ctr", r->in.userlevel_ctr);
26634 ndr->depth++;
26635 ndr_print_spoolss_UserLevelCtr(ndr, "userlevel_ctr", r->in.userlevel_ctr);
26636 ndr->depth--;
26637 ndr->depth--;
26639 if (flags & NDR_OUT) {
26640 ndr_print_struct(ndr, "out", "spoolss_AddPrinterEx");
26641 ndr->depth++;
26642 ndr_print_ptr(ndr, "handle", r->out.handle);
26643 ndr->depth++;
26644 ndr_print_policy_handle(ndr, "handle", r->out.handle);
26645 ndr->depth--;
26646 ndr_print_WERROR(ndr, "result", r->out.result);
26647 ndr->depth--;
26649 ndr->depth--;
26652 static enum ndr_err_code ndr_push_spoolss_47(struct ndr_push *ndr, int flags, const struct spoolss_47 *r)
26654 if (flags & NDR_IN) {
26656 if (flags & NDR_OUT) {
26657 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26659 return NDR_ERR_SUCCESS;
26662 static enum ndr_err_code ndr_pull_spoolss_47(struct ndr_pull *ndr, int flags, struct spoolss_47 *r)
26664 if (flags & NDR_IN) {
26666 if (flags & NDR_OUT) {
26667 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26669 return NDR_ERR_SUCCESS;
26672 _PUBLIC_ void ndr_print_spoolss_47(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_47 *r)
26674 ndr_print_struct(ndr, name, "spoolss_47");
26675 ndr->depth++;
26676 if (flags & NDR_SET_VALUES) {
26677 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26679 if (flags & NDR_IN) {
26680 ndr_print_struct(ndr, "in", "spoolss_47");
26681 ndr->depth++;
26682 ndr->depth--;
26684 if (flags & NDR_OUT) {
26685 ndr_print_struct(ndr, "out", "spoolss_47");
26686 ndr->depth++;
26687 ndr_print_WERROR(ndr, "result", r->out.result);
26688 ndr->depth--;
26690 ndr->depth--;
26693 static enum ndr_err_code ndr_push_spoolss_EnumPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinterData *r)
26695 if (flags & NDR_IN) {
26696 if (r->in.handle == NULL) {
26697 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26699 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26700 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index));
26701 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.value_offered));
26702 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_offered));
26704 if (flags & NDR_OUT) {
26705 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.value_offered / 2));
26706 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->out.value_name, r->in.value_offered / 2, sizeof(uint16_t), CH_UTF16));
26707 if (r->out.value_needed == NULL) {
26708 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26710 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.value_needed));
26711 if (r->out.type == NULL) {
26712 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26714 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
26716 uint32_t _flags_save_uint8 = ndr->flags;
26717 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
26718 if (r->out.data == NULL) {
26719 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26721 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_offered));
26722 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.data_offered));
26723 ndr->flags = _flags_save_uint8;
26725 if (r->out.data_needed == NULL) {
26726 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26728 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_needed));
26729 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26731 return NDR_ERR_SUCCESS;
26734 static enum ndr_err_code ndr_pull_spoolss_EnumPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinterData *r)
26736 TALLOC_CTX *_mem_save_handle_0;
26737 TALLOC_CTX *_mem_save_value_needed_0;
26738 TALLOC_CTX *_mem_save_type_0;
26739 TALLOC_CTX *_mem_save_data_needed_0;
26740 if (flags & NDR_IN) {
26741 ZERO_STRUCT(r->out);
26743 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26744 NDR_PULL_ALLOC(ndr, r->in.handle);
26746 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26747 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26748 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26750 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.enum_index));
26751 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.value_offered));
26752 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_offered));
26753 NDR_PULL_ALLOC(ndr, r->out.value_needed);
26754 ZERO_STRUCTP(r->out.value_needed);
26755 NDR_PULL_ALLOC(ndr, r->out.type);
26756 ZERO_STRUCTP(r->out.type);
26757 NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.data_offered);
26758 memset(r->out.data, 0, (r->in.data_offered) * sizeof(*r->out.data));
26759 NDR_PULL_ALLOC(ndr, r->out.data_needed);
26760 ZERO_STRUCTP(r->out.data_needed);
26762 if (flags & NDR_OUT) {
26763 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.value_name));
26764 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->out.value_name, ndr_get_array_size(ndr, &r->out.value_name), sizeof(uint16_t), CH_UTF16));
26765 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26766 NDR_PULL_ALLOC(ndr, r->out.value_needed);
26768 _mem_save_value_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
26769 NDR_PULL_SET_MEM_CTX(ndr, r->out.value_needed, LIBNDR_FLAG_REF_ALLOC);
26770 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.value_needed));
26771 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_needed_0, LIBNDR_FLAG_REF_ALLOC);
26772 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26773 NDR_PULL_ALLOC(ndr, r->out.type);
26775 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
26776 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
26777 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
26778 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
26780 uint32_t _flags_save_uint8 = ndr->flags;
26781 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
26782 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
26783 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26784 NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data));
26786 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_size(ndr, &r->out.data)));
26787 ndr->flags = _flags_save_uint8;
26789 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26790 NDR_PULL_ALLOC(ndr, r->out.data_needed);
26792 _mem_save_data_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
26793 NDR_PULL_SET_MEM_CTX(ndr, r->out.data_needed, LIBNDR_FLAG_REF_ALLOC);
26794 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_needed));
26795 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_needed_0, LIBNDR_FLAG_REF_ALLOC);
26796 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26797 if (r->out.value_name) {
26798 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.value_name, r->in.value_offered / 2));
26800 if (r->out.data) {
26801 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.data_offered));
26804 return NDR_ERR_SUCCESS;
26807 _PUBLIC_ void ndr_print_spoolss_EnumPrinterData(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrinterData *r)
26809 ndr_print_struct(ndr, name, "spoolss_EnumPrinterData");
26810 ndr->depth++;
26811 if (flags & NDR_SET_VALUES) {
26812 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26814 if (flags & NDR_IN) {
26815 ndr_print_struct(ndr, "in", "spoolss_EnumPrinterData");
26816 ndr->depth++;
26817 ndr_print_ptr(ndr, "handle", r->in.handle);
26818 ndr->depth++;
26819 ndr_print_policy_handle(ndr, "handle", r->in.handle);
26820 ndr->depth--;
26821 ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
26822 ndr_print_uint32(ndr, "value_offered", r->in.value_offered);
26823 ndr_print_uint32(ndr, "data_offered", r->in.data_offered);
26824 ndr->depth--;
26826 if (flags & NDR_OUT) {
26827 ndr_print_struct(ndr, "out", "spoolss_EnumPrinterData");
26828 ndr->depth++;
26829 ndr_print_string(ndr, "value_name", r->out.value_name);
26830 ndr_print_ptr(ndr, "value_needed", r->out.value_needed);
26831 ndr->depth++;
26832 ndr_print_uint32(ndr, "value_needed", *r->out.value_needed);
26833 ndr->depth--;
26834 ndr_print_ptr(ndr, "type", r->out.type);
26835 ndr->depth++;
26836 ndr_print_winreg_Type(ndr, "type", *r->out.type);
26837 ndr->depth--;
26838 ndr_print_ptr(ndr, "data", r->out.data);
26839 ndr->depth++;
26840 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.data_offered);
26841 ndr->depth--;
26842 ndr_print_ptr(ndr, "data_needed", r->out.data_needed);
26843 ndr->depth++;
26844 ndr_print_uint32(ndr, "data_needed", *r->out.data_needed);
26845 ndr->depth--;
26846 ndr_print_WERROR(ndr, "result", r->out.result);
26847 ndr->depth--;
26849 ndr->depth--;
26852 static enum ndr_err_code ndr_push_spoolss_DeletePrinterData(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterData *r)
26854 if (flags & NDR_IN) {
26855 if (r->in.handle == NULL) {
26856 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
26858 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26859 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
26860 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
26861 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
26862 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
26864 if (flags & NDR_OUT) {
26865 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26867 return NDR_ERR_SUCCESS;
26870 static enum ndr_err_code ndr_pull_spoolss_DeletePrinterData(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterData *r)
26872 TALLOC_CTX *_mem_save_handle_0;
26873 if (flags & NDR_IN) {
26874 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
26875 NDR_PULL_ALLOC(ndr, r->in.handle);
26877 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
26878 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
26879 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
26880 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
26881 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
26882 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
26883 if (ndr_get_array_length(ndr, &r->in.value_name) > ndr_get_array_size(ndr, &r->in.value_name)) {
26884 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.value_name), ndr_get_array_length(ndr, &r->in.value_name));
26886 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t)));
26887 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t), CH_UTF16));
26889 if (flags & NDR_OUT) {
26890 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26892 return NDR_ERR_SUCCESS;
26895 _PUBLIC_ void ndr_print_spoolss_DeletePrinterData(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrinterData *r)
26897 ndr_print_struct(ndr, name, "spoolss_DeletePrinterData");
26898 ndr->depth++;
26899 if (flags & NDR_SET_VALUES) {
26900 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26902 if (flags & NDR_IN) {
26903 ndr_print_struct(ndr, "in", "spoolss_DeletePrinterData");
26904 ndr->depth++;
26905 ndr_print_ptr(ndr, "handle", r->in.handle);
26906 ndr->depth++;
26907 ndr_print_policy_handle(ndr, "handle", r->in.handle);
26908 ndr->depth--;
26909 ndr_print_string(ndr, "value_name", r->in.value_name);
26910 ndr->depth--;
26912 if (flags & NDR_OUT) {
26913 ndr_print_struct(ndr, "out", "spoolss_DeletePrinterData");
26914 ndr->depth++;
26915 ndr_print_WERROR(ndr, "result", r->out.result);
26916 ndr->depth--;
26918 ndr->depth--;
26921 static enum ndr_err_code ndr_push_spoolss_4a(struct ndr_push *ndr, int flags, const struct spoolss_4a *r)
26923 if (flags & NDR_IN) {
26925 if (flags & NDR_OUT) {
26926 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26928 return NDR_ERR_SUCCESS;
26931 static enum ndr_err_code ndr_pull_spoolss_4a(struct ndr_pull *ndr, int flags, struct spoolss_4a *r)
26933 if (flags & NDR_IN) {
26935 if (flags & NDR_OUT) {
26936 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26938 return NDR_ERR_SUCCESS;
26941 _PUBLIC_ void ndr_print_spoolss_4a(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_4a *r)
26943 ndr_print_struct(ndr, name, "spoolss_4a");
26944 ndr->depth++;
26945 if (flags & NDR_SET_VALUES) {
26946 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26948 if (flags & NDR_IN) {
26949 ndr_print_struct(ndr, "in", "spoolss_4a");
26950 ndr->depth++;
26951 ndr->depth--;
26953 if (flags & NDR_OUT) {
26954 ndr_print_struct(ndr, "out", "spoolss_4a");
26955 ndr->depth++;
26956 ndr_print_WERROR(ndr, "result", r->out.result);
26957 ndr->depth--;
26959 ndr->depth--;
26962 static enum ndr_err_code ndr_push_spoolss_4b(struct ndr_push *ndr, int flags, const struct spoolss_4b *r)
26964 if (flags & NDR_IN) {
26966 if (flags & NDR_OUT) {
26967 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
26969 return NDR_ERR_SUCCESS;
26972 static enum ndr_err_code ndr_pull_spoolss_4b(struct ndr_pull *ndr, int flags, struct spoolss_4b *r)
26974 if (flags & NDR_IN) {
26976 if (flags & NDR_OUT) {
26977 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
26979 return NDR_ERR_SUCCESS;
26982 _PUBLIC_ void ndr_print_spoolss_4b(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_4b *r)
26984 ndr_print_struct(ndr, name, "spoolss_4b");
26985 ndr->depth++;
26986 if (flags & NDR_SET_VALUES) {
26987 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
26989 if (flags & NDR_IN) {
26990 ndr_print_struct(ndr, "in", "spoolss_4b");
26991 ndr->depth++;
26992 ndr->depth--;
26994 if (flags & NDR_OUT) {
26995 ndr_print_struct(ndr, "out", "spoolss_4b");
26996 ndr->depth++;
26997 ndr_print_WERROR(ndr, "result", r->out.result);
26998 ndr->depth--;
27000 ndr->depth--;
27003 static enum ndr_err_code ndr_push_spoolss_4c(struct ndr_push *ndr, int flags, const struct spoolss_4c *r)
27005 if (flags & NDR_IN) {
27007 if (flags & NDR_OUT) {
27008 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27010 return NDR_ERR_SUCCESS;
27013 static enum ndr_err_code ndr_pull_spoolss_4c(struct ndr_pull *ndr, int flags, struct spoolss_4c *r)
27015 if (flags & NDR_IN) {
27017 if (flags & NDR_OUT) {
27018 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27020 return NDR_ERR_SUCCESS;
27023 _PUBLIC_ void ndr_print_spoolss_4c(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_4c *r)
27025 ndr_print_struct(ndr, name, "spoolss_4c");
27026 ndr->depth++;
27027 if (flags & NDR_SET_VALUES) {
27028 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27030 if (flags & NDR_IN) {
27031 ndr_print_struct(ndr, "in", "spoolss_4c");
27032 ndr->depth++;
27033 ndr->depth--;
27035 if (flags & NDR_OUT) {
27036 ndr_print_struct(ndr, "out", "spoolss_4c");
27037 ndr->depth++;
27038 ndr_print_WERROR(ndr, "result", r->out.result);
27039 ndr->depth--;
27041 ndr->depth--;
27044 static enum ndr_err_code ndr_push_spoolss_SetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterDataEx *r)
27046 if (flags & NDR_IN) {
27047 if (r->in.handle == NULL) {
27048 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27050 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27051 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27054 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
27056 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27057 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
27058 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27059 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
27060 if (r->in.buffer == NULL) {
27061 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27064 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
27065 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27067 if (flags & NDR_OUT) {
27068 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27070 return NDR_ERR_SUCCESS;
27073 static enum ndr_err_code ndr_pull_spoolss_SetPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_SetPrinterDataEx *r)
27075 TALLOC_CTX *_mem_save_handle_0;
27076 if (flags & NDR_IN) {
27077 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27078 NDR_PULL_ALLOC(ndr, r->in.handle);
27080 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27081 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27082 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27084 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
27085 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
27086 if (ndr_get_array_length(ndr, &r->in.key_name) > ndr_get_array_size(ndr, &r->in.key_name)) {
27087 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.key_name), ndr_get_array_length(ndr, &r->in.key_name));
27089 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t)));
27090 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16));
27091 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
27092 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
27093 if (ndr_get_array_length(ndr, &r->in.value_name) > ndr_get_array_size(ndr, &r->in.value_name)) {
27094 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.value_name), ndr_get_array_length(ndr, &r->in.value_name));
27096 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t)));
27097 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t), CH_UTF16));
27098 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
27099 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
27100 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27101 NDR_PULL_ALLOC_N(ndr, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer));
27103 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, ndr_get_array_size(ndr, &r->in.buffer)));
27104 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
27105 if (r->in.buffer) {
27106 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
27109 if (flags & NDR_OUT) {
27110 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27112 return NDR_ERR_SUCCESS;
27115 _PUBLIC_ void ndr_print_spoolss_SetPrinterDataEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_SetPrinterDataEx *r)
27117 ndr_print_struct(ndr, name, "spoolss_SetPrinterDataEx");
27118 ndr->depth++;
27119 if (flags & NDR_SET_VALUES) {
27120 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27122 if (flags & NDR_IN) {
27123 ndr_print_struct(ndr, "in", "spoolss_SetPrinterDataEx");
27124 ndr->depth++;
27125 ndr_print_ptr(ndr, "handle", r->in.handle);
27126 ndr->depth++;
27127 ndr_print_policy_handle(ndr, "handle", r->in.handle);
27128 ndr->depth--;
27129 ndr_print_string(ndr, "key_name", r->in.key_name);
27130 ndr_print_string(ndr, "value_name", r->in.value_name);
27131 ndr_print_winreg_Type(ndr, "type", r->in.type);
27132 ndr_print_ptr(ndr, "buffer", r->in.buffer);
27133 ndr->depth++;
27134 ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
27135 ndr->depth--;
27136 ndr_print_uint32(ndr, "offered", r->in.offered);
27137 ndr->depth--;
27139 if (flags & NDR_OUT) {
27140 ndr_print_struct(ndr, "out", "spoolss_SetPrinterDataEx");
27141 ndr->depth++;
27142 ndr_print_WERROR(ndr, "result", r->out.result);
27143 ndr->depth--;
27145 ndr->depth--;
27148 static enum ndr_err_code ndr_push_spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDataEx *r)
27150 if (flags & NDR_IN) {
27151 if (r->in.handle == NULL) {
27152 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27154 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27158 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
27160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
27162 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27165 if (flags & NDR_OUT) {
27166 if (r->out.type == NULL) {
27167 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27169 NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
27170 if (r->out.buffer == NULL) {
27171 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27174 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
27175 if (r->out.needed == NULL) {
27176 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
27179 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27181 return NDR_ERR_SUCCESS;
27184 static enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDataEx *r)
27186 TALLOC_CTX *_mem_save_handle_0;
27187 TALLOC_CTX *_mem_save_type_0;
27188 TALLOC_CTX *_mem_save_needed_0;
27189 if (flags & NDR_IN) {
27190 ZERO_STRUCT(r->out);
27192 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27193 NDR_PULL_ALLOC(ndr, r->in.handle);
27195 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27196 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27197 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27198 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27199 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
27200 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
27201 if (ndr_get_array_length(ndr, &r->in.key_name) > ndr_get_array_size(ndr, &r->in.key_name)) {
27202 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.key_name), ndr_get_array_length(ndr, &r->in.key_name));
27204 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t)));
27205 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16));
27206 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
27207 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
27208 if (ndr_get_array_length(ndr, &r->in.value_name) > ndr_get_array_size(ndr, &r->in.value_name)) {
27209 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.value_name), ndr_get_array_length(ndr, &r->in.value_name));
27211 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t)));
27212 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t), CH_UTF16));
27213 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
27214 NDR_PULL_ALLOC(ndr, r->out.type);
27215 ZERO_STRUCTP(r->out.type);
27216 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
27217 memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
27218 NDR_PULL_ALLOC(ndr, r->out.needed);
27219 ZERO_STRUCTP(r->out.needed);
27221 if (flags & NDR_OUT) {
27222 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27223 NDR_PULL_ALLOC(ndr, r->out.type);
27225 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
27226 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
27227 NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
27228 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
27229 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
27230 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27231 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
27233 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
27234 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27235 NDR_PULL_ALLOC(ndr, r->out.needed);
27237 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
27238 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
27239 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
27240 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
27241 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27242 if (r->out.buffer) {
27243 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
27246 return NDR_ERR_SUCCESS;
27249 _PUBLIC_ void ndr_print_spoolss_GetPrinterDataEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterDataEx *r)
27251 ndr_print_struct(ndr, name, "spoolss_GetPrinterDataEx");
27252 ndr->depth++;
27253 if (flags & NDR_SET_VALUES) {
27254 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27256 if (flags & NDR_IN) {
27257 ndr_print_struct(ndr, "in", "spoolss_GetPrinterDataEx");
27258 ndr->depth++;
27259 ndr_print_ptr(ndr, "handle", r->in.handle);
27260 ndr->depth++;
27261 ndr_print_policy_handle(ndr, "handle", r->in.handle);
27262 ndr->depth--;
27263 ndr_print_string(ndr, "key_name", r->in.key_name);
27264 ndr_print_string(ndr, "value_name", r->in.value_name);
27265 ndr_print_uint32(ndr, "offered", r->in.offered);
27266 ndr->depth--;
27268 if (flags & NDR_OUT) {
27269 ndr_print_struct(ndr, "out", "spoolss_GetPrinterDataEx");
27270 ndr->depth++;
27271 ndr_print_ptr(ndr, "type", r->out.type);
27272 ndr->depth++;
27273 ndr_print_winreg_Type(ndr, "type", *r->out.type);
27274 ndr->depth--;
27275 ndr_print_ptr(ndr, "buffer", r->out.buffer);
27276 ndr->depth++;
27277 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
27278 ndr->depth--;
27279 ndr_print_ptr(ndr, "needed", r->out.needed);
27280 ndr->depth++;
27281 ndr_print_uint32(ndr, "needed", *r->out.needed);
27282 ndr->depth--;
27283 ndr_print_WERROR(ndr, "result", r->out.result);
27284 ndr->depth--;
27286 ndr->depth--;
27289 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinterDataEx(struct ndr_push *ndr, int flags, const struct _spoolss_EnumPrinterDataEx *r)
27291 if (flags & NDR_IN) {
27292 if (r->in.handle == NULL) {
27293 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27295 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27297 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27298 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27299 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27300 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27302 if (flags & NDR_OUT) {
27303 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->out.info));
27304 if (r->out.needed == NULL) {
27305 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27307 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
27308 if (r->out.count == NULL) {
27309 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.count));
27312 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27314 return NDR_ERR_SUCCESS;
27317 _PUBLIC_ enum ndr_err_code ndr_pull__spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, int flags, struct _spoolss_EnumPrinterDataEx *r)
27319 TALLOC_CTX *_mem_save_handle_0;
27320 TALLOC_CTX *_mem_save_needed_0;
27321 TALLOC_CTX *_mem_save_count_0;
27322 if (flags & NDR_IN) {
27323 ZERO_STRUCT(r->out);
27325 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27326 NDR_PULL_ALLOC(ndr, r->in.handle);
27328 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27329 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27330 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27331 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27332 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
27333 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
27334 if (ndr_get_array_length(ndr, &r->in.key_name) > ndr_get_array_size(ndr, &r->in.key_name)) {
27335 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.key_name), ndr_get_array_length(ndr, &r->in.key_name));
27337 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t)));
27338 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16));
27339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
27340 NDR_PULL_ALLOC(ndr, r->out.needed);
27341 ZERO_STRUCTP(r->out.needed);
27342 NDR_PULL_ALLOC(ndr, r->out.count);
27343 ZERO_STRUCTP(r->out.count);
27345 if (flags & NDR_OUT) {
27346 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->out.info));
27347 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27348 NDR_PULL_ALLOC(ndr, r->out.needed);
27350 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
27351 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
27352 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
27353 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
27354 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27355 NDR_PULL_ALLOC(ndr, r->out.count);
27357 _mem_save_count_0 = NDR_PULL_GET_MEM_CTX(ndr);
27358 NDR_PULL_SET_MEM_CTX(ndr, r->out.count, LIBNDR_FLAG_REF_ALLOC);
27359 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.count));
27360 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_count_0, LIBNDR_FLAG_REF_ALLOC);
27361 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27363 return NDR_ERR_SUCCESS;
27366 _PUBLIC_ enum ndr_err_code ndr_push___spoolss_EnumPrinterDataEx(struct ndr_push *ndr, int flags, const struct __spoolss_EnumPrinterDataEx *r)
27368 uint32_t cntr_info_0;
27369 if (flags & NDR_IN) {
27370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.count));
27372 if (flags & NDR_OUT) {
27373 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
27374 NDR_CHECK(ndr_push_spoolss_PrinterEnumValues(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
27376 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
27377 NDR_CHECK(ndr_push_spoolss_PrinterEnumValues(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
27380 return NDR_ERR_SUCCESS;
27383 _PUBLIC_ enum ndr_err_code ndr_pull___spoolss_EnumPrinterDataEx(struct ndr_pull *ndr, int flags, struct __spoolss_EnumPrinterDataEx *r)
27385 uint32_t cntr_info_0;
27386 TALLOC_CTX *_mem_save_info_0;
27387 if (flags & NDR_IN) {
27388 ZERO_STRUCT(r->out);
27390 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.count));
27392 if (flags & NDR_OUT) {
27393 NDR_PULL_ALLOC_N(ndr, r->out.info, r->in.count);
27394 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
27395 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
27396 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
27397 NDR_CHECK(ndr_pull_spoolss_PrinterEnumValues(ndr, NDR_SCALARS, &r->out.info[cntr_info_0]));
27399 for (cntr_info_0 = 0; cntr_info_0 < r->in.count; cntr_info_0++) {
27400 NDR_CHECK(ndr_pull_spoolss_PrinterEnumValues(ndr, NDR_BUFFERS, &r->out.info[cntr_info_0]));
27402 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
27404 return NDR_ERR_SUCCESS;
27407 _PUBLIC_ void ndr_print_spoolss_EnumPrinterDataEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrinterDataEx *r)
27409 uint32_t cntr_info_2;
27410 ndr_print_struct(ndr, name, "spoolss_EnumPrinterDataEx");
27411 ndr->depth++;
27412 if (flags & NDR_SET_VALUES) {
27413 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27415 if (flags & NDR_IN) {
27416 ndr_print_struct(ndr, "in", "spoolss_EnumPrinterDataEx");
27417 ndr->depth++;
27418 ndr_print_ptr(ndr, "handle", r->in.handle);
27419 ndr->depth++;
27420 ndr_print_policy_handle(ndr, "handle", r->in.handle);
27421 ndr->depth--;
27422 ndr_print_string(ndr, "key_name", r->in.key_name);
27423 ndr_print_uint32(ndr, "offered", r->in.offered);
27424 ndr->depth--;
27426 if (flags & NDR_OUT) {
27427 ndr_print_struct(ndr, "out", "spoolss_EnumPrinterDataEx");
27428 ndr->depth++;
27429 ndr_print_ptr(ndr, "count", r->out.count);
27430 ndr->depth++;
27431 ndr_print_uint32(ndr, "count", *r->out.count);
27432 ndr->depth--;
27433 ndr_print_ptr(ndr, "info", r->out.info);
27434 ndr->depth++;
27435 ndr_print_ptr(ndr, "info", *r->out.info);
27436 ndr->depth++;
27437 if (*r->out.info) {
27438 ndr->print(ndr, "%s: ARRAY(%d)", "info", (int)*r->out.count);
27439 ndr->depth++;
27440 for (cntr_info_2=0;cntr_info_2<*r->out.count;cntr_info_2++) {
27441 char *idx_2=NULL;
27442 if (asprintf(&idx_2, "[%d]", cntr_info_2) != -1) {
27443 ndr_print_spoolss_PrinterEnumValues(ndr, "info", &(*r->out.info)[cntr_info_2]);
27444 free(idx_2);
27447 ndr->depth--;
27449 ndr->depth--;
27450 ndr->depth--;
27451 ndr_print_ptr(ndr, "needed", r->out.needed);
27452 ndr->depth++;
27453 ndr_print_uint32(ndr, "needed", *r->out.needed);
27454 ndr->depth--;
27455 ndr_print_WERROR(ndr, "result", r->out.result);
27456 ndr->depth--;
27458 ndr->depth--;
27461 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_EnumPrinterKey(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinterKey *r)
27463 if (flags & NDR_IN) {
27464 if (r->in.handle == NULL) {
27465 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27467 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27468 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27470 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27471 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27472 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
27474 if (flags & NDR_OUT) {
27476 uint32_t _flags_save_string_array = ndr->flags;
27477 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
27478 if (r->out.key_buffer == NULL) {
27479 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27481 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_buffer));
27482 if (*r->out.key_buffer) {
27484 struct ndr_push *_ndr_key_buffer;
27485 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_key_buffer, 0, r->in.offered));
27486 NDR_CHECK(ndr_push_string_array(_ndr_key_buffer, NDR_SCALARS, *r->out.key_buffer));
27487 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_key_buffer, 0, r->in.offered));
27490 ndr->flags = _flags_save_string_array;
27492 if (r->out.needed == NULL) {
27493 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
27496 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27498 return NDR_ERR_SUCCESS;
27501 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterKey(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinterKey *r)
27503 uint32_t _ptr_key_buffer;
27504 TALLOC_CTX *_mem_save_handle_0;
27505 TALLOC_CTX *_mem_save_key_buffer_0;
27506 TALLOC_CTX *_mem_save_key_buffer_1;
27507 TALLOC_CTX *_mem_save_needed_0;
27508 if (flags & NDR_IN) {
27509 ZERO_STRUCT(r->out);
27511 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27512 NDR_PULL_ALLOC(ndr, r->in.handle);
27514 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27515 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27516 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27517 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27518 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
27519 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
27520 if (ndr_get_array_length(ndr, &r->in.key_name) > ndr_get_array_size(ndr, &r->in.key_name)) {
27521 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.key_name), ndr_get_array_length(ndr, &r->in.key_name));
27523 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t)));
27524 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16));
27525 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
27526 NDR_PULL_ALLOC(ndr, r->out.key_buffer);
27527 ZERO_STRUCTP(r->out.key_buffer);
27528 NDR_PULL_ALLOC(ndr, r->out.needed);
27529 ZERO_STRUCTP(r->out.needed);
27531 if (flags & NDR_OUT) {
27533 uint32_t _flags_save_string_array = ndr->flags;
27534 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
27535 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27536 NDR_PULL_ALLOC(ndr, r->out.key_buffer);
27538 _mem_save_key_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
27539 NDR_PULL_SET_MEM_CTX(ndr, r->out.key_buffer, LIBNDR_FLAG_REF_ALLOC);
27540 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_buffer));
27541 if (_ptr_key_buffer) {
27542 NDR_PULL_ALLOC(ndr, *r->out.key_buffer);
27543 } else {
27544 *r->out.key_buffer = NULL;
27546 if (*r->out.key_buffer) {
27547 _mem_save_key_buffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
27548 NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_buffer, 0);
27550 struct ndr_pull *_ndr_key_buffer;
27551 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_key_buffer, 0, r->in.offered));
27552 NDR_CHECK(ndr_pull_string_array(_ndr_key_buffer, NDR_SCALARS, r->out.key_buffer));
27553 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_key_buffer, 0, r->in.offered));
27555 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_buffer_1, 0);
27557 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_buffer_0, LIBNDR_FLAG_REF_ALLOC);
27558 ndr->flags = _flags_save_string_array;
27560 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27561 NDR_PULL_ALLOC(ndr, r->out.needed);
27563 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
27564 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
27565 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
27566 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
27567 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27569 return NDR_ERR_SUCCESS;
27572 _PUBLIC_ void ndr_print_spoolss_EnumPrinterKey(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_EnumPrinterKey *r)
27574 ndr_print_struct(ndr, name, "spoolss_EnumPrinterKey");
27575 ndr->depth++;
27576 if (flags & NDR_SET_VALUES) {
27577 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27579 if (flags & NDR_IN) {
27580 ndr_print_struct(ndr, "in", "spoolss_EnumPrinterKey");
27581 ndr->depth++;
27582 ndr_print_ptr(ndr, "handle", r->in.handle);
27583 ndr->depth++;
27584 ndr_print_policy_handle(ndr, "handle", r->in.handle);
27585 ndr->depth--;
27586 ndr_print_string(ndr, "key_name", r->in.key_name);
27587 ndr_print_uint32(ndr, "offered", r->in.offered);
27588 ndr->depth--;
27590 if (flags & NDR_OUT) {
27591 ndr_print_struct(ndr, "out", "spoolss_EnumPrinterKey");
27592 ndr->depth++;
27593 ndr_print_ptr(ndr, "key_buffer", r->out.key_buffer);
27594 ndr->depth++;
27595 ndr_print_ptr(ndr, "key_buffer", *r->out.key_buffer);
27596 ndr->depth++;
27597 if (*r->out.key_buffer) {
27598 ndr_print_string_array(ndr, "key_buffer", *r->out.key_buffer);
27600 ndr->depth--;
27601 ndr->depth--;
27602 ndr_print_ptr(ndr, "needed", r->out.needed);
27603 ndr->depth++;
27604 ndr_print_uint32(ndr, "needed", *r->out.needed);
27605 ndr->depth--;
27606 ndr_print_WERROR(ndr, "result", r->out.result);
27607 ndr->depth--;
27609 ndr->depth--;
27612 static enum ndr_err_code ndr_push_spoolss_DeletePrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterDataEx *r)
27614 if (flags & NDR_IN) {
27615 if (r->in.handle == NULL) {
27616 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27618 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27619 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27622 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
27624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.value_name, CH_UTF16)));
27626 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.value_name, ndr_charset_length(r->in.value_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27628 if (flags & NDR_OUT) {
27629 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27631 return NDR_ERR_SUCCESS;
27634 static enum ndr_err_code ndr_pull_spoolss_DeletePrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterDataEx *r)
27636 TALLOC_CTX *_mem_save_handle_0;
27637 if (flags & NDR_IN) {
27638 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27639 NDR_PULL_ALLOC(ndr, r->in.handle);
27641 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27642 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27643 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27645 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
27646 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
27647 if (ndr_get_array_length(ndr, &r->in.key_name) > ndr_get_array_size(ndr, &r->in.key_name)) {
27648 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.key_name), ndr_get_array_length(ndr, &r->in.key_name));
27650 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t)));
27651 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16));
27652 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value_name));
27653 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value_name));
27654 if (ndr_get_array_length(ndr, &r->in.value_name) > ndr_get_array_size(ndr, &r->in.value_name)) {
27655 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.value_name), ndr_get_array_length(ndr, &r->in.value_name));
27657 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t)));
27658 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.value_name, ndr_get_array_length(ndr, &r->in.value_name), sizeof(uint16_t), CH_UTF16));
27660 if (flags & NDR_OUT) {
27661 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27663 return NDR_ERR_SUCCESS;
27666 _PUBLIC_ void ndr_print_spoolss_DeletePrinterDataEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrinterDataEx *r)
27668 ndr_print_struct(ndr, name, "spoolss_DeletePrinterDataEx");
27669 ndr->depth++;
27670 if (flags & NDR_SET_VALUES) {
27671 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27673 if (flags & NDR_IN) {
27674 ndr_print_struct(ndr, "in", "spoolss_DeletePrinterDataEx");
27675 ndr->depth++;
27676 ndr_print_ptr(ndr, "handle", r->in.handle);
27677 ndr->depth++;
27678 ndr_print_policy_handle(ndr, "handle", r->in.handle);
27679 ndr->depth--;
27680 ndr_print_string(ndr, "key_name", r->in.key_name);
27681 ndr_print_string(ndr, "value_name", r->in.value_name);
27682 ndr->depth--;
27684 if (flags & NDR_OUT) {
27685 ndr_print_struct(ndr, "out", "spoolss_DeletePrinterDataEx");
27686 ndr->depth++;
27687 ndr_print_WERROR(ndr, "result", r->out.result);
27688 ndr->depth--;
27690 ndr->depth--;
27693 static enum ndr_err_code ndr_push_spoolss_DeletePrinterKey(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterKey *r)
27695 if (flags & NDR_IN) {
27696 if (r->in.handle == NULL) {
27697 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
27699 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27700 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27701 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27702 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.key_name, CH_UTF16)));
27703 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.key_name, ndr_charset_length(r->in.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27705 if (flags & NDR_OUT) {
27706 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27708 return NDR_ERR_SUCCESS;
27711 static enum ndr_err_code ndr_pull_spoolss_DeletePrinterKey(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterKey *r)
27713 TALLOC_CTX *_mem_save_handle_0;
27714 if (flags & NDR_IN) {
27715 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
27716 NDR_PULL_ALLOC(ndr, r->in.handle);
27718 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
27719 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
27720 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
27721 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
27722 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.key_name));
27723 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.key_name));
27724 if (ndr_get_array_length(ndr, &r->in.key_name) > ndr_get_array_size(ndr, &r->in.key_name)) {
27725 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.key_name), ndr_get_array_length(ndr, &r->in.key_name));
27727 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t)));
27728 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.key_name, ndr_get_array_length(ndr, &r->in.key_name), sizeof(uint16_t), CH_UTF16));
27730 if (flags & NDR_OUT) {
27731 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27733 return NDR_ERR_SUCCESS;
27736 _PUBLIC_ void ndr_print_spoolss_DeletePrinterKey(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrinterKey *r)
27738 ndr_print_struct(ndr, name, "spoolss_DeletePrinterKey");
27739 ndr->depth++;
27740 if (flags & NDR_SET_VALUES) {
27741 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27743 if (flags & NDR_IN) {
27744 ndr_print_struct(ndr, "in", "spoolss_DeletePrinterKey");
27745 ndr->depth++;
27746 ndr_print_ptr(ndr, "handle", r->in.handle);
27747 ndr->depth++;
27748 ndr_print_policy_handle(ndr, "handle", r->in.handle);
27749 ndr->depth--;
27750 ndr_print_string(ndr, "key_name", r->in.key_name);
27751 ndr->depth--;
27753 if (flags & NDR_OUT) {
27754 ndr_print_struct(ndr, "out", "spoolss_DeletePrinterKey");
27755 ndr->depth++;
27756 ndr_print_WERROR(ndr, "result", r->out.result);
27757 ndr->depth--;
27759 ndr->depth--;
27762 static enum ndr_err_code ndr_push_spoolss_53(struct ndr_push *ndr, int flags, const struct spoolss_53 *r)
27764 if (flags & NDR_IN) {
27766 if (flags & NDR_OUT) {
27767 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27769 return NDR_ERR_SUCCESS;
27772 static enum ndr_err_code ndr_pull_spoolss_53(struct ndr_pull *ndr, int flags, struct spoolss_53 *r)
27774 if (flags & NDR_IN) {
27776 if (flags & NDR_OUT) {
27777 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27779 return NDR_ERR_SUCCESS;
27782 _PUBLIC_ void ndr_print_spoolss_53(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_53 *r)
27784 ndr_print_struct(ndr, name, "spoolss_53");
27785 ndr->depth++;
27786 if (flags & NDR_SET_VALUES) {
27787 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27789 if (flags & NDR_IN) {
27790 ndr_print_struct(ndr, "in", "spoolss_53");
27791 ndr->depth++;
27792 ndr->depth--;
27794 if (flags & NDR_OUT) {
27795 ndr_print_struct(ndr, "out", "spoolss_53");
27796 ndr->depth++;
27797 ndr_print_WERROR(ndr, "result", r->out.result);
27798 ndr->depth--;
27800 ndr->depth--;
27803 static enum ndr_err_code ndr_push_spoolss_DeletePrinterDriverEx(struct ndr_push *ndr, int flags, const struct spoolss_DeletePrinterDriverEx *r)
27805 if (flags & NDR_IN) {
27806 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
27807 if (r->in.server) {
27808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
27809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
27811 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
27814 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
27816 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.driver, CH_UTF16)));
27818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
27819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.driver, CH_UTF16)));
27820 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.driver, ndr_charset_length(r->in.driver, CH_UTF16), sizeof(uint16_t), CH_UTF16));
27821 NDR_CHECK(ndr_push_spoolss_DeleteDriverFlags(ndr, NDR_SCALARS, r->in.delete_flags));
27822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.version));
27824 if (flags & NDR_OUT) {
27825 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27827 return NDR_ERR_SUCCESS;
27830 static enum ndr_err_code ndr_pull_spoolss_DeletePrinterDriverEx(struct ndr_pull *ndr, int flags, struct spoolss_DeletePrinterDriverEx *r)
27832 uint32_t _ptr_server;
27833 TALLOC_CTX *_mem_save_server_0;
27834 if (flags & NDR_IN) {
27835 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
27836 if (_ptr_server) {
27837 NDR_PULL_ALLOC(ndr, r->in.server);
27838 } else {
27839 r->in.server = NULL;
27841 if (r->in.server) {
27842 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
27843 NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
27844 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
27845 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
27846 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
27847 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
27849 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
27850 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
27851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
27853 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
27854 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
27855 if (ndr_get_array_length(ndr, &r->in.architecture) > ndr_get_array_size(ndr, &r->in.architecture)) {
27856 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.architecture), ndr_get_array_length(ndr, &r->in.architecture));
27858 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t)));
27859 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t), CH_UTF16));
27860 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.driver));
27861 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.driver));
27862 if (ndr_get_array_length(ndr, &r->in.driver) > ndr_get_array_size(ndr, &r->in.driver)) {
27863 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.driver), ndr_get_array_length(ndr, &r->in.driver));
27865 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.driver), sizeof(uint16_t)));
27866 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.driver, ndr_get_array_length(ndr, &r->in.driver), sizeof(uint16_t), CH_UTF16));
27867 NDR_CHECK(ndr_pull_spoolss_DeleteDriverFlags(ndr, NDR_SCALARS, &r->in.delete_flags));
27868 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.version));
27870 if (flags & NDR_OUT) {
27871 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27873 return NDR_ERR_SUCCESS;
27876 _PUBLIC_ void ndr_print_spoolss_DeletePrinterDriverEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_DeletePrinterDriverEx *r)
27878 ndr_print_struct(ndr, name, "spoolss_DeletePrinterDriverEx");
27879 ndr->depth++;
27880 if (flags & NDR_SET_VALUES) {
27881 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27883 if (flags & NDR_IN) {
27884 ndr_print_struct(ndr, "in", "spoolss_DeletePrinterDriverEx");
27885 ndr->depth++;
27886 ndr_print_ptr(ndr, "server", r->in.server);
27887 ndr->depth++;
27888 if (r->in.server) {
27889 ndr_print_string(ndr, "server", r->in.server);
27891 ndr->depth--;
27892 ndr_print_string(ndr, "architecture", r->in.architecture);
27893 ndr_print_string(ndr, "driver", r->in.driver);
27894 ndr_print_spoolss_DeleteDriverFlags(ndr, "delete_flags", r->in.delete_flags);
27895 ndr_print_uint32(ndr, "version", r->in.version);
27896 ndr->depth--;
27898 if (flags & NDR_OUT) {
27899 ndr_print_struct(ndr, "out", "spoolss_DeletePrinterDriverEx");
27900 ndr->depth++;
27901 ndr_print_WERROR(ndr, "result", r->out.result);
27902 ndr->depth--;
27904 ndr->depth--;
27907 static enum ndr_err_code ndr_push_spoolss_55(struct ndr_push *ndr, int flags, const struct spoolss_55 *r)
27909 if (flags & NDR_IN) {
27911 if (flags & NDR_OUT) {
27912 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27914 return NDR_ERR_SUCCESS;
27917 static enum ndr_err_code ndr_pull_spoolss_55(struct ndr_pull *ndr, int flags, struct spoolss_55 *r)
27919 if (flags & NDR_IN) {
27921 if (flags & NDR_OUT) {
27922 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27924 return NDR_ERR_SUCCESS;
27927 _PUBLIC_ void ndr_print_spoolss_55(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_55 *r)
27929 ndr_print_struct(ndr, name, "spoolss_55");
27930 ndr->depth++;
27931 if (flags & NDR_SET_VALUES) {
27932 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27934 if (flags & NDR_IN) {
27935 ndr_print_struct(ndr, "in", "spoolss_55");
27936 ndr->depth++;
27937 ndr->depth--;
27939 if (flags & NDR_OUT) {
27940 ndr_print_struct(ndr, "out", "spoolss_55");
27941 ndr->depth++;
27942 ndr_print_WERROR(ndr, "result", r->out.result);
27943 ndr->depth--;
27945 ndr->depth--;
27948 static enum ndr_err_code ndr_push_spoolss_56(struct ndr_push *ndr, int flags, const struct spoolss_56 *r)
27950 if (flags & NDR_IN) {
27952 if (flags & NDR_OUT) {
27953 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27955 return NDR_ERR_SUCCESS;
27958 static enum ndr_err_code ndr_pull_spoolss_56(struct ndr_pull *ndr, int flags, struct spoolss_56 *r)
27960 if (flags & NDR_IN) {
27962 if (flags & NDR_OUT) {
27963 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
27965 return NDR_ERR_SUCCESS;
27968 _PUBLIC_ void ndr_print_spoolss_56(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_56 *r)
27970 ndr_print_struct(ndr, name, "spoolss_56");
27971 ndr->depth++;
27972 if (flags & NDR_SET_VALUES) {
27973 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
27975 if (flags & NDR_IN) {
27976 ndr_print_struct(ndr, "in", "spoolss_56");
27977 ndr->depth++;
27978 ndr->depth--;
27980 if (flags & NDR_OUT) {
27981 ndr_print_struct(ndr, "out", "spoolss_56");
27982 ndr->depth++;
27983 ndr_print_WERROR(ndr, "result", r->out.result);
27984 ndr->depth--;
27986 ndr->depth--;
27989 static enum ndr_err_code ndr_push_spoolss_57(struct ndr_push *ndr, int flags, const struct spoolss_57 *r)
27991 if (flags & NDR_IN) {
27993 if (flags & NDR_OUT) {
27994 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
27996 return NDR_ERR_SUCCESS;
27999 static enum ndr_err_code ndr_pull_spoolss_57(struct ndr_pull *ndr, int flags, struct spoolss_57 *r)
28001 if (flags & NDR_IN) {
28003 if (flags & NDR_OUT) {
28004 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28006 return NDR_ERR_SUCCESS;
28009 _PUBLIC_ void ndr_print_spoolss_57(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_57 *r)
28011 ndr_print_struct(ndr, name, "spoolss_57");
28012 ndr->depth++;
28013 if (flags & NDR_SET_VALUES) {
28014 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28016 if (flags & NDR_IN) {
28017 ndr_print_struct(ndr, "in", "spoolss_57");
28018 ndr->depth++;
28019 ndr->depth--;
28021 if (flags & NDR_OUT) {
28022 ndr_print_struct(ndr, "out", "spoolss_57");
28023 ndr->depth++;
28024 ndr_print_WERROR(ndr, "result", r->out.result);
28025 ndr->depth--;
28027 ndr->depth--;
28030 static enum ndr_err_code ndr_push_spoolss_XcvData(struct ndr_push *ndr, int flags, const struct spoolss_XcvData *r)
28032 if (flags & NDR_IN) {
28033 if (r->in.handle == NULL) {
28034 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28036 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
28037 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.function_name, CH_UTF16)));
28038 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
28039 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.function_name, CH_UTF16)));
28040 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.function_name, ndr_charset_length(r->in.function_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28041 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->in.in_data));
28042 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.in_data.length));
28043 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.out_data_size));
28044 if (r->in.status_code == NULL) {
28045 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28047 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.status_code));
28049 if (flags & NDR_OUT) {
28050 if (r->out.out_data == NULL) {
28051 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.out_data_size));
28054 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.out_data, r->in.out_data_size));
28055 if (r->out.needed == NULL) {
28056 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
28059 if (r->out.status_code == NULL) {
28060 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.status_code));
28063 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28065 return NDR_ERR_SUCCESS;
28068 static enum ndr_err_code ndr_pull_spoolss_XcvData(struct ndr_pull *ndr, int flags, struct spoolss_XcvData *r)
28070 TALLOC_CTX *_mem_save_handle_0;
28071 TALLOC_CTX *_mem_save_needed_0;
28072 TALLOC_CTX *_mem_save_status_code_0;
28073 if (flags & NDR_IN) {
28074 ZERO_STRUCT(r->out);
28076 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28077 NDR_PULL_ALLOC(ndr, r->in.handle);
28079 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
28080 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
28081 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
28082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
28083 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.function_name));
28084 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.function_name));
28085 if (ndr_get_array_length(ndr, &r->in.function_name) > ndr_get_array_size(ndr, &r->in.function_name)) {
28086 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.function_name), ndr_get_array_length(ndr, &r->in.function_name));
28088 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.function_name), sizeof(uint16_t)));
28089 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.function_name, ndr_get_array_length(ndr, &r->in.function_name), sizeof(uint16_t), CH_UTF16));
28090 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->in.in_data));
28091 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in._in_data_length));
28092 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.out_data_size));
28093 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28094 NDR_PULL_ALLOC(ndr, r->in.status_code);
28096 _mem_save_status_code_0 = NDR_PULL_GET_MEM_CTX(ndr);
28097 NDR_PULL_SET_MEM_CTX(ndr, r->in.status_code, LIBNDR_FLAG_REF_ALLOC);
28098 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.status_code));
28099 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_code_0, LIBNDR_FLAG_REF_ALLOC);
28100 NDR_PULL_ALLOC_N(ndr, r->out.out_data, r->in.out_data_size);
28101 memset(r->out.out_data, 0, (r->in.out_data_size) * sizeof(*r->out.out_data));
28102 NDR_PULL_ALLOC(ndr, r->out.needed);
28103 ZERO_STRUCTP(r->out.needed);
28104 NDR_PULL_ALLOC(ndr, r->out.status_code);
28105 *r->out.status_code = *r->in.status_code;
28107 if (flags & NDR_OUT) {
28108 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.out_data));
28109 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28110 NDR_PULL_ALLOC_N(ndr, r->out.out_data, ndr_get_array_size(ndr, &r->out.out_data));
28112 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.out_data, ndr_get_array_size(ndr, &r->out.out_data)));
28113 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28114 NDR_PULL_ALLOC(ndr, r->out.needed);
28116 _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
28117 NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
28118 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
28119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
28120 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28121 NDR_PULL_ALLOC(ndr, r->out.status_code);
28123 _mem_save_status_code_0 = NDR_PULL_GET_MEM_CTX(ndr);
28124 NDR_PULL_SET_MEM_CTX(ndr, r->out.status_code, LIBNDR_FLAG_REF_ALLOC);
28125 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.status_code));
28126 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_status_code_0, LIBNDR_FLAG_REF_ALLOC);
28127 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28128 if (r->out.out_data) {
28129 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.out_data, r->in.out_data_size));
28132 return NDR_ERR_SUCCESS;
28135 _PUBLIC_ void ndr_print_spoolss_XcvData(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_XcvData *r)
28137 ndr_print_struct(ndr, name, "spoolss_XcvData");
28138 ndr->depth++;
28139 if (flags & NDR_SET_VALUES) {
28140 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28142 if (flags & NDR_IN) {
28143 ndr_print_struct(ndr, "in", "spoolss_XcvData");
28144 ndr->depth++;
28145 ndr_print_ptr(ndr, "handle", r->in.handle);
28146 ndr->depth++;
28147 ndr_print_policy_handle(ndr, "handle", r->in.handle);
28148 ndr->depth--;
28149 ndr_print_string(ndr, "function_name", r->in.function_name);
28150 ndr_print_DATA_BLOB(ndr, "in_data", r->in.in_data);
28151 ndr_print_uint32(ndr, "_in_data_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->in.in_data.length:r->in._in_data_length);
28152 ndr_print_uint32(ndr, "out_data_size", r->in.out_data_size);
28153 ndr_print_ptr(ndr, "status_code", r->in.status_code);
28154 ndr->depth++;
28155 ndr_print_uint32(ndr, "status_code", *r->in.status_code);
28156 ndr->depth--;
28157 ndr->depth--;
28159 if (flags & NDR_OUT) {
28160 ndr_print_struct(ndr, "out", "spoolss_XcvData");
28161 ndr->depth++;
28162 ndr_print_ptr(ndr, "out_data", r->out.out_data);
28163 ndr->depth++;
28164 ndr_print_array_uint8(ndr, "out_data", r->out.out_data, r->in.out_data_size);
28165 ndr->depth--;
28166 ndr_print_ptr(ndr, "needed", r->out.needed);
28167 ndr->depth++;
28168 ndr_print_uint32(ndr, "needed", *r->out.needed);
28169 ndr->depth--;
28170 ndr_print_ptr(ndr, "status_code", r->out.status_code);
28171 ndr->depth++;
28172 ndr_print_uint32(ndr, "status_code", *r->out.status_code);
28173 ndr->depth--;
28174 ndr_print_WERROR(ndr, "result", r->out.result);
28175 ndr->depth--;
28177 ndr->depth--;
28180 _PUBLIC_ enum ndr_err_code ndr_push_spoolss_AddPrinterDriverEx(struct ndr_push *ndr, int flags, const struct spoolss_AddPrinterDriverEx *r)
28182 if (flags & NDR_IN) {
28183 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
28184 if (r->in.servername) {
28185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
28186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
28187 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
28188 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28190 if (r->in.info_ctr == NULL) {
28191 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28193 NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
28194 NDR_CHECK(ndr_push_spoolss_AddPrinterDriverExFlags(ndr, NDR_SCALARS, r->in.flags));
28196 if (flags & NDR_OUT) {
28197 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28199 return NDR_ERR_SUCCESS;
28202 _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_AddPrinterDriverEx(struct ndr_pull *ndr, int flags, struct spoolss_AddPrinterDriverEx *r)
28204 uint32_t _ptr_servername;
28205 TALLOC_CTX *_mem_save_servername_0;
28206 TALLOC_CTX *_mem_save_info_ctr_0;
28207 if (flags & NDR_IN) {
28208 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
28209 if (_ptr_servername) {
28210 NDR_PULL_ALLOC(ndr, r->in.servername);
28211 } else {
28212 r->in.servername = NULL;
28214 if (r->in.servername) {
28215 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
28216 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
28217 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
28218 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
28219 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
28220 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
28222 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
28223 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
28224 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
28226 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28227 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
28229 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
28230 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
28231 NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
28232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
28233 NDR_CHECK(ndr_pull_spoolss_AddPrinterDriverExFlags(ndr, NDR_SCALARS, &r->in.flags));
28235 if (flags & NDR_OUT) {
28236 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28238 return NDR_ERR_SUCCESS;
28241 _PUBLIC_ void ndr_print_spoolss_AddPrinterDriverEx(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_AddPrinterDriverEx *r)
28243 ndr_print_struct(ndr, name, "spoolss_AddPrinterDriverEx");
28244 ndr->depth++;
28245 if (flags & NDR_SET_VALUES) {
28246 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28248 if (flags & NDR_IN) {
28249 ndr_print_struct(ndr, "in", "spoolss_AddPrinterDriverEx");
28250 ndr->depth++;
28251 ndr_print_ptr(ndr, "servername", r->in.servername);
28252 ndr->depth++;
28253 if (r->in.servername) {
28254 ndr_print_string(ndr, "servername", r->in.servername);
28256 ndr->depth--;
28257 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
28258 ndr->depth++;
28259 ndr_print_spoolss_AddDriverInfoCtr(ndr, "info_ctr", r->in.info_ctr);
28260 ndr->depth--;
28261 ndr_print_spoolss_AddPrinterDriverExFlags(ndr, "flags", r->in.flags);
28262 ndr->depth--;
28264 if (flags & NDR_OUT) {
28265 ndr_print_struct(ndr, "out", "spoolss_AddPrinterDriverEx");
28266 ndr->depth++;
28267 ndr_print_WERROR(ndr, "result", r->out.result);
28268 ndr->depth--;
28270 ndr->depth--;
28273 static enum ndr_err_code ndr_push_spoolss_5a(struct ndr_push *ndr, int flags, const struct spoolss_5a *r)
28275 if (flags & NDR_IN) {
28277 if (flags & NDR_OUT) {
28278 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28280 return NDR_ERR_SUCCESS;
28283 static enum ndr_err_code ndr_pull_spoolss_5a(struct ndr_pull *ndr, int flags, struct spoolss_5a *r)
28285 if (flags & NDR_IN) {
28287 if (flags & NDR_OUT) {
28288 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28290 return NDR_ERR_SUCCESS;
28293 _PUBLIC_ void ndr_print_spoolss_5a(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_5a *r)
28295 ndr_print_struct(ndr, name, "spoolss_5a");
28296 ndr->depth++;
28297 if (flags & NDR_SET_VALUES) {
28298 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28300 if (flags & NDR_IN) {
28301 ndr_print_struct(ndr, "in", "spoolss_5a");
28302 ndr->depth++;
28303 ndr->depth--;
28305 if (flags & NDR_OUT) {
28306 ndr_print_struct(ndr, "out", "spoolss_5a");
28307 ndr->depth++;
28308 ndr_print_WERROR(ndr, "result", r->out.result);
28309 ndr->depth--;
28311 ndr->depth--;
28314 static enum ndr_err_code ndr_push_spoolss_5b(struct ndr_push *ndr, int flags, const struct spoolss_5b *r)
28316 if (flags & NDR_IN) {
28318 if (flags & NDR_OUT) {
28319 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28321 return NDR_ERR_SUCCESS;
28324 static enum ndr_err_code ndr_pull_spoolss_5b(struct ndr_pull *ndr, int flags, struct spoolss_5b *r)
28326 if (flags & NDR_IN) {
28328 if (flags & NDR_OUT) {
28329 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28331 return NDR_ERR_SUCCESS;
28334 _PUBLIC_ void ndr_print_spoolss_5b(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_5b *r)
28336 ndr_print_struct(ndr, name, "spoolss_5b");
28337 ndr->depth++;
28338 if (flags & NDR_SET_VALUES) {
28339 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28341 if (flags & NDR_IN) {
28342 ndr_print_struct(ndr, "in", "spoolss_5b");
28343 ndr->depth++;
28344 ndr->depth--;
28346 if (flags & NDR_OUT) {
28347 ndr_print_struct(ndr, "out", "spoolss_5b");
28348 ndr->depth++;
28349 ndr_print_WERROR(ndr, "result", r->out.result);
28350 ndr->depth--;
28352 ndr->depth--;
28355 static enum ndr_err_code ndr_push_spoolss_5c(struct ndr_push *ndr, int flags, const struct spoolss_5c *r)
28357 if (flags & NDR_IN) {
28359 if (flags & NDR_OUT) {
28360 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28362 return NDR_ERR_SUCCESS;
28365 static enum ndr_err_code ndr_pull_spoolss_5c(struct ndr_pull *ndr, int flags, struct spoolss_5c *r)
28367 if (flags & NDR_IN) {
28369 if (flags & NDR_OUT) {
28370 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28372 return NDR_ERR_SUCCESS;
28375 _PUBLIC_ void ndr_print_spoolss_5c(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_5c *r)
28377 ndr_print_struct(ndr, name, "spoolss_5c");
28378 ndr->depth++;
28379 if (flags & NDR_SET_VALUES) {
28380 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28382 if (flags & NDR_IN) {
28383 ndr_print_struct(ndr, "in", "spoolss_5c");
28384 ndr->depth++;
28385 ndr->depth--;
28387 if (flags & NDR_OUT) {
28388 ndr_print_struct(ndr, "out", "spoolss_5c");
28389 ndr->depth++;
28390 ndr_print_WERROR(ndr, "result", r->out.result);
28391 ndr->depth--;
28393 ndr->depth--;
28396 static enum ndr_err_code ndr_push_spoolss_5d(struct ndr_push *ndr, int flags, const struct spoolss_5d *r)
28398 if (flags & NDR_IN) {
28400 if (flags & NDR_OUT) {
28401 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28403 return NDR_ERR_SUCCESS;
28406 static enum ndr_err_code ndr_pull_spoolss_5d(struct ndr_pull *ndr, int flags, struct spoolss_5d *r)
28408 if (flags & NDR_IN) {
28410 if (flags & NDR_OUT) {
28411 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28413 return NDR_ERR_SUCCESS;
28416 _PUBLIC_ void ndr_print_spoolss_5d(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_5d *r)
28418 ndr_print_struct(ndr, name, "spoolss_5d");
28419 ndr->depth++;
28420 if (flags & NDR_SET_VALUES) {
28421 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28423 if (flags & NDR_IN) {
28424 ndr_print_struct(ndr, "in", "spoolss_5d");
28425 ndr->depth++;
28426 ndr->depth--;
28428 if (flags & NDR_OUT) {
28429 ndr_print_struct(ndr, "out", "spoolss_5d");
28430 ndr->depth++;
28431 ndr_print_WERROR(ndr, "result", r->out.result);
28432 ndr->depth--;
28434 ndr->depth--;
28437 static enum ndr_err_code ndr_push_spoolss_5e(struct ndr_push *ndr, int flags, const struct spoolss_5e *r)
28439 if (flags & NDR_IN) {
28441 if (flags & NDR_OUT) {
28442 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28444 return NDR_ERR_SUCCESS;
28447 static enum ndr_err_code ndr_pull_spoolss_5e(struct ndr_pull *ndr, int flags, struct spoolss_5e *r)
28449 if (flags & NDR_IN) {
28451 if (flags & NDR_OUT) {
28452 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28454 return NDR_ERR_SUCCESS;
28457 _PUBLIC_ void ndr_print_spoolss_5e(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_5e *r)
28459 ndr_print_struct(ndr, name, "spoolss_5e");
28460 ndr->depth++;
28461 if (flags & NDR_SET_VALUES) {
28462 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28464 if (flags & NDR_IN) {
28465 ndr_print_struct(ndr, "in", "spoolss_5e");
28466 ndr->depth++;
28467 ndr->depth--;
28469 if (flags & NDR_OUT) {
28470 ndr_print_struct(ndr, "out", "spoolss_5e");
28471 ndr->depth++;
28472 ndr_print_WERROR(ndr, "result", r->out.result);
28473 ndr->depth--;
28475 ndr->depth--;
28478 static enum ndr_err_code ndr_push_spoolss_5f(struct ndr_push *ndr, int flags, const struct spoolss_5f *r)
28480 if (flags & NDR_IN) {
28482 if (flags & NDR_OUT) {
28483 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28485 return NDR_ERR_SUCCESS;
28488 static enum ndr_err_code ndr_pull_spoolss_5f(struct ndr_pull *ndr, int flags, struct spoolss_5f *r)
28490 if (flags & NDR_IN) {
28492 if (flags & NDR_OUT) {
28493 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28495 return NDR_ERR_SUCCESS;
28498 _PUBLIC_ void ndr_print_spoolss_5f(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_5f *r)
28500 ndr_print_struct(ndr, name, "spoolss_5f");
28501 ndr->depth++;
28502 if (flags & NDR_SET_VALUES) {
28503 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28505 if (flags & NDR_IN) {
28506 ndr_print_struct(ndr, "in", "spoolss_5f");
28507 ndr->depth++;
28508 ndr->depth--;
28510 if (flags & NDR_OUT) {
28511 ndr_print_struct(ndr, "out", "spoolss_5f");
28512 ndr->depth++;
28513 ndr_print_WERROR(ndr, "result", r->out.result);
28514 ndr->depth--;
28516 ndr->depth--;
28519 static enum ndr_err_code ndr_push_spoolss_60(struct ndr_push *ndr, int flags, const struct spoolss_60 *r)
28521 if (flags & NDR_IN) {
28523 if (flags & NDR_OUT) {
28524 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28526 return NDR_ERR_SUCCESS;
28529 static enum ndr_err_code ndr_pull_spoolss_60(struct ndr_pull *ndr, int flags, struct spoolss_60 *r)
28531 if (flags & NDR_IN) {
28533 if (flags & NDR_OUT) {
28534 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28536 return NDR_ERR_SUCCESS;
28539 _PUBLIC_ void ndr_print_spoolss_60(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_60 *r)
28541 ndr_print_struct(ndr, name, "spoolss_60");
28542 ndr->depth++;
28543 if (flags & NDR_SET_VALUES) {
28544 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28546 if (flags & NDR_IN) {
28547 ndr_print_struct(ndr, "in", "spoolss_60");
28548 ndr->depth++;
28549 ndr->depth--;
28551 if (flags & NDR_OUT) {
28552 ndr_print_struct(ndr, "out", "spoolss_60");
28553 ndr->depth++;
28554 ndr_print_WERROR(ndr, "result", r->out.result);
28555 ndr->depth--;
28557 ndr->depth--;
28560 static enum ndr_err_code ndr_push_spoolss_61(struct ndr_push *ndr, int flags, const struct spoolss_61 *r)
28562 if (flags & NDR_IN) {
28564 if (flags & NDR_OUT) {
28565 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28567 return NDR_ERR_SUCCESS;
28570 static enum ndr_err_code ndr_pull_spoolss_61(struct ndr_pull *ndr, int flags, struct spoolss_61 *r)
28572 if (flags & NDR_IN) {
28574 if (flags & NDR_OUT) {
28575 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28577 return NDR_ERR_SUCCESS;
28580 _PUBLIC_ void ndr_print_spoolss_61(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_61 *r)
28582 ndr_print_struct(ndr, name, "spoolss_61");
28583 ndr->depth++;
28584 if (flags & NDR_SET_VALUES) {
28585 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28587 if (flags & NDR_IN) {
28588 ndr_print_struct(ndr, "in", "spoolss_61");
28589 ndr->depth++;
28590 ndr->depth--;
28592 if (flags & NDR_OUT) {
28593 ndr_print_struct(ndr, "out", "spoolss_61");
28594 ndr->depth++;
28595 ndr_print_WERROR(ndr, "result", r->out.result);
28596 ndr->depth--;
28598 ndr->depth--;
28601 static enum ndr_err_code ndr_push_spoolss_62(struct ndr_push *ndr, int flags, const struct spoolss_62 *r)
28603 if (flags & NDR_IN) {
28605 if (flags & NDR_OUT) {
28606 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28608 return NDR_ERR_SUCCESS;
28611 static enum ndr_err_code ndr_pull_spoolss_62(struct ndr_pull *ndr, int flags, struct spoolss_62 *r)
28613 if (flags & NDR_IN) {
28615 if (flags & NDR_OUT) {
28616 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28618 return NDR_ERR_SUCCESS;
28621 _PUBLIC_ void ndr_print_spoolss_62(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_62 *r)
28623 ndr_print_struct(ndr, name, "spoolss_62");
28624 ndr->depth++;
28625 if (flags & NDR_SET_VALUES) {
28626 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28628 if (flags & NDR_IN) {
28629 ndr_print_struct(ndr, "in", "spoolss_62");
28630 ndr->depth++;
28631 ndr->depth--;
28633 if (flags & NDR_OUT) {
28634 ndr_print_struct(ndr, "out", "spoolss_62");
28635 ndr->depth++;
28636 ndr_print_WERROR(ndr, "result", r->out.result);
28637 ndr->depth--;
28639 ndr->depth--;
28642 static enum ndr_err_code ndr_push_spoolss_63(struct ndr_push *ndr, int flags, const struct spoolss_63 *r)
28644 if (flags & NDR_IN) {
28646 if (flags & NDR_OUT) {
28647 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28649 return NDR_ERR_SUCCESS;
28652 static enum ndr_err_code ndr_pull_spoolss_63(struct ndr_pull *ndr, int flags, struct spoolss_63 *r)
28654 if (flags & NDR_IN) {
28656 if (flags & NDR_OUT) {
28657 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28659 return NDR_ERR_SUCCESS;
28662 _PUBLIC_ void ndr_print_spoolss_63(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_63 *r)
28664 ndr_print_struct(ndr, name, "spoolss_63");
28665 ndr->depth++;
28666 if (flags & NDR_SET_VALUES) {
28667 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28669 if (flags & NDR_IN) {
28670 ndr_print_struct(ndr, "in", "spoolss_63");
28671 ndr->depth++;
28672 ndr->depth--;
28674 if (flags & NDR_OUT) {
28675 ndr_print_struct(ndr, "out", "spoolss_63");
28676 ndr->depth++;
28677 ndr_print_WERROR(ndr, "result", r->out.result);
28678 ndr->depth--;
28680 ndr->depth--;
28683 static enum ndr_err_code ndr_push_spoolss_64(struct ndr_push *ndr, int flags, const struct spoolss_64 *r)
28685 if (flags & NDR_IN) {
28687 if (flags & NDR_OUT) {
28688 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28690 return NDR_ERR_SUCCESS;
28693 static enum ndr_err_code ndr_pull_spoolss_64(struct ndr_pull *ndr, int flags, struct spoolss_64 *r)
28695 if (flags & NDR_IN) {
28697 if (flags & NDR_OUT) {
28698 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28700 return NDR_ERR_SUCCESS;
28703 _PUBLIC_ void ndr_print_spoolss_64(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_64 *r)
28705 ndr_print_struct(ndr, name, "spoolss_64");
28706 ndr->depth++;
28707 if (flags & NDR_SET_VALUES) {
28708 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28710 if (flags & NDR_IN) {
28711 ndr_print_struct(ndr, "in", "spoolss_64");
28712 ndr->depth++;
28713 ndr->depth--;
28715 if (flags & NDR_OUT) {
28716 ndr_print_struct(ndr, "out", "spoolss_64");
28717 ndr->depth++;
28718 ndr_print_WERROR(ndr, "result", r->out.result);
28719 ndr->depth--;
28721 ndr->depth--;
28724 static enum ndr_err_code ndr_push_spoolss_65(struct ndr_push *ndr, int flags, const struct spoolss_65 *r)
28726 if (flags & NDR_IN) {
28728 if (flags & NDR_OUT) {
28729 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28731 return NDR_ERR_SUCCESS;
28734 static enum ndr_err_code ndr_pull_spoolss_65(struct ndr_pull *ndr, int flags, struct spoolss_65 *r)
28736 if (flags & NDR_IN) {
28738 if (flags & NDR_OUT) {
28739 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28741 return NDR_ERR_SUCCESS;
28744 _PUBLIC_ void ndr_print_spoolss_65(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_65 *r)
28746 ndr_print_struct(ndr, name, "spoolss_65");
28747 ndr->depth++;
28748 if (flags & NDR_SET_VALUES) {
28749 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28751 if (flags & NDR_IN) {
28752 ndr_print_struct(ndr, "in", "spoolss_65");
28753 ndr->depth++;
28754 ndr->depth--;
28756 if (flags & NDR_OUT) {
28757 ndr_print_struct(ndr, "out", "spoolss_65");
28758 ndr->depth++;
28759 ndr_print_WERROR(ndr, "result", r->out.result);
28760 ndr->depth--;
28762 ndr->depth--;
28765 static enum ndr_err_code ndr_push_spoolss_GetCorePrinterDrivers(struct ndr_push *ndr, int flags, const struct spoolss_GetCorePrinterDrivers *r)
28767 uint32_t cntr_core_printer_drivers_1;
28768 if (flags & NDR_IN) {
28769 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
28770 if (r->in.servername) {
28771 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
28772 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
28773 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
28774 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28776 if (r->in.architecture == NULL) {
28777 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28779 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
28780 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
28781 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
28782 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28783 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.core_driver_size));
28784 if (r->in.core_driver_dependencies == NULL) {
28785 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28787 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.core_driver_size));
28788 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.core_driver_dependencies, r->in.core_driver_size, sizeof(uint16_t), CH_UTF16));
28789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.core_printer_driver_count));
28791 if (flags & NDR_OUT) {
28792 if (r->out.core_printer_drivers == NULL) {
28793 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28795 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.core_printer_driver_count));
28796 for (cntr_core_printer_drivers_1 = 0; cntr_core_printer_drivers_1 < r->in.core_printer_driver_count; cntr_core_printer_drivers_1++) {
28797 NDR_CHECK(ndr_push_spoolss_CorePrinterDriver(ndr, NDR_SCALARS, &r->out.core_printer_drivers[cntr_core_printer_drivers_1]));
28799 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28801 return NDR_ERR_SUCCESS;
28804 static enum ndr_err_code ndr_pull_spoolss_GetCorePrinterDrivers(struct ndr_pull *ndr, int flags, struct spoolss_GetCorePrinterDrivers *r)
28806 uint32_t _ptr_servername;
28807 uint32_t cntr_core_printer_drivers_1;
28808 TALLOC_CTX *_mem_save_servername_0;
28809 TALLOC_CTX *_mem_save_core_printer_drivers_1;
28810 if (flags & NDR_IN) {
28811 ZERO_STRUCT(r->out);
28813 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
28814 if (_ptr_servername) {
28815 NDR_PULL_ALLOC(ndr, r->in.servername);
28816 } else {
28817 r->in.servername = NULL;
28819 if (r->in.servername) {
28820 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
28821 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
28822 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
28823 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
28824 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
28825 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
28827 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
28828 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
28829 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
28831 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
28832 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
28833 if (ndr_get_array_length(ndr, &r->in.architecture) > ndr_get_array_size(ndr, &r->in.architecture)) {
28834 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.architecture), ndr_get_array_length(ndr, &r->in.architecture));
28836 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t)));
28837 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t), CH_UTF16));
28838 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.core_driver_size));
28839 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.core_driver_dependencies));
28840 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.core_driver_dependencies, ndr_get_array_size(ndr, &r->in.core_driver_dependencies), sizeof(uint16_t), CH_UTF16));
28841 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.core_printer_driver_count));
28842 NDR_PULL_ALLOC_N(ndr, r->out.core_printer_drivers, r->in.core_printer_driver_count);
28843 memset(r->out.core_printer_drivers, 0, (r->in.core_printer_driver_count) * sizeof(*r->out.core_printer_drivers));
28844 if (r->in.core_driver_dependencies) {
28845 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.core_driver_dependencies, r->in.core_driver_size));
28848 if (flags & NDR_OUT) {
28849 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.core_printer_drivers));
28850 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
28851 NDR_PULL_ALLOC_N(ndr, r->out.core_printer_drivers, ndr_get_array_size(ndr, &r->out.core_printer_drivers));
28853 _mem_save_core_printer_drivers_1 = NDR_PULL_GET_MEM_CTX(ndr);
28854 NDR_PULL_SET_MEM_CTX(ndr, r->out.core_printer_drivers, 0);
28855 for (cntr_core_printer_drivers_1 = 0; cntr_core_printer_drivers_1 < r->in.core_printer_driver_count; cntr_core_printer_drivers_1++) {
28856 NDR_CHECK(ndr_pull_spoolss_CorePrinterDriver(ndr, NDR_SCALARS, &r->out.core_printer_drivers[cntr_core_printer_drivers_1]));
28858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_core_printer_drivers_1, 0);
28859 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28860 if (r->out.core_printer_drivers) {
28861 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.core_printer_drivers, r->in.core_printer_driver_count));
28864 return NDR_ERR_SUCCESS;
28867 _PUBLIC_ void ndr_print_spoolss_GetCorePrinterDrivers(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetCorePrinterDrivers *r)
28869 uint32_t cntr_core_printer_drivers_1;
28870 ndr_print_struct(ndr, name, "spoolss_GetCorePrinterDrivers");
28871 ndr->depth++;
28872 if (flags & NDR_SET_VALUES) {
28873 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28875 if (flags & NDR_IN) {
28876 ndr_print_struct(ndr, "in", "spoolss_GetCorePrinterDrivers");
28877 ndr->depth++;
28878 ndr_print_ptr(ndr, "servername", r->in.servername);
28879 ndr->depth++;
28880 if (r->in.servername) {
28881 ndr_print_string(ndr, "servername", r->in.servername);
28883 ndr->depth--;
28884 ndr_print_ptr(ndr, "architecture", r->in.architecture);
28885 ndr->depth++;
28886 ndr_print_string(ndr, "architecture", r->in.architecture);
28887 ndr->depth--;
28888 ndr_print_uint32(ndr, "core_driver_size", r->in.core_driver_size);
28889 ndr_print_ptr(ndr, "core_driver_dependencies", r->in.core_driver_dependencies);
28890 ndr->depth++;
28891 ndr_print_string(ndr, "core_driver_dependencies", r->in.core_driver_dependencies);
28892 ndr->depth--;
28893 ndr_print_uint32(ndr, "core_printer_driver_count", r->in.core_printer_driver_count);
28894 ndr->depth--;
28896 if (flags & NDR_OUT) {
28897 ndr_print_struct(ndr, "out", "spoolss_GetCorePrinterDrivers");
28898 ndr->depth++;
28899 ndr_print_ptr(ndr, "core_printer_drivers", r->out.core_printer_drivers);
28900 ndr->depth++;
28901 ndr->print(ndr, "%s: ARRAY(%d)", "core_printer_drivers", (int)r->in.core_printer_driver_count);
28902 ndr->depth++;
28903 for (cntr_core_printer_drivers_1=0;cntr_core_printer_drivers_1<r->in.core_printer_driver_count;cntr_core_printer_drivers_1++) {
28904 char *idx_1=NULL;
28905 if (asprintf(&idx_1, "[%d]", cntr_core_printer_drivers_1) != -1) {
28906 ndr_print_spoolss_CorePrinterDriver(ndr, "core_printer_drivers", &r->out.core_printer_drivers[cntr_core_printer_drivers_1]);
28907 free(idx_1);
28910 ndr->depth--;
28911 ndr->depth--;
28912 ndr_print_WERROR(ndr, "result", r->out.result);
28913 ndr->depth--;
28915 ndr->depth--;
28918 static enum ndr_err_code ndr_push_spoolss_67(struct ndr_push *ndr, int flags, const struct spoolss_67 *r)
28920 if (flags & NDR_IN) {
28922 if (flags & NDR_OUT) {
28923 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
28925 return NDR_ERR_SUCCESS;
28928 static enum ndr_err_code ndr_pull_spoolss_67(struct ndr_pull *ndr, int flags, struct spoolss_67 *r)
28930 if (flags & NDR_IN) {
28932 if (flags & NDR_OUT) {
28933 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
28935 return NDR_ERR_SUCCESS;
28938 _PUBLIC_ void ndr_print_spoolss_67(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_67 *r)
28940 ndr_print_struct(ndr, name, "spoolss_67");
28941 ndr->depth++;
28942 if (flags & NDR_SET_VALUES) {
28943 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
28945 if (flags & NDR_IN) {
28946 ndr_print_struct(ndr, "in", "spoolss_67");
28947 ndr->depth++;
28948 ndr->depth--;
28950 if (flags & NDR_OUT) {
28951 ndr_print_struct(ndr, "out", "spoolss_67");
28952 ndr->depth++;
28953 ndr_print_WERROR(ndr, "result", r->out.result);
28954 ndr->depth--;
28956 ndr->depth--;
28959 static enum ndr_err_code ndr_push_spoolss_GetPrinterDriverPackagePath(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDriverPackagePath *r)
28961 if (flags & NDR_IN) {
28962 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
28963 if (r->in.servername) {
28964 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
28965 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
28966 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
28967 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28969 if (r->in.architecture == NULL) {
28970 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
28973 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
28974 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.architecture, CH_UTF16)));
28975 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28976 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.language));
28977 if (r->in.language) {
28978 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.language, CH_UTF16)));
28979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
28980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.language, CH_UTF16)));
28981 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.language, ndr_charset_length(r->in.language, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28983 if (r->in.package_id == NULL) {
28984 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
28986 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.package_id, CH_UTF16)));
28987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
28988 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.package_id, CH_UTF16)));
28989 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.package_id, ndr_charset_length(r->in.package_id, CH_UTF16), sizeof(uint16_t), CH_UTF16));
28990 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.driver_package_cab));
28991 if (r->in.driver_package_cab) {
28992 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.driver_package_cab_size));
28993 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.driver_package_cab, r->in.driver_package_cab_size, sizeof(uint16_t), CH_UTF16));
28995 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.driver_package_cab_size));
28997 if (flags & NDR_OUT) {
28998 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.driver_package_cab));
28999 if (r->out.driver_package_cab) {
29000 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.driver_package_cab_size));
29001 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->out.driver_package_cab, r->in.driver_package_cab_size, sizeof(uint16_t), CH_UTF16));
29003 if (r->out.required == NULL) {
29004 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
29006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.required));
29007 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29009 return NDR_ERR_SUCCESS;
29012 static enum ndr_err_code ndr_pull_spoolss_GetPrinterDriverPackagePath(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDriverPackagePath *r)
29014 uint32_t _ptr_servername;
29015 uint32_t _ptr_language;
29016 uint32_t _ptr_driver_package_cab;
29017 TALLOC_CTX *_mem_save_servername_0;
29018 TALLOC_CTX *_mem_save_language_0;
29019 TALLOC_CTX *_mem_save_driver_package_cab_0;
29020 TALLOC_CTX *_mem_save_required_0;
29021 if (flags & NDR_IN) {
29022 ZERO_STRUCT(r->out);
29024 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
29025 if (_ptr_servername) {
29026 NDR_PULL_ALLOC(ndr, r->in.servername);
29027 } else {
29028 r->in.servername = NULL;
29030 if (r->in.servername) {
29031 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
29032 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
29033 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
29034 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
29035 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
29036 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
29038 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
29039 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
29040 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
29042 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
29043 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
29044 if (ndr_get_array_length(ndr, &r->in.architecture) > ndr_get_array_size(ndr, &r->in.architecture)) {
29045 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.architecture), ndr_get_array_length(ndr, &r->in.architecture));
29047 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t)));
29048 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.architecture, ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t), CH_UTF16));
29049 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_language));
29050 if (_ptr_language) {
29051 NDR_PULL_ALLOC(ndr, r->in.language);
29052 } else {
29053 r->in.language = NULL;
29055 if (r->in.language) {
29056 _mem_save_language_0 = NDR_PULL_GET_MEM_CTX(ndr);
29057 NDR_PULL_SET_MEM_CTX(ndr, r->in.language, 0);
29058 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.language));
29059 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.language));
29060 if (ndr_get_array_length(ndr, &r->in.language) > ndr_get_array_size(ndr, &r->in.language)) {
29061 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.language), ndr_get_array_length(ndr, &r->in.language));
29063 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.language), sizeof(uint16_t)));
29064 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.language, ndr_get_array_length(ndr, &r->in.language), sizeof(uint16_t), CH_UTF16));
29065 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_language_0, 0);
29067 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.package_id));
29068 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.package_id));
29069 if (ndr_get_array_length(ndr, &r->in.package_id) > ndr_get_array_size(ndr, &r->in.package_id)) {
29070 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.package_id), ndr_get_array_length(ndr, &r->in.package_id));
29072 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.package_id), sizeof(uint16_t)));
29073 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.package_id, ndr_get_array_length(ndr, &r->in.package_id), sizeof(uint16_t), CH_UTF16));
29074 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_package_cab));
29075 if (_ptr_driver_package_cab) {
29076 NDR_PULL_ALLOC(ndr, r->in.driver_package_cab);
29077 } else {
29078 r->in.driver_package_cab = NULL;
29080 if (r->in.driver_package_cab) {
29081 _mem_save_driver_package_cab_0 = NDR_PULL_GET_MEM_CTX(ndr);
29082 NDR_PULL_SET_MEM_CTX(ndr, r->in.driver_package_cab, 0);
29083 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.driver_package_cab));
29084 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.driver_package_cab, ndr_get_array_size(ndr, &r->in.driver_package_cab), sizeof(uint16_t), CH_UTF16));
29085 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_package_cab_0, 0);
29087 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.driver_package_cab_size));
29088 NDR_PULL_ALLOC(ndr, r->out.required);
29089 ZERO_STRUCTP(r->out.required);
29090 if (r->in.driver_package_cab) {
29091 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.driver_package_cab, r->in.driver_package_cab_size));
29094 if (flags & NDR_OUT) {
29095 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_package_cab));
29096 if (_ptr_driver_package_cab) {
29097 NDR_PULL_ALLOC(ndr, r->out.driver_package_cab);
29098 } else {
29099 r->out.driver_package_cab = NULL;
29101 if (r->out.driver_package_cab) {
29102 _mem_save_driver_package_cab_0 = NDR_PULL_GET_MEM_CTX(ndr);
29103 NDR_PULL_SET_MEM_CTX(ndr, r->out.driver_package_cab, 0);
29104 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.driver_package_cab));
29105 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->out.driver_package_cab, ndr_get_array_size(ndr, &r->out.driver_package_cab), sizeof(uint16_t), CH_UTF16));
29106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_package_cab_0, 0);
29108 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
29109 NDR_PULL_ALLOC(ndr, r->out.required);
29111 _mem_save_required_0 = NDR_PULL_GET_MEM_CTX(ndr);
29112 NDR_PULL_SET_MEM_CTX(ndr, r->out.required, LIBNDR_FLAG_REF_ALLOC);
29113 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.required));
29114 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_required_0, LIBNDR_FLAG_REF_ALLOC);
29115 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29116 if (r->out.driver_package_cab) {
29117 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.driver_package_cab, r->in.driver_package_cab_size));
29120 return NDR_ERR_SUCCESS;
29123 _PUBLIC_ void ndr_print_spoolss_GetPrinterDriverPackagePath(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_GetPrinterDriverPackagePath *r)
29125 ndr_print_struct(ndr, name, "spoolss_GetPrinterDriverPackagePath");
29126 ndr->depth++;
29127 if (flags & NDR_SET_VALUES) {
29128 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29130 if (flags & NDR_IN) {
29131 ndr_print_struct(ndr, "in", "spoolss_GetPrinterDriverPackagePath");
29132 ndr->depth++;
29133 ndr_print_ptr(ndr, "servername", r->in.servername);
29134 ndr->depth++;
29135 if (r->in.servername) {
29136 ndr_print_string(ndr, "servername", r->in.servername);
29138 ndr->depth--;
29139 ndr_print_ptr(ndr, "architecture", r->in.architecture);
29140 ndr->depth++;
29141 ndr_print_string(ndr, "architecture", r->in.architecture);
29142 ndr->depth--;
29143 ndr_print_ptr(ndr, "language", r->in.language);
29144 ndr->depth++;
29145 if (r->in.language) {
29146 ndr_print_string(ndr, "language", r->in.language);
29148 ndr->depth--;
29149 ndr_print_ptr(ndr, "package_id", r->in.package_id);
29150 ndr->depth++;
29151 ndr_print_string(ndr, "package_id", r->in.package_id);
29152 ndr->depth--;
29153 ndr_print_ptr(ndr, "driver_package_cab", r->in.driver_package_cab);
29154 ndr->depth++;
29155 if (r->in.driver_package_cab) {
29156 ndr_print_string(ndr, "driver_package_cab", r->in.driver_package_cab);
29158 ndr->depth--;
29159 ndr_print_uint32(ndr, "driver_package_cab_size", r->in.driver_package_cab_size);
29160 ndr->depth--;
29162 if (flags & NDR_OUT) {
29163 ndr_print_struct(ndr, "out", "spoolss_GetPrinterDriverPackagePath");
29164 ndr->depth++;
29165 ndr_print_ptr(ndr, "driver_package_cab", r->out.driver_package_cab);
29166 ndr->depth++;
29167 if (r->out.driver_package_cab) {
29168 ndr_print_string(ndr, "driver_package_cab", r->out.driver_package_cab);
29170 ndr->depth--;
29171 ndr_print_ptr(ndr, "required", r->out.required);
29172 ndr->depth++;
29173 ndr_print_uint32(ndr, "required", *r->out.required);
29174 ndr->depth--;
29175 ndr_print_WERROR(ndr, "result", r->out.result);
29176 ndr->depth--;
29178 ndr->depth--;
29181 static enum ndr_err_code ndr_push_spoolss_69(struct ndr_push *ndr, int flags, const struct spoolss_69 *r)
29183 if (flags & NDR_IN) {
29185 if (flags & NDR_OUT) {
29186 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29188 return NDR_ERR_SUCCESS;
29191 static enum ndr_err_code ndr_pull_spoolss_69(struct ndr_pull *ndr, int flags, struct spoolss_69 *r)
29193 if (flags & NDR_IN) {
29195 if (flags & NDR_OUT) {
29196 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29198 return NDR_ERR_SUCCESS;
29201 _PUBLIC_ void ndr_print_spoolss_69(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_69 *r)
29203 ndr_print_struct(ndr, name, "spoolss_69");
29204 ndr->depth++;
29205 if (flags & NDR_SET_VALUES) {
29206 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29208 if (flags & NDR_IN) {
29209 ndr_print_struct(ndr, "in", "spoolss_69");
29210 ndr->depth++;
29211 ndr->depth--;
29213 if (flags & NDR_OUT) {
29214 ndr_print_struct(ndr, "out", "spoolss_69");
29215 ndr->depth++;
29216 ndr_print_WERROR(ndr, "result", r->out.result);
29217 ndr->depth--;
29219 ndr->depth--;
29222 static enum ndr_err_code ndr_push_spoolss_6a(struct ndr_push *ndr, int flags, const struct spoolss_6a *r)
29224 if (flags & NDR_IN) {
29226 if (flags & NDR_OUT) {
29227 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29229 return NDR_ERR_SUCCESS;
29232 static enum ndr_err_code ndr_pull_spoolss_6a(struct ndr_pull *ndr, int flags, struct spoolss_6a *r)
29234 if (flags & NDR_IN) {
29236 if (flags & NDR_OUT) {
29237 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29239 return NDR_ERR_SUCCESS;
29242 _PUBLIC_ void ndr_print_spoolss_6a(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_6a *r)
29244 ndr_print_struct(ndr, name, "spoolss_6a");
29245 ndr->depth++;
29246 if (flags & NDR_SET_VALUES) {
29247 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29249 if (flags & NDR_IN) {
29250 ndr_print_struct(ndr, "in", "spoolss_6a");
29251 ndr->depth++;
29252 ndr->depth--;
29254 if (flags & NDR_OUT) {
29255 ndr_print_struct(ndr, "out", "spoolss_6a");
29256 ndr->depth++;
29257 ndr_print_WERROR(ndr, "result", r->out.result);
29258 ndr->depth--;
29260 ndr->depth--;
29263 static enum ndr_err_code ndr_push_spoolss_6b(struct ndr_push *ndr, int flags, const struct spoolss_6b *r)
29265 if (flags & NDR_IN) {
29267 if (flags & NDR_OUT) {
29268 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29270 return NDR_ERR_SUCCESS;
29273 static enum ndr_err_code ndr_pull_spoolss_6b(struct ndr_pull *ndr, int flags, struct spoolss_6b *r)
29275 if (flags & NDR_IN) {
29277 if (flags & NDR_OUT) {
29278 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29280 return NDR_ERR_SUCCESS;
29283 _PUBLIC_ void ndr_print_spoolss_6b(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_6b *r)
29285 ndr_print_struct(ndr, name, "spoolss_6b");
29286 ndr->depth++;
29287 if (flags & NDR_SET_VALUES) {
29288 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29290 if (flags & NDR_IN) {
29291 ndr_print_struct(ndr, "in", "spoolss_6b");
29292 ndr->depth++;
29293 ndr->depth--;
29295 if (flags & NDR_OUT) {
29296 ndr_print_struct(ndr, "out", "spoolss_6b");
29297 ndr->depth++;
29298 ndr_print_WERROR(ndr, "result", r->out.result);
29299 ndr->depth--;
29301 ndr->depth--;
29304 static enum ndr_err_code ndr_push_spoolss_6c(struct ndr_push *ndr, int flags, const struct spoolss_6c *r)
29306 if (flags & NDR_IN) {
29308 if (flags & NDR_OUT) {
29309 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29311 return NDR_ERR_SUCCESS;
29314 static enum ndr_err_code ndr_pull_spoolss_6c(struct ndr_pull *ndr, int flags, struct spoolss_6c *r)
29316 if (flags & NDR_IN) {
29318 if (flags & NDR_OUT) {
29319 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29321 return NDR_ERR_SUCCESS;
29324 _PUBLIC_ void ndr_print_spoolss_6c(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_6c *r)
29326 ndr_print_struct(ndr, name, "spoolss_6c");
29327 ndr->depth++;
29328 if (flags & NDR_SET_VALUES) {
29329 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29331 if (flags & NDR_IN) {
29332 ndr_print_struct(ndr, "in", "spoolss_6c");
29333 ndr->depth++;
29334 ndr->depth--;
29336 if (flags & NDR_OUT) {
29337 ndr_print_struct(ndr, "out", "spoolss_6c");
29338 ndr->depth++;
29339 ndr_print_WERROR(ndr, "result", r->out.result);
29340 ndr->depth--;
29342 ndr->depth--;
29345 static enum ndr_err_code ndr_push_spoolss_6d(struct ndr_push *ndr, int flags, const struct spoolss_6d *r)
29347 if (flags & NDR_IN) {
29349 if (flags & NDR_OUT) {
29350 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
29352 return NDR_ERR_SUCCESS;
29355 static enum ndr_err_code ndr_pull_spoolss_6d(struct ndr_pull *ndr, int flags, struct spoolss_6d *r)
29357 if (flags & NDR_IN) {
29359 if (flags & NDR_OUT) {
29360 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
29362 return NDR_ERR_SUCCESS;
29365 _PUBLIC_ void ndr_print_spoolss_6d(struct ndr_print *ndr, const char *name, int flags, const struct spoolss_6d *r)
29367 ndr_print_struct(ndr, name, "spoolss_6d");
29368 ndr->depth++;
29369 if (flags & NDR_SET_VALUES) {
29370 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
29372 if (flags & NDR_IN) {
29373 ndr_print_struct(ndr, "in", "spoolss_6d");
29374 ndr->depth++;
29375 ndr->depth--;
29377 if (flags & NDR_OUT) {
29378 ndr_print_struct(ndr, "out", "spoolss_6d");
29379 ndr->depth++;
29380 ndr_print_WERROR(ndr, "result", r->out.result);
29381 ndr->depth--;
29383 ndr->depth--;
29386 static const struct ndr_interface_call spoolss_calls[] = {
29388 "spoolss_EnumPrinters",
29389 sizeof(struct spoolss_EnumPrinters),
29390 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinters,
29391 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinters,
29392 (ndr_print_function_t) ndr_print_spoolss_EnumPrinters,
29393 false,
29396 "spoolss_OpenPrinter",
29397 sizeof(struct spoolss_OpenPrinter),
29398 (ndr_push_flags_fn_t) ndr_push_spoolss_OpenPrinter,
29399 (ndr_pull_flags_fn_t) ndr_pull_spoolss_OpenPrinter,
29400 (ndr_print_function_t) ndr_print_spoolss_OpenPrinter,
29401 false,
29404 "spoolss_SetJob",
29405 sizeof(struct spoolss_SetJob),
29406 (ndr_push_flags_fn_t) ndr_push_spoolss_SetJob,
29407 (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetJob,
29408 (ndr_print_function_t) ndr_print_spoolss_SetJob,
29409 false,
29412 "spoolss_GetJob",
29413 sizeof(struct spoolss_GetJob),
29414 (ndr_push_flags_fn_t) ndr_push_spoolss_GetJob,
29415 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetJob,
29416 (ndr_print_function_t) ndr_print_spoolss_GetJob,
29417 false,
29420 "spoolss_EnumJobs",
29421 sizeof(struct spoolss_EnumJobs),
29422 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumJobs,
29423 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumJobs,
29424 (ndr_print_function_t) ndr_print_spoolss_EnumJobs,
29425 false,
29428 "spoolss_AddPrinter",
29429 sizeof(struct spoolss_AddPrinter),
29430 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinter,
29431 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinter,
29432 (ndr_print_function_t) ndr_print_spoolss_AddPrinter,
29433 false,
29436 "spoolss_DeletePrinter",
29437 sizeof(struct spoolss_DeletePrinter),
29438 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinter,
29439 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinter,
29440 (ndr_print_function_t) ndr_print_spoolss_DeletePrinter,
29441 false,
29444 "spoolss_SetPrinter",
29445 sizeof(struct spoolss_SetPrinter),
29446 (ndr_push_flags_fn_t) ndr_push_spoolss_SetPrinter,
29447 (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPrinter,
29448 (ndr_print_function_t) ndr_print_spoolss_SetPrinter,
29449 false,
29452 "spoolss_GetPrinter",
29453 sizeof(struct spoolss_GetPrinter),
29454 (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinter,
29455 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinter,
29456 (ndr_print_function_t) ndr_print_spoolss_GetPrinter,
29457 false,
29460 "spoolss_AddPrinterDriver",
29461 sizeof(struct spoolss_AddPrinterDriver),
29462 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinterDriver,
29463 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinterDriver,
29464 (ndr_print_function_t) ndr_print_spoolss_AddPrinterDriver,
29465 false,
29468 "spoolss_EnumPrinterDrivers",
29469 sizeof(struct spoolss_EnumPrinterDrivers),
29470 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinterDrivers,
29471 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinterDrivers,
29472 (ndr_print_function_t) ndr_print_spoolss_EnumPrinterDrivers,
29473 false,
29476 "spoolss_GetPrinterDriver",
29477 sizeof(struct spoolss_GetPrinterDriver),
29478 (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDriver,
29479 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDriver,
29480 (ndr_print_function_t) ndr_print_spoolss_GetPrinterDriver,
29481 false,
29484 "spoolss_GetPrinterDriverDirectory",
29485 sizeof(struct spoolss_GetPrinterDriverDirectory),
29486 (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDriverDirectory,
29487 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDriverDirectory,
29488 (ndr_print_function_t) ndr_print_spoolss_GetPrinterDriverDirectory,
29489 false,
29492 "spoolss_DeletePrinterDriver",
29493 sizeof(struct spoolss_DeletePrinterDriver),
29494 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterDriver,
29495 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterDriver,
29496 (ndr_print_function_t) ndr_print_spoolss_DeletePrinterDriver,
29497 false,
29500 "spoolss_AddPrintProcessor",
29501 sizeof(struct spoolss_AddPrintProcessor),
29502 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrintProcessor,
29503 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrintProcessor,
29504 (ndr_print_function_t) ndr_print_spoolss_AddPrintProcessor,
29505 false,
29508 "spoolss_EnumPrintProcessors",
29509 sizeof(struct spoolss_EnumPrintProcessors),
29510 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrintProcessors,
29511 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrintProcessors,
29512 (ndr_print_function_t) ndr_print_spoolss_EnumPrintProcessors,
29513 false,
29516 "spoolss_GetPrintProcessorDirectory",
29517 sizeof(struct spoolss_GetPrintProcessorDirectory),
29518 (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrintProcessorDirectory,
29519 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrintProcessorDirectory,
29520 (ndr_print_function_t) ndr_print_spoolss_GetPrintProcessorDirectory,
29521 false,
29524 "spoolss_StartDocPrinter",
29525 sizeof(struct spoolss_StartDocPrinter),
29526 (ndr_push_flags_fn_t) ndr_push_spoolss_StartDocPrinter,
29527 (ndr_pull_flags_fn_t) ndr_pull_spoolss_StartDocPrinter,
29528 (ndr_print_function_t) ndr_print_spoolss_StartDocPrinter,
29529 false,
29532 "spoolss_StartPagePrinter",
29533 sizeof(struct spoolss_StartPagePrinter),
29534 (ndr_push_flags_fn_t) ndr_push_spoolss_StartPagePrinter,
29535 (ndr_pull_flags_fn_t) ndr_pull_spoolss_StartPagePrinter,
29536 (ndr_print_function_t) ndr_print_spoolss_StartPagePrinter,
29537 false,
29540 "spoolss_WritePrinter",
29541 sizeof(struct spoolss_WritePrinter),
29542 (ndr_push_flags_fn_t) ndr_push_spoolss_WritePrinter,
29543 (ndr_pull_flags_fn_t) ndr_pull_spoolss_WritePrinter,
29544 (ndr_print_function_t) ndr_print_spoolss_WritePrinter,
29545 false,
29548 "spoolss_EndPagePrinter",
29549 sizeof(struct spoolss_EndPagePrinter),
29550 (ndr_push_flags_fn_t) ndr_push_spoolss_EndPagePrinter,
29551 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EndPagePrinter,
29552 (ndr_print_function_t) ndr_print_spoolss_EndPagePrinter,
29553 false,
29556 "spoolss_AbortPrinter",
29557 sizeof(struct spoolss_AbortPrinter),
29558 (ndr_push_flags_fn_t) ndr_push_spoolss_AbortPrinter,
29559 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AbortPrinter,
29560 (ndr_print_function_t) ndr_print_spoolss_AbortPrinter,
29561 false,
29564 "spoolss_ReadPrinter",
29565 sizeof(struct spoolss_ReadPrinter),
29566 (ndr_push_flags_fn_t) ndr_push_spoolss_ReadPrinter,
29567 (ndr_pull_flags_fn_t) ndr_pull_spoolss_ReadPrinter,
29568 (ndr_print_function_t) ndr_print_spoolss_ReadPrinter,
29569 false,
29572 "spoolss_EndDocPrinter",
29573 sizeof(struct spoolss_EndDocPrinter),
29574 (ndr_push_flags_fn_t) ndr_push_spoolss_EndDocPrinter,
29575 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EndDocPrinter,
29576 (ndr_print_function_t) ndr_print_spoolss_EndDocPrinter,
29577 false,
29580 "spoolss_AddJob",
29581 sizeof(struct spoolss_AddJob),
29582 (ndr_push_flags_fn_t) ndr_push_spoolss_AddJob,
29583 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddJob,
29584 (ndr_print_function_t) ndr_print_spoolss_AddJob,
29585 false,
29588 "spoolss_ScheduleJob",
29589 sizeof(struct spoolss_ScheduleJob),
29590 (ndr_push_flags_fn_t) ndr_push_spoolss_ScheduleJob,
29591 (ndr_pull_flags_fn_t) ndr_pull_spoolss_ScheduleJob,
29592 (ndr_print_function_t) ndr_print_spoolss_ScheduleJob,
29593 false,
29596 "spoolss_GetPrinterData",
29597 sizeof(struct spoolss_GetPrinterData),
29598 (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterData,
29599 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterData,
29600 (ndr_print_function_t) ndr_print_spoolss_GetPrinterData,
29601 false,
29604 "spoolss_SetPrinterData",
29605 sizeof(struct spoolss_SetPrinterData),
29606 (ndr_push_flags_fn_t) ndr_push_spoolss_SetPrinterData,
29607 (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPrinterData,
29608 (ndr_print_function_t) ndr_print_spoolss_SetPrinterData,
29609 false,
29612 "spoolss_WaitForPrinterChange",
29613 sizeof(struct spoolss_WaitForPrinterChange),
29614 (ndr_push_flags_fn_t) ndr_push_spoolss_WaitForPrinterChange,
29615 (ndr_pull_flags_fn_t) ndr_pull_spoolss_WaitForPrinterChange,
29616 (ndr_print_function_t) ndr_print_spoolss_WaitForPrinterChange,
29617 false,
29620 "spoolss_ClosePrinter",
29621 sizeof(struct spoolss_ClosePrinter),
29622 (ndr_push_flags_fn_t) ndr_push_spoolss_ClosePrinter,
29623 (ndr_pull_flags_fn_t) ndr_pull_spoolss_ClosePrinter,
29624 (ndr_print_function_t) ndr_print_spoolss_ClosePrinter,
29625 false,
29628 "spoolss_AddForm",
29629 sizeof(struct spoolss_AddForm),
29630 (ndr_push_flags_fn_t) ndr_push_spoolss_AddForm,
29631 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddForm,
29632 (ndr_print_function_t) ndr_print_spoolss_AddForm,
29633 false,
29636 "spoolss_DeleteForm",
29637 sizeof(struct spoolss_DeleteForm),
29638 (ndr_push_flags_fn_t) ndr_push_spoolss_DeleteForm,
29639 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeleteForm,
29640 (ndr_print_function_t) ndr_print_spoolss_DeleteForm,
29641 false,
29644 "spoolss_GetForm",
29645 sizeof(struct spoolss_GetForm),
29646 (ndr_push_flags_fn_t) ndr_push_spoolss_GetForm,
29647 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetForm,
29648 (ndr_print_function_t) ndr_print_spoolss_GetForm,
29649 false,
29652 "spoolss_SetForm",
29653 sizeof(struct spoolss_SetForm),
29654 (ndr_push_flags_fn_t) ndr_push_spoolss_SetForm,
29655 (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetForm,
29656 (ndr_print_function_t) ndr_print_spoolss_SetForm,
29657 false,
29660 "spoolss_EnumForms",
29661 sizeof(struct spoolss_EnumForms),
29662 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumForms,
29663 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumForms,
29664 (ndr_print_function_t) ndr_print_spoolss_EnumForms,
29665 false,
29668 "spoolss_EnumPorts",
29669 sizeof(struct spoolss_EnumPorts),
29670 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPorts,
29671 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPorts,
29672 (ndr_print_function_t) ndr_print_spoolss_EnumPorts,
29673 false,
29676 "spoolss_EnumMonitors",
29677 sizeof(struct spoolss_EnumMonitors),
29678 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumMonitors,
29679 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumMonitors,
29680 (ndr_print_function_t) ndr_print_spoolss_EnumMonitors,
29681 false,
29684 "spoolss_AddPort",
29685 sizeof(struct spoolss_AddPort),
29686 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPort,
29687 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPort,
29688 (ndr_print_function_t) ndr_print_spoolss_AddPort,
29689 false,
29692 "spoolss_ConfigurePort",
29693 sizeof(struct spoolss_ConfigurePort),
29694 (ndr_push_flags_fn_t) ndr_push_spoolss_ConfigurePort,
29695 (ndr_pull_flags_fn_t) ndr_pull_spoolss_ConfigurePort,
29696 (ndr_print_function_t) ndr_print_spoolss_ConfigurePort,
29697 false,
29700 "spoolss_DeletePort",
29701 sizeof(struct spoolss_DeletePort),
29702 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePort,
29703 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePort,
29704 (ndr_print_function_t) ndr_print_spoolss_DeletePort,
29705 false,
29708 "spoolss_CreatePrinterIC",
29709 sizeof(struct spoolss_CreatePrinterIC),
29710 (ndr_push_flags_fn_t) ndr_push_spoolss_CreatePrinterIC,
29711 (ndr_pull_flags_fn_t) ndr_pull_spoolss_CreatePrinterIC,
29712 (ndr_print_function_t) ndr_print_spoolss_CreatePrinterIC,
29713 false,
29716 "spoolss_PlayGDIScriptOnPrinterIC",
29717 sizeof(struct spoolss_PlayGDIScriptOnPrinterIC),
29718 (ndr_push_flags_fn_t) ndr_push_spoolss_PlayGDIScriptOnPrinterIC,
29719 (ndr_pull_flags_fn_t) ndr_pull_spoolss_PlayGDIScriptOnPrinterIC,
29720 (ndr_print_function_t) ndr_print_spoolss_PlayGDIScriptOnPrinterIC,
29721 false,
29724 "spoolss_DeletePrinterIC",
29725 sizeof(struct spoolss_DeletePrinterIC),
29726 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterIC,
29727 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterIC,
29728 (ndr_print_function_t) ndr_print_spoolss_DeletePrinterIC,
29729 false,
29732 "spoolss_AddPrinterConnection",
29733 sizeof(struct spoolss_AddPrinterConnection),
29734 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinterConnection,
29735 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinterConnection,
29736 (ndr_print_function_t) ndr_print_spoolss_AddPrinterConnection,
29737 false,
29740 "spoolss_DeletePrinterConnection",
29741 sizeof(struct spoolss_DeletePrinterConnection),
29742 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterConnection,
29743 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterConnection,
29744 (ndr_print_function_t) ndr_print_spoolss_DeletePrinterConnection,
29745 false,
29748 "spoolss_PrinterMessageBox",
29749 sizeof(struct spoolss_PrinterMessageBox),
29750 (ndr_push_flags_fn_t) ndr_push_spoolss_PrinterMessageBox,
29751 (ndr_pull_flags_fn_t) ndr_pull_spoolss_PrinterMessageBox,
29752 (ndr_print_function_t) ndr_print_spoolss_PrinterMessageBox,
29753 false,
29756 "spoolss_AddMonitor",
29757 sizeof(struct spoolss_AddMonitor),
29758 (ndr_push_flags_fn_t) ndr_push_spoolss_AddMonitor,
29759 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddMonitor,
29760 (ndr_print_function_t) ndr_print_spoolss_AddMonitor,
29761 false,
29764 "spoolss_DeleteMonitor",
29765 sizeof(struct spoolss_DeleteMonitor),
29766 (ndr_push_flags_fn_t) ndr_push_spoolss_DeleteMonitor,
29767 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeleteMonitor,
29768 (ndr_print_function_t) ndr_print_spoolss_DeleteMonitor,
29769 false,
29772 "spoolss_DeletePrintProcessor",
29773 sizeof(struct spoolss_DeletePrintProcessor),
29774 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrintProcessor,
29775 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrintProcessor,
29776 (ndr_print_function_t) ndr_print_spoolss_DeletePrintProcessor,
29777 false,
29780 "spoolss_AddPrintProvidor",
29781 sizeof(struct spoolss_AddPrintProvidor),
29782 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrintProvidor,
29783 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrintProvidor,
29784 (ndr_print_function_t) ndr_print_spoolss_AddPrintProvidor,
29785 false,
29788 "spoolss_DeletePrintProvidor",
29789 sizeof(struct spoolss_DeletePrintProvidor),
29790 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrintProvidor,
29791 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrintProvidor,
29792 (ndr_print_function_t) ndr_print_spoolss_DeletePrintProvidor,
29793 false,
29796 "spoolss_EnumPrintProcDataTypes",
29797 sizeof(struct spoolss_EnumPrintProcDataTypes),
29798 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrintProcDataTypes,
29799 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrintProcDataTypes,
29800 (ndr_print_function_t) ndr_print_spoolss_EnumPrintProcDataTypes,
29801 false,
29804 "spoolss_ResetPrinter",
29805 sizeof(struct spoolss_ResetPrinter),
29806 (ndr_push_flags_fn_t) ndr_push_spoolss_ResetPrinter,
29807 (ndr_pull_flags_fn_t) ndr_pull_spoolss_ResetPrinter,
29808 (ndr_print_function_t) ndr_print_spoolss_ResetPrinter,
29809 false,
29812 "spoolss_GetPrinterDriver2",
29813 sizeof(struct spoolss_GetPrinterDriver2),
29814 (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDriver2,
29815 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDriver2,
29816 (ndr_print_function_t) ndr_print_spoolss_GetPrinterDriver2,
29817 false,
29820 "spoolss_FindFirstPrinterChangeNotification",
29821 sizeof(struct spoolss_FindFirstPrinterChangeNotification),
29822 (ndr_push_flags_fn_t) ndr_push_spoolss_FindFirstPrinterChangeNotification,
29823 (ndr_pull_flags_fn_t) ndr_pull_spoolss_FindFirstPrinterChangeNotification,
29824 (ndr_print_function_t) ndr_print_spoolss_FindFirstPrinterChangeNotification,
29825 false,
29828 "spoolss_FindNextPrinterChangeNotification",
29829 sizeof(struct spoolss_FindNextPrinterChangeNotification),
29830 (ndr_push_flags_fn_t) ndr_push_spoolss_FindNextPrinterChangeNotification,
29831 (ndr_pull_flags_fn_t) ndr_pull_spoolss_FindNextPrinterChangeNotification,
29832 (ndr_print_function_t) ndr_print_spoolss_FindNextPrinterChangeNotification,
29833 false,
29836 "spoolss_FindClosePrinterNotify",
29837 sizeof(struct spoolss_FindClosePrinterNotify),
29838 (ndr_push_flags_fn_t) ndr_push_spoolss_FindClosePrinterNotify,
29839 (ndr_pull_flags_fn_t) ndr_pull_spoolss_FindClosePrinterNotify,
29840 (ndr_print_function_t) ndr_print_spoolss_FindClosePrinterNotify,
29841 false,
29844 "spoolss_RouterFindFirstPrinterChangeNotificationOld",
29845 sizeof(struct spoolss_RouterFindFirstPrinterChangeNotificationOld),
29846 (ndr_push_flags_fn_t) ndr_push_spoolss_RouterFindFirstPrinterChangeNotificationOld,
29847 (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterFindFirstPrinterChangeNotificationOld,
29848 (ndr_print_function_t) ndr_print_spoolss_RouterFindFirstPrinterChangeNotificationOld,
29849 false,
29852 "spoolss_ReplyOpenPrinter",
29853 sizeof(struct spoolss_ReplyOpenPrinter),
29854 (ndr_push_flags_fn_t) ndr_push_spoolss_ReplyOpenPrinter,
29855 (ndr_pull_flags_fn_t) ndr_pull_spoolss_ReplyOpenPrinter,
29856 (ndr_print_function_t) ndr_print_spoolss_ReplyOpenPrinter,
29857 false,
29860 "spoolss_RouterReplyPrinter",
29861 sizeof(struct spoolss_RouterReplyPrinter),
29862 (ndr_push_flags_fn_t) ndr_push_spoolss_RouterReplyPrinter,
29863 (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterReplyPrinter,
29864 (ndr_print_function_t) ndr_print_spoolss_RouterReplyPrinter,
29865 false,
29868 "spoolss_ReplyClosePrinter",
29869 sizeof(struct spoolss_ReplyClosePrinter),
29870 (ndr_push_flags_fn_t) ndr_push_spoolss_ReplyClosePrinter,
29871 (ndr_pull_flags_fn_t) ndr_pull_spoolss_ReplyClosePrinter,
29872 (ndr_print_function_t) ndr_print_spoolss_ReplyClosePrinter,
29873 false,
29876 "spoolss_AddPortEx",
29877 sizeof(struct spoolss_AddPortEx),
29878 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPortEx,
29879 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPortEx,
29880 (ndr_print_function_t) ndr_print_spoolss_AddPortEx,
29881 false,
29884 "spoolss_RouterFindFirstPrinterChangeNotification",
29885 sizeof(struct spoolss_RouterFindFirstPrinterChangeNotification),
29886 (ndr_push_flags_fn_t) ndr_push_spoolss_RouterFindFirstPrinterChangeNotification,
29887 (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterFindFirstPrinterChangeNotification,
29888 (ndr_print_function_t) ndr_print_spoolss_RouterFindFirstPrinterChangeNotification,
29889 false,
29892 "spoolss_SpoolerInit",
29893 sizeof(struct spoolss_SpoolerInit),
29894 (ndr_push_flags_fn_t) ndr_push_spoolss_SpoolerInit,
29895 (ndr_pull_flags_fn_t) ndr_pull_spoolss_SpoolerInit,
29896 (ndr_print_function_t) ndr_print_spoolss_SpoolerInit,
29897 false,
29900 "spoolss_ResetPrinterEx",
29901 sizeof(struct spoolss_ResetPrinterEx),
29902 (ndr_push_flags_fn_t) ndr_push_spoolss_ResetPrinterEx,
29903 (ndr_pull_flags_fn_t) ndr_pull_spoolss_ResetPrinterEx,
29904 (ndr_print_function_t) ndr_print_spoolss_ResetPrinterEx,
29905 false,
29908 "spoolss_RemoteFindFirstPrinterChangeNotifyEx",
29909 sizeof(struct spoolss_RemoteFindFirstPrinterChangeNotifyEx),
29910 (ndr_push_flags_fn_t) ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx,
29911 (ndr_pull_flags_fn_t) ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx,
29912 (ndr_print_function_t) ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx,
29913 false,
29916 "spoolss_RouterReplyPrinterEx",
29917 sizeof(struct spoolss_RouterReplyPrinterEx),
29918 (ndr_push_flags_fn_t) ndr_push_spoolss_RouterReplyPrinterEx,
29919 (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterReplyPrinterEx,
29920 (ndr_print_function_t) ndr_print_spoolss_RouterReplyPrinterEx,
29921 false,
29924 "spoolss_RouterRefreshPrinterChangeNotify",
29925 sizeof(struct spoolss_RouterRefreshPrinterChangeNotify),
29926 (ndr_push_flags_fn_t) ndr_push_spoolss_RouterRefreshPrinterChangeNotify,
29927 (ndr_pull_flags_fn_t) ndr_pull_spoolss_RouterRefreshPrinterChangeNotify,
29928 (ndr_print_function_t) ndr_print_spoolss_RouterRefreshPrinterChangeNotify,
29929 false,
29932 "spoolss_44",
29933 sizeof(struct spoolss_44),
29934 (ndr_push_flags_fn_t) ndr_push_spoolss_44,
29935 (ndr_pull_flags_fn_t) ndr_pull_spoolss_44,
29936 (ndr_print_function_t) ndr_print_spoolss_44,
29937 false,
29940 "spoolss_OpenPrinterEx",
29941 sizeof(struct spoolss_OpenPrinterEx),
29942 (ndr_push_flags_fn_t) ndr_push_spoolss_OpenPrinterEx,
29943 (ndr_pull_flags_fn_t) ndr_pull_spoolss_OpenPrinterEx,
29944 (ndr_print_function_t) ndr_print_spoolss_OpenPrinterEx,
29945 false,
29948 "spoolss_AddPrinterEx",
29949 sizeof(struct spoolss_AddPrinterEx),
29950 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinterEx,
29951 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinterEx,
29952 (ndr_print_function_t) ndr_print_spoolss_AddPrinterEx,
29953 false,
29956 "spoolss_47",
29957 sizeof(struct spoolss_47),
29958 (ndr_push_flags_fn_t) ndr_push_spoolss_47,
29959 (ndr_pull_flags_fn_t) ndr_pull_spoolss_47,
29960 (ndr_print_function_t) ndr_print_spoolss_47,
29961 false,
29964 "spoolss_EnumPrinterData",
29965 sizeof(struct spoolss_EnumPrinterData),
29966 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinterData,
29967 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinterData,
29968 (ndr_print_function_t) ndr_print_spoolss_EnumPrinterData,
29969 false,
29972 "spoolss_DeletePrinterData",
29973 sizeof(struct spoolss_DeletePrinterData),
29974 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterData,
29975 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterData,
29976 (ndr_print_function_t) ndr_print_spoolss_DeletePrinterData,
29977 false,
29980 "spoolss_4a",
29981 sizeof(struct spoolss_4a),
29982 (ndr_push_flags_fn_t) ndr_push_spoolss_4a,
29983 (ndr_pull_flags_fn_t) ndr_pull_spoolss_4a,
29984 (ndr_print_function_t) ndr_print_spoolss_4a,
29985 false,
29988 "spoolss_4b",
29989 sizeof(struct spoolss_4b),
29990 (ndr_push_flags_fn_t) ndr_push_spoolss_4b,
29991 (ndr_pull_flags_fn_t) ndr_pull_spoolss_4b,
29992 (ndr_print_function_t) ndr_print_spoolss_4b,
29993 false,
29996 "spoolss_4c",
29997 sizeof(struct spoolss_4c),
29998 (ndr_push_flags_fn_t) ndr_push_spoolss_4c,
29999 (ndr_pull_flags_fn_t) ndr_pull_spoolss_4c,
30000 (ndr_print_function_t) ndr_print_spoolss_4c,
30001 false,
30004 "spoolss_SetPrinterDataEx",
30005 sizeof(struct spoolss_SetPrinterDataEx),
30006 (ndr_push_flags_fn_t) ndr_push_spoolss_SetPrinterDataEx,
30007 (ndr_pull_flags_fn_t) ndr_pull_spoolss_SetPrinterDataEx,
30008 (ndr_print_function_t) ndr_print_spoolss_SetPrinterDataEx,
30009 false,
30012 "spoolss_GetPrinterDataEx",
30013 sizeof(struct spoolss_GetPrinterDataEx),
30014 (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDataEx,
30015 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDataEx,
30016 (ndr_print_function_t) ndr_print_spoolss_GetPrinterDataEx,
30017 false,
30020 "spoolss_EnumPrinterDataEx",
30021 sizeof(struct spoolss_EnumPrinterDataEx),
30022 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinterDataEx,
30023 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinterDataEx,
30024 (ndr_print_function_t) ndr_print_spoolss_EnumPrinterDataEx,
30025 false,
30028 "spoolss_EnumPrinterKey",
30029 sizeof(struct spoolss_EnumPrinterKey),
30030 (ndr_push_flags_fn_t) ndr_push_spoolss_EnumPrinterKey,
30031 (ndr_pull_flags_fn_t) ndr_pull_spoolss_EnumPrinterKey,
30032 (ndr_print_function_t) ndr_print_spoolss_EnumPrinterKey,
30033 false,
30036 "spoolss_DeletePrinterDataEx",
30037 sizeof(struct spoolss_DeletePrinterDataEx),
30038 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterDataEx,
30039 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterDataEx,
30040 (ndr_print_function_t) ndr_print_spoolss_DeletePrinterDataEx,
30041 false,
30044 "spoolss_DeletePrinterKey",
30045 sizeof(struct spoolss_DeletePrinterKey),
30046 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterKey,
30047 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterKey,
30048 (ndr_print_function_t) ndr_print_spoolss_DeletePrinterKey,
30049 false,
30052 "spoolss_53",
30053 sizeof(struct spoolss_53),
30054 (ndr_push_flags_fn_t) ndr_push_spoolss_53,
30055 (ndr_pull_flags_fn_t) ndr_pull_spoolss_53,
30056 (ndr_print_function_t) ndr_print_spoolss_53,
30057 false,
30060 "spoolss_DeletePrinterDriverEx",
30061 sizeof(struct spoolss_DeletePrinterDriverEx),
30062 (ndr_push_flags_fn_t) ndr_push_spoolss_DeletePrinterDriverEx,
30063 (ndr_pull_flags_fn_t) ndr_pull_spoolss_DeletePrinterDriverEx,
30064 (ndr_print_function_t) ndr_print_spoolss_DeletePrinterDriverEx,
30065 false,
30068 "spoolss_55",
30069 sizeof(struct spoolss_55),
30070 (ndr_push_flags_fn_t) ndr_push_spoolss_55,
30071 (ndr_pull_flags_fn_t) ndr_pull_spoolss_55,
30072 (ndr_print_function_t) ndr_print_spoolss_55,
30073 false,
30076 "spoolss_56",
30077 sizeof(struct spoolss_56),
30078 (ndr_push_flags_fn_t) ndr_push_spoolss_56,
30079 (ndr_pull_flags_fn_t) ndr_pull_spoolss_56,
30080 (ndr_print_function_t) ndr_print_spoolss_56,
30081 false,
30084 "spoolss_57",
30085 sizeof(struct spoolss_57),
30086 (ndr_push_flags_fn_t) ndr_push_spoolss_57,
30087 (ndr_pull_flags_fn_t) ndr_pull_spoolss_57,
30088 (ndr_print_function_t) ndr_print_spoolss_57,
30089 false,
30092 "spoolss_XcvData",
30093 sizeof(struct spoolss_XcvData),
30094 (ndr_push_flags_fn_t) ndr_push_spoolss_XcvData,
30095 (ndr_pull_flags_fn_t) ndr_pull_spoolss_XcvData,
30096 (ndr_print_function_t) ndr_print_spoolss_XcvData,
30097 false,
30100 "spoolss_AddPrinterDriverEx",
30101 sizeof(struct spoolss_AddPrinterDriverEx),
30102 (ndr_push_flags_fn_t) ndr_push_spoolss_AddPrinterDriverEx,
30103 (ndr_pull_flags_fn_t) ndr_pull_spoolss_AddPrinterDriverEx,
30104 (ndr_print_function_t) ndr_print_spoolss_AddPrinterDriverEx,
30105 false,
30108 "spoolss_5a",
30109 sizeof(struct spoolss_5a),
30110 (ndr_push_flags_fn_t) ndr_push_spoolss_5a,
30111 (ndr_pull_flags_fn_t) ndr_pull_spoolss_5a,
30112 (ndr_print_function_t) ndr_print_spoolss_5a,
30113 false,
30116 "spoolss_5b",
30117 sizeof(struct spoolss_5b),
30118 (ndr_push_flags_fn_t) ndr_push_spoolss_5b,
30119 (ndr_pull_flags_fn_t) ndr_pull_spoolss_5b,
30120 (ndr_print_function_t) ndr_print_spoolss_5b,
30121 false,
30124 "spoolss_5c",
30125 sizeof(struct spoolss_5c),
30126 (ndr_push_flags_fn_t) ndr_push_spoolss_5c,
30127 (ndr_pull_flags_fn_t) ndr_pull_spoolss_5c,
30128 (ndr_print_function_t) ndr_print_spoolss_5c,
30129 false,
30132 "spoolss_5d",
30133 sizeof(struct spoolss_5d),
30134 (ndr_push_flags_fn_t) ndr_push_spoolss_5d,
30135 (ndr_pull_flags_fn_t) ndr_pull_spoolss_5d,
30136 (ndr_print_function_t) ndr_print_spoolss_5d,
30137 false,
30140 "spoolss_5e",
30141 sizeof(struct spoolss_5e),
30142 (ndr_push_flags_fn_t) ndr_push_spoolss_5e,
30143 (ndr_pull_flags_fn_t) ndr_pull_spoolss_5e,
30144 (ndr_print_function_t) ndr_print_spoolss_5e,
30145 false,
30148 "spoolss_5f",
30149 sizeof(struct spoolss_5f),
30150 (ndr_push_flags_fn_t) ndr_push_spoolss_5f,
30151 (ndr_pull_flags_fn_t) ndr_pull_spoolss_5f,
30152 (ndr_print_function_t) ndr_print_spoolss_5f,
30153 false,
30156 "spoolss_60",
30157 sizeof(struct spoolss_60),
30158 (ndr_push_flags_fn_t) ndr_push_spoolss_60,
30159 (ndr_pull_flags_fn_t) ndr_pull_spoolss_60,
30160 (ndr_print_function_t) ndr_print_spoolss_60,
30161 false,
30164 "spoolss_61",
30165 sizeof(struct spoolss_61),
30166 (ndr_push_flags_fn_t) ndr_push_spoolss_61,
30167 (ndr_pull_flags_fn_t) ndr_pull_spoolss_61,
30168 (ndr_print_function_t) ndr_print_spoolss_61,
30169 false,
30172 "spoolss_62",
30173 sizeof(struct spoolss_62),
30174 (ndr_push_flags_fn_t) ndr_push_spoolss_62,
30175 (ndr_pull_flags_fn_t) ndr_pull_spoolss_62,
30176 (ndr_print_function_t) ndr_print_spoolss_62,
30177 false,
30180 "spoolss_63",
30181 sizeof(struct spoolss_63),
30182 (ndr_push_flags_fn_t) ndr_push_spoolss_63,
30183 (ndr_pull_flags_fn_t) ndr_pull_spoolss_63,
30184 (ndr_print_function_t) ndr_print_spoolss_63,
30185 false,
30188 "spoolss_64",
30189 sizeof(struct spoolss_64),
30190 (ndr_push_flags_fn_t) ndr_push_spoolss_64,
30191 (ndr_pull_flags_fn_t) ndr_pull_spoolss_64,
30192 (ndr_print_function_t) ndr_print_spoolss_64,
30193 false,
30196 "spoolss_65",
30197 sizeof(struct spoolss_65),
30198 (ndr_push_flags_fn_t) ndr_push_spoolss_65,
30199 (ndr_pull_flags_fn_t) ndr_pull_spoolss_65,
30200 (ndr_print_function_t) ndr_print_spoolss_65,
30201 false,
30204 "spoolss_GetCorePrinterDrivers",
30205 sizeof(struct spoolss_GetCorePrinterDrivers),
30206 (ndr_push_flags_fn_t) ndr_push_spoolss_GetCorePrinterDrivers,
30207 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetCorePrinterDrivers,
30208 (ndr_print_function_t) ndr_print_spoolss_GetCorePrinterDrivers,
30209 false,
30212 "spoolss_67",
30213 sizeof(struct spoolss_67),
30214 (ndr_push_flags_fn_t) ndr_push_spoolss_67,
30215 (ndr_pull_flags_fn_t) ndr_pull_spoolss_67,
30216 (ndr_print_function_t) ndr_print_spoolss_67,
30217 false,
30220 "spoolss_GetPrinterDriverPackagePath",
30221 sizeof(struct spoolss_GetPrinterDriverPackagePath),
30222 (ndr_push_flags_fn_t) ndr_push_spoolss_GetPrinterDriverPackagePath,
30223 (ndr_pull_flags_fn_t) ndr_pull_spoolss_GetPrinterDriverPackagePath,
30224 (ndr_print_function_t) ndr_print_spoolss_GetPrinterDriverPackagePath,
30225 false,
30228 "spoolss_69",
30229 sizeof(struct spoolss_69),
30230 (ndr_push_flags_fn_t) ndr_push_spoolss_69,
30231 (ndr_pull_flags_fn_t) ndr_pull_spoolss_69,
30232 (ndr_print_function_t) ndr_print_spoolss_69,
30233 false,
30236 "spoolss_6a",
30237 sizeof(struct spoolss_6a),
30238 (ndr_push_flags_fn_t) ndr_push_spoolss_6a,
30239 (ndr_pull_flags_fn_t) ndr_pull_spoolss_6a,
30240 (ndr_print_function_t) ndr_print_spoolss_6a,
30241 false,
30244 "spoolss_6b",
30245 sizeof(struct spoolss_6b),
30246 (ndr_push_flags_fn_t) ndr_push_spoolss_6b,
30247 (ndr_pull_flags_fn_t) ndr_pull_spoolss_6b,
30248 (ndr_print_function_t) ndr_print_spoolss_6b,
30249 false,
30252 "spoolss_6c",
30253 sizeof(struct spoolss_6c),
30254 (ndr_push_flags_fn_t) ndr_push_spoolss_6c,
30255 (ndr_pull_flags_fn_t) ndr_pull_spoolss_6c,
30256 (ndr_print_function_t) ndr_print_spoolss_6c,
30257 false,
30260 "spoolss_6d",
30261 sizeof(struct spoolss_6d),
30262 (ndr_push_flags_fn_t) ndr_push_spoolss_6d,
30263 (ndr_pull_flags_fn_t) ndr_pull_spoolss_6d,
30264 (ndr_print_function_t) ndr_print_spoolss_6d,
30265 false,
30267 { NULL, 0, NULL, NULL, NULL, false }
30270 static const char * const spoolss_endpoint_strings[] = {
30271 "ncacn_np:[\\pipe\\spoolss]",
30274 static const struct ndr_interface_string_array spoolss_endpoints = {
30275 .count = 1,
30276 .names = spoolss_endpoint_strings
30279 static const char * const spoolss_authservice_strings[] = {
30280 "host",
30283 static const struct ndr_interface_string_array spoolss_authservices = {
30284 .count = 1,
30285 .names = spoolss_authservice_strings
30289 const struct ndr_interface_table ndr_table_spoolss = {
30290 .name = "spoolss",
30291 .syntax_id = {
30292 {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
30293 NDR_SPOOLSS_VERSION
30295 .helpstring = NDR_SPOOLSS_HELPSTRING,
30296 .num_calls = 110,
30297 .calls = spoolss_calls,
30298 .endpoints = &spoolss_endpoints,
30299 .authservices = &spoolss_authservices