1 /* parser auto-generated by pidl */
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");
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
);
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
) {
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
)
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
));
89 NDR_PULL_ALLOC(ndr
, r
->time
);
94 if (ndr_flags
& NDR_BUFFERS
) {
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");
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
);
113 ndr_print_spoolss_Time(ndr
, "time", r
->time
);
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
)
128 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &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
;
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
)
154 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &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
;
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
)
182 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &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
;
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
)
208 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &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
;
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
)
236 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &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
);
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
);
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
)
282 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &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
);
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
);
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
);
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
));
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
));
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
);
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");
473 ndr_print_ptr(ndr
, "printername", r
->printername
);
475 if (r
->printername
) {
476 ndr_print_string(ndr
, "printername", r
->printername
);
479 ndr_print_ptr(ndr
, "servername", r
->servername
);
482 ndr_print_string(ndr
, "servername", r
->servername
);
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
);
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
)
529 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &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
);
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
);
569 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DeviceMode(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DeviceMode
*r
)
571 if (ndr_flags
& NDR_SCALARS
) {
572 NDR_CHECK(ndr_push_align(ndr
, 4));
573 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->devicename
, 32, sizeof(uint16_t), CH_UTF16
));
574 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->specversion
));
575 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->driverversion
));
576 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->size
));
577 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->driverextra_data
.length
));
578 NDR_CHECK(ndr_push_spoolss_DeviceModeFields(ndr
, NDR_SCALARS
, r
->fields
));
579 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->orientation
));
580 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->papersize
));
581 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->paperlength
));
582 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->paperwidth
));
583 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->scale
));
584 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->copies
));
585 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->defaultsource
));
586 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->printquality
));
587 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->color
));
588 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->duplex
));
589 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->yresolution
));
590 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->ttoption
));
591 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->collate
));
592 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->formname
, 32, sizeof(uint16_t), CH_UTF16
));
593 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logpixels
));
594 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bitsperpel
));
595 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pelswidth
));
596 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pelsheight
));
597 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->displayflags
));
598 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->displayfrequency
));
599 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->icmmethod
));
600 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->icmintent
));
601 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->mediatype
));
602 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dithertype
));
603 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved1
));
604 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved2
));
605 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->panningwidth
));
606 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->panningheight
));
608 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
609 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
611 struct ndr_push
*_ndr_driverextra_data
;
612 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_driverextra_data
, 0, r
->driverextra_data
.length
));
613 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_driverextra_data
, NDR_SCALARS
, r
->driverextra_data
));
614 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_driverextra_data
, 0, r
->driverextra_data
.length
));
616 ndr
->flags
= _flags_save_DATA_BLOB
;
619 if (ndr_flags
& NDR_BUFFERS
) {
621 return NDR_ERR_SUCCESS
;
624 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DeviceMode(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DeviceMode
*r
)
626 if (ndr_flags
& NDR_SCALARS
) {
627 NDR_CHECK(ndr_pull_align(ndr
, 4));
628 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->devicename
, 32, sizeof(uint16_t), CH_UTF16
));
629 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->specversion
));
630 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->driverversion
));
631 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
632 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->__driverextra_length
));
633 NDR_CHECK(ndr_pull_spoolss_DeviceModeFields(ndr
, NDR_SCALARS
, &r
->fields
));
634 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->orientation
));
635 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->papersize
));
636 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->paperlength
));
637 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->paperwidth
));
638 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->scale
));
639 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->copies
));
640 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->defaultsource
));
641 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->printquality
));
642 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->color
));
643 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->duplex
));
644 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->yresolution
));
645 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->ttoption
));
646 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->collate
));
647 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->formname
, 32, sizeof(uint16_t), CH_UTF16
));
648 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logpixels
));
649 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bitsperpel
));
650 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pelswidth
));
651 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pelsheight
));
652 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->displayflags
));
653 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->displayfrequency
));
654 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->icmmethod
));
655 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->icmintent
));
656 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->mediatype
));
657 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dithertype
));
658 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved1
));
659 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
660 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->panningwidth
));
661 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->panningheight
));
663 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
664 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
666 struct ndr_pull
*_ndr_driverextra_data
;
667 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_driverextra_data
, 0, r
->__driverextra_length
));
668 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_driverextra_data
, NDR_SCALARS
, &r
->driverextra_data
));
669 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_driverextra_data
, 0, r
->__driverextra_length
));
671 ndr
->flags
= _flags_save_DATA_BLOB
;
674 if (ndr_flags
& NDR_BUFFERS
) {
676 return NDR_ERR_SUCCESS
;
679 _PUBLIC_
void ndr_print_spoolss_DeviceMode(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DeviceMode
*r
)
681 ndr_print_struct(ndr
, name
, "spoolss_DeviceMode");
683 ndr_print_string(ndr
, "devicename", r
->devicename
);
684 ndr_print_uint16(ndr
, "specversion", r
->specversion
);
685 ndr_print_uint16(ndr
, "driverversion", r
->driverversion
);
686 ndr_print_uint16(ndr
, "size", r
->size
);
687 ndr_print_uint16(ndr
, "__driverextra_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->driverextra_data
.length
:r
->__driverextra_length
);
688 ndr_print_spoolss_DeviceModeFields(ndr
, "fields", r
->fields
);
689 ndr_print_uint16(ndr
, "orientation", r
->orientation
);
690 ndr_print_uint16(ndr
, "papersize", r
->papersize
);
691 ndr_print_uint16(ndr
, "paperlength", r
->paperlength
);
692 ndr_print_uint16(ndr
, "paperwidth", r
->paperwidth
);
693 ndr_print_uint16(ndr
, "scale", r
->scale
);
694 ndr_print_uint16(ndr
, "copies", r
->copies
);
695 ndr_print_uint16(ndr
, "defaultsource", r
->defaultsource
);
696 ndr_print_uint16(ndr
, "printquality", r
->printquality
);
697 ndr_print_uint16(ndr
, "color", r
->color
);
698 ndr_print_uint16(ndr
, "duplex", r
->duplex
);
699 ndr_print_uint16(ndr
, "yresolution", r
->yresolution
);
700 ndr_print_uint16(ndr
, "ttoption", r
->ttoption
);
701 ndr_print_uint16(ndr
, "collate", r
->collate
);
702 ndr_print_string(ndr
, "formname", r
->formname
);
703 ndr_print_uint16(ndr
, "logpixels", r
->logpixels
);
704 ndr_print_uint32(ndr
, "bitsperpel", r
->bitsperpel
);
705 ndr_print_uint32(ndr
, "pelswidth", r
->pelswidth
);
706 ndr_print_uint32(ndr
, "pelsheight", r
->pelsheight
);
707 ndr_print_uint32(ndr
, "displayflags", r
->displayflags
);
708 ndr_print_uint32(ndr
, "displayfrequency", r
->displayfrequency
);
709 ndr_print_uint32(ndr
, "icmmethod", r
->icmmethod
);
710 ndr_print_uint32(ndr
, "icmintent", r
->icmintent
);
711 ndr_print_uint32(ndr
, "mediatype", r
->mediatype
);
712 ndr_print_uint32(ndr
, "dithertype", r
->dithertype
);
713 ndr_print_uint32(ndr
, "reserved1", r
->reserved1
);
714 ndr_print_uint32(ndr
, "reserved2", r
->reserved2
);
715 ndr_print_uint32(ndr
, "panningwidth", r
->panningwidth
);
716 ndr_print_uint32(ndr
, "panningheight", r
->panningheight
);
717 ndr_print_DATA_BLOB(ndr
, "driverextra_data", r
->driverextra_data
);
721 _PUBLIC_
size_t ndr_size_spoolss_DeviceMode(const struct spoolss_DeviceMode
*r
, struct smb_iconv_convenience
*ic
, int flags
)
723 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DeviceMode
, ic
);
726 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_EnumPrinterFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
728 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
729 return NDR_ERR_SUCCESS
;
732 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_EnumPrinterFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
735 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
737 return NDR_ERR_SUCCESS
;
740 _PUBLIC_
void ndr_print_spoolss_EnumPrinterFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
742 ndr_print_uint32(ndr
, name
, r
);
744 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_DEFAULT", PRINTER_ENUM_DEFAULT
, r
);
745 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL
, r
);
746 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_CONNECTIONS", PRINTER_ENUM_CONNECTIONS
, r
);
747 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_FAVORITE", PRINTER_ENUM_FAVORITE
, r
);
748 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_NAME", PRINTER_ENUM_NAME
, r
);
749 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_REMOTE", PRINTER_ENUM_REMOTE
, r
);
750 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_SHARED", PRINTER_ENUM_SHARED
, r
);
751 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_NETWORK", PRINTER_ENUM_NETWORK
, r
);
752 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_EXPAND", PRINTER_ENUM_EXPAND
, r
);
753 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_CONTAINER", PRINTER_ENUM_CONTAINER
, r
);
754 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON1", PRINTER_ENUM_ICON1
, r
);
755 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON2", PRINTER_ENUM_ICON2
, r
);
756 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON3", PRINTER_ENUM_ICON3
, r
);
757 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON4", PRINTER_ENUM_ICON4
, r
);
758 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON5", PRINTER_ENUM_ICON5
, r
);
759 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON6", PRINTER_ENUM_ICON6
, r
);
760 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON7", PRINTER_ENUM_ICON7
, r
);
761 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON8", PRINTER_ENUM_ICON8
, r
);
762 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_HIDE", PRINTER_ENUM_HIDE
, r
);
766 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo1
*r
)
768 if (ndr_flags
& NDR_SCALARS
) {
769 NDR_CHECK(ndr_push_align(ndr
, 4));
770 NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr
, NDR_SCALARS
, r
->flags
));
772 uint32_t _flags_save_string
= ndr
->flags
;
773 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
774 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->description
));
775 ndr
->flags
= _flags_save_string
;
778 uint32_t _flags_save_string
= ndr
->flags
;
779 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
780 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->name
));
781 ndr
->flags
= _flags_save_string
;
784 uint32_t _flags_save_string
= ndr
->flags
;
785 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
786 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->comment
));
787 ndr
->flags
= _flags_save_string
;
790 if (ndr_flags
& NDR_BUFFERS
) {
792 uint32_t _flags_save_string
= ndr
->flags
;
793 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
794 if (r
->description
) {
795 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->description
));
796 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->description
));
798 ndr
->flags
= _flags_save_string
;
801 uint32_t _flags_save_string
= ndr
->flags
;
802 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
804 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->name
));
805 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->name
));
807 ndr
->flags
= _flags_save_string
;
810 uint32_t _flags_save_string
= ndr
->flags
;
811 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
813 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->comment
));
814 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->comment
));
816 ndr
->flags
= _flags_save_string
;
819 return NDR_ERR_SUCCESS
;
822 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo1
*r
)
824 uint32_t _ptr_description
;
825 TALLOC_CTX
*_mem_save_description_0
;
827 TALLOC_CTX
*_mem_save_name_0
;
828 uint32_t _ptr_comment
;
829 TALLOC_CTX
*_mem_save_comment_0
;
830 if (ndr_flags
& NDR_SCALARS
) {
831 NDR_CHECK(ndr_pull_align(ndr
, 4));
832 NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr
, NDR_SCALARS
, &r
->flags
));
834 uint32_t _flags_save_string
= ndr
->flags
;
835 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
836 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_description
));
837 if (_ptr_description
) {
838 NDR_PULL_ALLOC(ndr
, r
->description
);
839 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->description
, _ptr_description
));
841 r
->description
= NULL
;
843 ndr
->flags
= _flags_save_string
;
846 uint32_t _flags_save_string
= ndr
->flags
;
847 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
848 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
850 NDR_PULL_ALLOC(ndr
, r
->name
);
851 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->name
, _ptr_name
));
855 ndr
->flags
= _flags_save_string
;
858 uint32_t _flags_save_string
= ndr
->flags
;
859 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
860 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
862 NDR_PULL_ALLOC(ndr
, r
->comment
);
863 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->comment
, _ptr_comment
));
867 ndr
->flags
= _flags_save_string
;
870 if (ndr_flags
& NDR_BUFFERS
) {
872 uint32_t _flags_save_string
= ndr
->flags
;
873 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
874 if (r
->description
) {
875 uint32_t _relative_save_offset
;
876 _relative_save_offset
= ndr
->offset
;
877 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->description
));
878 _mem_save_description_0
= NDR_PULL_GET_MEM_CTX(ndr
);
879 NDR_PULL_SET_MEM_CTX(ndr
, r
->description
, 0);
880 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->description
));
881 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_description_0
, 0);
882 ndr
->offset
= _relative_save_offset
;
884 ndr
->flags
= _flags_save_string
;
887 uint32_t _flags_save_string
= ndr
->flags
;
888 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
890 uint32_t _relative_save_offset
;
891 _relative_save_offset
= ndr
->offset
;
892 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->name
));
893 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
894 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
895 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->name
));
896 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
897 ndr
->offset
= _relative_save_offset
;
899 ndr
->flags
= _flags_save_string
;
902 uint32_t _flags_save_string
= ndr
->flags
;
903 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
905 uint32_t _relative_save_offset
;
906 _relative_save_offset
= ndr
->offset
;
907 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->comment
));
908 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
909 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
910 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->comment
));
911 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
912 ndr
->offset
= _relative_save_offset
;
914 ndr
->flags
= _flags_save_string
;
917 return NDR_ERR_SUCCESS
;
920 _PUBLIC_
void ndr_print_spoolss_PrinterInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo1
*r
)
922 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo1");
924 ndr_print_spoolss_EnumPrinterFlags(ndr
, "flags", r
->flags
);
925 ndr_print_ptr(ndr
, "description", r
->description
);
927 if (r
->description
) {
928 ndr_print_string(ndr
, "description", r
->description
);
931 ndr_print_ptr(ndr
, "name", r
->name
);
934 ndr_print_string(ndr
, "name", r
->name
);
937 ndr_print_ptr(ndr
, "comment", r
->comment
);
940 ndr_print_string(ndr
, "comment", r
->comment
);
946 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo1(const struct spoolss_PrinterInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
948 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo1
, ic
);
951 static enum ndr_err_code
ndr_push_spoolss_PrinterAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
953 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
954 return NDR_ERR_SUCCESS
;
957 static enum ndr_err_code
ndr_pull_spoolss_PrinterAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
960 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
962 return NDR_ERR_SUCCESS
;
965 _PUBLIC_
void ndr_print_spoolss_PrinterAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
967 ndr_print_uint32(ndr
, name
, r
);
969 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_QUEUED", PRINTER_ATTRIBUTE_QUEUED
, r
);
970 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DIRECT", PRINTER_ATTRIBUTE_DIRECT
, r
);
971 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DEFAULT", PRINTER_ATTRIBUTE_DEFAULT
, r
);
972 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_SHARED", PRINTER_ATTRIBUTE_SHARED
, r
);
973 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_NETWORK", PRINTER_ATTRIBUTE_NETWORK
, r
);
974 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_HIDDEN", PRINTER_ATTRIBUTE_HIDDEN
, r
);
975 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_LOCAL", PRINTER_ATTRIBUTE_LOCAL
, r
);
976 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ
, r
);
977 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS
, r
);
978 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST
, r
);
979 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_WORK_OFFLINE", PRINTER_ATTRIBUTE_WORK_OFFLINE
, r
);
980 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_BIDI", PRINTER_ATTRIBUTE_ENABLE_BIDI
, r
);
981 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_RAW_ONLY", PRINTER_ATTRIBUTE_RAW_ONLY
, r
);
982 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_PUBLISHED", PRINTER_ATTRIBUTE_PUBLISHED
, r
);
983 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_FAX", PRINTER_ATTRIBUTE_FAX
, r
);
984 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_TS", PRINTER_ATTRIBUTE_TS
, r
);
988 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo2
*r
)
990 if (ndr_flags
& NDR_SCALARS
) {
991 NDR_CHECK(ndr_push_align(ndr
, 4));
993 uint32_t _flags_save_string
= ndr
->flags
;
994 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
995 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->servername
));
996 ndr
->flags
= _flags_save_string
;
999 uint32_t _flags_save_string
= ndr
->flags
;
1000 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1001 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printername
));
1002 ndr
->flags
= _flags_save_string
;
1005 uint32_t _flags_save_string
= ndr
->flags
;
1006 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1007 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->sharename
));
1008 ndr
->flags
= _flags_save_string
;
1011 uint32_t _flags_save_string
= ndr
->flags
;
1012 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1013 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->portname
));
1014 ndr
->flags
= _flags_save_string
;
1017 uint32_t _flags_save_string
= ndr
->flags
;
1018 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1019 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->drivername
));
1020 ndr
->flags
= _flags_save_string
;
1023 uint32_t _flags_save_string
= ndr
->flags
;
1024 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1025 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->comment
));
1026 ndr
->flags
= _flags_save_string
;
1029 uint32_t _flags_save_string
= ndr
->flags
;
1030 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1031 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->location
));
1032 ndr
->flags
= _flags_save_string
;
1034 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->devmode
));
1036 uint32_t _flags_save_string
= ndr
->flags
;
1037 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1038 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->sepfile
));
1039 ndr
->flags
= _flags_save_string
;
1042 uint32_t _flags_save_string
= ndr
->flags
;
1043 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1044 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printprocessor
));
1045 ndr
->flags
= _flags_save_string
;
1048 uint32_t _flags_save_string
= ndr
->flags
;
1049 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1050 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->datatype
));
1051 ndr
->flags
= _flags_save_string
;
1054 uint32_t _flags_save_string
= ndr
->flags
;
1055 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1056 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->parameters
));
1057 ndr
->flags
= _flags_save_string
;
1059 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->secdesc
));
1060 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
1061 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
1062 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->defaultpriority
));
1063 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->starttime
));
1064 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->untiltime
));
1065 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, r
->status
));
1066 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cjobs
));
1067 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->averageppm
));
1069 if (ndr_flags
& NDR_BUFFERS
) {
1071 uint32_t _flags_save_string
= ndr
->flags
;
1072 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1073 if (r
->servername
) {
1074 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->servername
));
1075 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->servername
));
1077 ndr
->flags
= _flags_save_string
;
1080 uint32_t _flags_save_string
= ndr
->flags
;
1081 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1082 if (r
->printername
) {
1083 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->printername
));
1084 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printername
));
1086 ndr
->flags
= _flags_save_string
;
1089 uint32_t _flags_save_string
= ndr
->flags
;
1090 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1092 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->sharename
));
1093 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->sharename
));
1095 ndr
->flags
= _flags_save_string
;
1098 uint32_t _flags_save_string
= ndr
->flags
;
1099 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1101 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->portname
));
1102 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->portname
));
1104 ndr
->flags
= _flags_save_string
;
1107 uint32_t _flags_save_string
= ndr
->flags
;
1108 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1109 if (r
->drivername
) {
1110 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->drivername
));
1111 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->drivername
));
1113 ndr
->flags
= _flags_save_string
;
1116 uint32_t _flags_save_string
= ndr
->flags
;
1117 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1119 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->comment
));
1120 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->comment
));
1122 ndr
->flags
= _flags_save_string
;
1125 uint32_t _flags_save_string
= ndr
->flags
;
1126 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1128 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->location
));
1129 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->location
));
1131 ndr
->flags
= _flags_save_string
;
1134 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->devmode
));
1136 struct ndr_push
*_ndr_devmode
;
1137 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
1138 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
1139 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
1143 uint32_t _flags_save_string
= ndr
->flags
;
1144 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1146 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->sepfile
));
1147 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->sepfile
));
1149 ndr
->flags
= _flags_save_string
;
1152 uint32_t _flags_save_string
= ndr
->flags
;
1153 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1154 if (r
->printprocessor
) {
1155 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->printprocessor
));
1156 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printprocessor
));
1158 ndr
->flags
= _flags_save_string
;
1161 uint32_t _flags_save_string
= ndr
->flags
;
1162 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1164 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->datatype
));
1165 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->datatype
));
1167 ndr
->flags
= _flags_save_string
;
1170 uint32_t _flags_save_string
= ndr
->flags
;
1171 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1172 if (r
->parameters
) {
1173 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->parameters
));
1174 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->parameters
));
1176 ndr
->flags
= _flags_save_string
;
1179 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->secdesc
));
1181 struct ndr_push
*_ndr_secdesc
;
1182 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
1183 NDR_CHECK(ndr_push_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
1184 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
1188 return NDR_ERR_SUCCESS
;
1191 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo2
*r
)
1193 uint32_t _ptr_servername
;
1194 TALLOC_CTX
*_mem_save_servername_0
;
1195 uint32_t _ptr_printername
;
1196 TALLOC_CTX
*_mem_save_printername_0
;
1197 uint32_t _ptr_sharename
;
1198 TALLOC_CTX
*_mem_save_sharename_0
;
1199 uint32_t _ptr_portname
;
1200 TALLOC_CTX
*_mem_save_portname_0
;
1201 uint32_t _ptr_drivername
;
1202 TALLOC_CTX
*_mem_save_drivername_0
;
1203 uint32_t _ptr_comment
;
1204 TALLOC_CTX
*_mem_save_comment_0
;
1205 uint32_t _ptr_location
;
1206 TALLOC_CTX
*_mem_save_location_0
;
1207 uint32_t _ptr_devmode
;
1208 TALLOC_CTX
*_mem_save_devmode_0
;
1209 uint32_t _ptr_sepfile
;
1210 TALLOC_CTX
*_mem_save_sepfile_0
;
1211 uint32_t _ptr_printprocessor
;
1212 TALLOC_CTX
*_mem_save_printprocessor_0
;
1213 uint32_t _ptr_datatype
;
1214 TALLOC_CTX
*_mem_save_datatype_0
;
1215 uint32_t _ptr_parameters
;
1216 TALLOC_CTX
*_mem_save_parameters_0
;
1217 uint32_t _ptr_secdesc
;
1218 TALLOC_CTX
*_mem_save_secdesc_0
;
1219 if (ndr_flags
& NDR_SCALARS
) {
1220 NDR_CHECK(ndr_pull_align(ndr
, 4));
1222 uint32_t _flags_save_string
= ndr
->flags
;
1223 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1224 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
1225 if (_ptr_servername
) {
1226 NDR_PULL_ALLOC(ndr
, r
->servername
);
1227 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->servername
, _ptr_servername
));
1229 r
->servername
= NULL
;
1231 ndr
->flags
= _flags_save_string
;
1234 uint32_t _flags_save_string
= ndr
->flags
;
1235 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1236 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
1237 if (_ptr_printername
) {
1238 NDR_PULL_ALLOC(ndr
, r
->printername
);
1239 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printername
, _ptr_printername
));
1241 r
->printername
= NULL
;
1243 ndr
->flags
= _flags_save_string
;
1246 uint32_t _flags_save_string
= ndr
->flags
;
1247 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1248 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
1249 if (_ptr_sharename
) {
1250 NDR_PULL_ALLOC(ndr
, r
->sharename
);
1251 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->sharename
, _ptr_sharename
));
1253 r
->sharename
= NULL
;
1255 ndr
->flags
= _flags_save_string
;
1258 uint32_t _flags_save_string
= ndr
->flags
;
1259 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1260 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_portname
));
1261 if (_ptr_portname
) {
1262 NDR_PULL_ALLOC(ndr
, r
->portname
);
1263 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->portname
, _ptr_portname
));
1267 ndr
->flags
= _flags_save_string
;
1270 uint32_t _flags_save_string
= ndr
->flags
;
1271 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1272 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_drivername
));
1273 if (_ptr_drivername
) {
1274 NDR_PULL_ALLOC(ndr
, r
->drivername
);
1275 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->drivername
, _ptr_drivername
));
1277 r
->drivername
= NULL
;
1279 ndr
->flags
= _flags_save_string
;
1282 uint32_t _flags_save_string
= ndr
->flags
;
1283 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1284 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1286 NDR_PULL_ALLOC(ndr
, r
->comment
);
1287 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->comment
, _ptr_comment
));
1291 ndr
->flags
= _flags_save_string
;
1294 uint32_t _flags_save_string
= ndr
->flags
;
1295 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1296 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_location
));
1297 if (_ptr_location
) {
1298 NDR_PULL_ALLOC(ndr
, r
->location
);
1299 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->location
, _ptr_location
));
1303 ndr
->flags
= _flags_save_string
;
1305 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
1307 NDR_PULL_ALLOC(ndr
, r
->devmode
);
1308 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->devmode
, _ptr_devmode
));
1313 uint32_t _flags_save_string
= ndr
->flags
;
1314 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1315 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sepfile
));
1317 NDR_PULL_ALLOC(ndr
, r
->sepfile
);
1318 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->sepfile
, _ptr_sepfile
));
1322 ndr
->flags
= _flags_save_string
;
1325 uint32_t _flags_save_string
= ndr
->flags
;
1326 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1327 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printprocessor
));
1328 if (_ptr_printprocessor
) {
1329 NDR_PULL_ALLOC(ndr
, r
->printprocessor
);
1330 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printprocessor
, _ptr_printprocessor
));
1332 r
->printprocessor
= NULL
;
1334 ndr
->flags
= _flags_save_string
;
1337 uint32_t _flags_save_string
= ndr
->flags
;
1338 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1339 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
1340 if (_ptr_datatype
) {
1341 NDR_PULL_ALLOC(ndr
, r
->datatype
);
1342 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->datatype
, _ptr_datatype
));
1346 ndr
->flags
= _flags_save_string
;
1349 uint32_t _flags_save_string
= ndr
->flags
;
1350 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1351 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
1352 if (_ptr_parameters
) {
1353 NDR_PULL_ALLOC(ndr
, r
->parameters
);
1354 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->parameters
, _ptr_parameters
));
1356 r
->parameters
= NULL
;
1358 ndr
->flags
= _flags_save_string
;
1360 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
1362 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
1363 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->secdesc
, _ptr_secdesc
));
1367 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
1368 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
1369 if (r
->priority
> 99) {
1370 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1372 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->defaultpriority
));
1373 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->starttime
));
1374 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->untiltime
));
1375 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
1376 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cjobs
));
1377 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->averageppm
));
1379 if (ndr_flags
& NDR_BUFFERS
) {
1381 uint32_t _flags_save_string
= ndr
->flags
;
1382 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1383 if (r
->servername
) {
1384 uint32_t _relative_save_offset
;
1385 _relative_save_offset
= ndr
->offset
;
1386 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->servername
));
1387 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1388 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
1389 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->servername
));
1390 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
1391 ndr
->offset
= _relative_save_offset
;
1393 ndr
->flags
= _flags_save_string
;
1396 uint32_t _flags_save_string
= ndr
->flags
;
1397 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1398 if (r
->printername
) {
1399 uint32_t _relative_save_offset
;
1400 _relative_save_offset
= ndr
->offset
;
1401 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printername
));
1402 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1403 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
1404 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printername
));
1405 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
1406 ndr
->offset
= _relative_save_offset
;
1408 ndr
->flags
= _flags_save_string
;
1411 uint32_t _flags_save_string
= ndr
->flags
;
1412 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1414 uint32_t _relative_save_offset
;
1415 _relative_save_offset
= ndr
->offset
;
1416 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->sharename
));
1417 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1418 NDR_PULL_SET_MEM_CTX(ndr
, r
->sharename
, 0);
1419 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->sharename
));
1420 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
1421 ndr
->offset
= _relative_save_offset
;
1423 ndr
->flags
= _flags_save_string
;
1426 uint32_t _flags_save_string
= ndr
->flags
;
1427 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1429 uint32_t _relative_save_offset
;
1430 _relative_save_offset
= ndr
->offset
;
1431 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->portname
));
1432 _mem_save_portname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1433 NDR_PULL_SET_MEM_CTX(ndr
, r
->portname
, 0);
1434 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->portname
));
1435 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_portname_0
, 0);
1436 ndr
->offset
= _relative_save_offset
;
1438 ndr
->flags
= _flags_save_string
;
1441 uint32_t _flags_save_string
= ndr
->flags
;
1442 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1443 if (r
->drivername
) {
1444 uint32_t _relative_save_offset
;
1445 _relative_save_offset
= ndr
->offset
;
1446 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->drivername
));
1447 _mem_save_drivername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1448 NDR_PULL_SET_MEM_CTX(ndr
, r
->drivername
, 0);
1449 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->drivername
));
1450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_drivername_0
, 0);
1451 ndr
->offset
= _relative_save_offset
;
1453 ndr
->flags
= _flags_save_string
;
1456 uint32_t _flags_save_string
= ndr
->flags
;
1457 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1459 uint32_t _relative_save_offset
;
1460 _relative_save_offset
= ndr
->offset
;
1461 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->comment
));
1462 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1463 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1464 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->comment
));
1465 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1466 ndr
->offset
= _relative_save_offset
;
1468 ndr
->flags
= _flags_save_string
;
1471 uint32_t _flags_save_string
= ndr
->flags
;
1472 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1474 uint32_t _relative_save_offset
;
1475 _relative_save_offset
= ndr
->offset
;
1476 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->location
));
1477 _mem_save_location_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1478 NDR_PULL_SET_MEM_CTX(ndr
, r
->location
, 0);
1479 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->location
));
1480 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_location_0
, 0);
1481 ndr
->offset
= _relative_save_offset
;
1483 ndr
->flags
= _flags_save_string
;
1486 uint32_t _relative_save_offset
;
1487 _relative_save_offset
= ndr
->offset
;
1488 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->devmode
));
1489 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1490 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
1492 struct ndr_pull
*_ndr_devmode
;
1493 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
1494 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
1495 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
1497 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
1498 ndr
->offset
= _relative_save_offset
;
1501 uint32_t _flags_save_string
= ndr
->flags
;
1502 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1504 uint32_t _relative_save_offset
;
1505 _relative_save_offset
= ndr
->offset
;
1506 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->sepfile
));
1507 _mem_save_sepfile_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1508 NDR_PULL_SET_MEM_CTX(ndr
, r
->sepfile
, 0);
1509 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->sepfile
));
1510 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sepfile_0
, 0);
1511 ndr
->offset
= _relative_save_offset
;
1513 ndr
->flags
= _flags_save_string
;
1516 uint32_t _flags_save_string
= ndr
->flags
;
1517 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1518 if (r
->printprocessor
) {
1519 uint32_t _relative_save_offset
;
1520 _relative_save_offset
= ndr
->offset
;
1521 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printprocessor
));
1522 _mem_save_printprocessor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1523 NDR_PULL_SET_MEM_CTX(ndr
, r
->printprocessor
, 0);
1524 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printprocessor
));
1525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printprocessor_0
, 0);
1526 ndr
->offset
= _relative_save_offset
;
1528 ndr
->flags
= _flags_save_string
;
1531 uint32_t _flags_save_string
= ndr
->flags
;
1532 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1534 uint32_t _relative_save_offset
;
1535 _relative_save_offset
= ndr
->offset
;
1536 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->datatype
));
1537 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1538 NDR_PULL_SET_MEM_CTX(ndr
, r
->datatype
, 0);
1539 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->datatype
));
1540 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
1541 ndr
->offset
= _relative_save_offset
;
1543 ndr
->flags
= _flags_save_string
;
1546 uint32_t _flags_save_string
= ndr
->flags
;
1547 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1548 if (r
->parameters
) {
1549 uint32_t _relative_save_offset
;
1550 _relative_save_offset
= ndr
->offset
;
1551 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->parameters
));
1552 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1553 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
1554 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->parameters
));
1555 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
1556 ndr
->offset
= _relative_save_offset
;
1558 ndr
->flags
= _flags_save_string
;
1561 uint32_t _relative_save_offset
;
1562 _relative_save_offset
= ndr
->offset
;
1563 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->secdesc
));
1564 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1565 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
1567 struct ndr_pull
*_ndr_secdesc
;
1568 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
1569 NDR_CHECK(ndr_pull_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
1570 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
1572 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
1573 ndr
->offset
= _relative_save_offset
;
1576 return NDR_ERR_SUCCESS
;
1579 _PUBLIC_
void ndr_print_spoolss_PrinterInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo2
*r
)
1581 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo2");
1583 ndr_print_ptr(ndr
, "servername", r
->servername
);
1585 if (r
->servername
) {
1586 ndr_print_string(ndr
, "servername", r
->servername
);
1589 ndr_print_ptr(ndr
, "printername", r
->printername
);
1591 if (r
->printername
) {
1592 ndr_print_string(ndr
, "printername", r
->printername
);
1595 ndr_print_ptr(ndr
, "sharename", r
->sharename
);
1598 ndr_print_string(ndr
, "sharename", r
->sharename
);
1601 ndr_print_ptr(ndr
, "portname", r
->portname
);
1604 ndr_print_string(ndr
, "portname", r
->portname
);
1607 ndr_print_ptr(ndr
, "drivername", r
->drivername
);
1609 if (r
->drivername
) {
1610 ndr_print_string(ndr
, "drivername", r
->drivername
);
1613 ndr_print_ptr(ndr
, "comment", r
->comment
);
1616 ndr_print_string(ndr
, "comment", r
->comment
);
1619 ndr_print_ptr(ndr
, "location", r
->location
);
1622 ndr_print_string(ndr
, "location", r
->location
);
1625 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
1628 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
1631 ndr_print_ptr(ndr
, "sepfile", r
->sepfile
);
1634 ndr_print_string(ndr
, "sepfile", r
->sepfile
);
1637 ndr_print_ptr(ndr
, "printprocessor", r
->printprocessor
);
1639 if (r
->printprocessor
) {
1640 ndr_print_string(ndr
, "printprocessor", r
->printprocessor
);
1643 ndr_print_ptr(ndr
, "datatype", r
->datatype
);
1646 ndr_print_string(ndr
, "datatype", r
->datatype
);
1649 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
1651 if (r
->parameters
) {
1652 ndr_print_string(ndr
, "parameters", r
->parameters
);
1655 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
1658 ndr_print_security_descriptor(ndr
, "secdesc", r
->secdesc
);
1661 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
1662 ndr_print_uint32(ndr
, "priority", r
->priority
);
1663 ndr_print_uint32(ndr
, "defaultpriority", r
->defaultpriority
);
1664 ndr_print_uint32(ndr
, "starttime", r
->starttime
);
1665 ndr_print_uint32(ndr
, "untiltime", r
->untiltime
);
1666 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
1667 ndr_print_uint32(ndr
, "cjobs", r
->cjobs
);
1668 ndr_print_uint32(ndr
, "averageppm", r
->averageppm
);
1672 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo2(const struct spoolss_PrinterInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1674 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo2
, ic
);
1677 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo3
*r
)
1679 if (ndr_flags
& NDR_SCALARS
) {
1680 NDR_CHECK(ndr_push_align(ndr
, 4));
1681 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->secdesc
));
1683 if (ndr_flags
& NDR_BUFFERS
) {
1685 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->secdesc
));
1687 struct ndr_push
*_ndr_secdesc
;
1688 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
1689 NDR_CHECK(ndr_push_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
1690 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
1694 return NDR_ERR_SUCCESS
;
1697 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo3
*r
)
1699 uint32_t _ptr_secdesc
;
1700 TALLOC_CTX
*_mem_save_secdesc_0
;
1701 if (ndr_flags
& NDR_SCALARS
) {
1702 NDR_CHECK(ndr_pull_align(ndr
, 4));
1703 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
1705 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
1706 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->secdesc
, _ptr_secdesc
));
1711 if (ndr_flags
& NDR_BUFFERS
) {
1713 uint32_t _relative_save_offset
;
1714 _relative_save_offset
= ndr
->offset
;
1715 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->secdesc
));
1716 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1717 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
1719 struct ndr_pull
*_ndr_secdesc
;
1720 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
1721 NDR_CHECK(ndr_pull_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
1722 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
1724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
1725 ndr
->offset
= _relative_save_offset
;
1728 return NDR_ERR_SUCCESS
;
1731 _PUBLIC_
void ndr_print_spoolss_PrinterInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo3
*r
)
1733 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo3");
1735 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
1738 ndr_print_security_descriptor(ndr
, "secdesc", r
->secdesc
);
1744 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo3(const struct spoolss_PrinterInfo3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1746 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo3
, ic
);
1749 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo4
*r
)
1751 if (ndr_flags
& NDR_SCALARS
) {
1752 NDR_CHECK(ndr_push_align(ndr
, 4));
1754 uint32_t _flags_save_string
= ndr
->flags
;
1755 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1756 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printername
));
1757 ndr
->flags
= _flags_save_string
;
1760 uint32_t _flags_save_string
= ndr
->flags
;
1761 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1762 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->servername
));
1763 ndr
->flags
= _flags_save_string
;
1765 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
1767 if (ndr_flags
& NDR_BUFFERS
) {
1769 uint32_t _flags_save_string
= ndr
->flags
;
1770 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1771 if (r
->printername
) {
1772 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->printername
));
1773 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printername
));
1775 ndr
->flags
= _flags_save_string
;
1778 uint32_t _flags_save_string
= ndr
->flags
;
1779 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1780 if (r
->servername
) {
1781 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->servername
));
1782 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->servername
));
1784 ndr
->flags
= _flags_save_string
;
1787 return NDR_ERR_SUCCESS
;
1790 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo4
*r
)
1792 uint32_t _ptr_printername
;
1793 TALLOC_CTX
*_mem_save_printername_0
;
1794 uint32_t _ptr_servername
;
1795 TALLOC_CTX
*_mem_save_servername_0
;
1796 if (ndr_flags
& NDR_SCALARS
) {
1797 NDR_CHECK(ndr_pull_align(ndr
, 4));
1799 uint32_t _flags_save_string
= ndr
->flags
;
1800 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1801 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
1802 if (_ptr_printername
) {
1803 NDR_PULL_ALLOC(ndr
, r
->printername
);
1804 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printername
, _ptr_printername
));
1806 r
->printername
= NULL
;
1808 ndr
->flags
= _flags_save_string
;
1811 uint32_t _flags_save_string
= ndr
->flags
;
1812 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1813 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
1814 if (_ptr_servername
) {
1815 NDR_PULL_ALLOC(ndr
, r
->servername
);
1816 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->servername
, _ptr_servername
));
1818 r
->servername
= NULL
;
1820 ndr
->flags
= _flags_save_string
;
1822 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
1824 if (ndr_flags
& NDR_BUFFERS
) {
1826 uint32_t _flags_save_string
= ndr
->flags
;
1827 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1828 if (r
->printername
) {
1829 uint32_t _relative_save_offset
;
1830 _relative_save_offset
= ndr
->offset
;
1831 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printername
));
1832 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1833 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
1834 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printername
));
1835 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
1836 ndr
->offset
= _relative_save_offset
;
1838 ndr
->flags
= _flags_save_string
;
1841 uint32_t _flags_save_string
= ndr
->flags
;
1842 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1843 if (r
->servername
) {
1844 uint32_t _relative_save_offset
;
1845 _relative_save_offset
= ndr
->offset
;
1846 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->servername
));
1847 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1848 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
1849 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->servername
));
1850 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
1851 ndr
->offset
= _relative_save_offset
;
1853 ndr
->flags
= _flags_save_string
;
1856 return NDR_ERR_SUCCESS
;
1859 _PUBLIC_
void ndr_print_spoolss_PrinterInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo4
*r
)
1861 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo4");
1863 ndr_print_ptr(ndr
, "printername", r
->printername
);
1865 if (r
->printername
) {
1866 ndr_print_string(ndr
, "printername", r
->printername
);
1869 ndr_print_ptr(ndr
, "servername", r
->servername
);
1871 if (r
->servername
) {
1872 ndr_print_string(ndr
, "servername", r
->servername
);
1875 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
1879 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo4(const struct spoolss_PrinterInfo4
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1881 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo4
, ic
);
1884 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo5
*r
)
1886 if (ndr_flags
& NDR_SCALARS
) {
1887 NDR_CHECK(ndr_push_align(ndr
, 4));
1889 uint32_t _flags_save_string
= ndr
->flags
;
1890 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1891 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printername
));
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 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->portname
));
1898 ndr
->flags
= _flags_save_string
;
1900 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
1901 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->device_not_selected_timeout
));
1902 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->transmission_retry_timeout
));
1904 if (ndr_flags
& NDR_BUFFERS
) {
1906 uint32_t _flags_save_string
= ndr
->flags
;
1907 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1908 if (r
->printername
) {
1909 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->printername
));
1910 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printername
));
1912 ndr
->flags
= _flags_save_string
;
1915 uint32_t _flags_save_string
= ndr
->flags
;
1916 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1918 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->portname
));
1919 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->portname
));
1921 ndr
->flags
= _flags_save_string
;
1924 return NDR_ERR_SUCCESS
;
1927 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo5
*r
)
1929 uint32_t _ptr_printername
;
1930 TALLOC_CTX
*_mem_save_printername_0
;
1931 uint32_t _ptr_portname
;
1932 TALLOC_CTX
*_mem_save_portname_0
;
1933 if (ndr_flags
& NDR_SCALARS
) {
1934 NDR_CHECK(ndr_pull_align(ndr
, 4));
1936 uint32_t _flags_save_string
= ndr
->flags
;
1937 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1938 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
1939 if (_ptr_printername
) {
1940 NDR_PULL_ALLOC(ndr
, r
->printername
);
1941 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printername
, _ptr_printername
));
1943 r
->printername
= NULL
;
1945 ndr
->flags
= _flags_save_string
;
1948 uint32_t _flags_save_string
= ndr
->flags
;
1949 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1950 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_portname
));
1951 if (_ptr_portname
) {
1952 NDR_PULL_ALLOC(ndr
, r
->portname
);
1953 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->portname
, _ptr_portname
));
1957 ndr
->flags
= _flags_save_string
;
1959 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
1960 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->device_not_selected_timeout
));
1961 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->transmission_retry_timeout
));
1963 if (ndr_flags
& NDR_BUFFERS
) {
1965 uint32_t _flags_save_string
= ndr
->flags
;
1966 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1967 if (r
->printername
) {
1968 uint32_t _relative_save_offset
;
1969 _relative_save_offset
= ndr
->offset
;
1970 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printername
));
1971 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1972 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
1973 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printername
));
1974 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
1975 ndr
->offset
= _relative_save_offset
;
1977 ndr
->flags
= _flags_save_string
;
1980 uint32_t _flags_save_string
= ndr
->flags
;
1981 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1983 uint32_t _relative_save_offset
;
1984 _relative_save_offset
= ndr
->offset
;
1985 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->portname
));
1986 _mem_save_portname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1987 NDR_PULL_SET_MEM_CTX(ndr
, r
->portname
, 0);
1988 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->portname
));
1989 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_portname_0
, 0);
1990 ndr
->offset
= _relative_save_offset
;
1992 ndr
->flags
= _flags_save_string
;
1995 return NDR_ERR_SUCCESS
;
1998 _PUBLIC_
void ndr_print_spoolss_PrinterInfo5(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo5
*r
)
2000 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo5");
2002 ndr_print_ptr(ndr
, "printername", r
->printername
);
2004 if (r
->printername
) {
2005 ndr_print_string(ndr
, "printername", r
->printername
);
2008 ndr_print_ptr(ndr
, "portname", r
->portname
);
2011 ndr_print_string(ndr
, "portname", r
->portname
);
2014 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
2015 ndr_print_uint32(ndr
, "device_not_selected_timeout", r
->device_not_selected_timeout
);
2016 ndr_print_uint32(ndr
, "transmission_retry_timeout", r
->transmission_retry_timeout
);
2020 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo5(const struct spoolss_PrinterInfo5
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2022 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo5
, ic
);
2025 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo6
*r
)
2027 if (ndr_flags
& NDR_SCALARS
) {
2028 NDR_CHECK(ndr_push_align(ndr
, 4));
2029 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, r
->status
));
2031 if (ndr_flags
& NDR_BUFFERS
) {
2033 return NDR_ERR_SUCCESS
;
2036 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo6
*r
)
2038 if (ndr_flags
& NDR_SCALARS
) {
2039 NDR_CHECK(ndr_pull_align(ndr
, 4));
2040 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
2042 if (ndr_flags
& NDR_BUFFERS
) {
2044 return NDR_ERR_SUCCESS
;
2047 _PUBLIC_
void ndr_print_spoolss_PrinterInfo6(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo6
*r
)
2049 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo6");
2051 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
2055 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo6(const struct spoolss_PrinterInfo6
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2057 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo6
, ic
);
2060 static enum ndr_err_code
ndr_push_spoolss_DsPrintAction(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2062 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2063 return NDR_ERR_SUCCESS
;
2066 static enum ndr_err_code
ndr_pull_spoolss_DsPrintAction(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2069 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2071 return NDR_ERR_SUCCESS
;
2074 _PUBLIC_
void ndr_print_spoolss_DsPrintAction(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2076 ndr_print_uint32(ndr
, name
, r
);
2078 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_PUBLISH", DSPRINT_PUBLISH
, r
);
2079 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_UPDATE", DSPRINT_UPDATE
, r
);
2080 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_UNPUBLISH", DSPRINT_UNPUBLISH
, r
);
2081 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_REPUBLISH", DSPRINT_REPUBLISH
, r
);
2082 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_PENDING", DSPRINT_PENDING
, r
);
2086 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo7
*r
)
2088 if (ndr_flags
& NDR_SCALARS
) {
2089 NDR_CHECK(ndr_push_align(ndr
, 4));
2091 uint32_t _flags_save_string
= ndr
->flags
;
2092 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2093 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->guid
));
2094 ndr
->flags
= _flags_save_string
;
2096 NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr
, NDR_SCALARS
, r
->action
));
2098 if (ndr_flags
& NDR_BUFFERS
) {
2100 uint32_t _flags_save_string
= ndr
->flags
;
2101 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2103 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->guid
));
2104 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->guid
));
2106 ndr
->flags
= _flags_save_string
;
2109 return NDR_ERR_SUCCESS
;
2112 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo7
*r
)
2115 TALLOC_CTX
*_mem_save_guid_0
;
2116 if (ndr_flags
& NDR_SCALARS
) {
2117 NDR_CHECK(ndr_pull_align(ndr
, 4));
2119 uint32_t _flags_save_string
= ndr
->flags
;
2120 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2121 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_guid
));
2123 NDR_PULL_ALLOC(ndr
, r
->guid
);
2124 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->guid
, _ptr_guid
));
2128 ndr
->flags
= _flags_save_string
;
2130 NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr
, NDR_SCALARS
, &r
->action
));
2132 if (ndr_flags
& NDR_BUFFERS
) {
2134 uint32_t _flags_save_string
= ndr
->flags
;
2135 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2137 uint32_t _relative_save_offset
;
2138 _relative_save_offset
= ndr
->offset
;
2139 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->guid
));
2140 _mem_save_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2141 NDR_PULL_SET_MEM_CTX(ndr
, r
->guid
, 0);
2142 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->guid
));
2143 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_guid_0
, 0);
2144 ndr
->offset
= _relative_save_offset
;
2146 ndr
->flags
= _flags_save_string
;
2149 return NDR_ERR_SUCCESS
;
2152 _PUBLIC_
void ndr_print_spoolss_PrinterInfo7(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo7
*r
)
2154 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo7");
2156 ndr_print_ptr(ndr
, "guid", r
->guid
);
2159 ndr_print_string(ndr
, "guid", r
->guid
);
2162 ndr_print_spoolss_DsPrintAction(ndr
, "action", r
->action
);
2166 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo7(const struct spoolss_PrinterInfo7
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2168 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo7
, ic
);
2171 static enum ndr_err_code
ndr_push_spoolss_DeviceModeInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DeviceModeInfo
*r
)
2173 if (ndr_flags
& NDR_SCALARS
) {
2174 NDR_CHECK(ndr_push_align(ndr
, 4));
2175 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->devmode
));
2177 if (ndr_flags
& NDR_BUFFERS
) {
2179 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->devmode
));
2181 struct ndr_push
*_ndr_devmode
;
2182 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
2183 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
2184 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
2188 return NDR_ERR_SUCCESS
;
2191 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DeviceModeInfo
*r
)
2193 uint32_t _ptr_devmode
;
2194 TALLOC_CTX
*_mem_save_devmode_0
;
2195 if (ndr_flags
& NDR_SCALARS
) {
2196 NDR_CHECK(ndr_pull_align(ndr
, 4));
2197 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
2199 NDR_PULL_ALLOC(ndr
, r
->devmode
);
2200 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->devmode
, _ptr_devmode
));
2205 if (ndr_flags
& NDR_BUFFERS
) {
2207 uint32_t _relative_save_offset
;
2208 _relative_save_offset
= ndr
->offset
;
2209 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->devmode
));
2210 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2211 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
2213 struct ndr_pull
*_ndr_devmode
;
2214 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
2215 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
2216 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
2218 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
2219 ndr
->offset
= _relative_save_offset
;
2222 return NDR_ERR_SUCCESS
;
2225 _PUBLIC_
void ndr_print_spoolss_DeviceModeInfo(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DeviceModeInfo
*r
)
2227 ndr_print_struct(ndr
, name
, "spoolss_DeviceModeInfo");
2229 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
2232 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
2238 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrinterInfo
*r
)
2240 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
2241 if (ndr_flags
& NDR_SCALARS
) {
2242 int level
= ndr_push_get_switch_value(ndr
, r
);
2245 NDR_CHECK(ndr_push_align(ndr
, 4));
2246 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2247 NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr
, NDR_SCALARS
, &r
->info0
));
2251 NDR_CHECK(ndr_push_align(ndr
, 4));
2252 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2253 NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
2257 NDR_CHECK(ndr_push_align(ndr
, 4));
2258 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2259 NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
2263 NDR_CHECK(ndr_push_align(ndr
, 4));
2264 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2265 NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
2269 NDR_CHECK(ndr_push_align(ndr
, 4));
2270 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2271 NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
2275 NDR_CHECK(ndr_push_align(ndr
, 4));
2276 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2277 NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
2281 NDR_CHECK(ndr_push_align(ndr
, 4));
2282 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2283 NDR_CHECK(ndr_push_spoolss_PrinterInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
2287 NDR_CHECK(ndr_push_align(ndr
, 4));
2288 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2289 NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
2293 NDR_CHECK(ndr_push_align(ndr
, 4));
2294 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2295 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
, &r
->info8
));
2299 NDR_CHECK(ndr_push_align(ndr
, 4));
2300 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2301 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
, &r
->info9
));
2309 if (ndr_flags
& NDR_BUFFERS
) {
2310 int level
= ndr_push_get_switch_value(ndr
, r
);
2311 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
2314 NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr
, NDR_BUFFERS
, &r
->info0
));
2318 NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
2322 NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
2326 NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
2330 NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
2334 NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
2341 NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
2345 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_BUFFERS
, &r
->info8
));
2349 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_BUFFERS
, &r
->info9
));
2357 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
2358 return NDR_ERR_SUCCESS
;
2361 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrinterInfo
*r
)
2363 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
2365 level
= ndr_pull_get_switch_value(ndr
, r
);
2366 if (ndr_flags
& NDR_SCALARS
) {
2369 NDR_CHECK(ndr_pull_align(ndr
, 4));
2370 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2371 NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr
, NDR_SCALARS
, &r
->info0
));
2375 NDR_CHECK(ndr_pull_align(ndr
, 4));
2376 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2377 NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
2381 NDR_CHECK(ndr_pull_align(ndr
, 4));
2382 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2383 NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
2387 NDR_CHECK(ndr_pull_align(ndr
, 4));
2388 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2389 NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
2393 NDR_CHECK(ndr_pull_align(ndr
, 4));
2394 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2395 NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
2399 NDR_CHECK(ndr_pull_align(ndr
, 4));
2400 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2401 NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
2405 NDR_CHECK(ndr_pull_align(ndr
, 4));
2406 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2407 NDR_CHECK(ndr_pull_spoolss_PrinterInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
2411 NDR_CHECK(ndr_pull_align(ndr
, 4));
2412 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2413 NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
2417 NDR_CHECK(ndr_pull_align(ndr
, 4));
2418 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2419 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
, &r
->info8
));
2423 NDR_CHECK(ndr_pull_align(ndr
, 4));
2424 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2425 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
, &r
->info9
));
2433 if (ndr_flags
& NDR_BUFFERS
) {
2434 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
2437 NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr
, NDR_BUFFERS
, &r
->info0
));
2441 NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
2445 NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
2449 NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
2453 NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
2457 NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
2464 NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
2468 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_BUFFERS
, &r
->info8
));
2472 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_BUFFERS
, &r
->info9
));
2480 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
2481 return NDR_ERR_SUCCESS
;
2484 _PUBLIC_
void ndr_print_spoolss_PrinterInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrinterInfo
*r
)
2487 level
= ndr_print_get_switch_value(ndr
, r
);
2488 ndr_print_union(ndr
, name
, level
, "spoolss_PrinterInfo");
2491 ndr_print_spoolss_PrinterInfo0(ndr
, "info0", &r
->info0
);
2495 ndr_print_spoolss_PrinterInfo1(ndr
, "info1", &r
->info1
);
2499 ndr_print_spoolss_PrinterInfo2(ndr
, "info2", &r
->info2
);
2503 ndr_print_spoolss_PrinterInfo3(ndr
, "info3", &r
->info3
);
2507 ndr_print_spoolss_PrinterInfo4(ndr
, "info4", &r
->info4
);
2511 ndr_print_spoolss_PrinterInfo5(ndr
, "info5", &r
->info5
);
2515 ndr_print_spoolss_PrinterInfo6(ndr
, "info6", &r
->info6
);
2519 ndr_print_spoolss_PrinterInfo7(ndr
, "info7", &r
->info7
);
2523 ndr_print_spoolss_DeviceModeInfo(ndr
, "info8", &r
->info8
);
2527 ndr_print_spoolss_DeviceModeInfo(ndr
, "info9", &r
->info9
);
2536 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo(const union spoolss_PrinterInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
2538 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo
, ic
);
2541 static enum ndr_err_code
ndr_push_spoolss_DevmodeContainer(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DevmodeContainer
*r
)
2543 if (ndr_flags
& NDR_SCALARS
) {
2544 NDR_CHECK(ndr_push_align(ndr
, 4));
2545 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, _ndr_size_spoolss_DeviceMode(r
->devmode
, ndr
->iconv_convenience
, ndr
->flags
)));
2546 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->devmode
));
2548 if (ndr_flags
& NDR_BUFFERS
) {
2551 struct ndr_push
*_ndr_devmode
;
2552 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_devmode
, 4, _ndr_size_spoolss_DeviceMode(r
->devmode
, ndr
->iconv_convenience
, ndr
->flags
)));
2553 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
2554 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_devmode
, 4, _ndr_size_spoolss_DeviceMode(r
->devmode
, ndr
->iconv_convenience
, ndr
->flags
)));
2558 return NDR_ERR_SUCCESS
;
2561 static enum ndr_err_code
ndr_pull_spoolss_DevmodeContainer(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DevmodeContainer
*r
)
2563 uint32_t _ptr_devmode
;
2564 TALLOC_CTX
*_mem_save_devmode_0
;
2565 if (ndr_flags
& NDR_SCALARS
) {
2566 NDR_CHECK(ndr_pull_align(ndr
, 4));
2567 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size
));
2568 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
2570 NDR_PULL_ALLOC(ndr
, r
->devmode
);
2575 if (ndr_flags
& NDR_BUFFERS
) {
2577 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2578 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
2580 struct ndr_pull
*_ndr_devmode
;
2581 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 4, r
->_ndr_size
));
2582 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
2583 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 4, r
->_ndr_size
));
2585 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
2588 return NDR_ERR_SUCCESS
;
2591 _PUBLIC_
void ndr_print_spoolss_DevmodeContainer(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DevmodeContainer
*r
)
2593 ndr_print_struct(ndr
, name
, "spoolss_DevmodeContainer");
2595 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
);
2596 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
2599 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
2605 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfo1
*r
)
2607 if (ndr_flags
& NDR_SCALARS
) {
2608 NDR_CHECK(ndr_push_align(ndr
, 4));
2609 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
2611 uint32_t _flags_save_string
= ndr
->flags
;
2612 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2613 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printer_name
));
2614 ndr
->flags
= _flags_save_string
;
2617 uint32_t _flags_save_string
= ndr
->flags
;
2618 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2619 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->server_name
));
2620 ndr
->flags
= _flags_save_string
;
2623 uint32_t _flags_save_string
= ndr
->flags
;
2624 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2625 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->user_name
));
2626 ndr
->flags
= _flags_save_string
;
2629 uint32_t _flags_save_string
= ndr
->flags
;
2630 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2631 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->document_name
));
2632 ndr
->flags
= _flags_save_string
;
2635 uint32_t _flags_save_string
= ndr
->flags
;
2636 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2637 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_type
));
2638 ndr
->flags
= _flags_save_string
;
2641 uint32_t _flags_save_string
= ndr
->flags
;
2642 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2643 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->text_status
));
2644 ndr
->flags
= _flags_save_string
;
2646 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
2647 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
2648 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
2649 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
2650 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
2651 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
2653 if (ndr_flags
& NDR_BUFFERS
) {
2655 uint32_t _flags_save_string
= ndr
->flags
;
2656 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2657 if (r
->printer_name
) {
2658 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->printer_name
));
2659 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printer_name
));
2661 ndr
->flags
= _flags_save_string
;
2664 uint32_t _flags_save_string
= ndr
->flags
;
2665 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2666 if (r
->server_name
) {
2667 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->server_name
));
2668 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->server_name
));
2670 ndr
->flags
= _flags_save_string
;
2673 uint32_t _flags_save_string
= ndr
->flags
;
2674 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2676 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->user_name
));
2677 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->user_name
));
2679 ndr
->flags
= _flags_save_string
;
2682 uint32_t _flags_save_string
= ndr
->flags
;
2683 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2684 if (r
->document_name
) {
2685 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->document_name
));
2686 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->document_name
));
2688 ndr
->flags
= _flags_save_string
;
2691 uint32_t _flags_save_string
= ndr
->flags
;
2692 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2694 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_type
));
2695 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_type
));
2697 ndr
->flags
= _flags_save_string
;
2700 uint32_t _flags_save_string
= ndr
->flags
;
2701 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2702 if (r
->text_status
) {
2703 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->text_status
));
2704 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->text_status
));
2706 ndr
->flags
= _flags_save_string
;
2709 return NDR_ERR_SUCCESS
;
2712 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfo1
*r
)
2714 uint32_t _ptr_printer_name
;
2715 TALLOC_CTX
*_mem_save_printer_name_0
;
2716 uint32_t _ptr_server_name
;
2717 TALLOC_CTX
*_mem_save_server_name_0
;
2718 uint32_t _ptr_user_name
;
2719 TALLOC_CTX
*_mem_save_user_name_0
;
2720 uint32_t _ptr_document_name
;
2721 TALLOC_CTX
*_mem_save_document_name_0
;
2722 uint32_t _ptr_data_type
;
2723 TALLOC_CTX
*_mem_save_data_type_0
;
2724 uint32_t _ptr_text_status
;
2725 TALLOC_CTX
*_mem_save_text_status_0
;
2726 if (ndr_flags
& NDR_SCALARS
) {
2727 NDR_CHECK(ndr_pull_align(ndr
, 4));
2728 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
2730 uint32_t _flags_save_string
= ndr
->flags
;
2731 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2732 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
2733 if (_ptr_printer_name
) {
2734 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
2735 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printer_name
, _ptr_printer_name
));
2737 r
->printer_name
= NULL
;
2739 ndr
->flags
= _flags_save_string
;
2742 uint32_t _flags_save_string
= ndr
->flags
;
2743 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2744 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
2745 if (_ptr_server_name
) {
2746 NDR_PULL_ALLOC(ndr
, r
->server_name
);
2747 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->server_name
, _ptr_server_name
));
2749 r
->server_name
= NULL
;
2751 ndr
->flags
= _flags_save_string
;
2754 uint32_t _flags_save_string
= ndr
->flags
;
2755 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2756 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
2757 if (_ptr_user_name
) {
2758 NDR_PULL_ALLOC(ndr
, r
->user_name
);
2759 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->user_name
, _ptr_user_name
));
2761 r
->user_name
= NULL
;
2763 ndr
->flags
= _flags_save_string
;
2766 uint32_t _flags_save_string
= ndr
->flags
;
2767 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2768 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
2769 if (_ptr_document_name
) {
2770 NDR_PULL_ALLOC(ndr
, r
->document_name
);
2771 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->document_name
, _ptr_document_name
));
2773 r
->document_name
= NULL
;
2775 ndr
->flags
= _flags_save_string
;
2778 uint32_t _flags_save_string
= ndr
->flags
;
2779 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2780 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
2781 if (_ptr_data_type
) {
2782 NDR_PULL_ALLOC(ndr
, r
->data_type
);
2783 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_type
, _ptr_data_type
));
2785 r
->data_type
= NULL
;
2787 ndr
->flags
= _flags_save_string
;
2790 uint32_t _flags_save_string
= ndr
->flags
;
2791 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2792 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
2793 if (_ptr_text_status
) {
2794 NDR_PULL_ALLOC(ndr
, r
->text_status
);
2795 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->text_status
, _ptr_text_status
));
2797 r
->text_status
= NULL
;
2799 ndr
->flags
= _flags_save_string
;
2801 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
2802 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
2803 if (r
->priority
> 99) {
2804 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
2806 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
2807 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
2808 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
2809 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
2811 if (ndr_flags
& NDR_BUFFERS
) {
2813 uint32_t _flags_save_string
= ndr
->flags
;
2814 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2815 if (r
->printer_name
) {
2816 uint32_t _relative_save_offset
;
2817 _relative_save_offset
= ndr
->offset
;
2818 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printer_name
));
2819 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2820 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
2821 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printer_name
));
2822 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
2823 ndr
->offset
= _relative_save_offset
;
2825 ndr
->flags
= _flags_save_string
;
2828 uint32_t _flags_save_string
= ndr
->flags
;
2829 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2830 if (r
->server_name
) {
2831 uint32_t _relative_save_offset
;
2832 _relative_save_offset
= ndr
->offset
;
2833 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->server_name
));
2834 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2835 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
2836 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->server_name
));
2837 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
2838 ndr
->offset
= _relative_save_offset
;
2840 ndr
->flags
= _flags_save_string
;
2843 uint32_t _flags_save_string
= ndr
->flags
;
2844 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2846 uint32_t _relative_save_offset
;
2847 _relative_save_offset
= ndr
->offset
;
2848 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->user_name
));
2849 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2850 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
2851 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->user_name
));
2852 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
2853 ndr
->offset
= _relative_save_offset
;
2855 ndr
->flags
= _flags_save_string
;
2858 uint32_t _flags_save_string
= ndr
->flags
;
2859 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2860 if (r
->document_name
) {
2861 uint32_t _relative_save_offset
;
2862 _relative_save_offset
= ndr
->offset
;
2863 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->document_name
));
2864 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2865 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
2866 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->document_name
));
2867 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
2868 ndr
->offset
= _relative_save_offset
;
2870 ndr
->flags
= _flags_save_string
;
2873 uint32_t _flags_save_string
= ndr
->flags
;
2874 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2876 uint32_t _relative_save_offset
;
2877 _relative_save_offset
= ndr
->offset
;
2878 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_type
));
2879 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2880 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
2881 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_type
));
2882 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
2883 ndr
->offset
= _relative_save_offset
;
2885 ndr
->flags
= _flags_save_string
;
2888 uint32_t _flags_save_string
= ndr
->flags
;
2889 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2890 if (r
->text_status
) {
2891 uint32_t _relative_save_offset
;
2892 _relative_save_offset
= ndr
->offset
;
2893 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->text_status
));
2894 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2895 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
2896 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->text_status
));
2897 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
2898 ndr
->offset
= _relative_save_offset
;
2900 ndr
->flags
= _flags_save_string
;
2903 return NDR_ERR_SUCCESS
;
2906 _PUBLIC_
void ndr_print_spoolss_JobInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfo1
*r
)
2908 ndr_print_struct(ndr
, name
, "spoolss_JobInfo1");
2910 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
2911 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
2913 if (r
->printer_name
) {
2914 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
2917 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
2919 if (r
->server_name
) {
2920 ndr_print_string(ndr
, "server_name", r
->server_name
);
2923 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
2926 ndr_print_string(ndr
, "user_name", r
->user_name
);
2929 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
2931 if (r
->document_name
) {
2932 ndr_print_string(ndr
, "document_name", r
->document_name
);
2935 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
2938 ndr_print_string(ndr
, "data_type", r
->data_type
);
2941 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
2943 if (r
->text_status
) {
2944 ndr_print_string(ndr
, "text_status", r
->text_status
);
2947 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
2948 ndr_print_uint32(ndr
, "priority", r
->priority
);
2949 ndr_print_uint32(ndr
, "position", r
->position
);
2950 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
2951 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
2952 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
2956 _PUBLIC_
size_t ndr_size_spoolss_JobInfo1(const struct spoolss_JobInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2958 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo1
, ic
);
2961 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfo2
*r
)
2963 if (ndr_flags
& NDR_SCALARS
) {
2964 NDR_CHECK(ndr_push_align(ndr
, 4));
2965 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
2967 uint32_t _flags_save_string
= ndr
->flags
;
2968 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2969 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printer_name
));
2970 ndr
->flags
= _flags_save_string
;
2973 uint32_t _flags_save_string
= ndr
->flags
;
2974 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2975 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->server_name
));
2976 ndr
->flags
= _flags_save_string
;
2979 uint32_t _flags_save_string
= ndr
->flags
;
2980 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2981 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->user_name
));
2982 ndr
->flags
= _flags_save_string
;
2985 uint32_t _flags_save_string
= ndr
->flags
;
2986 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2987 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->document_name
));
2988 ndr
->flags
= _flags_save_string
;
2991 uint32_t _flags_save_string
= ndr
->flags
;
2992 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2993 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->notify_name
));
2994 ndr
->flags
= _flags_save_string
;
2997 uint32_t _flags_save_string
= ndr
->flags
;
2998 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2999 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_type
));
3000 ndr
->flags
= _flags_save_string
;
3003 uint32_t _flags_save_string
= ndr
->flags
;
3004 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3005 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->print_processor
));
3006 ndr
->flags
= _flags_save_string
;
3009 uint32_t _flags_save_string
= ndr
->flags
;
3010 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3011 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->parameters
));
3012 ndr
->flags
= _flags_save_string
;
3015 uint32_t _flags_save_string
= ndr
->flags
;
3016 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3017 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
3018 ndr
->flags
= _flags_save_string
;
3020 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->devmode
));
3022 uint32_t _flags_save_string
= ndr
->flags
;
3023 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3024 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->text_status
));
3025 ndr
->flags
= _flags_save_string
;
3027 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->secdesc
));
3028 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
3029 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
3030 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
3031 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->start_time
));
3032 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->until_time
));
3033 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
3034 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
3035 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
3036 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time
));
3037 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
3039 if (ndr_flags
& NDR_BUFFERS
) {
3041 uint32_t _flags_save_string
= ndr
->flags
;
3042 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3043 if (r
->printer_name
) {
3044 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->printer_name
));
3045 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printer_name
));
3047 ndr
->flags
= _flags_save_string
;
3050 uint32_t _flags_save_string
= ndr
->flags
;
3051 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3052 if (r
->server_name
) {
3053 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->server_name
));
3054 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->server_name
));
3056 ndr
->flags
= _flags_save_string
;
3059 uint32_t _flags_save_string
= ndr
->flags
;
3060 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3062 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->user_name
));
3063 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->user_name
));
3065 ndr
->flags
= _flags_save_string
;
3068 uint32_t _flags_save_string
= ndr
->flags
;
3069 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3070 if (r
->document_name
) {
3071 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->document_name
));
3072 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->document_name
));
3074 ndr
->flags
= _flags_save_string
;
3077 uint32_t _flags_save_string
= ndr
->flags
;
3078 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3079 if (r
->notify_name
) {
3080 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->notify_name
));
3081 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->notify_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
);
3089 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_type
));
3090 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_type
));
3092 ndr
->flags
= _flags_save_string
;
3095 uint32_t _flags_save_string
= ndr
->flags
;
3096 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3097 if (r
->print_processor
) {
3098 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->print_processor
));
3099 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->print_processor
));
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 if (r
->parameters
) {
3107 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->parameters
));
3108 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->parameters
));
3110 ndr
->flags
= _flags_save_string
;
3113 uint32_t _flags_save_string
= ndr
->flags
;
3114 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3115 if (r
->driver_name
) {
3116 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
3117 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
3119 ndr
->flags
= _flags_save_string
;
3122 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->devmode
));
3123 NDR_CHECK(ndr_push_spoolss_DeviceMode(ndr
, NDR_SCALARS
, r
->devmode
));
3126 uint32_t _flags_save_string
= ndr
->flags
;
3127 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3128 if (r
->text_status
) {
3129 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->text_status
));
3130 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->text_status
));
3132 ndr
->flags
= _flags_save_string
;
3135 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->secdesc
));
3136 NDR_CHECK(ndr_push_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
3139 return NDR_ERR_SUCCESS
;
3142 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfo2
*r
)
3144 uint32_t _ptr_printer_name
;
3145 TALLOC_CTX
*_mem_save_printer_name_0
;
3146 uint32_t _ptr_server_name
;
3147 TALLOC_CTX
*_mem_save_server_name_0
;
3148 uint32_t _ptr_user_name
;
3149 TALLOC_CTX
*_mem_save_user_name_0
;
3150 uint32_t _ptr_document_name
;
3151 TALLOC_CTX
*_mem_save_document_name_0
;
3152 uint32_t _ptr_notify_name
;
3153 TALLOC_CTX
*_mem_save_notify_name_0
;
3154 uint32_t _ptr_data_type
;
3155 TALLOC_CTX
*_mem_save_data_type_0
;
3156 uint32_t _ptr_print_processor
;
3157 TALLOC_CTX
*_mem_save_print_processor_0
;
3158 uint32_t _ptr_parameters
;
3159 TALLOC_CTX
*_mem_save_parameters_0
;
3160 uint32_t _ptr_driver_name
;
3161 TALLOC_CTX
*_mem_save_driver_name_0
;
3162 uint32_t _ptr_devmode
;
3163 TALLOC_CTX
*_mem_save_devmode_0
;
3164 uint32_t _ptr_text_status
;
3165 TALLOC_CTX
*_mem_save_text_status_0
;
3166 uint32_t _ptr_secdesc
;
3167 TALLOC_CTX
*_mem_save_secdesc_0
;
3168 if (ndr_flags
& NDR_SCALARS
) {
3169 NDR_CHECK(ndr_pull_align(ndr
, 4));
3170 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
3172 uint32_t _flags_save_string
= ndr
->flags
;
3173 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3174 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
3175 if (_ptr_printer_name
) {
3176 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
3177 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printer_name
, _ptr_printer_name
));
3179 r
->printer_name
= NULL
;
3181 ndr
->flags
= _flags_save_string
;
3184 uint32_t _flags_save_string
= ndr
->flags
;
3185 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3186 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
3187 if (_ptr_server_name
) {
3188 NDR_PULL_ALLOC(ndr
, r
->server_name
);
3189 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->server_name
, _ptr_server_name
));
3191 r
->server_name
= NULL
;
3193 ndr
->flags
= _flags_save_string
;
3196 uint32_t _flags_save_string
= ndr
->flags
;
3197 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3198 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
3199 if (_ptr_user_name
) {
3200 NDR_PULL_ALLOC(ndr
, r
->user_name
);
3201 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->user_name
, _ptr_user_name
));
3203 r
->user_name
= NULL
;
3205 ndr
->flags
= _flags_save_string
;
3208 uint32_t _flags_save_string
= ndr
->flags
;
3209 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3210 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
3211 if (_ptr_document_name
) {
3212 NDR_PULL_ALLOC(ndr
, r
->document_name
);
3213 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->document_name
, _ptr_document_name
));
3215 r
->document_name
= NULL
;
3217 ndr
->flags
= _flags_save_string
;
3220 uint32_t _flags_save_string
= ndr
->flags
;
3221 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3222 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_name
));
3223 if (_ptr_notify_name
) {
3224 NDR_PULL_ALLOC(ndr
, r
->notify_name
);
3225 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->notify_name
, _ptr_notify_name
));
3227 r
->notify_name
= NULL
;
3229 ndr
->flags
= _flags_save_string
;
3232 uint32_t _flags_save_string
= ndr
->flags
;
3233 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3234 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
3235 if (_ptr_data_type
) {
3236 NDR_PULL_ALLOC(ndr
, r
->data_type
);
3237 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_type
, _ptr_data_type
));
3239 r
->data_type
= NULL
;
3241 ndr
->flags
= _flags_save_string
;
3244 uint32_t _flags_save_string
= ndr
->flags
;
3245 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3246 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
3247 if (_ptr_print_processor
) {
3248 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
3249 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->print_processor
, _ptr_print_processor
));
3251 r
->print_processor
= NULL
;
3253 ndr
->flags
= _flags_save_string
;
3256 uint32_t _flags_save_string
= ndr
->flags
;
3257 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3258 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
3259 if (_ptr_parameters
) {
3260 NDR_PULL_ALLOC(ndr
, r
->parameters
);
3261 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->parameters
, _ptr_parameters
));
3263 r
->parameters
= NULL
;
3265 ndr
->flags
= _flags_save_string
;
3268 uint32_t _flags_save_string
= ndr
->flags
;
3269 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3270 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
3271 if (_ptr_driver_name
) {
3272 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
3273 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
3275 r
->driver_name
= NULL
;
3277 ndr
->flags
= _flags_save_string
;
3279 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
3281 NDR_PULL_ALLOC(ndr
, r
->devmode
);
3282 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->devmode
, _ptr_devmode
));
3287 uint32_t _flags_save_string
= ndr
->flags
;
3288 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3289 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
3290 if (_ptr_text_status
) {
3291 NDR_PULL_ALLOC(ndr
, r
->text_status
);
3292 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->text_status
, _ptr_text_status
));
3294 r
->text_status
= NULL
;
3296 ndr
->flags
= _flags_save_string
;
3298 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
3300 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
3301 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->secdesc
, _ptr_secdesc
));
3305 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
3306 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
3307 if (r
->priority
> 99) {
3308 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3310 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
3311 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->start_time
));
3312 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->until_time
));
3313 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
3314 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
3315 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
3316 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time
));
3317 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
3319 if (ndr_flags
& NDR_BUFFERS
) {
3321 uint32_t _flags_save_string
= ndr
->flags
;
3322 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3323 if (r
->printer_name
) {
3324 uint32_t _relative_save_offset
;
3325 _relative_save_offset
= ndr
->offset
;
3326 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printer_name
));
3327 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3328 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
3329 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printer_name
));
3330 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
3331 ndr
->offset
= _relative_save_offset
;
3333 ndr
->flags
= _flags_save_string
;
3336 uint32_t _flags_save_string
= ndr
->flags
;
3337 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3338 if (r
->server_name
) {
3339 uint32_t _relative_save_offset
;
3340 _relative_save_offset
= ndr
->offset
;
3341 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->server_name
));
3342 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3343 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
3344 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->server_name
));
3345 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
3346 ndr
->offset
= _relative_save_offset
;
3348 ndr
->flags
= _flags_save_string
;
3351 uint32_t _flags_save_string
= ndr
->flags
;
3352 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3354 uint32_t _relative_save_offset
;
3355 _relative_save_offset
= ndr
->offset
;
3356 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->user_name
));
3357 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3358 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
3359 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->user_name
));
3360 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
3361 ndr
->offset
= _relative_save_offset
;
3363 ndr
->flags
= _flags_save_string
;
3366 uint32_t _flags_save_string
= ndr
->flags
;
3367 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3368 if (r
->document_name
) {
3369 uint32_t _relative_save_offset
;
3370 _relative_save_offset
= ndr
->offset
;
3371 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->document_name
));
3372 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3373 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
3374 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->document_name
));
3375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
3376 ndr
->offset
= _relative_save_offset
;
3378 ndr
->flags
= _flags_save_string
;
3381 uint32_t _flags_save_string
= ndr
->flags
;
3382 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3383 if (r
->notify_name
) {
3384 uint32_t _relative_save_offset
;
3385 _relative_save_offset
= ndr
->offset
;
3386 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->notify_name
));
3387 _mem_save_notify_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3388 NDR_PULL_SET_MEM_CTX(ndr
, r
->notify_name
, 0);
3389 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->notify_name
));
3390 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_name_0
, 0);
3391 ndr
->offset
= _relative_save_offset
;
3393 ndr
->flags
= _flags_save_string
;
3396 uint32_t _flags_save_string
= ndr
->flags
;
3397 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3399 uint32_t _relative_save_offset
;
3400 _relative_save_offset
= ndr
->offset
;
3401 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_type
));
3402 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3403 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
3404 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_type
));
3405 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
3406 ndr
->offset
= _relative_save_offset
;
3408 ndr
->flags
= _flags_save_string
;
3411 uint32_t _flags_save_string
= ndr
->flags
;
3412 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3413 if (r
->print_processor
) {
3414 uint32_t _relative_save_offset
;
3415 _relative_save_offset
= ndr
->offset
;
3416 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->print_processor
));
3417 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3418 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
3419 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->print_processor
));
3420 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
3421 ndr
->offset
= _relative_save_offset
;
3423 ndr
->flags
= _flags_save_string
;
3426 uint32_t _flags_save_string
= ndr
->flags
;
3427 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3428 if (r
->parameters
) {
3429 uint32_t _relative_save_offset
;
3430 _relative_save_offset
= ndr
->offset
;
3431 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->parameters
));
3432 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3433 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
3434 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->parameters
));
3435 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
3436 ndr
->offset
= _relative_save_offset
;
3438 ndr
->flags
= _flags_save_string
;
3441 uint32_t _flags_save_string
= ndr
->flags
;
3442 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3443 if (r
->driver_name
) {
3444 uint32_t _relative_save_offset
;
3445 _relative_save_offset
= ndr
->offset
;
3446 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
3447 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3448 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
3449 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
3450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
3451 ndr
->offset
= _relative_save_offset
;
3453 ndr
->flags
= _flags_save_string
;
3456 uint32_t _relative_save_offset
;
3457 _relative_save_offset
= ndr
->offset
;
3458 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->devmode
));
3459 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3460 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
3461 NDR_CHECK(ndr_pull_spoolss_DeviceMode(ndr
, NDR_SCALARS
, r
->devmode
));
3462 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
3463 ndr
->offset
= _relative_save_offset
;
3466 uint32_t _flags_save_string
= ndr
->flags
;
3467 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3468 if (r
->text_status
) {
3469 uint32_t _relative_save_offset
;
3470 _relative_save_offset
= ndr
->offset
;
3471 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->text_status
));
3472 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3473 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
3474 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->text_status
));
3475 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
3476 ndr
->offset
= _relative_save_offset
;
3478 ndr
->flags
= _flags_save_string
;
3481 uint32_t _relative_save_offset
;
3482 _relative_save_offset
= ndr
->offset
;
3483 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->secdesc
));
3484 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3485 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
3486 NDR_CHECK(ndr_pull_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
3487 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
3488 ndr
->offset
= _relative_save_offset
;
3491 return NDR_ERR_SUCCESS
;
3494 _PUBLIC_
void ndr_print_spoolss_JobInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfo2
*r
)
3496 ndr_print_struct(ndr
, name
, "spoolss_JobInfo2");
3498 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
3499 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
3501 if (r
->printer_name
) {
3502 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
3505 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
3507 if (r
->server_name
) {
3508 ndr_print_string(ndr
, "server_name", r
->server_name
);
3511 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
3514 ndr_print_string(ndr
, "user_name", r
->user_name
);
3517 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
3519 if (r
->document_name
) {
3520 ndr_print_string(ndr
, "document_name", r
->document_name
);
3523 ndr_print_ptr(ndr
, "notify_name", r
->notify_name
);
3525 if (r
->notify_name
) {
3526 ndr_print_string(ndr
, "notify_name", r
->notify_name
);
3529 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
3532 ndr_print_string(ndr
, "data_type", r
->data_type
);
3535 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
3537 if (r
->print_processor
) {
3538 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
3541 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
3543 if (r
->parameters
) {
3544 ndr_print_string(ndr
, "parameters", r
->parameters
);
3547 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
3549 if (r
->driver_name
) {
3550 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
3553 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
3556 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
3559 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
3561 if (r
->text_status
) {
3562 ndr_print_string(ndr
, "text_status", r
->text_status
);
3565 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
3568 ndr_print_security_descriptor(ndr
, "secdesc", r
->secdesc
);
3571 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
3572 ndr_print_uint32(ndr
, "priority", r
->priority
);
3573 ndr_print_uint32(ndr
, "position", r
->position
);
3574 ndr_print_uint32(ndr
, "start_time", r
->start_time
);
3575 ndr_print_uint32(ndr
, "until_time", r
->until_time
);
3576 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
3577 ndr_print_uint32(ndr
, "size", r
->size
);
3578 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
3579 ndr_print_uint32(ndr
, "time", r
->time
);
3580 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
3584 _PUBLIC_
size_t ndr_size_spoolss_JobInfo2(const struct spoolss_JobInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
3586 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo2
, ic
);
3589 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfo3
*r
)
3591 if (ndr_flags
& NDR_SCALARS
) {
3592 NDR_CHECK(ndr_push_align(ndr
, 4));
3593 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
3594 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->next_job_id
));
3595 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
3597 if (ndr_flags
& NDR_BUFFERS
) {
3599 return NDR_ERR_SUCCESS
;
3602 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfo3
*r
)
3604 if (ndr_flags
& NDR_SCALARS
) {
3605 NDR_CHECK(ndr_pull_align(ndr
, 4));
3606 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
3607 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->next_job_id
));
3608 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
3610 if (ndr_flags
& NDR_BUFFERS
) {
3612 return NDR_ERR_SUCCESS
;
3615 _PUBLIC_
void ndr_print_spoolss_JobInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfo3
*r
)
3617 ndr_print_struct(ndr
, name
, "spoolss_JobInfo3");
3619 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
3620 ndr_print_uint32(ndr
, "next_job_id", r
->next_job_id
);
3621 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
3625 _PUBLIC_
size_t ndr_size_spoolss_JobInfo3(const struct spoolss_JobInfo3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
3627 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo3
, ic
);
3630 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfo4
*r
)
3632 if (ndr_flags
& NDR_SCALARS
) {
3633 NDR_CHECK(ndr_push_align(ndr
, 4));
3634 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
3636 uint32_t _flags_save_string
= ndr
->flags
;
3637 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3638 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printer_name
));
3639 ndr
->flags
= _flags_save_string
;
3642 uint32_t _flags_save_string
= ndr
->flags
;
3643 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3644 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->server_name
));
3645 ndr
->flags
= _flags_save_string
;
3648 uint32_t _flags_save_string
= ndr
->flags
;
3649 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3650 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->user_name
));
3651 ndr
->flags
= _flags_save_string
;
3654 uint32_t _flags_save_string
= ndr
->flags
;
3655 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3656 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->document_name
));
3657 ndr
->flags
= _flags_save_string
;
3660 uint32_t _flags_save_string
= ndr
->flags
;
3661 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3662 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->notify_name
));
3663 ndr
->flags
= _flags_save_string
;
3666 uint32_t _flags_save_string
= ndr
->flags
;
3667 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3668 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_type
));
3669 ndr
->flags
= _flags_save_string
;
3672 uint32_t _flags_save_string
= ndr
->flags
;
3673 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3674 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->print_processor
));
3675 ndr
->flags
= _flags_save_string
;
3678 uint32_t _flags_save_string
= ndr
->flags
;
3679 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3680 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->parameters
));
3681 ndr
->flags
= _flags_save_string
;
3684 uint32_t _flags_save_string
= ndr
->flags
;
3685 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3686 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
3687 ndr
->flags
= _flags_save_string
;
3689 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->devmode
));
3691 uint32_t _flags_save_string
= ndr
->flags
;
3692 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3693 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->text_status
));
3694 ndr
->flags
= _flags_save_string
;
3696 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->secdesc
));
3697 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
3698 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
3699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
3700 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->start_time
));
3701 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->until_time
));
3702 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
3703 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
3704 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
3705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time
));
3706 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
3707 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size_high
));
3709 if (ndr_flags
& NDR_BUFFERS
) {
3711 uint32_t _flags_save_string
= ndr
->flags
;
3712 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3713 if (r
->printer_name
) {
3714 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->printer_name
));
3715 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printer_name
));
3717 ndr
->flags
= _flags_save_string
;
3720 uint32_t _flags_save_string
= ndr
->flags
;
3721 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3722 if (r
->server_name
) {
3723 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->server_name
));
3724 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->server_name
));
3726 ndr
->flags
= _flags_save_string
;
3729 uint32_t _flags_save_string
= ndr
->flags
;
3730 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3732 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->user_name
));
3733 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->user_name
));
3735 ndr
->flags
= _flags_save_string
;
3738 uint32_t _flags_save_string
= ndr
->flags
;
3739 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3740 if (r
->document_name
) {
3741 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->document_name
));
3742 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->document_name
));
3744 ndr
->flags
= _flags_save_string
;
3747 uint32_t _flags_save_string
= ndr
->flags
;
3748 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3749 if (r
->notify_name
) {
3750 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->notify_name
));
3751 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->notify_name
));
3753 ndr
->flags
= _flags_save_string
;
3756 uint32_t _flags_save_string
= ndr
->flags
;
3757 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3759 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_type
));
3760 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_type
));
3762 ndr
->flags
= _flags_save_string
;
3765 uint32_t _flags_save_string
= ndr
->flags
;
3766 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3767 if (r
->print_processor
) {
3768 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->print_processor
));
3769 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->print_processor
));
3771 ndr
->flags
= _flags_save_string
;
3774 uint32_t _flags_save_string
= ndr
->flags
;
3775 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3776 if (r
->parameters
) {
3777 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->parameters
));
3778 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->parameters
));
3780 ndr
->flags
= _flags_save_string
;
3783 uint32_t _flags_save_string
= ndr
->flags
;
3784 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3785 if (r
->driver_name
) {
3786 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
3787 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
3789 ndr
->flags
= _flags_save_string
;
3792 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->devmode
));
3793 NDR_CHECK(ndr_push_spoolss_DeviceMode(ndr
, NDR_SCALARS
, r
->devmode
));
3796 uint32_t _flags_save_string
= ndr
->flags
;
3797 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3798 if (r
->text_status
) {
3799 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->text_status
));
3800 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->text_status
));
3802 ndr
->flags
= _flags_save_string
;
3805 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->secdesc
));
3806 NDR_CHECK(ndr_push_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
3809 return NDR_ERR_SUCCESS
;
3812 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfo4
*r
)
3814 uint32_t _ptr_printer_name
;
3815 TALLOC_CTX
*_mem_save_printer_name_0
;
3816 uint32_t _ptr_server_name
;
3817 TALLOC_CTX
*_mem_save_server_name_0
;
3818 uint32_t _ptr_user_name
;
3819 TALLOC_CTX
*_mem_save_user_name_0
;
3820 uint32_t _ptr_document_name
;
3821 TALLOC_CTX
*_mem_save_document_name_0
;
3822 uint32_t _ptr_notify_name
;
3823 TALLOC_CTX
*_mem_save_notify_name_0
;
3824 uint32_t _ptr_data_type
;
3825 TALLOC_CTX
*_mem_save_data_type_0
;
3826 uint32_t _ptr_print_processor
;
3827 TALLOC_CTX
*_mem_save_print_processor_0
;
3828 uint32_t _ptr_parameters
;
3829 TALLOC_CTX
*_mem_save_parameters_0
;
3830 uint32_t _ptr_driver_name
;
3831 TALLOC_CTX
*_mem_save_driver_name_0
;
3832 uint32_t _ptr_devmode
;
3833 TALLOC_CTX
*_mem_save_devmode_0
;
3834 uint32_t _ptr_text_status
;
3835 TALLOC_CTX
*_mem_save_text_status_0
;
3836 uint32_t _ptr_secdesc
;
3837 TALLOC_CTX
*_mem_save_secdesc_0
;
3838 if (ndr_flags
& NDR_SCALARS
) {
3839 NDR_CHECK(ndr_pull_align(ndr
, 4));
3840 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
3842 uint32_t _flags_save_string
= ndr
->flags
;
3843 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3844 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
3845 if (_ptr_printer_name
) {
3846 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
3847 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printer_name
, _ptr_printer_name
));
3849 r
->printer_name
= NULL
;
3851 ndr
->flags
= _flags_save_string
;
3854 uint32_t _flags_save_string
= ndr
->flags
;
3855 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3856 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
3857 if (_ptr_server_name
) {
3858 NDR_PULL_ALLOC(ndr
, r
->server_name
);
3859 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->server_name
, _ptr_server_name
));
3861 r
->server_name
= NULL
;
3863 ndr
->flags
= _flags_save_string
;
3866 uint32_t _flags_save_string
= ndr
->flags
;
3867 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3868 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
3869 if (_ptr_user_name
) {
3870 NDR_PULL_ALLOC(ndr
, r
->user_name
);
3871 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->user_name
, _ptr_user_name
));
3873 r
->user_name
= NULL
;
3875 ndr
->flags
= _flags_save_string
;
3878 uint32_t _flags_save_string
= ndr
->flags
;
3879 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3880 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
3881 if (_ptr_document_name
) {
3882 NDR_PULL_ALLOC(ndr
, r
->document_name
);
3883 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->document_name
, _ptr_document_name
));
3885 r
->document_name
= NULL
;
3887 ndr
->flags
= _flags_save_string
;
3890 uint32_t _flags_save_string
= ndr
->flags
;
3891 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3892 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_name
));
3893 if (_ptr_notify_name
) {
3894 NDR_PULL_ALLOC(ndr
, r
->notify_name
);
3895 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->notify_name
, _ptr_notify_name
));
3897 r
->notify_name
= NULL
;
3899 ndr
->flags
= _flags_save_string
;
3902 uint32_t _flags_save_string
= ndr
->flags
;
3903 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3904 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
3905 if (_ptr_data_type
) {
3906 NDR_PULL_ALLOC(ndr
, r
->data_type
);
3907 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_type
, _ptr_data_type
));
3909 r
->data_type
= NULL
;
3911 ndr
->flags
= _flags_save_string
;
3914 uint32_t _flags_save_string
= ndr
->flags
;
3915 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3916 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
3917 if (_ptr_print_processor
) {
3918 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
3919 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->print_processor
, _ptr_print_processor
));
3921 r
->print_processor
= NULL
;
3923 ndr
->flags
= _flags_save_string
;
3926 uint32_t _flags_save_string
= ndr
->flags
;
3927 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3928 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
3929 if (_ptr_parameters
) {
3930 NDR_PULL_ALLOC(ndr
, r
->parameters
);
3931 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->parameters
, _ptr_parameters
));
3933 r
->parameters
= NULL
;
3935 ndr
->flags
= _flags_save_string
;
3938 uint32_t _flags_save_string
= ndr
->flags
;
3939 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3940 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
3941 if (_ptr_driver_name
) {
3942 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
3943 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
3945 r
->driver_name
= NULL
;
3947 ndr
->flags
= _flags_save_string
;
3949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
3951 NDR_PULL_ALLOC(ndr
, r
->devmode
);
3952 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->devmode
, _ptr_devmode
));
3957 uint32_t _flags_save_string
= ndr
->flags
;
3958 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3959 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
3960 if (_ptr_text_status
) {
3961 NDR_PULL_ALLOC(ndr
, r
->text_status
);
3962 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->text_status
, _ptr_text_status
));
3964 r
->text_status
= NULL
;
3966 ndr
->flags
= _flags_save_string
;
3968 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
3970 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
3971 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->secdesc
, _ptr_secdesc
));
3975 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
3976 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
3977 if (r
->priority
> 99) {
3978 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3980 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
3981 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->start_time
));
3982 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->until_time
));
3983 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
3984 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
3985 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
3986 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time
));
3987 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
3988 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size_high
));
3990 if (ndr_flags
& NDR_BUFFERS
) {
3992 uint32_t _flags_save_string
= ndr
->flags
;
3993 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3994 if (r
->printer_name
) {
3995 uint32_t _relative_save_offset
;
3996 _relative_save_offset
= ndr
->offset
;
3997 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printer_name
));
3998 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3999 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
4000 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printer_name
));
4001 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
4002 ndr
->offset
= _relative_save_offset
;
4004 ndr
->flags
= _flags_save_string
;
4007 uint32_t _flags_save_string
= ndr
->flags
;
4008 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4009 if (r
->server_name
) {
4010 uint32_t _relative_save_offset
;
4011 _relative_save_offset
= ndr
->offset
;
4012 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->server_name
));
4013 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4014 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
4015 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->server_name
));
4016 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
4017 ndr
->offset
= _relative_save_offset
;
4019 ndr
->flags
= _flags_save_string
;
4022 uint32_t _flags_save_string
= ndr
->flags
;
4023 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4025 uint32_t _relative_save_offset
;
4026 _relative_save_offset
= ndr
->offset
;
4027 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->user_name
));
4028 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4029 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
4030 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->user_name
));
4031 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
4032 ndr
->offset
= _relative_save_offset
;
4034 ndr
->flags
= _flags_save_string
;
4037 uint32_t _flags_save_string
= ndr
->flags
;
4038 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4039 if (r
->document_name
) {
4040 uint32_t _relative_save_offset
;
4041 _relative_save_offset
= ndr
->offset
;
4042 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->document_name
));
4043 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4044 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
4045 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->document_name
));
4046 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
4047 ndr
->offset
= _relative_save_offset
;
4049 ndr
->flags
= _flags_save_string
;
4052 uint32_t _flags_save_string
= ndr
->flags
;
4053 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4054 if (r
->notify_name
) {
4055 uint32_t _relative_save_offset
;
4056 _relative_save_offset
= ndr
->offset
;
4057 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->notify_name
));
4058 _mem_save_notify_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4059 NDR_PULL_SET_MEM_CTX(ndr
, r
->notify_name
, 0);
4060 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->notify_name
));
4061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_name_0
, 0);
4062 ndr
->offset
= _relative_save_offset
;
4064 ndr
->flags
= _flags_save_string
;
4067 uint32_t _flags_save_string
= ndr
->flags
;
4068 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4070 uint32_t _relative_save_offset
;
4071 _relative_save_offset
= ndr
->offset
;
4072 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_type
));
4073 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4074 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
4075 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_type
));
4076 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
4077 ndr
->offset
= _relative_save_offset
;
4079 ndr
->flags
= _flags_save_string
;
4082 uint32_t _flags_save_string
= ndr
->flags
;
4083 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4084 if (r
->print_processor
) {
4085 uint32_t _relative_save_offset
;
4086 _relative_save_offset
= ndr
->offset
;
4087 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->print_processor
));
4088 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4089 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
4090 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->print_processor
));
4091 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
4092 ndr
->offset
= _relative_save_offset
;
4094 ndr
->flags
= _flags_save_string
;
4097 uint32_t _flags_save_string
= ndr
->flags
;
4098 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4099 if (r
->parameters
) {
4100 uint32_t _relative_save_offset
;
4101 _relative_save_offset
= ndr
->offset
;
4102 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->parameters
));
4103 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4104 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
4105 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->parameters
));
4106 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
4107 ndr
->offset
= _relative_save_offset
;
4109 ndr
->flags
= _flags_save_string
;
4112 uint32_t _flags_save_string
= ndr
->flags
;
4113 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4114 if (r
->driver_name
) {
4115 uint32_t _relative_save_offset
;
4116 _relative_save_offset
= ndr
->offset
;
4117 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
4118 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4119 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
4120 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
4121 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
4122 ndr
->offset
= _relative_save_offset
;
4124 ndr
->flags
= _flags_save_string
;
4127 uint32_t _relative_save_offset
;
4128 _relative_save_offset
= ndr
->offset
;
4129 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->devmode
));
4130 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4131 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
4132 NDR_CHECK(ndr_pull_spoolss_DeviceMode(ndr
, NDR_SCALARS
, r
->devmode
));
4133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
4134 ndr
->offset
= _relative_save_offset
;
4137 uint32_t _flags_save_string
= ndr
->flags
;
4138 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4139 if (r
->text_status
) {
4140 uint32_t _relative_save_offset
;
4141 _relative_save_offset
= ndr
->offset
;
4142 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->text_status
));
4143 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4144 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
4145 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->text_status
));
4146 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
4147 ndr
->offset
= _relative_save_offset
;
4149 ndr
->flags
= _flags_save_string
;
4152 uint32_t _relative_save_offset
;
4153 _relative_save_offset
= ndr
->offset
;
4154 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->secdesc
));
4155 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4156 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
4157 NDR_CHECK(ndr_pull_security_descriptor(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
4158 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
4159 ndr
->offset
= _relative_save_offset
;
4162 return NDR_ERR_SUCCESS
;
4165 _PUBLIC_
void ndr_print_spoolss_JobInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfo4
*r
)
4167 ndr_print_struct(ndr
, name
, "spoolss_JobInfo4");
4169 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
4170 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
4172 if (r
->printer_name
) {
4173 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
4176 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
4178 if (r
->server_name
) {
4179 ndr_print_string(ndr
, "server_name", r
->server_name
);
4182 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
4185 ndr_print_string(ndr
, "user_name", r
->user_name
);
4188 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
4190 if (r
->document_name
) {
4191 ndr_print_string(ndr
, "document_name", r
->document_name
);
4194 ndr_print_ptr(ndr
, "notify_name", r
->notify_name
);
4196 if (r
->notify_name
) {
4197 ndr_print_string(ndr
, "notify_name", r
->notify_name
);
4200 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
4203 ndr_print_string(ndr
, "data_type", r
->data_type
);
4206 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
4208 if (r
->print_processor
) {
4209 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
4212 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
4214 if (r
->parameters
) {
4215 ndr_print_string(ndr
, "parameters", r
->parameters
);
4218 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
4220 if (r
->driver_name
) {
4221 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
4224 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
4227 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
4230 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
4232 if (r
->text_status
) {
4233 ndr_print_string(ndr
, "text_status", r
->text_status
);
4236 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
4239 ndr_print_security_descriptor(ndr
, "secdesc", r
->secdesc
);
4242 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
4243 ndr_print_uint32(ndr
, "priority", r
->priority
);
4244 ndr_print_uint32(ndr
, "position", r
->position
);
4245 ndr_print_uint32(ndr
, "start_time", r
->start_time
);
4246 ndr_print_uint32(ndr
, "until_time", r
->until_time
);
4247 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
4248 ndr_print_uint32(ndr
, "size", r
->size
);
4249 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
4250 ndr_print_uint32(ndr
, "time", r
->time
);
4251 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
4252 ndr_print_uint32(ndr
, "size_high", r
->size_high
);
4256 _PUBLIC_
size_t ndr_size_spoolss_JobInfo4(const struct spoolss_JobInfo4
*r
, struct smb_iconv_convenience
*ic
, int flags
)
4258 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo4
, ic
);
4261 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_JobInfo
*r
)
4263 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
4264 if (ndr_flags
& NDR_SCALARS
) {
4265 int level
= ndr_push_get_switch_value(ndr
, r
);
4268 NDR_CHECK(ndr_push_align(ndr
, 4));
4269 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
4270 NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
4274 NDR_CHECK(ndr_push_align(ndr
, 4));
4275 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
4276 NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
4280 NDR_CHECK(ndr_push_align(ndr
, 4));
4281 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
4282 NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
4286 NDR_CHECK(ndr_push_align(ndr
, 4));
4287 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
4288 NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
4296 if (ndr_flags
& NDR_BUFFERS
) {
4297 int level
= ndr_push_get_switch_value(ndr
, r
);
4298 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
4301 NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
4305 NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
4312 NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
4320 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
4321 return NDR_ERR_SUCCESS
;
4324 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_JobInfo
*r
)
4326 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
4328 level
= ndr_pull_get_switch_value(ndr
, r
);
4329 if (ndr_flags
& NDR_SCALARS
) {
4332 NDR_CHECK(ndr_pull_align(ndr
, 4));
4333 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
4334 NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
4338 NDR_CHECK(ndr_pull_align(ndr
, 4));
4339 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
4340 NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
4344 NDR_CHECK(ndr_pull_align(ndr
, 4));
4345 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
4346 NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
4350 NDR_CHECK(ndr_pull_align(ndr
, 4));
4351 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
4352 NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
4360 if (ndr_flags
& NDR_BUFFERS
) {
4361 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
4364 NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
4368 NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
4375 NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
4383 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
4384 return NDR_ERR_SUCCESS
;
4387 _PUBLIC_
void ndr_print_spoolss_JobInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_JobInfo
*r
)
4390 level
= ndr_print_get_switch_value(ndr
, r
);
4391 ndr_print_union(ndr
, name
, level
, "spoolss_JobInfo");
4394 ndr_print_spoolss_JobInfo1(ndr
, "info1", &r
->info1
);
4398 ndr_print_spoolss_JobInfo2(ndr
, "info2", &r
->info2
);
4402 ndr_print_spoolss_JobInfo3(ndr
, "info3", &r
->info3
);
4406 ndr_print_spoolss_JobInfo4(ndr
, "info4", &r
->info4
);
4415 _PUBLIC_
size_t ndr_size_spoolss_JobInfo(const union spoolss_JobInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
4417 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo
, ic
);
4420 static enum ndr_err_code
ndr_push_spoolss_SetJobInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetJobInfo1
*r
)
4422 if (ndr_flags
& NDR_SCALARS
) {
4423 NDR_CHECK(ndr_push_align(ndr
, 4));
4424 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
4425 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printer_name
));
4426 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
4427 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
4428 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->document_name
));
4429 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_type
));
4430 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->text_status
));
4431 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
4432 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
4433 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
4434 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
4435 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
4436 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
4438 if (ndr_flags
& NDR_BUFFERS
) {
4439 if (r
->printer_name
) {
4440 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
4441 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4442 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
4443 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printer_name
, ndr_charset_length(r
->printer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4445 if (r
->server_name
) {
4446 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
4447 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4448 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
4449 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4452 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
4453 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4454 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
4455 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4457 if (r
->document_name
) {
4458 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
4459 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4460 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
4461 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->document_name
, ndr_charset_length(r
->document_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4464 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
4465 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4466 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
4467 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_type
, ndr_charset_length(r
->data_type
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4469 if (r
->text_status
) {
4470 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
4471 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4472 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
4473 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->text_status
, ndr_charset_length(r
->text_status
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4476 return NDR_ERR_SUCCESS
;
4479 static enum ndr_err_code
ndr_pull_spoolss_SetJobInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetJobInfo1
*r
)
4481 uint32_t _ptr_printer_name
;
4482 TALLOC_CTX
*_mem_save_printer_name_0
;
4483 uint32_t _ptr_server_name
;
4484 TALLOC_CTX
*_mem_save_server_name_0
;
4485 uint32_t _ptr_user_name
;
4486 TALLOC_CTX
*_mem_save_user_name_0
;
4487 uint32_t _ptr_document_name
;
4488 TALLOC_CTX
*_mem_save_document_name_0
;
4489 uint32_t _ptr_data_type
;
4490 TALLOC_CTX
*_mem_save_data_type_0
;
4491 uint32_t _ptr_text_status
;
4492 TALLOC_CTX
*_mem_save_text_status_0
;
4493 if (ndr_flags
& NDR_SCALARS
) {
4494 NDR_CHECK(ndr_pull_align(ndr
, 4));
4495 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
4496 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
4497 if (_ptr_printer_name
) {
4498 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
4500 r
->printer_name
= NULL
;
4502 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
4503 if (_ptr_server_name
) {
4504 NDR_PULL_ALLOC(ndr
, r
->server_name
);
4506 r
->server_name
= NULL
;
4508 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
4509 if (_ptr_user_name
) {
4510 NDR_PULL_ALLOC(ndr
, r
->user_name
);
4512 r
->user_name
= NULL
;
4514 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
4515 if (_ptr_document_name
) {
4516 NDR_PULL_ALLOC(ndr
, r
->document_name
);
4518 r
->document_name
= NULL
;
4520 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
4521 if (_ptr_data_type
) {
4522 NDR_PULL_ALLOC(ndr
, r
->data_type
);
4524 r
->data_type
= NULL
;
4526 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
4527 if (_ptr_text_status
) {
4528 NDR_PULL_ALLOC(ndr
, r
->text_status
);
4530 r
->text_status
= NULL
;
4532 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
4533 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
4534 if (r
->priority
> 99) {
4535 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4537 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
4538 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
4539 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
4540 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
4542 if (ndr_flags
& NDR_BUFFERS
) {
4543 if (r
->printer_name
) {
4544 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4545 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
4546 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printer_name
));
4547 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printer_name
));
4548 if (ndr_get_array_length(ndr
, &r
->printer_name
) > ndr_get_array_size(ndr
, &r
->printer_name
)) {
4549 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
));
4551 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t)));
4552 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printer_name
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t), CH_UTF16
));
4553 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
4555 if (r
->server_name
) {
4556 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4557 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
4558 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
4559 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
4560 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
4561 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
));
4563 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
4564 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
4565 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
4568 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4569 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
4570 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
4571 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
4572 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
4573 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
));
4575 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
4576 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
4577 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
4579 if (r
->document_name
) {
4580 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4581 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
4582 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->document_name
));
4583 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->document_name
));
4584 if (ndr_get_array_length(ndr
, &r
->document_name
) > ndr_get_array_size(ndr
, &r
->document_name
)) {
4585 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
));
4587 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t)));
4588 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->document_name
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t), CH_UTF16
));
4589 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
4592 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4593 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
4594 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_type
));
4595 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_type
));
4596 if (ndr_get_array_length(ndr
, &r
->data_type
) > ndr_get_array_size(ndr
, &r
->data_type
)) {
4597 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
));
4599 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t)));
4600 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_type
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t), CH_UTF16
));
4601 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
4603 if (r
->text_status
) {
4604 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4605 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
4606 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->text_status
));
4607 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->text_status
));
4608 if (ndr_get_array_length(ndr
, &r
->text_status
) > ndr_get_array_size(ndr
, &r
->text_status
)) {
4609 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
));
4611 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t)));
4612 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->text_status
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t), CH_UTF16
));
4613 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
4616 return NDR_ERR_SUCCESS
;
4619 _PUBLIC_
void ndr_print_spoolss_SetJobInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetJobInfo1
*r
)
4621 ndr_print_struct(ndr
, name
, "spoolss_SetJobInfo1");
4623 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
4624 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
4626 if (r
->printer_name
) {
4627 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
4630 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
4632 if (r
->server_name
) {
4633 ndr_print_string(ndr
, "server_name", r
->server_name
);
4636 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
4639 ndr_print_string(ndr
, "user_name", r
->user_name
);
4642 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
4644 if (r
->document_name
) {
4645 ndr_print_string(ndr
, "document_name", r
->document_name
);
4648 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
4651 ndr_print_string(ndr
, "data_type", r
->data_type
);
4654 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
4656 if (r
->text_status
) {
4657 ndr_print_string(ndr
, "text_status", r
->text_status
);
4660 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
4661 ndr_print_uint32(ndr
, "priority", r
->priority
);
4662 ndr_print_uint32(ndr
, "position", r
->position
);
4663 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
4664 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
4665 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
4669 static enum ndr_err_code
ndr_push_spoolss_SetJobInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetJobInfo2
*r
)
4671 if (ndr_flags
& NDR_SCALARS
) {
4672 NDR_CHECK(ndr_push_align(ndr
, 4));
4673 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
4674 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printer_name
));
4675 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
4676 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
4677 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->document_name
));
4678 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->notify_name
));
4679 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_type
));
4680 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->print_processor
));
4681 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->parameters
));
4682 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
4683 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->_devmode_ptr
));
4684 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->text_status
));
4685 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->_secdesc_ptr
));
4686 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
4687 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
4688 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
4689 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->start_time
));
4690 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->until_time
));
4691 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
4692 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
4693 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
4694 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time
));
4695 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
4697 if (ndr_flags
& NDR_BUFFERS
) {
4698 if (r
->printer_name
) {
4699 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
4700 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4701 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
4702 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printer_name
, ndr_charset_length(r
->printer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4704 if (r
->server_name
) {
4705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
4706 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4707 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
4708 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4711 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
4712 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4713 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
4714 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4716 if (r
->document_name
) {
4717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
4718 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4719 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
4720 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->document_name
, ndr_charset_length(r
->document_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4722 if (r
->notify_name
) {
4723 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->notify_name
, CH_UTF16
)));
4724 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4725 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->notify_name
, CH_UTF16
)));
4726 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->notify_name
, ndr_charset_length(r
->notify_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4729 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
4730 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4731 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
4732 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_type
, ndr_charset_length(r
->data_type
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4734 if (r
->print_processor
) {
4735 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
4736 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4737 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
4738 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->print_processor
, ndr_charset_length(r
->print_processor
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4740 if (r
->parameters
) {
4741 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
4742 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4743 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
4744 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->parameters
, ndr_charset_length(r
->parameters
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4746 if (r
->driver_name
) {
4747 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
4748 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4749 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
4750 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4752 if (r
->text_status
) {
4753 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
4754 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
4755 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
4756 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->text_status
, ndr_charset_length(r
->text_status
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
4759 return NDR_ERR_SUCCESS
;
4762 static enum ndr_err_code
ndr_pull_spoolss_SetJobInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetJobInfo2
*r
)
4764 uint32_t _ptr_printer_name
;
4765 TALLOC_CTX
*_mem_save_printer_name_0
;
4766 uint32_t _ptr_server_name
;
4767 TALLOC_CTX
*_mem_save_server_name_0
;
4768 uint32_t _ptr_user_name
;
4769 TALLOC_CTX
*_mem_save_user_name_0
;
4770 uint32_t _ptr_document_name
;
4771 TALLOC_CTX
*_mem_save_document_name_0
;
4772 uint32_t _ptr_notify_name
;
4773 TALLOC_CTX
*_mem_save_notify_name_0
;
4774 uint32_t _ptr_data_type
;
4775 TALLOC_CTX
*_mem_save_data_type_0
;
4776 uint32_t _ptr_print_processor
;
4777 TALLOC_CTX
*_mem_save_print_processor_0
;
4778 uint32_t _ptr_parameters
;
4779 TALLOC_CTX
*_mem_save_parameters_0
;
4780 uint32_t _ptr_driver_name
;
4781 TALLOC_CTX
*_mem_save_driver_name_0
;
4782 uint32_t _ptr_text_status
;
4783 TALLOC_CTX
*_mem_save_text_status_0
;
4784 if (ndr_flags
& NDR_SCALARS
) {
4785 NDR_CHECK(ndr_pull_align(ndr
, 4));
4786 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
4787 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
4788 if (_ptr_printer_name
) {
4789 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
4791 r
->printer_name
= NULL
;
4793 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
4794 if (_ptr_server_name
) {
4795 NDR_PULL_ALLOC(ndr
, r
->server_name
);
4797 r
->server_name
= NULL
;
4799 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
4800 if (_ptr_user_name
) {
4801 NDR_PULL_ALLOC(ndr
, r
->user_name
);
4803 r
->user_name
= NULL
;
4805 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
4806 if (_ptr_document_name
) {
4807 NDR_PULL_ALLOC(ndr
, r
->document_name
);
4809 r
->document_name
= NULL
;
4811 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_name
));
4812 if (_ptr_notify_name
) {
4813 NDR_PULL_ALLOC(ndr
, r
->notify_name
);
4815 r
->notify_name
= NULL
;
4817 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
4818 if (_ptr_data_type
) {
4819 NDR_PULL_ALLOC(ndr
, r
->data_type
);
4821 r
->data_type
= NULL
;
4823 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
4824 if (_ptr_print_processor
) {
4825 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
4827 r
->print_processor
= NULL
;
4829 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
4830 if (_ptr_parameters
) {
4831 NDR_PULL_ALLOC(ndr
, r
->parameters
);
4833 r
->parameters
= NULL
;
4835 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
4836 if (_ptr_driver_name
) {
4837 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
4839 r
->driver_name
= NULL
;
4841 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_devmode_ptr
));
4842 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
4843 if (_ptr_text_status
) {
4844 NDR_PULL_ALLOC(ndr
, r
->text_status
);
4846 r
->text_status
= NULL
;
4848 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_secdesc_ptr
));
4849 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
4850 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
4851 if (r
->priority
> 99) {
4852 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4854 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
4855 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->start_time
));
4856 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->until_time
));
4857 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
4858 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
4859 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
4860 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time
));
4861 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
4863 if (ndr_flags
& NDR_BUFFERS
) {
4864 if (r
->printer_name
) {
4865 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4866 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
4867 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printer_name
));
4868 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printer_name
));
4869 if (ndr_get_array_length(ndr
, &r
->printer_name
) > ndr_get_array_size(ndr
, &r
->printer_name
)) {
4870 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
));
4872 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t)));
4873 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printer_name
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t), CH_UTF16
));
4874 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
4876 if (r
->server_name
) {
4877 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4878 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
4879 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
4880 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
4881 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
4882 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
));
4884 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
4885 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
4886 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
4889 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4890 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
4891 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
4892 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
4893 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
4894 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
));
4896 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
4897 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
4898 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
4900 if (r
->document_name
) {
4901 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4902 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
4903 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->document_name
));
4904 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->document_name
));
4905 if (ndr_get_array_length(ndr
, &r
->document_name
) > ndr_get_array_size(ndr
, &r
->document_name
)) {
4906 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
));
4908 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t)));
4909 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->document_name
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t), CH_UTF16
));
4910 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
4912 if (r
->notify_name
) {
4913 _mem_save_notify_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4914 NDR_PULL_SET_MEM_CTX(ndr
, r
->notify_name
, 0);
4915 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->notify_name
));
4916 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->notify_name
));
4917 if (ndr_get_array_length(ndr
, &r
->notify_name
) > ndr_get_array_size(ndr
, &r
->notify_name
)) {
4918 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
));
4920 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->notify_name
), sizeof(uint16_t)));
4921 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->notify_name
, ndr_get_array_length(ndr
, &r
->notify_name
), sizeof(uint16_t), CH_UTF16
));
4922 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_name_0
, 0);
4925 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4926 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
4927 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_type
));
4928 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_type
));
4929 if (ndr_get_array_length(ndr
, &r
->data_type
) > ndr_get_array_size(ndr
, &r
->data_type
)) {
4930 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
));
4932 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t)));
4933 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_type
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t), CH_UTF16
));
4934 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
4936 if (r
->print_processor
) {
4937 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4938 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
4939 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->print_processor
));
4940 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->print_processor
));
4941 if (ndr_get_array_length(ndr
, &r
->print_processor
) > ndr_get_array_size(ndr
, &r
->print_processor
)) {
4942 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
));
4944 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t)));
4945 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->print_processor
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t), CH_UTF16
));
4946 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
4948 if (r
->parameters
) {
4949 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4950 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
4951 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->parameters
));
4952 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->parameters
));
4953 if (ndr_get_array_length(ndr
, &r
->parameters
) > ndr_get_array_size(ndr
, &r
->parameters
)) {
4954 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
));
4956 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t)));
4957 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->parameters
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t), CH_UTF16
));
4958 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
4960 if (r
->driver_name
) {
4961 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4962 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
4963 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
4964 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
4965 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
4966 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
));
4968 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
4969 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
4970 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
4972 if (r
->text_status
) {
4973 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4974 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
4975 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->text_status
));
4976 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->text_status
));
4977 if (ndr_get_array_length(ndr
, &r
->text_status
) > ndr_get_array_size(ndr
, &r
->text_status
)) {
4978 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
));
4980 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t)));
4981 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->text_status
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t), CH_UTF16
));
4982 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
4985 return NDR_ERR_SUCCESS
;
4988 _PUBLIC_
void ndr_print_spoolss_SetJobInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetJobInfo2
*r
)
4990 ndr_print_struct(ndr
, name
, "spoolss_SetJobInfo2");
4992 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
4993 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
4995 if (r
->printer_name
) {
4996 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
4999 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
5001 if (r
->server_name
) {
5002 ndr_print_string(ndr
, "server_name", r
->server_name
);
5005 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
5008 ndr_print_string(ndr
, "user_name", r
->user_name
);
5011 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
5013 if (r
->document_name
) {
5014 ndr_print_string(ndr
, "document_name", r
->document_name
);
5017 ndr_print_ptr(ndr
, "notify_name", r
->notify_name
);
5019 if (r
->notify_name
) {
5020 ndr_print_string(ndr
, "notify_name", r
->notify_name
);
5023 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
5026 ndr_print_string(ndr
, "data_type", r
->data_type
);
5029 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
5031 if (r
->print_processor
) {
5032 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
5035 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
5037 if (r
->parameters
) {
5038 ndr_print_string(ndr
, "parameters", r
->parameters
);
5041 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
5043 if (r
->driver_name
) {
5044 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
5047 ndr_print_uint32(ndr
, "_devmode_ptr", r
->_devmode_ptr
);
5048 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
5050 if (r
->text_status
) {
5051 ndr_print_string(ndr
, "text_status", r
->text_status
);
5054 ndr_print_uint32(ndr
, "_secdesc_ptr", r
->_secdesc_ptr
);
5055 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
5056 ndr_print_uint32(ndr
, "priority", r
->priority
);
5057 ndr_print_uint32(ndr
, "position", r
->position
);
5058 ndr_print_uint32(ndr
, "start_time", r
->start_time
);
5059 ndr_print_uint32(ndr
, "until_time", r
->until_time
);
5060 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
5061 ndr_print_uint32(ndr
, "size", r
->size
);
5062 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
5063 ndr_print_uint32(ndr
, "time", r
->time
);
5064 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
5068 static enum ndr_err_code
ndr_push_spoolss_SetJobInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetJobInfo4
*r
)
5070 if (ndr_flags
& NDR_SCALARS
) {
5071 NDR_CHECK(ndr_push_align(ndr
, 4));
5072 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
5073 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printer_name
));
5074 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
5075 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
5076 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->document_name
));
5077 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->notify_name
));
5078 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_type
));
5079 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->print_processor
));
5080 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->parameters
));
5081 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
5082 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->_devmode_ptr
));
5083 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->text_status
));
5084 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->_secdesc_ptr
));
5085 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
5086 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
5087 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
5088 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->start_time
));
5089 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->until_time
));
5090 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
5091 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
5092 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
5093 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time
));
5094 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
5095 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size_high
));
5097 if (ndr_flags
& NDR_BUFFERS
) {
5098 if (r
->printer_name
) {
5099 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
5100 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5101 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
5102 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printer_name
, ndr_charset_length(r
->printer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5104 if (r
->server_name
) {
5105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
5106 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
5108 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5111 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
5112 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5113 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
5114 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5116 if (r
->document_name
) {
5117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
5118 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5119 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
5120 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->document_name
, ndr_charset_length(r
->document_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5122 if (r
->notify_name
) {
5123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->notify_name
, CH_UTF16
)));
5124 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5125 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->notify_name
, CH_UTF16
)));
5126 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->notify_name
, ndr_charset_length(r
->notify_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5129 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
5130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5131 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
5132 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_type
, ndr_charset_length(r
->data_type
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5134 if (r
->print_processor
) {
5135 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
5136 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5137 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
5138 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->print_processor
, ndr_charset_length(r
->print_processor
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5140 if (r
->parameters
) {
5141 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
5142 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5143 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
5144 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->parameters
, ndr_charset_length(r
->parameters
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5146 if (r
->driver_name
) {
5147 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
5148 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5149 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
5150 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5152 if (r
->text_status
) {
5153 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
5154 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5155 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
5156 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->text_status
, ndr_charset_length(r
->text_status
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5159 return NDR_ERR_SUCCESS
;
5162 static enum ndr_err_code
ndr_pull_spoolss_SetJobInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetJobInfo4
*r
)
5164 uint32_t _ptr_printer_name
;
5165 TALLOC_CTX
*_mem_save_printer_name_0
;
5166 uint32_t _ptr_server_name
;
5167 TALLOC_CTX
*_mem_save_server_name_0
;
5168 uint32_t _ptr_user_name
;
5169 TALLOC_CTX
*_mem_save_user_name_0
;
5170 uint32_t _ptr_document_name
;
5171 TALLOC_CTX
*_mem_save_document_name_0
;
5172 uint32_t _ptr_notify_name
;
5173 TALLOC_CTX
*_mem_save_notify_name_0
;
5174 uint32_t _ptr_data_type
;
5175 TALLOC_CTX
*_mem_save_data_type_0
;
5176 uint32_t _ptr_print_processor
;
5177 TALLOC_CTX
*_mem_save_print_processor_0
;
5178 uint32_t _ptr_parameters
;
5179 TALLOC_CTX
*_mem_save_parameters_0
;
5180 uint32_t _ptr_driver_name
;
5181 TALLOC_CTX
*_mem_save_driver_name_0
;
5182 uint32_t _ptr_text_status
;
5183 TALLOC_CTX
*_mem_save_text_status_0
;
5184 if (ndr_flags
& NDR_SCALARS
) {
5185 NDR_CHECK(ndr_pull_align(ndr
, 4));
5186 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
5187 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
5188 if (_ptr_printer_name
) {
5189 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
5191 r
->printer_name
= NULL
;
5193 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
5194 if (_ptr_server_name
) {
5195 NDR_PULL_ALLOC(ndr
, r
->server_name
);
5197 r
->server_name
= NULL
;
5199 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
5200 if (_ptr_user_name
) {
5201 NDR_PULL_ALLOC(ndr
, r
->user_name
);
5203 r
->user_name
= NULL
;
5205 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
5206 if (_ptr_document_name
) {
5207 NDR_PULL_ALLOC(ndr
, r
->document_name
);
5209 r
->document_name
= NULL
;
5211 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_name
));
5212 if (_ptr_notify_name
) {
5213 NDR_PULL_ALLOC(ndr
, r
->notify_name
);
5215 r
->notify_name
= NULL
;
5217 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
5218 if (_ptr_data_type
) {
5219 NDR_PULL_ALLOC(ndr
, r
->data_type
);
5221 r
->data_type
= NULL
;
5223 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
5224 if (_ptr_print_processor
) {
5225 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
5227 r
->print_processor
= NULL
;
5229 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
5230 if (_ptr_parameters
) {
5231 NDR_PULL_ALLOC(ndr
, r
->parameters
);
5233 r
->parameters
= NULL
;
5235 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
5236 if (_ptr_driver_name
) {
5237 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
5239 r
->driver_name
= NULL
;
5241 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_devmode_ptr
));
5242 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
5243 if (_ptr_text_status
) {
5244 NDR_PULL_ALLOC(ndr
, r
->text_status
);
5246 r
->text_status
= NULL
;
5248 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_secdesc_ptr
));
5249 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
5250 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
5251 if (r
->priority
> 99) {
5252 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5254 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
5255 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->start_time
));
5256 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->until_time
));
5257 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
5258 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
5259 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
5260 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time
));
5261 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
5262 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size_high
));
5264 if (ndr_flags
& NDR_BUFFERS
) {
5265 if (r
->printer_name
) {
5266 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5267 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
5268 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printer_name
));
5269 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printer_name
));
5270 if (ndr_get_array_length(ndr
, &r
->printer_name
) > ndr_get_array_size(ndr
, &r
->printer_name
)) {
5271 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
));
5273 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t)));
5274 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printer_name
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t), CH_UTF16
));
5275 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
5277 if (r
->server_name
) {
5278 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5279 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
5280 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
5281 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
5282 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
5283 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
));
5285 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
5286 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
5287 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
5290 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5291 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
5292 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
5293 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
5294 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
5295 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
));
5297 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
5298 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
5299 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
5301 if (r
->document_name
) {
5302 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5303 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
5304 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->document_name
));
5305 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->document_name
));
5306 if (ndr_get_array_length(ndr
, &r
->document_name
) > ndr_get_array_size(ndr
, &r
->document_name
)) {
5307 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
));
5309 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t)));
5310 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->document_name
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t), CH_UTF16
));
5311 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
5313 if (r
->notify_name
) {
5314 _mem_save_notify_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5315 NDR_PULL_SET_MEM_CTX(ndr
, r
->notify_name
, 0);
5316 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->notify_name
));
5317 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->notify_name
));
5318 if (ndr_get_array_length(ndr
, &r
->notify_name
) > ndr_get_array_size(ndr
, &r
->notify_name
)) {
5319 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
));
5321 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->notify_name
), sizeof(uint16_t)));
5322 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->notify_name
, ndr_get_array_length(ndr
, &r
->notify_name
), sizeof(uint16_t), CH_UTF16
));
5323 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_name_0
, 0);
5326 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5327 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
5328 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_type
));
5329 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_type
));
5330 if (ndr_get_array_length(ndr
, &r
->data_type
) > ndr_get_array_size(ndr
, &r
->data_type
)) {
5331 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
));
5333 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t)));
5334 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_type
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t), CH_UTF16
));
5335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
5337 if (r
->print_processor
) {
5338 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5339 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
5340 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->print_processor
));
5341 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->print_processor
));
5342 if (ndr_get_array_length(ndr
, &r
->print_processor
) > ndr_get_array_size(ndr
, &r
->print_processor
)) {
5343 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
));
5345 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t)));
5346 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->print_processor
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t), CH_UTF16
));
5347 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
5349 if (r
->parameters
) {
5350 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5351 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
5352 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->parameters
));
5353 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->parameters
));
5354 if (ndr_get_array_length(ndr
, &r
->parameters
) > ndr_get_array_size(ndr
, &r
->parameters
)) {
5355 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
));
5357 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t)));
5358 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->parameters
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t), CH_UTF16
));
5359 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
5361 if (r
->driver_name
) {
5362 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5363 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
5364 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
5365 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
5366 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
5367 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
));
5369 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
5370 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
5371 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
5373 if (r
->text_status
) {
5374 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5375 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
5376 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->text_status
));
5377 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->text_status
));
5378 if (ndr_get_array_length(ndr
, &r
->text_status
) > ndr_get_array_size(ndr
, &r
->text_status
)) {
5379 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
));
5381 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t)));
5382 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->text_status
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t), CH_UTF16
));
5383 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
5386 return NDR_ERR_SUCCESS
;
5389 _PUBLIC_
void ndr_print_spoolss_SetJobInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetJobInfo4
*r
)
5391 ndr_print_struct(ndr
, name
, "spoolss_SetJobInfo4");
5393 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
5394 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
5396 if (r
->printer_name
) {
5397 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
5400 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
5402 if (r
->server_name
) {
5403 ndr_print_string(ndr
, "server_name", r
->server_name
);
5406 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
5409 ndr_print_string(ndr
, "user_name", r
->user_name
);
5412 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
5414 if (r
->document_name
) {
5415 ndr_print_string(ndr
, "document_name", r
->document_name
);
5418 ndr_print_ptr(ndr
, "notify_name", r
->notify_name
);
5420 if (r
->notify_name
) {
5421 ndr_print_string(ndr
, "notify_name", r
->notify_name
);
5424 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
5427 ndr_print_string(ndr
, "data_type", r
->data_type
);
5430 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
5432 if (r
->print_processor
) {
5433 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
5436 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
5438 if (r
->parameters
) {
5439 ndr_print_string(ndr
, "parameters", r
->parameters
);
5442 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
5444 if (r
->driver_name
) {
5445 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
5448 ndr_print_uint32(ndr
, "_devmode_ptr", r
->_devmode_ptr
);
5449 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
5451 if (r
->text_status
) {
5452 ndr_print_string(ndr
, "text_status", r
->text_status
);
5455 ndr_print_uint32(ndr
, "_secdesc_ptr", r
->_secdesc_ptr
);
5456 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
5457 ndr_print_uint32(ndr
, "priority", r
->priority
);
5458 ndr_print_uint32(ndr
, "position", r
->position
);
5459 ndr_print_uint32(ndr
, "start_time", r
->start_time
);
5460 ndr_print_uint32(ndr
, "until_time", r
->until_time
);
5461 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
5462 ndr_print_uint32(ndr
, "size", r
->size
);
5463 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
5464 ndr_print_uint32(ndr
, "time", r
->time
);
5465 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
5466 ndr_print_uint32(ndr
, "size_high", r
->size_high
);
5470 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_SetJobInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_SetJobInfo
*r
)
5472 if (ndr_flags
& NDR_SCALARS
) {
5473 int level
= ndr_push_get_switch_value(ndr
, r
);
5474 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
5477 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
5481 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
5485 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
5489 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
5497 if (ndr_flags
& NDR_BUFFERS
) {
5498 int level
= ndr_push_get_switch_value(ndr
, r
);
5502 NDR_CHECK(ndr_push_spoolss_SetJobInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
5508 NDR_CHECK(ndr_push_spoolss_SetJobInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
5514 NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr
, NDR_SCALARS
, r
->info3
));
5520 NDR_CHECK(ndr_push_spoolss_SetJobInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
5529 return NDR_ERR_SUCCESS
;
5532 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_SetJobInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_SetJobInfo
*r
)
5536 TALLOC_CTX
*_mem_save_info1_0
;
5537 TALLOC_CTX
*_mem_save_info2_0
;
5538 TALLOC_CTX
*_mem_save_info3_0
;
5539 TALLOC_CTX
*_mem_save_info4_0
;
5540 level
= ndr_pull_get_switch_value(ndr
, r
);
5541 if (ndr_flags
& NDR_SCALARS
) {
5542 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
5543 if (_level
!= level
) {
5544 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
5548 uint32_t _ptr_info1
;
5549 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
5551 NDR_PULL_ALLOC(ndr
, r
->info1
);
5558 uint32_t _ptr_info2
;
5559 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
5561 NDR_PULL_ALLOC(ndr
, r
->info2
);
5568 uint32_t _ptr_info3
;
5569 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
5571 NDR_PULL_ALLOC(ndr
, r
->info3
);
5578 uint32_t _ptr_info4
;
5579 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
5581 NDR_PULL_ALLOC(ndr
, r
->info4
);
5592 if (ndr_flags
& NDR_BUFFERS
) {
5596 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5597 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
5598 NDR_CHECK(ndr_pull_spoolss_SetJobInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
5599 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
5605 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5606 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
5607 NDR_CHECK(ndr_pull_spoolss_SetJobInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
5608 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
5614 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5615 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
5616 NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr
, NDR_SCALARS
, r
->info3
));
5617 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
5623 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5624 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
5625 NDR_CHECK(ndr_pull_spoolss_SetJobInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
5626 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
5635 return NDR_ERR_SUCCESS
;
5638 _PUBLIC_
void ndr_print_spoolss_SetJobInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_SetJobInfo
*r
)
5641 level
= ndr_print_get_switch_value(ndr
, r
);
5642 ndr_print_union(ndr
, name
, level
, "spoolss_SetJobInfo");
5645 ndr_print_ptr(ndr
, "info1", r
->info1
);
5648 ndr_print_spoolss_SetJobInfo1(ndr
, "info1", r
->info1
);
5654 ndr_print_ptr(ndr
, "info2", r
->info2
);
5657 ndr_print_spoolss_SetJobInfo2(ndr
, "info2", r
->info2
);
5663 ndr_print_ptr(ndr
, "info3", r
->info3
);
5666 ndr_print_spoolss_JobInfo3(ndr
, "info3", r
->info3
);
5672 ndr_print_ptr(ndr
, "info4", r
->info4
);
5675 ndr_print_spoolss_SetJobInfo4(ndr
, "info4", r
->info4
);
5686 static enum ndr_err_code
ndr_push_spoolss_JobInfoContainer(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfoContainer
*r
)
5688 if (ndr_flags
& NDR_SCALARS
) {
5689 NDR_CHECK(ndr_push_align(ndr
, 4));
5690 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
5691 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->level
));
5692 NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr
, NDR_SCALARS
, &r
->info
));
5694 if (ndr_flags
& NDR_BUFFERS
) {
5695 NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5697 return NDR_ERR_SUCCESS
;
5700 static enum ndr_err_code
ndr_pull_spoolss_JobInfoContainer(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfoContainer
*r
)
5702 if (ndr_flags
& NDR_SCALARS
) {
5703 NDR_CHECK(ndr_pull_align(ndr
, 4));
5704 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
5705 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->level
));
5706 NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr
, NDR_SCALARS
, &r
->info
));
5708 if (ndr_flags
& NDR_BUFFERS
) {
5709 NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr
, NDR_BUFFERS
, &r
->info
));
5711 return NDR_ERR_SUCCESS
;
5714 _PUBLIC_
void ndr_print_spoolss_JobInfoContainer(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfoContainer
*r
)
5716 ndr_print_struct(ndr
, name
, "spoolss_JobInfoContainer");
5718 ndr_print_uint32(ndr
, "level", r
->level
);
5719 ndr_print_set_switch_value(ndr
, &r
->info
, r
->level
);
5720 ndr_print_spoolss_SetJobInfo(ndr
, "info", &r
->info
);
5724 static enum ndr_err_code
ndr_push_spoolss_JobControl(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_JobControl r
)
5726 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5727 return NDR_ERR_SUCCESS
;
5730 static enum ndr_err_code
ndr_pull_spoolss_JobControl(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_JobControl
*r
)
5733 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5735 return NDR_ERR_SUCCESS
;
5738 _PUBLIC_
void ndr_print_spoolss_JobControl(struct ndr_print
*ndr
, const char *name
, enum spoolss_JobControl r
)
5740 const char *val
= NULL
;
5743 case SPOOLSS_JOB_CONTROL_PAUSE
: val
= "SPOOLSS_JOB_CONTROL_PAUSE"; break;
5744 case SPOOLSS_JOB_CONTROL_RESUME
: val
= "SPOOLSS_JOB_CONTROL_RESUME"; break;
5745 case SPOOLSS_JOB_CONTROL_CANCEL
: val
= "SPOOLSS_JOB_CONTROL_CANCEL"; break;
5746 case SPOOLSS_JOB_CONTROL_RESTART
: val
= "SPOOLSS_JOB_CONTROL_RESTART"; break;
5747 case SPOOLSS_JOB_CONTROL_DELETE
: val
= "SPOOLSS_JOB_CONTROL_DELETE"; break;
5748 case SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER
: val
= "SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER"; break;
5749 case SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED
: val
= "SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED"; break;
5750 case SPOOLSS_JOB_CONTROL_RETAIN
: val
= "SPOOLSS_JOB_CONTROL_RETAIN"; break;
5751 case SPOOLSS_JOB_CONTROL_RELEASE
: val
= "SPOOLSS_JOB_CONTROL_RELEASE"; break;
5753 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5756 static enum ndr_err_code
ndr_push_spoolss_PrinterControl(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PrinterControl r
)
5758 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
5759 return NDR_ERR_SUCCESS
;
5762 static enum ndr_err_code
ndr_pull_spoolss_PrinterControl(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PrinterControl
*r
)
5765 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
5767 return NDR_ERR_SUCCESS
;
5770 _PUBLIC_
void ndr_print_spoolss_PrinterControl(struct ndr_print
*ndr
, const char *name
, enum spoolss_PrinterControl r
)
5772 const char *val
= NULL
;
5775 case SPOOLSS_PRINTER_CONTROL_UNPAUSE
: val
= "SPOOLSS_PRINTER_CONTROL_UNPAUSE"; break;
5776 case SPOOLSS_PRINTER_CONTROL_PAUSE
: val
= "SPOOLSS_PRINTER_CONTROL_PAUSE"; break;
5777 case SPOOLSS_PRINTER_CONTROL_RESUME
: val
= "SPOOLSS_PRINTER_CONTROL_RESUME"; break;
5778 case SPOOLSS_PRINTER_CONTROL_PURGE
: val
= "SPOOLSS_PRINTER_CONTROL_PURGE"; break;
5779 case SPOOLSS_PRINTER_CONTROL_SET_STATUS
: val
= "SPOOLSS_PRINTER_CONTROL_SET_STATUS"; break;
5781 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
5784 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo0(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo0
*r
)
5786 if (ndr_flags
& NDR_SCALARS
) {
5787 NDR_CHECK(ndr_push_align(ndr
, 4));
5788 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->servername
));
5789 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printername
));
5790 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cjobs
));
5791 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_jobs
));
5792 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_bytes
));
5793 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->time
));
5794 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->global_counter
));
5795 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
5796 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
5797 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->free_build
));
5798 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->spooling
));
5799 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_spooling
));
5800 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->session_counter
));
5801 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_error_out_of_paper
));
5802 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_error_not_ready
));
5803 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_error
));
5804 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->number_of_processors
));
5805 NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr
, NDR_SCALARS
, r
->processor_type
));
5806 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->high_part_total_bytes
));
5807 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->change_id
));
5808 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->last_error
));
5809 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->status
));
5810 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->enumerate_network_printers
));
5811 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->c_setprinter
));
5812 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, r
->processor_architecture
));
5813 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->processor_level
));
5814 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ref_ic
));
5815 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved2
));
5816 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved3
));
5818 if (ndr_flags
& NDR_BUFFERS
) {
5819 if (r
->servername
) {
5820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
5821 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5822 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
5823 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->servername
, ndr_charset_length(r
->servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5825 if (r
->printername
) {
5826 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
5827 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5828 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
5829 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printername
, ndr_charset_length(r
->printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5832 return NDR_ERR_SUCCESS
;
5835 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo0(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo0
*r
)
5837 uint32_t _ptr_servername
;
5838 TALLOC_CTX
*_mem_save_servername_0
;
5839 uint32_t _ptr_printername
;
5840 TALLOC_CTX
*_mem_save_printername_0
;
5841 if (ndr_flags
& NDR_SCALARS
) {
5842 NDR_CHECK(ndr_pull_align(ndr
, 4));
5843 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
5844 if (_ptr_servername
) {
5845 NDR_PULL_ALLOC(ndr
, r
->servername
);
5847 r
->servername
= NULL
;
5849 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
5850 if (_ptr_printername
) {
5851 NDR_PULL_ALLOC(ndr
, r
->printername
);
5853 r
->printername
= NULL
;
5855 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cjobs
));
5856 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_jobs
));
5857 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_bytes
));
5858 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->time
));
5859 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->global_counter
));
5860 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
5861 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
5862 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->free_build
));
5863 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->spooling
));
5864 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_spooling
));
5865 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->session_counter
));
5866 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_error_out_of_paper
));
5867 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_error_not_ready
));
5868 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_error
));
5869 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->number_of_processors
));
5870 NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr
, NDR_SCALARS
, &r
->processor_type
));
5871 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->high_part_total_bytes
));
5872 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->change_id
));
5873 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->last_error
));
5874 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->status
));
5875 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->enumerate_network_printers
));
5876 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->c_setprinter
));
5877 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, &r
->processor_architecture
));
5878 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->processor_level
));
5879 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ref_ic
));
5880 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
5881 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved3
));
5883 if (ndr_flags
& NDR_BUFFERS
) {
5884 if (r
->servername
) {
5885 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5886 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
5887 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->servername
));
5888 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->servername
));
5889 if (ndr_get_array_length(ndr
, &r
->servername
) > ndr_get_array_size(ndr
, &r
->servername
)) {
5890 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
));
5892 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t)));
5893 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->servername
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t), CH_UTF16
));
5894 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
5896 if (r
->printername
) {
5897 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5898 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
5899 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printername
));
5900 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printername
));
5901 if (ndr_get_array_length(ndr
, &r
->printername
) > ndr_get_array_size(ndr
, &r
->printername
)) {
5902 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
));
5904 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t)));
5905 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printername
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t), CH_UTF16
));
5906 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
5909 return NDR_ERR_SUCCESS
;
5912 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo0(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo0
*r
)
5914 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo0");
5916 ndr_print_ptr(ndr
, "servername", r
->servername
);
5918 if (r
->servername
) {
5919 ndr_print_string(ndr
, "servername", r
->servername
);
5922 ndr_print_ptr(ndr
, "printername", r
->printername
);
5924 if (r
->printername
) {
5925 ndr_print_string(ndr
, "printername", r
->printername
);
5928 ndr_print_uint32(ndr
, "cjobs", r
->cjobs
);
5929 ndr_print_uint32(ndr
, "total_jobs", r
->total_jobs
);
5930 ndr_print_uint32(ndr
, "total_bytes", r
->total_bytes
);
5931 ndr_print_spoolss_Time(ndr
, "time", &r
->time
);
5932 ndr_print_uint32(ndr
, "global_counter", r
->global_counter
);
5933 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
5934 ndr_print_uint32(ndr
, "version", r
->version
);
5935 ndr_print_uint32(ndr
, "free_build", r
->free_build
);
5936 ndr_print_uint32(ndr
, "spooling", r
->spooling
);
5937 ndr_print_uint32(ndr
, "max_spooling", r
->max_spooling
);
5938 ndr_print_uint32(ndr
, "session_counter", r
->session_counter
);
5939 ndr_print_uint32(ndr
, "num_error_out_of_paper", r
->num_error_out_of_paper
);
5940 ndr_print_uint32(ndr
, "num_error_not_ready", r
->num_error_not_ready
);
5941 ndr_print_uint32(ndr
, "job_error", r
->job_error
);
5942 ndr_print_uint32(ndr
, "number_of_processors", r
->number_of_processors
);
5943 ndr_print_spoolss_ProcessorType(ndr
, "processor_type", r
->processor_type
);
5944 ndr_print_uint32(ndr
, "high_part_total_bytes", r
->high_part_total_bytes
);
5945 ndr_print_uint32(ndr
, "change_id", r
->change_id
);
5946 ndr_print_WERROR(ndr
, "last_error", r
->last_error
);
5947 ndr_print_uint32(ndr
, "status", r
->status
);
5948 ndr_print_uint32(ndr
, "enumerate_network_printers", r
->enumerate_network_printers
);
5949 ndr_print_uint32(ndr
, "c_setprinter", r
->c_setprinter
);
5950 ndr_print_spoolss_ProcessorArchitecture(ndr
, "processor_architecture", r
->processor_architecture
);
5951 ndr_print_uint16(ndr
, "processor_level", r
->processor_level
);
5952 ndr_print_uint32(ndr
, "ref_ic", r
->ref_ic
);
5953 ndr_print_uint32(ndr
, "reserved2", r
->reserved2
);
5954 ndr_print_uint32(ndr
, "reserved3", r
->reserved3
);
5958 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo1
*r
)
5960 if (ndr_flags
& NDR_SCALARS
) {
5961 NDR_CHECK(ndr_push_align(ndr
, 4));
5962 NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr
, NDR_SCALARS
, r
->flags
));
5963 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->description
));
5964 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
5965 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
5967 if (ndr_flags
& NDR_BUFFERS
) {
5968 if (r
->description
) {
5969 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->description
, CH_UTF16
)));
5970 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5971 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->description
, CH_UTF16
)));
5972 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->description
, ndr_charset_length(r
->description
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5975 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
5976 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5977 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
5978 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, ndr_charset_length(r
->name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5981 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
5982 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
5983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
5984 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5987 return NDR_ERR_SUCCESS
;
5990 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo1
*r
)
5992 uint32_t _ptr_description
;
5993 TALLOC_CTX
*_mem_save_description_0
;
5995 TALLOC_CTX
*_mem_save_name_0
;
5996 uint32_t _ptr_comment
;
5997 TALLOC_CTX
*_mem_save_comment_0
;
5998 if (ndr_flags
& NDR_SCALARS
) {
5999 NDR_CHECK(ndr_pull_align(ndr
, 4));
6000 NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr
, NDR_SCALARS
, &r
->flags
));
6001 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_description
));
6002 if (_ptr_description
) {
6003 NDR_PULL_ALLOC(ndr
, r
->description
);
6005 r
->description
= NULL
;
6007 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
6009 NDR_PULL_ALLOC(ndr
, r
->name
);
6013 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
6015 NDR_PULL_ALLOC(ndr
, r
->comment
);
6020 if (ndr_flags
& NDR_BUFFERS
) {
6021 if (r
->description
) {
6022 _mem_save_description_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6023 NDR_PULL_SET_MEM_CTX(ndr
, r
->description
, 0);
6024 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->description
));
6025 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->description
));
6026 if (ndr_get_array_length(ndr
, &r
->description
) > ndr_get_array_size(ndr
, &r
->description
)) {
6027 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
));
6029 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->description
), sizeof(uint16_t)));
6030 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->description
, ndr_get_array_length(ndr
, &r
->description
), sizeof(uint16_t), CH_UTF16
));
6031 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_description_0
, 0);
6034 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6035 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
6036 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
6037 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
6038 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
6039 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
));
6041 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t)));
6042 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
6043 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
6046 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6047 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
6048 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
6049 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
6050 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
6051 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
));
6053 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
6054 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
6055 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
6058 return NDR_ERR_SUCCESS
;
6061 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo1
*r
)
6063 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo1");
6065 ndr_print_spoolss_EnumPrinterFlags(ndr
, "flags", r
->flags
);
6066 ndr_print_ptr(ndr
, "description", r
->description
);
6068 if (r
->description
) {
6069 ndr_print_string(ndr
, "description", r
->description
);
6072 ndr_print_ptr(ndr
, "name", r
->name
);
6075 ndr_print_string(ndr
, "name", r
->name
);
6078 ndr_print_ptr(ndr
, "comment", r
->comment
);
6081 ndr_print_string(ndr
, "comment", r
->comment
);
6087 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo2
*r
)
6089 if (ndr_flags
& NDR_SCALARS
) {
6090 NDR_CHECK(ndr_push_align(ndr
, 4));
6091 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->servername
));
6092 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printername
));
6093 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sharename
));
6094 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->portname
));
6095 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->drivername
));
6096 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
6097 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->location
));
6098 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->devmode
));
6099 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sepfile
));
6100 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printprocessor
));
6101 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->datatype
));
6102 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->parameters
));
6103 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->secdesc
));
6104 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
6105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
6106 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->defaultpriority
));
6107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->starttime
));
6108 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->untiltime
));
6109 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, r
->status
));
6110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cjobs
));
6111 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->averageppm
));
6113 if (ndr_flags
& NDR_BUFFERS
) {
6114 if (r
->servername
) {
6115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
6116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
6118 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->servername
, ndr_charset_length(r
->servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6120 if (r
->printername
) {
6121 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
6122 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6123 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
6124 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printername
, ndr_charset_length(r
->printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6127 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->sharename
, CH_UTF16
)));
6128 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6129 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->sharename
, CH_UTF16
)));
6130 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->sharename
, ndr_charset_length(r
->sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6133 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->portname
, CH_UTF16
)));
6134 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6135 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->portname
, CH_UTF16
)));
6136 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->portname
, ndr_charset_length(r
->portname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6138 if (r
->drivername
) {
6139 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->drivername
, CH_UTF16
)));
6140 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6141 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->drivername
, CH_UTF16
)));
6142 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->drivername
, ndr_charset_length(r
->drivername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6145 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
6146 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6147 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
6148 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6151 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->location
, CH_UTF16
)));
6152 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6153 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->location
, CH_UTF16
)));
6154 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->location
, ndr_charset_length(r
->location
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6158 struct ndr_push
*_ndr_devmode
;
6159 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
6160 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
6161 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
6165 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->sepfile
, CH_UTF16
)));
6166 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6167 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->sepfile
, CH_UTF16
)));
6168 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->sepfile
, ndr_charset_length(r
->sepfile
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6170 if (r
->printprocessor
) {
6171 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printprocessor
, CH_UTF16
)));
6172 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6173 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printprocessor
, CH_UTF16
)));
6174 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printprocessor
, ndr_charset_length(r
->printprocessor
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6177 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->datatype
, CH_UTF16
)));
6178 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6179 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->datatype
, CH_UTF16
)));
6180 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->datatype
, ndr_charset_length(r
->datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6182 if (r
->parameters
) {
6183 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
6184 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6185 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
6186 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->parameters
, ndr_charset_length(r
->parameters
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6190 struct ndr_push
*_ndr_secdesc
;
6191 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
6192 NDR_CHECK(ndr_push_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
6193 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
6197 return NDR_ERR_SUCCESS
;
6200 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo2
*r
)
6202 uint32_t _ptr_servername
;
6203 TALLOC_CTX
*_mem_save_servername_0
;
6204 uint32_t _ptr_printername
;
6205 TALLOC_CTX
*_mem_save_printername_0
;
6206 uint32_t _ptr_sharename
;
6207 TALLOC_CTX
*_mem_save_sharename_0
;
6208 uint32_t _ptr_portname
;
6209 TALLOC_CTX
*_mem_save_portname_0
;
6210 uint32_t _ptr_drivername
;
6211 TALLOC_CTX
*_mem_save_drivername_0
;
6212 uint32_t _ptr_comment
;
6213 TALLOC_CTX
*_mem_save_comment_0
;
6214 uint32_t _ptr_location
;
6215 TALLOC_CTX
*_mem_save_location_0
;
6216 uint32_t _ptr_devmode
;
6217 TALLOC_CTX
*_mem_save_devmode_0
;
6218 uint32_t _ptr_sepfile
;
6219 TALLOC_CTX
*_mem_save_sepfile_0
;
6220 uint32_t _ptr_printprocessor
;
6221 TALLOC_CTX
*_mem_save_printprocessor_0
;
6222 uint32_t _ptr_datatype
;
6223 TALLOC_CTX
*_mem_save_datatype_0
;
6224 uint32_t _ptr_parameters
;
6225 TALLOC_CTX
*_mem_save_parameters_0
;
6226 uint32_t _ptr_secdesc
;
6227 TALLOC_CTX
*_mem_save_secdesc_0
;
6228 if (ndr_flags
& NDR_SCALARS
) {
6229 NDR_CHECK(ndr_pull_align(ndr
, 4));
6230 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
6231 if (_ptr_servername
) {
6232 NDR_PULL_ALLOC(ndr
, r
->servername
);
6234 r
->servername
= NULL
;
6236 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
6237 if (_ptr_printername
) {
6238 NDR_PULL_ALLOC(ndr
, r
->printername
);
6240 r
->printername
= NULL
;
6242 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
6243 if (_ptr_sharename
) {
6244 NDR_PULL_ALLOC(ndr
, r
->sharename
);
6246 r
->sharename
= NULL
;
6248 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_portname
));
6249 if (_ptr_portname
) {
6250 NDR_PULL_ALLOC(ndr
, r
->portname
);
6254 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_drivername
));
6255 if (_ptr_drivername
) {
6256 NDR_PULL_ALLOC(ndr
, r
->drivername
);
6258 r
->drivername
= NULL
;
6260 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
6262 NDR_PULL_ALLOC(ndr
, r
->comment
);
6266 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_location
));
6267 if (_ptr_location
) {
6268 NDR_PULL_ALLOC(ndr
, r
->location
);
6272 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
6274 NDR_PULL_ALLOC(ndr
, r
->devmode
);
6278 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sepfile
));
6280 NDR_PULL_ALLOC(ndr
, r
->sepfile
);
6284 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printprocessor
));
6285 if (_ptr_printprocessor
) {
6286 NDR_PULL_ALLOC(ndr
, r
->printprocessor
);
6288 r
->printprocessor
= NULL
;
6290 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
6291 if (_ptr_datatype
) {
6292 NDR_PULL_ALLOC(ndr
, r
->datatype
);
6296 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
6297 if (_ptr_parameters
) {
6298 NDR_PULL_ALLOC(ndr
, r
->parameters
);
6300 r
->parameters
= NULL
;
6302 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
6304 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
6308 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
6309 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
6310 if (r
->priority
> 99) {
6311 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6313 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->defaultpriority
));
6314 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->starttime
));
6315 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->untiltime
));
6316 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
6317 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cjobs
));
6318 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->averageppm
));
6320 if (ndr_flags
& NDR_BUFFERS
) {
6321 if (r
->servername
) {
6322 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6323 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
6324 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->servername
));
6325 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->servername
));
6326 if (ndr_get_array_length(ndr
, &r
->servername
) > ndr_get_array_size(ndr
, &r
->servername
)) {
6327 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
));
6329 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t)));
6330 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->servername
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t), CH_UTF16
));
6331 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
6333 if (r
->printername
) {
6334 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6335 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
6336 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printername
));
6337 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printername
));
6338 if (ndr_get_array_length(ndr
, &r
->printername
) > ndr_get_array_size(ndr
, &r
->printername
)) {
6339 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
));
6341 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t)));
6342 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printername
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t), CH_UTF16
));
6343 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
6346 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6347 NDR_PULL_SET_MEM_CTX(ndr
, r
->sharename
, 0);
6348 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sharename
));
6349 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->sharename
));
6350 if (ndr_get_array_length(ndr
, &r
->sharename
) > ndr_get_array_size(ndr
, &r
->sharename
)) {
6351 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
));
6353 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->sharename
), sizeof(uint16_t)));
6354 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->sharename
, ndr_get_array_length(ndr
, &r
->sharename
), sizeof(uint16_t), CH_UTF16
));
6355 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
6358 _mem_save_portname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6359 NDR_PULL_SET_MEM_CTX(ndr
, r
->portname
, 0);
6360 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->portname
));
6361 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->portname
));
6362 if (ndr_get_array_length(ndr
, &r
->portname
) > ndr_get_array_size(ndr
, &r
->portname
)) {
6363 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
));
6365 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->portname
), sizeof(uint16_t)));
6366 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->portname
, ndr_get_array_length(ndr
, &r
->portname
), sizeof(uint16_t), CH_UTF16
));
6367 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_portname_0
, 0);
6369 if (r
->drivername
) {
6370 _mem_save_drivername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6371 NDR_PULL_SET_MEM_CTX(ndr
, r
->drivername
, 0);
6372 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->drivername
));
6373 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->drivername
));
6374 if (ndr_get_array_length(ndr
, &r
->drivername
) > ndr_get_array_size(ndr
, &r
->drivername
)) {
6375 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
));
6377 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->drivername
), sizeof(uint16_t)));
6378 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->drivername
, ndr_get_array_length(ndr
, &r
->drivername
), sizeof(uint16_t), CH_UTF16
));
6379 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_drivername_0
, 0);
6382 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6383 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
6384 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
6385 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
6386 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
6387 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
));
6389 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
6390 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
6391 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
6394 _mem_save_location_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6395 NDR_PULL_SET_MEM_CTX(ndr
, r
->location
, 0);
6396 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->location
));
6397 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->location
));
6398 if (ndr_get_array_length(ndr
, &r
->location
) > ndr_get_array_size(ndr
, &r
->location
)) {
6399 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
));
6401 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->location
), sizeof(uint16_t)));
6402 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->location
, ndr_get_array_length(ndr
, &r
->location
), sizeof(uint16_t), CH_UTF16
));
6403 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_location_0
, 0);
6406 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6407 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
6409 struct ndr_pull
*_ndr_devmode
;
6410 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
6411 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
6412 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
6414 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
6417 _mem_save_sepfile_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6418 NDR_PULL_SET_MEM_CTX(ndr
, r
->sepfile
, 0);
6419 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sepfile
));
6420 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->sepfile
));
6421 if (ndr_get_array_length(ndr
, &r
->sepfile
) > ndr_get_array_size(ndr
, &r
->sepfile
)) {
6422 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
));
6424 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->sepfile
), sizeof(uint16_t)));
6425 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->sepfile
, ndr_get_array_length(ndr
, &r
->sepfile
), sizeof(uint16_t), CH_UTF16
));
6426 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sepfile_0
, 0);
6428 if (r
->printprocessor
) {
6429 _mem_save_printprocessor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6430 NDR_PULL_SET_MEM_CTX(ndr
, r
->printprocessor
, 0);
6431 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printprocessor
));
6432 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printprocessor
));
6433 if (ndr_get_array_length(ndr
, &r
->printprocessor
) > ndr_get_array_size(ndr
, &r
->printprocessor
)) {
6434 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
));
6436 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printprocessor
), sizeof(uint16_t)));
6437 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printprocessor
, ndr_get_array_length(ndr
, &r
->printprocessor
), sizeof(uint16_t), CH_UTF16
));
6438 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printprocessor_0
, 0);
6441 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6442 NDR_PULL_SET_MEM_CTX(ndr
, r
->datatype
, 0);
6443 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->datatype
));
6444 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->datatype
));
6445 if (ndr_get_array_length(ndr
, &r
->datatype
) > ndr_get_array_size(ndr
, &r
->datatype
)) {
6446 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
));
6448 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->datatype
), sizeof(uint16_t)));
6449 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->datatype
, ndr_get_array_length(ndr
, &r
->datatype
), sizeof(uint16_t), CH_UTF16
));
6450 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
6452 if (r
->parameters
) {
6453 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6454 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
6455 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->parameters
));
6456 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->parameters
));
6457 if (ndr_get_array_length(ndr
, &r
->parameters
) > ndr_get_array_size(ndr
, &r
->parameters
)) {
6458 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
));
6460 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t)));
6461 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->parameters
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t), CH_UTF16
));
6462 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
6465 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6466 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
6468 struct ndr_pull
*_ndr_secdesc
;
6469 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
6470 NDR_CHECK(ndr_pull_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
6471 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
6473 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
6476 return NDR_ERR_SUCCESS
;
6479 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo2
*r
)
6481 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo2");
6483 ndr_print_ptr(ndr
, "servername", r
->servername
);
6485 if (r
->servername
) {
6486 ndr_print_string(ndr
, "servername", r
->servername
);
6489 ndr_print_ptr(ndr
, "printername", r
->printername
);
6491 if (r
->printername
) {
6492 ndr_print_string(ndr
, "printername", r
->printername
);
6495 ndr_print_ptr(ndr
, "sharename", r
->sharename
);
6498 ndr_print_string(ndr
, "sharename", r
->sharename
);
6501 ndr_print_ptr(ndr
, "portname", r
->portname
);
6504 ndr_print_string(ndr
, "portname", r
->portname
);
6507 ndr_print_ptr(ndr
, "drivername", r
->drivername
);
6509 if (r
->drivername
) {
6510 ndr_print_string(ndr
, "drivername", r
->drivername
);
6513 ndr_print_ptr(ndr
, "comment", r
->comment
);
6516 ndr_print_string(ndr
, "comment", r
->comment
);
6519 ndr_print_ptr(ndr
, "location", r
->location
);
6522 ndr_print_string(ndr
, "location", r
->location
);
6525 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
6528 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
6531 ndr_print_ptr(ndr
, "sepfile", r
->sepfile
);
6534 ndr_print_string(ndr
, "sepfile", r
->sepfile
);
6537 ndr_print_ptr(ndr
, "printprocessor", r
->printprocessor
);
6539 if (r
->printprocessor
) {
6540 ndr_print_string(ndr
, "printprocessor", r
->printprocessor
);
6543 ndr_print_ptr(ndr
, "datatype", r
->datatype
);
6546 ndr_print_string(ndr
, "datatype", r
->datatype
);
6549 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
6551 if (r
->parameters
) {
6552 ndr_print_string(ndr
, "parameters", r
->parameters
);
6555 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
6558 ndr_print_security_descriptor(ndr
, "secdesc", r
->secdesc
);
6561 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
6562 ndr_print_uint32(ndr
, "priority", r
->priority
);
6563 ndr_print_uint32(ndr
, "defaultpriority", r
->defaultpriority
);
6564 ndr_print_uint32(ndr
, "starttime", r
->starttime
);
6565 ndr_print_uint32(ndr
, "untiltime", r
->untiltime
);
6566 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
6567 ndr_print_uint32(ndr
, "cjobs", r
->cjobs
);
6568 ndr_print_uint32(ndr
, "averageppm", r
->averageppm
);
6572 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo3
*r
)
6574 if (ndr_flags
& NDR_SCALARS
) {
6575 NDR_CHECK(ndr_push_align(ndr
, 4));
6576 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sec_desc_ptr
));
6578 if (ndr_flags
& NDR_BUFFERS
) {
6580 return NDR_ERR_SUCCESS
;
6583 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo3
*r
)
6585 if (ndr_flags
& NDR_SCALARS
) {
6586 NDR_CHECK(ndr_pull_align(ndr
, 4));
6587 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sec_desc_ptr
));
6589 if (ndr_flags
& NDR_BUFFERS
) {
6591 return NDR_ERR_SUCCESS
;
6594 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo3
*r
)
6596 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo3");
6598 ndr_print_uint32(ndr
, "sec_desc_ptr", r
->sec_desc_ptr
);
6602 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo4
*r
)
6604 if (ndr_flags
& NDR_SCALARS
) {
6605 NDR_CHECK(ndr_push_align(ndr
, 4));
6606 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printername
));
6607 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->servername
));
6608 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
6610 if (ndr_flags
& NDR_BUFFERS
) {
6611 if (r
->printername
) {
6612 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
6613 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6614 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
6615 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printername
, ndr_charset_length(r
->printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6617 if (r
->servername
) {
6618 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
6619 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6620 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
6621 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->servername
, ndr_charset_length(r
->servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6624 return NDR_ERR_SUCCESS
;
6627 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo4
*r
)
6629 uint32_t _ptr_printername
;
6630 TALLOC_CTX
*_mem_save_printername_0
;
6631 uint32_t _ptr_servername
;
6632 TALLOC_CTX
*_mem_save_servername_0
;
6633 if (ndr_flags
& NDR_SCALARS
) {
6634 NDR_CHECK(ndr_pull_align(ndr
, 4));
6635 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
6636 if (_ptr_printername
) {
6637 NDR_PULL_ALLOC(ndr
, r
->printername
);
6639 r
->printername
= NULL
;
6641 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
6642 if (_ptr_servername
) {
6643 NDR_PULL_ALLOC(ndr
, r
->servername
);
6645 r
->servername
= NULL
;
6647 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
6649 if (ndr_flags
& NDR_BUFFERS
) {
6650 if (r
->printername
) {
6651 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6652 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
6653 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printername
));
6654 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printername
));
6655 if (ndr_get_array_length(ndr
, &r
->printername
) > ndr_get_array_size(ndr
, &r
->printername
)) {
6656 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
));
6658 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t)));
6659 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printername
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t), CH_UTF16
));
6660 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
6662 if (r
->servername
) {
6663 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6664 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
6665 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->servername
));
6666 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->servername
));
6667 if (ndr_get_array_length(ndr
, &r
->servername
) > ndr_get_array_size(ndr
, &r
->servername
)) {
6668 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
));
6670 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t)));
6671 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->servername
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t), CH_UTF16
));
6672 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
6675 return NDR_ERR_SUCCESS
;
6678 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo4
*r
)
6680 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo4");
6682 ndr_print_ptr(ndr
, "printername", r
->printername
);
6684 if (r
->printername
) {
6685 ndr_print_string(ndr
, "printername", r
->printername
);
6688 ndr_print_ptr(ndr
, "servername", r
->servername
);
6690 if (r
->servername
) {
6691 ndr_print_string(ndr
, "servername", r
->servername
);
6694 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
6698 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo5
*r
)
6700 if (ndr_flags
& NDR_SCALARS
) {
6701 NDR_CHECK(ndr_push_align(ndr
, 4));
6702 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printername
));
6703 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->portname
));
6704 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
6705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->device_not_selected_timeout
));
6706 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->transmission_retry_timeout
));
6708 if (ndr_flags
& NDR_BUFFERS
) {
6709 if (r
->printername
) {
6710 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
6711 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6712 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
6713 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printername
, ndr_charset_length(r
->printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6716 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->portname
, CH_UTF16
)));
6717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6718 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->portname
, CH_UTF16
)));
6719 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->portname
, ndr_charset_length(r
->portname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6722 return NDR_ERR_SUCCESS
;
6725 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo5
*r
)
6727 uint32_t _ptr_printername
;
6728 TALLOC_CTX
*_mem_save_printername_0
;
6729 uint32_t _ptr_portname
;
6730 TALLOC_CTX
*_mem_save_portname_0
;
6731 if (ndr_flags
& NDR_SCALARS
) {
6732 NDR_CHECK(ndr_pull_align(ndr
, 4));
6733 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
6734 if (_ptr_printername
) {
6735 NDR_PULL_ALLOC(ndr
, r
->printername
);
6737 r
->printername
= NULL
;
6739 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_portname
));
6740 if (_ptr_portname
) {
6741 NDR_PULL_ALLOC(ndr
, r
->portname
);
6745 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
6746 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->device_not_selected_timeout
));
6747 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->transmission_retry_timeout
));
6749 if (ndr_flags
& NDR_BUFFERS
) {
6750 if (r
->printername
) {
6751 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6752 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
6753 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printername
));
6754 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printername
));
6755 if (ndr_get_array_length(ndr
, &r
->printername
) > ndr_get_array_size(ndr
, &r
->printername
)) {
6756 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
));
6758 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t)));
6759 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printername
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t), CH_UTF16
));
6760 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
6763 _mem_save_portname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6764 NDR_PULL_SET_MEM_CTX(ndr
, r
->portname
, 0);
6765 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->portname
));
6766 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->portname
));
6767 if (ndr_get_array_length(ndr
, &r
->portname
) > ndr_get_array_size(ndr
, &r
->portname
)) {
6768 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
));
6770 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->portname
), sizeof(uint16_t)));
6771 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->portname
, ndr_get_array_length(ndr
, &r
->portname
), sizeof(uint16_t), CH_UTF16
));
6772 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_portname_0
, 0);
6775 return NDR_ERR_SUCCESS
;
6778 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo5(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo5
*r
)
6780 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo5");
6782 ndr_print_ptr(ndr
, "printername", r
->printername
);
6784 if (r
->printername
) {
6785 ndr_print_string(ndr
, "printername", r
->printername
);
6788 ndr_print_ptr(ndr
, "portname", r
->portname
);
6791 ndr_print_string(ndr
, "portname", r
->portname
);
6794 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
6795 ndr_print_uint32(ndr
, "device_not_selected_timeout", r
->device_not_selected_timeout
);
6796 ndr_print_uint32(ndr
, "transmission_retry_timeout", r
->transmission_retry_timeout
);
6800 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo6
*r
)
6802 if (ndr_flags
& NDR_SCALARS
) {
6803 NDR_CHECK(ndr_push_align(ndr
, 4));
6804 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, r
->status
));
6806 if (ndr_flags
& NDR_BUFFERS
) {
6808 return NDR_ERR_SUCCESS
;
6811 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo6
*r
)
6813 if (ndr_flags
& NDR_SCALARS
) {
6814 NDR_CHECK(ndr_pull_align(ndr
, 4));
6815 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
6817 if (ndr_flags
& NDR_BUFFERS
) {
6819 return NDR_ERR_SUCCESS
;
6822 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo6(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo6
*r
)
6824 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo6");
6826 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
6830 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo7
*r
)
6832 if (ndr_flags
& NDR_SCALARS
) {
6833 NDR_CHECK(ndr_push_align(ndr
, 4));
6834 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->guid
));
6835 NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr
, NDR_SCALARS
, r
->action
));
6837 if (ndr_flags
& NDR_BUFFERS
) {
6839 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->guid
, CH_UTF16
)));
6840 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
6841 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->guid
, CH_UTF16
)));
6842 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->guid
, ndr_charset_length(r
->guid
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6845 return NDR_ERR_SUCCESS
;
6848 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo7
*r
)
6851 TALLOC_CTX
*_mem_save_guid_0
;
6852 if (ndr_flags
& NDR_SCALARS
) {
6853 NDR_CHECK(ndr_pull_align(ndr
, 4));
6854 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_guid
));
6856 NDR_PULL_ALLOC(ndr
, r
->guid
);
6860 NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr
, NDR_SCALARS
, &r
->action
));
6862 if (ndr_flags
& NDR_BUFFERS
) {
6864 _mem_save_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6865 NDR_PULL_SET_MEM_CTX(ndr
, r
->guid
, 0);
6866 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->guid
));
6867 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->guid
));
6868 if (ndr_get_array_length(ndr
, &r
->guid
) > ndr_get_array_size(ndr
, &r
->guid
)) {
6869 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
));
6871 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->guid
), sizeof(uint16_t)));
6872 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->guid
, ndr_get_array_length(ndr
, &r
->guid
), sizeof(uint16_t), CH_UTF16
));
6873 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_guid_0
, 0);
6876 return NDR_ERR_SUCCESS
;
6879 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo7(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo7
*r
)
6881 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo7");
6883 ndr_print_ptr(ndr
, "guid", r
->guid
);
6886 ndr_print_string(ndr
, "guid", r
->guid
);
6889 ndr_print_spoolss_DsPrintAction(ndr
, "action", r
->action
);
6893 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_SetPrinterInfo
*r
)
6895 if (ndr_flags
& NDR_SCALARS
) {
6896 int level
= ndr_push_get_switch_value(ndr
, r
);
6897 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
6900 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
6904 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
6908 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
6912 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
6916 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
6920 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info5
));
6924 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
6928 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info7
));
6932 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info8
));
6936 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info9
));
6944 if (ndr_flags
& NDR_BUFFERS
) {
6945 int level
= ndr_push_get_switch_value(ndr
, r
);
6949 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
6955 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
6961 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
6967 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo3(ndr
, NDR_SCALARS
, r
->info3
));
6973 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
6979 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
6985 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo6(ndr
, NDR_SCALARS
, r
->info6
));
6991 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo7(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info7
));
6997 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info8
));
7003 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info9
));
7012 return NDR_ERR_SUCCESS
;
7015 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_SetPrinterInfo
*r
)
7019 TALLOC_CTX
*_mem_save_info0_0
;
7020 TALLOC_CTX
*_mem_save_info1_0
;
7021 TALLOC_CTX
*_mem_save_info2_0
;
7022 TALLOC_CTX
*_mem_save_info3_0
;
7023 TALLOC_CTX
*_mem_save_info4_0
;
7024 TALLOC_CTX
*_mem_save_info5_0
;
7025 TALLOC_CTX
*_mem_save_info6_0
;
7026 TALLOC_CTX
*_mem_save_info7_0
;
7027 TALLOC_CTX
*_mem_save_info8_0
;
7028 TALLOC_CTX
*_mem_save_info9_0
;
7029 level
= ndr_pull_get_switch_value(ndr
, r
);
7030 if (ndr_flags
& NDR_SCALARS
) {
7031 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
7032 if (_level
!= level
) {
7033 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
7037 uint32_t _ptr_info0
;
7038 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
7040 NDR_PULL_ALLOC(ndr
, r
->info0
);
7047 uint32_t _ptr_info1
;
7048 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
7050 NDR_PULL_ALLOC(ndr
, r
->info1
);
7057 uint32_t _ptr_info2
;
7058 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
7060 NDR_PULL_ALLOC(ndr
, r
->info2
);
7067 uint32_t _ptr_info3
;
7068 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
7070 NDR_PULL_ALLOC(ndr
, r
->info3
);
7077 uint32_t _ptr_info4
;
7078 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
7080 NDR_PULL_ALLOC(ndr
, r
->info4
);
7087 uint32_t _ptr_info5
;
7088 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info5
));
7090 NDR_PULL_ALLOC(ndr
, r
->info5
);
7097 uint32_t _ptr_info6
;
7098 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
7100 NDR_PULL_ALLOC(ndr
, r
->info6
);
7107 uint32_t _ptr_info7
;
7108 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info7
));
7110 NDR_PULL_ALLOC(ndr
, r
->info7
);
7117 uint32_t _ptr_info8
;
7118 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info8
));
7120 NDR_PULL_ALLOC(ndr
, r
->info8
);
7127 uint32_t _ptr_info9
;
7128 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info9
));
7130 NDR_PULL_ALLOC(ndr
, r
->info9
);
7141 if (ndr_flags
& NDR_BUFFERS
) {
7145 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7146 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
7147 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
7148 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
7154 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7155 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
7156 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
7157 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
7163 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7164 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
7165 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
7166 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
7172 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7173 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
7174 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo3(ndr
, NDR_SCALARS
, r
->info3
));
7175 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
7181 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7182 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
7183 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
7184 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
7190 _mem_save_info5_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7191 NDR_PULL_SET_MEM_CTX(ndr
, r
->info5
, 0);
7192 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
7193 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info5_0
, 0);
7199 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7200 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
7201 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo6(ndr
, NDR_SCALARS
, r
->info6
));
7202 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
7208 _mem_save_info7_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7209 NDR_PULL_SET_MEM_CTX(ndr
, r
->info7
, 0);
7210 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo7(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info7
));
7211 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info7_0
, 0);
7217 _mem_save_info8_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7218 NDR_PULL_SET_MEM_CTX(ndr
, r
->info8
, 0);
7219 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info8
));
7220 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info8_0
, 0);
7226 _mem_save_info9_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7227 NDR_PULL_SET_MEM_CTX(ndr
, r
->info9
, 0);
7228 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info9
));
7229 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info9_0
, 0);
7238 return NDR_ERR_SUCCESS
;
7241 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_SetPrinterInfo
*r
)
7244 level
= ndr_print_get_switch_value(ndr
, r
);
7245 ndr_print_union(ndr
, name
, level
, "spoolss_SetPrinterInfo");
7248 ndr_print_ptr(ndr
, "info0", r
->info0
);
7251 ndr_print_spoolss_SetPrinterInfo0(ndr
, "info0", r
->info0
);
7257 ndr_print_ptr(ndr
, "info1", r
->info1
);
7260 ndr_print_spoolss_SetPrinterInfo1(ndr
, "info1", r
->info1
);
7266 ndr_print_ptr(ndr
, "info2", r
->info2
);
7269 ndr_print_spoolss_SetPrinterInfo2(ndr
, "info2", r
->info2
);
7275 ndr_print_ptr(ndr
, "info3", r
->info3
);
7278 ndr_print_spoolss_SetPrinterInfo3(ndr
, "info3", r
->info3
);
7284 ndr_print_ptr(ndr
, "info4", r
->info4
);
7287 ndr_print_spoolss_SetPrinterInfo4(ndr
, "info4", r
->info4
);
7293 ndr_print_ptr(ndr
, "info5", r
->info5
);
7296 ndr_print_spoolss_SetPrinterInfo5(ndr
, "info5", r
->info5
);
7302 ndr_print_ptr(ndr
, "info6", r
->info6
);
7305 ndr_print_spoolss_SetPrinterInfo6(ndr
, "info6", r
->info6
);
7311 ndr_print_ptr(ndr
, "info7", r
->info7
);
7314 ndr_print_spoolss_SetPrinterInfo7(ndr
, "info7", r
->info7
);
7320 ndr_print_ptr(ndr
, "info8", r
->info8
);
7323 ndr_print_spoolss_DeviceModeInfo(ndr
, "info8", r
->info8
);
7329 ndr_print_ptr(ndr
, "info9", r
->info9
);
7332 ndr_print_spoolss_DeviceModeInfo(ndr
, "info9", r
->info9
);
7343 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfoCtr
*r
)
7345 if (ndr_flags
& NDR_SCALARS
) {
7346 NDR_CHECK(ndr_push_align(ndr
, 4));
7347 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
7348 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->level
));
7349 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr
, NDR_SCALARS
, &r
->info
));
7351 if (ndr_flags
& NDR_BUFFERS
) {
7352 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr
, NDR_BUFFERS
, &r
->info
));
7354 return NDR_ERR_SUCCESS
;
7357 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfoCtr
*r
)
7359 if (ndr_flags
& NDR_SCALARS
) {
7360 NDR_CHECK(ndr_pull_align(ndr
, 4));
7361 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
7362 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->level
));
7363 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr
, NDR_SCALARS
, &r
->info
));
7365 if (ndr_flags
& NDR_BUFFERS
) {
7366 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr
, NDR_BUFFERS
, &r
->info
));
7368 return NDR_ERR_SUCCESS
;
7371 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfoCtr(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfoCtr
*r
)
7373 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfoCtr");
7375 ndr_print_uint32(ndr
, "level", r
->level
);
7376 ndr_print_set_switch_value(ndr
, &r
->info
, r
->level
);
7377 ndr_print_spoolss_SetPrinterInfo(ndr
, "info", &r
->info
);
7381 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_StringArray(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_StringArray
*r
)
7383 if (ndr_flags
& NDR_SCALARS
) {
7384 NDR_CHECK(ndr_push_align(ndr
, 4));
7385 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, (ndr_size_spoolss_StringArray(r
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2));
7387 uint32_t _flags_save_string_array
= ndr
->flags
;
7388 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
7389 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->string
));
7390 ndr
->flags
= _flags_save_string_array
;
7393 if (ndr_flags
& NDR_BUFFERS
) {
7395 return NDR_ERR_SUCCESS
;
7398 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_StringArray(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_StringArray
*r
)
7400 if (ndr_flags
& NDR_SCALARS
) {
7401 NDR_CHECK(ndr_pull_align(ndr
, 4));
7402 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size
));
7404 uint32_t _flags_save_string_array
= ndr
->flags
;
7405 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
7406 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->string
));
7407 ndr
->flags
= _flags_save_string_array
;
7410 if (ndr_flags
& NDR_BUFFERS
) {
7412 return NDR_ERR_SUCCESS
;
7415 _PUBLIC_
void ndr_print_spoolss_StringArray(struct ndr_print
*ndr
, const char *name
, const struct spoolss_StringArray
*r
)
7417 ndr_print_struct(ndr
, name
, "spoolss_StringArray");
7419 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
);
7420 ndr_print_string_array(ndr
, "string", r
->string
);
7424 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo1
*r
)
7426 if (ndr_flags
& NDR_SCALARS
) {
7427 NDR_CHECK(ndr_push_align(ndr
, 4));
7428 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
7430 if (ndr_flags
& NDR_BUFFERS
) {
7431 if (r
->driver_name
) {
7432 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
7433 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7434 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
7435 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7438 return NDR_ERR_SUCCESS
;
7441 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo1
*r
)
7443 uint32_t _ptr_driver_name
;
7444 TALLOC_CTX
*_mem_save_driver_name_0
;
7445 if (ndr_flags
& NDR_SCALARS
) {
7446 NDR_CHECK(ndr_pull_align(ndr
, 4));
7447 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
7448 if (_ptr_driver_name
) {
7449 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
7451 r
->driver_name
= NULL
;
7454 if (ndr_flags
& NDR_BUFFERS
) {
7455 if (r
->driver_name
) {
7456 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7457 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
7458 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
7459 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
7460 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
7461 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
));
7463 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
7464 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
7465 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
7468 return NDR_ERR_SUCCESS
;
7471 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo1
*r
)
7473 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo1");
7475 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
7477 if (r
->driver_name
) {
7478 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
7484 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverOSVersion(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DriverOSVersion r
)
7486 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
7487 return NDR_ERR_SUCCESS
;
7490 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverOSVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DriverOSVersion
*r
)
7493 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
7495 return NDR_ERR_SUCCESS
;
7498 _PUBLIC_
void ndr_print_spoolss_DriverOSVersion(struct ndr_print
*ndr
, const char *name
, enum spoolss_DriverOSVersion r
)
7500 const char *val
= NULL
;
7503 case SPOOLSS_DRIVER_VERSION_9X
: val
= "SPOOLSS_DRIVER_VERSION_9X"; break;
7504 case SPOOLSS_DRIVER_VERSION_NT35
: val
= "SPOOLSS_DRIVER_VERSION_NT35"; break;
7505 case SPOOLSS_DRIVER_VERSION_NT4
: val
= "SPOOLSS_DRIVER_VERSION_NT4"; break;
7506 case SPOOLSS_DRIVER_VERSION_200X
: val
= "SPOOLSS_DRIVER_VERSION_200X"; break;
7508 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
7511 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo2
*r
)
7513 if (ndr_flags
& NDR_SCALARS
) {
7514 NDR_CHECK(ndr_push_align(ndr
, 4));
7515 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
7516 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
7517 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
7518 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
7519 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
7520 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
7522 if (ndr_flags
& NDR_BUFFERS
) {
7523 if (r
->driver_name
) {
7524 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
7525 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7526 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
7527 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7529 if (r
->architecture
) {
7530 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
7531 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7532 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
7533 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7535 if (r
->driver_path
) {
7536 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
7537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7538 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
7539 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7542 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
7543 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7544 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
7545 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7547 if (r
->config_file
) {
7548 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
7549 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7550 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
7551 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7554 return NDR_ERR_SUCCESS
;
7557 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo2
*r
)
7559 uint32_t _ptr_driver_name
;
7560 TALLOC_CTX
*_mem_save_driver_name_0
;
7561 uint32_t _ptr_architecture
;
7562 TALLOC_CTX
*_mem_save_architecture_0
;
7563 uint32_t _ptr_driver_path
;
7564 TALLOC_CTX
*_mem_save_driver_path_0
;
7565 uint32_t _ptr_data_file
;
7566 TALLOC_CTX
*_mem_save_data_file_0
;
7567 uint32_t _ptr_config_file
;
7568 TALLOC_CTX
*_mem_save_config_file_0
;
7569 if (ndr_flags
& NDR_SCALARS
) {
7570 NDR_CHECK(ndr_pull_align(ndr
, 4));
7571 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
7572 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
7573 if (_ptr_driver_name
) {
7574 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
7576 r
->driver_name
= NULL
;
7578 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
7579 if (_ptr_architecture
) {
7580 NDR_PULL_ALLOC(ndr
, r
->architecture
);
7582 r
->architecture
= NULL
;
7584 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
7585 if (_ptr_driver_path
) {
7586 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
7588 r
->driver_path
= NULL
;
7590 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
7591 if (_ptr_data_file
) {
7592 NDR_PULL_ALLOC(ndr
, r
->data_file
);
7594 r
->data_file
= NULL
;
7596 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
7597 if (_ptr_config_file
) {
7598 NDR_PULL_ALLOC(ndr
, r
->config_file
);
7600 r
->config_file
= NULL
;
7603 if (ndr_flags
& NDR_BUFFERS
) {
7604 if (r
->driver_name
) {
7605 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7606 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
7607 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
7608 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
7609 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
7610 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
));
7612 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
7613 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
7614 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
7616 if (r
->architecture
) {
7617 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7618 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
7619 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
7620 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
7621 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
7622 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
));
7624 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
7625 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
7626 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
7628 if (r
->driver_path
) {
7629 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7630 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
7631 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
7632 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
7633 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
7634 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
));
7636 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
7637 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
7638 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
7641 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7642 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
7643 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
7644 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
7645 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
7646 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
));
7648 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
7649 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
7650 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
7652 if (r
->config_file
) {
7653 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7654 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
7655 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
7656 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
7657 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
7658 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
));
7660 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
7661 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
7662 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
7665 return NDR_ERR_SUCCESS
;
7668 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo2
*r
)
7670 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo2");
7672 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
7673 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
7675 if (r
->driver_name
) {
7676 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
7679 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
7681 if (r
->architecture
) {
7682 ndr_print_string(ndr
, "architecture", r
->architecture
);
7685 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
7687 if (r
->driver_path
) {
7688 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
7691 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
7694 ndr_print_string(ndr
, "data_file", r
->data_file
);
7697 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
7699 if (r
->config_file
) {
7700 ndr_print_string(ndr
, "config_file", r
->config_file
);
7706 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo3
*r
)
7708 if (ndr_flags
& NDR_SCALARS
) {
7709 NDR_CHECK(ndr_push_align(ndr
, 4));
7710 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
7711 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
7712 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
7713 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
7714 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
7715 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
7716 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->help_file
));
7717 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->monitor_name
));
7718 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->default_datatype
));
7719 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->dependent_files
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
7720 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependent_files
));
7722 if (ndr_flags
& NDR_BUFFERS
) {
7723 if (r
->driver_name
) {
7724 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
7725 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7726 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
7727 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7729 if (r
->architecture
) {
7730 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
7731 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7732 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
7733 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7735 if (r
->driver_path
) {
7736 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
7737 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7738 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
7739 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7742 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
7743 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7744 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
7745 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7747 if (r
->config_file
) {
7748 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
7749 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7750 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
7751 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7754 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
7755 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7756 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
7757 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->help_file
, ndr_charset_length(r
->help_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7759 if (r
->monitor_name
) {
7760 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
7761 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7762 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
7763 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->monitor_name
, ndr_charset_length(r
->monitor_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7765 if (r
->default_datatype
) {
7766 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
7767 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
7768 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
7769 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->default_datatype
, ndr_charset_length(r
->default_datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7771 if (r
->dependent_files
) {
7772 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
7775 return NDR_ERR_SUCCESS
;
7778 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo3
*r
)
7780 uint32_t _ptr_driver_name
;
7781 TALLOC_CTX
*_mem_save_driver_name_0
;
7782 uint32_t _ptr_architecture
;
7783 TALLOC_CTX
*_mem_save_architecture_0
;
7784 uint32_t _ptr_driver_path
;
7785 TALLOC_CTX
*_mem_save_driver_path_0
;
7786 uint32_t _ptr_data_file
;
7787 TALLOC_CTX
*_mem_save_data_file_0
;
7788 uint32_t _ptr_config_file
;
7789 TALLOC_CTX
*_mem_save_config_file_0
;
7790 uint32_t _ptr_help_file
;
7791 TALLOC_CTX
*_mem_save_help_file_0
;
7792 uint32_t _ptr_monitor_name
;
7793 TALLOC_CTX
*_mem_save_monitor_name_0
;
7794 uint32_t _ptr_default_datatype
;
7795 TALLOC_CTX
*_mem_save_default_datatype_0
;
7796 uint32_t _ptr_dependent_files
;
7797 TALLOC_CTX
*_mem_save_dependent_files_0
;
7798 if (ndr_flags
& NDR_SCALARS
) {
7799 NDR_CHECK(ndr_pull_align(ndr
, 4));
7800 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
7801 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
7802 if (_ptr_driver_name
) {
7803 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
7805 r
->driver_name
= NULL
;
7807 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
7808 if (_ptr_architecture
) {
7809 NDR_PULL_ALLOC(ndr
, r
->architecture
);
7811 r
->architecture
= NULL
;
7813 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
7814 if (_ptr_driver_path
) {
7815 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
7817 r
->driver_path
= NULL
;
7819 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
7820 if (_ptr_data_file
) {
7821 NDR_PULL_ALLOC(ndr
, r
->data_file
);
7823 r
->data_file
= NULL
;
7825 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
7826 if (_ptr_config_file
) {
7827 NDR_PULL_ALLOC(ndr
, r
->config_file
);
7829 r
->config_file
= NULL
;
7831 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
7832 if (_ptr_help_file
) {
7833 NDR_PULL_ALLOC(ndr
, r
->help_file
);
7835 r
->help_file
= NULL
;
7837 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
7838 if (_ptr_monitor_name
) {
7839 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
7841 r
->monitor_name
= NULL
;
7843 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
7844 if (_ptr_default_datatype
) {
7845 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
7847 r
->default_datatype
= NULL
;
7849 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_dependent_files
));
7850 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
7851 if (_ptr_dependent_files
) {
7852 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
7854 r
->dependent_files
= NULL
;
7857 if (ndr_flags
& NDR_BUFFERS
) {
7858 if (r
->driver_name
) {
7859 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7860 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
7861 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
7862 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
7863 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
7864 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
));
7866 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
7867 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
7868 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
7870 if (r
->architecture
) {
7871 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7872 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
7873 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
7874 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
7875 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
7876 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
));
7878 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
7879 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
7880 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
7882 if (r
->driver_path
) {
7883 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7884 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
7885 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
7886 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
7887 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
7888 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
));
7890 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
7891 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
7892 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
7895 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7896 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
7897 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
7898 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
7899 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
7900 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
));
7902 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
7903 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
7904 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
7906 if (r
->config_file
) {
7907 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7908 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
7909 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
7910 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
7911 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
7912 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
));
7914 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
7915 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
7916 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
7919 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7920 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
7921 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->help_file
));
7922 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->help_file
));
7923 if (ndr_get_array_length(ndr
, &r
->help_file
) > ndr_get_array_size(ndr
, &r
->help_file
)) {
7924 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
));
7926 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t)));
7927 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->help_file
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t), CH_UTF16
));
7928 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
7930 if (r
->monitor_name
) {
7931 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7932 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
7933 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->monitor_name
));
7934 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->monitor_name
));
7935 if (ndr_get_array_length(ndr
, &r
->monitor_name
) > ndr_get_array_size(ndr
, &r
->monitor_name
)) {
7936 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
));
7938 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t)));
7939 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->monitor_name
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t), CH_UTF16
));
7940 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
7942 if (r
->default_datatype
) {
7943 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7944 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
7945 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->default_datatype
));
7946 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->default_datatype
));
7947 if (ndr_get_array_length(ndr
, &r
->default_datatype
) > ndr_get_array_size(ndr
, &r
->default_datatype
)) {
7948 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
));
7950 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t)));
7951 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->default_datatype
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t), CH_UTF16
));
7952 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
7954 if (r
->dependent_files
) {
7955 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7956 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
7957 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
7958 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
7961 return NDR_ERR_SUCCESS
;
7964 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo3
*r
)
7966 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo3");
7968 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
7969 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
7971 if (r
->driver_name
) {
7972 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
7975 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
7977 if (r
->architecture
) {
7978 ndr_print_string(ndr
, "architecture", r
->architecture
);
7981 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
7983 if (r
->driver_path
) {
7984 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
7987 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
7990 ndr_print_string(ndr
, "data_file", r
->data_file
);
7993 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
7995 if (r
->config_file
) {
7996 ndr_print_string(ndr
, "config_file", r
->config_file
);
7999 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
8002 ndr_print_string(ndr
, "help_file", r
->help_file
);
8005 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
8007 if (r
->monitor_name
) {
8008 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
8011 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
8013 if (r
->default_datatype
) {
8014 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
8017 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
);
8018 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
8020 if (r
->dependent_files
) {
8021 ndr_print_spoolss_StringArray(ndr
, "dependent_files", r
->dependent_files
);
8027 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo4
*r
)
8029 if (ndr_flags
& NDR_SCALARS
) {
8030 NDR_CHECK(ndr_push_align(ndr
, 4));
8031 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
8032 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
8033 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
8034 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
8035 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
8036 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
8037 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->help_file
));
8038 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->monitor_name
));
8039 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->default_datatype
));
8040 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->dependent_files
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8041 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependent_files
));
8042 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->previous_names
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8043 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->previous_names
));
8045 if (ndr_flags
& NDR_BUFFERS
) {
8046 if (r
->driver_name
) {
8047 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8048 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8049 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8050 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8052 if (r
->architecture
) {
8053 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8054 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8055 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8056 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8058 if (r
->driver_path
) {
8059 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8060 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8061 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8062 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8065 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8066 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8067 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8068 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8070 if (r
->config_file
) {
8071 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8072 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8073 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8074 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8077 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
8078 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8079 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
8080 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->help_file
, ndr_charset_length(r
->help_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8082 if (r
->monitor_name
) {
8083 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
8084 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8085 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
8086 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->monitor_name
, ndr_charset_length(r
->monitor_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8088 if (r
->default_datatype
) {
8089 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
8090 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8091 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
8092 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->default_datatype
, ndr_charset_length(r
->default_datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8094 if (r
->dependent_files
) {
8095 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
8097 if (r
->previous_names
) {
8098 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
8101 return NDR_ERR_SUCCESS
;
8104 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo4
*r
)
8106 uint32_t _ptr_driver_name
;
8107 TALLOC_CTX
*_mem_save_driver_name_0
;
8108 uint32_t _ptr_architecture
;
8109 TALLOC_CTX
*_mem_save_architecture_0
;
8110 uint32_t _ptr_driver_path
;
8111 TALLOC_CTX
*_mem_save_driver_path_0
;
8112 uint32_t _ptr_data_file
;
8113 TALLOC_CTX
*_mem_save_data_file_0
;
8114 uint32_t _ptr_config_file
;
8115 TALLOC_CTX
*_mem_save_config_file_0
;
8116 uint32_t _ptr_help_file
;
8117 TALLOC_CTX
*_mem_save_help_file_0
;
8118 uint32_t _ptr_monitor_name
;
8119 TALLOC_CTX
*_mem_save_monitor_name_0
;
8120 uint32_t _ptr_default_datatype
;
8121 TALLOC_CTX
*_mem_save_default_datatype_0
;
8122 uint32_t _ptr_dependent_files
;
8123 TALLOC_CTX
*_mem_save_dependent_files_0
;
8124 uint32_t _ptr_previous_names
;
8125 TALLOC_CTX
*_mem_save_previous_names_0
;
8126 if (ndr_flags
& NDR_SCALARS
) {
8127 NDR_CHECK(ndr_pull_align(ndr
, 4));
8128 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
8129 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
8130 if (_ptr_driver_name
) {
8131 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
8133 r
->driver_name
= NULL
;
8135 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
8136 if (_ptr_architecture
) {
8137 NDR_PULL_ALLOC(ndr
, r
->architecture
);
8139 r
->architecture
= NULL
;
8141 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
8142 if (_ptr_driver_path
) {
8143 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
8145 r
->driver_path
= NULL
;
8147 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
8148 if (_ptr_data_file
) {
8149 NDR_PULL_ALLOC(ndr
, r
->data_file
);
8151 r
->data_file
= NULL
;
8153 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
8154 if (_ptr_config_file
) {
8155 NDR_PULL_ALLOC(ndr
, r
->config_file
);
8157 r
->config_file
= NULL
;
8159 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
8160 if (_ptr_help_file
) {
8161 NDR_PULL_ALLOC(ndr
, r
->help_file
);
8163 r
->help_file
= NULL
;
8165 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
8166 if (_ptr_monitor_name
) {
8167 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
8169 r
->monitor_name
= NULL
;
8171 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
8172 if (_ptr_default_datatype
) {
8173 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
8175 r
->default_datatype
= NULL
;
8177 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_dependent_files
));
8178 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
8179 if (_ptr_dependent_files
) {
8180 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
8182 r
->dependent_files
= NULL
;
8184 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_previous_names
));
8185 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
8186 if (_ptr_previous_names
) {
8187 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
8189 r
->previous_names
= NULL
;
8192 if (ndr_flags
& NDR_BUFFERS
) {
8193 if (r
->driver_name
) {
8194 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8195 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
8196 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
8197 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
8198 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
8199 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
));
8201 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
8202 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
8203 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
8205 if (r
->architecture
) {
8206 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8207 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
8208 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
8209 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
8210 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
8211 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
));
8213 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
8214 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
8215 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
8217 if (r
->driver_path
) {
8218 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8219 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
8220 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
8221 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
8222 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
8223 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
));
8225 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
8226 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
8227 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
8230 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8231 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
8232 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
8233 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
8234 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
8235 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
));
8237 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
8238 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
8239 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
8241 if (r
->config_file
) {
8242 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8243 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
8244 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
8245 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
8246 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
8247 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
));
8249 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
8250 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
8251 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
8254 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8255 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
8256 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->help_file
));
8257 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->help_file
));
8258 if (ndr_get_array_length(ndr
, &r
->help_file
) > ndr_get_array_size(ndr
, &r
->help_file
)) {
8259 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
));
8261 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t)));
8262 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->help_file
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t), CH_UTF16
));
8263 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
8265 if (r
->monitor_name
) {
8266 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8267 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
8268 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->monitor_name
));
8269 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->monitor_name
));
8270 if (ndr_get_array_length(ndr
, &r
->monitor_name
) > ndr_get_array_size(ndr
, &r
->monitor_name
)) {
8271 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
));
8273 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t)));
8274 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->monitor_name
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t), CH_UTF16
));
8275 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
8277 if (r
->default_datatype
) {
8278 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8279 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
8280 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->default_datatype
));
8281 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->default_datatype
));
8282 if (ndr_get_array_length(ndr
, &r
->default_datatype
) > ndr_get_array_size(ndr
, &r
->default_datatype
)) {
8283 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
));
8285 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t)));
8286 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->default_datatype
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t), CH_UTF16
));
8287 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
8289 if (r
->dependent_files
) {
8290 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8291 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
8292 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
8293 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
8295 if (r
->previous_names
) {
8296 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8297 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
8298 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
8299 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
8302 return NDR_ERR_SUCCESS
;
8305 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo4
*r
)
8307 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo4");
8309 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
8310 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
8312 if (r
->driver_name
) {
8313 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
8316 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
8318 if (r
->architecture
) {
8319 ndr_print_string(ndr
, "architecture", r
->architecture
);
8322 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
8324 if (r
->driver_path
) {
8325 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
8328 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
8331 ndr_print_string(ndr
, "data_file", r
->data_file
);
8334 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
8336 if (r
->config_file
) {
8337 ndr_print_string(ndr
, "config_file", r
->config_file
);
8340 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
8343 ndr_print_string(ndr
, "help_file", r
->help_file
);
8346 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
8348 if (r
->monitor_name
) {
8349 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
8352 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
8354 if (r
->default_datatype
) {
8355 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
8358 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
);
8359 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
8361 if (r
->dependent_files
) {
8362 ndr_print_spoolss_StringArray(ndr
, "dependent_files", r
->dependent_files
);
8365 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
);
8366 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
8368 if (r
->previous_names
) {
8369 ndr_print_spoolss_StringArray(ndr
, "previous_names", r
->previous_names
);
8375 static enum ndr_err_code
ndr_push_spoolss_DriverAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
8377 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
8378 return NDR_ERR_SUCCESS
;
8381 static enum ndr_err_code
ndr_pull_spoolss_DriverAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
8384 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
8386 return NDR_ERR_SUCCESS
;
8389 _PUBLIC_
void ndr_print_spoolss_DriverAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
8391 ndr_print_uint32(ndr
, name
, r
);
8393 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_DRIVER_PACKAGE_AWARE", PRINTER_DRIVER_PACKAGE_AWARE
, r
);
8397 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo6
*r
)
8399 if (ndr_flags
& NDR_SCALARS
) {
8400 NDR_CHECK(ndr_push_align(ndr
, 8));
8401 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
8402 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
8403 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
8404 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
8405 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
8406 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
8407 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->help_file
));
8408 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->monitor_name
));
8409 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->default_datatype
));
8410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->dependent_files
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8411 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependent_files
));
8412 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->previous_names
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8413 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->previous_names
));
8414 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
8415 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
8416 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->manufacturer_name
));
8417 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->manufacturer_url
));
8418 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->hardware_id
));
8419 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->provider
));
8421 if (ndr_flags
& NDR_BUFFERS
) {
8422 if (r
->driver_name
) {
8423 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8424 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8425 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8426 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8428 if (r
->architecture
) {
8429 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8430 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8431 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8432 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8434 if (r
->driver_path
) {
8435 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8436 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8438 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8441 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8442 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8443 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8444 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8446 if (r
->config_file
) {
8447 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8448 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8449 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8450 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8453 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
8454 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8455 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
8456 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->help_file
, ndr_charset_length(r
->help_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8458 if (r
->monitor_name
) {
8459 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
8460 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8461 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
8462 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->monitor_name
, ndr_charset_length(r
->monitor_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8464 if (r
->default_datatype
) {
8465 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
8466 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8467 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
8468 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->default_datatype
, ndr_charset_length(r
->default_datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8470 if (r
->dependent_files
) {
8471 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
8473 if (r
->previous_names
) {
8474 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
8476 if (r
->manufacturer_name
) {
8477 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
)));
8478 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8479 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
)));
8480 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->manufacturer_name
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8482 if (r
->manufacturer_url
) {
8483 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
)));
8484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8485 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
)));
8486 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->manufacturer_url
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8488 if (r
->hardware_id
) {
8489 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->hardware_id
, CH_UTF16
)));
8490 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8491 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->hardware_id
, CH_UTF16
)));
8492 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hardware_id
, ndr_charset_length(r
->hardware_id
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8495 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->provider
, CH_UTF16
)));
8496 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8497 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->provider
, CH_UTF16
)));
8498 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->provider
, ndr_charset_length(r
->provider
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8501 return NDR_ERR_SUCCESS
;
8504 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo6
*r
)
8506 uint32_t _ptr_driver_name
;
8507 TALLOC_CTX
*_mem_save_driver_name_0
;
8508 uint32_t _ptr_architecture
;
8509 TALLOC_CTX
*_mem_save_architecture_0
;
8510 uint32_t _ptr_driver_path
;
8511 TALLOC_CTX
*_mem_save_driver_path_0
;
8512 uint32_t _ptr_data_file
;
8513 TALLOC_CTX
*_mem_save_data_file_0
;
8514 uint32_t _ptr_config_file
;
8515 TALLOC_CTX
*_mem_save_config_file_0
;
8516 uint32_t _ptr_help_file
;
8517 TALLOC_CTX
*_mem_save_help_file_0
;
8518 uint32_t _ptr_monitor_name
;
8519 TALLOC_CTX
*_mem_save_monitor_name_0
;
8520 uint32_t _ptr_default_datatype
;
8521 TALLOC_CTX
*_mem_save_default_datatype_0
;
8522 uint32_t _ptr_dependent_files
;
8523 TALLOC_CTX
*_mem_save_dependent_files_0
;
8524 uint32_t _ptr_previous_names
;
8525 TALLOC_CTX
*_mem_save_previous_names_0
;
8526 uint32_t _ptr_manufacturer_name
;
8527 TALLOC_CTX
*_mem_save_manufacturer_name_0
;
8528 uint32_t _ptr_manufacturer_url
;
8529 TALLOC_CTX
*_mem_save_manufacturer_url_0
;
8530 uint32_t _ptr_hardware_id
;
8531 TALLOC_CTX
*_mem_save_hardware_id_0
;
8532 uint32_t _ptr_provider
;
8533 TALLOC_CTX
*_mem_save_provider_0
;
8534 if (ndr_flags
& NDR_SCALARS
) {
8535 NDR_CHECK(ndr_pull_align(ndr
, 8));
8536 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
8537 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
8538 if (_ptr_driver_name
) {
8539 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
8541 r
->driver_name
= NULL
;
8543 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
8544 if (_ptr_architecture
) {
8545 NDR_PULL_ALLOC(ndr
, r
->architecture
);
8547 r
->architecture
= NULL
;
8549 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
8550 if (_ptr_driver_path
) {
8551 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
8553 r
->driver_path
= NULL
;
8555 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
8556 if (_ptr_data_file
) {
8557 NDR_PULL_ALLOC(ndr
, r
->data_file
);
8559 r
->data_file
= NULL
;
8561 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
8562 if (_ptr_config_file
) {
8563 NDR_PULL_ALLOC(ndr
, r
->config_file
);
8565 r
->config_file
= NULL
;
8567 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
8568 if (_ptr_help_file
) {
8569 NDR_PULL_ALLOC(ndr
, r
->help_file
);
8571 r
->help_file
= NULL
;
8573 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
8574 if (_ptr_monitor_name
) {
8575 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
8577 r
->monitor_name
= NULL
;
8579 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
8580 if (_ptr_default_datatype
) {
8581 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
8583 r
->default_datatype
= NULL
;
8585 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_dependent_files
));
8586 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
8587 if (_ptr_dependent_files
) {
8588 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
8590 r
->dependent_files
= NULL
;
8592 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_previous_names
));
8593 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
8594 if (_ptr_previous_names
) {
8595 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
8597 r
->previous_names
= NULL
;
8599 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
8600 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
8601 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_name
));
8602 if (_ptr_manufacturer_name
) {
8603 NDR_PULL_ALLOC(ndr
, r
->manufacturer_name
);
8605 r
->manufacturer_name
= NULL
;
8607 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_url
));
8608 if (_ptr_manufacturer_url
) {
8609 NDR_PULL_ALLOC(ndr
, r
->manufacturer_url
);
8611 r
->manufacturer_url
= NULL
;
8613 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hardware_id
));
8614 if (_ptr_hardware_id
) {
8615 NDR_PULL_ALLOC(ndr
, r
->hardware_id
);
8617 r
->hardware_id
= NULL
;
8619 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_provider
));
8620 if (_ptr_provider
) {
8621 NDR_PULL_ALLOC(ndr
, r
->provider
);
8626 if (ndr_flags
& NDR_BUFFERS
) {
8627 if (r
->driver_name
) {
8628 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8629 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
8630 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
8631 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
8632 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
8633 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
));
8635 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
8636 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
8637 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
8639 if (r
->architecture
) {
8640 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8641 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
8642 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
8643 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
8644 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
8645 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
));
8647 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
8648 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
8649 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
8651 if (r
->driver_path
) {
8652 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8653 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
8654 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
8655 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
8656 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
8657 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
));
8659 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
8660 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
8661 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
8664 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8665 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
8666 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
8667 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
8668 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
8669 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
));
8671 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
8672 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
8673 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
8675 if (r
->config_file
) {
8676 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8677 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
8678 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
8679 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
8680 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
8681 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
));
8683 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
8684 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
8685 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
8688 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8689 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
8690 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->help_file
));
8691 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->help_file
));
8692 if (ndr_get_array_length(ndr
, &r
->help_file
) > ndr_get_array_size(ndr
, &r
->help_file
)) {
8693 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
));
8695 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t)));
8696 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->help_file
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t), CH_UTF16
));
8697 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
8699 if (r
->monitor_name
) {
8700 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8701 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
8702 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->monitor_name
));
8703 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->monitor_name
));
8704 if (ndr_get_array_length(ndr
, &r
->monitor_name
) > ndr_get_array_size(ndr
, &r
->monitor_name
)) {
8705 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
));
8707 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t)));
8708 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->monitor_name
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t), CH_UTF16
));
8709 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
8711 if (r
->default_datatype
) {
8712 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8713 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
8714 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->default_datatype
));
8715 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->default_datatype
));
8716 if (ndr_get_array_length(ndr
, &r
->default_datatype
) > ndr_get_array_size(ndr
, &r
->default_datatype
)) {
8717 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
));
8719 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t)));
8720 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->default_datatype
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t), CH_UTF16
));
8721 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
8723 if (r
->dependent_files
) {
8724 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8725 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
8726 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
8727 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
8729 if (r
->previous_names
) {
8730 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8731 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
8732 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
8733 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
8735 if (r
->manufacturer_name
) {
8736 _mem_save_manufacturer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8737 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_name
, 0);
8738 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->manufacturer_name
));
8739 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->manufacturer_name
));
8740 if (ndr_get_array_length(ndr
, &r
->manufacturer_name
) > ndr_get_array_size(ndr
, &r
->manufacturer_name
)) {
8741 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
));
8743 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->manufacturer_name
), sizeof(uint16_t)));
8744 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->manufacturer_name
, ndr_get_array_length(ndr
, &r
->manufacturer_name
), sizeof(uint16_t), CH_UTF16
));
8745 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_name_0
, 0);
8747 if (r
->manufacturer_url
) {
8748 _mem_save_manufacturer_url_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8749 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_url
, 0);
8750 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->manufacturer_url
));
8751 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->manufacturer_url
));
8752 if (ndr_get_array_length(ndr
, &r
->manufacturer_url
) > ndr_get_array_size(ndr
, &r
->manufacturer_url
)) {
8753 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
));
8755 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->manufacturer_url
), sizeof(uint16_t)));
8756 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->manufacturer_url
, ndr_get_array_length(ndr
, &r
->manufacturer_url
), sizeof(uint16_t), CH_UTF16
));
8757 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_url_0
, 0);
8759 if (r
->hardware_id
) {
8760 _mem_save_hardware_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8761 NDR_PULL_SET_MEM_CTX(ndr
, r
->hardware_id
, 0);
8762 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->hardware_id
));
8763 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->hardware_id
));
8764 if (ndr_get_array_length(ndr
, &r
->hardware_id
) > ndr_get_array_size(ndr
, &r
->hardware_id
)) {
8765 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
));
8767 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->hardware_id
), sizeof(uint16_t)));
8768 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hardware_id
, ndr_get_array_length(ndr
, &r
->hardware_id
), sizeof(uint16_t), CH_UTF16
));
8769 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hardware_id_0
, 0);
8772 _mem_save_provider_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8773 NDR_PULL_SET_MEM_CTX(ndr
, r
->provider
, 0);
8774 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->provider
));
8775 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->provider
));
8776 if (ndr_get_array_length(ndr
, &r
->provider
) > ndr_get_array_size(ndr
, &r
->provider
)) {
8777 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
));
8779 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->provider
), sizeof(uint16_t)));
8780 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->provider
, ndr_get_array_length(ndr
, &r
->provider
), sizeof(uint16_t), CH_UTF16
));
8781 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_provider_0
, 0);
8784 return NDR_ERR_SUCCESS
;
8787 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo6(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo6
*r
)
8789 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo6");
8791 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
8792 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
8794 if (r
->driver_name
) {
8795 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
8798 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
8800 if (r
->architecture
) {
8801 ndr_print_string(ndr
, "architecture", r
->architecture
);
8804 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
8806 if (r
->driver_path
) {
8807 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
8810 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
8813 ndr_print_string(ndr
, "data_file", r
->data_file
);
8816 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
8818 if (r
->config_file
) {
8819 ndr_print_string(ndr
, "config_file", r
->config_file
);
8822 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
8825 ndr_print_string(ndr
, "help_file", r
->help_file
);
8828 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
8830 if (r
->monitor_name
) {
8831 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
8834 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
8836 if (r
->default_datatype
) {
8837 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
8840 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
);
8841 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
8843 if (r
->dependent_files
) {
8844 ndr_print_spoolss_StringArray(ndr
, "dependent_files", r
->dependent_files
);
8847 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
);
8848 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
8850 if (r
->previous_names
) {
8851 ndr_print_spoolss_StringArray(ndr
, "previous_names", r
->previous_names
);
8854 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
8855 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
8856 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
8858 if (r
->manufacturer_name
) {
8859 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
8862 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
8864 if (r
->manufacturer_url
) {
8865 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
8868 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
8870 if (r
->hardware_id
) {
8871 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
8874 ndr_print_ptr(ndr
, "provider", r
->provider
);
8877 ndr_print_string(ndr
, "provider", r
->provider
);
8883 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo8
*r
)
8885 if (ndr_flags
& NDR_SCALARS
) {
8886 NDR_CHECK(ndr_push_align(ndr
, 8));
8887 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
8888 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
8889 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
8890 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
8891 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
8892 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
8893 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->help_file
));
8894 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->monitor_name
));
8895 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->default_datatype
));
8896 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->dependent_files
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8897 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependent_files
));
8898 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->previous_names
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8899 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->previous_names
));
8900 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
8901 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
8902 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->manufacturer_name
));
8903 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->manufacturer_url
));
8904 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->hardware_id
));
8905 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->provider
));
8906 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->print_processor
));
8907 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->vendor_setup
));
8908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->color_profiles
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8909 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->color_profiles
));
8910 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->inf_path
));
8911 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->printer_driver_attributes
));
8912 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->core_driver_dependencies
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8913 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->core_driver_dependencies
));
8914 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->min_inbox_driver_ver_date
));
8915 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->min_inbox_driver_ver_version
));
8917 if (ndr_flags
& NDR_BUFFERS
) {
8918 if (r
->driver_name
) {
8919 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8920 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8921 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8922 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8924 if (r
->architecture
) {
8925 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8926 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8927 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8928 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8930 if (r
->driver_path
) {
8931 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8932 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8933 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8934 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8937 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8939 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8940 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8942 if (r
->config_file
) {
8943 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8944 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8945 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8946 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8949 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
8950 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8951 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
8952 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->help_file
, ndr_charset_length(r
->help_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8954 if (r
->monitor_name
) {
8955 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
8956 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8957 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
8958 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->monitor_name
, ndr_charset_length(r
->monitor_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8960 if (r
->default_datatype
) {
8961 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
8962 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8963 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
8964 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->default_datatype
, ndr_charset_length(r
->default_datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8966 if (r
->dependent_files
) {
8967 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
8969 if (r
->previous_names
) {
8970 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
8972 if (r
->manufacturer_name
) {
8973 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
)));
8974 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8975 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
)));
8976 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->manufacturer_name
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8978 if (r
->manufacturer_url
) {
8979 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
)));
8980 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8981 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
)));
8982 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->manufacturer_url
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8984 if (r
->hardware_id
) {
8985 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->hardware_id
, CH_UTF16
)));
8986 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8987 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->hardware_id
, CH_UTF16
)));
8988 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hardware_id
, ndr_charset_length(r
->hardware_id
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8991 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->provider
, CH_UTF16
)));
8992 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8993 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->provider
, CH_UTF16
)));
8994 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->provider
, ndr_charset_length(r
->provider
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8996 if (r
->print_processor
) {
8997 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
8998 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
8999 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
9000 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->print_processor
, ndr_charset_length(r
->print_processor
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9002 if (r
->vendor_setup
) {
9003 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->vendor_setup
, CH_UTF16
)));
9004 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9005 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->vendor_setup
, CH_UTF16
)));
9006 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->vendor_setup
, ndr_charset_length(r
->vendor_setup
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9008 if (r
->color_profiles
) {
9009 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->color_profiles
));
9012 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->inf_path
, CH_UTF16
)));
9013 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
9014 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->inf_path
, CH_UTF16
)));
9015 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->inf_path
, ndr_charset_length(r
->inf_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9017 if (r
->core_driver_dependencies
) {
9018 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->core_driver_dependencies
));
9021 return NDR_ERR_SUCCESS
;
9024 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo8
*r
)
9026 uint32_t _ptr_driver_name
;
9027 TALLOC_CTX
*_mem_save_driver_name_0
;
9028 uint32_t _ptr_architecture
;
9029 TALLOC_CTX
*_mem_save_architecture_0
;
9030 uint32_t _ptr_driver_path
;
9031 TALLOC_CTX
*_mem_save_driver_path_0
;
9032 uint32_t _ptr_data_file
;
9033 TALLOC_CTX
*_mem_save_data_file_0
;
9034 uint32_t _ptr_config_file
;
9035 TALLOC_CTX
*_mem_save_config_file_0
;
9036 uint32_t _ptr_help_file
;
9037 TALLOC_CTX
*_mem_save_help_file_0
;
9038 uint32_t _ptr_monitor_name
;
9039 TALLOC_CTX
*_mem_save_monitor_name_0
;
9040 uint32_t _ptr_default_datatype
;
9041 TALLOC_CTX
*_mem_save_default_datatype_0
;
9042 uint32_t _ptr_dependent_files
;
9043 TALLOC_CTX
*_mem_save_dependent_files_0
;
9044 uint32_t _ptr_previous_names
;
9045 TALLOC_CTX
*_mem_save_previous_names_0
;
9046 uint32_t _ptr_manufacturer_name
;
9047 TALLOC_CTX
*_mem_save_manufacturer_name_0
;
9048 uint32_t _ptr_manufacturer_url
;
9049 TALLOC_CTX
*_mem_save_manufacturer_url_0
;
9050 uint32_t _ptr_hardware_id
;
9051 TALLOC_CTX
*_mem_save_hardware_id_0
;
9052 uint32_t _ptr_provider
;
9053 TALLOC_CTX
*_mem_save_provider_0
;
9054 uint32_t _ptr_print_processor
;
9055 TALLOC_CTX
*_mem_save_print_processor_0
;
9056 uint32_t _ptr_vendor_setup
;
9057 TALLOC_CTX
*_mem_save_vendor_setup_0
;
9058 uint32_t _ptr_color_profiles
;
9059 TALLOC_CTX
*_mem_save_color_profiles_0
;
9060 uint32_t _ptr_inf_path
;
9061 TALLOC_CTX
*_mem_save_inf_path_0
;
9062 uint32_t _ptr_core_driver_dependencies
;
9063 TALLOC_CTX
*_mem_save_core_driver_dependencies_0
;
9064 if (ndr_flags
& NDR_SCALARS
) {
9065 NDR_CHECK(ndr_pull_align(ndr
, 8));
9066 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
9067 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
9068 if (_ptr_driver_name
) {
9069 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
9071 r
->driver_name
= NULL
;
9073 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
9074 if (_ptr_architecture
) {
9075 NDR_PULL_ALLOC(ndr
, r
->architecture
);
9077 r
->architecture
= NULL
;
9079 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
9080 if (_ptr_driver_path
) {
9081 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
9083 r
->driver_path
= NULL
;
9085 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
9086 if (_ptr_data_file
) {
9087 NDR_PULL_ALLOC(ndr
, r
->data_file
);
9089 r
->data_file
= NULL
;
9091 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
9092 if (_ptr_config_file
) {
9093 NDR_PULL_ALLOC(ndr
, r
->config_file
);
9095 r
->config_file
= NULL
;
9097 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
9098 if (_ptr_help_file
) {
9099 NDR_PULL_ALLOC(ndr
, r
->help_file
);
9101 r
->help_file
= NULL
;
9103 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
9104 if (_ptr_monitor_name
) {
9105 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
9107 r
->monitor_name
= NULL
;
9109 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
9110 if (_ptr_default_datatype
) {
9111 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
9113 r
->default_datatype
= NULL
;
9115 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_dependent_files
));
9116 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
9117 if (_ptr_dependent_files
) {
9118 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
9120 r
->dependent_files
= NULL
;
9122 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_previous_names
));
9123 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
9124 if (_ptr_previous_names
) {
9125 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
9127 r
->previous_names
= NULL
;
9129 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
9130 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
9131 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_name
));
9132 if (_ptr_manufacturer_name
) {
9133 NDR_PULL_ALLOC(ndr
, r
->manufacturer_name
);
9135 r
->manufacturer_name
= NULL
;
9137 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_url
));
9138 if (_ptr_manufacturer_url
) {
9139 NDR_PULL_ALLOC(ndr
, r
->manufacturer_url
);
9141 r
->manufacturer_url
= NULL
;
9143 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hardware_id
));
9144 if (_ptr_hardware_id
) {
9145 NDR_PULL_ALLOC(ndr
, r
->hardware_id
);
9147 r
->hardware_id
= NULL
;
9149 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_provider
));
9150 if (_ptr_provider
) {
9151 NDR_PULL_ALLOC(ndr
, r
->provider
);
9155 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
9156 if (_ptr_print_processor
) {
9157 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
9159 r
->print_processor
= NULL
;
9161 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_vendor_setup
));
9162 if (_ptr_vendor_setup
) {
9163 NDR_PULL_ALLOC(ndr
, r
->vendor_setup
);
9165 r
->vendor_setup
= NULL
;
9167 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_color_profiles
));
9168 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_color_profiles
));
9169 if (_ptr_color_profiles
) {
9170 NDR_PULL_ALLOC(ndr
, r
->color_profiles
);
9172 r
->color_profiles
= NULL
;
9174 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_inf_path
));
9175 if (_ptr_inf_path
) {
9176 NDR_PULL_ALLOC(ndr
, r
->inf_path
);
9180 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->printer_driver_attributes
));
9181 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_core_driver_dependencies
));
9182 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_core_driver_dependencies
));
9183 if (_ptr_core_driver_dependencies
) {
9184 NDR_PULL_ALLOC(ndr
, r
->core_driver_dependencies
);
9186 r
->core_driver_dependencies
= NULL
;
9188 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->min_inbox_driver_ver_date
));
9189 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->min_inbox_driver_ver_version
));
9191 if (ndr_flags
& NDR_BUFFERS
) {
9192 if (r
->driver_name
) {
9193 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9194 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
9195 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
9196 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
9197 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
9198 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
));
9200 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
9201 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
9202 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
9204 if (r
->architecture
) {
9205 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9206 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
9207 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
9208 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
9209 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
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
->architecture
), ndr_get_array_length(ndr
, &r
->architecture
));
9212 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
9213 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
9214 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
9216 if (r
->driver_path
) {
9217 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9218 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
9219 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
9220 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
9221 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
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
->driver_path
), ndr_get_array_length(ndr
, &r
->driver_path
));
9224 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
9225 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
9226 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
9229 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9230 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
9231 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
9232 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
9233 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
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
->data_file
), ndr_get_array_length(ndr
, &r
->data_file
));
9236 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
9237 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
9238 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
9240 if (r
->config_file
) {
9241 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9242 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
9243 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
9244 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
9245 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
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
->config_file
), ndr_get_array_length(ndr
, &r
->config_file
));
9248 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
9249 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
9250 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
9253 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9254 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
9255 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->help_file
));
9256 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->help_file
));
9257 if (ndr_get_array_length(ndr
, &r
->help_file
) > ndr_get_array_size(ndr
, &r
->help_file
)) {
9258 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
));
9260 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t)));
9261 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->help_file
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t), CH_UTF16
));
9262 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
9264 if (r
->monitor_name
) {
9265 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9266 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
9267 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->monitor_name
));
9268 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->monitor_name
));
9269 if (ndr_get_array_length(ndr
, &r
->monitor_name
) > ndr_get_array_size(ndr
, &r
->monitor_name
)) {
9270 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
));
9272 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t)));
9273 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->monitor_name
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t), CH_UTF16
));
9274 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
9276 if (r
->default_datatype
) {
9277 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9278 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
9279 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->default_datatype
));
9280 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->default_datatype
));
9281 if (ndr_get_array_length(ndr
, &r
->default_datatype
) > ndr_get_array_size(ndr
, &r
->default_datatype
)) {
9282 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
));
9284 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t)));
9285 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->default_datatype
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t), CH_UTF16
));
9286 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
9288 if (r
->dependent_files
) {
9289 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9290 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
9291 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
9292 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
9294 if (r
->previous_names
) {
9295 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9296 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
9297 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
9298 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
9300 if (r
->manufacturer_name
) {
9301 _mem_save_manufacturer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9302 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_name
, 0);
9303 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->manufacturer_name
));
9304 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->manufacturer_name
));
9305 if (ndr_get_array_length(ndr
, &r
->manufacturer_name
) > ndr_get_array_size(ndr
, &r
->manufacturer_name
)) {
9306 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
));
9308 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->manufacturer_name
), sizeof(uint16_t)));
9309 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->manufacturer_name
, ndr_get_array_length(ndr
, &r
->manufacturer_name
), sizeof(uint16_t), CH_UTF16
));
9310 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_name_0
, 0);
9312 if (r
->manufacturer_url
) {
9313 _mem_save_manufacturer_url_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9314 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_url
, 0);
9315 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->manufacturer_url
));
9316 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->manufacturer_url
));
9317 if (ndr_get_array_length(ndr
, &r
->manufacturer_url
) > ndr_get_array_size(ndr
, &r
->manufacturer_url
)) {
9318 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
));
9320 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->manufacturer_url
), sizeof(uint16_t)));
9321 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->manufacturer_url
, ndr_get_array_length(ndr
, &r
->manufacturer_url
), sizeof(uint16_t), CH_UTF16
));
9322 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_url_0
, 0);
9324 if (r
->hardware_id
) {
9325 _mem_save_hardware_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9326 NDR_PULL_SET_MEM_CTX(ndr
, r
->hardware_id
, 0);
9327 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->hardware_id
));
9328 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->hardware_id
));
9329 if (ndr_get_array_length(ndr
, &r
->hardware_id
) > ndr_get_array_size(ndr
, &r
->hardware_id
)) {
9330 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
));
9332 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->hardware_id
), sizeof(uint16_t)));
9333 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hardware_id
, ndr_get_array_length(ndr
, &r
->hardware_id
), sizeof(uint16_t), CH_UTF16
));
9334 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hardware_id_0
, 0);
9337 _mem_save_provider_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9338 NDR_PULL_SET_MEM_CTX(ndr
, r
->provider
, 0);
9339 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->provider
));
9340 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->provider
));
9341 if (ndr_get_array_length(ndr
, &r
->provider
) > ndr_get_array_size(ndr
, &r
->provider
)) {
9342 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
));
9344 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->provider
), sizeof(uint16_t)));
9345 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->provider
, ndr_get_array_length(ndr
, &r
->provider
), sizeof(uint16_t), CH_UTF16
));
9346 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_provider_0
, 0);
9348 if (r
->print_processor
) {
9349 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9350 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
9351 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->print_processor
));
9352 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->print_processor
));
9353 if (ndr_get_array_length(ndr
, &r
->print_processor
) > ndr_get_array_size(ndr
, &r
->print_processor
)) {
9354 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
));
9356 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t)));
9357 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->print_processor
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t), CH_UTF16
));
9358 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
9360 if (r
->vendor_setup
) {
9361 _mem_save_vendor_setup_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9362 NDR_PULL_SET_MEM_CTX(ndr
, r
->vendor_setup
, 0);
9363 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->vendor_setup
));
9364 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->vendor_setup
));
9365 if (ndr_get_array_length(ndr
, &r
->vendor_setup
) > ndr_get_array_size(ndr
, &r
->vendor_setup
)) {
9366 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
));
9368 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->vendor_setup
), sizeof(uint16_t)));
9369 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->vendor_setup
, ndr_get_array_length(ndr
, &r
->vendor_setup
), sizeof(uint16_t), CH_UTF16
));
9370 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_vendor_setup_0
, 0);
9372 if (r
->color_profiles
) {
9373 _mem_save_color_profiles_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9374 NDR_PULL_SET_MEM_CTX(ndr
, r
->color_profiles
, 0);
9375 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->color_profiles
));
9376 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_color_profiles_0
, 0);
9379 _mem_save_inf_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9380 NDR_PULL_SET_MEM_CTX(ndr
, r
->inf_path
, 0);
9381 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->inf_path
));
9382 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->inf_path
));
9383 if (ndr_get_array_length(ndr
, &r
->inf_path
) > ndr_get_array_size(ndr
, &r
->inf_path
)) {
9384 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
));
9386 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->inf_path
), sizeof(uint16_t)));
9387 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->inf_path
, ndr_get_array_length(ndr
, &r
->inf_path
), sizeof(uint16_t), CH_UTF16
));
9388 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_inf_path_0
, 0);
9390 if (r
->core_driver_dependencies
) {
9391 _mem_save_core_driver_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9392 NDR_PULL_SET_MEM_CTX(ndr
, r
->core_driver_dependencies
, 0);
9393 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->core_driver_dependencies
));
9394 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_core_driver_dependencies_0
, 0);
9397 return NDR_ERR_SUCCESS
;
9400 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo8(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo8
*r
)
9402 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo8");
9404 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
9405 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
9407 if (r
->driver_name
) {
9408 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
9411 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
9413 if (r
->architecture
) {
9414 ndr_print_string(ndr
, "architecture", r
->architecture
);
9417 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
9419 if (r
->driver_path
) {
9420 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
9423 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
9426 ndr_print_string(ndr
, "data_file", r
->data_file
);
9429 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
9431 if (r
->config_file
) {
9432 ndr_print_string(ndr
, "config_file", r
->config_file
);
9435 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
9438 ndr_print_string(ndr
, "help_file", r
->help_file
);
9441 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
9443 if (r
->monitor_name
) {
9444 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
9447 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
9449 if (r
->default_datatype
) {
9450 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
9453 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
);
9454 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
9456 if (r
->dependent_files
) {
9457 ndr_print_spoolss_StringArray(ndr
, "dependent_files", r
->dependent_files
);
9460 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
);
9461 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
9463 if (r
->previous_names
) {
9464 ndr_print_spoolss_StringArray(ndr
, "previous_names", r
->previous_names
);
9467 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
9468 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
9469 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
9471 if (r
->manufacturer_name
) {
9472 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
9475 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
9477 if (r
->manufacturer_url
) {
9478 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
9481 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
9483 if (r
->hardware_id
) {
9484 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
9487 ndr_print_ptr(ndr
, "provider", r
->provider
);
9490 ndr_print_string(ndr
, "provider", r
->provider
);
9493 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
9495 if (r
->print_processor
) {
9496 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
9499 ndr_print_ptr(ndr
, "vendor_setup", r
->vendor_setup
);
9501 if (r
->vendor_setup
) {
9502 ndr_print_string(ndr
, "vendor_setup", r
->vendor_setup
);
9505 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
);
9506 ndr_print_ptr(ndr
, "color_profiles", r
->color_profiles
);
9508 if (r
->color_profiles
) {
9509 ndr_print_spoolss_StringArray(ndr
, "color_profiles", r
->color_profiles
);
9512 ndr_print_ptr(ndr
, "inf_path", r
->inf_path
);
9515 ndr_print_string(ndr
, "inf_path", r
->inf_path
);
9518 ndr_print_uint32(ndr
, "printer_driver_attributes", r
->printer_driver_attributes
);
9519 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
);
9520 ndr_print_ptr(ndr
, "core_driver_dependencies", r
->core_driver_dependencies
);
9522 if (r
->core_driver_dependencies
) {
9523 ndr_print_spoolss_StringArray(ndr
, "core_driver_dependencies", r
->core_driver_dependencies
);
9526 ndr_print_NTTIME(ndr
, "min_inbox_driver_ver_date", r
->min_inbox_driver_ver_date
);
9527 ndr_print_hyper(ndr
, "min_inbox_driver_ver_version", r
->min_inbox_driver_ver_version
);
9531 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_AddDriverInfo
*r
)
9533 if (ndr_flags
& NDR_SCALARS
) {
9534 int level
= ndr_push_get_switch_value(ndr
, r
);
9535 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
9538 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
9542 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
9546 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
9550 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
9554 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
9558 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info8
));
9562 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
9565 if (ndr_flags
& NDR_BUFFERS
) {
9566 int level
= ndr_push_get_switch_value(ndr
, r
);
9570 NDR_CHECK(ndr_push_spoolss_AddDriverInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
9576 NDR_CHECK(ndr_push_spoolss_AddDriverInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
9582 NDR_CHECK(ndr_push_spoolss_AddDriverInfo3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
9588 NDR_CHECK(ndr_push_spoolss_AddDriverInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
9594 NDR_CHECK(ndr_push_spoolss_AddDriverInfo6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
9600 NDR_CHECK(ndr_push_spoolss_AddDriverInfo8(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info8
));
9605 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
9608 return NDR_ERR_SUCCESS
;
9611 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_AddDriverInfo
*r
)
9615 TALLOC_CTX
*_mem_save_info1_0
;
9616 TALLOC_CTX
*_mem_save_info2_0
;
9617 TALLOC_CTX
*_mem_save_info3_0
;
9618 TALLOC_CTX
*_mem_save_info4_0
;
9619 TALLOC_CTX
*_mem_save_info6_0
;
9620 TALLOC_CTX
*_mem_save_info8_0
;
9621 level
= ndr_pull_get_switch_value(ndr
, r
);
9622 if (ndr_flags
& NDR_SCALARS
) {
9623 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
9624 if (_level
!= level
) {
9625 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
9629 uint32_t _ptr_info1
;
9630 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
9632 NDR_PULL_ALLOC(ndr
, r
->info1
);
9639 uint32_t _ptr_info2
;
9640 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
9642 NDR_PULL_ALLOC(ndr
, r
->info2
);
9649 uint32_t _ptr_info3
;
9650 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
9652 NDR_PULL_ALLOC(ndr
, r
->info3
);
9659 uint32_t _ptr_info4
;
9660 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
9662 NDR_PULL_ALLOC(ndr
, r
->info4
);
9669 uint32_t _ptr_info6
;
9670 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
9672 NDR_PULL_ALLOC(ndr
, r
->info6
);
9679 uint32_t _ptr_info8
;
9680 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info8
));
9682 NDR_PULL_ALLOC(ndr
, r
->info8
);
9689 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
9692 if (ndr_flags
& NDR_BUFFERS
) {
9696 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9697 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
9698 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
9699 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
9705 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9706 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
9707 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
9708 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
9714 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9715 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
9716 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
9717 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
9723 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9724 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
9725 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
9726 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
9732 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9733 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
9734 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
9735 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
9741 _mem_save_info8_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9742 NDR_PULL_SET_MEM_CTX(ndr
, r
->info8
, 0);
9743 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo8(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info8
));
9744 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info8_0
, 0);
9749 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
9752 return NDR_ERR_SUCCESS
;
9755 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_AddDriverInfo
*r
)
9758 level
= ndr_print_get_switch_value(ndr
, r
);
9759 ndr_print_union(ndr
, name
, level
, "spoolss_AddDriverInfo");
9762 ndr_print_ptr(ndr
, "info1", r
->info1
);
9765 ndr_print_spoolss_AddDriverInfo1(ndr
, "info1", r
->info1
);
9771 ndr_print_ptr(ndr
, "info2", r
->info2
);
9774 ndr_print_spoolss_AddDriverInfo2(ndr
, "info2", r
->info2
);
9780 ndr_print_ptr(ndr
, "info3", r
->info3
);
9783 ndr_print_spoolss_AddDriverInfo3(ndr
, "info3", r
->info3
);
9789 ndr_print_ptr(ndr
, "info4", r
->info4
);
9792 ndr_print_spoolss_AddDriverInfo4(ndr
, "info4", r
->info4
);
9798 ndr_print_ptr(ndr
, "info6", r
->info6
);
9801 ndr_print_spoolss_AddDriverInfo6(ndr
, "info6", r
->info6
);
9807 ndr_print_ptr(ndr
, "info8", r
->info8
);
9810 ndr_print_spoolss_AddDriverInfo8(ndr
, "info8", r
->info8
);
9816 ndr_print_bad_level(ndr
, name
, level
);
9820 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfoCtr
*r
)
9822 if (ndr_flags
& NDR_SCALARS
) {
9823 NDR_CHECK(ndr_push_align(ndr
, 4));
9824 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
9825 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->level
));
9826 NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr
, NDR_SCALARS
, &r
->info
));
9828 if (ndr_flags
& NDR_BUFFERS
) {
9829 NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr
, NDR_BUFFERS
, &r
->info
));
9831 return NDR_ERR_SUCCESS
;
9834 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfoCtr
*r
)
9836 if (ndr_flags
& NDR_SCALARS
) {
9837 NDR_CHECK(ndr_pull_align(ndr
, 4));
9838 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
9839 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->level
));
9840 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr
, NDR_SCALARS
, &r
->info
));
9842 if (ndr_flags
& NDR_BUFFERS
) {
9843 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr
, NDR_BUFFERS
, &r
->info
));
9845 return NDR_ERR_SUCCESS
;
9848 _PUBLIC_
void ndr_print_spoolss_AddDriverInfoCtr(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfoCtr
*r
)
9850 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfoCtr");
9852 ndr_print_uint32(ndr
, "level", r
->level
);
9853 ndr_print_set_switch_value(ndr
, &r
->info
, r
->level
);
9854 ndr_print_spoolss_AddDriverInfo(ndr
, "info", &r
->info
);
9858 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo1
*r
)
9860 if (ndr_flags
& NDR_SCALARS
) {
9861 NDR_CHECK(ndr_push_align(ndr
, 4));
9863 uint32_t _flags_save_string
= ndr
->flags
;
9864 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9865 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
9866 ndr
->flags
= _flags_save_string
;
9869 if (ndr_flags
& NDR_BUFFERS
) {
9871 uint32_t _flags_save_string
= ndr
->flags
;
9872 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9873 if (r
->driver_name
) {
9874 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
9875 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
9877 ndr
->flags
= _flags_save_string
;
9880 return NDR_ERR_SUCCESS
;
9883 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo1
*r
)
9885 uint32_t _ptr_driver_name
;
9886 TALLOC_CTX
*_mem_save_driver_name_0
;
9887 if (ndr_flags
& NDR_SCALARS
) {
9888 NDR_CHECK(ndr_pull_align(ndr
, 4));
9890 uint32_t _flags_save_string
= ndr
->flags
;
9891 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9892 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
9893 if (_ptr_driver_name
) {
9894 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
9895 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
9897 r
->driver_name
= NULL
;
9899 ndr
->flags
= _flags_save_string
;
9902 if (ndr_flags
& NDR_BUFFERS
) {
9904 uint32_t _flags_save_string
= ndr
->flags
;
9905 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9906 if (r
->driver_name
) {
9907 uint32_t _relative_save_offset
;
9908 _relative_save_offset
= ndr
->offset
;
9909 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
9910 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9911 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
9912 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
9913 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
9914 ndr
->offset
= _relative_save_offset
;
9916 ndr
->flags
= _flags_save_string
;
9919 return NDR_ERR_SUCCESS
;
9922 _PUBLIC_
void ndr_print_spoolss_DriverInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo1
*r
)
9924 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo1");
9926 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
9928 if (r
->driver_name
) {
9929 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
9935 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo1(const struct spoolss_DriverInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
9937 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo1
, ic
);
9940 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo2
*r
)
9942 if (ndr_flags
& NDR_SCALARS
) {
9943 NDR_CHECK(ndr_push_align(ndr
, 4));
9944 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
9946 uint32_t _flags_save_string
= ndr
->flags
;
9947 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9948 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
9949 ndr
->flags
= _flags_save_string
;
9952 uint32_t _flags_save_string
= ndr
->flags
;
9953 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9954 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
9955 ndr
->flags
= _flags_save_string
;
9958 uint32_t _flags_save_string
= ndr
->flags
;
9959 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9960 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
9961 ndr
->flags
= _flags_save_string
;
9964 uint32_t _flags_save_string
= ndr
->flags
;
9965 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9966 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
9967 ndr
->flags
= _flags_save_string
;
9970 uint32_t _flags_save_string
= ndr
->flags
;
9971 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9972 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
9973 ndr
->flags
= _flags_save_string
;
9976 if (ndr_flags
& NDR_BUFFERS
) {
9978 uint32_t _flags_save_string
= ndr
->flags
;
9979 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9980 if (r
->driver_name
) {
9981 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
9982 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
9984 ndr
->flags
= _flags_save_string
;
9987 uint32_t _flags_save_string
= ndr
->flags
;
9988 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9989 if (r
->architecture
) {
9990 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->architecture
));
9991 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
9993 ndr
->flags
= _flags_save_string
;
9996 uint32_t _flags_save_string
= ndr
->flags
;
9997 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
9998 if (r
->driver_path
) {
9999 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_path
));
10000 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
10002 ndr
->flags
= _flags_save_string
;
10005 uint32_t _flags_save_string
= ndr
->flags
;
10006 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10007 if (r
->data_file
) {
10008 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_file
));
10009 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
10011 ndr
->flags
= _flags_save_string
;
10014 uint32_t _flags_save_string
= ndr
->flags
;
10015 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10016 if (r
->config_file
) {
10017 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->config_file
));
10018 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
10020 ndr
->flags
= _flags_save_string
;
10023 return NDR_ERR_SUCCESS
;
10026 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo2
*r
)
10028 uint32_t _ptr_driver_name
;
10029 TALLOC_CTX
*_mem_save_driver_name_0
;
10030 uint32_t _ptr_architecture
;
10031 TALLOC_CTX
*_mem_save_architecture_0
;
10032 uint32_t _ptr_driver_path
;
10033 TALLOC_CTX
*_mem_save_driver_path_0
;
10034 uint32_t _ptr_data_file
;
10035 TALLOC_CTX
*_mem_save_data_file_0
;
10036 uint32_t _ptr_config_file
;
10037 TALLOC_CTX
*_mem_save_config_file_0
;
10038 if (ndr_flags
& NDR_SCALARS
) {
10039 NDR_CHECK(ndr_pull_align(ndr
, 4));
10040 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
10042 uint32_t _flags_save_string
= ndr
->flags
;
10043 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10044 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
10045 if (_ptr_driver_name
) {
10046 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
10047 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
10049 r
->driver_name
= NULL
;
10051 ndr
->flags
= _flags_save_string
;
10054 uint32_t _flags_save_string
= ndr
->flags
;
10055 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10056 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
10057 if (_ptr_architecture
) {
10058 NDR_PULL_ALLOC(ndr
, r
->architecture
);
10059 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
10061 r
->architecture
= NULL
;
10063 ndr
->flags
= _flags_save_string
;
10066 uint32_t _flags_save_string
= ndr
->flags
;
10067 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10068 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
10069 if (_ptr_driver_path
) {
10070 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
10071 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
10073 r
->driver_path
= NULL
;
10075 ndr
->flags
= _flags_save_string
;
10078 uint32_t _flags_save_string
= ndr
->flags
;
10079 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10080 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
10081 if (_ptr_data_file
) {
10082 NDR_PULL_ALLOC(ndr
, r
->data_file
);
10083 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
10085 r
->data_file
= NULL
;
10087 ndr
->flags
= _flags_save_string
;
10090 uint32_t _flags_save_string
= ndr
->flags
;
10091 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10092 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
10093 if (_ptr_config_file
) {
10094 NDR_PULL_ALLOC(ndr
, r
->config_file
);
10095 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
10097 r
->config_file
= NULL
;
10099 ndr
->flags
= _flags_save_string
;
10102 if (ndr_flags
& NDR_BUFFERS
) {
10104 uint32_t _flags_save_string
= ndr
->flags
;
10105 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10106 if (r
->driver_name
) {
10107 uint32_t _relative_save_offset
;
10108 _relative_save_offset
= ndr
->offset
;
10109 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
10110 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10111 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
10112 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
10113 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
10114 ndr
->offset
= _relative_save_offset
;
10116 ndr
->flags
= _flags_save_string
;
10119 uint32_t _flags_save_string
= ndr
->flags
;
10120 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10121 if (r
->architecture
) {
10122 uint32_t _relative_save_offset
;
10123 _relative_save_offset
= ndr
->offset
;
10124 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
10125 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10126 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
10127 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
10128 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
10129 ndr
->offset
= _relative_save_offset
;
10131 ndr
->flags
= _flags_save_string
;
10134 uint32_t _flags_save_string
= ndr
->flags
;
10135 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10136 if (r
->driver_path
) {
10137 uint32_t _relative_save_offset
;
10138 _relative_save_offset
= ndr
->offset
;
10139 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
10140 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10141 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
10142 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
10143 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
10144 ndr
->offset
= _relative_save_offset
;
10146 ndr
->flags
= _flags_save_string
;
10149 uint32_t _flags_save_string
= ndr
->flags
;
10150 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10151 if (r
->data_file
) {
10152 uint32_t _relative_save_offset
;
10153 _relative_save_offset
= ndr
->offset
;
10154 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
10155 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10156 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
10157 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
10158 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
10159 ndr
->offset
= _relative_save_offset
;
10161 ndr
->flags
= _flags_save_string
;
10164 uint32_t _flags_save_string
= ndr
->flags
;
10165 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10166 if (r
->config_file
) {
10167 uint32_t _relative_save_offset
;
10168 _relative_save_offset
= ndr
->offset
;
10169 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
10170 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10171 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
10172 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
10173 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
10174 ndr
->offset
= _relative_save_offset
;
10176 ndr
->flags
= _flags_save_string
;
10179 return NDR_ERR_SUCCESS
;
10182 _PUBLIC_
void ndr_print_spoolss_DriverInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo2
*r
)
10184 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo2");
10186 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
10187 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
10189 if (r
->driver_name
) {
10190 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
10193 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
10195 if (r
->architecture
) {
10196 ndr_print_string(ndr
, "architecture", r
->architecture
);
10199 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
10201 if (r
->driver_path
) {
10202 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
10205 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
10207 if (r
->data_file
) {
10208 ndr_print_string(ndr
, "data_file", r
->data_file
);
10211 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
10213 if (r
->config_file
) {
10214 ndr_print_string(ndr
, "config_file", r
->config_file
);
10220 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo2(const struct spoolss_DriverInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
10222 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo2
, ic
);
10225 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo3
*r
)
10227 if (ndr_flags
& NDR_SCALARS
) {
10228 NDR_CHECK(ndr_push_align(ndr
, 4));
10229 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
10231 uint32_t _flags_save_string
= ndr
->flags
;
10232 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10233 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
10234 ndr
->flags
= _flags_save_string
;
10237 uint32_t _flags_save_string
= ndr
->flags
;
10238 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10239 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
10240 ndr
->flags
= _flags_save_string
;
10243 uint32_t _flags_save_string
= ndr
->flags
;
10244 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10245 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
10246 ndr
->flags
= _flags_save_string
;
10249 uint32_t _flags_save_string
= ndr
->flags
;
10250 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10251 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
10252 ndr
->flags
= _flags_save_string
;
10255 uint32_t _flags_save_string
= ndr
->flags
;
10256 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10257 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
10258 ndr
->flags
= _flags_save_string
;
10261 uint32_t _flags_save_string
= ndr
->flags
;
10262 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10263 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->help_file
));
10264 ndr
->flags
= _flags_save_string
;
10267 uint32_t _flags_save_string_array
= ndr
->flags
;
10268 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10269 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dependent_files
));
10270 ndr
->flags
= _flags_save_string_array
;
10273 uint32_t _flags_save_string
= ndr
->flags
;
10274 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10275 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
10276 ndr
->flags
= _flags_save_string
;
10279 uint32_t _flags_save_string
= ndr
->flags
;
10280 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10281 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->default_datatype
));
10282 ndr
->flags
= _flags_save_string
;
10285 if (ndr_flags
& NDR_BUFFERS
) {
10287 uint32_t _flags_save_string
= ndr
->flags
;
10288 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10289 if (r
->driver_name
) {
10290 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
10291 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
10293 ndr
->flags
= _flags_save_string
;
10296 uint32_t _flags_save_string
= ndr
->flags
;
10297 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10298 if (r
->architecture
) {
10299 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->architecture
));
10300 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
10302 ndr
->flags
= _flags_save_string
;
10305 uint32_t _flags_save_string
= ndr
->flags
;
10306 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10307 if (r
->driver_path
) {
10308 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_path
));
10309 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
10311 ndr
->flags
= _flags_save_string
;
10314 uint32_t _flags_save_string
= ndr
->flags
;
10315 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10316 if (r
->data_file
) {
10317 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_file
));
10318 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
10320 ndr
->flags
= _flags_save_string
;
10323 uint32_t _flags_save_string
= ndr
->flags
;
10324 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10325 if (r
->config_file
) {
10326 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->config_file
));
10327 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
10329 ndr
->flags
= _flags_save_string
;
10332 uint32_t _flags_save_string
= ndr
->flags
;
10333 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10334 if (r
->help_file
) {
10335 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->help_file
));
10336 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->help_file
));
10338 ndr
->flags
= _flags_save_string
;
10341 uint32_t _flags_save_string_array
= ndr
->flags
;
10342 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10343 if (r
->dependent_files
) {
10344 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->dependent_files
));
10345 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->dependent_files
));
10347 ndr
->flags
= _flags_save_string_array
;
10350 uint32_t _flags_save_string
= ndr
->flags
;
10351 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10352 if (r
->monitor_name
) {
10353 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->monitor_name
));
10354 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
10356 ndr
->flags
= _flags_save_string
;
10359 uint32_t _flags_save_string
= ndr
->flags
;
10360 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10361 if (r
->default_datatype
) {
10362 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->default_datatype
));
10363 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->default_datatype
));
10365 ndr
->flags
= _flags_save_string
;
10368 return NDR_ERR_SUCCESS
;
10371 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo3
*r
)
10373 uint32_t _ptr_driver_name
;
10374 TALLOC_CTX
*_mem_save_driver_name_0
;
10375 uint32_t _ptr_architecture
;
10376 TALLOC_CTX
*_mem_save_architecture_0
;
10377 uint32_t _ptr_driver_path
;
10378 TALLOC_CTX
*_mem_save_driver_path_0
;
10379 uint32_t _ptr_data_file
;
10380 TALLOC_CTX
*_mem_save_data_file_0
;
10381 uint32_t _ptr_config_file
;
10382 TALLOC_CTX
*_mem_save_config_file_0
;
10383 uint32_t _ptr_help_file
;
10384 TALLOC_CTX
*_mem_save_help_file_0
;
10385 uint32_t _ptr_dependent_files
;
10386 TALLOC_CTX
*_mem_save_dependent_files_0
;
10387 uint32_t _ptr_monitor_name
;
10388 TALLOC_CTX
*_mem_save_monitor_name_0
;
10389 uint32_t _ptr_default_datatype
;
10390 TALLOC_CTX
*_mem_save_default_datatype_0
;
10391 if (ndr_flags
& NDR_SCALARS
) {
10392 NDR_CHECK(ndr_pull_align(ndr
, 4));
10393 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
10395 uint32_t _flags_save_string
= ndr
->flags
;
10396 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10397 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
10398 if (_ptr_driver_name
) {
10399 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
10400 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
10402 r
->driver_name
= NULL
;
10404 ndr
->flags
= _flags_save_string
;
10407 uint32_t _flags_save_string
= ndr
->flags
;
10408 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10409 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
10410 if (_ptr_architecture
) {
10411 NDR_PULL_ALLOC(ndr
, r
->architecture
);
10412 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
10414 r
->architecture
= NULL
;
10416 ndr
->flags
= _flags_save_string
;
10419 uint32_t _flags_save_string
= ndr
->flags
;
10420 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10421 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
10422 if (_ptr_driver_path
) {
10423 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
10424 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
10426 r
->driver_path
= NULL
;
10428 ndr
->flags
= _flags_save_string
;
10431 uint32_t _flags_save_string
= ndr
->flags
;
10432 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10433 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
10434 if (_ptr_data_file
) {
10435 NDR_PULL_ALLOC(ndr
, r
->data_file
);
10436 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
10438 r
->data_file
= NULL
;
10440 ndr
->flags
= _flags_save_string
;
10443 uint32_t _flags_save_string
= ndr
->flags
;
10444 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10445 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
10446 if (_ptr_config_file
) {
10447 NDR_PULL_ALLOC(ndr
, r
->config_file
);
10448 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
10450 r
->config_file
= NULL
;
10452 ndr
->flags
= _flags_save_string
;
10455 uint32_t _flags_save_string
= ndr
->flags
;
10456 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10457 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
10458 if (_ptr_help_file
) {
10459 NDR_PULL_ALLOC(ndr
, r
->help_file
);
10460 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->help_file
, _ptr_help_file
));
10462 r
->help_file
= NULL
;
10464 ndr
->flags
= _flags_save_string
;
10467 uint32_t _flags_save_string_array
= ndr
->flags
;
10468 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10469 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
10470 if (_ptr_dependent_files
) {
10471 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
10472 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dependent_files
, _ptr_dependent_files
));
10474 r
->dependent_files
= NULL
;
10476 ndr
->flags
= _flags_save_string_array
;
10479 uint32_t _flags_save_string
= ndr
->flags
;
10480 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10481 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
10482 if (_ptr_monitor_name
) {
10483 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
10484 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
10486 r
->monitor_name
= NULL
;
10488 ndr
->flags
= _flags_save_string
;
10491 uint32_t _flags_save_string
= ndr
->flags
;
10492 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10493 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
10494 if (_ptr_default_datatype
) {
10495 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
10496 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->default_datatype
, _ptr_default_datatype
));
10498 r
->default_datatype
= NULL
;
10500 ndr
->flags
= _flags_save_string
;
10503 if (ndr_flags
& NDR_BUFFERS
) {
10505 uint32_t _flags_save_string
= ndr
->flags
;
10506 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10507 if (r
->driver_name
) {
10508 uint32_t _relative_save_offset
;
10509 _relative_save_offset
= ndr
->offset
;
10510 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
10511 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10512 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
10513 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
10514 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
10515 ndr
->offset
= _relative_save_offset
;
10517 ndr
->flags
= _flags_save_string
;
10520 uint32_t _flags_save_string
= ndr
->flags
;
10521 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10522 if (r
->architecture
) {
10523 uint32_t _relative_save_offset
;
10524 _relative_save_offset
= ndr
->offset
;
10525 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
10526 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10527 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
10528 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
10529 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
10530 ndr
->offset
= _relative_save_offset
;
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 if (r
->driver_path
) {
10538 uint32_t _relative_save_offset
;
10539 _relative_save_offset
= ndr
->offset
;
10540 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
10541 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10542 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
10543 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
10544 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
10545 ndr
->offset
= _relative_save_offset
;
10547 ndr
->flags
= _flags_save_string
;
10550 uint32_t _flags_save_string
= ndr
->flags
;
10551 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10552 if (r
->data_file
) {
10553 uint32_t _relative_save_offset
;
10554 _relative_save_offset
= ndr
->offset
;
10555 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
10556 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10557 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
10558 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
10559 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
10560 ndr
->offset
= _relative_save_offset
;
10562 ndr
->flags
= _flags_save_string
;
10565 uint32_t _flags_save_string
= ndr
->flags
;
10566 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10567 if (r
->config_file
) {
10568 uint32_t _relative_save_offset
;
10569 _relative_save_offset
= ndr
->offset
;
10570 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
10571 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10572 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
10573 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
10574 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
10575 ndr
->offset
= _relative_save_offset
;
10577 ndr
->flags
= _flags_save_string
;
10580 uint32_t _flags_save_string
= ndr
->flags
;
10581 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10582 if (r
->help_file
) {
10583 uint32_t _relative_save_offset
;
10584 _relative_save_offset
= ndr
->offset
;
10585 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->help_file
));
10586 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10587 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
10588 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->help_file
));
10589 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
10590 ndr
->offset
= _relative_save_offset
;
10592 ndr
->flags
= _flags_save_string
;
10595 uint32_t _flags_save_string_array
= ndr
->flags
;
10596 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10597 if (r
->dependent_files
) {
10598 uint32_t _relative_save_offset
;
10599 _relative_save_offset
= ndr
->offset
;
10600 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dependent_files
));
10601 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10602 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
10603 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->dependent_files
));
10604 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
10605 ndr
->offset
= _relative_save_offset
;
10607 ndr
->flags
= _flags_save_string_array
;
10610 uint32_t _flags_save_string
= ndr
->flags
;
10611 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10612 if (r
->monitor_name
) {
10613 uint32_t _relative_save_offset
;
10614 _relative_save_offset
= ndr
->offset
;
10615 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
10616 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10617 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
10618 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
10619 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
10620 ndr
->offset
= _relative_save_offset
;
10622 ndr
->flags
= _flags_save_string
;
10625 uint32_t _flags_save_string
= ndr
->flags
;
10626 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10627 if (r
->default_datatype
) {
10628 uint32_t _relative_save_offset
;
10629 _relative_save_offset
= ndr
->offset
;
10630 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->default_datatype
));
10631 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10632 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
10633 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->default_datatype
));
10634 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
10635 ndr
->offset
= _relative_save_offset
;
10637 ndr
->flags
= _flags_save_string
;
10640 return NDR_ERR_SUCCESS
;
10643 _PUBLIC_
void ndr_print_spoolss_DriverInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo3
*r
)
10645 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo3");
10647 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
10648 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
10650 if (r
->driver_name
) {
10651 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
10654 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
10656 if (r
->architecture
) {
10657 ndr_print_string(ndr
, "architecture", r
->architecture
);
10660 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
10662 if (r
->driver_path
) {
10663 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
10666 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
10668 if (r
->data_file
) {
10669 ndr_print_string(ndr
, "data_file", r
->data_file
);
10672 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
10674 if (r
->config_file
) {
10675 ndr_print_string(ndr
, "config_file", r
->config_file
);
10678 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
10680 if (r
->help_file
) {
10681 ndr_print_string(ndr
, "help_file", r
->help_file
);
10684 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
10686 if (r
->dependent_files
) {
10687 ndr_print_string_array(ndr
, "dependent_files", r
->dependent_files
);
10690 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
10692 if (r
->monitor_name
) {
10693 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
10696 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
10698 if (r
->default_datatype
) {
10699 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
10705 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo3(const struct spoolss_DriverInfo3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
10707 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo3
, ic
);
10710 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo4
*r
)
10712 if (ndr_flags
& NDR_SCALARS
) {
10713 NDR_CHECK(ndr_push_align(ndr
, 4));
10714 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
10716 uint32_t _flags_save_string
= ndr
->flags
;
10717 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10718 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
10719 ndr
->flags
= _flags_save_string
;
10722 uint32_t _flags_save_string
= ndr
->flags
;
10723 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10724 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
10725 ndr
->flags
= _flags_save_string
;
10728 uint32_t _flags_save_string
= ndr
->flags
;
10729 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10730 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
10731 ndr
->flags
= _flags_save_string
;
10734 uint32_t _flags_save_string
= ndr
->flags
;
10735 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10736 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
10737 ndr
->flags
= _flags_save_string
;
10740 uint32_t _flags_save_string
= ndr
->flags
;
10741 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10742 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
10743 ndr
->flags
= _flags_save_string
;
10746 uint32_t _flags_save_string
= ndr
->flags
;
10747 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10748 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->help_file
));
10749 ndr
->flags
= _flags_save_string
;
10752 uint32_t _flags_save_string_array
= ndr
->flags
;
10753 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10754 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dependent_files
));
10755 ndr
->flags
= _flags_save_string_array
;
10758 uint32_t _flags_save_string
= ndr
->flags
;
10759 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10760 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
10761 ndr
->flags
= _flags_save_string
;
10764 uint32_t _flags_save_string
= ndr
->flags
;
10765 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10766 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->default_datatype
));
10767 ndr
->flags
= _flags_save_string
;
10770 uint32_t _flags_save_string_array
= ndr
->flags
;
10771 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10772 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->previous_names
));
10773 ndr
->flags
= _flags_save_string_array
;
10776 if (ndr_flags
& NDR_BUFFERS
) {
10778 uint32_t _flags_save_string
= ndr
->flags
;
10779 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10780 if (r
->driver_name
) {
10781 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
10782 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
10784 ndr
->flags
= _flags_save_string
;
10787 uint32_t _flags_save_string
= ndr
->flags
;
10788 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10789 if (r
->architecture
) {
10790 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->architecture
));
10791 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
10793 ndr
->flags
= _flags_save_string
;
10796 uint32_t _flags_save_string
= ndr
->flags
;
10797 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10798 if (r
->driver_path
) {
10799 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_path
));
10800 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
10802 ndr
->flags
= _flags_save_string
;
10805 uint32_t _flags_save_string
= ndr
->flags
;
10806 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10807 if (r
->data_file
) {
10808 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_file
));
10809 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
10811 ndr
->flags
= _flags_save_string
;
10814 uint32_t _flags_save_string
= ndr
->flags
;
10815 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10816 if (r
->config_file
) {
10817 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->config_file
));
10818 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
10820 ndr
->flags
= _flags_save_string
;
10823 uint32_t _flags_save_string
= ndr
->flags
;
10824 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10825 if (r
->help_file
) {
10826 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->help_file
));
10827 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->help_file
));
10829 ndr
->flags
= _flags_save_string
;
10832 uint32_t _flags_save_string_array
= ndr
->flags
;
10833 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10834 if (r
->dependent_files
) {
10835 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->dependent_files
));
10836 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->dependent_files
));
10838 ndr
->flags
= _flags_save_string_array
;
10841 uint32_t _flags_save_string
= ndr
->flags
;
10842 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10843 if (r
->monitor_name
) {
10844 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->monitor_name
));
10845 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
10847 ndr
->flags
= _flags_save_string
;
10850 uint32_t _flags_save_string
= ndr
->flags
;
10851 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10852 if (r
->default_datatype
) {
10853 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->default_datatype
));
10854 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->default_datatype
));
10856 ndr
->flags
= _flags_save_string
;
10859 uint32_t _flags_save_string_array
= ndr
->flags
;
10860 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10861 if (r
->previous_names
) {
10862 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->previous_names
));
10863 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->previous_names
));
10865 ndr
->flags
= _flags_save_string_array
;
10868 return NDR_ERR_SUCCESS
;
10871 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo4
*r
)
10873 uint32_t _ptr_driver_name
;
10874 TALLOC_CTX
*_mem_save_driver_name_0
;
10875 uint32_t _ptr_architecture
;
10876 TALLOC_CTX
*_mem_save_architecture_0
;
10877 uint32_t _ptr_driver_path
;
10878 TALLOC_CTX
*_mem_save_driver_path_0
;
10879 uint32_t _ptr_data_file
;
10880 TALLOC_CTX
*_mem_save_data_file_0
;
10881 uint32_t _ptr_config_file
;
10882 TALLOC_CTX
*_mem_save_config_file_0
;
10883 uint32_t _ptr_help_file
;
10884 TALLOC_CTX
*_mem_save_help_file_0
;
10885 uint32_t _ptr_dependent_files
;
10886 TALLOC_CTX
*_mem_save_dependent_files_0
;
10887 uint32_t _ptr_monitor_name
;
10888 TALLOC_CTX
*_mem_save_monitor_name_0
;
10889 uint32_t _ptr_default_datatype
;
10890 TALLOC_CTX
*_mem_save_default_datatype_0
;
10891 uint32_t _ptr_previous_names
;
10892 TALLOC_CTX
*_mem_save_previous_names_0
;
10893 if (ndr_flags
& NDR_SCALARS
) {
10894 NDR_CHECK(ndr_pull_align(ndr
, 4));
10895 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
10897 uint32_t _flags_save_string
= ndr
->flags
;
10898 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10899 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
10900 if (_ptr_driver_name
) {
10901 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
10902 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
10904 r
->driver_name
= NULL
;
10906 ndr
->flags
= _flags_save_string
;
10909 uint32_t _flags_save_string
= ndr
->flags
;
10910 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10911 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
10912 if (_ptr_architecture
) {
10913 NDR_PULL_ALLOC(ndr
, r
->architecture
);
10914 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
10916 r
->architecture
= NULL
;
10918 ndr
->flags
= _flags_save_string
;
10921 uint32_t _flags_save_string
= ndr
->flags
;
10922 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10923 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
10924 if (_ptr_driver_path
) {
10925 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
10926 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
10928 r
->driver_path
= NULL
;
10930 ndr
->flags
= _flags_save_string
;
10933 uint32_t _flags_save_string
= ndr
->flags
;
10934 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10935 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
10936 if (_ptr_data_file
) {
10937 NDR_PULL_ALLOC(ndr
, r
->data_file
);
10938 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
10940 r
->data_file
= NULL
;
10942 ndr
->flags
= _flags_save_string
;
10945 uint32_t _flags_save_string
= ndr
->flags
;
10946 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10947 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
10948 if (_ptr_config_file
) {
10949 NDR_PULL_ALLOC(ndr
, r
->config_file
);
10950 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
10952 r
->config_file
= NULL
;
10954 ndr
->flags
= _flags_save_string
;
10957 uint32_t _flags_save_string
= ndr
->flags
;
10958 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10959 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
10960 if (_ptr_help_file
) {
10961 NDR_PULL_ALLOC(ndr
, r
->help_file
);
10962 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->help_file
, _ptr_help_file
));
10964 r
->help_file
= NULL
;
10966 ndr
->flags
= _flags_save_string
;
10969 uint32_t _flags_save_string_array
= ndr
->flags
;
10970 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10971 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
10972 if (_ptr_dependent_files
) {
10973 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
10974 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dependent_files
, _ptr_dependent_files
));
10976 r
->dependent_files
= NULL
;
10978 ndr
->flags
= _flags_save_string_array
;
10981 uint32_t _flags_save_string
= ndr
->flags
;
10982 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10983 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
10984 if (_ptr_monitor_name
) {
10985 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
10986 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
10988 r
->monitor_name
= NULL
;
10990 ndr
->flags
= _flags_save_string
;
10993 uint32_t _flags_save_string
= ndr
->flags
;
10994 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10995 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
10996 if (_ptr_default_datatype
) {
10997 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
10998 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->default_datatype
, _ptr_default_datatype
));
11000 r
->default_datatype
= NULL
;
11002 ndr
->flags
= _flags_save_string
;
11005 uint32_t _flags_save_string_array
= ndr
->flags
;
11006 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11007 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
11008 if (_ptr_previous_names
) {
11009 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
11010 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->previous_names
, _ptr_previous_names
));
11012 r
->previous_names
= NULL
;
11014 ndr
->flags
= _flags_save_string_array
;
11017 if (ndr_flags
& NDR_BUFFERS
) {
11019 uint32_t _flags_save_string
= ndr
->flags
;
11020 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11021 if (r
->driver_name
) {
11022 uint32_t _relative_save_offset
;
11023 _relative_save_offset
= ndr
->offset
;
11024 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
11025 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11026 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
11027 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
11028 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_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
->architecture
) {
11037 uint32_t _relative_save_offset
;
11038 _relative_save_offset
= ndr
->offset
;
11039 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
11040 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11041 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
11042 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
11043 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_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
->driver_path
) {
11052 uint32_t _relative_save_offset
;
11053 _relative_save_offset
= ndr
->offset
;
11054 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
11055 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11056 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
11057 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
11058 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
11059 ndr
->offset
= _relative_save_offset
;
11061 ndr
->flags
= _flags_save_string
;
11064 uint32_t _flags_save_string
= ndr
->flags
;
11065 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11066 if (r
->data_file
) {
11067 uint32_t _relative_save_offset
;
11068 _relative_save_offset
= ndr
->offset
;
11069 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
11070 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11071 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
11072 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
11073 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
11074 ndr
->offset
= _relative_save_offset
;
11076 ndr
->flags
= _flags_save_string
;
11079 uint32_t _flags_save_string
= ndr
->flags
;
11080 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11081 if (r
->config_file
) {
11082 uint32_t _relative_save_offset
;
11083 _relative_save_offset
= ndr
->offset
;
11084 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
11085 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11086 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
11087 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
11088 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_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
->help_file
) {
11097 uint32_t _relative_save_offset
;
11098 _relative_save_offset
= ndr
->offset
;
11099 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->help_file
));
11100 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11101 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
11102 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->help_file
));
11103 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
11104 ndr
->offset
= _relative_save_offset
;
11106 ndr
->flags
= _flags_save_string
;
11109 uint32_t _flags_save_string_array
= ndr
->flags
;
11110 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11111 if (r
->dependent_files
) {
11112 uint32_t _relative_save_offset
;
11113 _relative_save_offset
= ndr
->offset
;
11114 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dependent_files
));
11115 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11116 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
11117 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->dependent_files
));
11118 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
11119 ndr
->offset
= _relative_save_offset
;
11121 ndr
->flags
= _flags_save_string_array
;
11124 uint32_t _flags_save_string
= ndr
->flags
;
11125 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11126 if (r
->monitor_name
) {
11127 uint32_t _relative_save_offset
;
11128 _relative_save_offset
= ndr
->offset
;
11129 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
11130 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11131 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
11132 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
11133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
11134 ndr
->offset
= _relative_save_offset
;
11136 ndr
->flags
= _flags_save_string
;
11139 uint32_t _flags_save_string
= ndr
->flags
;
11140 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11141 if (r
->default_datatype
) {
11142 uint32_t _relative_save_offset
;
11143 _relative_save_offset
= ndr
->offset
;
11144 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->default_datatype
));
11145 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11146 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
11147 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->default_datatype
));
11148 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
11149 ndr
->offset
= _relative_save_offset
;
11151 ndr
->flags
= _flags_save_string
;
11154 uint32_t _flags_save_string_array
= ndr
->flags
;
11155 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11156 if (r
->previous_names
) {
11157 uint32_t _relative_save_offset
;
11158 _relative_save_offset
= ndr
->offset
;
11159 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->previous_names
));
11160 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11161 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
11162 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->previous_names
));
11163 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
11164 ndr
->offset
= _relative_save_offset
;
11166 ndr
->flags
= _flags_save_string_array
;
11169 return NDR_ERR_SUCCESS
;
11172 _PUBLIC_
void ndr_print_spoolss_DriverInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo4
*r
)
11174 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo4");
11176 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
11177 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
11179 if (r
->driver_name
) {
11180 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
11183 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
11185 if (r
->architecture
) {
11186 ndr_print_string(ndr
, "architecture", r
->architecture
);
11189 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
11191 if (r
->driver_path
) {
11192 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
11195 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
11197 if (r
->data_file
) {
11198 ndr_print_string(ndr
, "data_file", r
->data_file
);
11201 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
11203 if (r
->config_file
) {
11204 ndr_print_string(ndr
, "config_file", r
->config_file
);
11207 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
11209 if (r
->help_file
) {
11210 ndr_print_string(ndr
, "help_file", r
->help_file
);
11213 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
11215 if (r
->dependent_files
) {
11216 ndr_print_string_array(ndr
, "dependent_files", r
->dependent_files
);
11219 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
11221 if (r
->monitor_name
) {
11222 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
11225 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
11227 if (r
->default_datatype
) {
11228 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
11231 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
11233 if (r
->previous_names
) {
11234 ndr_print_string_array(ndr
, "previous_names", r
->previous_names
);
11240 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo4(const struct spoolss_DriverInfo4
*r
, struct smb_iconv_convenience
*ic
, int flags
)
11242 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo4
, ic
);
11245 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo5
*r
)
11247 if (ndr_flags
& NDR_SCALARS
) {
11248 NDR_CHECK(ndr_push_align(ndr
, 4));
11249 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
11251 uint32_t _flags_save_string
= ndr
->flags
;
11252 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11253 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
11254 ndr
->flags
= _flags_save_string
;
11257 uint32_t _flags_save_string
= ndr
->flags
;
11258 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11259 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
11260 ndr
->flags
= _flags_save_string
;
11263 uint32_t _flags_save_string
= ndr
->flags
;
11264 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11265 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
11266 ndr
->flags
= _flags_save_string
;
11269 uint32_t _flags_save_string
= ndr
->flags
;
11270 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11271 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
11272 ndr
->flags
= _flags_save_string
;
11275 uint32_t _flags_save_string
= ndr
->flags
;
11276 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11277 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
11278 ndr
->flags
= _flags_save_string
;
11280 NDR_CHECK(ndr_push_spoolss_DriverAttributes(ndr
, NDR_SCALARS
, r
->driver_attributes
));
11281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->config_version
));
11282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->driver_version
));
11284 if (ndr_flags
& NDR_BUFFERS
) {
11286 uint32_t _flags_save_string
= ndr
->flags
;
11287 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11288 if (r
->driver_name
) {
11289 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
11290 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
11292 ndr
->flags
= _flags_save_string
;
11295 uint32_t _flags_save_string
= ndr
->flags
;
11296 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11297 if (r
->architecture
) {
11298 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->architecture
));
11299 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
11301 ndr
->flags
= _flags_save_string
;
11304 uint32_t _flags_save_string
= ndr
->flags
;
11305 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11306 if (r
->driver_path
) {
11307 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_path
));
11308 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
11310 ndr
->flags
= _flags_save_string
;
11313 uint32_t _flags_save_string
= ndr
->flags
;
11314 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11315 if (r
->data_file
) {
11316 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_file
));
11317 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
11319 ndr
->flags
= _flags_save_string
;
11322 uint32_t _flags_save_string
= ndr
->flags
;
11323 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11324 if (r
->config_file
) {
11325 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->config_file
));
11326 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
11328 ndr
->flags
= _flags_save_string
;
11331 return NDR_ERR_SUCCESS
;
11334 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo5
*r
)
11336 uint32_t _ptr_driver_name
;
11337 TALLOC_CTX
*_mem_save_driver_name_0
;
11338 uint32_t _ptr_architecture
;
11339 TALLOC_CTX
*_mem_save_architecture_0
;
11340 uint32_t _ptr_driver_path
;
11341 TALLOC_CTX
*_mem_save_driver_path_0
;
11342 uint32_t _ptr_data_file
;
11343 TALLOC_CTX
*_mem_save_data_file_0
;
11344 uint32_t _ptr_config_file
;
11345 TALLOC_CTX
*_mem_save_config_file_0
;
11346 if (ndr_flags
& NDR_SCALARS
) {
11347 NDR_CHECK(ndr_pull_align(ndr
, 4));
11348 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
11350 uint32_t _flags_save_string
= ndr
->flags
;
11351 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11352 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
11353 if (_ptr_driver_name
) {
11354 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
11355 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
11357 r
->driver_name
= NULL
;
11359 ndr
->flags
= _flags_save_string
;
11362 uint32_t _flags_save_string
= ndr
->flags
;
11363 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11364 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
11365 if (_ptr_architecture
) {
11366 NDR_PULL_ALLOC(ndr
, r
->architecture
);
11367 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
11369 r
->architecture
= NULL
;
11371 ndr
->flags
= _flags_save_string
;
11374 uint32_t _flags_save_string
= ndr
->flags
;
11375 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11376 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
11377 if (_ptr_driver_path
) {
11378 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
11379 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
11381 r
->driver_path
= NULL
;
11383 ndr
->flags
= _flags_save_string
;
11386 uint32_t _flags_save_string
= ndr
->flags
;
11387 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11388 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
11389 if (_ptr_data_file
) {
11390 NDR_PULL_ALLOC(ndr
, r
->data_file
);
11391 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
11393 r
->data_file
= NULL
;
11395 ndr
->flags
= _flags_save_string
;
11398 uint32_t _flags_save_string
= ndr
->flags
;
11399 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11400 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
11401 if (_ptr_config_file
) {
11402 NDR_PULL_ALLOC(ndr
, r
->config_file
);
11403 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
11405 r
->config_file
= NULL
;
11407 ndr
->flags
= _flags_save_string
;
11409 NDR_CHECK(ndr_pull_spoolss_DriverAttributes(ndr
, NDR_SCALARS
, &r
->driver_attributes
));
11410 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->config_version
));
11411 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->driver_version
));
11413 if (ndr_flags
& NDR_BUFFERS
) {
11415 uint32_t _flags_save_string
= ndr
->flags
;
11416 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11417 if (r
->driver_name
) {
11418 uint32_t _relative_save_offset
;
11419 _relative_save_offset
= ndr
->offset
;
11420 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
11421 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11422 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
11423 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
11424 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
11425 ndr
->offset
= _relative_save_offset
;
11427 ndr
->flags
= _flags_save_string
;
11430 uint32_t _flags_save_string
= ndr
->flags
;
11431 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11432 if (r
->architecture
) {
11433 uint32_t _relative_save_offset
;
11434 _relative_save_offset
= ndr
->offset
;
11435 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
11436 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11437 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
11438 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
11439 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
11440 ndr
->offset
= _relative_save_offset
;
11442 ndr
->flags
= _flags_save_string
;
11445 uint32_t _flags_save_string
= ndr
->flags
;
11446 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11447 if (r
->driver_path
) {
11448 uint32_t _relative_save_offset
;
11449 _relative_save_offset
= ndr
->offset
;
11450 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
11451 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11452 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
11453 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
11454 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
11455 ndr
->offset
= _relative_save_offset
;
11457 ndr
->flags
= _flags_save_string
;
11460 uint32_t _flags_save_string
= ndr
->flags
;
11461 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11462 if (r
->data_file
) {
11463 uint32_t _relative_save_offset
;
11464 _relative_save_offset
= ndr
->offset
;
11465 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
11466 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11467 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
11468 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
11469 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
11470 ndr
->offset
= _relative_save_offset
;
11472 ndr
->flags
= _flags_save_string
;
11475 uint32_t _flags_save_string
= ndr
->flags
;
11476 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11477 if (r
->config_file
) {
11478 uint32_t _relative_save_offset
;
11479 _relative_save_offset
= ndr
->offset
;
11480 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
11481 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11482 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
11483 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
11484 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
11485 ndr
->offset
= _relative_save_offset
;
11487 ndr
->flags
= _flags_save_string
;
11490 return NDR_ERR_SUCCESS
;
11493 _PUBLIC_
void ndr_print_spoolss_DriverInfo5(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo5
*r
)
11495 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo5");
11497 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
11498 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
11500 if (r
->driver_name
) {
11501 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
11504 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
11506 if (r
->architecture
) {
11507 ndr_print_string(ndr
, "architecture", r
->architecture
);
11510 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
11512 if (r
->driver_path
) {
11513 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
11516 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
11518 if (r
->data_file
) {
11519 ndr_print_string(ndr
, "data_file", r
->data_file
);
11522 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
11524 if (r
->config_file
) {
11525 ndr_print_string(ndr
, "config_file", r
->config_file
);
11528 ndr_print_spoolss_DriverAttributes(ndr
, "driver_attributes", r
->driver_attributes
);
11529 ndr_print_uint32(ndr
, "config_version", r
->config_version
);
11530 ndr_print_uint32(ndr
, "driver_version", r
->driver_version
);
11534 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo5(const struct spoolss_DriverInfo5
*r
, struct smb_iconv_convenience
*ic
, int flags
)
11536 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo5
, ic
);
11539 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo6
*r
)
11541 if (ndr_flags
& NDR_SCALARS
) {
11542 NDR_CHECK(ndr_push_align(ndr
, 8));
11543 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
11545 uint32_t _flags_save_string
= ndr
->flags
;
11546 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11547 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
11548 ndr
->flags
= _flags_save_string
;
11551 uint32_t _flags_save_string
= ndr
->flags
;
11552 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11553 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
11554 ndr
->flags
= _flags_save_string
;
11557 uint32_t _flags_save_string
= ndr
->flags
;
11558 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11559 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
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 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
11566 ndr
->flags
= _flags_save_string
;
11569 uint32_t _flags_save_string
= ndr
->flags
;
11570 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11571 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
11572 ndr
->flags
= _flags_save_string
;
11575 uint32_t _flags_save_string
= ndr
->flags
;
11576 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11577 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->help_file
));
11578 ndr
->flags
= _flags_save_string
;
11581 uint32_t _flags_save_string_array
= ndr
->flags
;
11582 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11583 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dependent_files
));
11584 ndr
->flags
= _flags_save_string_array
;
11587 uint32_t _flags_save_string
= ndr
->flags
;
11588 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11589 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
11590 ndr
->flags
= _flags_save_string
;
11593 uint32_t _flags_save_string
= ndr
->flags
;
11594 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11595 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->default_datatype
));
11596 ndr
->flags
= _flags_save_string
;
11599 uint32_t _flags_save_string_array
= ndr
->flags
;
11600 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11601 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->previous_names
));
11602 ndr
->flags
= _flags_save_string_array
;
11604 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
11605 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
11607 uint32_t _flags_save_string
= ndr
->flags
;
11608 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11609 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->manufacturer_name
));
11610 ndr
->flags
= _flags_save_string
;
11613 uint32_t _flags_save_string
= ndr
->flags
;
11614 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11615 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->manufacturer_url
));
11616 ndr
->flags
= _flags_save_string
;
11619 uint32_t _flags_save_string
= ndr
->flags
;
11620 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11621 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->hardware_id
));
11622 ndr
->flags
= _flags_save_string
;
11625 uint32_t _flags_save_string
= ndr
->flags
;
11626 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11627 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->provider
));
11628 ndr
->flags
= _flags_save_string
;
11631 if (ndr_flags
& NDR_BUFFERS
) {
11633 uint32_t _flags_save_string
= ndr
->flags
;
11634 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11635 if (r
->driver_name
) {
11636 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
11637 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
11639 ndr
->flags
= _flags_save_string
;
11642 uint32_t _flags_save_string
= ndr
->flags
;
11643 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11644 if (r
->architecture
) {
11645 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->architecture
));
11646 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
11648 ndr
->flags
= _flags_save_string
;
11651 uint32_t _flags_save_string
= ndr
->flags
;
11652 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11653 if (r
->driver_path
) {
11654 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_path
));
11655 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
11657 ndr
->flags
= _flags_save_string
;
11660 uint32_t _flags_save_string
= ndr
->flags
;
11661 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11662 if (r
->data_file
) {
11663 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_file
));
11664 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
11666 ndr
->flags
= _flags_save_string
;
11669 uint32_t _flags_save_string
= ndr
->flags
;
11670 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11671 if (r
->config_file
) {
11672 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->config_file
));
11673 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
11675 ndr
->flags
= _flags_save_string
;
11678 uint32_t _flags_save_string
= ndr
->flags
;
11679 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11680 if (r
->help_file
) {
11681 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->help_file
));
11682 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->help_file
));
11684 ndr
->flags
= _flags_save_string
;
11687 uint32_t _flags_save_string_array
= ndr
->flags
;
11688 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11689 if (r
->dependent_files
) {
11690 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->dependent_files
));
11691 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->dependent_files
));
11693 ndr
->flags
= _flags_save_string_array
;
11696 uint32_t _flags_save_string
= ndr
->flags
;
11697 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11698 if (r
->monitor_name
) {
11699 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->monitor_name
));
11700 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
11702 ndr
->flags
= _flags_save_string
;
11705 uint32_t _flags_save_string
= ndr
->flags
;
11706 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11707 if (r
->default_datatype
) {
11708 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->default_datatype
));
11709 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->default_datatype
));
11711 ndr
->flags
= _flags_save_string
;
11714 uint32_t _flags_save_string_array
= ndr
->flags
;
11715 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11716 if (r
->previous_names
) {
11717 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->previous_names
));
11718 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->previous_names
));
11720 ndr
->flags
= _flags_save_string_array
;
11723 uint32_t _flags_save_string
= ndr
->flags
;
11724 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11725 if (r
->manufacturer_name
) {
11726 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->manufacturer_name
));
11727 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->manufacturer_name
));
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 if (r
->manufacturer_url
) {
11735 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->manufacturer_url
));
11736 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->manufacturer_url
));
11738 ndr
->flags
= _flags_save_string
;
11741 uint32_t _flags_save_string
= ndr
->flags
;
11742 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11743 if (r
->hardware_id
) {
11744 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->hardware_id
));
11745 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->hardware_id
));
11747 ndr
->flags
= _flags_save_string
;
11750 uint32_t _flags_save_string
= ndr
->flags
;
11751 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11753 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->provider
));
11754 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->provider
));
11756 ndr
->flags
= _flags_save_string
;
11759 return NDR_ERR_SUCCESS
;
11762 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo6
*r
)
11764 uint32_t _ptr_driver_name
;
11765 TALLOC_CTX
*_mem_save_driver_name_0
;
11766 uint32_t _ptr_architecture
;
11767 TALLOC_CTX
*_mem_save_architecture_0
;
11768 uint32_t _ptr_driver_path
;
11769 TALLOC_CTX
*_mem_save_driver_path_0
;
11770 uint32_t _ptr_data_file
;
11771 TALLOC_CTX
*_mem_save_data_file_0
;
11772 uint32_t _ptr_config_file
;
11773 TALLOC_CTX
*_mem_save_config_file_0
;
11774 uint32_t _ptr_help_file
;
11775 TALLOC_CTX
*_mem_save_help_file_0
;
11776 uint32_t _ptr_dependent_files
;
11777 TALLOC_CTX
*_mem_save_dependent_files_0
;
11778 uint32_t _ptr_monitor_name
;
11779 TALLOC_CTX
*_mem_save_monitor_name_0
;
11780 uint32_t _ptr_default_datatype
;
11781 TALLOC_CTX
*_mem_save_default_datatype_0
;
11782 uint32_t _ptr_previous_names
;
11783 TALLOC_CTX
*_mem_save_previous_names_0
;
11784 uint32_t _ptr_manufacturer_name
;
11785 TALLOC_CTX
*_mem_save_manufacturer_name_0
;
11786 uint32_t _ptr_manufacturer_url
;
11787 TALLOC_CTX
*_mem_save_manufacturer_url_0
;
11788 uint32_t _ptr_hardware_id
;
11789 TALLOC_CTX
*_mem_save_hardware_id_0
;
11790 uint32_t _ptr_provider
;
11791 TALLOC_CTX
*_mem_save_provider_0
;
11792 if (ndr_flags
& NDR_SCALARS
) {
11793 NDR_CHECK(ndr_pull_align(ndr
, 8));
11794 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
11796 uint32_t _flags_save_string
= ndr
->flags
;
11797 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11798 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
11799 if (_ptr_driver_name
) {
11800 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
11801 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
11803 r
->driver_name
= NULL
;
11805 ndr
->flags
= _flags_save_string
;
11808 uint32_t _flags_save_string
= ndr
->flags
;
11809 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11810 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
11811 if (_ptr_architecture
) {
11812 NDR_PULL_ALLOC(ndr
, r
->architecture
);
11813 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
11815 r
->architecture
= NULL
;
11817 ndr
->flags
= _flags_save_string
;
11820 uint32_t _flags_save_string
= ndr
->flags
;
11821 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11822 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
11823 if (_ptr_driver_path
) {
11824 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
11825 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
11827 r
->driver_path
= NULL
;
11829 ndr
->flags
= _flags_save_string
;
11832 uint32_t _flags_save_string
= ndr
->flags
;
11833 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11834 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
11835 if (_ptr_data_file
) {
11836 NDR_PULL_ALLOC(ndr
, r
->data_file
);
11837 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
11839 r
->data_file
= NULL
;
11841 ndr
->flags
= _flags_save_string
;
11844 uint32_t _flags_save_string
= ndr
->flags
;
11845 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11846 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
11847 if (_ptr_config_file
) {
11848 NDR_PULL_ALLOC(ndr
, r
->config_file
);
11849 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
11851 r
->config_file
= NULL
;
11853 ndr
->flags
= _flags_save_string
;
11856 uint32_t _flags_save_string
= ndr
->flags
;
11857 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11858 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
11859 if (_ptr_help_file
) {
11860 NDR_PULL_ALLOC(ndr
, r
->help_file
);
11861 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->help_file
, _ptr_help_file
));
11863 r
->help_file
= NULL
;
11865 ndr
->flags
= _flags_save_string
;
11868 uint32_t _flags_save_string_array
= ndr
->flags
;
11869 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11870 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
11871 if (_ptr_dependent_files
) {
11872 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
11873 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dependent_files
, _ptr_dependent_files
));
11875 r
->dependent_files
= NULL
;
11877 ndr
->flags
= _flags_save_string_array
;
11880 uint32_t _flags_save_string
= ndr
->flags
;
11881 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11882 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
11883 if (_ptr_monitor_name
) {
11884 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
11885 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
11887 r
->monitor_name
= NULL
;
11889 ndr
->flags
= _flags_save_string
;
11892 uint32_t _flags_save_string
= ndr
->flags
;
11893 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11894 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
11895 if (_ptr_default_datatype
) {
11896 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
11897 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->default_datatype
, _ptr_default_datatype
));
11899 r
->default_datatype
= NULL
;
11901 ndr
->flags
= _flags_save_string
;
11904 uint32_t _flags_save_string_array
= ndr
->flags
;
11905 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11906 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
11907 if (_ptr_previous_names
) {
11908 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
11909 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->previous_names
, _ptr_previous_names
));
11911 r
->previous_names
= NULL
;
11913 ndr
->flags
= _flags_save_string_array
;
11915 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
11916 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
11918 uint32_t _flags_save_string
= ndr
->flags
;
11919 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11920 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_name
));
11921 if (_ptr_manufacturer_name
) {
11922 NDR_PULL_ALLOC(ndr
, r
->manufacturer_name
);
11923 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->manufacturer_name
, _ptr_manufacturer_name
));
11925 r
->manufacturer_name
= NULL
;
11927 ndr
->flags
= _flags_save_string
;
11930 uint32_t _flags_save_string
= ndr
->flags
;
11931 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11932 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_url
));
11933 if (_ptr_manufacturer_url
) {
11934 NDR_PULL_ALLOC(ndr
, r
->manufacturer_url
);
11935 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->manufacturer_url
, _ptr_manufacturer_url
));
11937 r
->manufacturer_url
= NULL
;
11939 ndr
->flags
= _flags_save_string
;
11942 uint32_t _flags_save_string
= ndr
->flags
;
11943 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11944 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hardware_id
));
11945 if (_ptr_hardware_id
) {
11946 NDR_PULL_ALLOC(ndr
, r
->hardware_id
);
11947 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->hardware_id
, _ptr_hardware_id
));
11949 r
->hardware_id
= NULL
;
11951 ndr
->flags
= _flags_save_string
;
11954 uint32_t _flags_save_string
= ndr
->flags
;
11955 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11956 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_provider
));
11957 if (_ptr_provider
) {
11958 NDR_PULL_ALLOC(ndr
, r
->provider
);
11959 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->provider
, _ptr_provider
));
11961 r
->provider
= NULL
;
11963 ndr
->flags
= _flags_save_string
;
11966 if (ndr_flags
& NDR_BUFFERS
) {
11968 uint32_t _flags_save_string
= ndr
->flags
;
11969 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11970 if (r
->driver_name
) {
11971 uint32_t _relative_save_offset
;
11972 _relative_save_offset
= ndr
->offset
;
11973 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
11974 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11975 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
11976 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
11977 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
11978 ndr
->offset
= _relative_save_offset
;
11980 ndr
->flags
= _flags_save_string
;
11983 uint32_t _flags_save_string
= ndr
->flags
;
11984 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11985 if (r
->architecture
) {
11986 uint32_t _relative_save_offset
;
11987 _relative_save_offset
= ndr
->offset
;
11988 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
11989 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11990 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
11991 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
11992 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
11993 ndr
->offset
= _relative_save_offset
;
11995 ndr
->flags
= _flags_save_string
;
11998 uint32_t _flags_save_string
= ndr
->flags
;
11999 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12000 if (r
->driver_path
) {
12001 uint32_t _relative_save_offset
;
12002 _relative_save_offset
= ndr
->offset
;
12003 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
12004 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12005 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
12006 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
12007 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
12008 ndr
->offset
= _relative_save_offset
;
12010 ndr
->flags
= _flags_save_string
;
12013 uint32_t _flags_save_string
= ndr
->flags
;
12014 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12015 if (r
->data_file
) {
12016 uint32_t _relative_save_offset
;
12017 _relative_save_offset
= ndr
->offset
;
12018 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
12019 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12020 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
12021 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
12022 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
12023 ndr
->offset
= _relative_save_offset
;
12025 ndr
->flags
= _flags_save_string
;
12028 uint32_t _flags_save_string
= ndr
->flags
;
12029 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12030 if (r
->config_file
) {
12031 uint32_t _relative_save_offset
;
12032 _relative_save_offset
= ndr
->offset
;
12033 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
12034 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12035 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
12036 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
12037 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
12038 ndr
->offset
= _relative_save_offset
;
12040 ndr
->flags
= _flags_save_string
;
12043 uint32_t _flags_save_string
= ndr
->flags
;
12044 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12045 if (r
->help_file
) {
12046 uint32_t _relative_save_offset
;
12047 _relative_save_offset
= ndr
->offset
;
12048 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->help_file
));
12049 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12050 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
12051 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->help_file
));
12052 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
12053 ndr
->offset
= _relative_save_offset
;
12055 ndr
->flags
= _flags_save_string
;
12058 uint32_t _flags_save_string_array
= ndr
->flags
;
12059 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12060 if (r
->dependent_files
) {
12061 uint32_t _relative_save_offset
;
12062 _relative_save_offset
= ndr
->offset
;
12063 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dependent_files
));
12064 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12065 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
12066 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->dependent_files
));
12067 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
12068 ndr
->offset
= _relative_save_offset
;
12070 ndr
->flags
= _flags_save_string_array
;
12073 uint32_t _flags_save_string
= ndr
->flags
;
12074 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12075 if (r
->monitor_name
) {
12076 uint32_t _relative_save_offset
;
12077 _relative_save_offset
= ndr
->offset
;
12078 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
12079 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12080 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
12081 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
12082 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
12083 ndr
->offset
= _relative_save_offset
;
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 if (r
->default_datatype
) {
12091 uint32_t _relative_save_offset
;
12092 _relative_save_offset
= ndr
->offset
;
12093 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->default_datatype
));
12094 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12095 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
12096 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->default_datatype
));
12097 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
12098 ndr
->offset
= _relative_save_offset
;
12100 ndr
->flags
= _flags_save_string
;
12103 uint32_t _flags_save_string_array
= ndr
->flags
;
12104 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12105 if (r
->previous_names
) {
12106 uint32_t _relative_save_offset
;
12107 _relative_save_offset
= ndr
->offset
;
12108 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->previous_names
));
12109 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12110 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
12111 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->previous_names
));
12112 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
12113 ndr
->offset
= _relative_save_offset
;
12115 ndr
->flags
= _flags_save_string_array
;
12118 uint32_t _flags_save_string
= ndr
->flags
;
12119 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12120 if (r
->manufacturer_name
) {
12121 uint32_t _relative_save_offset
;
12122 _relative_save_offset
= ndr
->offset
;
12123 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->manufacturer_name
));
12124 _mem_save_manufacturer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12125 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_name
, 0);
12126 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->manufacturer_name
));
12127 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_name_0
, 0);
12128 ndr
->offset
= _relative_save_offset
;
12130 ndr
->flags
= _flags_save_string
;
12133 uint32_t _flags_save_string
= ndr
->flags
;
12134 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12135 if (r
->manufacturer_url
) {
12136 uint32_t _relative_save_offset
;
12137 _relative_save_offset
= ndr
->offset
;
12138 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->manufacturer_url
));
12139 _mem_save_manufacturer_url_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12140 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_url
, 0);
12141 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->manufacturer_url
));
12142 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_url_0
, 0);
12143 ndr
->offset
= _relative_save_offset
;
12145 ndr
->flags
= _flags_save_string
;
12148 uint32_t _flags_save_string
= ndr
->flags
;
12149 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12150 if (r
->hardware_id
) {
12151 uint32_t _relative_save_offset
;
12152 _relative_save_offset
= ndr
->offset
;
12153 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->hardware_id
));
12154 _mem_save_hardware_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12155 NDR_PULL_SET_MEM_CTX(ndr
, r
->hardware_id
, 0);
12156 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->hardware_id
));
12157 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hardware_id_0
, 0);
12158 ndr
->offset
= _relative_save_offset
;
12160 ndr
->flags
= _flags_save_string
;
12163 uint32_t _flags_save_string
= ndr
->flags
;
12164 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12166 uint32_t _relative_save_offset
;
12167 _relative_save_offset
= ndr
->offset
;
12168 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->provider
));
12169 _mem_save_provider_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12170 NDR_PULL_SET_MEM_CTX(ndr
, r
->provider
, 0);
12171 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->provider
));
12172 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_provider_0
, 0);
12173 ndr
->offset
= _relative_save_offset
;
12175 ndr
->flags
= _flags_save_string
;
12178 return NDR_ERR_SUCCESS
;
12181 _PUBLIC_
void ndr_print_spoolss_DriverInfo6(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo6
*r
)
12183 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo6");
12185 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
12186 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
12188 if (r
->driver_name
) {
12189 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
12192 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
12194 if (r
->architecture
) {
12195 ndr_print_string(ndr
, "architecture", r
->architecture
);
12198 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
12200 if (r
->driver_path
) {
12201 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
12204 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
12206 if (r
->data_file
) {
12207 ndr_print_string(ndr
, "data_file", r
->data_file
);
12210 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
12212 if (r
->config_file
) {
12213 ndr_print_string(ndr
, "config_file", r
->config_file
);
12216 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
12218 if (r
->help_file
) {
12219 ndr_print_string(ndr
, "help_file", r
->help_file
);
12222 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
12224 if (r
->dependent_files
) {
12225 ndr_print_string_array(ndr
, "dependent_files", r
->dependent_files
);
12228 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
12230 if (r
->monitor_name
) {
12231 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
12234 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
12236 if (r
->default_datatype
) {
12237 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
12240 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
12242 if (r
->previous_names
) {
12243 ndr_print_string_array(ndr
, "previous_names", r
->previous_names
);
12246 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
12247 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
12248 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
12250 if (r
->manufacturer_name
) {
12251 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
12254 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
12256 if (r
->manufacturer_url
) {
12257 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
12260 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
12262 if (r
->hardware_id
) {
12263 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
12266 ndr_print_ptr(ndr
, "provider", r
->provider
);
12269 ndr_print_string(ndr
, "provider", r
->provider
);
12275 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo6(const struct spoolss_DriverInfo6
*r
, struct smb_iconv_convenience
*ic
, int flags
)
12277 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo6
, ic
);
12280 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo8
*r
)
12282 if (ndr_flags
& NDR_SCALARS
) {
12283 NDR_CHECK(ndr_push_align(ndr
, 8));
12284 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
12286 uint32_t _flags_save_string
= ndr
->flags
;
12287 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12288 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
12289 ndr
->flags
= _flags_save_string
;
12292 uint32_t _flags_save_string
= ndr
->flags
;
12293 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12294 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
12295 ndr
->flags
= _flags_save_string
;
12298 uint32_t _flags_save_string
= ndr
->flags
;
12299 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12300 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
12301 ndr
->flags
= _flags_save_string
;
12304 uint32_t _flags_save_string
= ndr
->flags
;
12305 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12306 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
12307 ndr
->flags
= _flags_save_string
;
12310 uint32_t _flags_save_string
= ndr
->flags
;
12311 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12312 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
12313 ndr
->flags
= _flags_save_string
;
12316 uint32_t _flags_save_string
= ndr
->flags
;
12317 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12318 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->help_file
));
12319 ndr
->flags
= _flags_save_string
;
12322 uint32_t _flags_save_string
= ndr
->flags
;
12323 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12324 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
12325 ndr
->flags
= _flags_save_string
;
12328 uint32_t _flags_save_string
= ndr
->flags
;
12329 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12330 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->default_datatype
));
12331 ndr
->flags
= _flags_save_string
;
12334 uint32_t _flags_save_string_array
= ndr
->flags
;
12335 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12336 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dependent_files
));
12337 ndr
->flags
= _flags_save_string_array
;
12340 uint32_t _flags_save_string_array
= ndr
->flags
;
12341 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12342 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->previous_names
));
12343 ndr
->flags
= _flags_save_string_array
;
12345 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
12346 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
12348 uint32_t _flags_save_string
= ndr
->flags
;
12349 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12350 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->manufacturer_name
));
12351 ndr
->flags
= _flags_save_string
;
12354 uint32_t _flags_save_string
= ndr
->flags
;
12355 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12356 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->manufacturer_url
));
12357 ndr
->flags
= _flags_save_string
;
12360 uint32_t _flags_save_string
= ndr
->flags
;
12361 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12362 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->hardware_id
));
12363 ndr
->flags
= _flags_save_string
;
12366 uint32_t _flags_save_string
= ndr
->flags
;
12367 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12368 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->provider
));
12369 ndr
->flags
= _flags_save_string
;
12372 uint32_t _flags_save_string
= ndr
->flags
;
12373 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12374 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->print_processor
));
12375 ndr
->flags
= _flags_save_string
;
12378 uint32_t _flags_save_string
= ndr
->flags
;
12379 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12380 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->vendor_setup
));
12381 ndr
->flags
= _flags_save_string
;
12384 uint32_t _flags_save_string_array
= ndr
->flags
;
12385 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12386 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->color_profiles
));
12387 ndr
->flags
= _flags_save_string_array
;
12390 uint32_t _flags_save_string
= ndr
->flags
;
12391 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12392 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->inf_path
));
12393 ndr
->flags
= _flags_save_string
;
12395 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->printer_driver_attributes
));
12397 uint32_t _flags_save_string_array
= ndr
->flags
;
12398 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12399 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->core_driver_dependencies
));
12400 ndr
->flags
= _flags_save_string_array
;
12402 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->min_inbox_driver_ver_date
));
12403 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->min_inbox_driver_ver_version
));
12405 if (ndr_flags
& NDR_BUFFERS
) {
12407 uint32_t _flags_save_string
= ndr
->flags
;
12408 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12409 if (r
->driver_name
) {
12410 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_name
));
12411 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
12413 ndr
->flags
= _flags_save_string
;
12416 uint32_t _flags_save_string
= ndr
->flags
;
12417 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12418 if (r
->architecture
) {
12419 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->architecture
));
12420 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
12422 ndr
->flags
= _flags_save_string
;
12425 uint32_t _flags_save_string
= ndr
->flags
;
12426 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12427 if (r
->driver_path
) {
12428 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->driver_path
));
12429 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
12431 ndr
->flags
= _flags_save_string
;
12434 uint32_t _flags_save_string
= ndr
->flags
;
12435 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12436 if (r
->data_file
) {
12437 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data_file
));
12438 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
12440 ndr
->flags
= _flags_save_string
;
12443 uint32_t _flags_save_string
= ndr
->flags
;
12444 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12445 if (r
->config_file
) {
12446 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->config_file
));
12447 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
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
->help_file
) {
12455 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->help_file
));
12456 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->help_file
));
12458 ndr
->flags
= _flags_save_string
;
12461 uint32_t _flags_save_string
= ndr
->flags
;
12462 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12463 if (r
->monitor_name
) {
12464 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->monitor_name
));
12465 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
12467 ndr
->flags
= _flags_save_string
;
12470 uint32_t _flags_save_string
= ndr
->flags
;
12471 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12472 if (r
->default_datatype
) {
12473 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->default_datatype
));
12474 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->default_datatype
));
12476 ndr
->flags
= _flags_save_string
;
12479 uint32_t _flags_save_string_array
= ndr
->flags
;
12480 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12481 if (r
->dependent_files
) {
12482 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->dependent_files
));
12483 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->dependent_files
));
12485 ndr
->flags
= _flags_save_string_array
;
12488 uint32_t _flags_save_string_array
= ndr
->flags
;
12489 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12490 if (r
->previous_names
) {
12491 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->previous_names
));
12492 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->previous_names
));
12494 ndr
->flags
= _flags_save_string_array
;
12497 uint32_t _flags_save_string
= ndr
->flags
;
12498 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12499 if (r
->manufacturer_name
) {
12500 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->manufacturer_name
));
12501 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->manufacturer_name
));
12503 ndr
->flags
= _flags_save_string
;
12506 uint32_t _flags_save_string
= ndr
->flags
;
12507 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12508 if (r
->manufacturer_url
) {
12509 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->manufacturer_url
));
12510 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->manufacturer_url
));
12512 ndr
->flags
= _flags_save_string
;
12515 uint32_t _flags_save_string
= ndr
->flags
;
12516 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12517 if (r
->hardware_id
) {
12518 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->hardware_id
));
12519 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->hardware_id
));
12521 ndr
->flags
= _flags_save_string
;
12524 uint32_t _flags_save_string
= ndr
->flags
;
12525 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12527 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->provider
));
12528 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->provider
));
12530 ndr
->flags
= _flags_save_string
;
12533 uint32_t _flags_save_string
= ndr
->flags
;
12534 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12535 if (r
->print_processor
) {
12536 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->print_processor
));
12537 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->print_processor
));
12539 ndr
->flags
= _flags_save_string
;
12542 uint32_t _flags_save_string
= ndr
->flags
;
12543 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12544 if (r
->vendor_setup
) {
12545 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->vendor_setup
));
12546 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->vendor_setup
));
12548 ndr
->flags
= _flags_save_string
;
12551 uint32_t _flags_save_string_array
= ndr
->flags
;
12552 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12553 if (r
->color_profiles
) {
12554 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->color_profiles
));
12555 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->color_profiles
));
12557 ndr
->flags
= _flags_save_string_array
;
12560 uint32_t _flags_save_string
= ndr
->flags
;
12561 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12563 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->inf_path
));
12564 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->inf_path
));
12566 ndr
->flags
= _flags_save_string
;
12569 uint32_t _flags_save_string_array
= ndr
->flags
;
12570 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12571 if (r
->core_driver_dependencies
) {
12572 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->core_driver_dependencies
));
12573 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->core_driver_dependencies
));
12575 ndr
->flags
= _flags_save_string_array
;
12578 return NDR_ERR_SUCCESS
;
12581 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo8
*r
)
12583 uint32_t _ptr_driver_name
;
12584 TALLOC_CTX
*_mem_save_driver_name_0
;
12585 uint32_t _ptr_architecture
;
12586 TALLOC_CTX
*_mem_save_architecture_0
;
12587 uint32_t _ptr_driver_path
;
12588 TALLOC_CTX
*_mem_save_driver_path_0
;
12589 uint32_t _ptr_data_file
;
12590 TALLOC_CTX
*_mem_save_data_file_0
;
12591 uint32_t _ptr_config_file
;
12592 TALLOC_CTX
*_mem_save_config_file_0
;
12593 uint32_t _ptr_help_file
;
12594 TALLOC_CTX
*_mem_save_help_file_0
;
12595 uint32_t _ptr_monitor_name
;
12596 TALLOC_CTX
*_mem_save_monitor_name_0
;
12597 uint32_t _ptr_default_datatype
;
12598 TALLOC_CTX
*_mem_save_default_datatype_0
;
12599 uint32_t _ptr_dependent_files
;
12600 TALLOC_CTX
*_mem_save_dependent_files_0
;
12601 uint32_t _ptr_previous_names
;
12602 TALLOC_CTX
*_mem_save_previous_names_0
;
12603 uint32_t _ptr_manufacturer_name
;
12604 TALLOC_CTX
*_mem_save_manufacturer_name_0
;
12605 uint32_t _ptr_manufacturer_url
;
12606 TALLOC_CTX
*_mem_save_manufacturer_url_0
;
12607 uint32_t _ptr_hardware_id
;
12608 TALLOC_CTX
*_mem_save_hardware_id_0
;
12609 uint32_t _ptr_provider
;
12610 TALLOC_CTX
*_mem_save_provider_0
;
12611 uint32_t _ptr_print_processor
;
12612 TALLOC_CTX
*_mem_save_print_processor_0
;
12613 uint32_t _ptr_vendor_setup
;
12614 TALLOC_CTX
*_mem_save_vendor_setup_0
;
12615 uint32_t _ptr_color_profiles
;
12616 TALLOC_CTX
*_mem_save_color_profiles_0
;
12617 uint32_t _ptr_inf_path
;
12618 TALLOC_CTX
*_mem_save_inf_path_0
;
12619 uint32_t _ptr_core_driver_dependencies
;
12620 TALLOC_CTX
*_mem_save_core_driver_dependencies_0
;
12621 if (ndr_flags
& NDR_SCALARS
) {
12622 NDR_CHECK(ndr_pull_align(ndr
, 8));
12623 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
12625 uint32_t _flags_save_string
= ndr
->flags
;
12626 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12627 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
12628 if (_ptr_driver_name
) {
12629 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
12630 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
12632 r
->driver_name
= NULL
;
12634 ndr
->flags
= _flags_save_string
;
12637 uint32_t _flags_save_string
= ndr
->flags
;
12638 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12639 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
12640 if (_ptr_architecture
) {
12641 NDR_PULL_ALLOC(ndr
, r
->architecture
);
12642 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
12644 r
->architecture
= NULL
;
12646 ndr
->flags
= _flags_save_string
;
12649 uint32_t _flags_save_string
= ndr
->flags
;
12650 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12651 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
12652 if (_ptr_driver_path
) {
12653 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
12654 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
12656 r
->driver_path
= NULL
;
12658 ndr
->flags
= _flags_save_string
;
12661 uint32_t _flags_save_string
= ndr
->flags
;
12662 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12663 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
12664 if (_ptr_data_file
) {
12665 NDR_PULL_ALLOC(ndr
, r
->data_file
);
12666 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
12668 r
->data_file
= NULL
;
12670 ndr
->flags
= _flags_save_string
;
12673 uint32_t _flags_save_string
= ndr
->flags
;
12674 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12675 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
12676 if (_ptr_config_file
) {
12677 NDR_PULL_ALLOC(ndr
, r
->config_file
);
12678 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
12680 r
->config_file
= NULL
;
12682 ndr
->flags
= _flags_save_string
;
12685 uint32_t _flags_save_string
= ndr
->flags
;
12686 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12687 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
12688 if (_ptr_help_file
) {
12689 NDR_PULL_ALLOC(ndr
, r
->help_file
);
12690 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->help_file
, _ptr_help_file
));
12692 r
->help_file
= NULL
;
12694 ndr
->flags
= _flags_save_string
;
12697 uint32_t _flags_save_string
= ndr
->flags
;
12698 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12699 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
12700 if (_ptr_monitor_name
) {
12701 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
12702 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
12704 r
->monitor_name
= NULL
;
12706 ndr
->flags
= _flags_save_string
;
12709 uint32_t _flags_save_string
= ndr
->flags
;
12710 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12711 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
12712 if (_ptr_default_datatype
) {
12713 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
12714 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->default_datatype
, _ptr_default_datatype
));
12716 r
->default_datatype
= NULL
;
12718 ndr
->flags
= _flags_save_string
;
12721 uint32_t _flags_save_string_array
= ndr
->flags
;
12722 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12723 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
12724 if (_ptr_dependent_files
) {
12725 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
12726 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dependent_files
, _ptr_dependent_files
));
12728 r
->dependent_files
= NULL
;
12730 ndr
->flags
= _flags_save_string_array
;
12733 uint32_t _flags_save_string_array
= ndr
->flags
;
12734 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12735 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
12736 if (_ptr_previous_names
) {
12737 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
12738 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->previous_names
, _ptr_previous_names
));
12740 r
->previous_names
= NULL
;
12742 ndr
->flags
= _flags_save_string_array
;
12744 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
12745 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
12747 uint32_t _flags_save_string
= ndr
->flags
;
12748 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12749 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_name
));
12750 if (_ptr_manufacturer_name
) {
12751 NDR_PULL_ALLOC(ndr
, r
->manufacturer_name
);
12752 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->manufacturer_name
, _ptr_manufacturer_name
));
12754 r
->manufacturer_name
= NULL
;
12756 ndr
->flags
= _flags_save_string
;
12759 uint32_t _flags_save_string
= ndr
->flags
;
12760 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12761 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_url
));
12762 if (_ptr_manufacturer_url
) {
12763 NDR_PULL_ALLOC(ndr
, r
->manufacturer_url
);
12764 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->manufacturer_url
, _ptr_manufacturer_url
));
12766 r
->manufacturer_url
= NULL
;
12768 ndr
->flags
= _flags_save_string
;
12771 uint32_t _flags_save_string
= ndr
->flags
;
12772 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12773 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hardware_id
));
12774 if (_ptr_hardware_id
) {
12775 NDR_PULL_ALLOC(ndr
, r
->hardware_id
);
12776 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->hardware_id
, _ptr_hardware_id
));
12778 r
->hardware_id
= NULL
;
12780 ndr
->flags
= _flags_save_string
;
12783 uint32_t _flags_save_string
= ndr
->flags
;
12784 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12785 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_provider
));
12786 if (_ptr_provider
) {
12787 NDR_PULL_ALLOC(ndr
, r
->provider
);
12788 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->provider
, _ptr_provider
));
12790 r
->provider
= NULL
;
12792 ndr
->flags
= _flags_save_string
;
12795 uint32_t _flags_save_string
= ndr
->flags
;
12796 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12797 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
12798 if (_ptr_print_processor
) {
12799 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
12800 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->print_processor
, _ptr_print_processor
));
12802 r
->print_processor
= NULL
;
12804 ndr
->flags
= _flags_save_string
;
12807 uint32_t _flags_save_string
= ndr
->flags
;
12808 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12809 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_vendor_setup
));
12810 if (_ptr_vendor_setup
) {
12811 NDR_PULL_ALLOC(ndr
, r
->vendor_setup
);
12812 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->vendor_setup
, _ptr_vendor_setup
));
12814 r
->vendor_setup
= NULL
;
12816 ndr
->flags
= _flags_save_string
;
12819 uint32_t _flags_save_string_array
= ndr
->flags
;
12820 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12821 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_color_profiles
));
12822 if (_ptr_color_profiles
) {
12823 NDR_PULL_ALLOC(ndr
, r
->color_profiles
);
12824 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->color_profiles
, _ptr_color_profiles
));
12826 r
->color_profiles
= NULL
;
12828 ndr
->flags
= _flags_save_string_array
;
12831 uint32_t _flags_save_string
= ndr
->flags
;
12832 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12833 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_inf_path
));
12834 if (_ptr_inf_path
) {
12835 NDR_PULL_ALLOC(ndr
, r
->inf_path
);
12836 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->inf_path
, _ptr_inf_path
));
12838 r
->inf_path
= NULL
;
12840 ndr
->flags
= _flags_save_string
;
12842 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->printer_driver_attributes
));
12844 uint32_t _flags_save_string_array
= ndr
->flags
;
12845 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12846 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_core_driver_dependencies
));
12847 if (_ptr_core_driver_dependencies
) {
12848 NDR_PULL_ALLOC(ndr
, r
->core_driver_dependencies
);
12849 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->core_driver_dependencies
, _ptr_core_driver_dependencies
));
12851 r
->core_driver_dependencies
= NULL
;
12853 ndr
->flags
= _flags_save_string_array
;
12855 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->min_inbox_driver_ver_date
));
12856 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->min_inbox_driver_ver_version
));
12858 if (ndr_flags
& NDR_BUFFERS
) {
12860 uint32_t _flags_save_string
= ndr
->flags
;
12861 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12862 if (r
->driver_name
) {
12863 uint32_t _relative_save_offset
;
12864 _relative_save_offset
= ndr
->offset
;
12865 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
12866 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12867 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
12868 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
12869 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
12870 ndr
->offset
= _relative_save_offset
;
12872 ndr
->flags
= _flags_save_string
;
12875 uint32_t _flags_save_string
= ndr
->flags
;
12876 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12877 if (r
->architecture
) {
12878 uint32_t _relative_save_offset
;
12879 _relative_save_offset
= ndr
->offset
;
12880 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
12881 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12882 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
12883 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
12884 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
12885 ndr
->offset
= _relative_save_offset
;
12887 ndr
->flags
= _flags_save_string
;
12890 uint32_t _flags_save_string
= ndr
->flags
;
12891 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12892 if (r
->driver_path
) {
12893 uint32_t _relative_save_offset
;
12894 _relative_save_offset
= ndr
->offset
;
12895 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
12896 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12897 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
12898 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
12899 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
12900 ndr
->offset
= _relative_save_offset
;
12902 ndr
->flags
= _flags_save_string
;
12905 uint32_t _flags_save_string
= ndr
->flags
;
12906 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12907 if (r
->data_file
) {
12908 uint32_t _relative_save_offset
;
12909 _relative_save_offset
= ndr
->offset
;
12910 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
12911 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12912 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
12913 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
12914 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
12915 ndr
->offset
= _relative_save_offset
;
12917 ndr
->flags
= _flags_save_string
;
12920 uint32_t _flags_save_string
= ndr
->flags
;
12921 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12922 if (r
->config_file
) {
12923 uint32_t _relative_save_offset
;
12924 _relative_save_offset
= ndr
->offset
;
12925 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
12926 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12927 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
12928 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
12929 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
12930 ndr
->offset
= _relative_save_offset
;
12932 ndr
->flags
= _flags_save_string
;
12935 uint32_t _flags_save_string
= ndr
->flags
;
12936 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12937 if (r
->help_file
) {
12938 uint32_t _relative_save_offset
;
12939 _relative_save_offset
= ndr
->offset
;
12940 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->help_file
));
12941 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12942 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
12943 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->help_file
));
12944 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
12945 ndr
->offset
= _relative_save_offset
;
12947 ndr
->flags
= _flags_save_string
;
12950 uint32_t _flags_save_string
= ndr
->flags
;
12951 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12952 if (r
->monitor_name
) {
12953 uint32_t _relative_save_offset
;
12954 _relative_save_offset
= ndr
->offset
;
12955 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
12956 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12957 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
12958 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
12959 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
12960 ndr
->offset
= _relative_save_offset
;
12962 ndr
->flags
= _flags_save_string
;
12965 uint32_t _flags_save_string
= ndr
->flags
;
12966 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12967 if (r
->default_datatype
) {
12968 uint32_t _relative_save_offset
;
12969 _relative_save_offset
= ndr
->offset
;
12970 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->default_datatype
));
12971 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12972 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
12973 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->default_datatype
));
12974 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
12975 ndr
->offset
= _relative_save_offset
;
12977 ndr
->flags
= _flags_save_string
;
12980 uint32_t _flags_save_string_array
= ndr
->flags
;
12981 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12982 if (r
->dependent_files
) {
12983 uint32_t _relative_save_offset
;
12984 _relative_save_offset
= ndr
->offset
;
12985 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dependent_files
));
12986 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12987 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
12988 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->dependent_files
));
12989 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
12990 ndr
->offset
= _relative_save_offset
;
12992 ndr
->flags
= _flags_save_string_array
;
12995 uint32_t _flags_save_string_array
= ndr
->flags
;
12996 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12997 if (r
->previous_names
) {
12998 uint32_t _relative_save_offset
;
12999 _relative_save_offset
= ndr
->offset
;
13000 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->previous_names
));
13001 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13002 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
13003 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->previous_names
));
13004 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
13005 ndr
->offset
= _relative_save_offset
;
13007 ndr
->flags
= _flags_save_string_array
;
13010 uint32_t _flags_save_string
= ndr
->flags
;
13011 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13012 if (r
->manufacturer_name
) {
13013 uint32_t _relative_save_offset
;
13014 _relative_save_offset
= ndr
->offset
;
13015 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->manufacturer_name
));
13016 _mem_save_manufacturer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13017 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_name
, 0);
13018 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->manufacturer_name
));
13019 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_name_0
, 0);
13020 ndr
->offset
= _relative_save_offset
;
13022 ndr
->flags
= _flags_save_string
;
13025 uint32_t _flags_save_string
= ndr
->flags
;
13026 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13027 if (r
->manufacturer_url
) {
13028 uint32_t _relative_save_offset
;
13029 _relative_save_offset
= ndr
->offset
;
13030 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->manufacturer_url
));
13031 _mem_save_manufacturer_url_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13032 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_url
, 0);
13033 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->manufacturer_url
));
13034 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_url_0
, 0);
13035 ndr
->offset
= _relative_save_offset
;
13037 ndr
->flags
= _flags_save_string
;
13040 uint32_t _flags_save_string
= ndr
->flags
;
13041 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13042 if (r
->hardware_id
) {
13043 uint32_t _relative_save_offset
;
13044 _relative_save_offset
= ndr
->offset
;
13045 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->hardware_id
));
13046 _mem_save_hardware_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13047 NDR_PULL_SET_MEM_CTX(ndr
, r
->hardware_id
, 0);
13048 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->hardware_id
));
13049 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hardware_id_0
, 0);
13050 ndr
->offset
= _relative_save_offset
;
13052 ndr
->flags
= _flags_save_string
;
13055 uint32_t _flags_save_string
= ndr
->flags
;
13056 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13058 uint32_t _relative_save_offset
;
13059 _relative_save_offset
= ndr
->offset
;
13060 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->provider
));
13061 _mem_save_provider_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13062 NDR_PULL_SET_MEM_CTX(ndr
, r
->provider
, 0);
13063 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->provider
));
13064 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_provider_0
, 0);
13065 ndr
->offset
= _relative_save_offset
;
13067 ndr
->flags
= _flags_save_string
;
13070 uint32_t _flags_save_string
= ndr
->flags
;
13071 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13072 if (r
->print_processor
) {
13073 uint32_t _relative_save_offset
;
13074 _relative_save_offset
= ndr
->offset
;
13075 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->print_processor
));
13076 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13077 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
13078 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->print_processor
));
13079 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
13080 ndr
->offset
= _relative_save_offset
;
13082 ndr
->flags
= _flags_save_string
;
13085 uint32_t _flags_save_string
= ndr
->flags
;
13086 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13087 if (r
->vendor_setup
) {
13088 uint32_t _relative_save_offset
;
13089 _relative_save_offset
= ndr
->offset
;
13090 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->vendor_setup
));
13091 _mem_save_vendor_setup_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13092 NDR_PULL_SET_MEM_CTX(ndr
, r
->vendor_setup
, 0);
13093 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->vendor_setup
));
13094 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_vendor_setup_0
, 0);
13095 ndr
->offset
= _relative_save_offset
;
13097 ndr
->flags
= _flags_save_string
;
13100 uint32_t _flags_save_string_array
= ndr
->flags
;
13101 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13102 if (r
->color_profiles
) {
13103 uint32_t _relative_save_offset
;
13104 _relative_save_offset
= ndr
->offset
;
13105 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->color_profiles
));
13106 _mem_save_color_profiles_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13107 NDR_PULL_SET_MEM_CTX(ndr
, r
->color_profiles
, 0);
13108 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->color_profiles
));
13109 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_color_profiles_0
, 0);
13110 ndr
->offset
= _relative_save_offset
;
13112 ndr
->flags
= _flags_save_string_array
;
13115 uint32_t _flags_save_string
= ndr
->flags
;
13116 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13118 uint32_t _relative_save_offset
;
13119 _relative_save_offset
= ndr
->offset
;
13120 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->inf_path
));
13121 _mem_save_inf_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13122 NDR_PULL_SET_MEM_CTX(ndr
, r
->inf_path
, 0);
13123 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->inf_path
));
13124 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_inf_path_0
, 0);
13125 ndr
->offset
= _relative_save_offset
;
13127 ndr
->flags
= _flags_save_string
;
13130 uint32_t _flags_save_string_array
= ndr
->flags
;
13131 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13132 if (r
->core_driver_dependencies
) {
13133 uint32_t _relative_save_offset
;
13134 _relative_save_offset
= ndr
->offset
;
13135 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->core_driver_dependencies
));
13136 _mem_save_core_driver_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13137 NDR_PULL_SET_MEM_CTX(ndr
, r
->core_driver_dependencies
, 0);
13138 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->core_driver_dependencies
));
13139 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_core_driver_dependencies_0
, 0);
13140 ndr
->offset
= _relative_save_offset
;
13142 ndr
->flags
= _flags_save_string_array
;
13145 return NDR_ERR_SUCCESS
;
13148 _PUBLIC_
void ndr_print_spoolss_DriverInfo8(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo8
*r
)
13150 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo8");
13152 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
13153 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
13155 if (r
->driver_name
) {
13156 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
13159 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
13161 if (r
->architecture
) {
13162 ndr_print_string(ndr
, "architecture", r
->architecture
);
13165 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
13167 if (r
->driver_path
) {
13168 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
13171 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
13173 if (r
->data_file
) {
13174 ndr_print_string(ndr
, "data_file", r
->data_file
);
13177 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
13179 if (r
->config_file
) {
13180 ndr_print_string(ndr
, "config_file", r
->config_file
);
13183 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
13185 if (r
->help_file
) {
13186 ndr_print_string(ndr
, "help_file", r
->help_file
);
13189 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
13191 if (r
->monitor_name
) {
13192 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
13195 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
13197 if (r
->default_datatype
) {
13198 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
13201 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
13203 if (r
->dependent_files
) {
13204 ndr_print_string_array(ndr
, "dependent_files", r
->dependent_files
);
13207 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
13209 if (r
->previous_names
) {
13210 ndr_print_string_array(ndr
, "previous_names", r
->previous_names
);
13213 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
13214 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
13215 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
13217 if (r
->manufacturer_name
) {
13218 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
13221 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
13223 if (r
->manufacturer_url
) {
13224 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
13227 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
13229 if (r
->hardware_id
) {
13230 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
13233 ndr_print_ptr(ndr
, "provider", r
->provider
);
13236 ndr_print_string(ndr
, "provider", r
->provider
);
13239 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
13241 if (r
->print_processor
) {
13242 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
13245 ndr_print_ptr(ndr
, "vendor_setup", r
->vendor_setup
);
13247 if (r
->vendor_setup
) {
13248 ndr_print_string(ndr
, "vendor_setup", r
->vendor_setup
);
13251 ndr_print_ptr(ndr
, "color_profiles", r
->color_profiles
);
13253 if (r
->color_profiles
) {
13254 ndr_print_string_array(ndr
, "color_profiles", r
->color_profiles
);
13257 ndr_print_ptr(ndr
, "inf_path", r
->inf_path
);
13260 ndr_print_string(ndr
, "inf_path", r
->inf_path
);
13263 ndr_print_uint32(ndr
, "printer_driver_attributes", r
->printer_driver_attributes
);
13264 ndr_print_ptr(ndr
, "core_driver_dependencies", r
->core_driver_dependencies
);
13266 if (r
->core_driver_dependencies
) {
13267 ndr_print_string_array(ndr
, "core_driver_dependencies", r
->core_driver_dependencies
);
13270 ndr_print_NTTIME(ndr
, "min_inbox_driver_ver_date", r
->min_inbox_driver_ver_date
);
13271 ndr_print_hyper(ndr
, "min_inbox_driver_ver_version", r
->min_inbox_driver_ver_version
);
13275 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo8(const struct spoolss_DriverInfo8
*r
, struct smb_iconv_convenience
*ic
, int flags
)
13277 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo8
, ic
);
13280 static enum ndr_err_code
ndr_push_spoolss_DriverFileType(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DriverFileType r
)
13282 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
13283 return NDR_ERR_SUCCESS
;
13286 static enum ndr_err_code
ndr_pull_spoolss_DriverFileType(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DriverFileType
*r
)
13289 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
13291 return NDR_ERR_SUCCESS
;
13294 _PUBLIC_
void ndr_print_spoolss_DriverFileType(struct ndr_print
*ndr
, const char *name
, enum spoolss_DriverFileType r
)
13296 const char *val
= NULL
;
13299 case SPOOLSS_DRIVER_FILE_TYPE_RENDERING
: val
= "SPOOLSS_DRIVER_FILE_TYPE_RENDERING"; break;
13300 case SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION
: val
= "SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION"; break;
13301 case SPOOLSS_DRIVER_FILE_TYPE_DATA
: val
= "SPOOLSS_DRIVER_FILE_TYPE_DATA"; break;
13302 case SPOOLSS_DRIVER_FILE_TYPE_HELP
: val
= "SPOOLSS_DRIVER_FILE_TYPE_HELP"; break;
13303 case SPOOLSS_DRIVER_FILE_TYPE_OTHER
: val
= "SPOOLSS_DRIVER_FILE_TYPE_OTHER"; break;
13305 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
13308 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverFileInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverFileInfo
*r
)
13310 if (ndr_flags
& NDR_SCALARS
) {
13311 NDR_CHECK(ndr_push_align(ndr
, 4));
13313 uint32_t _flags_save_string
= ndr
->flags
;
13314 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13315 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->file_name
));
13316 ndr
->flags
= _flags_save_string
;
13318 NDR_CHECK(ndr_push_spoolss_DriverFileType(ndr
, NDR_SCALARS
, r
->file_type
));
13319 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->file_version
));
13321 if (ndr_flags
& NDR_BUFFERS
) {
13323 uint32_t _flags_save_string
= ndr
->flags
;
13324 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13325 if (r
->file_name
) {
13326 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->file_name
));
13327 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->file_name
));
13329 ndr
->flags
= _flags_save_string
;
13332 return NDR_ERR_SUCCESS
;
13335 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverFileInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverFileInfo
*r
)
13337 uint32_t _ptr_file_name
;
13338 TALLOC_CTX
*_mem_save_file_name_0
;
13339 if (ndr_flags
& NDR_SCALARS
) {
13340 NDR_CHECK(ndr_pull_align(ndr
, 4));
13342 uint32_t _flags_save_string
= ndr
->flags
;
13343 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13344 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_file_name
));
13345 if (_ptr_file_name
) {
13346 NDR_PULL_ALLOC(ndr
, r
->file_name
);
13347 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->file_name
, _ptr_file_name
));
13349 r
->file_name
= NULL
;
13351 ndr
->flags
= _flags_save_string
;
13353 NDR_CHECK(ndr_pull_spoolss_DriverFileType(ndr
, NDR_SCALARS
, &r
->file_type
));
13354 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->file_version
));
13356 if (ndr_flags
& NDR_BUFFERS
) {
13358 uint32_t _flags_save_string
= ndr
->flags
;
13359 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13360 if (r
->file_name
) {
13361 uint32_t _relative_save_offset
;
13362 _relative_save_offset
= ndr
->offset
;
13363 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->file_name
));
13364 _mem_save_file_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13365 NDR_PULL_SET_MEM_CTX(ndr
, r
->file_name
, 0);
13366 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->file_name
));
13367 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_file_name_0
, 0);
13368 ndr
->offset
= _relative_save_offset
;
13370 ndr
->flags
= _flags_save_string
;
13373 return NDR_ERR_SUCCESS
;
13376 _PUBLIC_
void ndr_print_spoolss_DriverFileInfo(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverFileInfo
*r
)
13378 ndr_print_struct(ndr
, name
, "spoolss_DriverFileInfo");
13380 ndr_print_ptr(ndr
, "file_name", r
->file_name
);
13382 if (r
->file_name
) {
13383 ndr_print_string(ndr
, "file_name", r
->file_name
);
13386 ndr_print_spoolss_DriverFileType(ndr
, "file_type", r
->file_type
);
13387 ndr_print_uint32(ndr
, "file_version", r
->file_version
);
13391 _PUBLIC_
void ndr_print_spoolss_DriverInfo101(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo101
*r
)
13393 uint32_t cntr_file_info_1
;
13394 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo101");
13396 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
13397 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
13399 if (r
->driver_name
) {
13400 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
13403 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
13405 if (r
->architecture
) {
13406 ndr_print_string(ndr
, "architecture", r
->architecture
);
13409 ndr_print_ptr(ndr
, "file_info", r
->file_info
);
13411 if (r
->file_info
) {
13412 ndr
->print(ndr
, "%s: ARRAY(%d)", "file_info", (int)r
->file_count
);
13414 for (cntr_file_info_1
=0;cntr_file_info_1
<r
->file_count
;cntr_file_info_1
++) {
13416 if (asprintf(&idx_1
, "[%d]", cntr_file_info_1
) != -1) {
13417 ndr_print_spoolss_DriverFileInfo(ndr
, "file_info", &r
->file_info
[cntr_file_info_1
]);
13424 ndr_print_uint32(ndr
, "file_count", r
->file_count
);
13425 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
13427 if (r
->monitor_name
) {
13428 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
13431 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
13433 if (r
->default_datatype
) {
13434 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
13437 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
13439 if (r
->previous_names
) {
13440 ndr_print_string_array(ndr
, "previous_names", r
->previous_names
);
13443 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
13444 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
13445 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
13447 if (r
->manufacturer_name
) {
13448 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
13451 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
13453 if (r
->manufacturer_url
) {
13454 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
13457 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
13459 if (r
->hardware_id
) {
13460 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
13463 ndr_print_ptr(ndr
, "provider", r
->provider
);
13466 ndr_print_string(ndr
, "provider", r
->provider
);
13472 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo101(const struct spoolss_DriverInfo101
*r
, struct smb_iconv_convenience
*ic
, int flags
)
13474 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo101
, ic
);
13477 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_DriverInfo
*r
)
13479 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
13480 if (ndr_flags
& NDR_SCALARS
) {
13481 int level
= ndr_push_get_switch_value(ndr
, r
);
13484 NDR_CHECK(ndr_push_align(ndr
, 4));
13485 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13486 NDR_CHECK(ndr_push_spoolss_DriverInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
13490 NDR_CHECK(ndr_push_align(ndr
, 4));
13491 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13492 NDR_CHECK(ndr_push_spoolss_DriverInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
13496 NDR_CHECK(ndr_push_align(ndr
, 4));
13497 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13498 NDR_CHECK(ndr_push_spoolss_DriverInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
13502 NDR_CHECK(ndr_push_align(ndr
, 4));
13503 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13504 NDR_CHECK(ndr_push_spoolss_DriverInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
13508 NDR_CHECK(ndr_push_align(ndr
, 4));
13509 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13510 NDR_CHECK(ndr_push_spoolss_DriverInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
13514 NDR_CHECK(ndr_push_align(ndr
, 8));
13515 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13516 NDR_CHECK(ndr_push_spoolss_DriverInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
13520 NDR_CHECK(ndr_push_align(ndr
, 8));
13521 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13522 NDR_CHECK(ndr_push_spoolss_DriverInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
13526 NDR_CHECK(ndr_push_align(ndr
, 8));
13527 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13528 NDR_CHECK(ndr_push_spoolss_DriverInfo101(ndr
, NDR_SCALARS
, &r
->info101
));
13536 if (ndr_flags
& NDR_BUFFERS
) {
13537 int level
= ndr_push_get_switch_value(ndr
, r
);
13538 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
13541 NDR_CHECK(ndr_push_spoolss_DriverInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
13545 NDR_CHECK(ndr_push_spoolss_DriverInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
13549 NDR_CHECK(ndr_push_spoolss_DriverInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
13553 NDR_CHECK(ndr_push_spoolss_DriverInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
13557 NDR_CHECK(ndr_push_spoolss_DriverInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
13561 NDR_CHECK(ndr_push_spoolss_DriverInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
13565 NDR_CHECK(ndr_push_spoolss_DriverInfo8(ndr
, NDR_BUFFERS
, &r
->info8
));
13569 NDR_CHECK(ndr_push_spoolss_DriverInfo101(ndr
, NDR_BUFFERS
, &r
->info101
));
13577 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
13578 return NDR_ERR_SUCCESS
;
13581 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_DriverInfo
*r
)
13583 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
13585 level
= ndr_pull_get_switch_value(ndr
, r
);
13586 if (ndr_flags
& NDR_SCALARS
) {
13589 NDR_CHECK(ndr_pull_align(ndr
, 4));
13590 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13591 NDR_CHECK(ndr_pull_spoolss_DriverInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
13595 NDR_CHECK(ndr_pull_align(ndr
, 4));
13596 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13597 NDR_CHECK(ndr_pull_spoolss_DriverInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
13601 NDR_CHECK(ndr_pull_align(ndr
, 4));
13602 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13603 NDR_CHECK(ndr_pull_spoolss_DriverInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
13607 NDR_CHECK(ndr_pull_align(ndr
, 4));
13608 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13609 NDR_CHECK(ndr_pull_spoolss_DriverInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
13613 NDR_CHECK(ndr_pull_align(ndr
, 4));
13614 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13615 NDR_CHECK(ndr_pull_spoolss_DriverInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
13619 NDR_CHECK(ndr_pull_align(ndr
, 8));
13620 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13621 NDR_CHECK(ndr_pull_spoolss_DriverInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
13625 NDR_CHECK(ndr_pull_align(ndr
, 8));
13626 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13627 NDR_CHECK(ndr_pull_spoolss_DriverInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
13631 NDR_CHECK(ndr_pull_align(ndr
, 8));
13632 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13633 NDR_CHECK(ndr_pull_spoolss_DriverInfo101(ndr
, NDR_SCALARS
, &r
->info101
));
13641 if (ndr_flags
& NDR_BUFFERS
) {
13642 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
13645 NDR_CHECK(ndr_pull_spoolss_DriverInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
13649 NDR_CHECK(ndr_pull_spoolss_DriverInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
13653 NDR_CHECK(ndr_pull_spoolss_DriverInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
13657 NDR_CHECK(ndr_pull_spoolss_DriverInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
13661 NDR_CHECK(ndr_pull_spoolss_DriverInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
13665 NDR_CHECK(ndr_pull_spoolss_DriverInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
13669 NDR_CHECK(ndr_pull_spoolss_DriverInfo8(ndr
, NDR_BUFFERS
, &r
->info8
));
13673 NDR_CHECK(ndr_pull_spoolss_DriverInfo101(ndr
, NDR_BUFFERS
, &r
->info101
));
13681 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
13682 return NDR_ERR_SUCCESS
;
13685 _PUBLIC_
void ndr_print_spoolss_DriverInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_DriverInfo
*r
)
13688 level
= ndr_print_get_switch_value(ndr
, r
);
13689 ndr_print_union(ndr
, name
, level
, "spoolss_DriverInfo");
13692 ndr_print_spoolss_DriverInfo1(ndr
, "info1", &r
->info1
);
13696 ndr_print_spoolss_DriverInfo2(ndr
, "info2", &r
->info2
);
13700 ndr_print_spoolss_DriverInfo3(ndr
, "info3", &r
->info3
);
13704 ndr_print_spoolss_DriverInfo4(ndr
, "info4", &r
->info4
);
13708 ndr_print_spoolss_DriverInfo5(ndr
, "info5", &r
->info5
);
13712 ndr_print_spoolss_DriverInfo6(ndr
, "info6", &r
->info6
);
13716 ndr_print_spoolss_DriverInfo8(ndr
, "info8", &r
->info8
);
13720 ndr_print_spoolss_DriverInfo101(ndr
, "info101", &r
->info101
);
13729 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo(const union spoolss_DriverInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
13731 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo
, ic
);
13734 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverDirectoryInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverDirectoryInfo1
*r
)
13736 if (ndr_flags
& NDR_SCALARS
) {
13737 NDR_CHECK(ndr_push_align(ndr
, 4));
13739 uint32_t _flags_save_string
= ndr
->flags
;
13740 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13741 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->directory_name
));
13742 ndr
->flags
= _flags_save_string
;
13745 if (ndr_flags
& NDR_BUFFERS
) {
13747 return NDR_ERR_SUCCESS
;
13750 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverDirectoryInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverDirectoryInfo1
*r
)
13752 if (ndr_flags
& NDR_SCALARS
) {
13753 NDR_CHECK(ndr_pull_align(ndr
, 4));
13755 uint32_t _flags_save_string
= ndr
->flags
;
13756 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13757 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->directory_name
));
13758 ndr
->flags
= _flags_save_string
;
13761 if (ndr_flags
& NDR_BUFFERS
) {
13763 return NDR_ERR_SUCCESS
;
13766 _PUBLIC_
void ndr_print_spoolss_DriverDirectoryInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverDirectoryInfo1
*r
)
13768 ndr_print_struct(ndr
, name
, "spoolss_DriverDirectoryInfo1");
13770 ndr_print_string(ndr
, "directory_name", r
->directory_name
);
13774 _PUBLIC_
size_t ndr_size_spoolss_DriverDirectoryInfo1(const struct spoolss_DriverDirectoryInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
13776 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverDirectoryInfo1
, ic
);
13779 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverDirectoryInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_DriverDirectoryInfo
*r
)
13781 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
13782 if (ndr_flags
& NDR_SCALARS
) {
13783 int level
= ndr_push_get_switch_value(ndr
, r
);
13786 NDR_CHECK(ndr_push_align(ndr
, 4));
13787 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13788 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
13792 NDR_CHECK(ndr_push_align(ndr
, 4));
13793 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13794 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
13799 if (ndr_flags
& NDR_BUFFERS
) {
13800 int level
= ndr_push_get_switch_value(ndr
, r
);
13801 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
13811 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
13812 return NDR_ERR_SUCCESS
;
13815 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverDirectoryInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_DriverDirectoryInfo
*r
)
13817 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
13819 level
= ndr_pull_get_switch_value(ndr
, r
);
13820 if (ndr_flags
& NDR_SCALARS
) {
13823 NDR_CHECK(ndr_pull_align(ndr
, 4));
13824 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13825 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
13829 NDR_CHECK(ndr_pull_align(ndr
, 4));
13830 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13831 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
13836 if (ndr_flags
& NDR_BUFFERS
) {
13837 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
13847 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
13848 return NDR_ERR_SUCCESS
;
13851 _PUBLIC_
void ndr_print_spoolss_DriverDirectoryInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_DriverDirectoryInfo
*r
)
13854 level
= ndr_print_get_switch_value(ndr
, r
);
13855 ndr_print_union(ndr
, name
, level
, "spoolss_DriverDirectoryInfo");
13858 ndr_print_spoolss_DriverDirectoryInfo1(ndr
, "info1", &r
->info1
);
13862 ndr_print_spoolss_DriverDirectoryInfo1(ndr
, "info1", &r
->info1
);
13868 _PUBLIC_
size_t ndr_size_spoolss_DriverDirectoryInfo(const union spoolss_DriverDirectoryInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
13870 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverDirectoryInfo
, ic
);
13873 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrintProcessorInfo1
*r
)
13875 if (ndr_flags
& NDR_SCALARS
) {
13876 NDR_CHECK(ndr_push_align(ndr
, 4));
13878 uint32_t _flags_save_string
= ndr
->flags
;
13879 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13880 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->print_processor_name
));
13881 ndr
->flags
= _flags_save_string
;
13884 if (ndr_flags
& NDR_BUFFERS
) {
13886 uint32_t _flags_save_string
= ndr
->flags
;
13887 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13888 if (r
->print_processor_name
) {
13889 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->print_processor_name
));
13890 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->print_processor_name
));
13892 ndr
->flags
= _flags_save_string
;
13895 return NDR_ERR_SUCCESS
;
13898 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcessorInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrintProcessorInfo1
*r
)
13900 uint32_t _ptr_print_processor_name
;
13901 TALLOC_CTX
*_mem_save_print_processor_name_0
;
13902 if (ndr_flags
& NDR_SCALARS
) {
13903 NDR_CHECK(ndr_pull_align(ndr
, 4));
13905 uint32_t _flags_save_string
= ndr
->flags
;
13906 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13907 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor_name
));
13908 if (_ptr_print_processor_name
) {
13909 NDR_PULL_ALLOC(ndr
, r
->print_processor_name
);
13910 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->print_processor_name
, _ptr_print_processor_name
));
13912 r
->print_processor_name
= NULL
;
13914 ndr
->flags
= _flags_save_string
;
13917 if (ndr_flags
& NDR_BUFFERS
) {
13919 uint32_t _flags_save_string
= ndr
->flags
;
13920 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13921 if (r
->print_processor_name
) {
13922 uint32_t _relative_save_offset
;
13923 _relative_save_offset
= ndr
->offset
;
13924 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->print_processor_name
));
13925 _mem_save_print_processor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13926 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor_name
, 0);
13927 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->print_processor_name
));
13928 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_name_0
, 0);
13929 ndr
->offset
= _relative_save_offset
;
13931 ndr
->flags
= _flags_save_string
;
13934 return NDR_ERR_SUCCESS
;
13937 _PUBLIC_
void ndr_print_spoolss_PrintProcessorInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrintProcessorInfo1
*r
)
13939 ndr_print_struct(ndr
, name
, "spoolss_PrintProcessorInfo1");
13941 ndr_print_ptr(ndr
, "print_processor_name", r
->print_processor_name
);
13943 if (r
->print_processor_name
) {
13944 ndr_print_string(ndr
, "print_processor_name", r
->print_processor_name
);
13950 _PUBLIC_
size_t ndr_size_spoolss_PrintProcessorInfo1(const struct spoolss_PrintProcessorInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
13952 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrintProcessorInfo1
, ic
);
13955 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcessorInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrintProcessorInfo
*r
)
13957 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
13958 if (ndr_flags
& NDR_SCALARS
) {
13959 int level
= ndr_push_get_switch_value(ndr
, r
);
13962 NDR_CHECK(ndr_push_align(ndr
, 4));
13963 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13964 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
13972 if (ndr_flags
& NDR_BUFFERS
) {
13973 int level
= ndr_push_get_switch_value(ndr
, r
);
13974 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
13977 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
13985 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
13986 return NDR_ERR_SUCCESS
;
13989 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcessorInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrintProcessorInfo
*r
)
13991 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
13993 level
= ndr_pull_get_switch_value(ndr
, r
);
13994 if (ndr_flags
& NDR_SCALARS
) {
13997 NDR_CHECK(ndr_pull_align(ndr
, 4));
13998 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
13999 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
14007 if (ndr_flags
& NDR_BUFFERS
) {
14008 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
14011 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
14019 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
14020 return NDR_ERR_SUCCESS
;
14023 _PUBLIC_
void ndr_print_spoolss_PrintProcessorInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrintProcessorInfo
*r
)
14026 level
= ndr_print_get_switch_value(ndr
, r
);
14027 ndr_print_union(ndr
, name
, level
, "spoolss_PrintProcessorInfo");
14030 ndr_print_spoolss_PrintProcessorInfo1(ndr
, "info1", &r
->info1
);
14039 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcessorDirectoryInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrintProcessorDirectoryInfo1
*r
)
14041 if (ndr_flags
& NDR_SCALARS
) {
14042 NDR_CHECK(ndr_push_align(ndr
, 4));
14044 uint32_t _flags_save_string
= ndr
->flags
;
14045 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14046 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->directory_name
));
14047 ndr
->flags
= _flags_save_string
;
14050 if (ndr_flags
& NDR_BUFFERS
) {
14052 return NDR_ERR_SUCCESS
;
14055 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcessorDirectoryInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrintProcessorDirectoryInfo1
*r
)
14057 if (ndr_flags
& NDR_SCALARS
) {
14058 NDR_CHECK(ndr_pull_align(ndr
, 4));
14060 uint32_t _flags_save_string
= ndr
->flags
;
14061 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14062 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->directory_name
));
14063 ndr
->flags
= _flags_save_string
;
14066 if (ndr_flags
& NDR_BUFFERS
) {
14068 return NDR_ERR_SUCCESS
;
14071 _PUBLIC_
void ndr_print_spoolss_PrintProcessorDirectoryInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrintProcessorDirectoryInfo1
*r
)
14073 ndr_print_struct(ndr
, name
, "spoolss_PrintProcessorDirectoryInfo1");
14075 ndr_print_string(ndr
, "directory_name", r
->directory_name
);
14079 _PUBLIC_
size_t ndr_size_spoolss_PrintProcessorDirectoryInfo1(const struct spoolss_PrintProcessorDirectoryInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
14081 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrintProcessorDirectoryInfo1
, ic
);
14084 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcessorDirectoryInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrintProcessorDirectoryInfo
*r
)
14086 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
14087 if (ndr_flags
& NDR_SCALARS
) {
14088 int level
= ndr_push_get_switch_value(ndr
, r
);
14091 NDR_CHECK(ndr_push_align(ndr
, 4));
14092 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
14093 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
14097 NDR_CHECK(ndr_push_align(ndr
, 4));
14098 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
14099 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
14104 if (ndr_flags
& NDR_BUFFERS
) {
14105 int level
= ndr_push_get_switch_value(ndr
, r
);
14106 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
14116 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
14117 return NDR_ERR_SUCCESS
;
14120 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcessorDirectoryInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrintProcessorDirectoryInfo
*r
)
14122 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
14124 level
= ndr_pull_get_switch_value(ndr
, r
);
14125 if (ndr_flags
& NDR_SCALARS
) {
14128 NDR_CHECK(ndr_pull_align(ndr
, 4));
14129 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
14130 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
14134 NDR_CHECK(ndr_pull_align(ndr
, 4));
14135 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
14136 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
14141 if (ndr_flags
& NDR_BUFFERS
) {
14142 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
14152 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
14153 return NDR_ERR_SUCCESS
;
14156 _PUBLIC_
void ndr_print_spoolss_PrintProcessorDirectoryInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrintProcessorDirectoryInfo
*r
)
14159 level
= ndr_print_get_switch_value(ndr
, r
);
14160 ndr_print_union(ndr
, name
, level
, "spoolss_PrintProcessorDirectoryInfo");
14163 ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr
, "info1", &r
->info1
);
14167 ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr
, "info1", &r
->info1
);
14173 _PUBLIC_
size_t ndr_size_spoolss_PrintProcessorDirectoryInfo(const union spoolss_PrintProcessorDirectoryInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
14175 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrintProcessorDirectoryInfo
, ic
);
14178 static enum ndr_err_code
ndr_push_spoolss_DocumentInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DocumentInfo1
*r
)
14180 if (ndr_flags
& NDR_SCALARS
) {
14181 NDR_CHECK(ndr_push_align(ndr
, 4));
14182 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->document_name
));
14183 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->output_file
));
14184 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->datatype
));
14186 if (ndr_flags
& NDR_BUFFERS
) {
14187 if (r
->document_name
) {
14188 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
14189 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14190 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
14191 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->document_name
, ndr_charset_length(r
->document_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
14193 if (r
->output_file
) {
14194 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->output_file
, CH_UTF16
)));
14195 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14196 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->output_file
, CH_UTF16
)));
14197 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->output_file
, ndr_charset_length(r
->output_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
14200 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->datatype
, CH_UTF16
)));
14201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
14202 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->datatype
, CH_UTF16
)));
14203 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->datatype
, ndr_charset_length(r
->datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
14206 return NDR_ERR_SUCCESS
;
14209 static enum ndr_err_code
ndr_pull_spoolss_DocumentInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DocumentInfo1
*r
)
14211 uint32_t _ptr_document_name
;
14212 TALLOC_CTX
*_mem_save_document_name_0
;
14213 uint32_t _ptr_output_file
;
14214 TALLOC_CTX
*_mem_save_output_file_0
;
14215 uint32_t _ptr_datatype
;
14216 TALLOC_CTX
*_mem_save_datatype_0
;
14217 if (ndr_flags
& NDR_SCALARS
) {
14218 NDR_CHECK(ndr_pull_align(ndr
, 4));
14219 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
14220 if (_ptr_document_name
) {
14221 NDR_PULL_ALLOC(ndr
, r
->document_name
);
14223 r
->document_name
= NULL
;
14225 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_output_file
));
14226 if (_ptr_output_file
) {
14227 NDR_PULL_ALLOC(ndr
, r
->output_file
);
14229 r
->output_file
= NULL
;
14231 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
14232 if (_ptr_datatype
) {
14233 NDR_PULL_ALLOC(ndr
, r
->datatype
);
14235 r
->datatype
= NULL
;
14238 if (ndr_flags
& NDR_BUFFERS
) {
14239 if (r
->document_name
) {
14240 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14241 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
14242 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->document_name
));
14243 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->document_name
));
14244 if (ndr_get_array_length(ndr
, &r
->document_name
) > ndr_get_array_size(ndr
, &r
->document_name
)) {
14245 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
));
14247 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t)));
14248 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->document_name
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t), CH_UTF16
));
14249 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
14251 if (r
->output_file
) {
14252 _mem_save_output_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14253 NDR_PULL_SET_MEM_CTX(ndr
, r
->output_file
, 0);
14254 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->output_file
));
14255 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->output_file
));
14256 if (ndr_get_array_length(ndr
, &r
->output_file
) > ndr_get_array_size(ndr
, &r
->output_file
)) {
14257 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
));
14259 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->output_file
), sizeof(uint16_t)));
14260 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->output_file
, ndr_get_array_length(ndr
, &r
->output_file
), sizeof(uint16_t), CH_UTF16
));
14261 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_output_file_0
, 0);
14264 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14265 NDR_PULL_SET_MEM_CTX(ndr
, r
->datatype
, 0);
14266 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->datatype
));
14267 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->datatype
));
14268 if (ndr_get_array_length(ndr
, &r
->datatype
) > ndr_get_array_size(ndr
, &r
->datatype
)) {
14269 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
));
14271 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->datatype
), sizeof(uint16_t)));
14272 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->datatype
, ndr_get_array_length(ndr
, &r
->datatype
), sizeof(uint16_t), CH_UTF16
));
14273 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
14276 return NDR_ERR_SUCCESS
;
14279 _PUBLIC_
void ndr_print_spoolss_DocumentInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DocumentInfo1
*r
)
14281 ndr_print_struct(ndr
, name
, "spoolss_DocumentInfo1");
14283 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
14285 if (r
->document_name
) {
14286 ndr_print_string(ndr
, "document_name", r
->document_name
);
14289 ndr_print_ptr(ndr
, "output_file", r
->output_file
);
14291 if (r
->output_file
) {
14292 ndr_print_string(ndr
, "output_file", r
->output_file
);
14295 ndr_print_ptr(ndr
, "datatype", r
->datatype
);
14298 ndr_print_string(ndr
, "datatype", r
->datatype
);
14304 static enum ndr_err_code
ndr_push_spoolss_DocumentInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_DocumentInfo
*r
)
14306 if (ndr_flags
& NDR_SCALARS
) {
14307 int level
= ndr_push_get_switch_value(ndr
, r
);
14308 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
14311 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
14325 if (ndr_flags
& NDR_BUFFERS
) {
14326 int level
= ndr_push_get_switch_value(ndr
, r
);
14330 NDR_CHECK(ndr_push_spoolss_DocumentInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
14345 return NDR_ERR_SUCCESS
;
14348 static enum ndr_err_code
ndr_pull_spoolss_DocumentInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_DocumentInfo
*r
)
14352 TALLOC_CTX
*_mem_save_info1_0
;
14353 level
= ndr_pull_get_switch_value(ndr
, r
);
14354 if (ndr_flags
& NDR_SCALARS
) {
14355 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
14356 if (_level
!= level
) {
14357 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
14361 uint32_t _ptr_info1
;
14362 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
14364 NDR_PULL_ALLOC(ndr
, r
->info1
);
14381 if (ndr_flags
& NDR_BUFFERS
) {
14385 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14386 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
14387 NDR_CHECK(ndr_pull_spoolss_DocumentInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
14388 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
14403 return NDR_ERR_SUCCESS
;
14406 _PUBLIC_
void ndr_print_spoolss_DocumentInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_DocumentInfo
*r
)
14409 level
= ndr_print_get_switch_value(ndr
, r
);
14410 ndr_print_union(ndr
, name
, level
, "spoolss_DocumentInfo");
14413 ndr_print_ptr(ndr
, "info1", r
->info1
);
14416 ndr_print_spoolss_DocumentInfo1(ndr
, "info1", r
->info1
);
14433 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_OSVersion(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_OSVersion
*r
)
14435 if (ndr_flags
& NDR_SCALARS
) {
14436 NDR_CHECK(ndr_push_align(ndr
, 4));
14437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_spoolss_OSVersion(r
, ndr
->iconv_convenience
, ndr
->flags
)));
14438 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->major
));
14439 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->minor
));
14440 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->build
));
14441 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
14443 uint32_t _flags_save_string
= ndr
->flags
;
14444 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14446 struct ndr_push
*_ndr_extra_string
;
14447 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_extra_string
, 0, 256));
14448 NDR_CHECK(ndr_push_string(_ndr_extra_string
, NDR_SCALARS
, r
->extra_string
));
14449 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_extra_string
, 0, 256));
14451 ndr
->flags
= _flags_save_string
;
14454 if (ndr_flags
& NDR_BUFFERS
) {
14456 return NDR_ERR_SUCCESS
;
14459 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_OSVersion(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_OSVersion
*r
)
14461 if (ndr_flags
& NDR_SCALARS
) {
14462 NDR_CHECK(ndr_pull_align(ndr
, 4));
14463 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size
));
14464 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->major
));
14465 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->minor
));
14466 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->build
));
14467 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown
));
14469 uint32_t _flags_save_string
= ndr
->flags
;
14470 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14472 struct ndr_pull
*_ndr_extra_string
;
14473 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_extra_string
, 0, 256));
14474 NDR_CHECK(ndr_pull_string(_ndr_extra_string
, NDR_SCALARS
, &r
->extra_string
));
14475 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_extra_string
, 0, 256));
14477 ndr
->flags
= _flags_save_string
;
14480 if (ndr_flags
& NDR_BUFFERS
) {
14482 return NDR_ERR_SUCCESS
;
14485 _PUBLIC_
void ndr_print_spoolss_OSVersion(struct ndr_print
*ndr
, const char *name
, const struct spoolss_OSVersion
*r
)
14487 ndr_print_struct(ndr
, name
, "spoolss_OSVersion");
14489 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
);
14490 ndr_print_uint32(ndr
, "major", r
->major
);
14491 ndr_print_uint32(ndr
, "minor", r
->minor
);
14492 ndr_print_uint32(ndr
, "build", r
->build
);
14493 ndr_print_uint32(ndr
, "unknown", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->unknown
);
14494 ndr_print_string(ndr
, "extra_string", r
->extra_string
);
14498 _PUBLIC_
size_t ndr_size_spoolss_OSVersion(const struct spoolss_OSVersion
*r
, struct smb_iconv_convenience
*ic
, int flags
)
14500 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_OSVersion
, ic
);
14503 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_OSVersionEx(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_OSVersionEx
*r
)
14505 if (ndr_flags
& NDR_SCALARS
) {
14506 NDR_CHECK(ndr_push_align(ndr
, 4));
14507 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_spoolss_OSVersionEx(r
, ndr
->iconv_convenience
, ndr
->flags
)));
14508 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->major
));
14509 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->minor
));
14510 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->build
));
14511 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
14513 uint32_t _flags_save_string
= ndr
->flags
;
14514 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14516 struct ndr_push
*_ndr_extra_string
;
14517 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_extra_string
, 0, 256));
14518 NDR_CHECK(ndr_push_string(_ndr_extra_string
, NDR_SCALARS
, r
->extra_string
));
14519 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_extra_string
, 0, 256));
14521 ndr
->flags
= _flags_save_string
;
14523 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown2
));
14524 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->unknown3
));
14526 if (ndr_flags
& NDR_BUFFERS
) {
14528 return NDR_ERR_SUCCESS
;
14531 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_OSVersionEx(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_OSVersionEx
*r
)
14533 if (ndr_flags
& NDR_SCALARS
) {
14534 NDR_CHECK(ndr_pull_align(ndr
, 4));
14535 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size
));
14536 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->major
));
14537 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->minor
));
14538 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->build
));
14539 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown1
));
14541 uint32_t _flags_save_string
= ndr
->flags
;
14542 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14544 struct ndr_pull
*_ndr_extra_string
;
14545 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_extra_string
, 0, 256));
14546 NDR_CHECK(ndr_pull_string(_ndr_extra_string
, NDR_SCALARS
, &r
->extra_string
));
14547 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_extra_string
, 0, 256));
14549 ndr
->flags
= _flags_save_string
;
14551 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown2
));
14552 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->unknown3
));
14554 if (ndr_flags
& NDR_BUFFERS
) {
14556 return NDR_ERR_SUCCESS
;
14559 _PUBLIC_
void ndr_print_spoolss_OSVersionEx(struct ndr_print
*ndr
, const char *name
, const struct spoolss_OSVersionEx
*r
)
14561 ndr_print_struct(ndr
, name
, "spoolss_OSVersionEx");
14563 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
);
14564 ndr_print_uint32(ndr
, "major", r
->major
);
14565 ndr_print_uint32(ndr
, "minor", r
->minor
);
14566 ndr_print_uint32(ndr
, "build", r
->build
);
14567 ndr_print_uint32(ndr
, "unknown1", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->unknown1
);
14568 ndr_print_string(ndr
, "extra_string", r
->extra_string
);
14569 ndr_print_uint32(ndr
, "unknown2", r
->unknown2
);
14570 ndr_print_uint32(ndr
, "unknown3", r
->unknown3
);
14574 _PUBLIC_
size_t ndr_size_spoolss_OSVersionEx(const struct spoolss_OSVersionEx
*r
, struct smb_iconv_convenience
*ic
, int flags
)
14576 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_OSVersionEx
, ic
);
14579 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterData(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrinterData
*r
)
14581 if (ndr_flags
& NDR_SCALARS
) {
14582 int level
= ndr_push_get_switch_value(ndr
, r
);
14589 uint32_t _flags_save_string
= ndr
->flags
;
14590 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14591 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->string
));
14592 ndr
->flags
= _flags_save_string
;
14598 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
14599 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
14600 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->binary
));
14601 ndr
->flags
= _flags_save_DATA_BLOB
;
14606 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->value
));
14609 case REG_MULTI_SZ
: {
14611 uint32_t _flags_save_string_array
= ndr
->flags
;
14612 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14613 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->string_array
));
14614 ndr
->flags
= _flags_save_string_array
;
14620 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
14621 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
14622 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->data
));
14623 ndr
->flags
= _flags_save_DATA_BLOB
;
14629 if (ndr_flags
& NDR_BUFFERS
) {
14630 int level
= ndr_push_get_switch_value(ndr
, r
);
14652 return NDR_ERR_SUCCESS
;
14655 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterData(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrinterData
*r
)
14658 level
= ndr_pull_get_switch_value(ndr
, r
);
14659 if (ndr_flags
& NDR_SCALARS
) {
14666 uint32_t _flags_save_string
= ndr
->flags
;
14667 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14668 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->string
));
14669 ndr
->flags
= _flags_save_string
;
14675 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
14676 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
14677 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->binary
));
14678 ndr
->flags
= _flags_save_DATA_BLOB
;
14683 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->value
));
14686 case REG_MULTI_SZ
: {
14688 uint32_t _flags_save_string_array
= ndr
->flags
;
14689 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14690 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->string_array
));
14691 ndr
->flags
= _flags_save_string_array
;
14697 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
14698 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
14699 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->data
));
14700 ndr
->flags
= _flags_save_DATA_BLOB
;
14706 if (ndr_flags
& NDR_BUFFERS
) {
14728 return NDR_ERR_SUCCESS
;
14731 _PUBLIC_
void ndr_print_spoolss_PrinterData(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrinterData
*r
)
14734 level
= ndr_print_get_switch_value(ndr
, r
);
14735 ndr_print_union(ndr
, name
, level
, "spoolss_PrinterData");
14741 ndr_print_string(ndr
, "string", r
->string
);
14745 ndr_print_DATA_BLOB(ndr
, "binary", r
->binary
);
14749 ndr_print_uint32(ndr
, "value", r
->value
);
14753 ndr_print_string_array(ndr
, "string_array", r
->string_array
);
14757 ndr_print_DATA_BLOB(ndr
, "data", r
->data
);
14763 _PUBLIC_
size_t ndr_size_spoolss_PrinterData(const union spoolss_PrinterData
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
14765 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterData
, ic
);
14768 static enum ndr_err_code
ndr_push_spoolss_FormFlags(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_FormFlags r
)
14770 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
14771 return NDR_ERR_SUCCESS
;
14774 static enum ndr_err_code
ndr_pull_spoolss_FormFlags(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_FormFlags
*r
)
14777 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
14779 return NDR_ERR_SUCCESS
;
14782 _PUBLIC_
void ndr_print_spoolss_FormFlags(struct ndr_print
*ndr
, const char *name
, enum spoolss_FormFlags r
)
14784 const char *val
= NULL
;
14787 case SPOOLSS_FORM_USER
: val
= "SPOOLSS_FORM_USER"; break;
14788 case SPOOLSS_FORM_BUILTIN
: val
= "SPOOLSS_FORM_BUILTIN"; break;
14789 case SPOOLSS_FORM_PRINTER
: val
= "SPOOLSS_FORM_PRINTER"; break;
14791 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
14794 static enum ndr_err_code
ndr_push_spoolss_FormSize(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_FormSize
*r
)
14796 if (ndr_flags
& NDR_SCALARS
) {
14797 NDR_CHECK(ndr_push_align(ndr
, 4));
14798 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->width
));
14799 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->height
));
14801 if (ndr_flags
& NDR_BUFFERS
) {
14803 return NDR_ERR_SUCCESS
;
14806 static enum ndr_err_code
ndr_pull_spoolss_FormSize(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_FormSize
*r
)
14808 if (ndr_flags
& NDR_SCALARS
) {
14809 NDR_CHECK(ndr_pull_align(ndr
, 4));
14810 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->width
));
14811 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->height
));
14813 if (ndr_flags
& NDR_BUFFERS
) {
14815 return NDR_ERR_SUCCESS
;
14818 _PUBLIC_
void ndr_print_spoolss_FormSize(struct ndr_print
*ndr
, const char *name
, const struct spoolss_FormSize
*r
)
14820 ndr_print_struct(ndr
, name
, "spoolss_FormSize");
14822 ndr_print_uint32(ndr
, "width", r
->width
);
14823 ndr_print_uint32(ndr
, "height", r
->height
);
14827 static enum ndr_err_code
ndr_push_spoolss_FormArea(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_FormArea
*r
)
14829 if (ndr_flags
& NDR_SCALARS
) {
14830 NDR_CHECK(ndr_push_align(ndr
, 4));
14831 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->left
));
14832 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->top
));
14833 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->right
));
14834 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bottom
));
14836 if (ndr_flags
& NDR_BUFFERS
) {
14838 return NDR_ERR_SUCCESS
;
14841 static enum ndr_err_code
ndr_pull_spoolss_FormArea(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_FormArea
*r
)
14843 if (ndr_flags
& NDR_SCALARS
) {
14844 NDR_CHECK(ndr_pull_align(ndr
, 4));
14845 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->left
));
14846 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->top
));
14847 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->right
));
14848 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bottom
));
14850 if (ndr_flags
& NDR_BUFFERS
) {
14852 return NDR_ERR_SUCCESS
;
14855 _PUBLIC_
void ndr_print_spoolss_FormArea(struct ndr_print
*ndr
, const char *name
, const struct spoolss_FormArea
*r
)
14857 ndr_print_struct(ndr
, name
, "spoolss_FormArea");
14859 ndr_print_uint32(ndr
, "left", r
->left
);
14860 ndr_print_uint32(ndr
, "top", r
->top
);
14861 ndr_print_uint32(ndr
, "right", r
->right
);
14862 ndr_print_uint32(ndr
, "bottom", r
->bottom
);
14866 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_FormInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_FormInfo1
*r
)
14868 if (ndr_flags
& NDR_SCALARS
) {
14869 NDR_CHECK(ndr_push_align(ndr
, 4));
14870 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr
, NDR_SCALARS
, r
->flags
));
14872 uint32_t _flags_save_string
= ndr
->flags
;
14873 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14874 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->form_name
));
14875 ndr
->flags
= _flags_save_string
;
14877 NDR_CHECK(ndr_push_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
14878 NDR_CHECK(ndr_push_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
14880 if (ndr_flags
& NDR_BUFFERS
) {
14882 uint32_t _flags_save_string
= ndr
->flags
;
14883 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14884 if (r
->form_name
) {
14885 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->form_name
));
14886 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->form_name
));
14888 ndr
->flags
= _flags_save_string
;
14891 return NDR_ERR_SUCCESS
;
14894 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_FormInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_FormInfo1
*r
)
14896 uint32_t _ptr_form_name
;
14897 TALLOC_CTX
*_mem_save_form_name_0
;
14898 if (ndr_flags
& NDR_SCALARS
) {
14899 NDR_CHECK(ndr_pull_align(ndr
, 4));
14900 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr
, NDR_SCALARS
, &r
->flags
));
14902 uint32_t _flags_save_string
= ndr
->flags
;
14903 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14904 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_form_name
));
14905 if (_ptr_form_name
) {
14906 NDR_PULL_ALLOC(ndr
, r
->form_name
);
14907 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->form_name
, _ptr_form_name
));
14909 r
->form_name
= NULL
;
14911 ndr
->flags
= _flags_save_string
;
14913 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
14914 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
14916 if (ndr_flags
& NDR_BUFFERS
) {
14918 uint32_t _flags_save_string
= ndr
->flags
;
14919 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14920 if (r
->form_name
) {
14921 uint32_t _relative_save_offset
;
14922 _relative_save_offset
= ndr
->offset
;
14923 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->form_name
));
14924 _mem_save_form_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14925 NDR_PULL_SET_MEM_CTX(ndr
, r
->form_name
, 0);
14926 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->form_name
));
14927 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_form_name_0
, 0);
14928 ndr
->offset
= _relative_save_offset
;
14930 ndr
->flags
= _flags_save_string
;
14933 return NDR_ERR_SUCCESS
;
14936 _PUBLIC_
void ndr_print_spoolss_FormInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_FormInfo1
*r
)
14938 ndr_print_struct(ndr
, name
, "spoolss_FormInfo1");
14940 ndr_print_spoolss_FormFlags(ndr
, "flags", r
->flags
);
14941 ndr_print_ptr(ndr
, "form_name", r
->form_name
);
14943 if (r
->form_name
) {
14944 ndr_print_string(ndr
, "form_name", r
->form_name
);
14947 ndr_print_spoolss_FormSize(ndr
, "size", &r
->size
);
14948 ndr_print_spoolss_FormArea(ndr
, "area", &r
->area
);
14952 _PUBLIC_
size_t ndr_size_spoolss_FormInfo1(const struct spoolss_FormInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
14954 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_FormInfo1
, ic
);
14957 static enum ndr_err_code
ndr_push_spoolss_FormStringType(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
14959 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
14960 return NDR_ERR_SUCCESS
;
14963 static enum ndr_err_code
ndr_pull_spoolss_FormStringType(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
14966 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
14968 return NDR_ERR_SUCCESS
;
14971 _PUBLIC_
void ndr_print_spoolss_FormStringType(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
14973 ndr_print_uint32(ndr
, name
, r
);
14975 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_NONE", SPOOLSS_FORM_STRING_TYPE_NONE
, r
);
14976 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_MUI_DLL", SPOOLSS_FORM_STRING_TYPE_MUI_DLL
, r
);
14977 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_LANG_PAIR", SPOOLSS_FORM_STRING_TYPE_LANG_PAIR
, r
);
14981 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_FormInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_FormInfo2
*r
)
14983 if (ndr_flags
& NDR_SCALARS
) {
14984 NDR_CHECK(ndr_push_align(ndr
, 4));
14985 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr
, NDR_SCALARS
, r
->flags
));
14987 uint32_t _flags_save_string
= ndr
->flags
;
14988 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14989 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->form_name
));
14990 ndr
->flags
= _flags_save_string
;
14992 NDR_CHECK(ndr_push_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
14993 NDR_CHECK(ndr_push_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
14995 uint32_t _flags_save_string
= ndr
->flags
;
14996 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
14997 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->keyword
));
14998 ndr
->flags
= _flags_save_string
;
15000 NDR_CHECK(ndr_push_spoolss_FormStringType(ndr
, NDR_SCALARS
, r
->string_type
));
15002 uint32_t _flags_save_string
= ndr
->flags
;
15003 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15004 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->mui_dll
));
15005 ndr
->flags
= _flags_save_string
;
15007 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ressource_id
));
15009 uint32_t _flags_save_string
= ndr
->flags
;
15010 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15011 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->display_name
));
15012 ndr
->flags
= _flags_save_string
;
15014 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lang_id
));
15016 if (ndr_flags
& NDR_BUFFERS
) {
15018 uint32_t _flags_save_string
= ndr
->flags
;
15019 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15020 if (r
->form_name
) {
15021 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->form_name
));
15022 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->form_name
));
15024 ndr
->flags
= _flags_save_string
;
15027 uint32_t _flags_save_string
= ndr
->flags
;
15028 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
15030 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->keyword
));
15031 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->keyword
));
15033 ndr
->flags
= _flags_save_string
;
15036 uint32_t _flags_save_string
= ndr
->flags
;
15037 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15039 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->mui_dll
));
15040 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->mui_dll
));
15042 ndr
->flags
= _flags_save_string
;
15045 uint32_t _flags_save_string
= ndr
->flags
;
15046 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15047 if (r
->display_name
) {
15048 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->display_name
));
15049 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->display_name
));
15051 ndr
->flags
= _flags_save_string
;
15054 return NDR_ERR_SUCCESS
;
15057 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_FormInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_FormInfo2
*r
)
15059 uint32_t _ptr_form_name
;
15060 TALLOC_CTX
*_mem_save_form_name_0
;
15061 uint32_t _ptr_keyword
;
15062 TALLOC_CTX
*_mem_save_keyword_0
;
15063 uint32_t _ptr_mui_dll
;
15064 TALLOC_CTX
*_mem_save_mui_dll_0
;
15065 uint32_t _ptr_display_name
;
15066 TALLOC_CTX
*_mem_save_display_name_0
;
15067 if (ndr_flags
& NDR_SCALARS
) {
15068 NDR_CHECK(ndr_pull_align(ndr
, 4));
15069 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr
, NDR_SCALARS
, &r
->flags
));
15071 uint32_t _flags_save_string
= ndr
->flags
;
15072 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15073 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_form_name
));
15074 if (_ptr_form_name
) {
15075 NDR_PULL_ALLOC(ndr
, r
->form_name
);
15076 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->form_name
, _ptr_form_name
));
15078 r
->form_name
= NULL
;
15080 ndr
->flags
= _flags_save_string
;
15082 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
15083 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
15085 uint32_t _flags_save_string
= ndr
->flags
;
15086 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
15087 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_keyword
));
15088 if (_ptr_keyword
) {
15089 NDR_PULL_ALLOC(ndr
, r
->keyword
);
15090 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->keyword
, _ptr_keyword
));
15094 ndr
->flags
= _flags_save_string
;
15096 NDR_CHECK(ndr_pull_spoolss_FormStringType(ndr
, NDR_SCALARS
, &r
->string_type
));
15098 uint32_t _flags_save_string
= ndr
->flags
;
15099 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15100 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_mui_dll
));
15101 if (_ptr_mui_dll
) {
15102 NDR_PULL_ALLOC(ndr
, r
->mui_dll
);
15103 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->mui_dll
, _ptr_mui_dll
));
15107 ndr
->flags
= _flags_save_string
;
15109 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ressource_id
));
15111 uint32_t _flags_save_string
= ndr
->flags
;
15112 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15113 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
15114 if (_ptr_display_name
) {
15115 NDR_PULL_ALLOC(ndr
, r
->display_name
);
15116 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->display_name
, _ptr_display_name
));
15118 r
->display_name
= NULL
;
15120 ndr
->flags
= _flags_save_string
;
15122 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lang_id
));
15124 if (ndr_flags
& NDR_BUFFERS
) {
15126 uint32_t _flags_save_string
= ndr
->flags
;
15127 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15128 if (r
->form_name
) {
15129 uint32_t _relative_save_offset
;
15130 _relative_save_offset
= ndr
->offset
;
15131 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->form_name
));
15132 _mem_save_form_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15133 NDR_PULL_SET_MEM_CTX(ndr
, r
->form_name
, 0);
15134 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->form_name
));
15135 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_form_name_0
, 0);
15136 ndr
->offset
= _relative_save_offset
;
15138 ndr
->flags
= _flags_save_string
;
15141 uint32_t _flags_save_string
= ndr
->flags
;
15142 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
15144 uint32_t _relative_save_offset
;
15145 _relative_save_offset
= ndr
->offset
;
15146 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->keyword
));
15147 _mem_save_keyword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15148 NDR_PULL_SET_MEM_CTX(ndr
, r
->keyword
, 0);
15149 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->keyword
));
15150 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keyword_0
, 0);
15151 ndr
->offset
= _relative_save_offset
;
15153 ndr
->flags
= _flags_save_string
;
15156 uint32_t _flags_save_string
= ndr
->flags
;
15157 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15159 uint32_t _relative_save_offset
;
15160 _relative_save_offset
= ndr
->offset
;
15161 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->mui_dll
));
15162 _mem_save_mui_dll_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15163 NDR_PULL_SET_MEM_CTX(ndr
, r
->mui_dll
, 0);
15164 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->mui_dll
));
15165 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_mui_dll_0
, 0);
15166 ndr
->offset
= _relative_save_offset
;
15168 ndr
->flags
= _flags_save_string
;
15171 uint32_t _flags_save_string
= ndr
->flags
;
15172 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15173 if (r
->display_name
) {
15174 uint32_t _relative_save_offset
;
15175 _relative_save_offset
= ndr
->offset
;
15176 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->display_name
));
15177 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15178 NDR_PULL_SET_MEM_CTX(ndr
, r
->display_name
, 0);
15179 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->display_name
));
15180 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, 0);
15181 ndr
->offset
= _relative_save_offset
;
15183 ndr
->flags
= _flags_save_string
;
15186 return NDR_ERR_SUCCESS
;
15189 _PUBLIC_
void ndr_print_spoolss_FormInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_FormInfo2
*r
)
15191 ndr_print_struct(ndr
, name
, "spoolss_FormInfo2");
15193 ndr_print_spoolss_FormFlags(ndr
, "flags", r
->flags
);
15194 ndr_print_ptr(ndr
, "form_name", r
->form_name
);
15196 if (r
->form_name
) {
15197 ndr_print_string(ndr
, "form_name", r
->form_name
);
15200 ndr_print_spoolss_FormSize(ndr
, "size", &r
->size
);
15201 ndr_print_spoolss_FormArea(ndr
, "area", &r
->area
);
15202 ndr_print_ptr(ndr
, "keyword", r
->keyword
);
15205 ndr_print_string(ndr
, "keyword", r
->keyword
);
15208 ndr_print_spoolss_FormStringType(ndr
, "string_type", r
->string_type
);
15209 ndr_print_ptr(ndr
, "mui_dll", r
->mui_dll
);
15212 ndr_print_string(ndr
, "mui_dll", r
->mui_dll
);
15215 ndr_print_uint32(ndr
, "ressource_id", r
->ressource_id
);
15216 ndr_print_ptr(ndr
, "display_name", r
->display_name
);
15218 if (r
->display_name
) {
15219 ndr_print_string(ndr
, "display_name", r
->display_name
);
15222 ndr_print_uint32(ndr
, "lang_id", r
->lang_id
);
15226 _PUBLIC_
size_t ndr_size_spoolss_FormInfo2(const struct spoolss_FormInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
15228 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_FormInfo2
, ic
);
15231 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_FormInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_FormInfo
*r
)
15233 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
15234 if (ndr_flags
& NDR_SCALARS
) {
15235 int level
= ndr_push_get_switch_value(ndr
, r
);
15238 NDR_CHECK(ndr_push_align(ndr
, 4));
15239 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15240 NDR_CHECK(ndr_push_spoolss_FormInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15244 NDR_CHECK(ndr_push_align(ndr
, 4));
15245 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15246 NDR_CHECK(ndr_push_spoolss_FormInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
15254 if (ndr_flags
& NDR_BUFFERS
) {
15255 int level
= ndr_push_get_switch_value(ndr
, r
);
15256 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
15259 NDR_CHECK(ndr_push_spoolss_FormInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
15263 NDR_CHECK(ndr_push_spoolss_FormInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
15271 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15272 return NDR_ERR_SUCCESS
;
15275 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_FormInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_FormInfo
*r
)
15277 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
15279 level
= ndr_pull_get_switch_value(ndr
, r
);
15280 if (ndr_flags
& NDR_SCALARS
) {
15283 NDR_CHECK(ndr_pull_align(ndr
, 4));
15284 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15285 NDR_CHECK(ndr_pull_spoolss_FormInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15289 NDR_CHECK(ndr_pull_align(ndr
, 4));
15290 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15291 NDR_CHECK(ndr_pull_spoolss_FormInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
15299 if (ndr_flags
& NDR_BUFFERS
) {
15300 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
15303 NDR_CHECK(ndr_pull_spoolss_FormInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
15307 NDR_CHECK(ndr_pull_spoolss_FormInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
15315 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15316 return NDR_ERR_SUCCESS
;
15319 _PUBLIC_
void ndr_print_spoolss_FormInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_FormInfo
*r
)
15322 level
= ndr_print_get_switch_value(ndr
, r
);
15323 ndr_print_union(ndr
, name
, level
, "spoolss_FormInfo");
15326 ndr_print_spoolss_FormInfo1(ndr
, "info1", &r
->info1
);
15330 ndr_print_spoolss_FormInfo2(ndr
, "info2", &r
->info2
);
15339 _PUBLIC_
size_t ndr_size_spoolss_FormInfo(const union spoolss_FormInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
15341 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_FormInfo
, ic
);
15344 static enum ndr_err_code
ndr_push_spoolss_AddFormInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddFormInfo1
*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
));
15349 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->form_name
));
15350 NDR_CHECK(ndr_push_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
15351 NDR_CHECK(ndr_push_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
15353 if (ndr_flags
& NDR_BUFFERS
) {
15354 if (r
->form_name
) {
15355 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->form_name
, CH_UTF16
)));
15356 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
15357 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->form_name
, CH_UTF16
)));
15358 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->form_name
, ndr_charset_length(r
->form_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
15361 return NDR_ERR_SUCCESS
;
15364 static enum ndr_err_code
ndr_pull_spoolss_AddFormInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddFormInfo1
*r
)
15366 uint32_t _ptr_form_name
;
15367 TALLOC_CTX
*_mem_save_form_name_0
;
15368 if (ndr_flags
& NDR_SCALARS
) {
15369 NDR_CHECK(ndr_pull_align(ndr
, 4));
15370 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr
, NDR_SCALARS
, &r
->flags
));
15371 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_form_name
));
15372 if (_ptr_form_name
) {
15373 NDR_PULL_ALLOC(ndr
, r
->form_name
);
15375 r
->form_name
= NULL
;
15377 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
15378 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
15380 if (ndr_flags
& NDR_BUFFERS
) {
15381 if (r
->form_name
) {
15382 _mem_save_form_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15383 NDR_PULL_SET_MEM_CTX(ndr
, r
->form_name
, 0);
15384 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->form_name
));
15385 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->form_name
));
15386 if (ndr_get_array_length(ndr
, &r
->form_name
) > ndr_get_array_size(ndr
, &r
->form_name
)) {
15387 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
));
15389 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->form_name
), sizeof(uint16_t)));
15390 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->form_name
, ndr_get_array_length(ndr
, &r
->form_name
), sizeof(uint16_t), CH_UTF16
));
15391 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_form_name_0
, 0);
15394 return NDR_ERR_SUCCESS
;
15397 _PUBLIC_
void ndr_print_spoolss_AddFormInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddFormInfo1
*r
)
15399 ndr_print_struct(ndr
, name
, "spoolss_AddFormInfo1");
15401 ndr_print_spoolss_FormFlags(ndr
, "flags", r
->flags
);
15402 ndr_print_ptr(ndr
, "form_name", r
->form_name
);
15404 if (r
->form_name
) {
15405 ndr_print_string(ndr
, "form_name", r
->form_name
);
15408 ndr_print_spoolss_FormSize(ndr
, "size", &r
->size
);
15409 ndr_print_spoolss_FormArea(ndr
, "area", &r
->area
);
15413 static enum ndr_err_code
ndr_push_spoolss_AddFormInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddFormInfo2
*r
)
15415 if (ndr_flags
& NDR_SCALARS
) {
15416 NDR_CHECK(ndr_push_align(ndr
, 4));
15417 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr
, NDR_SCALARS
, r
->flags
));
15418 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->form_name
));
15419 NDR_CHECK(ndr_push_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
15420 NDR_CHECK(ndr_push_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
15421 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->keyword
));
15422 NDR_CHECK(ndr_push_spoolss_FormStringType(ndr
, NDR_SCALARS
, r
->string_type
));
15423 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->mui_dll
));
15424 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ressource_id
));
15425 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->display_name
));
15426 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lang_id
));
15428 if (ndr_flags
& NDR_BUFFERS
) {
15429 if (r
->form_name
) {
15430 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->form_name
, CH_UTF16
)));
15431 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
15432 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->form_name
, CH_UTF16
)));
15433 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->form_name
, ndr_charset_length(r
->form_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
15436 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->keyword
, CH_DOS
)));
15437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
15438 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->keyword
, CH_DOS
)));
15439 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->keyword
, ndr_charset_length(r
->keyword
, CH_DOS
), sizeof(uint8_t), CH_DOS
));
15442 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->mui_dll
, CH_UTF16
)));
15443 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
15444 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->mui_dll
, CH_UTF16
)));
15445 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->mui_dll
, ndr_charset_length(r
->mui_dll
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
15447 if (r
->display_name
) {
15448 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->display_name
, CH_UTF16
)));
15449 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
15450 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->display_name
, CH_UTF16
)));
15451 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->display_name
, ndr_charset_length(r
->display_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
15454 return NDR_ERR_SUCCESS
;
15457 static enum ndr_err_code
ndr_pull_spoolss_AddFormInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddFormInfo2
*r
)
15459 uint32_t _ptr_form_name
;
15460 TALLOC_CTX
*_mem_save_form_name_0
;
15461 uint32_t _ptr_keyword
;
15462 TALLOC_CTX
*_mem_save_keyword_0
;
15463 uint32_t _ptr_mui_dll
;
15464 TALLOC_CTX
*_mem_save_mui_dll_0
;
15465 uint32_t _ptr_display_name
;
15466 TALLOC_CTX
*_mem_save_display_name_0
;
15467 if (ndr_flags
& NDR_SCALARS
) {
15468 NDR_CHECK(ndr_pull_align(ndr
, 4));
15469 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr
, NDR_SCALARS
, &r
->flags
));
15470 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_form_name
));
15471 if (_ptr_form_name
) {
15472 NDR_PULL_ALLOC(ndr
, r
->form_name
);
15474 r
->form_name
= NULL
;
15476 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
15477 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
15478 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_keyword
));
15479 if (_ptr_keyword
) {
15480 NDR_PULL_ALLOC(ndr
, r
->keyword
);
15484 NDR_CHECK(ndr_pull_spoolss_FormStringType(ndr
, NDR_SCALARS
, &r
->string_type
));
15485 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_mui_dll
));
15486 if (_ptr_mui_dll
) {
15487 NDR_PULL_ALLOC(ndr
, r
->mui_dll
);
15491 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ressource_id
));
15492 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
15493 if (_ptr_display_name
) {
15494 NDR_PULL_ALLOC(ndr
, r
->display_name
);
15496 r
->display_name
= NULL
;
15498 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lang_id
));
15500 if (ndr_flags
& NDR_BUFFERS
) {
15501 if (r
->form_name
) {
15502 _mem_save_form_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15503 NDR_PULL_SET_MEM_CTX(ndr
, r
->form_name
, 0);
15504 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->form_name
));
15505 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->form_name
));
15506 if (ndr_get_array_length(ndr
, &r
->form_name
) > ndr_get_array_size(ndr
, &r
->form_name
)) {
15507 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
));
15509 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->form_name
), sizeof(uint16_t)));
15510 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->form_name
, ndr_get_array_length(ndr
, &r
->form_name
), sizeof(uint16_t), CH_UTF16
));
15511 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_form_name_0
, 0);
15514 _mem_save_keyword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15515 NDR_PULL_SET_MEM_CTX(ndr
, r
->keyword
, 0);
15516 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->keyword
));
15517 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->keyword
));
15518 if (ndr_get_array_length(ndr
, &r
->keyword
) > ndr_get_array_size(ndr
, &r
->keyword
)) {
15519 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
));
15521 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->keyword
), sizeof(uint8_t)));
15522 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->keyword
, ndr_get_array_length(ndr
, &r
->keyword
), sizeof(uint8_t), CH_DOS
));
15523 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keyword_0
, 0);
15526 _mem_save_mui_dll_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15527 NDR_PULL_SET_MEM_CTX(ndr
, r
->mui_dll
, 0);
15528 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->mui_dll
));
15529 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->mui_dll
));
15530 if (ndr_get_array_length(ndr
, &r
->mui_dll
) > ndr_get_array_size(ndr
, &r
->mui_dll
)) {
15531 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
));
15533 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->mui_dll
), sizeof(uint16_t)));
15534 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->mui_dll
, ndr_get_array_length(ndr
, &r
->mui_dll
), sizeof(uint16_t), CH_UTF16
));
15535 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_mui_dll_0
, 0);
15537 if (r
->display_name
) {
15538 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15539 NDR_PULL_SET_MEM_CTX(ndr
, r
->display_name
, 0);
15540 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->display_name
));
15541 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->display_name
));
15542 if (ndr_get_array_length(ndr
, &r
->display_name
) > ndr_get_array_size(ndr
, &r
->display_name
)) {
15543 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
));
15545 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->display_name
), sizeof(uint16_t)));
15546 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->display_name
, ndr_get_array_length(ndr
, &r
->display_name
), sizeof(uint16_t), CH_UTF16
));
15547 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, 0);
15550 return NDR_ERR_SUCCESS
;
15553 _PUBLIC_
void ndr_print_spoolss_AddFormInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddFormInfo2
*r
)
15555 ndr_print_struct(ndr
, name
, "spoolss_AddFormInfo2");
15557 ndr_print_spoolss_FormFlags(ndr
, "flags", r
->flags
);
15558 ndr_print_ptr(ndr
, "form_name", r
->form_name
);
15560 if (r
->form_name
) {
15561 ndr_print_string(ndr
, "form_name", r
->form_name
);
15564 ndr_print_spoolss_FormSize(ndr
, "size", &r
->size
);
15565 ndr_print_spoolss_FormArea(ndr
, "area", &r
->area
);
15566 ndr_print_ptr(ndr
, "keyword", r
->keyword
);
15569 ndr_print_string(ndr
, "keyword", r
->keyword
);
15572 ndr_print_spoolss_FormStringType(ndr
, "string_type", r
->string_type
);
15573 ndr_print_ptr(ndr
, "mui_dll", r
->mui_dll
);
15576 ndr_print_string(ndr
, "mui_dll", r
->mui_dll
);
15579 ndr_print_uint32(ndr
, "ressource_id", r
->ressource_id
);
15580 ndr_print_ptr(ndr
, "display_name", r
->display_name
);
15582 if (r
->display_name
) {
15583 ndr_print_string(ndr
, "display_name", r
->display_name
);
15586 ndr_print_uint32(ndr
, "lang_id", r
->lang_id
);
15590 static enum ndr_err_code
ndr_push_spoolss_AddFormInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_AddFormInfo
*r
)
15592 if (ndr_flags
& NDR_SCALARS
) {
15593 int level
= ndr_push_get_switch_value(ndr
, r
);
15594 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
15597 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
15601 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
15605 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
15608 if (ndr_flags
& NDR_BUFFERS
) {
15609 int level
= ndr_push_get_switch_value(ndr
, r
);
15613 NDR_CHECK(ndr_push_spoolss_AddFormInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
15619 NDR_CHECK(ndr_push_spoolss_AddFormInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
15624 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
15627 return NDR_ERR_SUCCESS
;
15630 static enum ndr_err_code
ndr_pull_spoolss_AddFormInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_AddFormInfo
*r
)
15634 TALLOC_CTX
*_mem_save_info1_0
;
15635 TALLOC_CTX
*_mem_save_info2_0
;
15636 level
= ndr_pull_get_switch_value(ndr
, r
);
15637 if (ndr_flags
& NDR_SCALARS
) {
15638 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
15639 if (_level
!= level
) {
15640 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
15644 uint32_t _ptr_info1
;
15645 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
15647 NDR_PULL_ALLOC(ndr
, r
->info1
);
15654 uint32_t _ptr_info2
;
15655 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
15657 NDR_PULL_ALLOC(ndr
, r
->info2
);
15664 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
15667 if (ndr_flags
& NDR_BUFFERS
) {
15671 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15672 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
15673 NDR_CHECK(ndr_pull_spoolss_AddFormInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
15674 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
15680 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15681 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
15682 NDR_CHECK(ndr_pull_spoolss_AddFormInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
15683 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
15688 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
15691 return NDR_ERR_SUCCESS
;
15694 _PUBLIC_
void ndr_print_spoolss_AddFormInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_AddFormInfo
*r
)
15697 level
= ndr_print_get_switch_value(ndr
, r
);
15698 ndr_print_union(ndr
, name
, level
, "spoolss_AddFormInfo");
15701 ndr_print_ptr(ndr
, "info1", r
->info1
);
15704 ndr_print_spoolss_AddFormInfo1(ndr
, "info1", r
->info1
);
15710 ndr_print_ptr(ndr
, "info2", r
->info2
);
15713 ndr_print_spoolss_AddFormInfo2(ndr
, "info2", r
->info2
);
15719 ndr_print_bad_level(ndr
, name
, level
);
15723 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortInfo1
*r
)
15725 if (ndr_flags
& NDR_SCALARS
) {
15726 NDR_CHECK(ndr_push_align(ndr
, 4));
15728 uint32_t _flags_save_string
= ndr
->flags
;
15729 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15730 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->port_name
));
15731 ndr
->flags
= _flags_save_string
;
15734 if (ndr_flags
& NDR_BUFFERS
) {
15736 uint32_t _flags_save_string
= ndr
->flags
;
15737 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15738 if (r
->port_name
) {
15739 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->port_name
));
15740 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->port_name
));
15742 ndr
->flags
= _flags_save_string
;
15745 return NDR_ERR_SUCCESS
;
15748 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortInfo1
*r
)
15750 uint32_t _ptr_port_name
;
15751 TALLOC_CTX
*_mem_save_port_name_0
;
15752 if (ndr_flags
& NDR_SCALARS
) {
15753 NDR_CHECK(ndr_pull_align(ndr
, 4));
15755 uint32_t _flags_save_string
= ndr
->flags
;
15756 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15757 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_port_name
));
15758 if (_ptr_port_name
) {
15759 NDR_PULL_ALLOC(ndr
, r
->port_name
);
15760 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->port_name
, _ptr_port_name
));
15762 r
->port_name
= NULL
;
15764 ndr
->flags
= _flags_save_string
;
15767 if (ndr_flags
& NDR_BUFFERS
) {
15769 uint32_t _flags_save_string
= ndr
->flags
;
15770 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15771 if (r
->port_name
) {
15772 uint32_t _relative_save_offset
;
15773 _relative_save_offset
= ndr
->offset
;
15774 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->port_name
));
15775 _mem_save_port_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15776 NDR_PULL_SET_MEM_CTX(ndr
, r
->port_name
, 0);
15777 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->port_name
));
15778 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_port_name_0
, 0);
15779 ndr
->offset
= _relative_save_offset
;
15781 ndr
->flags
= _flags_save_string
;
15784 return NDR_ERR_SUCCESS
;
15787 _PUBLIC_
void ndr_print_spoolss_PortInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortInfo1
*r
)
15789 ndr_print_struct(ndr
, name
, "spoolss_PortInfo1");
15791 ndr_print_ptr(ndr
, "port_name", r
->port_name
);
15793 if (r
->port_name
) {
15794 ndr_print_string(ndr
, "port_name", r
->port_name
);
15800 _PUBLIC_
size_t ndr_size_spoolss_PortInfo1(const struct spoolss_PortInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
15802 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PortInfo1
, ic
);
15805 static enum ndr_err_code
ndr_push_spoolss_PortType(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
15807 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
15808 return NDR_ERR_SUCCESS
;
15811 static enum ndr_err_code
ndr_pull_spoolss_PortType(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
15814 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
15816 return NDR_ERR_SUCCESS
;
15819 _PUBLIC_
void ndr_print_spoolss_PortType(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
15821 ndr_print_uint32(ndr
, name
, r
);
15823 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_WRITE", SPOOLSS_PORT_TYPE_WRITE
, r
);
15824 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_READ", SPOOLSS_PORT_TYPE_READ
, r
);
15825 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_REDIRECTED", SPOOLSS_PORT_TYPE_REDIRECTED
, r
);
15826 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_NET_ATTACHED", SPOOLSS_PORT_TYPE_NET_ATTACHED
, r
);
15830 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortInfo2
*r
)
15832 if (ndr_flags
& NDR_SCALARS
) {
15833 NDR_CHECK(ndr_push_align(ndr
, 4));
15835 uint32_t _flags_save_string
= ndr
->flags
;
15836 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15837 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->port_name
));
15838 ndr
->flags
= _flags_save_string
;
15841 uint32_t _flags_save_string
= ndr
->flags
;
15842 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15843 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
15844 ndr
->flags
= _flags_save_string
;
15847 uint32_t _flags_save_string
= ndr
->flags
;
15848 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15849 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->description
));
15850 ndr
->flags
= _flags_save_string
;
15852 NDR_CHECK(ndr_push_spoolss_PortType(ndr
, NDR_SCALARS
, r
->port_type
));
15853 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
15855 if (ndr_flags
& NDR_BUFFERS
) {
15857 uint32_t _flags_save_string
= ndr
->flags
;
15858 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15859 if (r
->port_name
) {
15860 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->port_name
));
15861 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->port_name
));
15863 ndr
->flags
= _flags_save_string
;
15866 uint32_t _flags_save_string
= ndr
->flags
;
15867 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15868 if (r
->monitor_name
) {
15869 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->monitor_name
));
15870 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
15872 ndr
->flags
= _flags_save_string
;
15875 uint32_t _flags_save_string
= ndr
->flags
;
15876 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15877 if (r
->description
) {
15878 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->description
));
15879 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->description
));
15881 ndr
->flags
= _flags_save_string
;
15884 return NDR_ERR_SUCCESS
;
15887 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortInfo2
*r
)
15889 uint32_t _ptr_port_name
;
15890 TALLOC_CTX
*_mem_save_port_name_0
;
15891 uint32_t _ptr_monitor_name
;
15892 TALLOC_CTX
*_mem_save_monitor_name_0
;
15893 uint32_t _ptr_description
;
15894 TALLOC_CTX
*_mem_save_description_0
;
15895 if (ndr_flags
& NDR_SCALARS
) {
15896 NDR_CHECK(ndr_pull_align(ndr
, 4));
15898 uint32_t _flags_save_string
= ndr
->flags
;
15899 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15900 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_port_name
));
15901 if (_ptr_port_name
) {
15902 NDR_PULL_ALLOC(ndr
, r
->port_name
);
15903 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->port_name
, _ptr_port_name
));
15905 r
->port_name
= NULL
;
15907 ndr
->flags
= _flags_save_string
;
15910 uint32_t _flags_save_string
= ndr
->flags
;
15911 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15912 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
15913 if (_ptr_monitor_name
) {
15914 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
15915 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
15917 r
->monitor_name
= NULL
;
15919 ndr
->flags
= _flags_save_string
;
15922 uint32_t _flags_save_string
= ndr
->flags
;
15923 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15924 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_description
));
15925 if (_ptr_description
) {
15926 NDR_PULL_ALLOC(ndr
, r
->description
);
15927 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->description
, _ptr_description
));
15929 r
->description
= NULL
;
15931 ndr
->flags
= _flags_save_string
;
15933 NDR_CHECK(ndr_pull_spoolss_PortType(ndr
, NDR_SCALARS
, &r
->port_type
));
15934 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
15936 if (ndr_flags
& NDR_BUFFERS
) {
15938 uint32_t _flags_save_string
= ndr
->flags
;
15939 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15940 if (r
->port_name
) {
15941 uint32_t _relative_save_offset
;
15942 _relative_save_offset
= ndr
->offset
;
15943 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->port_name
));
15944 _mem_save_port_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15945 NDR_PULL_SET_MEM_CTX(ndr
, r
->port_name
, 0);
15946 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->port_name
));
15947 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_port_name_0
, 0);
15948 ndr
->offset
= _relative_save_offset
;
15950 ndr
->flags
= _flags_save_string
;
15953 uint32_t _flags_save_string
= ndr
->flags
;
15954 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15955 if (r
->monitor_name
) {
15956 uint32_t _relative_save_offset
;
15957 _relative_save_offset
= ndr
->offset
;
15958 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
15959 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15960 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
15961 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
15962 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
15963 ndr
->offset
= _relative_save_offset
;
15965 ndr
->flags
= _flags_save_string
;
15968 uint32_t _flags_save_string
= ndr
->flags
;
15969 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15970 if (r
->description
) {
15971 uint32_t _relative_save_offset
;
15972 _relative_save_offset
= ndr
->offset
;
15973 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->description
));
15974 _mem_save_description_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15975 NDR_PULL_SET_MEM_CTX(ndr
, r
->description
, 0);
15976 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->description
));
15977 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_description_0
, 0);
15978 ndr
->offset
= _relative_save_offset
;
15980 ndr
->flags
= _flags_save_string
;
15983 return NDR_ERR_SUCCESS
;
15986 _PUBLIC_
void ndr_print_spoolss_PortInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortInfo2
*r
)
15988 ndr_print_struct(ndr
, name
, "spoolss_PortInfo2");
15990 ndr_print_ptr(ndr
, "port_name", r
->port_name
);
15992 if (r
->port_name
) {
15993 ndr_print_string(ndr
, "port_name", r
->port_name
);
15996 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
15998 if (r
->monitor_name
) {
15999 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
16002 ndr_print_ptr(ndr
, "description", r
->description
);
16004 if (r
->description
) {
16005 ndr_print_string(ndr
, "description", r
->description
);
16008 ndr_print_spoolss_PortType(ndr
, "port_type", r
->port_type
);
16009 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
16013 _PUBLIC_
size_t ndr_size_spoolss_PortInfo2(const struct spoolss_PortInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16015 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PortInfo2
, ic
);
16018 static enum ndr_err_code
ndr_push_spoolss_PortStatus(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PortStatus r
)
16020 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
16021 return NDR_ERR_SUCCESS
;
16024 static enum ndr_err_code
ndr_pull_spoolss_PortStatus(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PortStatus
*r
)
16027 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
16029 return NDR_ERR_SUCCESS
;
16032 _PUBLIC_
void ndr_print_spoolss_PortStatus(struct ndr_print
*ndr
, const char *name
, enum spoolss_PortStatus r
)
16034 const char *val
= NULL
;
16037 case PORT_STATUS_CLEAR
: val
= "PORT_STATUS_CLEAR"; break;
16038 case PORT_STATUS_OFFLINE
: val
= "PORT_STATUS_OFFLINE"; break;
16039 case PORT_STATUS_PAPER_JAM
: val
= "PORT_STATUS_PAPER_JAM"; break;
16040 case PORT_STATUS_PAPER_OUT
: val
= "PORT_STATUS_PAPER_OUT"; break;
16041 case PORT_STATUS_OUTPUT_BIN_FULL
: val
= "PORT_STATUS_OUTPUT_BIN_FULL"; break;
16042 case PORT_STATUS_PAPER_PROBLEM
: val
= "PORT_STATUS_PAPER_PROBLEM"; break;
16043 case PORT_STATUS_NO_TONER
: val
= "PORT_STATUS_NO_TONER"; break;
16044 case PORT_STATUS_DOOR_OPEN
: val
= "PORT_STATUS_DOOR_OPEN"; break;
16045 case PORT_STATUS_USER_INTERVENTION
: val
= "PORT_STATUS_USER_INTERVENTION"; break;
16046 case PORT_STATUS_OUT_OF_MEMORY
: val
= "PORT_STATUS_OUT_OF_MEMORY"; break;
16047 case PORT_STATUS_TONER_LOW
: val
= "PORT_STATUS_TONER_LOW"; break;
16048 case PORT_STATUS_WARMING_UP
: val
= "PORT_STATUS_WARMING_UP"; break;
16049 case PORT_STATUS_POWER_SAVE
: val
= "PORT_STATUS_POWER_SAVE"; break;
16051 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
16054 static enum ndr_err_code
ndr_push_spoolss_PortSeverity(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PortSeverity r
)
16056 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
16057 return NDR_ERR_SUCCESS
;
16060 static enum ndr_err_code
ndr_pull_spoolss_PortSeverity(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PortSeverity
*r
)
16063 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
16065 return NDR_ERR_SUCCESS
;
16068 _PUBLIC_
void ndr_print_spoolss_PortSeverity(struct ndr_print
*ndr
, const char *name
, enum spoolss_PortSeverity r
)
16070 const char *val
= NULL
;
16073 case PORT_STATUS_TYPE_ERROR
: val
= "PORT_STATUS_TYPE_ERROR"; break;
16074 case PORT_STATUS_TYPE_WARNING
: val
= "PORT_STATUS_TYPE_WARNING"; break;
16075 case PORT_STATUS_TYPE_INFO
: val
= "PORT_STATUS_TYPE_INFO"; break;
16077 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
16080 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortInfo3
*r
)
16082 if (ndr_flags
& NDR_SCALARS
) {
16083 NDR_CHECK(ndr_push_align(ndr
, 4));
16084 NDR_CHECK(ndr_push_spoolss_PortStatus(ndr
, NDR_SCALARS
, r
->status
));
16086 uint32_t _flags_save_string
= ndr
->flags
;
16087 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16088 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->status_string
));
16089 ndr
->flags
= _flags_save_string
;
16091 NDR_CHECK(ndr_push_spoolss_PortSeverity(ndr
, NDR_SCALARS
, r
->severity
));
16093 if (ndr_flags
& NDR_BUFFERS
) {
16095 uint32_t _flags_save_string
= ndr
->flags
;
16096 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16097 if (r
->status_string
) {
16098 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->status_string
));
16099 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->status_string
));
16101 ndr
->flags
= _flags_save_string
;
16104 return NDR_ERR_SUCCESS
;
16107 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortInfo3
*r
)
16109 uint32_t _ptr_status_string
;
16110 TALLOC_CTX
*_mem_save_status_string_0
;
16111 if (ndr_flags
& NDR_SCALARS
) {
16112 NDR_CHECK(ndr_pull_align(ndr
, 4));
16113 NDR_CHECK(ndr_pull_spoolss_PortStatus(ndr
, NDR_SCALARS
, &r
->status
));
16115 uint32_t _flags_save_string
= ndr
->flags
;
16116 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16117 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_status_string
));
16118 if (_ptr_status_string
) {
16119 NDR_PULL_ALLOC(ndr
, r
->status_string
);
16120 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->status_string
, _ptr_status_string
));
16122 r
->status_string
= NULL
;
16124 ndr
->flags
= _flags_save_string
;
16126 NDR_CHECK(ndr_pull_spoolss_PortSeverity(ndr
, NDR_SCALARS
, &r
->severity
));
16128 if (ndr_flags
& NDR_BUFFERS
) {
16130 uint32_t _flags_save_string
= ndr
->flags
;
16131 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16132 if (r
->status_string
) {
16133 uint32_t _relative_save_offset
;
16134 _relative_save_offset
= ndr
->offset
;
16135 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->status_string
));
16136 _mem_save_status_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16137 NDR_PULL_SET_MEM_CTX(ndr
, r
->status_string
, 0);
16138 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->status_string
));
16139 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_status_string_0
, 0);
16140 ndr
->offset
= _relative_save_offset
;
16142 ndr
->flags
= _flags_save_string
;
16145 return NDR_ERR_SUCCESS
;
16148 _PUBLIC_
void ndr_print_spoolss_PortInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortInfo3
*r
)
16150 ndr_print_struct(ndr
, name
, "spoolss_PortInfo3");
16152 ndr_print_spoolss_PortStatus(ndr
, "status", r
->status
);
16153 ndr_print_ptr(ndr
, "status_string", r
->status_string
);
16155 if (r
->status_string
) {
16156 ndr_print_string(ndr
, "status_string", r
->status_string
);
16159 ndr_print_spoolss_PortSeverity(ndr
, "severity", r
->severity
);
16163 _PUBLIC_
size_t ndr_size_spoolss_PortInfo3(const struct spoolss_PortInfo3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16165 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PortInfo3
, ic
);
16168 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfoFF(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortInfoFF
*r
)
16170 if (ndr_flags
& NDR_SCALARS
) {
16171 NDR_CHECK(ndr_push_align(ndr
, 4));
16173 uint32_t _flags_save_string
= ndr
->flags
;
16174 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16175 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->port_name
));
16176 ndr
->flags
= _flags_save_string
;
16178 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->monitor_data
));
16180 if (ndr_flags
& NDR_BUFFERS
) {
16182 uint32_t _flags_save_string
= ndr
->flags
;
16183 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16184 if (r
->port_name
) {
16185 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->port_name
));
16186 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->port_name
));
16188 ndr
->flags
= _flags_save_string
;
16191 return NDR_ERR_SUCCESS
;
16194 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfoFF(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortInfoFF
*r
)
16196 uint32_t _ptr_port_name
;
16197 TALLOC_CTX
*_mem_save_port_name_0
;
16198 if (ndr_flags
& NDR_SCALARS
) {
16199 NDR_CHECK(ndr_pull_align(ndr
, 4));
16201 uint32_t _flags_save_string
= ndr
->flags
;
16202 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16203 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_port_name
));
16204 if (_ptr_port_name
) {
16205 NDR_PULL_ALLOC(ndr
, r
->port_name
);
16206 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->port_name
, _ptr_port_name
));
16208 r
->port_name
= NULL
;
16210 ndr
->flags
= _flags_save_string
;
16212 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->monitor_data
));
16214 if (ndr_flags
& NDR_BUFFERS
) {
16216 uint32_t _flags_save_string
= ndr
->flags
;
16217 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16218 if (r
->port_name
) {
16219 uint32_t _relative_save_offset
;
16220 _relative_save_offset
= ndr
->offset
;
16221 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->port_name
));
16222 _mem_save_port_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16223 NDR_PULL_SET_MEM_CTX(ndr
, r
->port_name
, 0);
16224 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->port_name
));
16225 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_port_name_0
, 0);
16226 ndr
->offset
= _relative_save_offset
;
16228 ndr
->flags
= _flags_save_string
;
16231 return NDR_ERR_SUCCESS
;
16234 _PUBLIC_
void ndr_print_spoolss_PortInfoFF(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortInfoFF
*r
)
16236 ndr_print_struct(ndr
, name
, "spoolss_PortInfoFF");
16238 ndr_print_ptr(ndr
, "port_name", r
->port_name
);
16240 if (r
->port_name
) {
16241 ndr_print_string(ndr
, "port_name", r
->port_name
);
16244 ndr_print_DATA_BLOB(ndr
, "monitor_data", r
->monitor_data
);
16248 _PUBLIC_
size_t ndr_size_spoolss_PortInfoFF(const struct spoolss_PortInfoFF
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16250 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PortInfoFF
, ic
);
16253 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PortInfo
*r
)
16255 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
16256 if (ndr_flags
& NDR_SCALARS
) {
16257 int level
= ndr_push_get_switch_value(ndr
, r
);
16260 NDR_CHECK(ndr_push_align(ndr
, 4));
16261 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16262 NDR_CHECK(ndr_push_spoolss_PortInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
16266 NDR_CHECK(ndr_push_align(ndr
, 4));
16267 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16268 NDR_CHECK(ndr_push_spoolss_PortInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
16272 NDR_CHECK(ndr_push_align(ndr
, 4));
16273 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16274 NDR_CHECK(ndr_push_spoolss_PortInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
16278 NDR_CHECK(ndr_push_align(ndr
, 4));
16279 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16280 NDR_CHECK(ndr_push_spoolss_PortInfoFF(ndr
, NDR_SCALARS
, &r
->infoFF
));
16288 if (ndr_flags
& NDR_BUFFERS
) {
16289 int level
= ndr_push_get_switch_value(ndr
, r
);
16290 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
16293 NDR_CHECK(ndr_push_spoolss_PortInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
16297 NDR_CHECK(ndr_push_spoolss_PortInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
16301 NDR_CHECK(ndr_push_spoolss_PortInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
16305 NDR_CHECK(ndr_push_spoolss_PortInfoFF(ndr
, NDR_BUFFERS
, &r
->infoFF
));
16313 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
16314 return NDR_ERR_SUCCESS
;
16317 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PortInfo
*r
)
16319 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
16321 level
= ndr_pull_get_switch_value(ndr
, r
);
16322 if (ndr_flags
& NDR_SCALARS
) {
16325 NDR_CHECK(ndr_pull_align(ndr
, 4));
16326 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16327 NDR_CHECK(ndr_pull_spoolss_PortInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
16331 NDR_CHECK(ndr_pull_align(ndr
, 4));
16332 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16333 NDR_CHECK(ndr_pull_spoolss_PortInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
16337 NDR_CHECK(ndr_pull_align(ndr
, 4));
16338 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16339 NDR_CHECK(ndr_pull_spoolss_PortInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
16343 NDR_CHECK(ndr_pull_align(ndr
, 4));
16344 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16345 NDR_CHECK(ndr_pull_spoolss_PortInfoFF(ndr
, NDR_SCALARS
, &r
->infoFF
));
16353 if (ndr_flags
& NDR_BUFFERS
) {
16354 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
16357 NDR_CHECK(ndr_pull_spoolss_PortInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
16361 NDR_CHECK(ndr_pull_spoolss_PortInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
16365 NDR_CHECK(ndr_pull_spoolss_PortInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
16369 NDR_CHECK(ndr_pull_spoolss_PortInfoFF(ndr
, NDR_BUFFERS
, &r
->infoFF
));
16377 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
16378 return NDR_ERR_SUCCESS
;
16381 _PUBLIC_
void ndr_print_spoolss_PortInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PortInfo
*r
)
16384 level
= ndr_print_get_switch_value(ndr
, r
);
16385 ndr_print_union(ndr
, name
, level
, "spoolss_PortInfo");
16388 ndr_print_spoolss_PortInfo1(ndr
, "info1", &r
->info1
);
16392 ndr_print_spoolss_PortInfo2(ndr
, "info2", &r
->info2
);
16396 ndr_print_spoolss_PortInfo3(ndr
, "info3", &r
->info3
);
16400 ndr_print_spoolss_PortInfoFF(ndr
, "infoFF", &r
->infoFF
);
16409 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_MonitorInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_MonitorInfo1
*r
)
16411 if (ndr_flags
& NDR_SCALARS
) {
16412 NDR_CHECK(ndr_push_align(ndr
, 4));
16414 uint32_t _flags_save_string
= ndr
->flags
;
16415 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16416 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
16417 ndr
->flags
= _flags_save_string
;
16420 if (ndr_flags
& NDR_BUFFERS
) {
16422 uint32_t _flags_save_string
= ndr
->flags
;
16423 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16424 if (r
->monitor_name
) {
16425 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->monitor_name
));
16426 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
16428 ndr
->flags
= _flags_save_string
;
16431 return NDR_ERR_SUCCESS
;
16434 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_MonitorInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_MonitorInfo1
*r
)
16436 uint32_t _ptr_monitor_name
;
16437 TALLOC_CTX
*_mem_save_monitor_name_0
;
16438 if (ndr_flags
& NDR_SCALARS
) {
16439 NDR_CHECK(ndr_pull_align(ndr
, 4));
16441 uint32_t _flags_save_string
= ndr
->flags
;
16442 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16443 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
16444 if (_ptr_monitor_name
) {
16445 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
16446 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
16448 r
->monitor_name
= NULL
;
16450 ndr
->flags
= _flags_save_string
;
16453 if (ndr_flags
& NDR_BUFFERS
) {
16455 uint32_t _flags_save_string
= ndr
->flags
;
16456 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16457 if (r
->monitor_name
) {
16458 uint32_t _relative_save_offset
;
16459 _relative_save_offset
= ndr
->offset
;
16460 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
16461 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16462 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
16463 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
16464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
16465 ndr
->offset
= _relative_save_offset
;
16467 ndr
->flags
= _flags_save_string
;
16470 return NDR_ERR_SUCCESS
;
16473 _PUBLIC_
void ndr_print_spoolss_MonitorInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_MonitorInfo1
*r
)
16475 ndr_print_struct(ndr
, name
, "spoolss_MonitorInfo1");
16477 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
16479 if (r
->monitor_name
) {
16480 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
16486 _PUBLIC_
size_t ndr_size_spoolss_MonitorInfo1(const struct spoolss_MonitorInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16488 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_MonitorInfo1
, ic
);
16491 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_MonitorInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_MonitorInfo2
*r
)
16493 if (ndr_flags
& NDR_SCALARS
) {
16494 NDR_CHECK(ndr_push_align(ndr
, 4));
16496 uint32_t _flags_save_string
= ndr
->flags
;
16497 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16498 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
16499 ndr
->flags
= _flags_save_string
;
16502 uint32_t _flags_save_string
= ndr
->flags
;
16503 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16504 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->environment
));
16505 ndr
->flags
= _flags_save_string
;
16508 uint32_t _flags_save_string
= ndr
->flags
;
16509 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16510 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dll_name
));
16511 ndr
->flags
= _flags_save_string
;
16514 if (ndr_flags
& NDR_BUFFERS
) {
16516 uint32_t _flags_save_string
= ndr
->flags
;
16517 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16518 if (r
->monitor_name
) {
16519 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->monitor_name
));
16520 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
16522 ndr
->flags
= _flags_save_string
;
16525 uint32_t _flags_save_string
= ndr
->flags
;
16526 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16527 if (r
->environment
) {
16528 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->environment
));
16529 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->environment
));
16531 ndr
->flags
= _flags_save_string
;
16534 uint32_t _flags_save_string
= ndr
->flags
;
16535 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16537 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->dll_name
));
16538 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->dll_name
));
16540 ndr
->flags
= _flags_save_string
;
16543 return NDR_ERR_SUCCESS
;
16546 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_MonitorInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_MonitorInfo2
*r
)
16548 uint32_t _ptr_monitor_name
;
16549 TALLOC_CTX
*_mem_save_monitor_name_0
;
16550 uint32_t _ptr_environment
;
16551 TALLOC_CTX
*_mem_save_environment_0
;
16552 uint32_t _ptr_dll_name
;
16553 TALLOC_CTX
*_mem_save_dll_name_0
;
16554 if (ndr_flags
& NDR_SCALARS
) {
16555 NDR_CHECK(ndr_pull_align(ndr
, 4));
16557 uint32_t _flags_save_string
= ndr
->flags
;
16558 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16559 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
16560 if (_ptr_monitor_name
) {
16561 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
16562 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
16564 r
->monitor_name
= NULL
;
16566 ndr
->flags
= _flags_save_string
;
16569 uint32_t _flags_save_string
= ndr
->flags
;
16570 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16571 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
16572 if (_ptr_environment
) {
16573 NDR_PULL_ALLOC(ndr
, r
->environment
);
16574 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->environment
, _ptr_environment
));
16576 r
->environment
= NULL
;
16578 ndr
->flags
= _flags_save_string
;
16581 uint32_t _flags_save_string
= ndr
->flags
;
16582 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16583 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dll_name
));
16584 if (_ptr_dll_name
) {
16585 NDR_PULL_ALLOC(ndr
, r
->dll_name
);
16586 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dll_name
, _ptr_dll_name
));
16588 r
->dll_name
= NULL
;
16590 ndr
->flags
= _flags_save_string
;
16593 if (ndr_flags
& NDR_BUFFERS
) {
16595 uint32_t _flags_save_string
= ndr
->flags
;
16596 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16597 if (r
->monitor_name
) {
16598 uint32_t _relative_save_offset
;
16599 _relative_save_offset
= ndr
->offset
;
16600 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
16601 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16602 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
16603 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
16604 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
16605 ndr
->offset
= _relative_save_offset
;
16607 ndr
->flags
= _flags_save_string
;
16610 uint32_t _flags_save_string
= ndr
->flags
;
16611 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16612 if (r
->environment
) {
16613 uint32_t _relative_save_offset
;
16614 _relative_save_offset
= ndr
->offset
;
16615 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->environment
));
16616 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16617 NDR_PULL_SET_MEM_CTX(ndr
, r
->environment
, 0);
16618 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->environment
));
16619 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
16620 ndr
->offset
= _relative_save_offset
;
16622 ndr
->flags
= _flags_save_string
;
16625 uint32_t _flags_save_string
= ndr
->flags
;
16626 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16628 uint32_t _relative_save_offset
;
16629 _relative_save_offset
= ndr
->offset
;
16630 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dll_name
));
16631 _mem_save_dll_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16632 NDR_PULL_SET_MEM_CTX(ndr
, r
->dll_name
, 0);
16633 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->dll_name
));
16634 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dll_name_0
, 0);
16635 ndr
->offset
= _relative_save_offset
;
16637 ndr
->flags
= _flags_save_string
;
16640 return NDR_ERR_SUCCESS
;
16643 _PUBLIC_
void ndr_print_spoolss_MonitorInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_MonitorInfo2
*r
)
16645 ndr_print_struct(ndr
, name
, "spoolss_MonitorInfo2");
16647 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
16649 if (r
->monitor_name
) {
16650 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
16653 ndr_print_ptr(ndr
, "environment", r
->environment
);
16655 if (r
->environment
) {
16656 ndr_print_string(ndr
, "environment", r
->environment
);
16659 ndr_print_ptr(ndr
, "dll_name", r
->dll_name
);
16662 ndr_print_string(ndr
, "dll_name", r
->dll_name
);
16668 _PUBLIC_
size_t ndr_size_spoolss_MonitorInfo2(const struct spoolss_MonitorInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16670 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_MonitorInfo2
, ic
);
16673 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_MonitorInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_MonitorInfo
*r
)
16675 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
16676 if (ndr_flags
& NDR_SCALARS
) {
16677 int level
= ndr_push_get_switch_value(ndr
, r
);
16680 NDR_CHECK(ndr_push_align(ndr
, 4));
16681 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16682 NDR_CHECK(ndr_push_spoolss_MonitorInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
16686 NDR_CHECK(ndr_push_align(ndr
, 4));
16687 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16688 NDR_CHECK(ndr_push_spoolss_MonitorInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
16696 if (ndr_flags
& NDR_BUFFERS
) {
16697 int level
= ndr_push_get_switch_value(ndr
, r
);
16698 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
16701 NDR_CHECK(ndr_push_spoolss_MonitorInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
16705 NDR_CHECK(ndr_push_spoolss_MonitorInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
16713 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
16714 return NDR_ERR_SUCCESS
;
16717 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_MonitorInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_MonitorInfo
*r
)
16719 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
16721 level
= ndr_pull_get_switch_value(ndr
, r
);
16722 if (ndr_flags
& NDR_SCALARS
) {
16725 NDR_CHECK(ndr_pull_align(ndr
, 4));
16726 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16727 NDR_CHECK(ndr_pull_spoolss_MonitorInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
16731 NDR_CHECK(ndr_pull_align(ndr
, 4));
16732 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16733 NDR_CHECK(ndr_pull_spoolss_MonitorInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
16741 if (ndr_flags
& NDR_BUFFERS
) {
16742 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
16745 NDR_CHECK(ndr_pull_spoolss_MonitorInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
16749 NDR_CHECK(ndr_pull_spoolss_MonitorInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
16757 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
16758 return NDR_ERR_SUCCESS
;
16761 _PUBLIC_
void ndr_print_spoolss_MonitorInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_MonitorInfo
*r
)
16764 level
= ndr_print_get_switch_value(ndr
, r
);
16765 ndr_print_union(ndr
, name
, level
, "spoolss_MonitorInfo");
16768 ndr_print_spoolss_MonitorInfo1(ndr
, "info1", &r
->info1
);
16772 ndr_print_spoolss_MonitorInfo2(ndr
, "info2", &r
->info2
);
16781 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcDataTypesInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrintProcDataTypesInfo1
*r
)
16783 if (ndr_flags
& NDR_SCALARS
) {
16784 NDR_CHECK(ndr_push_align(ndr
, 4));
16786 uint32_t _flags_save_string
= ndr
->flags
;
16787 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16788 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->name_array
));
16789 ndr
->flags
= _flags_save_string
;
16792 if (ndr_flags
& NDR_BUFFERS
) {
16794 uint32_t _flags_save_string
= ndr
->flags
;
16795 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16796 if (r
->name_array
) {
16797 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->name_array
));
16798 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->name_array
));
16800 ndr
->flags
= _flags_save_string
;
16803 return NDR_ERR_SUCCESS
;
16806 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcDataTypesInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrintProcDataTypesInfo1
*r
)
16808 uint32_t _ptr_name_array
;
16809 TALLOC_CTX
*_mem_save_name_array_0
;
16810 if (ndr_flags
& NDR_SCALARS
) {
16811 NDR_CHECK(ndr_pull_align(ndr
, 4));
16813 uint32_t _flags_save_string
= ndr
->flags
;
16814 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16815 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name_array
));
16816 if (_ptr_name_array
) {
16817 NDR_PULL_ALLOC(ndr
, r
->name_array
);
16818 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->name_array
, _ptr_name_array
));
16820 r
->name_array
= NULL
;
16822 ndr
->flags
= _flags_save_string
;
16825 if (ndr_flags
& NDR_BUFFERS
) {
16827 uint32_t _flags_save_string
= ndr
->flags
;
16828 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16829 if (r
->name_array
) {
16830 uint32_t _relative_save_offset
;
16831 _relative_save_offset
= ndr
->offset
;
16832 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->name_array
));
16833 _mem_save_name_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16834 NDR_PULL_SET_MEM_CTX(ndr
, r
->name_array
, 0);
16835 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->name_array
));
16836 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_array_0
, 0);
16837 ndr
->offset
= _relative_save_offset
;
16839 ndr
->flags
= _flags_save_string
;
16842 return NDR_ERR_SUCCESS
;
16845 _PUBLIC_
void ndr_print_spoolss_PrintProcDataTypesInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrintProcDataTypesInfo1
*r
)
16847 ndr_print_struct(ndr
, name
, "spoolss_PrintProcDataTypesInfo1");
16849 ndr_print_ptr(ndr
, "name_array", r
->name_array
);
16851 if (r
->name_array
) {
16852 ndr_print_string(ndr
, "name_array", r
->name_array
);
16858 _PUBLIC_
size_t ndr_size_spoolss_PrintProcDataTypesInfo1(const struct spoolss_PrintProcDataTypesInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16860 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrintProcDataTypesInfo1
, ic
);
16863 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcDataTypesInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrintProcDataTypesInfo
*r
)
16865 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
16866 if (ndr_flags
& NDR_SCALARS
) {
16867 int level
= ndr_push_get_switch_value(ndr
, r
);
16870 NDR_CHECK(ndr_push_align(ndr
, 4));
16871 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16872 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
16880 if (ndr_flags
& NDR_BUFFERS
) {
16881 int level
= ndr_push_get_switch_value(ndr
, r
);
16882 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
16885 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
16893 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
16894 return NDR_ERR_SUCCESS
;
16897 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcDataTypesInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrintProcDataTypesInfo
*r
)
16899 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
16901 level
= ndr_pull_get_switch_value(ndr
, r
);
16902 if (ndr_flags
& NDR_SCALARS
) {
16905 NDR_CHECK(ndr_pull_align(ndr
, 4));
16906 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16907 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
16915 if (ndr_flags
& NDR_BUFFERS
) {
16916 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
16919 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
16927 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
16928 return NDR_ERR_SUCCESS
;
16931 _PUBLIC_
void ndr_print_spoolss_PrintProcDataTypesInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrintProcDataTypesInfo
*r
)
16934 level
= ndr_print_get_switch_value(ndr
, r
);
16935 ndr_print_union(ndr
, name
, level
, "spoolss_PrintProcDataTypesInfo");
16938 ndr_print_spoolss_PrintProcDataTypesInfo1(ndr
, "info1", &r
->info1
);
16947 static enum ndr_err_code
ndr_push_spoolss_PrinterChangeFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
16949 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
16950 return NDR_ERR_SUCCESS
;
16953 static enum ndr_err_code
ndr_pull_spoolss_PrinterChangeFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
16956 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
16958 return NDR_ERR_SUCCESS
;
16961 _PUBLIC_
void ndr_print_spoolss_PrinterChangeFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
16963 ndr_print_uint32(ndr
, name
, r
);
16965 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINTER", PRINTER_CHANGE_ADD_PRINTER
, r
);
16966 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SET_PRINTER", PRINTER_CHANGE_SET_PRINTER
, r
);
16967 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINTER", PRINTER_CHANGE_DELETE_PRINTER
, r
);
16968 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_FAILED_CONNECTION_PRINTER", PRINTER_CHANGE_FAILED_CONNECTION_PRINTER
, r
);
16969 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_JOB", PRINTER_CHANGE_ADD_JOB
, r
);
16970 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SET_JOB", PRINTER_CHANGE_SET_JOB
, r
);
16971 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_JOB", PRINTER_CHANGE_DELETE_JOB
, r
);
16972 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_WRITE_JOB", PRINTER_CHANGE_WRITE_JOB
, r
);
16973 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_FORM", PRINTER_CHANGE_ADD_FORM
, r
);
16974 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SET_FORM", PRINTER_CHANGE_SET_FORM
, r
);
16975 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_FORM", PRINTER_CHANGE_DELETE_FORM
, r
);
16976 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PORT", PRINTER_CHANGE_ADD_PORT
, r
);
16977 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_CONFIGURE_PORT", PRINTER_CHANGE_CONFIGURE_PORT
, r
);
16978 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PORT", PRINTER_CHANGE_DELETE_PORT
, r
);
16979 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINT_PROCESSOR", PRINTER_CHANGE_ADD_PRINT_PROCESSOR
, r
);
16980 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINT_PROCESSOR", PRINTER_CHANGE_DELETE_PRINT_PROCESSOR
, r
);
16981 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SERVER", PRINTER_CHANGE_SERVER
, r
);
16982 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINTER_DRIVER", PRINTER_CHANGE_ADD_PRINTER_DRIVER
, r
);
16983 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SET_PRINTER_DRIVER", PRINTER_CHANGE_SET_PRINTER_DRIVER
, r
);
16984 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINTER_DRIVER", PRINTER_CHANGE_DELETE_PRINTER_DRIVER
, r
);
16985 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_TIMEOUT", PRINTER_CHANGE_TIMEOUT
, r
);
16989 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobNotifyField(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_JobNotifyField r
)
16991 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
16992 return NDR_ERR_SUCCESS
;
16995 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobNotifyField(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_JobNotifyField
*r
)
16998 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
17000 return NDR_ERR_SUCCESS
;
17003 _PUBLIC_
void ndr_print_spoolss_JobNotifyField(struct ndr_print
*ndr
, const char *name
, enum spoolss_JobNotifyField r
)
17005 const char *val
= NULL
;
17008 case JOB_NOTIFY_FIELD_PRINTER_NAME
: val
= "JOB_NOTIFY_FIELD_PRINTER_NAME"; break;
17009 case JOB_NOTIFY_FIELD_MACHINE_NAME
: val
= "JOB_NOTIFY_FIELD_MACHINE_NAME"; break;
17010 case JOB_NOTIFY_FIELD_PORT_NAME
: val
= "JOB_NOTIFY_FIELD_PORT_NAME"; break;
17011 case JOB_NOTIFY_FIELD_USER_NAME
: val
= "JOB_NOTIFY_FIELD_USER_NAME"; break;
17012 case JOB_NOTIFY_FIELD_NOTIFY_NAME
: val
= "JOB_NOTIFY_FIELD_NOTIFY_NAME"; break;
17013 case JOB_NOTIFY_FIELD_DATATYPE
: val
= "JOB_NOTIFY_FIELD_DATATYPE"; break;
17014 case JOB_NOTIFY_FIELD_PRINT_PROCESSOR
: val
= "JOB_NOTIFY_FIELD_PRINT_PROCESSOR"; break;
17015 case JOB_NOTIFY_FIELD_PARAMETERS
: val
= "JOB_NOTIFY_FIELD_PARAMETERS"; break;
17016 case JOB_NOTIFY_FIELD_DRIVER_NAME
: val
= "JOB_NOTIFY_FIELD_DRIVER_NAME"; break;
17017 case JOB_NOTIFY_FIELD_DEVMODE
: val
= "JOB_NOTIFY_FIELD_DEVMODE"; break;
17018 case JOB_NOTIFY_FIELD_STATUS
: val
= "JOB_NOTIFY_FIELD_STATUS"; break;
17019 case JOB_NOTIFY_FIELD_STATUS_STRING
: val
= "JOB_NOTIFY_FIELD_STATUS_STRING"; break;
17020 case JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR
: val
= "JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR"; break;
17021 case JOB_NOTIFY_FIELD_DOCUMENT
: val
= "JOB_NOTIFY_FIELD_DOCUMENT"; break;
17022 case JOB_NOTIFY_FIELD_PRIORITY
: val
= "JOB_NOTIFY_FIELD_PRIORITY"; break;
17023 case JOB_NOTIFY_FIELD_POSITION
: val
= "JOB_NOTIFY_FIELD_POSITION"; break;
17024 case JOB_NOTIFY_FIELD_SUBMITTED
: val
= "JOB_NOTIFY_FIELD_SUBMITTED"; break;
17025 case JOB_NOTIFY_FIELD_START_TIME
: val
= "JOB_NOTIFY_FIELD_START_TIME"; break;
17026 case JOB_NOTIFY_FIELD_UNTIL_TIME
: val
= "JOB_NOTIFY_FIELD_UNTIL_TIME"; break;
17027 case JOB_NOTIFY_FIELD_TIME
: val
= "JOB_NOTIFY_FIELD_TIME"; break;
17028 case JOB_NOTIFY_FIELD_TOTAL_PAGES
: val
= "JOB_NOTIFY_FIELD_TOTAL_PAGES"; break;
17029 case JOB_NOTIFY_FIELD_PAGES_PRINTED
: val
= "JOB_NOTIFY_FIELD_PAGES_PRINTED"; break;
17030 case JOB_NOTIFY_FIELD_TOTAL_BYTES
: val
= "JOB_NOTIFY_FIELD_TOTAL_BYTES"; break;
17031 case JOB_NOTIFY_FIELD_BYTES_PRINTED
: val
= "JOB_NOTIFY_FIELD_BYTES_PRINTED"; break;
17033 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
17036 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintNotifyField(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PrintNotifyField r
)
17038 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
17039 return NDR_ERR_SUCCESS
;
17042 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintNotifyField(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PrintNotifyField
*r
)
17045 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
17047 return NDR_ERR_SUCCESS
;
17050 _PUBLIC_
void ndr_print_spoolss_PrintNotifyField(struct ndr_print
*ndr
, const char *name
, enum spoolss_PrintNotifyField r
)
17052 const char *val
= NULL
;
17055 case PRINTER_NOTIFY_FIELD_SERVER_NAME
: val
= "PRINTER_NOTIFY_FIELD_SERVER_NAME"; break;
17056 case PRINTER_NOTIFY_FIELD_PRINTER_NAME
: val
= "PRINTER_NOTIFY_FIELD_PRINTER_NAME"; break;
17057 case PRINTER_NOTIFY_FIELD_SHARE_NAME
: val
= "PRINTER_NOTIFY_FIELD_SHARE_NAME"; break;
17058 case PRINTER_NOTIFY_FIELD_PORT_NAME
: val
= "PRINTER_NOTIFY_FIELD_PORT_NAME"; break;
17059 case PRINTER_NOTIFY_FIELD_DRIVER_NAME
: val
= "PRINTER_NOTIFY_FIELD_DRIVER_NAME"; break;
17060 case PRINTER_NOTIFY_FIELD_COMMENT
: val
= "PRINTER_NOTIFY_FIELD_COMMENT"; break;
17061 case PRINTER_NOTIFY_FIELD_LOCATION
: val
= "PRINTER_NOTIFY_FIELD_LOCATION"; break;
17062 case PRINTER_NOTIFY_FIELD_DEVMODE
: val
= "PRINTER_NOTIFY_FIELD_DEVMODE"; break;
17063 case PRINTER_NOTIFY_FIELD_SEPFILE
: val
= "PRINTER_NOTIFY_FIELD_SEPFILE"; break;
17064 case PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR
: val
= "PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR"; break;
17065 case PRINTER_NOTIFY_FIELD_PARAMETERS
: val
= "PRINTER_NOTIFY_FIELD_PARAMETERS"; break;
17066 case PRINTER_NOTIFY_FIELD_DATATYPE
: val
= "PRINTER_NOTIFY_FIELD_DATATYPE"; break;
17067 case PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR
: val
= "PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR"; break;
17068 case PRINTER_NOTIFY_FIELD_ATTRIBUTES
: val
= "PRINTER_NOTIFY_FIELD_ATTRIBUTES"; break;
17069 case PRINTER_NOTIFY_FIELD_PRIORITY
: val
= "PRINTER_NOTIFY_FIELD_PRIORITY"; break;
17070 case PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY
: val
= "PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY"; break;
17071 case PRINTER_NOTIFY_FIELD_START_TIME
: val
= "PRINTER_NOTIFY_FIELD_START_TIME"; break;
17072 case PRINTER_NOTIFY_FIELD_UNTIL_TIME
: val
= "PRINTER_NOTIFY_FIELD_UNTIL_TIME"; break;
17073 case PRINTER_NOTIFY_FIELD_STATUS
: val
= "PRINTER_NOTIFY_FIELD_STATUS"; break;
17074 case PRINTER_NOTIFY_FIELD_STATUS_STRING
: val
= "PRINTER_NOTIFY_FIELD_STATUS_STRING"; break;
17075 case PRINTER_NOTIFY_FIELD_CJOBS
: val
= "PRINTER_NOTIFY_FIELD_CJOBS"; break;
17076 case PRINTER_NOTIFY_FIELD_AVERAGE_PPM
: val
= "PRINTER_NOTIFY_FIELD_AVERAGE_PPM"; break;
17077 case PRINTER_NOTIFY_FIELD_TOTAL_PAGES
: val
= "PRINTER_NOTIFY_FIELD_TOTAL_PAGES"; break;
17078 case PRINTER_NOTIFY_FIELD_PAGES_PRINTED
: val
= "PRINTER_NOTIFY_FIELD_PAGES_PRINTED"; break;
17079 case PRINTER_NOTIFY_FIELD_TOTAL_BYTES
: val
= "PRINTER_NOTIFY_FIELD_TOTAL_BYTES"; break;
17080 case PRINTER_NOTIFY_FIELD_BYTES_PRINTED
: val
= "PRINTER_NOTIFY_FIELD_BYTES_PRINTED"; break;
17081 case PRINTER_NOTIFY_FIELD_OBJECT_GUID
: val
= "PRINTER_NOTIFY_FIELD_OBJECT_GUID"; break;
17082 case PRINTER_NOTIFY_FIELD_FRIENDLY_NAME
: val
= "PRINTER_NOTIFY_FIELD_FRIENDLY_NAME"; break;
17084 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
17087 static enum ndr_err_code
ndr_push_spoolss_NotifyType(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_NotifyType r
)
17089 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
));
17090 return NDR_ERR_SUCCESS
;
17093 static enum ndr_err_code
ndr_pull_spoolss_NotifyType(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_NotifyType
*r
)
17096 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &v
));
17098 return NDR_ERR_SUCCESS
;
17101 _PUBLIC_
void ndr_print_spoolss_NotifyType(struct ndr_print
*ndr
, const char *name
, enum spoolss_NotifyType r
)
17103 const char *val
= NULL
;
17106 case PRINTER_NOTIFY_TYPE
: val
= "PRINTER_NOTIFY_TYPE"; break;
17107 case JOB_NOTIFY_TYPE
: val
= "JOB_NOTIFY_TYPE"; break;
17109 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
17112 static enum ndr_err_code
ndr_push_spoolss_Field(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_Field
*r
)
17114 if (ndr_flags
& NDR_SCALARS
) {
17115 int level
= ndr_push_get_switch_value(ndr
, r
);
17117 case PRINTER_NOTIFY_TYPE
: {
17118 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->field
));
17121 case JOB_NOTIFY_TYPE
: {
17122 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->field
));
17126 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->field
));
17131 if (ndr_flags
& NDR_BUFFERS
) {
17132 int level
= ndr_push_get_switch_value(ndr
, r
);
17134 case PRINTER_NOTIFY_TYPE
:
17137 case JOB_NOTIFY_TYPE
:
17145 return NDR_ERR_SUCCESS
;
17148 static enum ndr_err_code
ndr_pull_spoolss_Field(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_Field
*r
)
17151 level
= ndr_pull_get_switch_value(ndr
, r
);
17152 if (ndr_flags
& NDR_SCALARS
) {
17154 case PRINTER_NOTIFY_TYPE
: {
17155 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->field
));
17158 case JOB_NOTIFY_TYPE
: {
17159 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->field
));
17163 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->field
));
17168 if (ndr_flags
& NDR_BUFFERS
) {
17170 case PRINTER_NOTIFY_TYPE
:
17173 case JOB_NOTIFY_TYPE
:
17181 return NDR_ERR_SUCCESS
;
17184 static enum ndr_err_code
ndr_push_spoolss_NotifyOptionType(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_NotifyOptionType
*r
)
17186 uint32_t cntr_fields_1
;
17187 if (ndr_flags
& NDR_SCALARS
) {
17188 NDR_CHECK(ndr_push_align(ndr
, 4));
17189 NDR_CHECK(ndr_push_spoolss_NotifyType(ndr
, NDR_SCALARS
, r
->type
));
17190 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->u1
));
17191 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u2
));
17192 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u3
));
17193 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
17194 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->fields
));
17196 if (ndr_flags
& NDR_BUFFERS
) {
17198 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
17199 for (cntr_fields_1
= 0; cntr_fields_1
< r
->count
; cntr_fields_1
++) {
17200 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->fields
[cntr_fields_1
], r
->type
));
17201 NDR_CHECK(ndr_push_spoolss_Field(ndr
, NDR_SCALARS
, &r
->fields
[cntr_fields_1
]));
17205 return NDR_ERR_SUCCESS
;
17208 static enum ndr_err_code
ndr_pull_spoolss_NotifyOptionType(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_NotifyOptionType
*r
)
17210 uint32_t _ptr_fields
;
17211 uint32_t cntr_fields_1
;
17212 TALLOC_CTX
*_mem_save_fields_0
;
17213 TALLOC_CTX
*_mem_save_fields_1
;
17214 if (ndr_flags
& NDR_SCALARS
) {
17215 NDR_CHECK(ndr_pull_align(ndr
, 4));
17216 NDR_CHECK(ndr_pull_spoolss_NotifyType(ndr
, NDR_SCALARS
, &r
->type
));
17217 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->u1
));
17218 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u2
));
17219 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u3
));
17220 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
17221 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_fields
));
17223 NDR_PULL_ALLOC(ndr
, r
->fields
);
17228 if (ndr_flags
& NDR_BUFFERS
) {
17230 _mem_save_fields_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17231 NDR_PULL_SET_MEM_CTX(ndr
, r
->fields
, 0);
17232 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->fields
));
17233 NDR_PULL_ALLOC_N(ndr
, r
->fields
, ndr_get_array_size(ndr
, &r
->fields
));
17234 _mem_save_fields_1
= NDR_PULL_GET_MEM_CTX(ndr
);
17235 NDR_PULL_SET_MEM_CTX(ndr
, r
->fields
, 0);
17236 for (cntr_fields_1
= 0; cntr_fields_1
< r
->count
; cntr_fields_1
++) {
17237 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->fields
[cntr_fields_1
], r
->type
));
17238 NDR_CHECK(ndr_pull_spoolss_Field(ndr
, NDR_SCALARS
, &r
->fields
[cntr_fields_1
]));
17240 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_fields_1
, 0);
17241 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_fields_0
, 0);
17244 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->fields
, r
->count
));
17247 return NDR_ERR_SUCCESS
;
17250 _PUBLIC_
void ndr_print_spoolss_NotifyOptionType(struct ndr_print
*ndr
, const char *name
, const struct spoolss_NotifyOptionType
*r
)
17252 uint32_t cntr_fields_1
;
17253 ndr_print_struct(ndr
, name
, "spoolss_NotifyOptionType");
17255 ndr_print_spoolss_NotifyType(ndr
, "type", r
->type
);
17256 ndr_print_uint16(ndr
, "u1", r
->u1
);
17257 ndr_print_uint32(ndr
, "u2", r
->u2
);
17258 ndr_print_uint32(ndr
, "u3", r
->u3
);
17259 ndr_print_uint32(ndr
, "count", r
->count
);
17260 ndr_print_ptr(ndr
, "fields", r
->fields
);
17263 ndr
->print(ndr
, "%s: ARRAY(%d)", "fields", (int)r
->count
);
17265 for (cntr_fields_1
=0;cntr_fields_1
<r
->count
;cntr_fields_1
++) {
17267 if (asprintf(&idx_1
, "[%d]", cntr_fields_1
) != -1) {
17268 ndr_print_set_switch_value(ndr
, &r
->fields
[cntr_fields_1
], r
->type
);
17269 ndr_print_spoolss_Field(ndr
, "fields", &r
->fields
[cntr_fields_1
]);
17279 static enum ndr_err_code
ndr_push_spoolssNotifyOptionFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
17281 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
17282 return NDR_ERR_SUCCESS
;
17285 static enum ndr_err_code
ndr_pull_spoolssNotifyOptionFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
17288 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
17290 return NDR_ERR_SUCCESS
;
17293 _PUBLIC_
void ndr_print_spoolssNotifyOptionFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
17295 ndr_print_uint32(ndr
, name
, r
);
17297 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_NOTIFY_OPTIONS_REFRESH", PRINTER_NOTIFY_OPTIONS_REFRESH
, r
);
17301 static enum ndr_err_code
ndr_push_spoolss_NotifyOption(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_NotifyOption
*r
)
17303 uint32_t cntr_types_1
;
17304 if (ndr_flags
& NDR_SCALARS
) {
17305 NDR_CHECK(ndr_push_align(ndr
, 4));
17306 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
17307 NDR_CHECK(ndr_push_spoolssNotifyOptionFlags(ndr
, NDR_SCALARS
, r
->flags
));
17308 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
17309 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->types
));
17311 if (ndr_flags
& NDR_BUFFERS
) {
17313 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
17314 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
17315 NDR_CHECK(ndr_push_spoolss_NotifyOptionType(ndr
, NDR_SCALARS
, &r
->types
[cntr_types_1
]));
17317 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
17318 NDR_CHECK(ndr_push_spoolss_NotifyOptionType(ndr
, NDR_BUFFERS
, &r
->types
[cntr_types_1
]));
17322 return NDR_ERR_SUCCESS
;
17325 static enum ndr_err_code
ndr_pull_spoolss_NotifyOption(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_NotifyOption
*r
)
17327 uint32_t _ptr_types
;
17328 uint32_t cntr_types_1
;
17329 TALLOC_CTX
*_mem_save_types_0
;
17330 TALLOC_CTX
*_mem_save_types_1
;
17331 if (ndr_flags
& NDR_SCALARS
) {
17332 NDR_CHECK(ndr_pull_align(ndr
, 4));
17333 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
17334 NDR_CHECK(ndr_pull_spoolssNotifyOptionFlags(ndr
, NDR_SCALARS
, &r
->flags
));
17335 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
17336 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_types
));
17338 NDR_PULL_ALLOC(ndr
, r
->types
);
17343 if (ndr_flags
& NDR_BUFFERS
) {
17345 _mem_save_types_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17346 NDR_PULL_SET_MEM_CTX(ndr
, r
->types
, 0);
17347 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->types
));
17348 NDR_PULL_ALLOC_N(ndr
, r
->types
, ndr_get_array_size(ndr
, &r
->types
));
17349 _mem_save_types_1
= NDR_PULL_GET_MEM_CTX(ndr
);
17350 NDR_PULL_SET_MEM_CTX(ndr
, r
->types
, 0);
17351 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
17352 NDR_CHECK(ndr_pull_spoolss_NotifyOptionType(ndr
, NDR_SCALARS
, &r
->types
[cntr_types_1
]));
17354 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
17355 NDR_CHECK(ndr_pull_spoolss_NotifyOptionType(ndr
, NDR_BUFFERS
, &r
->types
[cntr_types_1
]));
17357 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_1
, 0);
17358 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_0
, 0);
17361 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->types
, r
->count
));
17364 return NDR_ERR_SUCCESS
;
17367 _PUBLIC_
void ndr_print_spoolss_NotifyOption(struct ndr_print
*ndr
, const char *name
, const struct spoolss_NotifyOption
*r
)
17369 uint32_t cntr_types_1
;
17370 ndr_print_struct(ndr
, name
, "spoolss_NotifyOption");
17372 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->version
);
17373 ndr_print_spoolssNotifyOptionFlags(ndr
, "flags", r
->flags
);
17374 ndr_print_uint32(ndr
, "count", r
->count
);
17375 ndr_print_ptr(ndr
, "types", r
->types
);
17378 ndr
->print(ndr
, "%s: ARRAY(%d)", "types", (int)r
->count
);
17380 for (cntr_types_1
=0;cntr_types_1
<r
->count
;cntr_types_1
++) {
17382 if (asprintf(&idx_1
, "[%d]", cntr_types_1
) != -1) {
17383 ndr_print_spoolss_NotifyOptionType(ndr
, "types", &r
->types
[cntr_types_1
]);
17393 static enum ndr_err_code
ndr_push_spoolss_NotifyString(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_NotifyString
*r
)
17395 if (ndr_flags
& NDR_SCALARS
) {
17396 NDR_CHECK(ndr_push_align(ndr
, 4));
17397 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
17398 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
17400 if (ndr_flags
& NDR_BUFFERS
) {
17402 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
/ 2));
17403 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, r
->size
/ 2, sizeof(uint16_t), CH_UTF16
));
17406 return NDR_ERR_SUCCESS
;
17409 static enum ndr_err_code
ndr_pull_spoolss_NotifyString(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_NotifyString
*r
)
17411 uint32_t _ptr_string
;
17412 TALLOC_CTX
*_mem_save_string_0
;
17413 if (ndr_flags
& NDR_SCALARS
) {
17414 NDR_CHECK(ndr_pull_align(ndr
, 4));
17415 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
17416 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
17418 NDR_PULL_ALLOC(ndr
, r
->string
);
17423 if (ndr_flags
& NDR_BUFFERS
) {
17425 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17426 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
17427 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
17428 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_size(ndr
, &r
->string
), sizeof(uint16_t), CH_UTF16
));
17429 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
17432 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
/ 2));
17435 return NDR_ERR_SUCCESS
;
17438 _PUBLIC_
void ndr_print_spoolss_NotifyString(struct ndr_print
*ndr
, const char *name
, const struct spoolss_NotifyString
*r
)
17440 ndr_print_struct(ndr
, name
, "spoolss_NotifyString");
17442 ndr_print_uint32(ndr
, "size", r
->size
);
17443 ndr_print_ptr(ndr
, "string", r
->string
);
17446 ndr_print_string(ndr
, "string", r
->string
);
17452 static enum ndr_err_code
ndr_push_spoolss_NotifyTable(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_NotifyTable r
)
17454 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
17455 return NDR_ERR_SUCCESS
;
17458 static enum ndr_err_code
ndr_pull_spoolss_NotifyTable(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_NotifyTable
*r
)
17461 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
17463 return NDR_ERR_SUCCESS
;
17466 _PUBLIC_
void ndr_print_spoolss_NotifyTable(struct ndr_print
*ndr
, const char *name
, enum spoolss_NotifyTable r
)
17468 const char *val
= NULL
;
17471 case NOTIFY_TABLE_DWORD
: val
= "NOTIFY_TABLE_DWORD"; break;
17472 case NOTIFY_TABLE_STRING
: val
= "NOTIFY_TABLE_STRING"; break;
17473 case NOTIFY_TABLE_DEVMODE
: val
= "NOTIFY_TABLE_DEVMODE"; break;
17474 case NOTIFY_TABLE_TIME
: val
= "NOTIFY_TABLE_TIME"; break;
17475 case NOTIFY_TABLE_SECURITYDESCRIPTOR
: val
= "NOTIFY_TABLE_SECURITYDESCRIPTOR"; break;
17477 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
17480 static enum ndr_err_code
ndr_push_spoolss_NotifyData(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_NotifyData
*r
)
17482 if (ndr_flags
& NDR_SCALARS
) {
17483 int level
= ndr_push_get_switch_value(ndr
, r
);
17484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
17487 uint32_t cntr_integer_0
;
17488 for (cntr_integer_0
= 0; cntr_integer_0
< 2; cntr_integer_0
++) {
17489 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->integer
[cntr_integer_0
]));
17494 NDR_CHECK(ndr_push_spoolss_NotifyString(ndr
, NDR_SCALARS
, &r
->string
));
17498 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
, &r
->devmode
));
17502 NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr
, NDR_SCALARS
, &r
->time
));
17506 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sd
));
17510 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
17513 if (ndr_flags
& NDR_BUFFERS
) {
17514 int level
= ndr_push_get_switch_value(ndr
, r
);
17520 NDR_CHECK(ndr_push_spoolss_NotifyString(ndr
, NDR_BUFFERS
, &r
->string
));
17524 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_BUFFERS
, &r
->devmode
));
17528 NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr
, NDR_BUFFERS
, &r
->time
));
17532 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sd
));
17536 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
17539 return NDR_ERR_SUCCESS
;
17542 static enum ndr_err_code
ndr_pull_spoolss_NotifyData(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_NotifyData
*r
)
17546 level
= ndr_pull_get_switch_value(ndr
, r
);
17547 if (ndr_flags
& NDR_SCALARS
) {
17548 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
17549 if (_level
!= level
) {
17550 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
17554 uint32_t cntr_integer_0
;
17555 for (cntr_integer_0
= 0; cntr_integer_0
< 2; cntr_integer_0
++) {
17556 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->integer
[cntr_integer_0
]));
17561 NDR_CHECK(ndr_pull_spoolss_NotifyString(ndr
, NDR_SCALARS
, &r
->string
));
17565 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
, &r
->devmode
));
17569 NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr
, NDR_SCALARS
, &r
->time
));
17573 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sd
));
17577 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
17580 if (ndr_flags
& NDR_BUFFERS
) {
17586 NDR_CHECK(ndr_pull_spoolss_NotifyString(ndr
, NDR_BUFFERS
, &r
->string
));
17590 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_BUFFERS
, &r
->devmode
));
17594 NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr
, NDR_BUFFERS
, &r
->time
));
17598 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sd
));
17602 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
17605 return NDR_ERR_SUCCESS
;
17608 _PUBLIC_
void ndr_print_spoolss_NotifyData(struct ndr_print
*ndr
, const char *name
, const union spoolss_NotifyData
*r
)
17611 uint32_t cntr_integer_0
;
17612 level
= ndr_print_get_switch_value(ndr
, r
);
17613 ndr_print_union(ndr
, name
, level
, "spoolss_NotifyData");
17616 ndr
->print(ndr
, "%s: ARRAY(%d)", "integer", (int)2);
17618 for (cntr_integer_0
=0;cntr_integer_0
<2;cntr_integer_0
++) {
17620 if (asprintf(&idx_0
, "[%d]", cntr_integer_0
) != -1) {
17621 ndr_print_uint32(ndr
, "integer", r
->integer
[cntr_integer_0
]);
17629 ndr_print_spoolss_NotifyString(ndr
, "string", &r
->string
);
17633 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode", &r
->devmode
);
17637 ndr_print_spoolss_TimeCtr(ndr
, "time", &r
->time
);
17641 ndr_print_sec_desc_buf(ndr
, "sd", &r
->sd
);
17645 ndr_print_bad_level(ndr
, name
, level
);
17649 static enum ndr_err_code
ndr_push_spoolss_Notify(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_Notify
*r
)
17651 if (ndr_flags
& NDR_SCALARS
) {
17652 NDR_CHECK(ndr_push_align(ndr
, 4));
17653 NDR_CHECK(ndr_push_spoolss_NotifyType(ndr
, NDR_SCALARS
, r
->type
));
17654 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->field
, r
->type
));
17655 NDR_CHECK(ndr_push_spoolss_Field(ndr
, NDR_SCALARS
, &r
->field
));
17656 NDR_CHECK(ndr_push_spoolss_NotifyTable(ndr
, NDR_SCALARS
, r
->variable_type
));
17657 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
17658 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->data
, r
->variable_type
));
17659 NDR_CHECK(ndr_push_spoolss_NotifyData(ndr
, NDR_SCALARS
, &r
->data
));
17661 if (ndr_flags
& NDR_BUFFERS
) {
17662 NDR_CHECK(ndr_push_spoolss_NotifyData(ndr
, NDR_BUFFERS
, &r
->data
));
17664 return NDR_ERR_SUCCESS
;
17667 static enum ndr_err_code
ndr_pull_spoolss_Notify(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_Notify
*r
)
17669 if (ndr_flags
& NDR_SCALARS
) {
17670 NDR_CHECK(ndr_pull_align(ndr
, 4));
17671 NDR_CHECK(ndr_pull_spoolss_NotifyType(ndr
, NDR_SCALARS
, &r
->type
));
17672 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->field
, r
->type
));
17673 NDR_CHECK(ndr_pull_spoolss_Field(ndr
, NDR_SCALARS
, &r
->field
));
17674 NDR_CHECK(ndr_pull_spoolss_NotifyTable(ndr
, NDR_SCALARS
, &r
->variable_type
));
17675 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
17676 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->data
, r
->variable_type
));
17677 NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr
, NDR_SCALARS
, &r
->data
));
17679 if (ndr_flags
& NDR_BUFFERS
) {
17680 NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr
, NDR_BUFFERS
, &r
->data
));
17682 return NDR_ERR_SUCCESS
;
17685 _PUBLIC_
void ndr_print_spoolss_Notify(struct ndr_print
*ndr
, const char *name
, const struct spoolss_Notify
*r
)
17687 ndr_print_struct(ndr
, name
, "spoolss_Notify");
17689 ndr_print_spoolss_NotifyType(ndr
, "type", r
->type
);
17690 ndr_print_set_switch_value(ndr
, &r
->field
, r
->type
);
17691 ndr_print_spoolss_Field(ndr
, "field", &r
->field
);
17692 ndr_print_spoolss_NotifyTable(ndr
, "variable_type", r
->variable_type
);
17693 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
17694 ndr_print_set_switch_value(ndr
, &r
->data
, r
->variable_type
);
17695 ndr_print_spoolss_NotifyData(ndr
, "data", &r
->data
);
17699 static enum ndr_err_code
ndr_push_spoolss_NotifyInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_NotifyInfo
*r
)
17701 uint32_t cntr_notifies_0
;
17702 if (ndr_flags
& NDR_SCALARS
) {
17703 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
17704 NDR_CHECK(ndr_push_align(ndr
, 4));
17705 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
17706 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
17707 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
17708 for (cntr_notifies_0
= 0; cntr_notifies_0
< r
->count
; cntr_notifies_0
++) {
17709 NDR_CHECK(ndr_push_spoolss_Notify(ndr
, NDR_SCALARS
, &r
->notifies
[cntr_notifies_0
]));
17712 if (ndr_flags
& NDR_BUFFERS
) {
17713 for (cntr_notifies_0
= 0; cntr_notifies_0
< r
->count
; cntr_notifies_0
++) {
17714 NDR_CHECK(ndr_push_spoolss_Notify(ndr
, NDR_BUFFERS
, &r
->notifies
[cntr_notifies_0
]));
17717 return NDR_ERR_SUCCESS
;
17720 static enum ndr_err_code
ndr_pull_spoolss_NotifyInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_NotifyInfo
*r
)
17722 uint32_t cntr_notifies_0
;
17723 TALLOC_CTX
*_mem_save_notifies_0
;
17724 if (ndr_flags
& NDR_SCALARS
) {
17725 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->notifies
));
17726 NDR_CHECK(ndr_pull_align(ndr
, 4));
17727 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
17728 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
17729 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
17730 NDR_PULL_ALLOC_N(ndr
, r
->notifies
, ndr_get_array_size(ndr
, &r
->notifies
));
17731 _mem_save_notifies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17732 NDR_PULL_SET_MEM_CTX(ndr
, r
->notifies
, 0);
17733 for (cntr_notifies_0
= 0; cntr_notifies_0
< r
->count
; cntr_notifies_0
++) {
17734 NDR_CHECK(ndr_pull_spoolss_Notify(ndr
, NDR_SCALARS
, &r
->notifies
[cntr_notifies_0
]));
17736 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notifies_0
, 0);
17738 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->notifies
, r
->count
));
17741 if (ndr_flags
& NDR_BUFFERS
) {
17742 _mem_save_notifies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17743 NDR_PULL_SET_MEM_CTX(ndr
, r
->notifies
, 0);
17744 for (cntr_notifies_0
= 0; cntr_notifies_0
< r
->count
; cntr_notifies_0
++) {
17745 NDR_CHECK(ndr_pull_spoolss_Notify(ndr
, NDR_BUFFERS
, &r
->notifies
[cntr_notifies_0
]));
17747 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notifies_0
, 0);
17749 return NDR_ERR_SUCCESS
;
17752 _PUBLIC_
void ndr_print_spoolss_NotifyInfo(struct ndr_print
*ndr
, const char *name
, const struct spoolss_NotifyInfo
*r
)
17754 uint32_t cntr_notifies_0
;
17755 ndr_print_struct(ndr
, name
, "spoolss_NotifyInfo");
17757 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->version
);
17758 ndr_print_uint32(ndr
, "flags", r
->flags
);
17759 ndr_print_uint32(ndr
, "count", r
->count
);
17760 ndr
->print(ndr
, "%s: ARRAY(%d)", "notifies", (int)r
->count
);
17762 for (cntr_notifies_0
=0;cntr_notifies_0
<r
->count
;cntr_notifies_0
++) {
17764 if (asprintf(&idx_0
, "[%d]", cntr_notifies_0
) != -1) {
17765 ndr_print_spoolss_Notify(ndr
, "notifies", &r
->notifies
[cntr_notifies_0
]);
17773 static enum ndr_err_code
ndr_push_spoolss_ReplyPrinterInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_ReplyPrinterInfo
*r
)
17775 if (ndr_flags
& NDR_SCALARS
) {
17776 int level
= ndr_push_get_switch_value(ndr
, r
);
17777 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
17780 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
17784 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
17787 if (ndr_flags
& NDR_BUFFERS
) {
17788 int level
= ndr_push_get_switch_value(ndr
, r
);
17792 NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
17797 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
17800 return NDR_ERR_SUCCESS
;
17803 static enum ndr_err_code
ndr_pull_spoolss_ReplyPrinterInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_ReplyPrinterInfo
*r
)
17807 TALLOC_CTX
*_mem_save_info0_0
;
17808 level
= ndr_pull_get_switch_value(ndr
, r
);
17809 if (ndr_flags
& NDR_SCALARS
) {
17810 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
17811 if (_level
!= level
) {
17812 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
17816 uint32_t _ptr_info0
;
17817 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
17819 NDR_PULL_ALLOC(ndr
, r
->info0
);
17826 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
17829 if (ndr_flags
& NDR_BUFFERS
) {
17833 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17834 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
17835 NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
17836 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
17841 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
17844 return NDR_ERR_SUCCESS
;
17847 _PUBLIC_
void ndr_print_spoolss_ReplyPrinterInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_ReplyPrinterInfo
*r
)
17850 level
= ndr_print_get_switch_value(ndr
, r
);
17851 ndr_print_union(ndr
, name
, level
, "spoolss_ReplyPrinterInfo");
17854 ndr_print_ptr(ndr
, "info0", r
->info0
);
17857 ndr_print_spoolss_NotifyInfo(ndr
, "info0", r
->info0
);
17863 ndr_print_bad_level(ndr
, name
, level
);
17867 static enum ndr_err_code
ndr_push_spoolss_PrinterNotifyFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
17869 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
17870 return NDR_ERR_SUCCESS
;
17873 static enum ndr_err_code
ndr_pull_spoolss_PrinterNotifyFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
17876 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
17878 return NDR_ERR_SUCCESS
;
17881 _PUBLIC_
void ndr_print_spoolss_PrinterNotifyFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
17883 ndr_print_uint32(ndr
, name
, r
);
17885 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDED", PRINTER_NOTIFY_INFO_DISCARDED
, r
);
17886 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDNOTED", PRINTER_NOTIFY_INFO_DISCARDNOTED
, r
);
17887 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_COLOR_MISMATCH", PRINTER_NOTIFY_INFO_COLOR_MISMATCH
, r
);
17891 static enum ndr_err_code
ndr_push_spoolss_UserLevel1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UserLevel1
*r
)
17893 if (ndr_flags
& NDR_SCALARS
) {
17894 NDR_CHECK(ndr_push_align(ndr
, 4));
17895 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
17896 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->client
));
17897 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user
));
17898 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->build
));
17899 NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr
, NDR_SCALARS
, r
->major
));
17900 NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr
, NDR_SCALARS
, r
->minor
));
17901 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, r
->processor
));
17903 if (ndr_flags
& NDR_BUFFERS
) {
17905 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client
, CH_UTF16
)));
17906 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
17907 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client
, CH_UTF16
)));
17908 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->client
, ndr_charset_length(r
->client
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
17911 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
17912 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
17913 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
17914 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user
, ndr_charset_length(r
->user
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
17917 return NDR_ERR_SUCCESS
;
17920 static enum ndr_err_code
ndr_pull_spoolss_UserLevel1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UserLevel1
*r
)
17922 uint32_t _ptr_client
;
17923 TALLOC_CTX
*_mem_save_client_0
;
17924 uint32_t _ptr_user
;
17925 TALLOC_CTX
*_mem_save_user_0
;
17926 if (ndr_flags
& NDR_SCALARS
) {
17927 NDR_CHECK(ndr_pull_align(ndr
, 4));
17928 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
17929 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_client
));
17931 NDR_PULL_ALLOC(ndr
, r
->client
);
17935 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user
));
17937 NDR_PULL_ALLOC(ndr
, r
->user
);
17941 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->build
));
17942 NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr
, NDR_SCALARS
, &r
->major
));
17943 NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr
, NDR_SCALARS
, &r
->minor
));
17944 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, &r
->processor
));
17946 if (ndr_flags
& NDR_BUFFERS
) {
17948 _mem_save_client_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17949 NDR_PULL_SET_MEM_CTX(ndr
, r
->client
, 0);
17950 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->client
));
17951 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->client
));
17952 if (ndr_get_array_length(ndr
, &r
->client
) > ndr_get_array_size(ndr
, &r
->client
)) {
17953 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
));
17955 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->client
), sizeof(uint16_t)));
17956 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->client
, ndr_get_array_length(ndr
, &r
->client
), sizeof(uint16_t), CH_UTF16
));
17957 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_client_0
, 0);
17960 _mem_save_user_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17961 NDR_PULL_SET_MEM_CTX(ndr
, r
->user
, 0);
17962 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user
));
17963 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user
));
17964 if (ndr_get_array_length(ndr
, &r
->user
) > ndr_get_array_size(ndr
, &r
->user
)) {
17965 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
));
17967 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t)));
17968 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t), CH_UTF16
));
17969 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_0
, 0);
17972 return NDR_ERR_SUCCESS
;
17975 _PUBLIC_
void ndr_print_spoolss_UserLevel1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UserLevel1
*r
)
17977 ndr_print_struct(ndr
, name
, "spoolss_UserLevel1");
17979 ndr_print_uint32(ndr
, "size", r
->size
);
17980 ndr_print_ptr(ndr
, "client", r
->client
);
17983 ndr_print_string(ndr
, "client", r
->client
);
17986 ndr_print_ptr(ndr
, "user", r
->user
);
17989 ndr_print_string(ndr
, "user", r
->user
);
17992 ndr_print_uint32(ndr
, "build", r
->build
);
17993 ndr_print_spoolss_MajorVersion(ndr
, "major", r
->major
);
17994 ndr_print_spoolss_MinorVersion(ndr
, "minor", r
->minor
);
17995 ndr_print_spoolss_ProcessorArchitecture(ndr
, "processor", r
->processor
);
17999 static enum ndr_err_code
ndr_push_spoolss_UserLevel2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UserLevel2
*r
)
18001 if (ndr_flags
& NDR_SCALARS
) {
18002 NDR_CHECK(ndr_push_align(ndr
, 4));
18003 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->not_used
));
18005 if (ndr_flags
& NDR_BUFFERS
) {
18007 return NDR_ERR_SUCCESS
;
18010 static enum ndr_err_code
ndr_pull_spoolss_UserLevel2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UserLevel2
*r
)
18012 if (ndr_flags
& NDR_SCALARS
) {
18013 NDR_CHECK(ndr_pull_align(ndr
, 4));
18014 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->not_used
));
18016 if (ndr_flags
& NDR_BUFFERS
) {
18018 return NDR_ERR_SUCCESS
;
18021 _PUBLIC_
void ndr_print_spoolss_UserLevel2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UserLevel2
*r
)
18023 ndr_print_struct(ndr
, name
, "spoolss_UserLevel2");
18025 ndr_print_uint32(ndr
, "not_used", r
->not_used
);
18029 static enum ndr_err_code
ndr_push_spoolss_UserLevel3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UserLevel3
*r
)
18031 if (ndr_flags
& NDR_SCALARS
) {
18032 NDR_CHECK(ndr_push_align(ndr
, 4));
18033 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
18034 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
18035 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size2
));
18036 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->client
));
18037 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user
));
18038 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->build
));
18039 NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr
, NDR_SCALARS
, r
->major
));
18040 NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr
, NDR_SCALARS
, r
->minor
));
18041 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, r
->processor
));
18042 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->reserved
));
18044 if (ndr_flags
& NDR_BUFFERS
) {
18046 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client
, CH_UTF16
)));
18047 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
18048 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client
, CH_UTF16
)));
18049 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->client
, ndr_charset_length(r
->client
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
18052 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
18053 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
18054 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
18055 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user
, ndr_charset_length(r
->user
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
18058 return NDR_ERR_SUCCESS
;
18061 static enum ndr_err_code
ndr_pull_spoolss_UserLevel3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UserLevel3
*r
)
18063 uint32_t _ptr_client
;
18064 TALLOC_CTX
*_mem_save_client_0
;
18065 uint32_t _ptr_user
;
18066 TALLOC_CTX
*_mem_save_user_0
;
18067 if (ndr_flags
& NDR_SCALARS
) {
18068 NDR_CHECK(ndr_pull_align(ndr
, 4));
18069 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
18070 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
18071 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size2
));
18072 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_client
));
18074 NDR_PULL_ALLOC(ndr
, r
->client
);
18078 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user
));
18080 NDR_PULL_ALLOC(ndr
, r
->user
);
18084 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->build
));
18085 NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr
, NDR_SCALARS
, &r
->major
));
18086 NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr
, NDR_SCALARS
, &r
->minor
));
18087 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, &r
->processor
));
18088 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->reserved
));
18090 if (ndr_flags
& NDR_BUFFERS
) {
18092 _mem_save_client_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18093 NDR_PULL_SET_MEM_CTX(ndr
, r
->client
, 0);
18094 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->client
));
18095 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->client
));
18096 if (ndr_get_array_length(ndr
, &r
->client
) > ndr_get_array_size(ndr
, &r
->client
)) {
18097 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
));
18099 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->client
), sizeof(uint16_t)));
18100 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->client
, ndr_get_array_length(ndr
, &r
->client
), sizeof(uint16_t), CH_UTF16
));
18101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_client_0
, 0);
18104 _mem_save_user_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18105 NDR_PULL_SET_MEM_CTX(ndr
, r
->user
, 0);
18106 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user
));
18107 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user
));
18108 if (ndr_get_array_length(ndr
, &r
->user
) > ndr_get_array_size(ndr
, &r
->user
)) {
18109 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
));
18111 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t)));
18112 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t), CH_UTF16
));
18113 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_0
, 0);
18116 return NDR_ERR_SUCCESS
;
18119 _PUBLIC_
void ndr_print_spoolss_UserLevel3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UserLevel3
*r
)
18121 ndr_print_struct(ndr
, name
, "spoolss_UserLevel3");
18123 ndr_print_uint32(ndr
, "size", r
->size
);
18124 ndr_print_uint32(ndr
, "flags", r
->flags
);
18125 ndr_print_uint32(ndr
, "size2", r
->size2
);
18126 ndr_print_ptr(ndr
, "client", r
->client
);
18129 ndr_print_string(ndr
, "client", r
->client
);
18132 ndr_print_ptr(ndr
, "user", r
->user
);
18135 ndr_print_string(ndr
, "user", r
->user
);
18138 ndr_print_uint32(ndr
, "build", r
->build
);
18139 ndr_print_spoolss_MajorVersion(ndr
, "major", r
->major
);
18140 ndr_print_spoolss_MinorVersion(ndr
, "minor", r
->minor
);
18141 ndr_print_spoolss_ProcessorArchitecture(ndr
, "processor", r
->processor
);
18142 ndr_print_udlong(ndr
, "reserved", r
->reserved
);
18146 static enum ndr_err_code
ndr_push_spoolss_UserLevel(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_UserLevel
*r
)
18148 if (ndr_flags
& NDR_SCALARS
) {
18149 int level
= ndr_push_get_switch_value(ndr
, r
);
18150 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
18153 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->level1
));
18157 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->level2
));
18161 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->level3
));
18165 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
18168 if (ndr_flags
& NDR_BUFFERS
) {
18169 int level
= ndr_push_get_switch_value(ndr
, r
);
18173 NDR_CHECK(ndr_push_spoolss_UserLevel1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->level1
));
18179 NDR_CHECK(ndr_push_spoolss_UserLevel2(ndr
, NDR_SCALARS
, r
->level2
));
18185 NDR_CHECK(ndr_push_spoolss_UserLevel3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->level3
));
18190 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
18193 return NDR_ERR_SUCCESS
;
18196 static enum ndr_err_code
ndr_pull_spoolss_UserLevel(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_UserLevel
*r
)
18200 TALLOC_CTX
*_mem_save_level1_0
;
18201 TALLOC_CTX
*_mem_save_level2_0
;
18202 TALLOC_CTX
*_mem_save_level3_0
;
18203 level
= ndr_pull_get_switch_value(ndr
, r
);
18204 if (ndr_flags
& NDR_SCALARS
) {
18205 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
18206 if (_level
!= level
) {
18207 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r", _level
);
18211 uint32_t _ptr_level1
;
18212 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_level1
));
18214 NDR_PULL_ALLOC(ndr
, r
->level1
);
18221 uint32_t _ptr_level2
;
18222 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_level2
));
18224 NDR_PULL_ALLOC(ndr
, r
->level2
);
18231 uint32_t _ptr_level3
;
18232 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_level3
));
18234 NDR_PULL_ALLOC(ndr
, r
->level3
);
18241 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
18244 if (ndr_flags
& NDR_BUFFERS
) {
18248 _mem_save_level1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18249 NDR_PULL_SET_MEM_CTX(ndr
, r
->level1
, 0);
18250 NDR_CHECK(ndr_pull_spoolss_UserLevel1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->level1
));
18251 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level1_0
, 0);
18257 _mem_save_level2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18258 NDR_PULL_SET_MEM_CTX(ndr
, r
->level2
, 0);
18259 NDR_CHECK(ndr_pull_spoolss_UserLevel2(ndr
, NDR_SCALARS
, r
->level2
));
18260 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level2_0
, 0);
18266 _mem_save_level3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18267 NDR_PULL_SET_MEM_CTX(ndr
, r
->level3
, 0);
18268 NDR_CHECK(ndr_pull_spoolss_UserLevel3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->level3
));
18269 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level3_0
, 0);
18274 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u", level
);
18277 return NDR_ERR_SUCCESS
;
18280 _PUBLIC_
void ndr_print_spoolss_UserLevel(struct ndr_print
*ndr
, const char *name
, const union spoolss_UserLevel
*r
)
18283 level
= ndr_print_get_switch_value(ndr
, r
);
18284 ndr_print_union(ndr
, name
, level
, "spoolss_UserLevel");
18287 ndr_print_ptr(ndr
, "level1", r
->level1
);
18290 ndr_print_spoolss_UserLevel1(ndr
, "level1", r
->level1
);
18296 ndr_print_ptr(ndr
, "level2", r
->level2
);
18299 ndr_print_spoolss_UserLevel2(ndr
, "level2", r
->level2
);
18305 ndr_print_ptr(ndr
, "level3", r
->level3
);
18308 ndr_print_spoolss_UserLevel3(ndr
, "level3", r
->level3
);
18314 ndr_print_bad_level(ndr
, name
, level
);
18318 static enum ndr_err_code
ndr_push_spoolss_UserLevelCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UserLevelCtr
*r
)
18320 if (ndr_flags
& NDR_SCALARS
) {
18321 NDR_CHECK(ndr_push_align(ndr
, 4));
18322 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
18323 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->user_info
, r
->level
));
18324 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr
, NDR_SCALARS
, &r
->user_info
));
18326 if (ndr_flags
& NDR_BUFFERS
) {
18327 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr
, NDR_BUFFERS
, &r
->user_info
));
18329 return NDR_ERR_SUCCESS
;
18332 static enum ndr_err_code
ndr_pull_spoolss_UserLevelCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UserLevelCtr
*r
)
18334 if (ndr_flags
& NDR_SCALARS
) {
18335 NDR_CHECK(ndr_pull_align(ndr
, 4));
18336 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
18337 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->user_info
, r
->level
));
18338 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr
, NDR_SCALARS
, &r
->user_info
));
18340 if (ndr_flags
& NDR_BUFFERS
) {
18341 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr
, NDR_BUFFERS
, &r
->user_info
));
18343 return NDR_ERR_SUCCESS
;
18346 _PUBLIC_
void ndr_print_spoolss_UserLevelCtr(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UserLevelCtr
*r
)
18348 ndr_print_struct(ndr
, name
, "spoolss_UserLevelCtr");
18350 ndr_print_uint32(ndr
, "level", r
->level
);
18351 ndr_print_set_switch_value(ndr
, &r
->user_info
, r
->level
);
18352 ndr_print_spoolss_UserLevel(ndr
, "user_info", &r
->user_info
);
18356 static enum ndr_err_code
ndr_push_spoolss_AccessRights(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
18358 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
18359 return NDR_ERR_SUCCESS
;
18362 static enum ndr_err_code
ndr_pull_spoolss_AccessRights(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
18365 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
18367 return NDR_ERR_SUCCESS
;
18370 _PUBLIC_
void ndr_print_spoolss_AccessRights(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
18372 ndr_print_uint32(ndr
, name
, r
);
18374 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SERVER_ACCESS_ADMINISTER", SERVER_ACCESS_ADMINISTER
, r
);
18375 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SERVER_ACCESS_ENUMERATE", SERVER_ACCESS_ENUMERATE
, r
);
18376 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ACCESS_ADMINISTER", PRINTER_ACCESS_ADMINISTER
, r
);
18377 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ACCESS_USE", PRINTER_ACCESS_USE
, r
);
18378 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_ACCESS_ADMINISTER", JOB_ACCESS_ADMINISTER
, r
);
18379 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_ACCESS_READ", JOB_ACCESS_READ
, r
);
18383 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterEnumValues(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterEnumValues
*r
)
18385 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
18386 if (ndr_flags
& NDR_SCALARS
) {
18387 NDR_CHECK(ndr_push_align(ndr
, 4));
18388 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18390 uint32_t _flags_save_string
= ndr
->flags
;
18391 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18392 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->value_name
));
18393 ndr
->flags
= _flags_save_string
;
18395 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->value_name
)));
18396 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->type
));
18397 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data
));
18398 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_spoolss_PrinterData(r
->data
, r
->type
, ndr
->iconv_convenience
, ndr
->flags
)));
18400 if (ndr_flags
& NDR_BUFFERS
) {
18401 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
18403 uint32_t _flags_save_string
= ndr
->flags
;
18404 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18405 if (r
->value_name
) {
18406 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->value_name
));
18407 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->value_name
));
18409 ndr
->flags
= _flags_save_string
;
18412 NDR_CHECK(ndr_push_relative_ptr2(ndr
, r
->data
));
18414 struct ndr_push
*_ndr_data
;
18415 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_data
, 0, r
->data_length
));
18416 NDR_CHECK(ndr_push_set_switch_value(_ndr_data
, r
->data
, r
->type
));
18417 NDR_CHECK(ndr_push_spoolss_PrinterData(_ndr_data
, NDR_SCALARS
|NDR_BUFFERS
, r
->data
));
18418 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_data
, 0, r
->data_length
));
18422 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
18423 return NDR_ERR_SUCCESS
;
18426 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterEnumValues(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterEnumValues
*r
)
18428 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
18429 uint32_t _ptr_value_name
;
18430 TALLOC_CTX
*_mem_save_value_name_0
;
18431 uint32_t _ptr_data
;
18432 TALLOC_CTX
*_mem_save_data_0
;
18433 if (ndr_flags
& NDR_SCALARS
) {
18434 NDR_CHECK(ndr_pull_align(ndr
, 4));
18435 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18437 uint32_t _flags_save_string
= ndr
->flags
;
18438 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18439 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_value_name
));
18440 if (_ptr_value_name
) {
18441 NDR_PULL_ALLOC(ndr
, r
->value_name
);
18442 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->value_name
, _ptr_value_name
));
18444 r
->value_name
= NULL
;
18446 ndr
->flags
= _flags_save_string
;
18448 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->value_name_len
));
18449 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->type
));
18450 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
18452 NDR_PULL_ALLOC(ndr
, r
->data
);
18453 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data
, _ptr_data
));
18457 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_length
));
18459 if (ndr_flags
& NDR_BUFFERS
) {
18460 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
18462 uint32_t _flags_save_string
= ndr
->flags
;
18463 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18464 if (r
->value_name
) {
18465 uint32_t _relative_save_offset
;
18466 _relative_save_offset
= ndr
->offset
;
18467 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->value_name
));
18468 _mem_save_value_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18469 NDR_PULL_SET_MEM_CTX(ndr
, r
->value_name
, 0);
18470 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->value_name
));
18471 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_name_0
, 0);
18472 ndr
->offset
= _relative_save_offset
;
18474 ndr
->flags
= _flags_save_string
;
18477 uint32_t _relative_save_offset
;
18478 _relative_save_offset
= ndr
->offset
;
18479 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data
));
18480 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18481 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
18483 struct ndr_pull
*_ndr_data
;
18484 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_data
, 0, r
->data_length
));
18485 NDR_CHECK(ndr_pull_set_switch_value(_ndr_data
, r
->data
, r
->type
));
18486 NDR_CHECK(ndr_pull_spoolss_PrinterData(_ndr_data
, NDR_SCALARS
|NDR_BUFFERS
, r
->data
));
18487 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_data
, 0, r
->data_length
));
18489 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
18490 ndr
->offset
= _relative_save_offset
;
18493 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
18494 return NDR_ERR_SUCCESS
;
18497 _PUBLIC_
void ndr_print_spoolss_PrinterEnumValues(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterEnumValues
*r
)
18499 ndr_print_struct(ndr
, name
, "spoolss_PrinterEnumValues");
18501 ndr_print_ptr(ndr
, "value_name", r
->value_name
);
18503 if (r
->value_name
) {
18504 ndr_print_string(ndr
, "value_name", r
->value_name
);
18507 ndr_print_uint32(ndr
, "value_name_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->value_name
):r
->value_name_len
);
18508 ndr_print_winreg_Type(ndr
, "type", r
->type
);
18509 ndr_print_ptr(ndr
, "data", r
->data
);
18512 ndr_print_set_switch_value(ndr
, r
->data
, r
->type
);
18513 ndr_print_spoolss_PrinterData(ndr
, "data", r
->data
);
18516 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
);
18520 _PUBLIC_
size_t ndr_size_spoolss_PrinterEnumValues(const struct spoolss_PrinterEnumValues
*r
, struct smb_iconv_convenience
*ic
, int flags
)
18522 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterEnumValues
, ic
);
18525 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DeleteDriverFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
18527 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
18528 return NDR_ERR_SUCCESS
;
18531 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DeleteDriverFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
18534 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
18536 return NDR_ERR_SUCCESS
;
18539 _PUBLIC_
void ndr_print_spoolss_DeleteDriverFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
18541 ndr_print_uint32(ndr
, name
, r
);
18543 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DPD_DELETE_UNUSED_FILES", DPD_DELETE_UNUSED_FILES
, r
);
18544 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DPD_DELETE_SPECIFIC_VERSION", DPD_DELETE_SPECIFIC_VERSION
, r
);
18545 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DPD_DELETE_ALL_FILES", DPD_DELETE_ALL_FILES
, r
);
18549 static enum ndr_err_code
ndr_push_spoolss_PortProtocol(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PortProtocol r
)
18551 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
18552 return NDR_ERR_SUCCESS
;
18555 static enum ndr_err_code
ndr_pull_spoolss_PortProtocol(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PortProtocol
*r
)
18558 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
18560 return NDR_ERR_SUCCESS
;
18563 _PUBLIC_
void ndr_print_spoolss_PortProtocol(struct ndr_print
*ndr
, const char *name
, enum spoolss_PortProtocol r
)
18565 const char *val
= NULL
;
18568 case PROTOCOL_RAWTCP_TYPE
: val
= "PROTOCOL_RAWTCP_TYPE"; break;
18569 case PROTOCOL_LPR_TYPE
: val
= "PROTOCOL_LPR_TYPE"; break;
18571 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
18574 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortData1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortData1
*r
)
18576 if (ndr_flags
& NDR_SCALARS
) {
18577 NDR_CHECK(ndr_push_align(ndr
, 4));
18578 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->portname
, 64, sizeof(uint16_t), CH_UTF16
));
18579 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x00000001));
18580 NDR_CHECK(ndr_push_spoolss_PortProtocol(ndr
, NDR_SCALARS
, r
->protocol
));
18581 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, sizeof(r
)));
18582 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
18583 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hostaddress
, 49, sizeof(uint16_t), CH_UTF16
));
18584 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->snmpcommunity
, 33, sizeof(uint16_t), CH_UTF16
));
18585 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dblspool
));
18586 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->queue
, 33, sizeof(uint16_t), CH_UTF16
));
18587 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->ip_address
, 16, sizeof(uint16_t), CH_UTF16
));
18588 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hardware_address
, 13, sizeof(uint16_t), CH_UTF16
));
18589 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->device_type
, 257, sizeof(uint16_t), CH_UTF16
));
18590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->port_number
));
18591 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->snmp_enabled
));
18592 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->snmp_dev_index
));
18594 if (ndr_flags
& NDR_BUFFERS
) {
18596 return NDR_ERR_SUCCESS
;
18599 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortData1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortData1
*r
)
18601 if (ndr_flags
& NDR_SCALARS
) {
18602 NDR_CHECK(ndr_pull_align(ndr
, 4));
18603 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->portname
, 64, sizeof(uint16_t), CH_UTF16
));
18604 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
18605 NDR_CHECK(ndr_pull_spoolss_PortProtocol(ndr
, NDR_SCALARS
, &r
->protocol
));
18606 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
18607 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
18608 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hostaddress
, 49, sizeof(uint16_t), CH_UTF16
));
18609 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->snmpcommunity
, 33, sizeof(uint16_t), CH_UTF16
));
18610 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dblspool
));
18611 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->queue
, 33, sizeof(uint16_t), CH_UTF16
));
18612 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->ip_address
, 16, sizeof(uint16_t), CH_UTF16
));
18613 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hardware_address
, 13, sizeof(uint16_t), CH_UTF16
));
18614 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->device_type
, 257, sizeof(uint16_t), CH_UTF16
));
18615 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->port_number
));
18616 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->snmp_enabled
));
18617 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->snmp_dev_index
));
18619 if (ndr_flags
& NDR_BUFFERS
) {
18621 return NDR_ERR_SUCCESS
;
18624 _PUBLIC_
void ndr_print_spoolss_PortData1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortData1
*r
)
18626 ndr_print_struct(ndr
, name
, "spoolss_PortData1");
18628 ndr_print_string(ndr
, "portname", r
->portname
);
18629 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x00000001:r
->version
);
18630 ndr_print_spoolss_PortProtocol(ndr
, "protocol", r
->protocol
);
18631 ndr_print_uint32(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?sizeof(r
):r
->size
);
18632 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
18633 ndr_print_string(ndr
, "hostaddress", r
->hostaddress
);
18634 ndr_print_string(ndr
, "snmpcommunity", r
->snmpcommunity
);
18635 ndr_print_uint32(ndr
, "dblspool", r
->dblspool
);
18636 ndr_print_string(ndr
, "queue", r
->queue
);
18637 ndr_print_string(ndr
, "ip_address", r
->ip_address
);
18638 ndr_print_string(ndr
, "hardware_address", r
->hardware_address
);
18639 ndr_print_string(ndr
, "device_type", r
->device_type
);
18640 ndr_print_uint32(ndr
, "port_number", r
->port_number
);
18641 ndr_print_uint32(ndr
, "snmp_enabled", r
->snmp_enabled
);
18642 ndr_print_uint32(ndr
, "snmp_dev_index", r
->snmp_dev_index
);
18646 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortData2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortData2
*r
)
18648 if (ndr_flags
& NDR_SCALARS
) {
18649 NDR_CHECK(ndr_push_align(ndr
, 4));
18650 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->portname
, 64, sizeof(uint16_t), CH_UTF16
));
18651 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x00000002));
18652 NDR_CHECK(ndr_push_spoolss_PortProtocol(ndr
, NDR_SCALARS
, r
->protocol
));
18653 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, sizeof(r
)));
18654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
18655 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hostaddress
, 128, sizeof(uint16_t), CH_UTF16
));
18656 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->snmpcommunity
, 33, sizeof(uint16_t), CH_UTF16
));
18657 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dblspool
));
18658 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->queue
, 33, sizeof(uint16_t), CH_UTF16
));
18659 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->device_type
, 257, sizeof(uint16_t), CH_UTF16
));
18660 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->port_number
));
18661 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->snmp_enabled
));
18662 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->snmp_dev_index
));
18663 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->port_monitor_mib_index
));
18665 if (ndr_flags
& NDR_BUFFERS
) {
18667 return NDR_ERR_SUCCESS
;
18670 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortData2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortData2
*r
)
18672 if (ndr_flags
& NDR_SCALARS
) {
18673 NDR_CHECK(ndr_pull_align(ndr
, 4));
18674 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->portname
, 64, sizeof(uint16_t), CH_UTF16
));
18675 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
18676 NDR_CHECK(ndr_pull_spoolss_PortProtocol(ndr
, NDR_SCALARS
, &r
->protocol
));
18677 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
18678 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
18679 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hostaddress
, 128, sizeof(uint16_t), CH_UTF16
));
18680 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->snmpcommunity
, 33, sizeof(uint16_t), CH_UTF16
));
18681 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dblspool
));
18682 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->queue
, 33, sizeof(uint16_t), CH_UTF16
));
18683 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->device_type
, 257, sizeof(uint16_t), CH_UTF16
));
18684 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->port_number
));
18685 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->snmp_enabled
));
18686 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->snmp_dev_index
));
18687 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->port_monitor_mib_index
));
18689 if (ndr_flags
& NDR_BUFFERS
) {
18691 return NDR_ERR_SUCCESS
;
18694 _PUBLIC_
void ndr_print_spoolss_PortData2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortData2
*r
)
18696 ndr_print_struct(ndr
, name
, "spoolss_PortData2");
18698 ndr_print_string(ndr
, "portname", r
->portname
);
18699 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x00000002:r
->version
);
18700 ndr_print_spoolss_PortProtocol(ndr
, "protocol", r
->protocol
);
18701 ndr_print_uint32(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?sizeof(r
):r
->size
);
18702 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
18703 ndr_print_string(ndr
, "hostaddress", r
->hostaddress
);
18704 ndr_print_string(ndr
, "snmpcommunity", r
->snmpcommunity
);
18705 ndr_print_uint32(ndr
, "dblspool", r
->dblspool
);
18706 ndr_print_string(ndr
, "queue", r
->queue
);
18707 ndr_print_string(ndr
, "device_type", r
->device_type
);
18708 ndr_print_uint32(ndr
, "port_number", r
->port_number
);
18709 ndr_print_uint32(ndr
, "snmp_enabled", r
->snmp_enabled
);
18710 ndr_print_uint32(ndr
, "snmp_dev_index", r
->snmp_dev_index
);
18711 ndr_print_uint32(ndr
, "port_monitor_mib_index", r
->port_monitor_mib_index
);
18715 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_MonitorUi(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_MonitorUi
*r
)
18717 if (ndr_flags
& NDR_SCALARS
) {
18718 NDR_CHECK(ndr_push_align(ndr
, 4));
18720 uint32_t _flags_save_string
= ndr
->flags
;
18721 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18722 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->dll_name
));
18723 ndr
->flags
= _flags_save_string
;
18726 if (ndr_flags
& NDR_BUFFERS
) {
18728 return NDR_ERR_SUCCESS
;
18731 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_MonitorUi(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_MonitorUi
*r
)
18733 if (ndr_flags
& NDR_SCALARS
) {
18734 NDR_CHECK(ndr_pull_align(ndr
, 4));
18736 uint32_t _flags_save_string
= ndr
->flags
;
18737 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18738 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->dll_name
));
18739 ndr
->flags
= _flags_save_string
;
18742 if (ndr_flags
& NDR_BUFFERS
) {
18744 return NDR_ERR_SUCCESS
;
18747 _PUBLIC_
void ndr_print_spoolss_MonitorUi(struct ndr_print
*ndr
, const char *name
, const struct spoolss_MonitorUi
*r
)
18749 ndr_print_struct(ndr
, name
, "spoolss_MonitorUi");
18751 ndr_print_string(ndr
, "dll_name", r
->dll_name
);
18755 static enum ndr_err_code
ndr_push_spoolss_AddPrinterDriverExFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
18757 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
18758 return NDR_ERR_SUCCESS
;
18761 static enum ndr_err_code
ndr_pull_spoolss_AddPrinterDriverExFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
18764 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
18766 return NDR_ERR_SUCCESS
;
18769 _PUBLIC_
void ndr_print_spoolss_AddPrinterDriverExFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
18771 ndr_print_uint32(ndr
, name
, r
);
18773 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_STRICT_UPGRADE", APD_STRICT_UPGRADE
, r
);
18774 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_STRICT_DOWNGRADE", APD_STRICT_DOWNGRADE
, r
);
18775 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_COPY_ALL_FILES", APD_COPY_ALL_FILES
, r
);
18776 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_COPY_NEW_FILES", APD_COPY_NEW_FILES
, r
);
18777 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_COPY_FROM_DIRECTORY", APD_COPY_FROM_DIRECTORY
, r
);
18778 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_DONT_COPY_FILES_TO_CLUSTER", APD_DONT_COPY_FILES_TO_CLUSTER
, r
);
18779 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_COPY_TO_ALL_SPOOLERS", APD_COPY_TO_ALL_SPOOLERS
, r
);
18780 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_RETURN_BLOCKING_STATUS_CODE", APD_RETURN_BLOCKING_STATUS_CODE
, r
);
18784 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrinters(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrinters
*r
)
18786 if (flags
& NDR_IN
) {
18787 NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
18788 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
18789 if (r
->in
.server
) {
18790 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
18791 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
18792 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
18793 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
18795 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
18796 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
18797 if (r
->in
.buffer
) {
18798 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
18800 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
18802 if (flags
& NDR_OUT
) {
18803 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
18805 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
18807 if (r
->out
.needed
== NULL
) {
18808 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
18810 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
18811 if (r
->out
.count
== NULL
) {
18812 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
18814 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
18815 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
18817 return NDR_ERR_SUCCESS
;
18820 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrinters(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrinters
*r
)
18822 uint32_t _ptr_server
;
18823 uint32_t _ptr_buffer
;
18824 uint32_t _ptr_info
;
18825 TALLOC_CTX
*_mem_save_server_0
;
18826 TALLOC_CTX
*_mem_save_buffer_0
;
18827 TALLOC_CTX
*_mem_save_info_0
;
18828 TALLOC_CTX
*_mem_save_needed_0
;
18829 TALLOC_CTX
*_mem_save_count_0
;
18830 if (flags
& NDR_IN
) {
18831 ZERO_STRUCT(r
->out
);
18833 NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
18834 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
18836 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
18838 r
->in
.server
= NULL
;
18840 if (r
->in
.server
) {
18841 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18842 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
18843 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
18844 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
18845 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
18846 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
));
18848 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
18849 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
18850 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
18852 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
18853 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
18855 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
18857 r
->in
.buffer
= NULL
;
18859 if (r
->in
.buffer
) {
18860 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18861 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
18862 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
18863 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
18865 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
18866 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
18867 ZERO_STRUCTP(r
->out
.needed
);
18868 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
18869 ZERO_STRUCTP(r
->out
.count
);
18871 if (flags
& NDR_OUT
) {
18872 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
18874 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
18876 r
->out
.info
= NULL
;
18879 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18880 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
18881 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
18882 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
18884 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
18885 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
18887 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18888 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
18889 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
18890 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
18891 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
18892 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
18894 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18895 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
18896 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
18897 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
18898 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
18900 return NDR_ERR_SUCCESS
;
18903 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrinters(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrinters
*r
)
18905 uint32_t cntr_info_0
;
18906 if (flags
& NDR_IN
) {
18907 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
18908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
18910 if (flags
& NDR_OUT
) {
18911 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
18912 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
18913 NDR_CHECK(ndr_push_spoolss_PrinterInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
18915 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
18916 NDR_CHECK(ndr_push_spoolss_PrinterInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
18919 return NDR_ERR_SUCCESS
;
18922 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrinters(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrinters
*r
)
18924 uint32_t cntr_info_0
;
18925 TALLOC_CTX
*_mem_save_info_0
;
18926 if (flags
& NDR_IN
) {
18927 ZERO_STRUCT(r
->out
);
18929 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
18930 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
18932 if (flags
& NDR_OUT
) {
18933 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
18934 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18935 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
18936 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
18937 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
18938 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
18940 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
18941 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
18943 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
18945 return NDR_ERR_SUCCESS
;
18948 _PUBLIC_
void ndr_print_spoolss_EnumPrinters(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinters
*r
)
18950 uint32_t cntr_info_2
;
18951 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinters");
18953 if (flags
& NDR_SET_VALUES
) {
18954 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
18956 if (flags
& NDR_IN
) {
18957 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinters");
18959 ndr_print_spoolss_EnumPrinterFlags(ndr
, "flags", r
->in
.flags
);
18960 ndr_print_ptr(ndr
, "server", r
->in
.server
);
18962 if (r
->in
.server
) {
18963 ndr_print_string(ndr
, "server", r
->in
.server
);
18966 ndr_print_uint32(ndr
, "level", r
->in
.level
);
18967 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
18969 if (r
->in
.buffer
) {
18970 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
18973 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
18976 if (flags
& NDR_OUT
) {
18977 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinters");
18979 ndr_print_ptr(ndr
, "count", r
->out
.count
);
18981 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
18983 ndr_print_ptr(ndr
, "info", r
->out
.info
);
18985 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
18987 if (*r
->out
.info
) {
18988 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
18990 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
18992 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
18993 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
18994 ndr_print_spoolss_PrinterInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
19002 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
19004 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
19006 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19012 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_OpenPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_OpenPrinter
*r
)
19014 if (flags
& NDR_IN
) {
19015 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.printername
));
19016 if (r
->in
.printername
) {
19017 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.printername
, CH_UTF16
)));
19018 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
19019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.printername
, CH_UTF16
)));
19020 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.printername
, ndr_charset_length(r
->in
.printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
19022 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.datatype
));
19023 if (r
->in
.datatype
) {
19024 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
)));
19025 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
19026 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
)));
19027 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.datatype
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
19029 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.devmode_ctr
));
19030 NDR_CHECK(ndr_push_spoolss_AccessRights(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
19032 if (flags
& NDR_OUT
) {
19033 if (r
->out
.handle
== NULL
) {
19034 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19036 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
19037 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19039 return NDR_ERR_SUCCESS
;
19042 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_OpenPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_OpenPrinter
*r
)
19044 uint32_t _ptr_printername
;
19045 uint32_t _ptr_datatype
;
19046 TALLOC_CTX
*_mem_save_printername_0
;
19047 TALLOC_CTX
*_mem_save_datatype_0
;
19048 TALLOC_CTX
*_mem_save_handle_0
;
19049 if (flags
& NDR_IN
) {
19050 ZERO_STRUCT(r
->out
);
19052 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
19053 if (_ptr_printername
) {
19054 NDR_PULL_ALLOC(ndr
, r
->in
.printername
);
19056 r
->in
.printername
= NULL
;
19058 if (r
->in
.printername
) {
19059 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19060 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.printername
, 0);
19061 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.printername
));
19062 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.printername
));
19063 if (ndr_get_array_length(ndr
, &r
->in
.printername
) > ndr_get_array_size(ndr
, &r
->in
.printername
)) {
19064 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
));
19066 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.printername
), sizeof(uint16_t)));
19067 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.printername
, ndr_get_array_length(ndr
, &r
->in
.printername
), sizeof(uint16_t), CH_UTF16
));
19068 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
19070 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
19071 if (_ptr_datatype
) {
19072 NDR_PULL_ALLOC(ndr
, r
->in
.datatype
);
19074 r
->in
.datatype
= NULL
;
19076 if (r
->in
.datatype
) {
19077 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19078 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.datatype
, 0);
19079 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.datatype
));
19080 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.datatype
));
19081 if (ndr_get_array_length(ndr
, &r
->in
.datatype
) > ndr_get_array_size(ndr
, &r
->in
.datatype
)) {
19082 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
));
19084 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.datatype
), sizeof(uint16_t)));
19085 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.datatype
, ndr_get_array_length(ndr
, &r
->in
.datatype
), sizeof(uint16_t), CH_UTF16
));
19086 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
19088 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.devmode_ctr
));
19089 NDR_CHECK(ndr_pull_spoolss_AccessRights(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
19090 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
19091 ZERO_STRUCTP(r
->out
.handle
);
19093 if (flags
& NDR_OUT
) {
19094 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19095 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
19097 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19098 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
19099 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
19100 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
19101 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19103 return NDR_ERR_SUCCESS
;
19106 _PUBLIC_
void ndr_print_spoolss_OpenPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_OpenPrinter
*r
)
19108 ndr_print_struct(ndr
, name
, "spoolss_OpenPrinter");
19110 if (flags
& NDR_SET_VALUES
) {
19111 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
19113 if (flags
& NDR_IN
) {
19114 ndr_print_struct(ndr
, "in", "spoolss_OpenPrinter");
19116 ndr_print_ptr(ndr
, "printername", r
->in
.printername
);
19118 if (r
->in
.printername
) {
19119 ndr_print_string(ndr
, "printername", r
->in
.printername
);
19122 ndr_print_ptr(ndr
, "datatype", r
->in
.datatype
);
19124 if (r
->in
.datatype
) {
19125 ndr_print_string(ndr
, "datatype", r
->in
.datatype
);
19128 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", &r
->in
.devmode_ctr
);
19129 ndr_print_spoolss_AccessRights(ndr
, "access_mask", r
->in
.access_mask
);
19132 if (flags
& NDR_OUT
) {
19133 ndr_print_struct(ndr
, "out", "spoolss_OpenPrinter");
19135 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
19137 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
19139 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19145 static enum ndr_err_code
ndr_push_spoolss_SetJob(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetJob
*r
)
19147 if (flags
& NDR_IN
) {
19148 if (r
->in
.handle
== NULL
) {
19149 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19151 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19152 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.job_id
));
19153 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.ctr
));
19155 NDR_CHECK(ndr_push_spoolss_JobInfoContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.ctr
));
19157 NDR_CHECK(ndr_push_spoolss_JobControl(ndr
, NDR_SCALARS
, r
->in
.command
));
19159 if (flags
& NDR_OUT
) {
19160 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19162 return NDR_ERR_SUCCESS
;
19165 static enum ndr_err_code
ndr_pull_spoolss_SetJob(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetJob
*r
)
19168 TALLOC_CTX
*_mem_save_handle_0
;
19169 TALLOC_CTX
*_mem_save_ctr_0
;
19170 if (flags
& NDR_IN
) {
19171 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19172 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
19174 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19175 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
19176 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19177 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
19178 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.job_id
));
19179 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr
));
19181 NDR_PULL_ALLOC(ndr
, r
->in
.ctr
);
19186 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19187 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ctr
, 0);
19188 NDR_CHECK(ndr_pull_spoolss_JobInfoContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.ctr
));
19189 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, 0);
19191 NDR_CHECK(ndr_pull_spoolss_JobControl(ndr
, NDR_SCALARS
, &r
->in
.command
));
19193 if (flags
& NDR_OUT
) {
19194 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19196 return NDR_ERR_SUCCESS
;
19199 _PUBLIC_
void ndr_print_spoolss_SetJob(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetJob
*r
)
19201 ndr_print_struct(ndr
, name
, "spoolss_SetJob");
19203 if (flags
& NDR_SET_VALUES
) {
19204 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
19206 if (flags
& NDR_IN
) {
19207 ndr_print_struct(ndr
, "in", "spoolss_SetJob");
19209 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
19211 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
19213 ndr_print_uint32(ndr
, "job_id", r
->in
.job_id
);
19214 ndr_print_ptr(ndr
, "ctr", r
->in
.ctr
);
19217 ndr_print_spoolss_JobInfoContainer(ndr
, "ctr", r
->in
.ctr
);
19220 ndr_print_spoolss_JobControl(ndr
, "command", r
->in
.command
);
19223 if (flags
& NDR_OUT
) {
19224 ndr_print_struct(ndr
, "out", "spoolss_SetJob");
19226 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19232 static enum ndr_err_code
ndr_push_spoolss_GetJob(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetJob
*r
)
19234 if (flags
& NDR_IN
) {
19235 if (r
->in
.handle
== NULL
) {
19236 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19238 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19239 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.job_id
));
19240 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
19241 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
19242 if (r
->in
.buffer
) {
19243 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
19245 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
19247 if (flags
& NDR_OUT
) {
19248 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
19251 struct ndr_push
*_ndr_info
;
19252 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
19253 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
19254 NDR_CHECK(ndr_push_spoolss_JobInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
19255 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
19258 if (r
->out
.needed
== NULL
) {
19259 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19261 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
19262 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19264 return NDR_ERR_SUCCESS
;
19267 static enum ndr_err_code
ndr_pull_spoolss_GetJob(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetJob
*r
)
19269 uint32_t _ptr_buffer
;
19270 uint32_t _ptr_info
;
19271 TALLOC_CTX
*_mem_save_handle_0
;
19272 TALLOC_CTX
*_mem_save_buffer_0
;
19273 TALLOC_CTX
*_mem_save_info_0
;
19274 TALLOC_CTX
*_mem_save_needed_0
;
19275 if (flags
& NDR_IN
) {
19276 ZERO_STRUCT(r
->out
);
19278 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19279 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
19281 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19282 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
19283 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19284 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
19285 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.job_id
));
19286 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
19287 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
19289 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
19291 r
->in
.buffer
= NULL
;
19293 if (r
->in
.buffer
) {
19294 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19295 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
19296 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
19297 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
19299 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
19300 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
19301 ZERO_STRUCTP(r
->out
.needed
);
19303 if (flags
& NDR_OUT
) {
19304 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
19306 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
19308 r
->out
.info
= NULL
;
19311 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19312 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
19314 struct ndr_pull
*_ndr_info
;
19315 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
19316 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
19317 NDR_CHECK(ndr_pull_spoolss_JobInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
19318 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
19320 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
19322 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19323 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
19325 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19326 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
19327 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
19328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
19329 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19331 return NDR_ERR_SUCCESS
;
19334 _PUBLIC_
void ndr_print_spoolss_GetJob(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetJob
*r
)
19336 ndr_print_struct(ndr
, name
, "spoolss_GetJob");
19338 if (flags
& NDR_SET_VALUES
) {
19339 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
19341 if (flags
& NDR_IN
) {
19342 ndr_print_struct(ndr
, "in", "spoolss_GetJob");
19344 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
19346 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
19348 ndr_print_uint32(ndr
, "job_id", r
->in
.job_id
);
19349 ndr_print_uint32(ndr
, "level", r
->in
.level
);
19350 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
19352 if (r
->in
.buffer
) {
19353 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
19356 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
19359 if (flags
& NDR_OUT
) {
19360 ndr_print_struct(ndr
, "out", "spoolss_GetJob");
19362 ndr_print_ptr(ndr
, "info", r
->out
.info
);
19365 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
19366 ndr_print_spoolss_JobInfo(ndr
, "info", r
->out
.info
);
19369 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
19371 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
19373 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19379 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumJobs(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumJobs
*r
)
19381 if (flags
& NDR_IN
) {
19382 if (r
->in
.handle
== NULL
) {
19383 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19385 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19386 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.firstjob
));
19387 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.numjobs
));
19388 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
19389 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
19390 if (r
->in
.buffer
) {
19391 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
19393 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
19395 if (flags
& NDR_OUT
) {
19396 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
19398 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
19400 if (r
->out
.needed
== NULL
) {
19401 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
19404 if (r
->out
.count
== NULL
) {
19405 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19407 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
19408 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19410 return NDR_ERR_SUCCESS
;
19413 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumJobs(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumJobs
*r
)
19415 uint32_t _ptr_buffer
;
19416 uint32_t _ptr_info
;
19417 TALLOC_CTX
*_mem_save_handle_0
;
19418 TALLOC_CTX
*_mem_save_buffer_0
;
19419 TALLOC_CTX
*_mem_save_info_0
;
19420 TALLOC_CTX
*_mem_save_needed_0
;
19421 TALLOC_CTX
*_mem_save_count_0
;
19422 if (flags
& NDR_IN
) {
19423 ZERO_STRUCT(r
->out
);
19425 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19426 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
19428 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19429 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
19430 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19431 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
19432 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.firstjob
));
19433 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.numjobs
));
19434 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
19435 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
19437 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
19439 r
->in
.buffer
= NULL
;
19441 if (r
->in
.buffer
) {
19442 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19443 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
19444 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
19445 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
19447 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
19448 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
19449 ZERO_STRUCTP(r
->out
.needed
);
19450 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
19451 ZERO_STRUCTP(r
->out
.count
);
19453 if (flags
& NDR_OUT
) {
19454 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
19456 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
19458 r
->out
.info
= NULL
;
19461 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19462 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
19463 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
19464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
19466 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19467 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
19469 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19470 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
19471 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
19472 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
19473 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19474 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
19476 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19477 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
19478 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
19479 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
19480 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19482 return NDR_ERR_SUCCESS
;
19485 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumJobs(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumJobs
*r
)
19487 uint32_t cntr_info_0
;
19488 if (flags
& NDR_IN
) {
19489 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
19490 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
19492 if (flags
& NDR_OUT
) {
19493 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
19494 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
19495 NDR_CHECK(ndr_push_spoolss_JobInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
19497 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
19498 NDR_CHECK(ndr_push_spoolss_JobInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
19501 return NDR_ERR_SUCCESS
;
19504 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumJobs(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumJobs
*r
)
19506 uint32_t cntr_info_0
;
19507 TALLOC_CTX
*_mem_save_info_0
;
19508 if (flags
& NDR_IN
) {
19509 ZERO_STRUCT(r
->out
);
19511 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
19512 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
19514 if (flags
& NDR_OUT
) {
19515 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
19516 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19517 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
19518 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
19519 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
19520 NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
19522 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
19523 NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
19525 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
19527 return NDR_ERR_SUCCESS
;
19530 _PUBLIC_
void ndr_print_spoolss_EnumJobs(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumJobs
*r
)
19532 uint32_t cntr_info_2
;
19533 ndr_print_struct(ndr
, name
, "spoolss_EnumJobs");
19535 if (flags
& NDR_SET_VALUES
) {
19536 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
19538 if (flags
& NDR_IN
) {
19539 ndr_print_struct(ndr
, "in", "spoolss_EnumJobs");
19541 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
19543 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
19545 ndr_print_uint32(ndr
, "firstjob", r
->in
.firstjob
);
19546 ndr_print_uint32(ndr
, "numjobs", r
->in
.numjobs
);
19547 ndr_print_uint32(ndr
, "level", r
->in
.level
);
19548 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
19550 if (r
->in
.buffer
) {
19551 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
19554 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
19557 if (flags
& NDR_OUT
) {
19558 ndr_print_struct(ndr
, "out", "spoolss_EnumJobs");
19560 ndr_print_ptr(ndr
, "count", r
->out
.count
);
19562 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
19564 ndr_print_ptr(ndr
, "info", r
->out
.info
);
19566 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
19568 if (*r
->out
.info
) {
19569 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
19571 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
19573 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
19574 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
19575 ndr_print_spoolss_JobInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
19583 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
19585 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
19587 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19593 static enum ndr_err_code
ndr_push_spoolss_AddPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinter
*r
)
19595 if (flags
& NDR_IN
) {
19597 if (flags
& NDR_OUT
) {
19598 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19600 return NDR_ERR_SUCCESS
;
19603 static enum ndr_err_code
ndr_pull_spoolss_AddPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinter
*r
)
19605 if (flags
& NDR_IN
) {
19607 if (flags
& NDR_OUT
) {
19608 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19610 return NDR_ERR_SUCCESS
;
19613 _PUBLIC_
void ndr_print_spoolss_AddPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinter
*r
)
19615 ndr_print_struct(ndr
, name
, "spoolss_AddPrinter");
19617 if (flags
& NDR_SET_VALUES
) {
19618 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
19620 if (flags
& NDR_IN
) {
19621 ndr_print_struct(ndr
, "in", "spoolss_AddPrinter");
19625 if (flags
& NDR_OUT
) {
19626 ndr_print_struct(ndr
, "out", "spoolss_AddPrinter");
19628 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19634 static enum ndr_err_code
ndr_push_spoolss_DeletePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinter
*r
)
19636 if (flags
& NDR_IN
) {
19637 if (r
->in
.handle
== NULL
) {
19638 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19640 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19642 if (flags
& NDR_OUT
) {
19643 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19645 return NDR_ERR_SUCCESS
;
19648 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinter
*r
)
19650 TALLOC_CTX
*_mem_save_handle_0
;
19651 if (flags
& NDR_IN
) {
19652 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19653 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
19655 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19656 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
19657 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19658 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
19660 if (flags
& NDR_OUT
) {
19661 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19663 return NDR_ERR_SUCCESS
;
19666 _PUBLIC_
void ndr_print_spoolss_DeletePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinter
*r
)
19668 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinter");
19670 if (flags
& NDR_SET_VALUES
) {
19671 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
19673 if (flags
& NDR_IN
) {
19674 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinter");
19676 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
19678 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
19682 if (flags
& NDR_OUT
) {
19683 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinter");
19685 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19691 static enum ndr_err_code
ndr_push_spoolss_SetPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetPrinter
*r
)
19693 if (flags
& NDR_IN
) {
19694 if (r
->in
.handle
== NULL
) {
19695 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19697 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19698 if (r
->in
.info_ctr
== NULL
) {
19699 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19701 NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
19702 if (r
->in
.devmode_ctr
== NULL
) {
19703 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19705 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
19706 if (r
->in
.secdesc_ctr
== NULL
) {
19707 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19709 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
19710 NDR_CHECK(ndr_push_spoolss_PrinterControl(ndr
, NDR_SCALARS
, r
->in
.command
));
19712 if (flags
& NDR_OUT
) {
19713 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19715 return NDR_ERR_SUCCESS
;
19718 static enum ndr_err_code
ndr_pull_spoolss_SetPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetPrinter
*r
)
19720 TALLOC_CTX
*_mem_save_handle_0
;
19721 TALLOC_CTX
*_mem_save_info_ctr_0
;
19722 TALLOC_CTX
*_mem_save_devmode_ctr_0
;
19723 TALLOC_CTX
*_mem_save_secdesc_ctr_0
;
19724 if (flags
& NDR_IN
) {
19725 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19726 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
19728 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19729 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
19730 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19731 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
19732 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19733 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
19735 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19736 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
19737 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
19738 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
19739 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19740 NDR_PULL_ALLOC(ndr
, r
->in
.devmode_ctr
);
19742 _mem_save_devmode_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19743 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.devmode_ctr
, LIBNDR_FLAG_REF_ALLOC
);
19744 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
19745 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
19746 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19747 NDR_PULL_ALLOC(ndr
, r
->in
.secdesc_ctr
);
19749 _mem_save_secdesc_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19750 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.secdesc_ctr
, LIBNDR_FLAG_REF_ALLOC
);
19751 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
19752 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
19753 NDR_CHECK(ndr_pull_spoolss_PrinterControl(ndr
, NDR_SCALARS
, &r
->in
.command
));
19755 if (flags
& NDR_OUT
) {
19756 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19758 return NDR_ERR_SUCCESS
;
19761 _PUBLIC_
void ndr_print_spoolss_SetPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetPrinter
*r
)
19763 ndr_print_struct(ndr
, name
, "spoolss_SetPrinter");
19765 if (flags
& NDR_SET_VALUES
) {
19766 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
19768 if (flags
& NDR_IN
) {
19769 ndr_print_struct(ndr
, "in", "spoolss_SetPrinter");
19771 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
19773 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
19775 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
19777 ndr_print_spoolss_SetPrinterInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
19779 ndr_print_ptr(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
19781 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
19783 ndr_print_ptr(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
19785 ndr_print_sec_desc_buf(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
19787 ndr_print_spoolss_PrinterControl(ndr
, "command", r
->in
.command
);
19790 if (flags
& NDR_OUT
) {
19791 ndr_print_struct(ndr
, "out", "spoolss_SetPrinter");
19793 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19799 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_GetPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinter
*r
)
19801 if (flags
& NDR_IN
) {
19802 if (r
->in
.handle
== NULL
) {
19803 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19805 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19806 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
19807 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
19808 if (r
->in
.buffer
) {
19809 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
19811 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
19813 if (flags
& NDR_OUT
) {
19814 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
19817 struct ndr_push
*_ndr_info
;
19818 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
19819 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
19820 NDR_CHECK(ndr_push_spoolss_PrinterInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
19821 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
19824 if (r
->out
.needed
== NULL
) {
19825 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19827 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
19828 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19830 return NDR_ERR_SUCCESS
;
19833 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_GetPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinter
*r
)
19835 uint32_t _ptr_buffer
;
19836 uint32_t _ptr_info
;
19837 TALLOC_CTX
*_mem_save_handle_0
;
19838 TALLOC_CTX
*_mem_save_buffer_0
;
19839 TALLOC_CTX
*_mem_save_info_0
;
19840 TALLOC_CTX
*_mem_save_needed_0
;
19841 if (flags
& NDR_IN
) {
19842 ZERO_STRUCT(r
->out
);
19844 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19845 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
19847 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19848 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
19849 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
19850 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
19851 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
19852 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
19854 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
19856 r
->in
.buffer
= NULL
;
19858 if (r
->in
.buffer
) {
19859 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19860 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
19861 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
19862 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
19864 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
19865 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
19866 ZERO_STRUCTP(r
->out
.needed
);
19868 if (flags
& NDR_OUT
) {
19869 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
19871 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
19873 r
->out
.info
= NULL
;
19876 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19877 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
19879 struct ndr_pull
*_ndr_info
;
19880 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
19881 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
19882 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
19883 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
19885 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
19887 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19888 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
19890 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19891 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
19892 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
19893 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
19894 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19896 return NDR_ERR_SUCCESS
;
19899 _PUBLIC_
void ndr_print_spoolss_GetPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinter
*r
)
19901 ndr_print_struct(ndr
, name
, "spoolss_GetPrinter");
19903 if (flags
& NDR_SET_VALUES
) {
19904 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
19906 if (flags
& NDR_IN
) {
19907 ndr_print_struct(ndr
, "in", "spoolss_GetPrinter");
19909 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
19911 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
19913 ndr_print_uint32(ndr
, "level", r
->in
.level
);
19914 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
19916 if (r
->in
.buffer
) {
19917 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
19920 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
19923 if (flags
& NDR_OUT
) {
19924 ndr_print_struct(ndr
, "out", "spoolss_GetPrinter");
19926 ndr_print_ptr(ndr
, "info", r
->out
.info
);
19929 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
19930 ndr_print_spoolss_PrinterInfo(ndr
, "info", r
->out
.info
);
19933 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
19935 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
19937 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
19943 static enum ndr_err_code
ndr_push_spoolss_AddPrinterDriver(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinterDriver
*r
)
19945 if (flags
& NDR_IN
) {
19946 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
19947 if (r
->in
.servername
) {
19948 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
19949 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
19950 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
19951 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
19953 if (r
->in
.info_ctr
== NULL
) {
19954 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
19956 NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
19958 if (flags
& NDR_OUT
) {
19959 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
19961 return NDR_ERR_SUCCESS
;
19964 static enum ndr_err_code
ndr_pull_spoolss_AddPrinterDriver(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinterDriver
*r
)
19966 uint32_t _ptr_servername
;
19967 TALLOC_CTX
*_mem_save_servername_0
;
19968 TALLOC_CTX
*_mem_save_info_ctr_0
;
19969 if (flags
& NDR_IN
) {
19970 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
19971 if (_ptr_servername
) {
19972 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
19974 r
->in
.servername
= NULL
;
19976 if (r
->in
.servername
) {
19977 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19978 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
19979 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
19980 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
19981 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
19982 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
));
19984 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
19985 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
19986 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
19988 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
19989 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
19991 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19992 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
19993 NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
19994 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
19996 if (flags
& NDR_OUT
) {
19997 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
19999 return NDR_ERR_SUCCESS
;
20002 _PUBLIC_
void ndr_print_spoolss_AddPrinterDriver(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinterDriver
*r
)
20004 ndr_print_struct(ndr
, name
, "spoolss_AddPrinterDriver");
20006 if (flags
& NDR_SET_VALUES
) {
20007 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
20009 if (flags
& NDR_IN
) {
20010 ndr_print_struct(ndr
, "in", "spoolss_AddPrinterDriver");
20012 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
20014 if (r
->in
.servername
) {
20015 ndr_print_string(ndr
, "servername", r
->in
.servername
);
20018 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
20020 ndr_print_spoolss_AddDriverInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
20024 if (flags
& NDR_OUT
) {
20025 ndr_print_struct(ndr
, "out", "spoolss_AddPrinterDriver");
20027 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
20033 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrinterDrivers(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrinterDrivers
*r
)
20035 if (flags
& NDR_IN
) {
20036 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
20037 if (r
->in
.server
) {
20038 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20039 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20040 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20041 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20043 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.environment
));
20044 if (r
->in
.environment
) {
20045 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
20046 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20047 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
20048 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.environment
, ndr_charset_length(r
->in
.environment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20050 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
20051 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
20052 if (r
->in
.buffer
) {
20053 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
20055 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
20057 if (flags
& NDR_OUT
) {
20058 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
20060 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
20062 if (r
->out
.needed
== NULL
) {
20063 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
20065 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
20066 if (r
->out
.count
== NULL
) {
20067 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
20069 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
20070 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
20072 return NDR_ERR_SUCCESS
;
20075 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrinterDrivers(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrinterDrivers
*r
)
20077 uint32_t _ptr_server
;
20078 uint32_t _ptr_environment
;
20079 uint32_t _ptr_buffer
;
20080 uint32_t _ptr_info
;
20081 TALLOC_CTX
*_mem_save_server_0
;
20082 TALLOC_CTX
*_mem_save_environment_0
;
20083 TALLOC_CTX
*_mem_save_buffer_0
;
20084 TALLOC_CTX
*_mem_save_info_0
;
20085 TALLOC_CTX
*_mem_save_needed_0
;
20086 TALLOC_CTX
*_mem_save_count_0
;
20087 if (flags
& NDR_IN
) {
20088 ZERO_STRUCT(r
->out
);
20090 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
20092 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
20094 r
->in
.server
= NULL
;
20096 if (r
->in
.server
) {
20097 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20098 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
20099 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
20100 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
20101 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
20102 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
));
20104 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
20105 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
20106 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
20108 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
20109 if (_ptr_environment
) {
20110 NDR_PULL_ALLOC(ndr
, r
->in
.environment
);
20112 r
->in
.environment
= NULL
;
20114 if (r
->in
.environment
) {
20115 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20116 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.environment
, 0);
20117 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.environment
));
20118 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.environment
));
20119 if (ndr_get_array_length(ndr
, &r
->in
.environment
) > ndr_get_array_size(ndr
, &r
->in
.environment
)) {
20120 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
));
20122 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t)));
20123 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.environment
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t), CH_UTF16
));
20124 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
20126 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
20127 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
20129 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
20131 r
->in
.buffer
= NULL
;
20133 if (r
->in
.buffer
) {
20134 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20135 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
20136 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
20137 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
20139 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
20140 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
20141 ZERO_STRUCTP(r
->out
.needed
);
20142 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
20143 ZERO_STRUCTP(r
->out
.count
);
20145 if (flags
& NDR_OUT
) {
20146 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
20148 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
20150 r
->out
.info
= NULL
;
20153 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20154 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
20155 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
20156 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
20158 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
20159 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
20161 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20162 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
20163 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
20164 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
20165 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
20166 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
20168 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20169 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
20170 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
20171 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
20172 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
20174 return NDR_ERR_SUCCESS
;
20177 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrinterDrivers(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrinterDrivers
*r
)
20179 uint32_t cntr_info_0
;
20180 if (flags
& NDR_IN
) {
20181 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
20182 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
20184 if (flags
& NDR_OUT
) {
20185 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20186 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
20187 NDR_CHECK(ndr_push_spoolss_DriverInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
20189 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20190 NDR_CHECK(ndr_push_spoolss_DriverInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
20193 return NDR_ERR_SUCCESS
;
20196 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrinterDrivers(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrinterDrivers
*r
)
20198 uint32_t cntr_info_0
;
20199 TALLOC_CTX
*_mem_save_info_0
;
20200 if (flags
& NDR_IN
) {
20201 ZERO_STRUCT(r
->out
);
20203 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
20204 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
20206 if (flags
& NDR_OUT
) {
20207 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
20208 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20209 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
20210 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20211 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
20212 NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
20214 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20215 NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
20217 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
20219 return NDR_ERR_SUCCESS
;
20222 _PUBLIC_
void ndr_print_spoolss_EnumPrinterDrivers(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinterDrivers
*r
)
20224 uint32_t cntr_info_2
;
20225 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinterDrivers");
20227 if (flags
& NDR_SET_VALUES
) {
20228 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
20230 if (flags
& NDR_IN
) {
20231 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinterDrivers");
20233 ndr_print_ptr(ndr
, "server", r
->in
.server
);
20235 if (r
->in
.server
) {
20236 ndr_print_string(ndr
, "server", r
->in
.server
);
20239 ndr_print_ptr(ndr
, "environment", r
->in
.environment
);
20241 if (r
->in
.environment
) {
20242 ndr_print_string(ndr
, "environment", r
->in
.environment
);
20245 ndr_print_uint32(ndr
, "level", r
->in
.level
);
20246 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
20248 if (r
->in
.buffer
) {
20249 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
20252 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
20255 if (flags
& NDR_OUT
) {
20256 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinterDrivers");
20258 ndr_print_ptr(ndr
, "count", r
->out
.count
);
20260 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
20262 ndr_print_ptr(ndr
, "info", r
->out
.info
);
20264 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
20266 if (*r
->out
.info
) {
20267 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
20269 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
20271 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
20272 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
20273 ndr_print_spoolss_DriverInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
20281 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
20283 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
20285 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
20291 static enum ndr_err_code
ndr_push_spoolss_GetPrinterDriver(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDriver
*r
)
20293 if (flags
& NDR_IN
) {
20295 if (flags
& NDR_OUT
) {
20296 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
20298 return NDR_ERR_SUCCESS
;
20301 static enum ndr_err_code
ndr_pull_spoolss_GetPrinterDriver(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDriver
*r
)
20303 if (flags
& NDR_IN
) {
20305 if (flags
& NDR_OUT
) {
20306 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
20308 return NDR_ERR_SUCCESS
;
20311 _PUBLIC_
void ndr_print_spoolss_GetPrinterDriver(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDriver
*r
)
20313 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDriver");
20315 if (flags
& NDR_SET_VALUES
) {
20316 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
20318 if (flags
& NDR_IN
) {
20319 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDriver");
20323 if (flags
& NDR_OUT
) {
20324 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDriver");
20326 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
20332 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_GetPrinterDriverDirectory(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDriverDirectory
*r
)
20334 if (flags
& NDR_IN
) {
20335 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
20336 if (r
->in
.server
) {
20337 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20338 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20339 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20340 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20342 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.environment
));
20343 if (r
->in
.environment
) {
20344 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
20345 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20346 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
20347 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.environment
, ndr_charset_length(r
->in
.environment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20349 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
20350 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
20351 if (r
->in
.buffer
) {
20352 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
20354 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
20356 if (flags
& NDR_OUT
) {
20357 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
20360 struct ndr_push
*_ndr_info
;
20361 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
20362 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
20363 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo(_ndr_info
, NDR_SCALARS
, r
->out
.info
));
20364 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
20367 if (r
->out
.needed
== NULL
) {
20368 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
20370 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
20371 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
20373 return NDR_ERR_SUCCESS
;
20376 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_GetPrinterDriverDirectory(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDriverDirectory
*r
)
20378 uint32_t _ptr_server
;
20379 uint32_t _ptr_environment
;
20380 uint32_t _ptr_buffer
;
20381 uint32_t _ptr_info
;
20382 TALLOC_CTX
*_mem_save_server_0
;
20383 TALLOC_CTX
*_mem_save_environment_0
;
20384 TALLOC_CTX
*_mem_save_buffer_0
;
20385 TALLOC_CTX
*_mem_save_info_0
;
20386 TALLOC_CTX
*_mem_save_needed_0
;
20387 if (flags
& NDR_IN
) {
20388 ZERO_STRUCT(r
->out
);
20390 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
20392 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
20394 r
->in
.server
= NULL
;
20396 if (r
->in
.server
) {
20397 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20398 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
20399 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
20400 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
20401 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
20402 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
));
20404 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
20405 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
20406 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
20408 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
20409 if (_ptr_environment
) {
20410 NDR_PULL_ALLOC(ndr
, r
->in
.environment
);
20412 r
->in
.environment
= NULL
;
20414 if (r
->in
.environment
) {
20415 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20416 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.environment
, 0);
20417 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.environment
));
20418 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.environment
));
20419 if (ndr_get_array_length(ndr
, &r
->in
.environment
) > ndr_get_array_size(ndr
, &r
->in
.environment
)) {
20420 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
));
20422 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t)));
20423 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.environment
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t), CH_UTF16
));
20424 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
20426 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
20427 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
20429 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
20431 r
->in
.buffer
= NULL
;
20433 if (r
->in
.buffer
) {
20434 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20435 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
20436 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
20437 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
20439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
20440 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
20441 ZERO_STRUCTP(r
->out
.needed
);
20443 if (flags
& NDR_OUT
) {
20444 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
20446 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
20448 r
->out
.info
= NULL
;
20451 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20452 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
20454 struct ndr_pull
*_ndr_info
;
20455 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
20456 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
20457 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo(_ndr_info
, NDR_SCALARS
, r
->out
.info
));
20458 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
20460 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
20462 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
20463 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
20465 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20466 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
20467 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
20468 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
20469 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
20471 return NDR_ERR_SUCCESS
;
20474 _PUBLIC_
void ndr_print_spoolss_GetPrinterDriverDirectory(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDriverDirectory
*r
)
20476 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDriverDirectory");
20478 if (flags
& NDR_SET_VALUES
) {
20479 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
20481 if (flags
& NDR_IN
) {
20482 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDriverDirectory");
20484 ndr_print_ptr(ndr
, "server", r
->in
.server
);
20486 if (r
->in
.server
) {
20487 ndr_print_string(ndr
, "server", r
->in
.server
);
20490 ndr_print_ptr(ndr
, "environment", r
->in
.environment
);
20492 if (r
->in
.environment
) {
20493 ndr_print_string(ndr
, "environment", r
->in
.environment
);
20496 ndr_print_uint32(ndr
, "level", r
->in
.level
);
20497 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
20499 if (r
->in
.buffer
) {
20500 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
20503 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
20506 if (flags
& NDR_OUT
) {
20507 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDriverDirectory");
20509 ndr_print_ptr(ndr
, "info", r
->out
.info
);
20512 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
20513 ndr_print_spoolss_DriverDirectoryInfo(ndr
, "info", r
->out
.info
);
20516 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
20518 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
20520 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
20526 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterDriver(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterDriver
*r
)
20528 if (flags
& NDR_IN
) {
20529 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
20530 if (r
->in
.server
) {
20531 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20532 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20533 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20534 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20536 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
20537 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20538 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
20539 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20540 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.driver
, CH_UTF16
)));
20541 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20542 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.driver
, CH_UTF16
)));
20543 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.driver
, ndr_charset_length(r
->in
.driver
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20545 if (flags
& NDR_OUT
) {
20546 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
20548 return NDR_ERR_SUCCESS
;
20551 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterDriver(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterDriver
*r
)
20553 uint32_t _ptr_server
;
20554 TALLOC_CTX
*_mem_save_server_0
;
20555 if (flags
& NDR_IN
) {
20556 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
20558 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
20560 r
->in
.server
= NULL
;
20562 if (r
->in
.server
) {
20563 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20564 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
20565 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
20566 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
20567 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
20568 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
));
20570 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
20571 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
20572 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
20574 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
20575 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
20576 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
20577 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
));
20579 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
20580 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
20581 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.driver
));
20582 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.driver
));
20583 if (ndr_get_array_length(ndr
, &r
->in
.driver
) > ndr_get_array_size(ndr
, &r
->in
.driver
)) {
20584 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
));
20586 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.driver
), sizeof(uint16_t)));
20587 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.driver
, ndr_get_array_length(ndr
, &r
->in
.driver
), sizeof(uint16_t), CH_UTF16
));
20589 if (flags
& NDR_OUT
) {
20590 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
20592 return NDR_ERR_SUCCESS
;
20595 _PUBLIC_
void ndr_print_spoolss_DeletePrinterDriver(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterDriver
*r
)
20597 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterDriver");
20599 if (flags
& NDR_SET_VALUES
) {
20600 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
20602 if (flags
& NDR_IN
) {
20603 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterDriver");
20605 ndr_print_ptr(ndr
, "server", r
->in
.server
);
20607 if (r
->in
.server
) {
20608 ndr_print_string(ndr
, "server", r
->in
.server
);
20611 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
20612 ndr_print_string(ndr
, "driver", r
->in
.driver
);
20615 if (flags
& NDR_OUT
) {
20616 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterDriver");
20618 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
20624 static enum ndr_err_code
ndr_push_spoolss_AddPrintProcessor(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrintProcessor
*r
)
20626 if (flags
& NDR_IN
) {
20627 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
20628 if (r
->in
.server
) {
20629 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20630 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20631 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20632 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20634 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
20635 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20636 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
20637 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20638 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.path_name
, CH_UTF16
)));
20639 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20640 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.path_name
, CH_UTF16
)));
20641 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
));
20642 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.print_processor_name
, CH_UTF16
)));
20643 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20644 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.print_processor_name
, CH_UTF16
)));
20645 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
));
20647 if (flags
& NDR_OUT
) {
20648 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
20650 return NDR_ERR_SUCCESS
;
20653 static enum ndr_err_code
ndr_pull_spoolss_AddPrintProcessor(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrintProcessor
*r
)
20655 uint32_t _ptr_server
;
20656 TALLOC_CTX
*_mem_save_server_0
;
20657 if (flags
& NDR_IN
) {
20658 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
20660 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
20662 r
->in
.server
= NULL
;
20664 if (r
->in
.server
) {
20665 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20666 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
20667 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
20668 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
20669 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
20670 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
));
20672 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
20673 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
20674 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
20676 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
20677 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
20678 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
20679 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
));
20681 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
20682 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
20683 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.path_name
));
20684 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.path_name
));
20685 if (ndr_get_array_length(ndr
, &r
->in
.path_name
) > ndr_get_array_size(ndr
, &r
->in
.path_name
)) {
20686 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
));
20688 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.path_name
), sizeof(uint16_t)));
20689 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
));
20690 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.print_processor_name
));
20691 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.print_processor_name
));
20692 if (ndr_get_array_length(ndr
, &r
->in
.print_processor_name
) > ndr_get_array_size(ndr
, &r
->in
.print_processor_name
)) {
20693 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
));
20695 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.print_processor_name
), sizeof(uint16_t)));
20696 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
));
20698 if (flags
& NDR_OUT
) {
20699 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
20701 return NDR_ERR_SUCCESS
;
20704 _PUBLIC_
void ndr_print_spoolss_AddPrintProcessor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrintProcessor
*r
)
20706 ndr_print_struct(ndr
, name
, "spoolss_AddPrintProcessor");
20708 if (flags
& NDR_SET_VALUES
) {
20709 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
20711 if (flags
& NDR_IN
) {
20712 ndr_print_struct(ndr
, "in", "spoolss_AddPrintProcessor");
20714 ndr_print_ptr(ndr
, "server", r
->in
.server
);
20716 if (r
->in
.server
) {
20717 ndr_print_string(ndr
, "server", r
->in
.server
);
20720 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
20721 ndr_print_string(ndr
, "path_name", r
->in
.path_name
);
20722 ndr_print_string(ndr
, "print_processor_name", r
->in
.print_processor_name
);
20725 if (flags
& NDR_OUT
) {
20726 ndr_print_struct(ndr
, "out", "spoolss_AddPrintProcessor");
20728 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
20734 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrintProcessors(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrintProcessors
*r
)
20736 if (flags
& NDR_IN
) {
20737 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
20738 if (r
->in
.servername
) {
20739 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
20740 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20741 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
20742 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20744 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.environment
));
20745 if (r
->in
.environment
) {
20746 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
20747 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20748 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
20749 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.environment
, ndr_charset_length(r
->in
.environment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20751 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
20752 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
20753 if (r
->in
.buffer
) {
20754 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
20756 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
20758 if (flags
& NDR_OUT
) {
20759 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
20761 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
20763 if (r
->out
.needed
== NULL
) {
20764 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
20766 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
20767 if (r
->out
.count
== NULL
) {
20768 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
20770 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
20771 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
20773 return NDR_ERR_SUCCESS
;
20776 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrintProcessors(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrintProcessors
*r
)
20778 uint32_t _ptr_servername
;
20779 uint32_t _ptr_environment
;
20780 uint32_t _ptr_buffer
;
20781 uint32_t _ptr_info
;
20782 TALLOC_CTX
*_mem_save_servername_0
;
20783 TALLOC_CTX
*_mem_save_environment_0
;
20784 TALLOC_CTX
*_mem_save_buffer_0
;
20785 TALLOC_CTX
*_mem_save_info_0
;
20786 TALLOC_CTX
*_mem_save_needed_0
;
20787 TALLOC_CTX
*_mem_save_count_0
;
20788 if (flags
& NDR_IN
) {
20789 ZERO_STRUCT(r
->out
);
20791 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
20792 if (_ptr_servername
) {
20793 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
20795 r
->in
.servername
= NULL
;
20797 if (r
->in
.servername
) {
20798 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20799 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
20800 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
20801 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
20802 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
20803 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
));
20805 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
20806 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
20807 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
20809 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
20810 if (_ptr_environment
) {
20811 NDR_PULL_ALLOC(ndr
, r
->in
.environment
);
20813 r
->in
.environment
= NULL
;
20815 if (r
->in
.environment
) {
20816 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20817 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.environment
, 0);
20818 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.environment
));
20819 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.environment
));
20820 if (ndr_get_array_length(ndr
, &r
->in
.environment
) > ndr_get_array_size(ndr
, &r
->in
.environment
)) {
20821 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
));
20823 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t)));
20824 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.environment
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t), CH_UTF16
));
20825 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
20827 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
20828 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
20830 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
20832 r
->in
.buffer
= NULL
;
20834 if (r
->in
.buffer
) {
20835 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20836 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
20837 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
20838 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
20840 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
20841 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
20842 ZERO_STRUCTP(r
->out
.needed
);
20843 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
20844 ZERO_STRUCTP(r
->out
.count
);
20846 if (flags
& NDR_OUT
) {
20847 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
20849 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
20851 r
->out
.info
= NULL
;
20854 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20855 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
20856 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
20857 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
20859 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
20860 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
20862 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20863 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
20864 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
20865 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
20866 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
20867 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
20869 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20870 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
20871 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
20872 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
20873 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
20875 return NDR_ERR_SUCCESS
;
20878 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrintProcessors(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrintProcessors
*r
)
20880 uint32_t cntr_info_0
;
20881 if (flags
& NDR_IN
) {
20882 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
20883 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
20885 if (flags
& NDR_OUT
) {
20886 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20887 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
20888 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
20890 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20891 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
20894 return NDR_ERR_SUCCESS
;
20897 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrintProcessors(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrintProcessors
*r
)
20899 uint32_t cntr_info_0
;
20900 TALLOC_CTX
*_mem_save_info_0
;
20901 if (flags
& NDR_IN
) {
20902 ZERO_STRUCT(r
->out
);
20904 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
20905 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
20907 if (flags
& NDR_OUT
) {
20908 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
20909 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20910 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
20911 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20912 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
20913 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
20915 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20916 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
20918 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
20920 return NDR_ERR_SUCCESS
;
20923 _PUBLIC_
void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrintProcessors
*r
)
20925 uint32_t cntr_info_2
;
20926 ndr_print_struct(ndr
, name
, "spoolss_EnumPrintProcessors");
20928 if (flags
& NDR_SET_VALUES
) {
20929 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
20931 if (flags
& NDR_IN
) {
20932 ndr_print_struct(ndr
, "in", "spoolss_EnumPrintProcessors");
20934 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
20936 if (r
->in
.servername
) {
20937 ndr_print_string(ndr
, "servername", r
->in
.servername
);
20940 ndr_print_ptr(ndr
, "environment", r
->in
.environment
);
20942 if (r
->in
.environment
) {
20943 ndr_print_string(ndr
, "environment", r
->in
.environment
);
20946 ndr_print_uint32(ndr
, "level", r
->in
.level
);
20947 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
20949 if (r
->in
.buffer
) {
20950 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
20953 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
20956 if (flags
& NDR_OUT
) {
20957 ndr_print_struct(ndr
, "out", "spoolss_EnumPrintProcessors");
20959 ndr_print_ptr(ndr
, "count", r
->out
.count
);
20961 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
20963 ndr_print_ptr(ndr
, "info", r
->out
.info
);
20965 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
20967 if (*r
->out
.info
) {
20968 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
20970 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
20972 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
20973 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
20974 ndr_print_spoolss_PrintProcessorInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
20982 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
20984 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
20986 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
20992 static enum ndr_err_code
ndr_push_spoolss_GetPrintProcessorDirectory(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrintProcessorDirectory
*r
)
20994 if (flags
& NDR_IN
) {
20995 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
20996 if (r
->in
.server
) {
20997 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20998 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
20999 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
21000 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
21002 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.environment
));
21003 if (r
->in
.environment
) {
21004 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
21005 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
21006 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
21007 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.environment
, ndr_charset_length(r
->in
.environment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
21009 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
21010 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
21011 if (r
->in
.buffer
) {
21012 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
21014 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
21016 if (flags
& NDR_OUT
) {
21017 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
21020 struct ndr_push
*_ndr_info
;
21021 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
21022 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
21023 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo(_ndr_info
, NDR_SCALARS
, r
->out
.info
));
21024 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
21027 if (r
->out
.needed
== NULL
) {
21028 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21030 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
21031 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21033 return NDR_ERR_SUCCESS
;
21036 static enum ndr_err_code
ndr_pull_spoolss_GetPrintProcessorDirectory(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrintProcessorDirectory
*r
)
21038 uint32_t _ptr_server
;
21039 uint32_t _ptr_environment
;
21040 uint32_t _ptr_buffer
;
21041 uint32_t _ptr_info
;
21042 TALLOC_CTX
*_mem_save_server_0
;
21043 TALLOC_CTX
*_mem_save_environment_0
;
21044 TALLOC_CTX
*_mem_save_buffer_0
;
21045 TALLOC_CTX
*_mem_save_info_0
;
21046 TALLOC_CTX
*_mem_save_needed_0
;
21047 if (flags
& NDR_IN
) {
21048 ZERO_STRUCT(r
->out
);
21050 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
21052 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
21054 r
->in
.server
= NULL
;
21056 if (r
->in
.server
) {
21057 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21058 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
21059 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
21060 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
21061 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
21062 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
));
21064 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
21065 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
21066 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
21068 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
21069 if (_ptr_environment
) {
21070 NDR_PULL_ALLOC(ndr
, r
->in
.environment
);
21072 r
->in
.environment
= NULL
;
21074 if (r
->in
.environment
) {
21075 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21076 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.environment
, 0);
21077 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.environment
));
21078 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.environment
));
21079 if (ndr_get_array_length(ndr
, &r
->in
.environment
) > ndr_get_array_size(ndr
, &r
->in
.environment
)) {
21080 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
));
21082 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t)));
21083 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.environment
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t), CH_UTF16
));
21084 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
21086 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
21087 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
21089 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
21091 r
->in
.buffer
= NULL
;
21093 if (r
->in
.buffer
) {
21094 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21095 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
21096 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
21097 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
21099 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
21100 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21101 ZERO_STRUCTP(r
->out
.needed
);
21103 if (flags
& NDR_OUT
) {
21104 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
21106 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
21108 r
->out
.info
= NULL
;
21111 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21112 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
21114 struct ndr_pull
*_ndr_info
;
21115 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
21116 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
21117 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo(_ndr_info
, NDR_SCALARS
, r
->out
.info
));
21118 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
21120 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
21122 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21123 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21125 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21126 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
21127 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
21128 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
21129 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21131 return NDR_ERR_SUCCESS
;
21134 _PUBLIC_
void ndr_print_spoolss_GetPrintProcessorDirectory(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrintProcessorDirectory
*r
)
21136 ndr_print_struct(ndr
, name
, "spoolss_GetPrintProcessorDirectory");
21138 if (flags
& NDR_SET_VALUES
) {
21139 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21141 if (flags
& NDR_IN
) {
21142 ndr_print_struct(ndr
, "in", "spoolss_GetPrintProcessorDirectory");
21144 ndr_print_ptr(ndr
, "server", r
->in
.server
);
21146 if (r
->in
.server
) {
21147 ndr_print_string(ndr
, "server", r
->in
.server
);
21150 ndr_print_ptr(ndr
, "environment", r
->in
.environment
);
21152 if (r
->in
.environment
) {
21153 ndr_print_string(ndr
, "environment", r
->in
.environment
);
21156 ndr_print_uint32(ndr
, "level", r
->in
.level
);
21157 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
21159 if (r
->in
.buffer
) {
21160 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
21163 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
21166 if (flags
& NDR_OUT
) {
21167 ndr_print_struct(ndr
, "out", "spoolss_GetPrintProcessorDirectory");
21169 ndr_print_ptr(ndr
, "info", r
->out
.info
);
21172 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
21173 ndr_print_spoolss_PrintProcessorDirectoryInfo(ndr
, "info", r
->out
.info
);
21176 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
21178 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
21180 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21186 static enum ndr_err_code
ndr_push_spoolss_StartDocPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_StartDocPrinter
*r
)
21188 if (flags
& NDR_IN
) {
21189 if (r
->in
.handle
== NULL
) {
21190 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21192 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21193 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
21194 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
21195 NDR_CHECK(ndr_push_spoolss_DocumentInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
21197 if (flags
& NDR_OUT
) {
21198 if (r
->out
.job_id
== NULL
) {
21199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.job_id
));
21202 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21204 return NDR_ERR_SUCCESS
;
21207 static enum ndr_err_code
ndr_pull_spoolss_StartDocPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_StartDocPrinter
*r
)
21209 TALLOC_CTX
*_mem_save_handle_0
;
21210 TALLOC_CTX
*_mem_save_job_id_0
;
21211 if (flags
& NDR_IN
) {
21212 ZERO_STRUCT(r
->out
);
21214 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21215 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21217 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21218 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21219 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21220 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21221 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
21222 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
21223 NDR_CHECK(ndr_pull_spoolss_DocumentInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
21224 NDR_PULL_ALLOC(ndr
, r
->out
.job_id
);
21225 ZERO_STRUCTP(r
->out
.job_id
);
21227 if (flags
& NDR_OUT
) {
21228 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21229 NDR_PULL_ALLOC(ndr
, r
->out
.job_id
);
21231 _mem_save_job_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21232 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.job_id
, LIBNDR_FLAG_REF_ALLOC
);
21233 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.job_id
));
21234 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_job_id_0
, LIBNDR_FLAG_REF_ALLOC
);
21235 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21237 return NDR_ERR_SUCCESS
;
21240 _PUBLIC_
void ndr_print_spoolss_StartDocPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_StartDocPrinter
*r
)
21242 ndr_print_struct(ndr
, name
, "spoolss_StartDocPrinter");
21244 if (flags
& NDR_SET_VALUES
) {
21245 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21247 if (flags
& NDR_IN
) {
21248 ndr_print_struct(ndr
, "in", "spoolss_StartDocPrinter");
21250 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21252 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21254 ndr_print_uint32(ndr
, "level", r
->in
.level
);
21255 ndr_print_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
);
21256 ndr_print_spoolss_DocumentInfo(ndr
, "info", &r
->in
.info
);
21259 if (flags
& NDR_OUT
) {
21260 ndr_print_struct(ndr
, "out", "spoolss_StartDocPrinter");
21262 ndr_print_ptr(ndr
, "job_id", r
->out
.job_id
);
21264 ndr_print_uint32(ndr
, "job_id", *r
->out
.job_id
);
21266 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21272 static enum ndr_err_code
ndr_push_spoolss_StartPagePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_StartPagePrinter
*r
)
21274 if (flags
& NDR_IN
) {
21275 if (r
->in
.handle
== NULL
) {
21276 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21278 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21280 if (flags
& NDR_OUT
) {
21281 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21283 return NDR_ERR_SUCCESS
;
21286 static enum ndr_err_code
ndr_pull_spoolss_StartPagePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_StartPagePrinter
*r
)
21288 TALLOC_CTX
*_mem_save_handle_0
;
21289 if (flags
& NDR_IN
) {
21290 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21291 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21293 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21294 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21295 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21296 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21298 if (flags
& NDR_OUT
) {
21299 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21301 return NDR_ERR_SUCCESS
;
21304 _PUBLIC_
void ndr_print_spoolss_StartPagePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_StartPagePrinter
*r
)
21306 ndr_print_struct(ndr
, name
, "spoolss_StartPagePrinter");
21308 if (flags
& NDR_SET_VALUES
) {
21309 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21311 if (flags
& NDR_IN
) {
21312 ndr_print_struct(ndr
, "in", "spoolss_StartPagePrinter");
21314 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21316 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21320 if (flags
& NDR_OUT
) {
21321 ndr_print_struct(ndr
, "out", "spoolss_StartPagePrinter");
21323 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21329 static enum ndr_err_code
ndr_push_spoolss_WritePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_WritePrinter
*r
)
21331 if (flags
& NDR_IN
) {
21332 if (r
->in
.handle
== NULL
) {
21333 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21335 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21336 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.data
));
21337 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data
.length
));
21339 if (flags
& NDR_OUT
) {
21340 if (r
->out
.num_written
== NULL
) {
21341 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21343 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_written
));
21344 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21346 return NDR_ERR_SUCCESS
;
21349 static enum ndr_err_code
ndr_pull_spoolss_WritePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_WritePrinter
*r
)
21351 TALLOC_CTX
*_mem_save_handle_0
;
21352 TALLOC_CTX
*_mem_save_num_written_0
;
21353 if (flags
& NDR_IN
) {
21354 ZERO_STRUCT(r
->out
);
21356 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21357 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21359 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21360 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21361 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21362 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21363 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->in
.data
));
21364 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
._data_size
));
21365 NDR_PULL_ALLOC(ndr
, r
->out
.num_written
);
21366 ZERO_STRUCTP(r
->out
.num_written
);
21368 if (flags
& NDR_OUT
) {
21369 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21370 NDR_PULL_ALLOC(ndr
, r
->out
.num_written
);
21372 _mem_save_num_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21373 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_written
, LIBNDR_FLAG_REF_ALLOC
);
21374 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_written
));
21375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_written_0
, LIBNDR_FLAG_REF_ALLOC
);
21376 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21378 return NDR_ERR_SUCCESS
;
21381 _PUBLIC_
void ndr_print_spoolss_WritePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_WritePrinter
*r
)
21383 ndr_print_struct(ndr
, name
, "spoolss_WritePrinter");
21385 if (flags
& NDR_SET_VALUES
) {
21386 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21388 if (flags
& NDR_IN
) {
21389 ndr_print_struct(ndr
, "in", "spoolss_WritePrinter");
21391 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21393 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21395 ndr_print_DATA_BLOB(ndr
, "data", r
->in
.data
);
21396 ndr_print_uint32(ndr
, "_data_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->in
.data
.length
:r
->in
._data_size
);
21399 if (flags
& NDR_OUT
) {
21400 ndr_print_struct(ndr
, "out", "spoolss_WritePrinter");
21402 ndr_print_ptr(ndr
, "num_written", r
->out
.num_written
);
21404 ndr_print_uint32(ndr
, "num_written", *r
->out
.num_written
);
21406 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21412 static enum ndr_err_code
ndr_push_spoolss_EndPagePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_EndPagePrinter
*r
)
21414 if (flags
& NDR_IN
) {
21415 if (r
->in
.handle
== NULL
) {
21416 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21418 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21420 if (flags
& NDR_OUT
) {
21421 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21423 return NDR_ERR_SUCCESS
;
21426 static enum ndr_err_code
ndr_pull_spoolss_EndPagePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_EndPagePrinter
*r
)
21428 TALLOC_CTX
*_mem_save_handle_0
;
21429 if (flags
& NDR_IN
) {
21430 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21431 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21433 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21434 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21435 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21436 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21438 if (flags
& NDR_OUT
) {
21439 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21441 return NDR_ERR_SUCCESS
;
21444 _PUBLIC_
void ndr_print_spoolss_EndPagePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EndPagePrinter
*r
)
21446 ndr_print_struct(ndr
, name
, "spoolss_EndPagePrinter");
21448 if (flags
& NDR_SET_VALUES
) {
21449 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21451 if (flags
& NDR_IN
) {
21452 ndr_print_struct(ndr
, "in", "spoolss_EndPagePrinter");
21454 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21456 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21460 if (flags
& NDR_OUT
) {
21461 ndr_print_struct(ndr
, "out", "spoolss_EndPagePrinter");
21463 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21469 static enum ndr_err_code
ndr_push_spoolss_AbortPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_AbortPrinter
*r
)
21471 if (flags
& NDR_IN
) {
21472 if (r
->in
.handle
== NULL
) {
21473 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21475 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21477 if (flags
& NDR_OUT
) {
21478 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21480 return NDR_ERR_SUCCESS
;
21483 static enum ndr_err_code
ndr_pull_spoolss_AbortPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_AbortPrinter
*r
)
21485 TALLOC_CTX
*_mem_save_handle_0
;
21486 if (flags
& NDR_IN
) {
21487 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21488 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21490 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21491 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21492 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21493 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21495 if (flags
& NDR_OUT
) {
21496 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21498 return NDR_ERR_SUCCESS
;
21501 _PUBLIC_
void ndr_print_spoolss_AbortPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AbortPrinter
*r
)
21503 ndr_print_struct(ndr
, name
, "spoolss_AbortPrinter");
21505 if (flags
& NDR_SET_VALUES
) {
21506 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21508 if (flags
& NDR_IN
) {
21509 ndr_print_struct(ndr
, "in", "spoolss_AbortPrinter");
21511 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21513 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21517 if (flags
& NDR_OUT
) {
21518 ndr_print_struct(ndr
, "out", "spoolss_AbortPrinter");
21520 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21526 static enum ndr_err_code
ndr_push_spoolss_ReadPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ReadPrinter
*r
)
21528 if (flags
& NDR_IN
) {
21529 if (r
->in
.handle
== NULL
) {
21530 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21532 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21533 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
21535 if (flags
& NDR_OUT
) {
21536 if (r
->out
.data
== NULL
) {
21537 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
21540 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.data_size
));
21541 if (r
->out
._data_size
== NULL
) {
21542 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21544 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
._data_size
));
21545 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21547 return NDR_ERR_SUCCESS
;
21550 static enum ndr_err_code
ndr_pull_spoolss_ReadPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ReadPrinter
*r
)
21552 TALLOC_CTX
*_mem_save_handle_0
;
21553 TALLOC_CTX
*_mem_save__data_size_0
;
21554 if (flags
& NDR_IN
) {
21555 ZERO_STRUCT(r
->out
);
21557 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21558 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21560 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21561 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21562 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21563 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21564 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.data_size
));
21565 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.data_size
);
21566 memset(r
->out
.data
, 0, (r
->in
.data_size
) * sizeof(*r
->out
.data
));
21567 NDR_PULL_ALLOC(ndr
, r
->out
._data_size
);
21568 ZERO_STRUCTP(r
->out
._data_size
);
21570 if (flags
& NDR_OUT
) {
21571 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
21572 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21573 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
21575 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
)));
21576 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21577 NDR_PULL_ALLOC(ndr
, r
->out
._data_size
);
21579 _mem_save__data_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21580 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
._data_size
, LIBNDR_FLAG_REF_ALLOC
);
21581 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
._data_size
));
21582 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save__data_size_0
, LIBNDR_FLAG_REF_ALLOC
);
21583 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21585 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.data_size
));
21588 return NDR_ERR_SUCCESS
;
21591 _PUBLIC_
void ndr_print_spoolss_ReadPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ReadPrinter
*r
)
21593 ndr_print_struct(ndr
, name
, "spoolss_ReadPrinter");
21595 if (flags
& NDR_SET_VALUES
) {
21596 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21598 if (flags
& NDR_IN
) {
21599 ndr_print_struct(ndr
, "in", "spoolss_ReadPrinter");
21601 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21603 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21605 ndr_print_uint32(ndr
, "data_size", r
->in
.data_size
);
21608 if (flags
& NDR_OUT
) {
21609 ndr_print_struct(ndr
, "out", "spoolss_ReadPrinter");
21611 ndr_print_ptr(ndr
, "data", r
->out
.data
);
21613 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.data_size
);
21615 ndr_print_ptr(ndr
, "_data_size", r
->out
._data_size
);
21617 ndr_print_uint32(ndr
, "_data_size", *r
->out
._data_size
);
21619 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21625 static enum ndr_err_code
ndr_push_spoolss_EndDocPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_EndDocPrinter
*r
)
21627 if (flags
& NDR_IN
) {
21628 if (r
->in
.handle
== NULL
) {
21629 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21631 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21633 if (flags
& NDR_OUT
) {
21634 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21636 return NDR_ERR_SUCCESS
;
21639 static enum ndr_err_code
ndr_pull_spoolss_EndDocPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_EndDocPrinter
*r
)
21641 TALLOC_CTX
*_mem_save_handle_0
;
21642 if (flags
& NDR_IN
) {
21643 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21644 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21646 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21647 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21648 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21649 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21651 if (flags
& NDR_OUT
) {
21652 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21654 return NDR_ERR_SUCCESS
;
21657 _PUBLIC_
void ndr_print_spoolss_EndDocPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EndDocPrinter
*r
)
21659 ndr_print_struct(ndr
, name
, "spoolss_EndDocPrinter");
21661 if (flags
& NDR_SET_VALUES
) {
21662 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21664 if (flags
& NDR_IN
) {
21665 ndr_print_struct(ndr
, "in", "spoolss_EndDocPrinter");
21667 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21669 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21673 if (flags
& NDR_OUT
) {
21674 ndr_print_struct(ndr
, "out", "spoolss_EndDocPrinter");
21676 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21682 static enum ndr_err_code
ndr_push_spoolss_AddJob(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddJob
*r
)
21684 if (flags
& NDR_IN
) {
21685 if (r
->in
.handle
== NULL
) {
21686 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21688 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21689 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
21690 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
21691 if (r
->in
.buffer
) {
21692 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
21693 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, r
->in
.offered
));
21695 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
21697 if (flags
& NDR_OUT
) {
21698 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.buffer
));
21699 if (r
->out
.buffer
) {
21700 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
21701 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.offered
));
21703 if (r
->out
.needed
== NULL
) {
21704 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21706 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
21707 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21709 return NDR_ERR_SUCCESS
;
21712 static enum ndr_err_code
ndr_pull_spoolss_AddJob(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddJob
*r
)
21714 uint32_t _ptr_buffer
;
21715 TALLOC_CTX
*_mem_save_handle_0
;
21716 TALLOC_CTX
*_mem_save_buffer_0
;
21717 TALLOC_CTX
*_mem_save_needed_0
;
21718 if (flags
& NDR_IN
) {
21719 ZERO_STRUCT(r
->out
);
21721 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21722 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21724 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21725 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21726 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21727 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21728 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
21729 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
21731 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
21733 r
->in
.buffer
= NULL
;
21735 if (r
->in
.buffer
) {
21736 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21737 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
21738 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
21739 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
21740 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
)));
21741 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
21743 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
21744 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21745 ZERO_STRUCTP(r
->out
.needed
);
21746 if (r
->in
.buffer
) {
21747 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, r
->in
.offered
));
21750 if (flags
& NDR_OUT
) {
21751 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
21753 NDR_PULL_ALLOC(ndr
, r
->out
.buffer
);
21755 r
->out
.buffer
= NULL
;
21757 if (r
->out
.buffer
) {
21758 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21759 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.buffer
, 0);
21760 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
21761 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
));
21762 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
)));
21763 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
21765 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21766 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21768 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21769 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
21770 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
21771 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
21772 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21773 if (r
->out
.buffer
) {
21774 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, r
->in
.offered
));
21777 return NDR_ERR_SUCCESS
;
21780 _PUBLIC_
void ndr_print_spoolss_AddJob(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddJob
*r
)
21782 ndr_print_struct(ndr
, name
, "spoolss_AddJob");
21784 if (flags
& NDR_SET_VALUES
) {
21785 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21787 if (flags
& NDR_IN
) {
21788 ndr_print_struct(ndr
, "in", "spoolss_AddJob");
21790 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21792 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21794 ndr_print_uint32(ndr
, "level", r
->in
.level
);
21795 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
21797 if (r
->in
.buffer
) {
21798 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, r
->in
.offered
);
21801 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
21804 if (flags
& NDR_OUT
) {
21805 ndr_print_struct(ndr
, "out", "spoolss_AddJob");
21807 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
21809 if (r
->out
.buffer
) {
21810 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.offered
);
21813 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
21815 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
21817 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21823 static enum ndr_err_code
ndr_push_spoolss_ScheduleJob(struct ndr_push
*ndr
, int flags
, const struct spoolss_ScheduleJob
*r
)
21825 if (flags
& NDR_IN
) {
21826 if (r
->in
.handle
== NULL
) {
21827 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21829 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21830 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.jobid
));
21832 if (flags
& NDR_OUT
) {
21833 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21835 return NDR_ERR_SUCCESS
;
21838 static enum ndr_err_code
ndr_pull_spoolss_ScheduleJob(struct ndr_pull
*ndr
, int flags
, struct spoolss_ScheduleJob
*r
)
21840 TALLOC_CTX
*_mem_save_handle_0
;
21841 if (flags
& NDR_IN
) {
21842 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21843 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21845 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21846 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21847 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21848 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21849 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.jobid
));
21851 if (flags
& NDR_OUT
) {
21852 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21854 return NDR_ERR_SUCCESS
;
21857 _PUBLIC_
void ndr_print_spoolss_ScheduleJob(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ScheduleJob
*r
)
21859 ndr_print_struct(ndr
, name
, "spoolss_ScheduleJob");
21861 if (flags
& NDR_SET_VALUES
) {
21862 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21864 if (flags
& NDR_IN
) {
21865 ndr_print_struct(ndr
, "in", "spoolss_ScheduleJob");
21867 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21869 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21871 ndr_print_uint32(ndr
, "jobid", r
->in
.jobid
);
21874 if (flags
& NDR_OUT
) {
21875 ndr_print_struct(ndr
, "out", "spoolss_ScheduleJob");
21877 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21883 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_GetPrinterData(struct ndr_push
*ndr
, int flags
, const struct _spoolss_GetPrinterData
*r
)
21885 if (flags
& NDR_IN
) {
21886 if (r
->in
.handle
== NULL
) {
21887 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21889 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21890 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
21891 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
21892 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
21893 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
));
21894 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
21896 if (flags
& NDR_OUT
) {
21897 if (r
->out
.type
== NULL
) {
21898 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21900 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->out
.type
));
21901 if (r
->out
.data
== NULL
) {
21902 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21904 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.data
));
21905 if (r
->out
.needed
== NULL
) {
21906 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21908 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
21909 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21911 return NDR_ERR_SUCCESS
;
21914 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_GetPrinterData(struct ndr_pull
*ndr
, int flags
, struct _spoolss_GetPrinterData
*r
)
21916 TALLOC_CTX
*_mem_save_handle_0
;
21917 TALLOC_CTX
*_mem_save_type_0
;
21918 TALLOC_CTX
*_mem_save_data_0
;
21919 TALLOC_CTX
*_mem_save_needed_0
;
21920 if (flags
& NDR_IN
) {
21921 ZERO_STRUCT(r
->out
);
21923 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21924 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21926 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21927 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21928 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21929 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21930 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
21931 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
21932 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
21933 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
));
21935 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
21936 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
));
21937 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
21938 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
21939 ZERO_STRUCTP(r
->out
.type
);
21940 NDR_PULL_ALLOC(ndr
, r
->out
.data
);
21941 ZERO_STRUCTP(r
->out
.data
);
21942 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21943 ZERO_STRUCTP(r
->out
.needed
);
21945 if (flags
& NDR_OUT
) {
21946 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21947 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
21949 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21950 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.type
, LIBNDR_FLAG_REF_ALLOC
);
21951 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->out
.type
));
21952 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, LIBNDR_FLAG_REF_ALLOC
);
21953 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21954 NDR_PULL_ALLOC(ndr
, r
->out
.data
);
21956 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21957 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.data
, LIBNDR_FLAG_REF_ALLOC
);
21958 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.data
));
21959 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, LIBNDR_FLAG_REF_ALLOC
);
21960 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21961 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21963 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21964 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
21965 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
21966 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
21967 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21969 return NDR_ERR_SUCCESS
;
21972 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_GetPrinterData(struct ndr_push
*ndr
, int flags
, const struct __spoolss_GetPrinterData
*r
)
21974 if (flags
& NDR_IN
) {
21975 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
21977 if (flags
& NDR_OUT
) {
21978 if (r
->out
.data
== NULL
) {
21979 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21981 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.data
, r
->in
.type
));
21982 NDR_CHECK(ndr_push_spoolss_PrinterData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.data
));
21984 return NDR_ERR_SUCCESS
;
21987 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_GetPrinterData(struct ndr_pull
*ndr
, int flags
, struct __spoolss_GetPrinterData
*r
)
21989 TALLOC_CTX
*_mem_save_data_0
;
21990 if (flags
& NDR_IN
) {
21991 ZERO_STRUCT(r
->out
);
21993 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->in
.type
));
21994 NDR_PULL_ALLOC(ndr
, r
->out
.data
);
21995 ZERO_STRUCTP(r
->out
.data
);
21997 if (flags
& NDR_OUT
) {
21998 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21999 NDR_PULL_ALLOC(ndr
, r
->out
.data
);
22001 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22002 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.data
, LIBNDR_FLAG_REF_ALLOC
);
22003 NDR_CHECK(ndr_pull_set_switch_value(ndr
, r
->out
.data
, r
->in
.type
));
22004 NDR_CHECK(ndr_pull_spoolss_PrinterData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.data
));
22005 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, LIBNDR_FLAG_REF_ALLOC
);
22007 return NDR_ERR_SUCCESS
;
22010 _PUBLIC_
void ndr_print_spoolss_GetPrinterData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterData
*r
)
22012 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterData");
22014 if (flags
& NDR_SET_VALUES
) {
22015 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22017 if (flags
& NDR_IN
) {
22018 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterData");
22020 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22022 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22024 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
22025 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
22028 if (flags
& NDR_OUT
) {
22029 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterData");
22031 ndr_print_ptr(ndr
, "type", r
->out
.type
);
22033 ndr_print_winreg_Type(ndr
, "type", *r
->out
.type
);
22035 ndr_print_ptr(ndr
, "data", r
->out
.data
);
22037 ndr_print_set_switch_value(ndr
, r
->out
.data
, *r
->out
.type
);
22038 ndr_print_spoolss_PrinterData(ndr
, "data", r
->out
.data
);
22040 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
22042 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
22044 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22050 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_SetPrinterData(struct ndr_push
*ndr
, int flags
, const struct _spoolss_SetPrinterData
*r
)
22052 if (flags
& NDR_IN
) {
22053 if (r
->in
.handle
== NULL
) {
22054 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22056 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22057 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
22058 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
22059 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
22060 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
));
22061 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
22062 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.data
));
22063 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
._offered
));
22065 if (flags
& NDR_OUT
) {
22066 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22068 return NDR_ERR_SUCCESS
;
22071 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_SetPrinterData(struct ndr_push
*ndr
, int flags
, const struct __spoolss_SetPrinterData
*r
)
22073 if (flags
& NDR_IN
) {
22074 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
22076 if (flags
& NDR_OUT
) {
22077 if (r
->out
.data
== NULL
) {
22078 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22080 NDR_CHECK(ndr_push_set_switch_value(ndr
, r
->out
.data
, r
->in
.type
));
22081 NDR_CHECK(ndr_push_spoolss_PrinterData(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.data
));
22083 return NDR_ERR_SUCCESS
;
22086 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterData(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetPrinterData
*r
)
22088 TALLOC_CTX
*_mem_save_handle_0
;
22089 if (flags
& NDR_IN
) {
22090 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22091 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
22093 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22094 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22095 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22096 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22097 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
22098 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
22099 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
22100 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
));
22102 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
22103 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
));
22104 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->in
.type
));
22106 struct ndr_pull
*_ndr_data
;
22107 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_data
, 4, -1));
22108 NDR_CHECK(ndr_pull_set_switch_value(_ndr_data
, &r
->in
.data
, r
->in
.type
));
22109 NDR_CHECK(ndr_pull_spoolss_PrinterData(_ndr_data
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.data
));
22110 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_data
, 4, -1));
22112 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
._offered
));
22114 if (flags
& NDR_OUT
) {
22115 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22117 return NDR_ERR_SUCCESS
;
22120 _PUBLIC_
void ndr_print_spoolss_SetPrinterData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetPrinterData
*r
)
22122 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterData");
22124 if (flags
& NDR_SET_VALUES
) {
22125 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22127 if (flags
& NDR_IN
) {
22128 ndr_print_struct(ndr
, "in", "spoolss_SetPrinterData");
22130 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22132 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22134 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
22135 ndr_print_winreg_Type(ndr
, "type", r
->in
.type
);
22136 ndr_print_set_switch_value(ndr
, &r
->in
.data
, r
->in
.type
);
22137 ndr_print_spoolss_PrinterData(ndr
, "data", &r
->in
.data
);
22138 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
);
22141 if (flags
& NDR_OUT
) {
22142 ndr_print_struct(ndr
, "out", "spoolss_SetPrinterData");
22144 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22150 static enum ndr_err_code
ndr_push_spoolss_WaitForPrinterChange(struct ndr_push
*ndr
, int flags
, const struct spoolss_WaitForPrinterChange
*r
)
22152 if (flags
& NDR_IN
) {
22154 if (flags
& NDR_OUT
) {
22155 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22157 return NDR_ERR_SUCCESS
;
22160 static enum ndr_err_code
ndr_pull_spoolss_WaitForPrinterChange(struct ndr_pull
*ndr
, int flags
, struct spoolss_WaitForPrinterChange
*r
)
22162 if (flags
& NDR_IN
) {
22164 if (flags
& NDR_OUT
) {
22165 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22167 return NDR_ERR_SUCCESS
;
22170 _PUBLIC_
void ndr_print_spoolss_WaitForPrinterChange(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_WaitForPrinterChange
*r
)
22172 ndr_print_struct(ndr
, name
, "spoolss_WaitForPrinterChange");
22174 if (flags
& NDR_SET_VALUES
) {
22175 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22177 if (flags
& NDR_IN
) {
22178 ndr_print_struct(ndr
, "in", "spoolss_WaitForPrinterChange");
22182 if (flags
& NDR_OUT
) {
22183 ndr_print_struct(ndr
, "out", "spoolss_WaitForPrinterChange");
22185 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22191 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_ClosePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ClosePrinter
*r
)
22193 if (flags
& NDR_IN
) {
22194 if (r
->in
.handle
== NULL
) {
22195 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22197 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22199 if (flags
& NDR_OUT
) {
22200 if (r
->out
.handle
== NULL
) {
22201 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22203 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
22204 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22206 return NDR_ERR_SUCCESS
;
22209 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_ClosePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ClosePrinter
*r
)
22211 TALLOC_CTX
*_mem_save_handle_0
;
22212 if (flags
& NDR_IN
) {
22213 ZERO_STRUCT(r
->out
);
22215 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22216 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
22218 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22219 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22220 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22221 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22222 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
22223 *r
->out
.handle
= *r
->in
.handle
;
22225 if (flags
& NDR_OUT
) {
22226 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22227 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
22229 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22230 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22231 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
22232 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22233 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22235 return NDR_ERR_SUCCESS
;
22238 _PUBLIC_
void ndr_print_spoolss_ClosePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ClosePrinter
*r
)
22240 ndr_print_struct(ndr
, name
, "spoolss_ClosePrinter");
22242 if (flags
& NDR_SET_VALUES
) {
22243 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22245 if (flags
& NDR_IN
) {
22246 ndr_print_struct(ndr
, "in", "spoolss_ClosePrinter");
22248 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22250 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22254 if (flags
& NDR_OUT
) {
22255 ndr_print_struct(ndr
, "out", "spoolss_ClosePrinter");
22257 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
22259 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
22261 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22267 static enum ndr_err_code
ndr_push_spoolss_AddForm(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddForm
*r
)
22269 if (flags
& NDR_IN
) {
22270 if (r
->in
.handle
== NULL
) {
22271 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22273 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22274 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22275 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
22276 NDR_CHECK(ndr_push_spoolss_AddFormInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
22278 if (flags
& NDR_OUT
) {
22279 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22281 return NDR_ERR_SUCCESS
;
22284 static enum ndr_err_code
ndr_pull_spoolss_AddForm(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddForm
*r
)
22286 TALLOC_CTX
*_mem_save_handle_0
;
22287 if (flags
& NDR_IN
) {
22288 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22289 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
22291 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22292 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22293 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22294 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22295 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22296 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
22297 NDR_CHECK(ndr_pull_spoolss_AddFormInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
22299 if (flags
& NDR_OUT
) {
22300 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22302 return NDR_ERR_SUCCESS
;
22305 _PUBLIC_
void ndr_print_spoolss_AddForm(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddForm
*r
)
22307 ndr_print_struct(ndr
, name
, "spoolss_AddForm");
22309 if (flags
& NDR_SET_VALUES
) {
22310 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22312 if (flags
& NDR_IN
) {
22313 ndr_print_struct(ndr
, "in", "spoolss_AddForm");
22315 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22317 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22319 ndr_print_uint32(ndr
, "level", r
->in
.level
);
22320 ndr_print_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
);
22321 ndr_print_spoolss_AddFormInfo(ndr
, "info", &r
->in
.info
);
22324 if (flags
& NDR_OUT
) {
22325 ndr_print_struct(ndr
, "out", "spoolss_AddForm");
22327 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22333 static enum ndr_err_code
ndr_push_spoolss_DeleteForm(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeleteForm
*r
)
22335 if (flags
& NDR_IN
) {
22336 if (r
->in
.handle
== NULL
) {
22337 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22339 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22340 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
22341 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
22342 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
22343 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
));
22345 if (flags
& NDR_OUT
) {
22346 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22348 return NDR_ERR_SUCCESS
;
22351 static enum ndr_err_code
ndr_pull_spoolss_DeleteForm(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeleteForm
*r
)
22353 TALLOC_CTX
*_mem_save_handle_0
;
22354 if (flags
& NDR_IN
) {
22355 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22356 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
22358 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22359 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22360 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22361 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22362 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.form_name
));
22363 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.form_name
));
22364 if (ndr_get_array_length(ndr
, &r
->in
.form_name
) > ndr_get_array_size(ndr
, &r
->in
.form_name
)) {
22365 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
));
22367 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.form_name
), sizeof(uint16_t)));
22368 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
));
22370 if (flags
& NDR_OUT
) {
22371 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22373 return NDR_ERR_SUCCESS
;
22376 _PUBLIC_
void ndr_print_spoolss_DeleteForm(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeleteForm
*r
)
22378 ndr_print_struct(ndr
, name
, "spoolss_DeleteForm");
22380 if (flags
& NDR_SET_VALUES
) {
22381 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22383 if (flags
& NDR_IN
) {
22384 ndr_print_struct(ndr
, "in", "spoolss_DeleteForm");
22386 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22388 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22390 ndr_print_string(ndr
, "form_name", r
->in
.form_name
);
22393 if (flags
& NDR_OUT
) {
22394 ndr_print_struct(ndr
, "out", "spoolss_DeleteForm");
22396 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22402 static enum ndr_err_code
ndr_push_spoolss_GetForm(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetForm
*r
)
22404 if (flags
& NDR_IN
) {
22405 if (r
->in
.handle
== NULL
) {
22406 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22408 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22409 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
22410 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
22411 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
22412 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
));
22413 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22414 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
22415 if (r
->in
.buffer
) {
22416 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
22418 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
22420 if (flags
& NDR_OUT
) {
22421 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
22424 struct ndr_push
*_ndr_info
;
22425 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
22426 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
22427 NDR_CHECK(ndr_push_spoolss_FormInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
22428 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
22431 if (r
->out
.needed
== NULL
) {
22432 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22434 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
22435 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22437 return NDR_ERR_SUCCESS
;
22440 static enum ndr_err_code
ndr_pull_spoolss_GetForm(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetForm
*r
)
22442 uint32_t _ptr_buffer
;
22443 uint32_t _ptr_info
;
22444 TALLOC_CTX
*_mem_save_handle_0
;
22445 TALLOC_CTX
*_mem_save_buffer_0
;
22446 TALLOC_CTX
*_mem_save_info_0
;
22447 TALLOC_CTX
*_mem_save_needed_0
;
22448 if (flags
& NDR_IN
) {
22449 ZERO_STRUCT(r
->out
);
22451 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22452 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
22454 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22455 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22456 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22457 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22458 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.form_name
));
22459 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.form_name
));
22460 if (ndr_get_array_length(ndr
, &r
->in
.form_name
) > ndr_get_array_size(ndr
, &r
->in
.form_name
)) {
22461 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
));
22463 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.form_name
), sizeof(uint16_t)));
22464 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
));
22465 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22466 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
22468 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
22470 r
->in
.buffer
= NULL
;
22472 if (r
->in
.buffer
) {
22473 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22474 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
22475 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
22476 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
22478 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
22479 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22480 ZERO_STRUCTP(r
->out
.needed
);
22482 if (flags
& NDR_OUT
) {
22483 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
22485 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
22487 r
->out
.info
= NULL
;
22490 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22491 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22493 struct ndr_pull
*_ndr_info
;
22494 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
22495 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
22496 NDR_CHECK(ndr_pull_spoolss_FormInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
22497 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
22499 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22501 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22502 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22504 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22505 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
22506 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
22507 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
22508 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22510 return NDR_ERR_SUCCESS
;
22513 _PUBLIC_
void ndr_print_spoolss_GetForm(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetForm
*r
)
22515 ndr_print_struct(ndr
, name
, "spoolss_GetForm");
22517 if (flags
& NDR_SET_VALUES
) {
22518 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22520 if (flags
& NDR_IN
) {
22521 ndr_print_struct(ndr
, "in", "spoolss_GetForm");
22523 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22525 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22527 ndr_print_string(ndr
, "form_name", r
->in
.form_name
);
22528 ndr_print_uint32(ndr
, "level", r
->in
.level
);
22529 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
22531 if (r
->in
.buffer
) {
22532 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
22535 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
22538 if (flags
& NDR_OUT
) {
22539 ndr_print_struct(ndr
, "out", "spoolss_GetForm");
22541 ndr_print_ptr(ndr
, "info", r
->out
.info
);
22544 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
22545 ndr_print_spoolss_FormInfo(ndr
, "info", r
->out
.info
);
22548 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
22550 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
22552 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22558 static enum ndr_err_code
ndr_push_spoolss_SetForm(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetForm
*r
)
22560 if (flags
& NDR_IN
) {
22561 if (r
->in
.handle
== NULL
) {
22562 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22564 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22565 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
22566 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
22567 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
22568 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
));
22569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22570 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
22571 NDR_CHECK(ndr_push_spoolss_AddFormInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
22573 if (flags
& NDR_OUT
) {
22574 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22576 return NDR_ERR_SUCCESS
;
22579 static enum ndr_err_code
ndr_pull_spoolss_SetForm(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetForm
*r
)
22581 TALLOC_CTX
*_mem_save_handle_0
;
22582 if (flags
& NDR_IN
) {
22583 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22584 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
22586 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22587 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22588 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22589 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22590 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.form_name
));
22591 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.form_name
));
22592 if (ndr_get_array_length(ndr
, &r
->in
.form_name
) > ndr_get_array_size(ndr
, &r
->in
.form_name
)) {
22593 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
));
22595 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.form_name
), sizeof(uint16_t)));
22596 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
));
22597 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22598 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
22599 NDR_CHECK(ndr_pull_spoolss_AddFormInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
22601 if (flags
& NDR_OUT
) {
22602 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22604 return NDR_ERR_SUCCESS
;
22607 _PUBLIC_
void ndr_print_spoolss_SetForm(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetForm
*r
)
22609 ndr_print_struct(ndr
, name
, "spoolss_SetForm");
22611 if (flags
& NDR_SET_VALUES
) {
22612 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22614 if (flags
& NDR_IN
) {
22615 ndr_print_struct(ndr
, "in", "spoolss_SetForm");
22617 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22619 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22621 ndr_print_string(ndr
, "form_name", r
->in
.form_name
);
22622 ndr_print_uint32(ndr
, "level", r
->in
.level
);
22623 ndr_print_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
);
22624 ndr_print_spoolss_AddFormInfo(ndr
, "info", &r
->in
.info
);
22627 if (flags
& NDR_OUT
) {
22628 ndr_print_struct(ndr
, "out", "spoolss_SetForm");
22630 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22636 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumForms(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumForms
*r
)
22638 if (flags
& NDR_IN
) {
22639 if (r
->in
.handle
== NULL
) {
22640 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22642 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22643 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22644 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
22645 if (r
->in
.buffer
) {
22646 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
22648 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
22650 if (flags
& NDR_OUT
) {
22651 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
22653 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
22655 if (r
->out
.needed
== NULL
) {
22656 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22658 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
22659 if (r
->out
.count
== 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
.count
));
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_EnumForms(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumForms
*r
)
22670 uint32_t _ptr_buffer
;
22671 uint32_t _ptr_info
;
22672 TALLOC_CTX
*_mem_save_handle_0
;
22673 TALLOC_CTX
*_mem_save_buffer_0
;
22674 TALLOC_CTX
*_mem_save_info_0
;
22675 TALLOC_CTX
*_mem_save_needed_0
;
22676 TALLOC_CTX
*_mem_save_count_0
;
22677 if (flags
& NDR_IN
) {
22678 ZERO_STRUCT(r
->out
);
22680 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22681 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
22683 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22684 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22685 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22686 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22687 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22688 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
22690 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
22692 r
->in
.buffer
= NULL
;
22694 if (r
->in
.buffer
) {
22695 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22696 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
22697 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
22698 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
22700 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
22701 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22702 ZERO_STRUCTP(r
->out
.needed
);
22703 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
22704 ZERO_STRUCTP(r
->out
.count
);
22706 if (flags
& NDR_OUT
) {
22707 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
22709 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
22711 r
->out
.info
= NULL
;
22714 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22715 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22716 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
22717 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22719 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22720 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22722 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22723 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
22724 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
22725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
22726 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22727 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
22729 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22730 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
22731 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
22732 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
22733 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22735 return NDR_ERR_SUCCESS
;
22738 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumForms(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumForms
*r
)
22740 uint32_t cntr_info_0
;
22741 if (flags
& NDR_IN
) {
22742 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22743 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
22745 if (flags
& NDR_OUT
) {
22746 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22747 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
22748 NDR_CHECK(ndr_push_spoolss_FormInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
22750 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22751 NDR_CHECK(ndr_push_spoolss_FormInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
22754 return NDR_ERR_SUCCESS
;
22757 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumForms(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumForms
*r
)
22759 uint32_t cntr_info_0
;
22760 TALLOC_CTX
*_mem_save_info_0
;
22761 if (flags
& NDR_IN
) {
22762 ZERO_STRUCT(r
->out
);
22764 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22765 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
22767 if (flags
& NDR_OUT
) {
22768 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
22769 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22770 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22771 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22772 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
22773 NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
22775 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22776 NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
22778 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22780 return NDR_ERR_SUCCESS
;
22783 _PUBLIC_
void ndr_print_spoolss_EnumForms(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumForms
*r
)
22785 uint32_t cntr_info_2
;
22786 ndr_print_struct(ndr
, name
, "spoolss_EnumForms");
22788 if (flags
& NDR_SET_VALUES
) {
22789 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22791 if (flags
& NDR_IN
) {
22792 ndr_print_struct(ndr
, "in", "spoolss_EnumForms");
22794 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22796 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22798 ndr_print_uint32(ndr
, "level", r
->in
.level
);
22799 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
22801 if (r
->in
.buffer
) {
22802 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
22805 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
22808 if (flags
& NDR_OUT
) {
22809 ndr_print_struct(ndr
, "out", "spoolss_EnumForms");
22811 ndr_print_ptr(ndr
, "count", r
->out
.count
);
22813 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
22815 ndr_print_ptr(ndr
, "info", r
->out
.info
);
22817 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
22819 if (*r
->out
.info
) {
22820 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
22822 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
22824 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
22825 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
22826 ndr_print_spoolss_FormInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
22834 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
22836 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
22838 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22844 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPorts(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPorts
*r
)
22846 if (flags
& NDR_IN
) {
22847 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
22848 if (r
->in
.servername
) {
22849 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
22850 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
22851 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
22852 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22854 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22855 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
22856 if (r
->in
.buffer
) {
22857 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
22859 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
22861 if (flags
& NDR_OUT
) {
22862 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
22864 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
22866 if (r
->out
.needed
== NULL
) {
22867 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22869 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
22870 if (r
->out
.count
== NULL
) {
22871 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22873 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
22874 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22876 return NDR_ERR_SUCCESS
;
22879 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPorts(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPorts
*r
)
22881 uint32_t _ptr_servername
;
22882 uint32_t _ptr_buffer
;
22883 uint32_t _ptr_info
;
22884 TALLOC_CTX
*_mem_save_servername_0
;
22885 TALLOC_CTX
*_mem_save_buffer_0
;
22886 TALLOC_CTX
*_mem_save_info_0
;
22887 TALLOC_CTX
*_mem_save_needed_0
;
22888 TALLOC_CTX
*_mem_save_count_0
;
22889 if (flags
& NDR_IN
) {
22890 ZERO_STRUCT(r
->out
);
22892 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
22893 if (_ptr_servername
) {
22894 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
22896 r
->in
.servername
= NULL
;
22898 if (r
->in
.servername
) {
22899 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22900 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
22901 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
22902 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
22903 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
22904 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
));
22906 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
22907 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
22908 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
22910 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22911 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
22913 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
22915 r
->in
.buffer
= NULL
;
22917 if (r
->in
.buffer
) {
22918 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22919 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
22920 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
22921 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
22923 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
22924 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22925 ZERO_STRUCTP(r
->out
.needed
);
22926 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
22927 ZERO_STRUCTP(r
->out
.count
);
22929 if (flags
& NDR_OUT
) {
22930 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
22932 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
22934 r
->out
.info
= NULL
;
22937 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22938 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22939 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
22940 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22942 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22943 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22945 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22946 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
22947 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
22948 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
22949 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22950 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
22952 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22953 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
22954 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
22955 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
22956 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22958 return NDR_ERR_SUCCESS
;
22961 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPorts(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPorts
*r
)
22963 uint32_t cntr_info_0
;
22964 if (flags
& NDR_IN
) {
22965 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22966 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
22968 if (flags
& NDR_OUT
) {
22969 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22970 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
22971 NDR_CHECK(ndr_push_spoolss_PortInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
22973 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22974 NDR_CHECK(ndr_push_spoolss_PortInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
22977 return NDR_ERR_SUCCESS
;
22980 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPorts(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPorts
*r
)
22982 uint32_t cntr_info_0
;
22983 TALLOC_CTX
*_mem_save_info_0
;
22984 if (flags
& NDR_IN
) {
22985 ZERO_STRUCT(r
->out
);
22987 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22988 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
22990 if (flags
& NDR_OUT
) {
22991 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
22992 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22993 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22994 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22995 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
22996 NDR_CHECK(ndr_pull_spoolss_PortInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
22998 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22999 NDR_CHECK(ndr_pull_spoolss_PortInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
23001 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
23003 return NDR_ERR_SUCCESS
;
23006 _PUBLIC_
void ndr_print_spoolss_EnumPorts(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPorts
*r
)
23008 uint32_t cntr_info_2
;
23009 ndr_print_struct(ndr
, name
, "spoolss_EnumPorts");
23011 if (flags
& NDR_SET_VALUES
) {
23012 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23014 if (flags
& NDR_IN
) {
23015 ndr_print_struct(ndr
, "in", "spoolss_EnumPorts");
23017 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
23019 if (r
->in
.servername
) {
23020 ndr_print_string(ndr
, "servername", r
->in
.servername
);
23023 ndr_print_uint32(ndr
, "level", r
->in
.level
);
23024 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
23026 if (r
->in
.buffer
) {
23027 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
23030 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
23033 if (flags
& NDR_OUT
) {
23034 ndr_print_struct(ndr
, "out", "spoolss_EnumPorts");
23036 ndr_print_ptr(ndr
, "count", r
->out
.count
);
23038 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
23040 ndr_print_ptr(ndr
, "info", r
->out
.info
);
23042 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
23044 if (*r
->out
.info
) {
23045 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
23047 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
23049 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
23050 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
23051 ndr_print_spoolss_PortInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
23059 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
23061 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
23063 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23069 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumMonitors(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumMonitors
*r
)
23071 if (flags
& NDR_IN
) {
23072 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
23073 if (r
->in
.servername
) {
23074 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
23075 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
23076 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
23077 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
23079 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
23080 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
23081 if (r
->in
.buffer
) {
23082 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
23084 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
23086 if (flags
& NDR_OUT
) {
23087 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
23089 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
23091 if (r
->out
.needed
== NULL
) {
23092 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23094 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
23095 if (r
->out
.count
== NULL
) {
23096 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23098 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
23099 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23101 return NDR_ERR_SUCCESS
;
23104 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumMonitors(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumMonitors
*r
)
23106 uint32_t _ptr_servername
;
23107 uint32_t _ptr_buffer
;
23108 uint32_t _ptr_info
;
23109 TALLOC_CTX
*_mem_save_servername_0
;
23110 TALLOC_CTX
*_mem_save_buffer_0
;
23111 TALLOC_CTX
*_mem_save_info_0
;
23112 TALLOC_CTX
*_mem_save_needed_0
;
23113 TALLOC_CTX
*_mem_save_count_0
;
23114 if (flags
& NDR_IN
) {
23115 ZERO_STRUCT(r
->out
);
23117 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
23118 if (_ptr_servername
) {
23119 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
23121 r
->in
.servername
= NULL
;
23123 if (r
->in
.servername
) {
23124 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23125 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
23126 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
23127 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
23128 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
23129 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
));
23131 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
23132 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
23133 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
23135 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
23136 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
23138 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
23140 r
->in
.buffer
= NULL
;
23142 if (r
->in
.buffer
) {
23143 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23144 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
23145 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
23146 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
23148 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
23149 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
23150 ZERO_STRUCTP(r
->out
.needed
);
23151 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
23152 ZERO_STRUCTP(r
->out
.count
);
23154 if (flags
& NDR_OUT
) {
23155 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
23157 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
23159 r
->out
.info
= NULL
;
23162 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23163 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
23164 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
23165 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
23167 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23168 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
23170 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23171 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
23172 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
23173 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
23174 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23175 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
23177 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23178 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
23179 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
23180 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
23181 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23183 return NDR_ERR_SUCCESS
;
23186 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumMonitors(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumMonitors
*r
)
23188 uint32_t cntr_info_0
;
23189 if (flags
& NDR_IN
) {
23190 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
23191 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
23193 if (flags
& NDR_OUT
) {
23194 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
23195 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
23196 NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
23198 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
23199 NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
23202 return NDR_ERR_SUCCESS
;
23205 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumMonitors(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumMonitors
*r
)
23207 uint32_t cntr_info_0
;
23208 TALLOC_CTX
*_mem_save_info_0
;
23209 if (flags
& NDR_IN
) {
23210 ZERO_STRUCT(r
->out
);
23212 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
23213 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
23215 if (flags
& NDR_OUT
) {
23216 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
23217 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23218 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
23219 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
23220 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
23221 NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
23223 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
23224 NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
23226 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
23228 return NDR_ERR_SUCCESS
;
23231 _PUBLIC_
void ndr_print_spoolss_EnumMonitors(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumMonitors
*r
)
23233 uint32_t cntr_info_2
;
23234 ndr_print_struct(ndr
, name
, "spoolss_EnumMonitors");
23236 if (flags
& NDR_SET_VALUES
) {
23237 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23239 if (flags
& NDR_IN
) {
23240 ndr_print_struct(ndr
, "in", "spoolss_EnumMonitors");
23242 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
23244 if (r
->in
.servername
) {
23245 ndr_print_string(ndr
, "servername", r
->in
.servername
);
23248 ndr_print_uint32(ndr
, "level", r
->in
.level
);
23249 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
23251 if (r
->in
.buffer
) {
23252 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
23255 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
23258 if (flags
& NDR_OUT
) {
23259 ndr_print_struct(ndr
, "out", "spoolss_EnumMonitors");
23261 ndr_print_ptr(ndr
, "count", r
->out
.count
);
23263 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
23265 ndr_print_ptr(ndr
, "info", r
->out
.info
);
23267 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
23269 if (*r
->out
.info
) {
23270 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
23272 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
23274 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
23275 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
23276 ndr_print_spoolss_MonitorInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
23284 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
23286 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
23288 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23294 static enum ndr_err_code
ndr_push_spoolss_AddPort(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPort
*r
)
23296 if (flags
& NDR_IN
) {
23297 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
23298 if (r
->in
.server_name
) {
23299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
23300 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
23301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
23302 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
));
23304 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown
));
23305 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.monitor_name
, CH_UTF16
)));
23306 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
23307 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.monitor_name
, CH_UTF16
)));
23308 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
));
23310 if (flags
& NDR_OUT
) {
23311 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23313 return NDR_ERR_SUCCESS
;
23316 static enum ndr_err_code
ndr_pull_spoolss_AddPort(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPort
*r
)
23318 uint32_t _ptr_server_name
;
23319 TALLOC_CTX
*_mem_save_server_name_0
;
23320 if (flags
& NDR_IN
) {
23321 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
23322 if (_ptr_server_name
) {
23323 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
23325 r
->in
.server_name
= NULL
;
23327 if (r
->in
.server_name
) {
23328 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23329 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
23330 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
23331 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
23332 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
23333 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
));
23335 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
23336 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
));
23337 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
23339 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
23340 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.monitor_name
));
23341 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.monitor_name
));
23342 if (ndr_get_array_length(ndr
, &r
->in
.monitor_name
) > ndr_get_array_size(ndr
, &r
->in
.monitor_name
)) {
23343 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
));
23345 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.monitor_name
), sizeof(uint16_t)));
23346 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
));
23348 if (flags
& NDR_OUT
) {
23349 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23351 return NDR_ERR_SUCCESS
;
23354 _PUBLIC_
void ndr_print_spoolss_AddPort(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPort
*r
)
23356 ndr_print_struct(ndr
, name
, "spoolss_AddPort");
23358 if (flags
& NDR_SET_VALUES
) {
23359 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23361 if (flags
& NDR_IN
) {
23362 ndr_print_struct(ndr
, "in", "spoolss_AddPort");
23364 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
23366 if (r
->in
.server_name
) {
23367 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
23370 ndr_print_uint32(ndr
, "unknown", r
->in
.unknown
);
23371 ndr_print_string(ndr
, "monitor_name", r
->in
.monitor_name
);
23374 if (flags
& NDR_OUT
) {
23375 ndr_print_struct(ndr
, "out", "spoolss_AddPort");
23377 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23383 static enum ndr_err_code
ndr_push_spoolss_ConfigurePort(struct ndr_push
*ndr
, int flags
, const struct spoolss_ConfigurePort
*r
)
23385 if (flags
& NDR_IN
) {
23387 if (flags
& NDR_OUT
) {
23388 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23390 return NDR_ERR_SUCCESS
;
23393 static enum ndr_err_code
ndr_pull_spoolss_ConfigurePort(struct ndr_pull
*ndr
, int flags
, struct spoolss_ConfigurePort
*r
)
23395 if (flags
& NDR_IN
) {
23397 if (flags
& NDR_OUT
) {
23398 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23400 return NDR_ERR_SUCCESS
;
23403 _PUBLIC_
void ndr_print_spoolss_ConfigurePort(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ConfigurePort
*r
)
23405 ndr_print_struct(ndr
, name
, "spoolss_ConfigurePort");
23407 if (flags
& NDR_SET_VALUES
) {
23408 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23410 if (flags
& NDR_IN
) {
23411 ndr_print_struct(ndr
, "in", "spoolss_ConfigurePort");
23415 if (flags
& NDR_OUT
) {
23416 ndr_print_struct(ndr
, "out", "spoolss_ConfigurePort");
23418 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23424 static enum ndr_err_code
ndr_push_spoolss_DeletePort(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePort
*r
)
23426 if (flags
& NDR_IN
) {
23428 if (flags
& NDR_OUT
) {
23429 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23431 return NDR_ERR_SUCCESS
;
23434 static enum ndr_err_code
ndr_pull_spoolss_DeletePort(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePort
*r
)
23436 if (flags
& NDR_IN
) {
23438 if (flags
& NDR_OUT
) {
23439 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23441 return NDR_ERR_SUCCESS
;
23444 _PUBLIC_
void ndr_print_spoolss_DeletePort(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePort
*r
)
23446 ndr_print_struct(ndr
, name
, "spoolss_DeletePort");
23448 if (flags
& NDR_SET_VALUES
) {
23449 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23451 if (flags
& NDR_IN
) {
23452 ndr_print_struct(ndr
, "in", "spoolss_DeletePort");
23456 if (flags
& NDR_OUT
) {
23457 ndr_print_struct(ndr
, "out", "spoolss_DeletePort");
23459 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23465 static enum ndr_err_code
ndr_push_spoolss_CreatePrinterIC(struct ndr_push
*ndr
, int flags
, const struct spoolss_CreatePrinterIC
*r
)
23467 if (flags
& NDR_IN
) {
23469 if (flags
& NDR_OUT
) {
23470 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23472 return NDR_ERR_SUCCESS
;
23475 static enum ndr_err_code
ndr_pull_spoolss_CreatePrinterIC(struct ndr_pull
*ndr
, int flags
, struct spoolss_CreatePrinterIC
*r
)
23477 if (flags
& NDR_IN
) {
23479 if (flags
& NDR_OUT
) {
23480 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23482 return NDR_ERR_SUCCESS
;
23485 _PUBLIC_
void ndr_print_spoolss_CreatePrinterIC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_CreatePrinterIC
*r
)
23487 ndr_print_struct(ndr
, name
, "spoolss_CreatePrinterIC");
23489 if (flags
& NDR_SET_VALUES
) {
23490 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23492 if (flags
& NDR_IN
) {
23493 ndr_print_struct(ndr
, "in", "spoolss_CreatePrinterIC");
23497 if (flags
& NDR_OUT
) {
23498 ndr_print_struct(ndr
, "out", "spoolss_CreatePrinterIC");
23500 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23506 static enum ndr_err_code
ndr_push_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_push
*ndr
, int flags
, const struct spoolss_PlayGDIScriptOnPrinterIC
*r
)
23508 if (flags
& NDR_IN
) {
23510 if (flags
& NDR_OUT
) {
23511 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23513 return NDR_ERR_SUCCESS
;
23516 static enum ndr_err_code
ndr_pull_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_pull
*ndr
, int flags
, struct spoolss_PlayGDIScriptOnPrinterIC
*r
)
23518 if (flags
& NDR_IN
) {
23520 if (flags
& NDR_OUT
) {
23521 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23523 return NDR_ERR_SUCCESS
;
23526 _PUBLIC_
void ndr_print_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_PlayGDIScriptOnPrinterIC
*r
)
23528 ndr_print_struct(ndr
, name
, "spoolss_PlayGDIScriptOnPrinterIC");
23530 if (flags
& NDR_SET_VALUES
) {
23531 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23533 if (flags
& NDR_IN
) {
23534 ndr_print_struct(ndr
, "in", "spoolss_PlayGDIScriptOnPrinterIC");
23538 if (flags
& NDR_OUT
) {
23539 ndr_print_struct(ndr
, "out", "spoolss_PlayGDIScriptOnPrinterIC");
23541 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23547 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterIC(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterIC
*r
)
23549 if (flags
& NDR_IN
) {
23551 if (flags
& NDR_OUT
) {
23552 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23554 return NDR_ERR_SUCCESS
;
23557 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterIC(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterIC
*r
)
23559 if (flags
& NDR_IN
) {
23561 if (flags
& NDR_OUT
) {
23562 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23564 return NDR_ERR_SUCCESS
;
23567 _PUBLIC_
void ndr_print_spoolss_DeletePrinterIC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterIC
*r
)
23569 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterIC");
23571 if (flags
& NDR_SET_VALUES
) {
23572 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23574 if (flags
& NDR_IN
) {
23575 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterIC");
23579 if (flags
& NDR_OUT
) {
23580 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterIC");
23582 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23588 static enum ndr_err_code
ndr_push_spoolss_AddPrinterConnection(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinterConnection
*r
)
23590 if (flags
& NDR_IN
) {
23592 if (flags
& NDR_OUT
) {
23593 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23595 return NDR_ERR_SUCCESS
;
23598 static enum ndr_err_code
ndr_pull_spoolss_AddPrinterConnection(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinterConnection
*r
)
23600 if (flags
& NDR_IN
) {
23602 if (flags
& NDR_OUT
) {
23603 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23605 return NDR_ERR_SUCCESS
;
23608 _PUBLIC_
void ndr_print_spoolss_AddPrinterConnection(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinterConnection
*r
)
23610 ndr_print_struct(ndr
, name
, "spoolss_AddPrinterConnection");
23612 if (flags
& NDR_SET_VALUES
) {
23613 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23615 if (flags
& NDR_IN
) {
23616 ndr_print_struct(ndr
, "in", "spoolss_AddPrinterConnection");
23620 if (flags
& NDR_OUT
) {
23621 ndr_print_struct(ndr
, "out", "spoolss_AddPrinterConnection");
23623 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23629 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterConnection(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterConnection
*r
)
23631 if (flags
& NDR_IN
) {
23633 if (flags
& NDR_OUT
) {
23634 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23636 return NDR_ERR_SUCCESS
;
23639 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterConnection(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterConnection
*r
)
23641 if (flags
& NDR_IN
) {
23643 if (flags
& NDR_OUT
) {
23644 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23646 return NDR_ERR_SUCCESS
;
23649 _PUBLIC_
void ndr_print_spoolss_DeletePrinterConnection(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterConnection
*r
)
23651 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterConnection");
23653 if (flags
& NDR_SET_VALUES
) {
23654 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23656 if (flags
& NDR_IN
) {
23657 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterConnection");
23661 if (flags
& NDR_OUT
) {
23662 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterConnection");
23664 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23670 static enum ndr_err_code
ndr_push_spoolss_PrinterMessageBox(struct ndr_push
*ndr
, int flags
, const struct spoolss_PrinterMessageBox
*r
)
23672 if (flags
& NDR_IN
) {
23674 if (flags
& NDR_OUT
) {
23675 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23677 return NDR_ERR_SUCCESS
;
23680 static enum ndr_err_code
ndr_pull_spoolss_PrinterMessageBox(struct ndr_pull
*ndr
, int flags
, struct spoolss_PrinterMessageBox
*r
)
23682 if (flags
& NDR_IN
) {
23684 if (flags
& NDR_OUT
) {
23685 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23687 return NDR_ERR_SUCCESS
;
23690 _PUBLIC_
void ndr_print_spoolss_PrinterMessageBox(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_PrinterMessageBox
*r
)
23692 ndr_print_struct(ndr
, name
, "spoolss_PrinterMessageBox");
23694 if (flags
& NDR_SET_VALUES
) {
23695 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23697 if (flags
& NDR_IN
) {
23698 ndr_print_struct(ndr
, "in", "spoolss_PrinterMessageBox");
23702 if (flags
& NDR_OUT
) {
23703 ndr_print_struct(ndr
, "out", "spoolss_PrinterMessageBox");
23705 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23711 static enum ndr_err_code
ndr_push_spoolss_AddMonitor(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddMonitor
*r
)
23713 if (flags
& NDR_IN
) {
23715 if (flags
& NDR_OUT
) {
23716 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23718 return NDR_ERR_SUCCESS
;
23721 static enum ndr_err_code
ndr_pull_spoolss_AddMonitor(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddMonitor
*r
)
23723 if (flags
& NDR_IN
) {
23725 if (flags
& NDR_OUT
) {
23726 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23728 return NDR_ERR_SUCCESS
;
23731 _PUBLIC_
void ndr_print_spoolss_AddMonitor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddMonitor
*r
)
23733 ndr_print_struct(ndr
, name
, "spoolss_AddMonitor");
23735 if (flags
& NDR_SET_VALUES
) {
23736 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23738 if (flags
& NDR_IN
) {
23739 ndr_print_struct(ndr
, "in", "spoolss_AddMonitor");
23743 if (flags
& NDR_OUT
) {
23744 ndr_print_struct(ndr
, "out", "spoolss_AddMonitor");
23746 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23752 static enum ndr_err_code
ndr_push_spoolss_DeleteMonitor(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeleteMonitor
*r
)
23754 if (flags
& NDR_IN
) {
23756 if (flags
& NDR_OUT
) {
23757 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23759 return NDR_ERR_SUCCESS
;
23762 static enum ndr_err_code
ndr_pull_spoolss_DeleteMonitor(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeleteMonitor
*r
)
23764 if (flags
& NDR_IN
) {
23766 if (flags
& NDR_OUT
) {
23767 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23769 return NDR_ERR_SUCCESS
;
23772 _PUBLIC_
void ndr_print_spoolss_DeleteMonitor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeleteMonitor
*r
)
23774 ndr_print_struct(ndr
, name
, "spoolss_DeleteMonitor");
23776 if (flags
& NDR_SET_VALUES
) {
23777 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23779 if (flags
& NDR_IN
) {
23780 ndr_print_struct(ndr
, "in", "spoolss_DeleteMonitor");
23784 if (flags
& NDR_OUT
) {
23785 ndr_print_struct(ndr
, "out", "spoolss_DeleteMonitor");
23787 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23793 static enum ndr_err_code
ndr_push_spoolss_DeletePrintProcessor(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrintProcessor
*r
)
23795 if (flags
& NDR_IN
) {
23797 if (flags
& NDR_OUT
) {
23798 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23800 return NDR_ERR_SUCCESS
;
23803 static enum ndr_err_code
ndr_pull_spoolss_DeletePrintProcessor(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrintProcessor
*r
)
23805 if (flags
& NDR_IN
) {
23807 if (flags
& NDR_OUT
) {
23808 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23810 return NDR_ERR_SUCCESS
;
23813 _PUBLIC_
void ndr_print_spoolss_DeletePrintProcessor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrintProcessor
*r
)
23815 ndr_print_struct(ndr
, name
, "spoolss_DeletePrintProcessor");
23817 if (flags
& NDR_SET_VALUES
) {
23818 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23820 if (flags
& NDR_IN
) {
23821 ndr_print_struct(ndr
, "in", "spoolss_DeletePrintProcessor");
23825 if (flags
& NDR_OUT
) {
23826 ndr_print_struct(ndr
, "out", "spoolss_DeletePrintProcessor");
23828 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23834 static enum ndr_err_code
ndr_push_spoolss_AddPrintProvidor(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrintProvidor
*r
)
23836 if (flags
& NDR_IN
) {
23838 if (flags
& NDR_OUT
) {
23839 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23841 return NDR_ERR_SUCCESS
;
23844 static enum ndr_err_code
ndr_pull_spoolss_AddPrintProvidor(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrintProvidor
*r
)
23846 if (flags
& NDR_IN
) {
23848 if (flags
& NDR_OUT
) {
23849 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23851 return NDR_ERR_SUCCESS
;
23854 _PUBLIC_
void ndr_print_spoolss_AddPrintProvidor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrintProvidor
*r
)
23856 ndr_print_struct(ndr
, name
, "spoolss_AddPrintProvidor");
23858 if (flags
& NDR_SET_VALUES
) {
23859 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23861 if (flags
& NDR_IN
) {
23862 ndr_print_struct(ndr
, "in", "spoolss_AddPrintProvidor");
23866 if (flags
& NDR_OUT
) {
23867 ndr_print_struct(ndr
, "out", "spoolss_AddPrintProvidor");
23869 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23875 static enum ndr_err_code
ndr_push_spoolss_DeletePrintProvidor(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrintProvidor
*r
)
23877 if (flags
& NDR_IN
) {
23879 if (flags
& NDR_OUT
) {
23880 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23882 return NDR_ERR_SUCCESS
;
23885 static enum ndr_err_code
ndr_pull_spoolss_DeletePrintProvidor(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrintProvidor
*r
)
23887 if (flags
& NDR_IN
) {
23889 if (flags
& NDR_OUT
) {
23890 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23892 return NDR_ERR_SUCCESS
;
23895 _PUBLIC_
void ndr_print_spoolss_DeletePrintProvidor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrintProvidor
*r
)
23897 ndr_print_struct(ndr
, name
, "spoolss_DeletePrintProvidor");
23899 if (flags
& NDR_SET_VALUES
) {
23900 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23902 if (flags
& NDR_IN
) {
23903 ndr_print_struct(ndr
, "in", "spoolss_DeletePrintProvidor");
23907 if (flags
& NDR_OUT
) {
23908 ndr_print_struct(ndr
, "out", "spoolss_DeletePrintProvidor");
23910 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23916 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrintProcDataTypes(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrintProcDataTypes
*r
)
23918 if (flags
& NDR_IN
) {
23919 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
23920 if (r
->in
.servername
) {
23921 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
23922 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
23923 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
23924 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
23926 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.print_processor_name
));
23927 if (r
->in
.print_processor_name
) {
23928 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.print_processor_name
, CH_UTF16
)));
23929 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
23930 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.print_processor_name
, CH_UTF16
)));
23931 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
));
23933 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
23934 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
23935 if (r
->in
.buffer
) {
23936 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
23938 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
23940 if (flags
& NDR_OUT
) {
23941 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
23943 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
23945 if (r
->out
.needed
== NULL
) {
23946 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23948 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
23949 if (r
->out
.count
== NULL
) {
23950 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23952 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
23953 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23955 return NDR_ERR_SUCCESS
;
23958 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrintProcDataTypes(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrintProcDataTypes
*r
)
23960 uint32_t _ptr_servername
;
23961 uint32_t _ptr_print_processor_name
;
23962 uint32_t _ptr_buffer
;
23963 uint32_t _ptr_info
;
23964 TALLOC_CTX
*_mem_save_servername_0
;
23965 TALLOC_CTX
*_mem_save_print_processor_name_0
;
23966 TALLOC_CTX
*_mem_save_buffer_0
;
23967 TALLOC_CTX
*_mem_save_info_0
;
23968 TALLOC_CTX
*_mem_save_needed_0
;
23969 TALLOC_CTX
*_mem_save_count_0
;
23970 if (flags
& NDR_IN
) {
23971 ZERO_STRUCT(r
->out
);
23973 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
23974 if (_ptr_servername
) {
23975 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
23977 r
->in
.servername
= NULL
;
23979 if (r
->in
.servername
) {
23980 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23981 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
23982 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
23983 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
23984 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
23985 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
));
23987 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
23988 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
23989 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
23991 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor_name
));
23992 if (_ptr_print_processor_name
) {
23993 NDR_PULL_ALLOC(ndr
, r
->in
.print_processor_name
);
23995 r
->in
.print_processor_name
= NULL
;
23997 if (r
->in
.print_processor_name
) {
23998 _mem_save_print_processor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23999 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.print_processor_name
, 0);
24000 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.print_processor_name
));
24001 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.print_processor_name
));
24002 if (ndr_get_array_length(ndr
, &r
->in
.print_processor_name
) > ndr_get_array_size(ndr
, &r
->in
.print_processor_name
)) {
24003 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
));
24005 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.print_processor_name
), sizeof(uint16_t)));
24006 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
));
24007 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_name_0
, 0);
24009 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
24010 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
24012 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
24014 r
->in
.buffer
= NULL
;
24016 if (r
->in
.buffer
) {
24017 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24018 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
24019 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
24020 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
24022 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
24023 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24024 ZERO_STRUCTP(r
->out
.needed
);
24025 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
24026 ZERO_STRUCTP(r
->out
.count
);
24028 if (flags
& NDR_OUT
) {
24029 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
24031 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
24033 r
->out
.info
= NULL
;
24036 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24037 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
24038 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
24039 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
24041 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24042 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24044 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24045 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
24046 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
24047 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
24048 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24049 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
24051 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24052 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
24053 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
24054 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
24055 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24057 return NDR_ERR_SUCCESS
;
24060 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrintProcDataTypes(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrintProcDataTypes
*r
)
24062 uint32_t cntr_info_0
;
24063 if (flags
& NDR_IN
) {
24064 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
24065 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
24067 if (flags
& NDR_OUT
) {
24068 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
24069 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
24070 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
24072 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
24073 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
24076 return NDR_ERR_SUCCESS
;
24079 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrintProcDataTypes(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrintProcDataTypes
*r
)
24081 uint32_t cntr_info_0
;
24082 TALLOC_CTX
*_mem_save_info_0
;
24083 if (flags
& NDR_IN
) {
24084 ZERO_STRUCT(r
->out
);
24086 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
24087 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
24089 if (flags
& NDR_OUT
) {
24090 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
24091 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24092 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
24093 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
24094 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
24095 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
24097 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
24098 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
24100 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
24102 return NDR_ERR_SUCCESS
;
24105 _PUBLIC_
void ndr_print_spoolss_EnumPrintProcDataTypes(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrintProcDataTypes
*r
)
24107 uint32_t cntr_info_2
;
24108 ndr_print_struct(ndr
, name
, "spoolss_EnumPrintProcDataTypes");
24110 if (flags
& NDR_SET_VALUES
) {
24111 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24113 if (flags
& NDR_IN
) {
24114 ndr_print_struct(ndr
, "in", "spoolss_EnumPrintProcDataTypes");
24116 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
24118 if (r
->in
.servername
) {
24119 ndr_print_string(ndr
, "servername", r
->in
.servername
);
24122 ndr_print_ptr(ndr
, "print_processor_name", r
->in
.print_processor_name
);
24124 if (r
->in
.print_processor_name
) {
24125 ndr_print_string(ndr
, "print_processor_name", r
->in
.print_processor_name
);
24128 ndr_print_uint32(ndr
, "level", r
->in
.level
);
24129 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
24131 if (r
->in
.buffer
) {
24132 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
24135 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
24138 if (flags
& NDR_OUT
) {
24139 ndr_print_struct(ndr
, "out", "spoolss_EnumPrintProcDataTypes");
24141 ndr_print_ptr(ndr
, "count", r
->out
.count
);
24143 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
24145 ndr_print_ptr(ndr
, "info", r
->out
.info
);
24147 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
24149 if (*r
->out
.info
) {
24150 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
24152 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
24154 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
24155 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
24156 ndr_print_spoolss_PrintProcDataTypesInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
24164 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
24166 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
24168 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24174 static enum ndr_err_code
ndr_push_spoolss_ResetPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ResetPrinter
*r
)
24176 if (flags
& NDR_IN
) {
24177 if (r
->in
.handle
== NULL
) {
24178 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24180 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24181 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data_type
));
24182 if (r
->in
.data_type
) {
24183 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.data_type
, CH_UTF16
)));
24184 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
24185 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.data_type
, CH_UTF16
)));
24186 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
));
24188 if (r
->in
.devmode_ctr
== NULL
) {
24189 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24191 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
24193 if (flags
& NDR_OUT
) {
24194 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24196 return NDR_ERR_SUCCESS
;
24199 static enum ndr_err_code
ndr_pull_spoolss_ResetPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ResetPrinter
*r
)
24201 uint32_t _ptr_data_type
;
24202 TALLOC_CTX
*_mem_save_handle_0
;
24203 TALLOC_CTX
*_mem_save_data_type_0
;
24204 TALLOC_CTX
*_mem_save_devmode_ctr_0
;
24205 if (flags
& NDR_IN
) {
24206 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24207 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24209 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24210 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24211 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24212 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24213 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
24214 if (_ptr_data_type
) {
24215 NDR_PULL_ALLOC(ndr
, r
->in
.data_type
);
24217 r
->in
.data_type
= NULL
;
24219 if (r
->in
.data_type
) {
24220 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24221 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data_type
, 0);
24222 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data_type
));
24223 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.data_type
));
24224 if (ndr_get_array_length(ndr
, &r
->in
.data_type
) > ndr_get_array_size(ndr
, &r
->in
.data_type
)) {
24225 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
));
24227 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.data_type
), sizeof(uint16_t)));
24228 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
));
24229 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
24231 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24232 NDR_PULL_ALLOC(ndr
, r
->in
.devmode_ctr
);
24234 _mem_save_devmode_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24235 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.devmode_ctr
, LIBNDR_FLAG_REF_ALLOC
);
24236 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
24237 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
24239 if (flags
& NDR_OUT
) {
24240 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24242 return NDR_ERR_SUCCESS
;
24245 _PUBLIC_
void ndr_print_spoolss_ResetPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ResetPrinter
*r
)
24247 ndr_print_struct(ndr
, name
, "spoolss_ResetPrinter");
24249 if (flags
& NDR_SET_VALUES
) {
24250 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24252 if (flags
& NDR_IN
) {
24253 ndr_print_struct(ndr
, "in", "spoolss_ResetPrinter");
24255 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24257 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24259 ndr_print_ptr(ndr
, "data_type", r
->in
.data_type
);
24261 if (r
->in
.data_type
) {
24262 ndr_print_string(ndr
, "data_type", r
->in
.data_type
);
24265 ndr_print_ptr(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
24267 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
24271 if (flags
& NDR_OUT
) {
24272 ndr_print_struct(ndr
, "out", "spoolss_ResetPrinter");
24274 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24280 static enum ndr_err_code
ndr_push_spoolss_GetPrinterDriver2(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDriver2
*r
)
24282 if (flags
& NDR_IN
) {
24283 if (r
->in
.handle
== NULL
) {
24284 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24286 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24287 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.architecture
));
24288 if (r
->in
.architecture
) {
24289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
24290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
24291 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
24292 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
24294 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
24295 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
24296 if (r
->in
.buffer
) {
24297 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
24299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
24300 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_major_version
));
24301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_minor_version
));
24303 if (flags
& NDR_OUT
) {
24304 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
24307 struct ndr_push
*_ndr_info
;
24308 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
24309 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
24310 NDR_CHECK(ndr_push_spoolss_DriverInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
24311 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
24314 if (r
->out
.needed
== NULL
) {
24315 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24317 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
24318 if (r
->out
.server_major_version
== NULL
) {
24319 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24321 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.server_major_version
));
24322 if (r
->out
.server_minor_version
== NULL
) {
24323 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24325 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.server_minor_version
));
24326 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24328 return NDR_ERR_SUCCESS
;
24331 static enum ndr_err_code
ndr_pull_spoolss_GetPrinterDriver2(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDriver2
*r
)
24333 uint32_t _ptr_architecture
;
24334 uint32_t _ptr_buffer
;
24335 uint32_t _ptr_info
;
24336 TALLOC_CTX
*_mem_save_handle_0
;
24337 TALLOC_CTX
*_mem_save_architecture_0
;
24338 TALLOC_CTX
*_mem_save_buffer_0
;
24339 TALLOC_CTX
*_mem_save_info_0
;
24340 TALLOC_CTX
*_mem_save_needed_0
;
24341 TALLOC_CTX
*_mem_save_server_major_version_0
;
24342 TALLOC_CTX
*_mem_save_server_minor_version_0
;
24343 if (flags
& NDR_IN
) {
24344 ZERO_STRUCT(r
->out
);
24346 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24347 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24349 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24350 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24351 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24352 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24353 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
24354 if (_ptr_architecture
) {
24355 NDR_PULL_ALLOC(ndr
, r
->in
.architecture
);
24357 r
->in
.architecture
= NULL
;
24359 if (r
->in
.architecture
) {
24360 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24361 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.architecture
, 0);
24362 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
24363 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
24364 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
24365 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
));
24367 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
24368 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
24369 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
24371 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
24372 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
24374 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
24376 r
->in
.buffer
= NULL
;
24378 if (r
->in
.buffer
) {
24379 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24380 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
24381 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
24382 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
24384 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
24385 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_major_version
));
24386 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_minor_version
));
24387 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24388 ZERO_STRUCTP(r
->out
.needed
);
24389 NDR_PULL_ALLOC(ndr
, r
->out
.server_major_version
);
24390 ZERO_STRUCTP(r
->out
.server_major_version
);
24391 NDR_PULL_ALLOC(ndr
, r
->out
.server_minor_version
);
24392 ZERO_STRUCTP(r
->out
.server_minor_version
);
24394 if (flags
& NDR_OUT
) {
24395 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
24397 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
24399 r
->out
.info
= NULL
;
24402 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24403 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
24405 struct ndr_pull
*_ndr_info
;
24406 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
24407 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
24408 NDR_CHECK(ndr_pull_spoolss_DriverInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
24409 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
24411 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
24413 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24414 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24416 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24417 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
24418 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
24419 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
24420 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24421 NDR_PULL_ALLOC(ndr
, r
->out
.server_major_version
);
24423 _mem_save_server_major_version_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24424 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.server_major_version
, LIBNDR_FLAG_REF_ALLOC
);
24425 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.server_major_version
));
24426 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_major_version_0
, LIBNDR_FLAG_REF_ALLOC
);
24427 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24428 NDR_PULL_ALLOC(ndr
, r
->out
.server_minor_version
);
24430 _mem_save_server_minor_version_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24431 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.server_minor_version
, LIBNDR_FLAG_REF_ALLOC
);
24432 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.server_minor_version
));
24433 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_minor_version_0
, LIBNDR_FLAG_REF_ALLOC
);
24434 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24436 return NDR_ERR_SUCCESS
;
24439 _PUBLIC_
void ndr_print_spoolss_GetPrinterDriver2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDriver2
*r
)
24441 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDriver2");
24443 if (flags
& NDR_SET_VALUES
) {
24444 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24446 if (flags
& NDR_IN
) {
24447 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDriver2");
24449 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24451 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24453 ndr_print_ptr(ndr
, "architecture", r
->in
.architecture
);
24455 if (r
->in
.architecture
) {
24456 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
24459 ndr_print_uint32(ndr
, "level", r
->in
.level
);
24460 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
24462 if (r
->in
.buffer
) {
24463 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
24466 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
24467 ndr_print_uint32(ndr
, "client_major_version", r
->in
.client_major_version
);
24468 ndr_print_uint32(ndr
, "client_minor_version", r
->in
.client_minor_version
);
24471 if (flags
& NDR_OUT
) {
24472 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDriver2");
24474 ndr_print_ptr(ndr
, "info", r
->out
.info
);
24477 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
24478 ndr_print_spoolss_DriverInfo(ndr
, "info", r
->out
.info
);
24481 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
24483 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
24485 ndr_print_ptr(ndr
, "server_major_version", r
->out
.server_major_version
);
24487 ndr_print_uint32(ndr
, "server_major_version", *r
->out
.server_major_version
);
24489 ndr_print_ptr(ndr
, "server_minor_version", r
->out
.server_minor_version
);
24491 ndr_print_uint32(ndr
, "server_minor_version", *r
->out
.server_minor_version
);
24493 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24499 static enum ndr_err_code
ndr_push_spoolss_FindFirstPrinterChangeNotification(struct ndr_push
*ndr
, int flags
, const struct spoolss_FindFirstPrinterChangeNotification
*r
)
24501 if (flags
& NDR_IN
) {
24503 if (flags
& NDR_OUT
) {
24504 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24506 return NDR_ERR_SUCCESS
;
24509 static enum ndr_err_code
ndr_pull_spoolss_FindFirstPrinterChangeNotification(struct ndr_pull
*ndr
, int flags
, struct spoolss_FindFirstPrinterChangeNotification
*r
)
24511 if (flags
& NDR_IN
) {
24513 if (flags
& NDR_OUT
) {
24514 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24516 return NDR_ERR_SUCCESS
;
24519 _PUBLIC_
void ndr_print_spoolss_FindFirstPrinterChangeNotification(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_FindFirstPrinterChangeNotification
*r
)
24521 ndr_print_struct(ndr
, name
, "spoolss_FindFirstPrinterChangeNotification");
24523 if (flags
& NDR_SET_VALUES
) {
24524 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24526 if (flags
& NDR_IN
) {
24527 ndr_print_struct(ndr
, "in", "spoolss_FindFirstPrinterChangeNotification");
24531 if (flags
& NDR_OUT
) {
24532 ndr_print_struct(ndr
, "out", "spoolss_FindFirstPrinterChangeNotification");
24534 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24540 static enum ndr_err_code
ndr_push_spoolss_FindNextPrinterChangeNotification(struct ndr_push
*ndr
, int flags
, const struct spoolss_FindNextPrinterChangeNotification
*r
)
24542 if (flags
& NDR_IN
) {
24544 if (flags
& NDR_OUT
) {
24545 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24547 return NDR_ERR_SUCCESS
;
24550 static enum ndr_err_code
ndr_pull_spoolss_FindNextPrinterChangeNotification(struct ndr_pull
*ndr
, int flags
, struct spoolss_FindNextPrinterChangeNotification
*r
)
24552 if (flags
& NDR_IN
) {
24554 if (flags
& NDR_OUT
) {
24555 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24557 return NDR_ERR_SUCCESS
;
24560 _PUBLIC_
void ndr_print_spoolss_FindNextPrinterChangeNotification(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_FindNextPrinterChangeNotification
*r
)
24562 ndr_print_struct(ndr
, name
, "spoolss_FindNextPrinterChangeNotification");
24564 if (flags
& NDR_SET_VALUES
) {
24565 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24567 if (flags
& NDR_IN
) {
24568 ndr_print_struct(ndr
, "in", "spoolss_FindNextPrinterChangeNotification");
24572 if (flags
& NDR_OUT
) {
24573 ndr_print_struct(ndr
, "out", "spoolss_FindNextPrinterChangeNotification");
24575 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24581 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_FindClosePrinterNotify(struct ndr_push
*ndr
, int flags
, const struct spoolss_FindClosePrinterNotify
*r
)
24583 if (flags
& NDR_IN
) {
24584 if (r
->in
.handle
== NULL
) {
24585 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24587 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24589 if (flags
& NDR_OUT
) {
24590 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24592 return NDR_ERR_SUCCESS
;
24595 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_FindClosePrinterNotify(struct ndr_pull
*ndr
, int flags
, struct spoolss_FindClosePrinterNotify
*r
)
24597 TALLOC_CTX
*_mem_save_handle_0
;
24598 if (flags
& NDR_IN
) {
24599 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24600 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24602 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24603 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24604 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24605 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
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_FindClosePrinterNotify(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_FindClosePrinterNotify
*r
)
24615 ndr_print_struct(ndr
, name
, "spoolss_FindClosePrinterNotify");
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_FindClosePrinterNotify");
24623 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24625 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24629 if (flags
& NDR_OUT
) {
24630 ndr_print_struct(ndr
, "out", "spoolss_FindClosePrinterNotify");
24632 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24638 static enum ndr_err_code
ndr_push_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
)
24640 if (flags
& NDR_IN
) {
24642 if (flags
& NDR_OUT
) {
24643 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24645 return NDR_ERR_SUCCESS
;
24648 static enum ndr_err_code
ndr_pull_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
)
24650 if (flags
& NDR_IN
) {
24652 if (flags
& NDR_OUT
) {
24653 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24655 return NDR_ERR_SUCCESS
;
24658 _PUBLIC_
void ndr_print_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
)
24660 ndr_print_struct(ndr
, name
, "spoolss_RouterFindFirstPrinterChangeNotificationOld");
24662 if (flags
& NDR_SET_VALUES
) {
24663 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24665 if (flags
& NDR_IN
) {
24666 ndr_print_struct(ndr
, "in", "spoolss_RouterFindFirstPrinterChangeNotificationOld");
24670 if (flags
& NDR_OUT
) {
24671 ndr_print_struct(ndr
, "out", "spoolss_RouterFindFirstPrinterChangeNotificationOld");
24673 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24679 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_ReplyOpenPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ReplyOpenPrinter
*r
)
24681 if (flags
& NDR_IN
) {
24682 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
24683 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
24684 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
24685 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
));
24686 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.printer_local
));
24687 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
24688 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
24689 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
24690 if (r
->in
.buffer
) {
24691 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
24692 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, r
->in
.bufsize
));
24695 if (flags
& NDR_OUT
) {
24696 if (r
->out
.handle
== NULL
) {
24697 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24699 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
24700 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24702 return NDR_ERR_SUCCESS
;
24705 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_ReplyOpenPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ReplyOpenPrinter
*r
)
24707 uint32_t _ptr_buffer
;
24708 TALLOC_CTX
*_mem_save_buffer_0
;
24709 TALLOC_CTX
*_mem_save_handle_0
;
24710 if (flags
& NDR_IN
) {
24711 ZERO_STRUCT(r
->out
);
24713 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
24714 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
24715 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
24716 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
));
24718 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
24719 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
));
24720 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.printer_local
));
24721 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->in
.type
));
24722 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
24723 if (r
->in
.bufsize
> 512) {
24724 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
24726 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
24728 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
24730 r
->in
.buffer
= NULL
;
24732 if (r
->in
.buffer
) {
24733 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24734 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
24735 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
24736 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
24737 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
)));
24738 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
24740 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
24741 ZERO_STRUCTP(r
->out
.handle
);
24742 if (r
->in
.buffer
) {
24743 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, r
->in
.bufsize
));
24746 if (flags
& NDR_OUT
) {
24747 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24748 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
24750 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24751 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24752 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
24753 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24754 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24756 return NDR_ERR_SUCCESS
;
24759 _PUBLIC_
void ndr_print_spoolss_ReplyOpenPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ReplyOpenPrinter
*r
)
24761 ndr_print_struct(ndr
, name
, "spoolss_ReplyOpenPrinter");
24763 if (flags
& NDR_SET_VALUES
) {
24764 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24766 if (flags
& NDR_IN
) {
24767 ndr_print_struct(ndr
, "in", "spoolss_ReplyOpenPrinter");
24769 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
24770 ndr_print_uint32(ndr
, "printer_local", r
->in
.printer_local
);
24771 ndr_print_winreg_Type(ndr
, "type", r
->in
.type
);
24772 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
24773 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
24775 if (r
->in
.buffer
) {
24776 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, r
->in
.bufsize
);
24781 if (flags
& NDR_OUT
) {
24782 ndr_print_struct(ndr
, "out", "spoolss_ReplyOpenPrinter");
24784 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
24786 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
24788 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24794 static enum ndr_err_code
ndr_push_spoolss_RouterReplyPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterReplyPrinter
*r
)
24796 if (flags
& NDR_IN
) {
24797 if (r
->in
.handle
== NULL
) {
24798 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24800 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24801 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
24802 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
24803 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
24804 if (r
->in
.buffer
) {
24805 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
24806 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, r
->in
.bufsize
));
24809 if (flags
& NDR_OUT
) {
24810 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24812 return NDR_ERR_SUCCESS
;
24815 static enum ndr_err_code
ndr_pull_spoolss_RouterReplyPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterReplyPrinter
*r
)
24817 uint32_t _ptr_buffer
;
24818 TALLOC_CTX
*_mem_save_handle_0
;
24819 TALLOC_CTX
*_mem_save_buffer_0
;
24820 if (flags
& NDR_IN
) {
24821 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24822 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24824 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24825 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24826 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24827 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24828 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
24829 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
24830 if (r
->in
.bufsize
> 512) {
24831 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
24833 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
24835 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
24837 r
->in
.buffer
= NULL
;
24839 if (r
->in
.buffer
) {
24840 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24841 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
24842 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
24843 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
24844 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
)));
24845 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
24847 if (r
->in
.buffer
) {
24848 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, r
->in
.bufsize
));
24851 if (flags
& NDR_OUT
) {
24852 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24854 return NDR_ERR_SUCCESS
;
24857 _PUBLIC_
void ndr_print_spoolss_RouterReplyPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterReplyPrinter
*r
)
24859 ndr_print_struct(ndr
, name
, "spoolss_RouterReplyPrinter");
24861 if (flags
& NDR_SET_VALUES
) {
24862 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24864 if (flags
& NDR_IN
) {
24865 ndr_print_struct(ndr
, "in", "spoolss_RouterReplyPrinter");
24867 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24869 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24871 ndr_print_spoolss_PrinterChangeFlags(ndr
, "flags", r
->in
.flags
);
24872 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
24873 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
24875 if (r
->in
.buffer
) {
24876 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, r
->in
.bufsize
);
24881 if (flags
& NDR_OUT
) {
24882 ndr_print_struct(ndr
, "out", "spoolss_RouterReplyPrinter");
24884 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24890 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_ReplyClosePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ReplyClosePrinter
*r
)
24892 if (flags
& NDR_IN
) {
24893 if (r
->in
.handle
== NULL
) {
24894 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24896 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24898 if (flags
& NDR_OUT
) {
24899 if (r
->out
.handle
== NULL
) {
24900 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24902 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
24903 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24905 return NDR_ERR_SUCCESS
;
24908 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_ReplyClosePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ReplyClosePrinter
*r
)
24910 TALLOC_CTX
*_mem_save_handle_0
;
24911 if (flags
& NDR_IN
) {
24912 ZERO_STRUCT(r
->out
);
24914 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24915 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24917 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24918 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24919 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24920 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24921 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
24922 *r
->out
.handle
= *r
->in
.handle
;
24924 if (flags
& NDR_OUT
) {
24925 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24926 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
24928 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24929 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24930 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
24931 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24932 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24934 return NDR_ERR_SUCCESS
;
24937 _PUBLIC_
void ndr_print_spoolss_ReplyClosePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ReplyClosePrinter
*r
)
24939 ndr_print_struct(ndr
, name
, "spoolss_ReplyClosePrinter");
24941 if (flags
& NDR_SET_VALUES
) {
24942 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24944 if (flags
& NDR_IN
) {
24945 ndr_print_struct(ndr
, "in", "spoolss_ReplyClosePrinter");
24947 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24949 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24953 if (flags
& NDR_OUT
) {
24954 ndr_print_struct(ndr
, "out", "spoolss_ReplyClosePrinter");
24956 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
24958 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
24960 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24966 static enum ndr_err_code
ndr_push_spoolss_AddPortEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPortEx
*r
)
24968 if (flags
& NDR_IN
) {
24970 if (flags
& NDR_OUT
) {
24971 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24973 return NDR_ERR_SUCCESS
;
24976 static enum ndr_err_code
ndr_pull_spoolss_AddPortEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPortEx
*r
)
24978 if (flags
& NDR_IN
) {
24980 if (flags
& NDR_OUT
) {
24981 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24983 return NDR_ERR_SUCCESS
;
24986 _PUBLIC_
void ndr_print_spoolss_AddPortEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPortEx
*r
)
24988 ndr_print_struct(ndr
, name
, "spoolss_AddPortEx");
24990 if (flags
& NDR_SET_VALUES
) {
24991 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24993 if (flags
& NDR_IN
) {
24994 ndr_print_struct(ndr
, "in", "spoolss_AddPortEx");
24998 if (flags
& NDR_OUT
) {
24999 ndr_print_struct(ndr
, "out", "spoolss_AddPortEx");
25001 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25007 static enum ndr_err_code
ndr_push_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterFindFirstPrinterChangeNotification
*r
)
25009 if (flags
& NDR_IN
) {
25011 if (flags
& NDR_OUT
) {
25012 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25014 return NDR_ERR_SUCCESS
;
25017 static enum ndr_err_code
ndr_pull_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterFindFirstPrinterChangeNotification
*r
)
25019 if (flags
& NDR_IN
) {
25021 if (flags
& NDR_OUT
) {
25022 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25024 return NDR_ERR_SUCCESS
;
25027 _PUBLIC_
void ndr_print_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterFindFirstPrinterChangeNotification
*r
)
25029 ndr_print_struct(ndr
, name
, "spoolss_RouterFindFirstPrinterChangeNotification");
25031 if (flags
& NDR_SET_VALUES
) {
25032 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25034 if (flags
& NDR_IN
) {
25035 ndr_print_struct(ndr
, "in", "spoolss_RouterFindFirstPrinterChangeNotification");
25039 if (flags
& NDR_OUT
) {
25040 ndr_print_struct(ndr
, "out", "spoolss_RouterFindFirstPrinterChangeNotification");
25042 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25048 static enum ndr_err_code
ndr_push_spoolss_SpoolerInit(struct ndr_push
*ndr
, int flags
, const struct spoolss_SpoolerInit
*r
)
25050 if (flags
& NDR_IN
) {
25052 if (flags
& NDR_OUT
) {
25053 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25055 return NDR_ERR_SUCCESS
;
25058 static enum ndr_err_code
ndr_pull_spoolss_SpoolerInit(struct ndr_pull
*ndr
, int flags
, struct spoolss_SpoolerInit
*r
)
25060 if (flags
& NDR_IN
) {
25062 if (flags
& NDR_OUT
) {
25063 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25065 return NDR_ERR_SUCCESS
;
25068 _PUBLIC_
void ndr_print_spoolss_SpoolerInit(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SpoolerInit
*r
)
25070 ndr_print_struct(ndr
, name
, "spoolss_SpoolerInit");
25072 if (flags
& NDR_SET_VALUES
) {
25073 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25075 if (flags
& NDR_IN
) {
25076 ndr_print_struct(ndr
, "in", "spoolss_SpoolerInit");
25080 if (flags
& NDR_OUT
) {
25081 ndr_print_struct(ndr
, "out", "spoolss_SpoolerInit");
25083 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25089 static enum ndr_err_code
ndr_push_spoolss_ResetPrinterEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_ResetPrinterEx
*r
)
25091 if (flags
& NDR_IN
) {
25093 if (flags
& NDR_OUT
) {
25094 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25096 return NDR_ERR_SUCCESS
;
25099 static enum ndr_err_code
ndr_pull_spoolss_ResetPrinterEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_ResetPrinterEx
*r
)
25101 if (flags
& NDR_IN
) {
25103 if (flags
& NDR_OUT
) {
25104 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25106 return NDR_ERR_SUCCESS
;
25109 _PUBLIC_
void ndr_print_spoolss_ResetPrinterEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ResetPrinterEx
*r
)
25111 ndr_print_struct(ndr
, name
, "spoolss_ResetPrinterEx");
25113 if (flags
& NDR_SET_VALUES
) {
25114 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25116 if (flags
& NDR_IN
) {
25117 ndr_print_struct(ndr
, "in", "spoolss_ResetPrinterEx");
25121 if (flags
& NDR_OUT
) {
25122 ndr_print_struct(ndr
, "out", "spoolss_ResetPrinterEx");
25124 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25130 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
)
25132 if (flags
& NDR_IN
) {
25133 if (r
->in
.handle
== NULL
) {
25134 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25136 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25137 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
25138 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.options
));
25139 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.local_machine
));
25140 if (r
->in
.local_machine
) {
25141 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.local_machine
, CH_UTF16
)));
25142 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
25143 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.local_machine
, CH_UTF16
)));
25144 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
));
25146 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.printer_local
));
25147 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.notify_options
));
25148 if (r
->in
.notify_options
) {
25149 NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.notify_options
));
25152 if (flags
& NDR_OUT
) {
25153 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25155 return NDR_ERR_SUCCESS
;
25158 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
)
25160 uint32_t _ptr_local_machine
;
25161 uint32_t _ptr_notify_options
;
25162 TALLOC_CTX
*_mem_save_handle_0
;
25163 TALLOC_CTX
*_mem_save_local_machine_0
;
25164 TALLOC_CTX
*_mem_save_notify_options_0
;
25165 if (flags
& NDR_IN
) {
25166 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25167 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
25169 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25170 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
25171 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25172 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25173 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
25174 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.options
));
25175 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_local_machine
));
25176 if (_ptr_local_machine
) {
25177 NDR_PULL_ALLOC(ndr
, r
->in
.local_machine
);
25179 r
->in
.local_machine
= NULL
;
25181 if (r
->in
.local_machine
) {
25182 _mem_save_local_machine_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25183 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.local_machine
, 0);
25184 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.local_machine
));
25185 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.local_machine
));
25186 if (ndr_get_array_length(ndr
, &r
->in
.local_machine
) > ndr_get_array_size(ndr
, &r
->in
.local_machine
)) {
25187 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
));
25189 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.local_machine
), sizeof(uint16_t)));
25190 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
));
25191 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_local_machine_0
, 0);
25193 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.printer_local
));
25194 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_options
));
25195 if (_ptr_notify_options
) {
25196 NDR_PULL_ALLOC(ndr
, r
->in
.notify_options
);
25198 r
->in
.notify_options
= NULL
;
25200 if (r
->in
.notify_options
) {
25201 _mem_save_notify_options_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25202 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.notify_options
, 0);
25203 NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.notify_options
));
25204 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_options_0
, 0);
25207 if (flags
& NDR_OUT
) {
25208 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25210 return NDR_ERR_SUCCESS
;
25213 _PUBLIC_
void ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
)
25215 ndr_print_struct(ndr
, name
, "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
25217 if (flags
& NDR_SET_VALUES
) {
25218 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25220 if (flags
& NDR_IN
) {
25221 ndr_print_struct(ndr
, "in", "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
25223 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
25225 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
25227 ndr_print_spoolss_PrinterChangeFlags(ndr
, "flags", r
->in
.flags
);
25228 ndr_print_uint32(ndr
, "options", r
->in
.options
);
25229 ndr_print_ptr(ndr
, "local_machine", r
->in
.local_machine
);
25231 if (r
->in
.local_machine
) {
25232 ndr_print_string(ndr
, "local_machine", r
->in
.local_machine
);
25235 ndr_print_uint32(ndr
, "printer_local", r
->in
.printer_local
);
25236 ndr_print_ptr(ndr
, "notify_options", r
->in
.notify_options
);
25238 if (r
->in
.notify_options
) {
25239 ndr_print_spoolss_NotifyOption(ndr
, "notify_options", r
->in
.notify_options
);
25244 if (flags
& NDR_OUT
) {
25245 ndr_print_struct(ndr
, "out", "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
25247 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25253 static enum ndr_err_code
ndr_push_spoolss_RouterReplyPrinterEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterReplyPrinterEx
*r
)
25255 if (flags
& NDR_IN
) {
25256 if (r
->in
.handle
== NULL
) {
25257 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25259 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25260 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.color
));
25261 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
25262 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.reply_type
));
25263 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.info
, r
->in
.reply_type
));
25264 NDR_CHECK(ndr_push_spoolss_ReplyPrinterInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
25266 if (flags
& NDR_OUT
) {
25267 if (r
->out
.reply_result
== NULL
) {
25268 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25270 NDR_CHECK(ndr_push_spoolss_PrinterNotifyFlags(ndr
, NDR_SCALARS
, *r
->out
.reply_result
));
25271 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25273 return NDR_ERR_SUCCESS
;
25276 static enum ndr_err_code
ndr_pull_spoolss_RouterReplyPrinterEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterReplyPrinterEx
*r
)
25278 TALLOC_CTX
*_mem_save_handle_0
;
25279 TALLOC_CTX
*_mem_save_reply_result_0
;
25280 if (flags
& NDR_IN
) {
25281 ZERO_STRUCT(r
->out
);
25283 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25284 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
25286 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25287 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
25288 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25290 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.color
));
25291 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
25292 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.reply_type
));
25293 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.info
, r
->in
.reply_type
));
25294 NDR_CHECK(ndr_pull_spoolss_ReplyPrinterInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
25295 NDR_PULL_ALLOC(ndr
, r
->out
.reply_result
);
25296 ZERO_STRUCTP(r
->out
.reply_result
);
25298 if (flags
& NDR_OUT
) {
25299 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25300 NDR_PULL_ALLOC(ndr
, r
->out
.reply_result
);
25302 _mem_save_reply_result_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25303 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.reply_result
, LIBNDR_FLAG_REF_ALLOC
);
25304 NDR_CHECK(ndr_pull_spoolss_PrinterNotifyFlags(ndr
, NDR_SCALARS
, r
->out
.reply_result
));
25305 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_reply_result_0
, LIBNDR_FLAG_REF_ALLOC
);
25306 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25308 return NDR_ERR_SUCCESS
;
25311 _PUBLIC_
void ndr_print_spoolss_RouterReplyPrinterEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterReplyPrinterEx
*r
)
25313 ndr_print_struct(ndr
, name
, "spoolss_RouterReplyPrinterEx");
25315 if (flags
& NDR_SET_VALUES
) {
25316 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25318 if (flags
& NDR_IN
) {
25319 ndr_print_struct(ndr
, "in", "spoolss_RouterReplyPrinterEx");
25321 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
25323 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
25325 ndr_print_uint32(ndr
, "color", r
->in
.color
);
25326 ndr_print_spoolss_PrinterChangeFlags(ndr
, "flags", r
->in
.flags
);
25327 ndr_print_uint32(ndr
, "reply_type", r
->in
.reply_type
);
25328 ndr_print_set_switch_value(ndr
, &r
->in
.info
, r
->in
.reply_type
);
25329 ndr_print_spoolss_ReplyPrinterInfo(ndr
, "info", &r
->in
.info
);
25332 if (flags
& NDR_OUT
) {
25333 ndr_print_struct(ndr
, "out", "spoolss_RouterReplyPrinterEx");
25335 ndr_print_ptr(ndr
, "reply_result", r
->out
.reply_result
);
25337 ndr_print_spoolss_PrinterNotifyFlags(ndr
, "reply_result", *r
->out
.reply_result
);
25339 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25345 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterRefreshPrinterChangeNotify
*r
)
25347 if (flags
& NDR_IN
) {
25348 if (r
->in
.handle
== NULL
) {
25349 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25351 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25352 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.change_low
));
25353 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.options
));
25354 if (r
->in
.options
) {
25355 NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.options
));
25358 if (flags
& NDR_OUT
) {
25359 if (r
->out
.info
== NULL
) {
25360 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25362 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
25363 if (*r
->out
.info
) {
25364 NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
25366 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25368 return NDR_ERR_SUCCESS
;
25371 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterRefreshPrinterChangeNotify
*r
)
25373 uint32_t _ptr_options
;
25374 uint32_t _ptr_info
;
25375 TALLOC_CTX
*_mem_save_handle_0
;
25376 TALLOC_CTX
*_mem_save_options_0
;
25377 TALLOC_CTX
*_mem_save_info_0
;
25378 TALLOC_CTX
*_mem_save_info_1
;
25379 if (flags
& NDR_IN
) {
25380 ZERO_STRUCT(r
->out
);
25382 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25383 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
25385 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25386 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
25387 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25388 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25389 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.change_low
));
25390 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_options
));
25391 if (_ptr_options
) {
25392 NDR_PULL_ALLOC(ndr
, r
->in
.options
);
25394 r
->in
.options
= NULL
;
25396 if (r
->in
.options
) {
25397 _mem_save_options_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25398 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.options
, 0);
25399 NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.options
));
25400 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_options_0
, 0);
25402 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
25403 ZERO_STRUCTP(r
->out
.info
);
25405 if (flags
& NDR_OUT
) {
25406 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25407 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
25409 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25410 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
25411 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
25413 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
25415 *r
->out
.info
= NULL
;
25417 if (*r
->out
.info
) {
25418 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
25419 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
25420 NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
25421 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
25423 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
25424 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25426 return NDR_ERR_SUCCESS
;
25429 _PUBLIC_
void ndr_print_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterRefreshPrinterChangeNotify
*r
)
25431 ndr_print_struct(ndr
, name
, "spoolss_RouterRefreshPrinterChangeNotify");
25433 if (flags
& NDR_SET_VALUES
) {
25434 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25436 if (flags
& NDR_IN
) {
25437 ndr_print_struct(ndr
, "in", "spoolss_RouterRefreshPrinterChangeNotify");
25439 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
25441 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
25443 ndr_print_uint32(ndr
, "change_low", r
->in
.change_low
);
25444 ndr_print_ptr(ndr
, "options", r
->in
.options
);
25446 if (r
->in
.options
) {
25447 ndr_print_spoolss_NotifyOption(ndr
, "options", r
->in
.options
);
25452 if (flags
& NDR_OUT
) {
25453 ndr_print_struct(ndr
, "out", "spoolss_RouterRefreshPrinterChangeNotify");
25455 ndr_print_ptr(ndr
, "info", r
->out
.info
);
25457 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
25459 if (*r
->out
.info
) {
25460 ndr_print_spoolss_NotifyInfo(ndr
, "info", *r
->out
.info
);
25464 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25470 static enum ndr_err_code
ndr_push_spoolss_44(struct ndr_push
*ndr
, int flags
, const struct spoolss_44
*r
)
25472 if (flags
& NDR_IN
) {
25474 if (flags
& NDR_OUT
) {
25475 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25477 return NDR_ERR_SUCCESS
;
25480 static enum ndr_err_code
ndr_pull_spoolss_44(struct ndr_pull
*ndr
, int flags
, struct spoolss_44
*r
)
25482 if (flags
& NDR_IN
) {
25484 if (flags
& NDR_OUT
) {
25485 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25487 return NDR_ERR_SUCCESS
;
25490 _PUBLIC_
void ndr_print_spoolss_44(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_44
*r
)
25492 ndr_print_struct(ndr
, name
, "spoolss_44");
25494 if (flags
& NDR_SET_VALUES
) {
25495 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25497 if (flags
& NDR_IN
) {
25498 ndr_print_struct(ndr
, "in", "spoolss_44");
25502 if (flags
& NDR_OUT
) {
25503 ndr_print_struct(ndr
, "out", "spoolss_44");
25505 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25511 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_OpenPrinterEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_OpenPrinterEx
*r
)
25513 if (flags
& NDR_IN
) {
25514 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.printername
));
25515 if (r
->in
.printername
) {
25516 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.printername
, CH_UTF16
)));
25517 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
25518 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.printername
, CH_UTF16
)));
25519 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.printername
, ndr_charset_length(r
->in
.printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
25521 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.datatype
));
25522 if (r
->in
.datatype
) {
25523 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.datatype
, 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
.datatype
, CH_UTF16
)));
25526 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.datatype
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
25528 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.devmode_ctr
));
25529 NDR_CHECK(ndr_push_spoolss_AccessRights(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
25530 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
25531 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.userlevel
, r
->in
.level
));
25532 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.userlevel
));
25534 if (flags
& NDR_OUT
) {
25535 if (r
->out
.handle
== NULL
) {
25536 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25538 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
25539 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25541 return NDR_ERR_SUCCESS
;
25544 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_OpenPrinterEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_OpenPrinterEx
*r
)
25546 uint32_t _ptr_printername
;
25547 uint32_t _ptr_datatype
;
25548 TALLOC_CTX
*_mem_save_printername_0
;
25549 TALLOC_CTX
*_mem_save_datatype_0
;
25550 TALLOC_CTX
*_mem_save_handle_0
;
25551 if (flags
& NDR_IN
) {
25552 ZERO_STRUCT(r
->out
);
25554 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
25555 if (_ptr_printername
) {
25556 NDR_PULL_ALLOC(ndr
, r
->in
.printername
);
25558 r
->in
.printername
= NULL
;
25560 if (r
->in
.printername
) {
25561 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25562 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.printername
, 0);
25563 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.printername
));
25564 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.printername
));
25565 if (ndr_get_array_length(ndr
, &r
->in
.printername
) > ndr_get_array_size(ndr
, &r
->in
.printername
)) {
25566 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
));
25568 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.printername
), sizeof(uint16_t)));
25569 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.printername
, ndr_get_array_length(ndr
, &r
->in
.printername
), sizeof(uint16_t), CH_UTF16
));
25570 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
25572 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
25573 if (_ptr_datatype
) {
25574 NDR_PULL_ALLOC(ndr
, r
->in
.datatype
);
25576 r
->in
.datatype
= NULL
;
25578 if (r
->in
.datatype
) {
25579 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25580 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.datatype
, 0);
25581 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.datatype
));
25582 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.datatype
));
25583 if (ndr_get_array_length(ndr
, &r
->in
.datatype
) > ndr_get_array_size(ndr
, &r
->in
.datatype
)) {
25584 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
));
25586 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.datatype
), sizeof(uint16_t)));
25587 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.datatype
, ndr_get_array_length(ndr
, &r
->in
.datatype
), sizeof(uint16_t), CH_UTF16
));
25588 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
25590 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.devmode_ctr
));
25591 NDR_CHECK(ndr_pull_spoolss_AccessRights(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
25592 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
25593 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.userlevel
, r
->in
.level
));
25594 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.userlevel
));
25595 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
25596 ZERO_STRUCTP(r
->out
.handle
);
25598 if (flags
& NDR_OUT
) {
25599 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25600 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
25602 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25603 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
25604 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
25605 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25606 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25608 return NDR_ERR_SUCCESS
;
25611 _PUBLIC_
void ndr_print_spoolss_OpenPrinterEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_OpenPrinterEx
*r
)
25613 ndr_print_struct(ndr
, name
, "spoolss_OpenPrinterEx");
25615 if (flags
& NDR_SET_VALUES
) {
25616 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25618 if (flags
& NDR_IN
) {
25619 ndr_print_struct(ndr
, "in", "spoolss_OpenPrinterEx");
25621 ndr_print_ptr(ndr
, "printername", r
->in
.printername
);
25623 if (r
->in
.printername
) {
25624 ndr_print_string(ndr
, "printername", r
->in
.printername
);
25627 ndr_print_ptr(ndr
, "datatype", r
->in
.datatype
);
25629 if (r
->in
.datatype
) {
25630 ndr_print_string(ndr
, "datatype", r
->in
.datatype
);
25633 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", &r
->in
.devmode_ctr
);
25634 ndr_print_spoolss_AccessRights(ndr
, "access_mask", r
->in
.access_mask
);
25635 ndr_print_uint32(ndr
, "level", r
->in
.level
);
25636 ndr_print_set_switch_value(ndr
, &r
->in
.userlevel
, r
->in
.level
);
25637 ndr_print_spoolss_UserLevel(ndr
, "userlevel", &r
->in
.userlevel
);
25640 if (flags
& NDR_OUT
) {
25641 ndr_print_struct(ndr
, "out", "spoolss_OpenPrinterEx");
25643 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
25645 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
25647 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25653 static enum ndr_err_code
ndr_push_spoolss_AddPrinterEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinterEx
*r
)
25655 if (flags
& NDR_IN
) {
25656 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
25657 if (r
->in
.server
) {
25658 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
25659 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
25660 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
25661 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
25663 if (r
->in
.info_ctr
== NULL
) {
25664 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25666 NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
25667 if (r
->in
.devmode_ctr
== NULL
) {
25668 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25670 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
25671 if (r
->in
.secdesc_ctr
== NULL
) {
25672 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25674 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
25675 if (r
->in
.userlevel_ctr
== NULL
) {
25676 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25678 NDR_CHECK(ndr_push_spoolss_UserLevelCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.userlevel_ctr
));
25680 if (flags
& NDR_OUT
) {
25681 if (r
->out
.handle
== NULL
) {
25682 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25684 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
25685 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25687 return NDR_ERR_SUCCESS
;
25690 static enum ndr_err_code
ndr_pull_spoolss_AddPrinterEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinterEx
*r
)
25692 uint32_t _ptr_server
;
25693 TALLOC_CTX
*_mem_save_server_0
;
25694 TALLOC_CTX
*_mem_save_info_ctr_0
;
25695 TALLOC_CTX
*_mem_save_devmode_ctr_0
;
25696 TALLOC_CTX
*_mem_save_secdesc_ctr_0
;
25697 TALLOC_CTX
*_mem_save_userlevel_ctr_0
;
25698 TALLOC_CTX
*_mem_save_handle_0
;
25699 if (flags
& NDR_IN
) {
25700 ZERO_STRUCT(r
->out
);
25702 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
25704 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
25706 r
->in
.server
= NULL
;
25708 if (r
->in
.server
) {
25709 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25710 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
25711 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
25712 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
25713 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
25714 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
));
25716 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
25717 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
25718 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
25720 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25721 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
25723 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25724 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
25725 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
25726 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
25727 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25728 NDR_PULL_ALLOC(ndr
, r
->in
.devmode_ctr
);
25730 _mem_save_devmode_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25731 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.devmode_ctr
, LIBNDR_FLAG_REF_ALLOC
);
25732 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
25733 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
25734 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25735 NDR_PULL_ALLOC(ndr
, r
->in
.secdesc_ctr
);
25737 _mem_save_secdesc_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25738 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.secdesc_ctr
, LIBNDR_FLAG_REF_ALLOC
);
25739 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
25740 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
25741 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25742 NDR_PULL_ALLOC(ndr
, r
->in
.userlevel_ctr
);
25744 _mem_save_userlevel_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25745 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.userlevel_ctr
, LIBNDR_FLAG_REF_ALLOC
);
25746 NDR_CHECK(ndr_pull_spoolss_UserLevelCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.userlevel_ctr
));
25747 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_userlevel_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
25748 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
25749 ZERO_STRUCTP(r
->out
.handle
);
25751 if (flags
& NDR_OUT
) {
25752 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25753 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
25755 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25756 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
25757 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
25758 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25759 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25761 return NDR_ERR_SUCCESS
;
25764 _PUBLIC_
void ndr_print_spoolss_AddPrinterEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinterEx
*r
)
25766 ndr_print_struct(ndr
, name
, "spoolss_AddPrinterEx");
25768 if (flags
& NDR_SET_VALUES
) {
25769 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25771 if (flags
& NDR_IN
) {
25772 ndr_print_struct(ndr
, "in", "spoolss_AddPrinterEx");
25774 ndr_print_ptr(ndr
, "server", r
->in
.server
);
25776 if (r
->in
.server
) {
25777 ndr_print_string(ndr
, "server", r
->in
.server
);
25780 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
25782 ndr_print_spoolss_SetPrinterInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
25784 ndr_print_ptr(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
25786 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
25788 ndr_print_ptr(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
25790 ndr_print_sec_desc_buf(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
25792 ndr_print_ptr(ndr
, "userlevel_ctr", r
->in
.userlevel_ctr
);
25794 ndr_print_spoolss_UserLevelCtr(ndr
, "userlevel_ctr", r
->in
.userlevel_ctr
);
25798 if (flags
& NDR_OUT
) {
25799 ndr_print_struct(ndr
, "out", "spoolss_AddPrinterEx");
25801 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
25803 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
25805 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25811 static enum ndr_err_code
ndr_push_spoolss_47(struct ndr_push
*ndr
, int flags
, const struct spoolss_47
*r
)
25813 if (flags
& NDR_IN
) {
25815 if (flags
& NDR_OUT
) {
25816 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25818 return NDR_ERR_SUCCESS
;
25821 static enum ndr_err_code
ndr_pull_spoolss_47(struct ndr_pull
*ndr
, int flags
, struct spoolss_47
*r
)
25823 if (flags
& NDR_IN
) {
25825 if (flags
& NDR_OUT
) {
25826 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25828 return NDR_ERR_SUCCESS
;
25831 _PUBLIC_
void ndr_print_spoolss_47(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_47
*r
)
25833 ndr_print_struct(ndr
, name
, "spoolss_47");
25835 if (flags
& NDR_SET_VALUES
) {
25836 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25838 if (flags
& NDR_IN
) {
25839 ndr_print_struct(ndr
, "in", "spoolss_47");
25843 if (flags
& NDR_OUT
) {
25844 ndr_print_struct(ndr
, "out", "spoolss_47");
25846 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25852 static enum ndr_err_code
ndr_push_spoolss_EnumPrinterData(struct ndr_push
*ndr
, int flags
, const struct spoolss_EnumPrinterData
*r
)
25854 if (flags
& NDR_IN
) {
25855 if (r
->in
.handle
== NULL
) {
25856 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25858 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25859 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.enum_index
));
25860 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.value_offered
));
25861 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_offered
));
25863 if (flags
& NDR_OUT
) {
25864 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.value_offered
/ 2));
25865 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->out
.value_name
, r
->in
.value_offered
/ 2, sizeof(uint16_t), CH_UTF16
));
25866 if (r
->out
.value_needed
== NULL
) {
25867 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25869 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.value_needed
));
25870 if (r
->out
.type
== NULL
) {
25871 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25873 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->out
.type
));
25875 uint32_t _flags_save_uint8
= ndr
->flags
;
25876 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
25877 if (r
->out
.data
== NULL
) {
25878 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25880 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_offered
));
25881 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.data_offered
));
25882 ndr
->flags
= _flags_save_uint8
;
25884 if (r
->out
.data_needed
== NULL
) {
25885 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25887 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.data_needed
));
25888 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25890 return NDR_ERR_SUCCESS
;
25893 static enum ndr_err_code
ndr_pull_spoolss_EnumPrinterData(struct ndr_pull
*ndr
, int flags
, struct spoolss_EnumPrinterData
*r
)
25895 TALLOC_CTX
*_mem_save_handle_0
;
25896 TALLOC_CTX
*_mem_save_value_needed_0
;
25897 TALLOC_CTX
*_mem_save_type_0
;
25898 TALLOC_CTX
*_mem_save_data_needed_0
;
25899 if (flags
& NDR_IN
) {
25900 ZERO_STRUCT(r
->out
);
25902 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25903 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
25905 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25906 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
25907 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25908 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25909 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.enum_index
));
25910 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.value_offered
));
25911 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.data_offered
));
25912 NDR_PULL_ALLOC(ndr
, r
->out
.value_needed
);
25913 ZERO_STRUCTP(r
->out
.value_needed
);
25914 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
25915 ZERO_STRUCTP(r
->out
.type
);
25916 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.data_offered
);
25917 memset(r
->out
.data
, 0, (r
->in
.data_offered
) * sizeof(*r
->out
.data
));
25918 NDR_PULL_ALLOC(ndr
, r
->out
.data_needed
);
25919 ZERO_STRUCTP(r
->out
.data_needed
);
25921 if (flags
& NDR_OUT
) {
25922 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.value_name
));
25923 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
));
25924 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25925 NDR_PULL_ALLOC(ndr
, r
->out
.value_needed
);
25927 _mem_save_value_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25928 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.value_needed
, LIBNDR_FLAG_REF_ALLOC
);
25929 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.value_needed
));
25930 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
25931 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25932 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
25934 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25935 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.type
, LIBNDR_FLAG_REF_ALLOC
);
25936 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->out
.type
));
25937 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, LIBNDR_FLAG_REF_ALLOC
);
25939 uint32_t _flags_save_uint8
= ndr
->flags
;
25940 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
25941 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
25942 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25943 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
25945 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
)));
25946 ndr
->flags
= _flags_save_uint8
;
25948 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25949 NDR_PULL_ALLOC(ndr
, r
->out
.data_needed
);
25951 _mem_save_data_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25952 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.data_needed
, LIBNDR_FLAG_REF_ALLOC
);
25953 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.data_needed
));
25954 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
25955 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25956 if (r
->out
.value_name
) {
25957 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.value_name
, r
->in
.value_offered
/ 2));
25960 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.data_offered
));
25963 return NDR_ERR_SUCCESS
;
25966 _PUBLIC_
void ndr_print_spoolss_EnumPrinterData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinterData
*r
)
25968 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinterData");
25970 if (flags
& NDR_SET_VALUES
) {
25971 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25973 if (flags
& NDR_IN
) {
25974 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinterData");
25976 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
25978 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
25980 ndr_print_uint32(ndr
, "enum_index", r
->in
.enum_index
);
25981 ndr_print_uint32(ndr
, "value_offered", r
->in
.value_offered
);
25982 ndr_print_uint32(ndr
, "data_offered", r
->in
.data_offered
);
25985 if (flags
& NDR_OUT
) {
25986 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinterData");
25988 ndr_print_string(ndr
, "value_name", r
->out
.value_name
);
25989 ndr_print_ptr(ndr
, "value_needed", r
->out
.value_needed
);
25991 ndr_print_uint32(ndr
, "value_needed", *r
->out
.value_needed
);
25993 ndr_print_ptr(ndr
, "type", r
->out
.type
);
25995 ndr_print_winreg_Type(ndr
, "type", *r
->out
.type
);
25997 ndr_print_ptr(ndr
, "data", r
->out
.data
);
25999 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.data_offered
);
26001 ndr_print_ptr(ndr
, "data_needed", r
->out
.data_needed
);
26003 ndr_print_uint32(ndr
, "data_needed", *r
->out
.data_needed
);
26005 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26011 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterData(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterData
*r
)
26013 if (flags
& NDR_IN
) {
26014 if (r
->in
.handle
== NULL
) {
26015 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26017 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26018 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
26019 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26020 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
26021 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
));
26023 if (flags
& NDR_OUT
) {
26024 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26026 return NDR_ERR_SUCCESS
;
26029 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterData(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterData
*r
)
26031 TALLOC_CTX
*_mem_save_handle_0
;
26032 if (flags
& NDR_IN
) {
26033 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26034 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26036 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26037 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26038 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26039 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
26040 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
26041 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
26042 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
26043 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
));
26045 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
26046 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
));
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_DeletePrinterData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterData
*r
)
26056 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterData");
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_DeletePrinterData");
26064 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26066 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26068 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
26071 if (flags
& NDR_OUT
) {
26072 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterData");
26074 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26080 static enum ndr_err_code
ndr_push_spoolss_4a(struct ndr_push
*ndr
, int flags
, const struct spoolss_4a
*r
)
26082 if (flags
& NDR_IN
) {
26084 if (flags
& NDR_OUT
) {
26085 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26087 return NDR_ERR_SUCCESS
;
26090 static enum ndr_err_code
ndr_pull_spoolss_4a(struct ndr_pull
*ndr
, int flags
, struct spoolss_4a
*r
)
26092 if (flags
& NDR_IN
) {
26094 if (flags
& NDR_OUT
) {
26095 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26097 return NDR_ERR_SUCCESS
;
26100 _PUBLIC_
void ndr_print_spoolss_4a(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_4a
*r
)
26102 ndr_print_struct(ndr
, name
, "spoolss_4a");
26104 if (flags
& NDR_SET_VALUES
) {
26105 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26107 if (flags
& NDR_IN
) {
26108 ndr_print_struct(ndr
, "in", "spoolss_4a");
26112 if (flags
& NDR_OUT
) {
26113 ndr_print_struct(ndr
, "out", "spoolss_4a");
26115 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26121 static enum ndr_err_code
ndr_push_spoolss_4b(struct ndr_push
*ndr
, int flags
, const struct spoolss_4b
*r
)
26123 if (flags
& NDR_IN
) {
26125 if (flags
& NDR_OUT
) {
26126 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26128 return NDR_ERR_SUCCESS
;
26131 static enum ndr_err_code
ndr_pull_spoolss_4b(struct ndr_pull
*ndr
, int flags
, struct spoolss_4b
*r
)
26133 if (flags
& NDR_IN
) {
26135 if (flags
& NDR_OUT
) {
26136 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26138 return NDR_ERR_SUCCESS
;
26141 _PUBLIC_
void ndr_print_spoolss_4b(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_4b
*r
)
26143 ndr_print_struct(ndr
, name
, "spoolss_4b");
26145 if (flags
& NDR_SET_VALUES
) {
26146 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26148 if (flags
& NDR_IN
) {
26149 ndr_print_struct(ndr
, "in", "spoolss_4b");
26153 if (flags
& NDR_OUT
) {
26154 ndr_print_struct(ndr
, "out", "spoolss_4b");
26156 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26162 static enum ndr_err_code
ndr_push_spoolss_4c(struct ndr_push
*ndr
, int flags
, const struct spoolss_4c
*r
)
26164 if (flags
& NDR_IN
) {
26166 if (flags
& NDR_OUT
) {
26167 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26169 return NDR_ERR_SUCCESS
;
26172 static enum ndr_err_code
ndr_pull_spoolss_4c(struct ndr_pull
*ndr
, int flags
, struct spoolss_4c
*r
)
26174 if (flags
& NDR_IN
) {
26176 if (flags
& NDR_OUT
) {
26177 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26179 return NDR_ERR_SUCCESS
;
26182 _PUBLIC_
void ndr_print_spoolss_4c(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_4c
*r
)
26184 ndr_print_struct(ndr
, name
, "spoolss_4c");
26186 if (flags
& NDR_SET_VALUES
) {
26187 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26189 if (flags
& NDR_IN
) {
26190 ndr_print_struct(ndr
, "in", "spoolss_4c");
26194 if (flags
& NDR_OUT
) {
26195 ndr_print_struct(ndr
, "out", "spoolss_4c");
26197 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26203 static enum ndr_err_code
ndr_push_spoolss_SetPrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetPrinterDataEx
*r
)
26205 if (flags
& NDR_IN
) {
26206 if (r
->in
.handle
== NULL
) {
26207 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26209 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26210 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26211 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26212 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26213 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
));
26214 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
26215 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26216 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
26217 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
));
26218 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
26219 if (r
->in
.buffer
== NULL
) {
26220 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26222 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
26223 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, r
->in
.offered
));
26224 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
26226 if (flags
& NDR_OUT
) {
26227 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26229 return NDR_ERR_SUCCESS
;
26232 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetPrinterDataEx
*r
)
26234 TALLOC_CTX
*_mem_save_handle_0
;
26235 if (flags
& NDR_IN
) {
26236 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26237 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26239 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26240 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26241 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26242 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
26243 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
26244 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
26245 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
26246 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
));
26248 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
26249 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
));
26250 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
26251 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
26252 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
26253 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
));
26255 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
26256 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
));
26257 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->in
.type
));
26258 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
26259 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26260 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
26262 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
)));
26263 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
26264 if (r
->in
.buffer
) {
26265 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, r
->in
.offered
));
26268 if (flags
& NDR_OUT
) {
26269 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26271 return NDR_ERR_SUCCESS
;
26274 _PUBLIC_
void ndr_print_spoolss_SetPrinterDataEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetPrinterDataEx
*r
)
26276 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterDataEx");
26278 if (flags
& NDR_SET_VALUES
) {
26279 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26281 if (flags
& NDR_IN
) {
26282 ndr_print_struct(ndr
, "in", "spoolss_SetPrinterDataEx");
26284 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26286 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26288 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
26289 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
26290 ndr_print_winreg_Type(ndr
, "type", r
->in
.type
);
26291 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
26293 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, r
->in
.offered
);
26295 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
26298 if (flags
& NDR_OUT
) {
26299 ndr_print_struct(ndr
, "out", "spoolss_SetPrinterDataEx");
26301 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26307 static enum ndr_err_code
ndr_push_spoolss_GetPrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDataEx
*r
)
26309 if (flags
& NDR_IN
) {
26310 if (r
->in
.handle
== NULL
) {
26311 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26313 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26314 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26315 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26316 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26317 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
));
26318 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
26319 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26320 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
26321 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
));
26322 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
26324 if (flags
& NDR_OUT
) {
26325 if (r
->out
.type
== NULL
) {
26326 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26328 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->out
.type
));
26329 if (r
->out
.buffer
== NULL
) {
26330 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26332 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
26333 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.offered
));
26334 if (r
->out
.needed
== NULL
) {
26335 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26337 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
26338 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26340 return NDR_ERR_SUCCESS
;
26343 static enum ndr_err_code
ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDataEx
*r
)
26345 TALLOC_CTX
*_mem_save_handle_0
;
26346 TALLOC_CTX
*_mem_save_type_0
;
26347 TALLOC_CTX
*_mem_save_needed_0
;
26348 if (flags
& NDR_IN
) {
26349 ZERO_STRUCT(r
->out
);
26351 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26352 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26354 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26355 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26356 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26357 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
26358 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
26359 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
26360 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
26361 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
));
26363 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
26364 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
));
26365 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
26366 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
26367 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
26368 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
));
26370 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
26371 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
));
26372 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
26373 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
26374 ZERO_STRUCTP(r
->out
.type
);
26375 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, r
->in
.offered
);
26376 memset(r
->out
.buffer
, 0, (r
->in
.offered
) * sizeof(*r
->out
.buffer
));
26377 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26378 ZERO_STRUCTP(r
->out
.needed
);
26380 if (flags
& NDR_OUT
) {
26381 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26382 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
26384 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26385 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.type
, LIBNDR_FLAG_REF_ALLOC
);
26386 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->out
.type
));
26387 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, LIBNDR_FLAG_REF_ALLOC
);
26388 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
26389 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26390 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
));
26392 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
)));
26393 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26394 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26396 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26397 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
26398 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
26399 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
26400 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26401 if (r
->out
.buffer
) {
26402 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, r
->in
.offered
));
26405 return NDR_ERR_SUCCESS
;
26408 _PUBLIC_
void ndr_print_spoolss_GetPrinterDataEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDataEx
*r
)
26410 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDataEx");
26412 if (flags
& NDR_SET_VALUES
) {
26413 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26415 if (flags
& NDR_IN
) {
26416 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDataEx");
26418 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26420 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26422 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
26423 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
26424 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
26427 if (flags
& NDR_OUT
) {
26428 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDataEx");
26430 ndr_print_ptr(ndr
, "type", r
->out
.type
);
26432 ndr_print_winreg_Type(ndr
, "type", *r
->out
.type
);
26434 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
26436 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.offered
);
26438 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
26440 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
26442 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26448 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrinterDataEx
*r
)
26450 if (flags
& NDR_IN
) {
26451 if (r
->in
.handle
== NULL
) {
26452 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26454 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26455 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26456 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26457 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26458 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
));
26459 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
26461 if (flags
& NDR_OUT
) {
26462 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
26463 if (r
->out
.needed
== NULL
) {
26464 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26466 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
26467 if (r
->out
.count
== NULL
) {
26468 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26470 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
26471 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26473 return NDR_ERR_SUCCESS
;
26476 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrinterDataEx
*r
)
26478 TALLOC_CTX
*_mem_save_handle_0
;
26479 TALLOC_CTX
*_mem_save_needed_0
;
26480 TALLOC_CTX
*_mem_save_count_0
;
26481 if (flags
& NDR_IN
) {
26482 ZERO_STRUCT(r
->out
);
26484 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26485 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26487 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26488 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26489 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26490 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
26491 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
26492 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
26493 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
26494 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
));
26496 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
26497 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
));
26498 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
26499 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26500 ZERO_STRUCTP(r
->out
.needed
);
26501 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
26502 ZERO_STRUCTP(r
->out
.count
);
26504 if (flags
& NDR_OUT
) {
26505 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->out
.info
));
26506 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26507 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26509 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26510 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
26511 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
26512 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
26513 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26514 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
26516 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26517 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
26518 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
26519 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
26520 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26522 return NDR_ERR_SUCCESS
;
26525 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrinterDataEx
*r
)
26527 uint32_t cntr_info_0
;
26528 if (flags
& NDR_IN
) {
26529 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
26531 if (flags
& NDR_OUT
) {
26532 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
26533 NDR_CHECK(ndr_push_spoolss_PrinterEnumValues(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
26535 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
26536 NDR_CHECK(ndr_push_spoolss_PrinterEnumValues(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
26539 return NDR_ERR_SUCCESS
;
26542 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrinterDataEx
*r
)
26544 uint32_t cntr_info_0
;
26545 TALLOC_CTX
*_mem_save_info_0
;
26546 if (flags
& NDR_IN
) {
26547 ZERO_STRUCT(r
->out
);
26549 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
26551 if (flags
& NDR_OUT
) {
26552 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
26553 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26554 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
26555 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
26556 NDR_CHECK(ndr_pull_spoolss_PrinterEnumValues(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
26558 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
26559 NDR_CHECK(ndr_pull_spoolss_PrinterEnumValues(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
26561 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
26563 return NDR_ERR_SUCCESS
;
26566 _PUBLIC_
void ndr_print_spoolss_EnumPrinterDataEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinterDataEx
*r
)
26568 uint32_t cntr_info_2
;
26569 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinterDataEx");
26571 if (flags
& NDR_SET_VALUES
) {
26572 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26574 if (flags
& NDR_IN
) {
26575 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinterDataEx");
26577 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26579 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26581 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
26582 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
26585 if (flags
& NDR_OUT
) {
26586 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinterDataEx");
26588 ndr_print_ptr(ndr
, "count", r
->out
.count
);
26590 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
26592 ndr_print_ptr(ndr
, "info", r
->out
.info
);
26594 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
26596 if (*r
->out
.info
) {
26597 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
26599 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
26601 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
26602 ndr_print_spoolss_PrinterEnumValues(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
26610 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
26612 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
26614 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26620 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_EnumPrinterKey(struct ndr_push
*ndr
, int flags
, const struct spoolss_EnumPrinterKey
*r
)
26622 if (flags
& NDR_IN
) {
26623 if (r
->in
.handle
== NULL
) {
26624 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26626 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26627 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26628 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26629 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26630 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
));
26631 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
26633 if (flags
& NDR_OUT
) {
26635 uint32_t _flags_save_string_array
= ndr
->flags
;
26636 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
26637 if (r
->out
.key_buffer
== NULL
) {
26638 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26640 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.key_buffer
));
26641 if (*r
->out
.key_buffer
) {
26643 struct ndr_push
*_ndr_key_buffer
;
26644 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_key_buffer
, 0, r
->in
.offered
));
26645 NDR_CHECK(ndr_push_string_array(_ndr_key_buffer
, NDR_SCALARS
, *r
->out
.key_buffer
));
26646 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_key_buffer
, 0, r
->in
.offered
));
26649 ndr
->flags
= _flags_save_string_array
;
26651 if (r
->out
.needed
== NULL
) {
26652 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
26655 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26657 return NDR_ERR_SUCCESS
;
26660 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_EnumPrinterKey(struct ndr_pull
*ndr
, int flags
, struct spoolss_EnumPrinterKey
*r
)
26662 uint32_t _ptr_key_buffer
;
26663 TALLOC_CTX
*_mem_save_handle_0
;
26664 TALLOC_CTX
*_mem_save_key_buffer_0
;
26665 TALLOC_CTX
*_mem_save_key_buffer_1
;
26666 TALLOC_CTX
*_mem_save_needed_0
;
26667 if (flags
& NDR_IN
) {
26668 ZERO_STRUCT(r
->out
);
26670 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26671 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26673 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26674 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26675 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26676 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
26677 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
26678 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
26679 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
26680 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
));
26682 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
26683 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
));
26684 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
26685 NDR_PULL_ALLOC(ndr
, r
->out
.key_buffer
);
26686 ZERO_STRUCTP(r
->out
.key_buffer
);
26687 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26688 ZERO_STRUCTP(r
->out
.needed
);
26690 if (flags
& NDR_OUT
) {
26692 uint32_t _flags_save_string_array
= ndr
->flags
;
26693 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
26694 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26695 NDR_PULL_ALLOC(ndr
, r
->out
.key_buffer
);
26697 _mem_save_key_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26698 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.key_buffer
, LIBNDR_FLAG_REF_ALLOC
);
26699 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_key_buffer
));
26700 if (_ptr_key_buffer
) {
26701 NDR_PULL_ALLOC(ndr
, *r
->out
.key_buffer
);
26703 *r
->out
.key_buffer
= NULL
;
26705 if (*r
->out
.key_buffer
) {
26706 _mem_save_key_buffer_1
= NDR_PULL_GET_MEM_CTX(ndr
);
26707 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.key_buffer
, 0);
26709 struct ndr_pull
*_ndr_key_buffer
;
26710 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_key_buffer
, 0, r
->in
.offered
));
26711 NDR_CHECK(ndr_pull_string_array(_ndr_key_buffer
, NDR_SCALARS
, r
->out
.key_buffer
));
26712 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_key_buffer
, 0, r
->in
.offered
));
26714 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_key_buffer_1
, 0);
26716 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_key_buffer_0
, LIBNDR_FLAG_REF_ALLOC
);
26717 ndr
->flags
= _flags_save_string_array
;
26719 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26720 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26722 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26723 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
26724 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
26725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
26726 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26728 return NDR_ERR_SUCCESS
;
26731 _PUBLIC_
void ndr_print_spoolss_EnumPrinterKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinterKey
*r
)
26733 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinterKey");
26735 if (flags
& NDR_SET_VALUES
) {
26736 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26738 if (flags
& NDR_IN
) {
26739 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinterKey");
26741 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26743 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26745 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
26746 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
26749 if (flags
& NDR_OUT
) {
26750 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinterKey");
26752 ndr_print_ptr(ndr
, "key_buffer", r
->out
.key_buffer
);
26754 ndr_print_ptr(ndr
, "key_buffer", *r
->out
.key_buffer
);
26756 if (*r
->out
.key_buffer
) {
26757 ndr_print_string_array(ndr
, "key_buffer", *r
->out
.key_buffer
);
26761 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
26763 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
26765 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26771 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterDataEx
*r
)
26773 if (flags
& NDR_IN
) {
26774 if (r
->in
.handle
== NULL
) {
26775 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26777 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26778 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26779 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26780 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
26781 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
));
26782 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
26783 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26784 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
26785 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
));
26787 if (flags
& NDR_OUT
) {
26788 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26790 return NDR_ERR_SUCCESS
;
26793 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterDataEx
*r
)
26795 TALLOC_CTX
*_mem_save_handle_0
;
26796 if (flags
& NDR_IN
) {
26797 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26798 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26800 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26801 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26802 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26803 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
26804 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
26805 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
26806 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
26807 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
));
26809 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
26810 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
));
26811 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
26812 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
26813 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
26814 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
));
26816 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
26817 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
));
26819 if (flags
& NDR_OUT
) {
26820 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26822 return NDR_ERR_SUCCESS
;
26825 _PUBLIC_
void ndr_print_spoolss_DeletePrinterDataEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterDataEx
*r
)
26827 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterDataEx");
26829 if (flags
& NDR_SET_VALUES
) {
26830 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26832 if (flags
& NDR_IN
) {
26833 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterDataEx");
26835 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26837 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26839 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
26840 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
26843 if (flags
& NDR_OUT
) {
26844 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterDataEx");
26846 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26852 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterKey(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterKey
*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
.key_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
.key_name
, CH_UTF16
)));
26862 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
));
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_DeletePrinterKey(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterKey
*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
.key_name
));
26882 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
26883 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_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
.key_name
), ndr_get_array_length(ndr
, &r
->in
.key_name
));
26886 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
26887 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
));
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_DeletePrinterKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterKey
*r
)
26897 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterKey");
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_DeletePrinterKey");
26905 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26907 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26909 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
26912 if (flags
& NDR_OUT
) {
26913 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterKey");
26915 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26921 static enum ndr_err_code
ndr_push_spoolss_53(struct ndr_push
*ndr
, int flags
, const struct spoolss_53
*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_53(struct ndr_pull
*ndr
, int flags
, struct spoolss_53
*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_53(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_53
*r
)
26943 ndr_print_struct(ndr
, name
, "spoolss_53");
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_53");
26953 if (flags
& NDR_OUT
) {
26954 ndr_print_struct(ndr
, "out", "spoolss_53");
26956 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26962 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterDriverEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterDriverEx
*r
)
26964 if (flags
& NDR_IN
) {
26965 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
26966 if (r
->in
.server
) {
26967 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
26968 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26969 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
26970 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
26972 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
26973 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26974 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
26975 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
26976 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.driver
, CH_UTF16
)));
26977 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
26978 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.driver
, CH_UTF16
)));
26979 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.driver
, ndr_charset_length(r
->in
.driver
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
26980 NDR_CHECK(ndr_push_spoolss_DeleteDriverFlags(ndr
, NDR_SCALARS
, r
->in
.delete_flags
));
26981 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.version
));
26983 if (flags
& NDR_OUT
) {
26984 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26986 return NDR_ERR_SUCCESS
;
26989 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterDriverEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterDriverEx
*r
)
26991 uint32_t _ptr_server
;
26992 TALLOC_CTX
*_mem_save_server_0
;
26993 if (flags
& NDR_IN
) {
26994 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
26996 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
26998 r
->in
.server
= NULL
;
27000 if (r
->in
.server
) {
27001 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27002 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
27003 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
27004 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
27005 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
27006 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
));
27008 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
27009 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
27010 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
27012 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
27013 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
27014 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
27015 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
));
27017 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
27018 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
27019 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.driver
));
27020 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.driver
));
27021 if (ndr_get_array_length(ndr
, &r
->in
.driver
) > ndr_get_array_size(ndr
, &r
->in
.driver
)) {
27022 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
));
27024 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.driver
), sizeof(uint16_t)));
27025 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.driver
, ndr_get_array_length(ndr
, &r
->in
.driver
), sizeof(uint16_t), CH_UTF16
));
27026 NDR_CHECK(ndr_pull_spoolss_DeleteDriverFlags(ndr
, NDR_SCALARS
, &r
->in
.delete_flags
));
27027 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.version
));
27029 if (flags
& NDR_OUT
) {
27030 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27032 return NDR_ERR_SUCCESS
;
27035 _PUBLIC_
void ndr_print_spoolss_DeletePrinterDriverEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterDriverEx
*r
)
27037 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterDriverEx");
27039 if (flags
& NDR_SET_VALUES
) {
27040 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27042 if (flags
& NDR_IN
) {
27043 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterDriverEx");
27045 ndr_print_ptr(ndr
, "server", r
->in
.server
);
27047 if (r
->in
.server
) {
27048 ndr_print_string(ndr
, "server", r
->in
.server
);
27051 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
27052 ndr_print_string(ndr
, "driver", r
->in
.driver
);
27053 ndr_print_spoolss_DeleteDriverFlags(ndr
, "delete_flags", r
->in
.delete_flags
);
27054 ndr_print_uint32(ndr
, "version", r
->in
.version
);
27057 if (flags
& NDR_OUT
) {
27058 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterDriverEx");
27060 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27066 static enum ndr_err_code
ndr_push_spoolss_55(struct ndr_push
*ndr
, int flags
, const struct spoolss_55
*r
)
27068 if (flags
& NDR_IN
) {
27070 if (flags
& NDR_OUT
) {
27071 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27073 return NDR_ERR_SUCCESS
;
27076 static enum ndr_err_code
ndr_pull_spoolss_55(struct ndr_pull
*ndr
, int flags
, struct spoolss_55
*r
)
27078 if (flags
& NDR_IN
) {
27080 if (flags
& NDR_OUT
) {
27081 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27083 return NDR_ERR_SUCCESS
;
27086 _PUBLIC_
void ndr_print_spoolss_55(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_55
*r
)
27088 ndr_print_struct(ndr
, name
, "spoolss_55");
27090 if (flags
& NDR_SET_VALUES
) {
27091 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27093 if (flags
& NDR_IN
) {
27094 ndr_print_struct(ndr
, "in", "spoolss_55");
27098 if (flags
& NDR_OUT
) {
27099 ndr_print_struct(ndr
, "out", "spoolss_55");
27101 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27107 static enum ndr_err_code
ndr_push_spoolss_56(struct ndr_push
*ndr
, int flags
, const struct spoolss_56
*r
)
27109 if (flags
& NDR_IN
) {
27111 if (flags
& NDR_OUT
) {
27112 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27114 return NDR_ERR_SUCCESS
;
27117 static enum ndr_err_code
ndr_pull_spoolss_56(struct ndr_pull
*ndr
, int flags
, struct spoolss_56
*r
)
27119 if (flags
& NDR_IN
) {
27121 if (flags
& NDR_OUT
) {
27122 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27124 return NDR_ERR_SUCCESS
;
27127 _PUBLIC_
void ndr_print_spoolss_56(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_56
*r
)
27129 ndr_print_struct(ndr
, name
, "spoolss_56");
27131 if (flags
& NDR_SET_VALUES
) {
27132 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27134 if (flags
& NDR_IN
) {
27135 ndr_print_struct(ndr
, "in", "spoolss_56");
27139 if (flags
& NDR_OUT
) {
27140 ndr_print_struct(ndr
, "out", "spoolss_56");
27142 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27148 static enum ndr_err_code
ndr_push_spoolss_57(struct ndr_push
*ndr
, int flags
, const struct spoolss_57
*r
)
27150 if (flags
& NDR_IN
) {
27152 if (flags
& NDR_OUT
) {
27153 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27155 return NDR_ERR_SUCCESS
;
27158 static enum ndr_err_code
ndr_pull_spoolss_57(struct ndr_pull
*ndr
, int flags
, struct spoolss_57
*r
)
27160 if (flags
& NDR_IN
) {
27162 if (flags
& NDR_OUT
) {
27163 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27165 return NDR_ERR_SUCCESS
;
27168 _PUBLIC_
void ndr_print_spoolss_57(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_57
*r
)
27170 ndr_print_struct(ndr
, name
, "spoolss_57");
27172 if (flags
& NDR_SET_VALUES
) {
27173 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27175 if (flags
& NDR_IN
) {
27176 ndr_print_struct(ndr
, "in", "spoolss_57");
27180 if (flags
& NDR_OUT
) {
27181 ndr_print_struct(ndr
, "out", "spoolss_57");
27183 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27189 static enum ndr_err_code
ndr_push_spoolss_XcvData(struct ndr_push
*ndr
, int flags
, const struct spoolss_XcvData
*r
)
27191 if (flags
& NDR_IN
) {
27192 if (r
->in
.handle
== NULL
) {
27193 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27195 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27196 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.function_name
, CH_UTF16
)));
27197 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
27198 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.function_name
, CH_UTF16
)));
27199 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
));
27200 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.in_data
));
27201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.in_data
.length
));
27202 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.out_data_size
));
27203 if (r
->in
.status_code
== NULL
) {
27204 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27206 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.status_code
));
27208 if (flags
& NDR_OUT
) {
27209 if (r
->out
.out_data
== NULL
) {
27210 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27212 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.out_data_size
));
27213 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.out_data
, r
->in
.out_data_size
));
27214 if (r
->out
.needed
== NULL
) {
27215 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27217 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
27218 if (r
->out
.status_code
== NULL
) {
27219 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27221 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.status_code
));
27222 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27224 return NDR_ERR_SUCCESS
;
27227 static enum ndr_err_code
ndr_pull_spoolss_XcvData(struct ndr_pull
*ndr
, int flags
, struct spoolss_XcvData
*r
)
27229 TALLOC_CTX
*_mem_save_handle_0
;
27230 TALLOC_CTX
*_mem_save_needed_0
;
27231 TALLOC_CTX
*_mem_save_status_code_0
;
27232 if (flags
& NDR_IN
) {
27233 ZERO_STRUCT(r
->out
);
27235 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27236 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
27238 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27239 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27240 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27241 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27242 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.function_name
));
27243 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.function_name
));
27244 if (ndr_get_array_length(ndr
, &r
->in
.function_name
) > ndr_get_array_size(ndr
, &r
->in
.function_name
)) {
27245 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
));
27247 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.function_name
), sizeof(uint16_t)));
27248 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
));
27249 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->in
.in_data
));
27250 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
._in_data_length
));
27251 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.out_data_size
));
27252 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27253 NDR_PULL_ALLOC(ndr
, r
->in
.status_code
);
27255 _mem_save_status_code_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27256 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.status_code
, LIBNDR_FLAG_REF_ALLOC
);
27257 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.status_code
));
27258 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_status_code_0
, LIBNDR_FLAG_REF_ALLOC
);
27259 NDR_PULL_ALLOC_N(ndr
, r
->out
.out_data
, r
->in
.out_data_size
);
27260 memset(r
->out
.out_data
, 0, (r
->in
.out_data_size
) * sizeof(*r
->out
.out_data
));
27261 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
27262 ZERO_STRUCTP(r
->out
.needed
);
27263 NDR_PULL_ALLOC(ndr
, r
->out
.status_code
);
27264 *r
->out
.status_code
= *r
->in
.status_code
;
27266 if (flags
& NDR_OUT
) {
27267 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.out_data
));
27268 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27269 NDR_PULL_ALLOC_N(ndr
, r
->out
.out_data
, ndr_get_array_size(ndr
, &r
->out
.out_data
));
27271 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.out_data
, ndr_get_array_size(ndr
, &r
->out
.out_data
)));
27272 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27273 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
27275 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27276 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
27277 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
27278 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
27279 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27280 NDR_PULL_ALLOC(ndr
, r
->out
.status_code
);
27282 _mem_save_status_code_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27283 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.status_code
, LIBNDR_FLAG_REF_ALLOC
);
27284 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.status_code
));
27285 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_status_code_0
, LIBNDR_FLAG_REF_ALLOC
);
27286 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27287 if (r
->out
.out_data
) {
27288 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.out_data
, r
->in
.out_data_size
));
27291 return NDR_ERR_SUCCESS
;
27294 _PUBLIC_
void ndr_print_spoolss_XcvData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_XcvData
*r
)
27296 ndr_print_struct(ndr
, name
, "spoolss_XcvData");
27298 if (flags
& NDR_SET_VALUES
) {
27299 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27301 if (flags
& NDR_IN
) {
27302 ndr_print_struct(ndr
, "in", "spoolss_XcvData");
27304 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
27306 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
27308 ndr_print_string(ndr
, "function_name", r
->in
.function_name
);
27309 ndr_print_DATA_BLOB(ndr
, "in_data", r
->in
.in_data
);
27310 ndr_print_uint32(ndr
, "_in_data_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->in
.in_data
.length
:r
->in
._in_data_length
);
27311 ndr_print_uint32(ndr
, "out_data_size", r
->in
.out_data_size
);
27312 ndr_print_ptr(ndr
, "status_code", r
->in
.status_code
);
27314 ndr_print_uint32(ndr
, "status_code", *r
->in
.status_code
);
27318 if (flags
& NDR_OUT
) {
27319 ndr_print_struct(ndr
, "out", "spoolss_XcvData");
27321 ndr_print_ptr(ndr
, "out_data", r
->out
.out_data
);
27323 ndr_print_array_uint8(ndr
, "out_data", r
->out
.out_data
, r
->in
.out_data_size
);
27325 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
27327 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
27329 ndr_print_ptr(ndr
, "status_code", r
->out
.status_code
);
27331 ndr_print_uint32(ndr
, "status_code", *r
->out
.status_code
);
27333 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27339 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_AddPrinterDriverEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinterDriverEx
*r
)
27341 if (flags
& NDR_IN
) {
27342 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
27343 if (r
->in
.servername
) {
27344 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
27345 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0));
27346 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
27347 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
27349 if (r
->in
.info_ctr
== NULL
) {
27350 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27352 NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
27353 NDR_CHECK(ndr_push_spoolss_AddPrinterDriverExFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
27355 if (flags
& NDR_OUT
) {
27356 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27358 return NDR_ERR_SUCCESS
;
27361 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_AddPrinterDriverEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinterDriverEx
*r
)
27363 uint32_t _ptr_servername
;
27364 TALLOC_CTX
*_mem_save_servername_0
;
27365 TALLOC_CTX
*_mem_save_info_ctr_0
;
27366 if (flags
& NDR_IN
) {
27367 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
27368 if (_ptr_servername
) {
27369 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
27371 r
->in
.servername
= NULL
;
27373 if (r
->in
.servername
) {
27374 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27375 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
27376 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
27377 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
27378 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
27379 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
));
27381 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
27382 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
27383 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
27385 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27386 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
27388 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27389 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
27390 NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
27391 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
27392 NDR_CHECK(ndr_pull_spoolss_AddPrinterDriverExFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
27394 if (flags
& NDR_OUT
) {
27395 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27397 return NDR_ERR_SUCCESS
;
27400 _PUBLIC_
void ndr_print_spoolss_AddPrinterDriverEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinterDriverEx
*r
)
27402 ndr_print_struct(ndr
, name
, "spoolss_AddPrinterDriverEx");
27404 if (flags
& NDR_SET_VALUES
) {
27405 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27407 if (flags
& NDR_IN
) {
27408 ndr_print_struct(ndr
, "in", "spoolss_AddPrinterDriverEx");
27410 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
27412 if (r
->in
.servername
) {
27413 ndr_print_string(ndr
, "servername", r
->in
.servername
);
27416 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
27418 ndr_print_spoolss_AddDriverInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
27420 ndr_print_spoolss_AddPrinterDriverExFlags(ndr
, "flags", r
->in
.flags
);
27423 if (flags
& NDR_OUT
) {
27424 ndr_print_struct(ndr
, "out", "spoolss_AddPrinterDriverEx");
27426 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27432 static enum ndr_err_code
ndr_push_spoolss_5a(struct ndr_push
*ndr
, int flags
, const struct spoolss_5a
*r
)
27434 if (flags
& NDR_IN
) {
27436 if (flags
& NDR_OUT
) {
27437 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27439 return NDR_ERR_SUCCESS
;
27442 static enum ndr_err_code
ndr_pull_spoolss_5a(struct ndr_pull
*ndr
, int flags
, struct spoolss_5a
*r
)
27444 if (flags
& NDR_IN
) {
27446 if (flags
& NDR_OUT
) {
27447 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27449 return NDR_ERR_SUCCESS
;
27452 _PUBLIC_
void ndr_print_spoolss_5a(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5a
*r
)
27454 ndr_print_struct(ndr
, name
, "spoolss_5a");
27456 if (flags
& NDR_SET_VALUES
) {
27457 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27459 if (flags
& NDR_IN
) {
27460 ndr_print_struct(ndr
, "in", "spoolss_5a");
27464 if (flags
& NDR_OUT
) {
27465 ndr_print_struct(ndr
, "out", "spoolss_5a");
27467 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27473 static enum ndr_err_code
ndr_push_spoolss_5b(struct ndr_push
*ndr
, int flags
, const struct spoolss_5b
*r
)
27475 if (flags
& NDR_IN
) {
27477 if (flags
& NDR_OUT
) {
27478 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27480 return NDR_ERR_SUCCESS
;
27483 static enum ndr_err_code
ndr_pull_spoolss_5b(struct ndr_pull
*ndr
, int flags
, struct spoolss_5b
*r
)
27485 if (flags
& NDR_IN
) {
27487 if (flags
& NDR_OUT
) {
27488 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27490 return NDR_ERR_SUCCESS
;
27493 _PUBLIC_
void ndr_print_spoolss_5b(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5b
*r
)
27495 ndr_print_struct(ndr
, name
, "spoolss_5b");
27497 if (flags
& NDR_SET_VALUES
) {
27498 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27500 if (flags
& NDR_IN
) {
27501 ndr_print_struct(ndr
, "in", "spoolss_5b");
27505 if (flags
& NDR_OUT
) {
27506 ndr_print_struct(ndr
, "out", "spoolss_5b");
27508 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27514 static enum ndr_err_code
ndr_push_spoolss_5c(struct ndr_push
*ndr
, int flags
, const struct spoolss_5c
*r
)
27516 if (flags
& NDR_IN
) {
27518 if (flags
& NDR_OUT
) {
27519 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27521 return NDR_ERR_SUCCESS
;
27524 static enum ndr_err_code
ndr_pull_spoolss_5c(struct ndr_pull
*ndr
, int flags
, struct spoolss_5c
*r
)
27526 if (flags
& NDR_IN
) {
27528 if (flags
& NDR_OUT
) {
27529 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27531 return NDR_ERR_SUCCESS
;
27534 _PUBLIC_
void ndr_print_spoolss_5c(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5c
*r
)
27536 ndr_print_struct(ndr
, name
, "spoolss_5c");
27538 if (flags
& NDR_SET_VALUES
) {
27539 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27541 if (flags
& NDR_IN
) {
27542 ndr_print_struct(ndr
, "in", "spoolss_5c");
27546 if (flags
& NDR_OUT
) {
27547 ndr_print_struct(ndr
, "out", "spoolss_5c");
27549 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27555 static enum ndr_err_code
ndr_push_spoolss_5d(struct ndr_push
*ndr
, int flags
, const struct spoolss_5d
*r
)
27557 if (flags
& NDR_IN
) {
27559 if (flags
& NDR_OUT
) {
27560 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27562 return NDR_ERR_SUCCESS
;
27565 static enum ndr_err_code
ndr_pull_spoolss_5d(struct ndr_pull
*ndr
, int flags
, struct spoolss_5d
*r
)
27567 if (flags
& NDR_IN
) {
27569 if (flags
& NDR_OUT
) {
27570 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27572 return NDR_ERR_SUCCESS
;
27575 _PUBLIC_
void ndr_print_spoolss_5d(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5d
*r
)
27577 ndr_print_struct(ndr
, name
, "spoolss_5d");
27579 if (flags
& NDR_SET_VALUES
) {
27580 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27582 if (flags
& NDR_IN
) {
27583 ndr_print_struct(ndr
, "in", "spoolss_5d");
27587 if (flags
& NDR_OUT
) {
27588 ndr_print_struct(ndr
, "out", "spoolss_5d");
27590 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27596 static enum ndr_err_code
ndr_push_spoolss_5e(struct ndr_push
*ndr
, int flags
, const struct spoolss_5e
*r
)
27598 if (flags
& NDR_IN
) {
27600 if (flags
& NDR_OUT
) {
27601 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27603 return NDR_ERR_SUCCESS
;
27606 static enum ndr_err_code
ndr_pull_spoolss_5e(struct ndr_pull
*ndr
, int flags
, struct spoolss_5e
*r
)
27608 if (flags
& NDR_IN
) {
27610 if (flags
& NDR_OUT
) {
27611 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27613 return NDR_ERR_SUCCESS
;
27616 _PUBLIC_
void ndr_print_spoolss_5e(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5e
*r
)
27618 ndr_print_struct(ndr
, name
, "spoolss_5e");
27620 if (flags
& NDR_SET_VALUES
) {
27621 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27623 if (flags
& NDR_IN
) {
27624 ndr_print_struct(ndr
, "in", "spoolss_5e");
27628 if (flags
& NDR_OUT
) {
27629 ndr_print_struct(ndr
, "out", "spoolss_5e");
27631 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27637 static enum ndr_err_code
ndr_push_spoolss_5f(struct ndr_push
*ndr
, int flags
, const struct spoolss_5f
*r
)
27639 if (flags
& NDR_IN
) {
27641 if (flags
& NDR_OUT
) {
27642 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27644 return NDR_ERR_SUCCESS
;
27647 static enum ndr_err_code
ndr_pull_spoolss_5f(struct ndr_pull
*ndr
, int flags
, struct spoolss_5f
*r
)
27649 if (flags
& NDR_IN
) {
27651 if (flags
& NDR_OUT
) {
27652 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27654 return NDR_ERR_SUCCESS
;
27657 _PUBLIC_
void ndr_print_spoolss_5f(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5f
*r
)
27659 ndr_print_struct(ndr
, name
, "spoolss_5f");
27661 if (flags
& NDR_SET_VALUES
) {
27662 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27664 if (flags
& NDR_IN
) {
27665 ndr_print_struct(ndr
, "in", "spoolss_5f");
27669 if (flags
& NDR_OUT
) {
27670 ndr_print_struct(ndr
, "out", "spoolss_5f");
27672 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27678 static const struct ndr_interface_call spoolss_calls
[] = {
27680 "spoolss_EnumPrinters",
27681 sizeof(struct spoolss_EnumPrinters
),
27682 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinters
,
27683 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinters
,
27684 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinters
,
27688 "spoolss_OpenPrinter",
27689 sizeof(struct spoolss_OpenPrinter
),
27690 (ndr_push_flags_fn_t
) ndr_push_spoolss_OpenPrinter
,
27691 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_OpenPrinter
,
27692 (ndr_print_function_t
) ndr_print_spoolss_OpenPrinter
,
27697 sizeof(struct spoolss_SetJob
),
27698 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetJob
,
27699 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetJob
,
27700 (ndr_print_function_t
) ndr_print_spoolss_SetJob
,
27705 sizeof(struct spoolss_GetJob
),
27706 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetJob
,
27707 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetJob
,
27708 (ndr_print_function_t
) ndr_print_spoolss_GetJob
,
27712 "spoolss_EnumJobs",
27713 sizeof(struct spoolss_EnumJobs
),
27714 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumJobs
,
27715 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumJobs
,
27716 (ndr_print_function_t
) ndr_print_spoolss_EnumJobs
,
27720 "spoolss_AddPrinter",
27721 sizeof(struct spoolss_AddPrinter
),
27722 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinter
,
27723 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinter
,
27724 (ndr_print_function_t
) ndr_print_spoolss_AddPrinter
,
27728 "spoolss_DeletePrinter",
27729 sizeof(struct spoolss_DeletePrinter
),
27730 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinter
,
27731 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinter
,
27732 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinter
,
27736 "spoolss_SetPrinter",
27737 sizeof(struct spoolss_SetPrinter
),
27738 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetPrinter
,
27739 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetPrinter
,
27740 (ndr_print_function_t
) ndr_print_spoolss_SetPrinter
,
27744 "spoolss_GetPrinter",
27745 sizeof(struct spoolss_GetPrinter
),
27746 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinter
,
27747 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinter
,
27748 (ndr_print_function_t
) ndr_print_spoolss_GetPrinter
,
27752 "spoolss_AddPrinterDriver",
27753 sizeof(struct spoolss_AddPrinterDriver
),
27754 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinterDriver
,
27755 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinterDriver
,
27756 (ndr_print_function_t
) ndr_print_spoolss_AddPrinterDriver
,
27760 "spoolss_EnumPrinterDrivers",
27761 sizeof(struct spoolss_EnumPrinterDrivers
),
27762 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinterDrivers
,
27763 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinterDrivers
,
27764 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinterDrivers
,
27768 "spoolss_GetPrinterDriver",
27769 sizeof(struct spoolss_GetPrinterDriver
),
27770 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDriver
,
27771 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDriver
,
27772 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDriver
,
27776 "spoolss_GetPrinterDriverDirectory",
27777 sizeof(struct spoolss_GetPrinterDriverDirectory
),
27778 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDriverDirectory
,
27779 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDriverDirectory
,
27780 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDriverDirectory
,
27784 "spoolss_DeletePrinterDriver",
27785 sizeof(struct spoolss_DeletePrinterDriver
),
27786 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterDriver
,
27787 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterDriver
,
27788 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterDriver
,
27792 "spoolss_AddPrintProcessor",
27793 sizeof(struct spoolss_AddPrintProcessor
),
27794 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrintProcessor
,
27795 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrintProcessor
,
27796 (ndr_print_function_t
) ndr_print_spoolss_AddPrintProcessor
,
27800 "spoolss_EnumPrintProcessors",
27801 sizeof(struct spoolss_EnumPrintProcessors
),
27802 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrintProcessors
,
27803 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrintProcessors
,
27804 (ndr_print_function_t
) ndr_print_spoolss_EnumPrintProcessors
,
27808 "spoolss_GetPrintProcessorDirectory",
27809 sizeof(struct spoolss_GetPrintProcessorDirectory
),
27810 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrintProcessorDirectory
,
27811 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrintProcessorDirectory
,
27812 (ndr_print_function_t
) ndr_print_spoolss_GetPrintProcessorDirectory
,
27816 "spoolss_StartDocPrinter",
27817 sizeof(struct spoolss_StartDocPrinter
),
27818 (ndr_push_flags_fn_t
) ndr_push_spoolss_StartDocPrinter
,
27819 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_StartDocPrinter
,
27820 (ndr_print_function_t
) ndr_print_spoolss_StartDocPrinter
,
27824 "spoolss_StartPagePrinter",
27825 sizeof(struct spoolss_StartPagePrinter
),
27826 (ndr_push_flags_fn_t
) ndr_push_spoolss_StartPagePrinter
,
27827 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_StartPagePrinter
,
27828 (ndr_print_function_t
) ndr_print_spoolss_StartPagePrinter
,
27832 "spoolss_WritePrinter",
27833 sizeof(struct spoolss_WritePrinter
),
27834 (ndr_push_flags_fn_t
) ndr_push_spoolss_WritePrinter
,
27835 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_WritePrinter
,
27836 (ndr_print_function_t
) ndr_print_spoolss_WritePrinter
,
27840 "spoolss_EndPagePrinter",
27841 sizeof(struct spoolss_EndPagePrinter
),
27842 (ndr_push_flags_fn_t
) ndr_push_spoolss_EndPagePrinter
,
27843 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EndPagePrinter
,
27844 (ndr_print_function_t
) ndr_print_spoolss_EndPagePrinter
,
27848 "spoolss_AbortPrinter",
27849 sizeof(struct spoolss_AbortPrinter
),
27850 (ndr_push_flags_fn_t
) ndr_push_spoolss_AbortPrinter
,
27851 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AbortPrinter
,
27852 (ndr_print_function_t
) ndr_print_spoolss_AbortPrinter
,
27856 "spoolss_ReadPrinter",
27857 sizeof(struct spoolss_ReadPrinter
),
27858 (ndr_push_flags_fn_t
) ndr_push_spoolss_ReadPrinter
,
27859 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ReadPrinter
,
27860 (ndr_print_function_t
) ndr_print_spoolss_ReadPrinter
,
27864 "spoolss_EndDocPrinter",
27865 sizeof(struct spoolss_EndDocPrinter
),
27866 (ndr_push_flags_fn_t
) ndr_push_spoolss_EndDocPrinter
,
27867 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EndDocPrinter
,
27868 (ndr_print_function_t
) ndr_print_spoolss_EndDocPrinter
,
27873 sizeof(struct spoolss_AddJob
),
27874 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddJob
,
27875 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddJob
,
27876 (ndr_print_function_t
) ndr_print_spoolss_AddJob
,
27880 "spoolss_ScheduleJob",
27881 sizeof(struct spoolss_ScheduleJob
),
27882 (ndr_push_flags_fn_t
) ndr_push_spoolss_ScheduleJob
,
27883 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ScheduleJob
,
27884 (ndr_print_function_t
) ndr_print_spoolss_ScheduleJob
,
27888 "spoolss_GetPrinterData",
27889 sizeof(struct spoolss_GetPrinterData
),
27890 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterData
,
27891 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterData
,
27892 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterData
,
27896 "spoolss_SetPrinterData",
27897 sizeof(struct spoolss_SetPrinterData
),
27898 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetPrinterData
,
27899 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetPrinterData
,
27900 (ndr_print_function_t
) ndr_print_spoolss_SetPrinterData
,
27904 "spoolss_WaitForPrinterChange",
27905 sizeof(struct spoolss_WaitForPrinterChange
),
27906 (ndr_push_flags_fn_t
) ndr_push_spoolss_WaitForPrinterChange
,
27907 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_WaitForPrinterChange
,
27908 (ndr_print_function_t
) ndr_print_spoolss_WaitForPrinterChange
,
27912 "spoolss_ClosePrinter",
27913 sizeof(struct spoolss_ClosePrinter
),
27914 (ndr_push_flags_fn_t
) ndr_push_spoolss_ClosePrinter
,
27915 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ClosePrinter
,
27916 (ndr_print_function_t
) ndr_print_spoolss_ClosePrinter
,
27921 sizeof(struct spoolss_AddForm
),
27922 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddForm
,
27923 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddForm
,
27924 (ndr_print_function_t
) ndr_print_spoolss_AddForm
,
27928 "spoolss_DeleteForm",
27929 sizeof(struct spoolss_DeleteForm
),
27930 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeleteForm
,
27931 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeleteForm
,
27932 (ndr_print_function_t
) ndr_print_spoolss_DeleteForm
,
27937 sizeof(struct spoolss_GetForm
),
27938 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetForm
,
27939 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetForm
,
27940 (ndr_print_function_t
) ndr_print_spoolss_GetForm
,
27945 sizeof(struct spoolss_SetForm
),
27946 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetForm
,
27947 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetForm
,
27948 (ndr_print_function_t
) ndr_print_spoolss_SetForm
,
27952 "spoolss_EnumForms",
27953 sizeof(struct spoolss_EnumForms
),
27954 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumForms
,
27955 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumForms
,
27956 (ndr_print_function_t
) ndr_print_spoolss_EnumForms
,
27960 "spoolss_EnumPorts",
27961 sizeof(struct spoolss_EnumPorts
),
27962 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPorts
,
27963 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPorts
,
27964 (ndr_print_function_t
) ndr_print_spoolss_EnumPorts
,
27968 "spoolss_EnumMonitors",
27969 sizeof(struct spoolss_EnumMonitors
),
27970 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumMonitors
,
27971 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumMonitors
,
27972 (ndr_print_function_t
) ndr_print_spoolss_EnumMonitors
,
27977 sizeof(struct spoolss_AddPort
),
27978 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPort
,
27979 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPort
,
27980 (ndr_print_function_t
) ndr_print_spoolss_AddPort
,
27984 "spoolss_ConfigurePort",
27985 sizeof(struct spoolss_ConfigurePort
),
27986 (ndr_push_flags_fn_t
) ndr_push_spoolss_ConfigurePort
,
27987 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ConfigurePort
,
27988 (ndr_print_function_t
) ndr_print_spoolss_ConfigurePort
,
27992 "spoolss_DeletePort",
27993 sizeof(struct spoolss_DeletePort
),
27994 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePort
,
27995 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePort
,
27996 (ndr_print_function_t
) ndr_print_spoolss_DeletePort
,
28000 "spoolss_CreatePrinterIC",
28001 sizeof(struct spoolss_CreatePrinterIC
),
28002 (ndr_push_flags_fn_t
) ndr_push_spoolss_CreatePrinterIC
,
28003 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_CreatePrinterIC
,
28004 (ndr_print_function_t
) ndr_print_spoolss_CreatePrinterIC
,
28008 "spoolss_PlayGDIScriptOnPrinterIC",
28009 sizeof(struct spoolss_PlayGDIScriptOnPrinterIC
),
28010 (ndr_push_flags_fn_t
) ndr_push_spoolss_PlayGDIScriptOnPrinterIC
,
28011 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_PlayGDIScriptOnPrinterIC
,
28012 (ndr_print_function_t
) ndr_print_spoolss_PlayGDIScriptOnPrinterIC
,
28016 "spoolss_DeletePrinterIC",
28017 sizeof(struct spoolss_DeletePrinterIC
),
28018 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterIC
,
28019 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterIC
,
28020 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterIC
,
28024 "spoolss_AddPrinterConnection",
28025 sizeof(struct spoolss_AddPrinterConnection
),
28026 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinterConnection
,
28027 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinterConnection
,
28028 (ndr_print_function_t
) ndr_print_spoolss_AddPrinterConnection
,
28032 "spoolss_DeletePrinterConnection",
28033 sizeof(struct spoolss_DeletePrinterConnection
),
28034 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterConnection
,
28035 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterConnection
,
28036 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterConnection
,
28040 "spoolss_PrinterMessageBox",
28041 sizeof(struct spoolss_PrinterMessageBox
),
28042 (ndr_push_flags_fn_t
) ndr_push_spoolss_PrinterMessageBox
,
28043 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_PrinterMessageBox
,
28044 (ndr_print_function_t
) ndr_print_spoolss_PrinterMessageBox
,
28048 "spoolss_AddMonitor",
28049 sizeof(struct spoolss_AddMonitor
),
28050 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddMonitor
,
28051 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddMonitor
,
28052 (ndr_print_function_t
) ndr_print_spoolss_AddMonitor
,
28056 "spoolss_DeleteMonitor",
28057 sizeof(struct spoolss_DeleteMonitor
),
28058 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeleteMonitor
,
28059 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeleteMonitor
,
28060 (ndr_print_function_t
) ndr_print_spoolss_DeleteMonitor
,
28064 "spoolss_DeletePrintProcessor",
28065 sizeof(struct spoolss_DeletePrintProcessor
),
28066 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrintProcessor
,
28067 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrintProcessor
,
28068 (ndr_print_function_t
) ndr_print_spoolss_DeletePrintProcessor
,
28072 "spoolss_AddPrintProvidor",
28073 sizeof(struct spoolss_AddPrintProvidor
),
28074 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrintProvidor
,
28075 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrintProvidor
,
28076 (ndr_print_function_t
) ndr_print_spoolss_AddPrintProvidor
,
28080 "spoolss_DeletePrintProvidor",
28081 sizeof(struct spoolss_DeletePrintProvidor
),
28082 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrintProvidor
,
28083 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrintProvidor
,
28084 (ndr_print_function_t
) ndr_print_spoolss_DeletePrintProvidor
,
28088 "spoolss_EnumPrintProcDataTypes",
28089 sizeof(struct spoolss_EnumPrintProcDataTypes
),
28090 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrintProcDataTypes
,
28091 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrintProcDataTypes
,
28092 (ndr_print_function_t
) ndr_print_spoolss_EnumPrintProcDataTypes
,
28096 "spoolss_ResetPrinter",
28097 sizeof(struct spoolss_ResetPrinter
),
28098 (ndr_push_flags_fn_t
) ndr_push_spoolss_ResetPrinter
,
28099 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ResetPrinter
,
28100 (ndr_print_function_t
) ndr_print_spoolss_ResetPrinter
,
28104 "spoolss_GetPrinterDriver2",
28105 sizeof(struct spoolss_GetPrinterDriver2
),
28106 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDriver2
,
28107 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDriver2
,
28108 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDriver2
,
28112 "spoolss_FindFirstPrinterChangeNotification",
28113 sizeof(struct spoolss_FindFirstPrinterChangeNotification
),
28114 (ndr_push_flags_fn_t
) ndr_push_spoolss_FindFirstPrinterChangeNotification
,
28115 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_FindFirstPrinterChangeNotification
,
28116 (ndr_print_function_t
) ndr_print_spoolss_FindFirstPrinterChangeNotification
,
28120 "spoolss_FindNextPrinterChangeNotification",
28121 sizeof(struct spoolss_FindNextPrinterChangeNotification
),
28122 (ndr_push_flags_fn_t
) ndr_push_spoolss_FindNextPrinterChangeNotification
,
28123 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_FindNextPrinterChangeNotification
,
28124 (ndr_print_function_t
) ndr_print_spoolss_FindNextPrinterChangeNotification
,
28128 "spoolss_FindClosePrinterNotify",
28129 sizeof(struct spoolss_FindClosePrinterNotify
),
28130 (ndr_push_flags_fn_t
) ndr_push_spoolss_FindClosePrinterNotify
,
28131 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_FindClosePrinterNotify
,
28132 (ndr_print_function_t
) ndr_print_spoolss_FindClosePrinterNotify
,
28136 "spoolss_RouterFindFirstPrinterChangeNotificationOld",
28137 sizeof(struct spoolss_RouterFindFirstPrinterChangeNotificationOld
),
28138 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterFindFirstPrinterChangeNotificationOld
,
28139 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterFindFirstPrinterChangeNotificationOld
,
28140 (ndr_print_function_t
) ndr_print_spoolss_RouterFindFirstPrinterChangeNotificationOld
,
28144 "spoolss_ReplyOpenPrinter",
28145 sizeof(struct spoolss_ReplyOpenPrinter
),
28146 (ndr_push_flags_fn_t
) ndr_push_spoolss_ReplyOpenPrinter
,
28147 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ReplyOpenPrinter
,
28148 (ndr_print_function_t
) ndr_print_spoolss_ReplyOpenPrinter
,
28152 "spoolss_RouterReplyPrinter",
28153 sizeof(struct spoolss_RouterReplyPrinter
),
28154 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterReplyPrinter
,
28155 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterReplyPrinter
,
28156 (ndr_print_function_t
) ndr_print_spoolss_RouterReplyPrinter
,
28160 "spoolss_ReplyClosePrinter",
28161 sizeof(struct spoolss_ReplyClosePrinter
),
28162 (ndr_push_flags_fn_t
) ndr_push_spoolss_ReplyClosePrinter
,
28163 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ReplyClosePrinter
,
28164 (ndr_print_function_t
) ndr_print_spoolss_ReplyClosePrinter
,
28168 "spoolss_AddPortEx",
28169 sizeof(struct spoolss_AddPortEx
),
28170 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPortEx
,
28171 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPortEx
,
28172 (ndr_print_function_t
) ndr_print_spoolss_AddPortEx
,
28176 "spoolss_RouterFindFirstPrinterChangeNotification",
28177 sizeof(struct spoolss_RouterFindFirstPrinterChangeNotification
),
28178 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterFindFirstPrinterChangeNotification
,
28179 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterFindFirstPrinterChangeNotification
,
28180 (ndr_print_function_t
) ndr_print_spoolss_RouterFindFirstPrinterChangeNotification
,
28184 "spoolss_SpoolerInit",
28185 sizeof(struct spoolss_SpoolerInit
),
28186 (ndr_push_flags_fn_t
) ndr_push_spoolss_SpoolerInit
,
28187 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SpoolerInit
,
28188 (ndr_print_function_t
) ndr_print_spoolss_SpoolerInit
,
28192 "spoolss_ResetPrinterEx",
28193 sizeof(struct spoolss_ResetPrinterEx
),
28194 (ndr_push_flags_fn_t
) ndr_push_spoolss_ResetPrinterEx
,
28195 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ResetPrinterEx
,
28196 (ndr_print_function_t
) ndr_print_spoolss_ResetPrinterEx
,
28200 "spoolss_RemoteFindFirstPrinterChangeNotifyEx",
28201 sizeof(struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
),
28202 (ndr_push_flags_fn_t
) ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx
,
28203 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx
,
28204 (ndr_print_function_t
) ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx
,
28208 "spoolss_RouterReplyPrinterEx",
28209 sizeof(struct spoolss_RouterReplyPrinterEx
),
28210 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterReplyPrinterEx
,
28211 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterReplyPrinterEx
,
28212 (ndr_print_function_t
) ndr_print_spoolss_RouterReplyPrinterEx
,
28216 "spoolss_RouterRefreshPrinterChangeNotify",
28217 sizeof(struct spoolss_RouterRefreshPrinterChangeNotify
),
28218 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterRefreshPrinterChangeNotify
,
28219 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterRefreshPrinterChangeNotify
,
28220 (ndr_print_function_t
) ndr_print_spoolss_RouterRefreshPrinterChangeNotify
,
28225 sizeof(struct spoolss_44
),
28226 (ndr_push_flags_fn_t
) ndr_push_spoolss_44
,
28227 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_44
,
28228 (ndr_print_function_t
) ndr_print_spoolss_44
,
28232 "spoolss_OpenPrinterEx",
28233 sizeof(struct spoolss_OpenPrinterEx
),
28234 (ndr_push_flags_fn_t
) ndr_push_spoolss_OpenPrinterEx
,
28235 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_OpenPrinterEx
,
28236 (ndr_print_function_t
) ndr_print_spoolss_OpenPrinterEx
,
28240 "spoolss_AddPrinterEx",
28241 sizeof(struct spoolss_AddPrinterEx
),
28242 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinterEx
,
28243 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinterEx
,
28244 (ndr_print_function_t
) ndr_print_spoolss_AddPrinterEx
,
28249 sizeof(struct spoolss_47
),
28250 (ndr_push_flags_fn_t
) ndr_push_spoolss_47
,
28251 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_47
,
28252 (ndr_print_function_t
) ndr_print_spoolss_47
,
28256 "spoolss_EnumPrinterData",
28257 sizeof(struct spoolss_EnumPrinterData
),
28258 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinterData
,
28259 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinterData
,
28260 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinterData
,
28264 "spoolss_DeletePrinterData",
28265 sizeof(struct spoolss_DeletePrinterData
),
28266 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterData
,
28267 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterData
,
28268 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterData
,
28273 sizeof(struct spoolss_4a
),
28274 (ndr_push_flags_fn_t
) ndr_push_spoolss_4a
,
28275 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_4a
,
28276 (ndr_print_function_t
) ndr_print_spoolss_4a
,
28281 sizeof(struct spoolss_4b
),
28282 (ndr_push_flags_fn_t
) ndr_push_spoolss_4b
,
28283 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_4b
,
28284 (ndr_print_function_t
) ndr_print_spoolss_4b
,
28289 sizeof(struct spoolss_4c
),
28290 (ndr_push_flags_fn_t
) ndr_push_spoolss_4c
,
28291 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_4c
,
28292 (ndr_print_function_t
) ndr_print_spoolss_4c
,
28296 "spoolss_SetPrinterDataEx",
28297 sizeof(struct spoolss_SetPrinterDataEx
),
28298 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetPrinterDataEx
,
28299 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetPrinterDataEx
,
28300 (ndr_print_function_t
) ndr_print_spoolss_SetPrinterDataEx
,
28304 "spoolss_GetPrinterDataEx",
28305 sizeof(struct spoolss_GetPrinterDataEx
),
28306 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDataEx
,
28307 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDataEx
,
28308 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDataEx
,
28312 "spoolss_EnumPrinterDataEx",
28313 sizeof(struct spoolss_EnumPrinterDataEx
),
28314 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinterDataEx
,
28315 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinterDataEx
,
28316 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinterDataEx
,
28320 "spoolss_EnumPrinterKey",
28321 sizeof(struct spoolss_EnumPrinterKey
),
28322 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinterKey
,
28323 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinterKey
,
28324 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinterKey
,
28328 "spoolss_DeletePrinterDataEx",
28329 sizeof(struct spoolss_DeletePrinterDataEx
),
28330 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterDataEx
,
28331 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterDataEx
,
28332 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterDataEx
,
28336 "spoolss_DeletePrinterKey",
28337 sizeof(struct spoolss_DeletePrinterKey
),
28338 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterKey
,
28339 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterKey
,
28340 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterKey
,
28345 sizeof(struct spoolss_53
),
28346 (ndr_push_flags_fn_t
) ndr_push_spoolss_53
,
28347 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_53
,
28348 (ndr_print_function_t
) ndr_print_spoolss_53
,
28352 "spoolss_DeletePrinterDriverEx",
28353 sizeof(struct spoolss_DeletePrinterDriverEx
),
28354 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterDriverEx
,
28355 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterDriverEx
,
28356 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterDriverEx
,
28361 sizeof(struct spoolss_55
),
28362 (ndr_push_flags_fn_t
) ndr_push_spoolss_55
,
28363 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_55
,
28364 (ndr_print_function_t
) ndr_print_spoolss_55
,
28369 sizeof(struct spoolss_56
),
28370 (ndr_push_flags_fn_t
) ndr_push_spoolss_56
,
28371 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_56
,
28372 (ndr_print_function_t
) ndr_print_spoolss_56
,
28377 sizeof(struct spoolss_57
),
28378 (ndr_push_flags_fn_t
) ndr_push_spoolss_57
,
28379 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_57
,
28380 (ndr_print_function_t
) ndr_print_spoolss_57
,
28385 sizeof(struct spoolss_XcvData
),
28386 (ndr_push_flags_fn_t
) ndr_push_spoolss_XcvData
,
28387 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_XcvData
,
28388 (ndr_print_function_t
) ndr_print_spoolss_XcvData
,
28392 "spoolss_AddPrinterDriverEx",
28393 sizeof(struct spoolss_AddPrinterDriverEx
),
28394 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinterDriverEx
,
28395 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinterDriverEx
,
28396 (ndr_print_function_t
) ndr_print_spoolss_AddPrinterDriverEx
,
28401 sizeof(struct spoolss_5a
),
28402 (ndr_push_flags_fn_t
) ndr_push_spoolss_5a
,
28403 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5a
,
28404 (ndr_print_function_t
) ndr_print_spoolss_5a
,
28409 sizeof(struct spoolss_5b
),
28410 (ndr_push_flags_fn_t
) ndr_push_spoolss_5b
,
28411 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5b
,
28412 (ndr_print_function_t
) ndr_print_spoolss_5b
,
28417 sizeof(struct spoolss_5c
),
28418 (ndr_push_flags_fn_t
) ndr_push_spoolss_5c
,
28419 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5c
,
28420 (ndr_print_function_t
) ndr_print_spoolss_5c
,
28425 sizeof(struct spoolss_5d
),
28426 (ndr_push_flags_fn_t
) ndr_push_spoolss_5d
,
28427 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5d
,
28428 (ndr_print_function_t
) ndr_print_spoolss_5d
,
28433 sizeof(struct spoolss_5e
),
28434 (ndr_push_flags_fn_t
) ndr_push_spoolss_5e
,
28435 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5e
,
28436 (ndr_print_function_t
) ndr_print_spoolss_5e
,
28441 sizeof(struct spoolss_5f
),
28442 (ndr_push_flags_fn_t
) ndr_push_spoolss_5f
,
28443 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5f
,
28444 (ndr_print_function_t
) ndr_print_spoolss_5f
,
28447 { NULL
, 0, NULL
, NULL
, NULL
, false }
28450 static const char * const spoolss_endpoint_strings
[] = {
28451 "ncacn_np:[\\pipe\\spoolss]",
28454 static const struct ndr_interface_string_array spoolss_endpoints
= {
28456 .names
= spoolss_endpoint_strings
28459 static const char * const spoolss_authservice_strings
[] = {
28463 static const struct ndr_interface_string_array spoolss_authservices
= {
28465 .names
= spoolss_authservice_strings
28469 const struct ndr_interface_table ndr_table_spoolss
= {
28472 {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
28473 NDR_SPOOLSS_VERSION
28475 .helpstring
= NDR_SPOOLSS_HELPSTRING
,
28477 .calls
= spoolss_calls
,
28478 .endpoints
= &spoolss_endpoints
,
28479 .authservices
= &spoolss_authservices