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
));
21 NDR_CHECK(ndr_push_trailer_align(ndr
, 2));
23 if (ndr_flags
& NDR_BUFFERS
) {
25 return NDR_ERR_SUCCESS
;
28 static enum ndr_err_code
ndr_pull_spoolss_Time(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_Time
*r
)
30 if (ndr_flags
& NDR_SCALARS
) {
31 NDR_CHECK(ndr_pull_align(ndr
, 2));
32 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->year
));
33 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->month
));
34 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->day_of_week
));
35 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->day
));
36 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->hour
));
37 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->minute
));
38 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->second
));
39 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->millisecond
));
40 NDR_CHECK(ndr_pull_trailer_align(ndr
, 2));
42 if (ndr_flags
& NDR_BUFFERS
) {
44 return NDR_ERR_SUCCESS
;
47 _PUBLIC_
void ndr_print_spoolss_Time(struct ndr_print
*ndr
, const char *name
, const struct spoolss_Time
*r
)
49 ndr_print_struct(ndr
, name
, "spoolss_Time");
51 ndr_print_uint16(ndr
, "year", r
->year
);
52 ndr_print_uint16(ndr
, "month", r
->month
);
53 ndr_print_uint16(ndr
, "day_of_week", r
->day_of_week
);
54 ndr_print_uint16(ndr
, "day", r
->day
);
55 ndr_print_uint16(ndr
, "hour", r
->hour
);
56 ndr_print_uint16(ndr
, "minute", r
->minute
);
57 ndr_print_uint16(ndr
, "second", r
->second
);
58 ndr_print_uint16(ndr
, "millisecond", r
->millisecond
);
62 static size_t ndr_size_spoolss_Time(const struct spoolss_Time
*r
, struct smb_iconv_convenience
*ic
, int flags
)
64 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_Time
, ic
);
67 static enum ndr_err_code
ndr_push_spoolss_TimeCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_TimeCtr
*r
)
69 if (ndr_flags
& NDR_SCALARS
) {
70 NDR_CHECK(ndr_push_align(ndr
, 5));
71 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_spoolss_Time(r
->time
, ndr
->iconv_convenience
, ndr
->flags
)));
72 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->time
));
73 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
75 if (ndr_flags
& NDR_BUFFERS
) {
77 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, r
->time
));
80 return NDR_ERR_SUCCESS
;
83 static enum ndr_err_code
ndr_pull_spoolss_TimeCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_TimeCtr
*r
)
86 TALLOC_CTX
*_mem_save_time_0
;
87 if (ndr_flags
& NDR_SCALARS
) {
88 NDR_CHECK(ndr_pull_align(ndr
, 5));
89 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
90 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_time
));
92 NDR_PULL_ALLOC(ndr
, r
->time
);
96 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
98 if (ndr_flags
& NDR_BUFFERS
) {
100 _mem_save_time_0
= NDR_PULL_GET_MEM_CTX(ndr
);
101 NDR_PULL_SET_MEM_CTX(ndr
, r
->time
, 0);
102 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, r
->time
));
103 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_time_0
, 0);
106 return NDR_ERR_SUCCESS
;
109 _PUBLIC_
void ndr_print_spoolss_TimeCtr(struct ndr_print
*ndr
, const char *name
, const struct spoolss_TimeCtr
*r
)
111 ndr_print_struct(ndr
, name
, "spoolss_TimeCtr");
113 ndr_print_uint32(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_spoolss_Time(r
->time
, ndr
->iconv_convenience
, ndr
->flags
):r
->size
);
114 ndr_print_ptr(ndr
, "time", r
->time
);
117 ndr_print_spoolss_Time(ndr
, "time", r
->time
);
123 static enum ndr_err_code
ndr_push_spoolss_ProcessorArchitecture(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_ProcessorArchitecture r
)
125 NDR_CHECK(ndr_push_enum_uint1632(ndr
, NDR_SCALARS
, r
));
126 return NDR_ERR_SUCCESS
;
129 static enum ndr_err_code
ndr_pull_spoolss_ProcessorArchitecture(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_ProcessorArchitecture
*r
)
132 NDR_CHECK(ndr_pull_enum_uint1632(ndr
, NDR_SCALARS
, &v
));
134 return NDR_ERR_SUCCESS
;
137 _PUBLIC_
void ndr_print_spoolss_ProcessorArchitecture(struct ndr_print
*ndr
, const char *name
, enum spoolss_ProcessorArchitecture r
)
139 const char *val
= NULL
;
142 case PROCESSOR_ARCHITECTURE_INTEL
: val
= "PROCESSOR_ARCHITECTURE_INTEL"; break;
143 case PROCESSOR_ARCHITECTURE_IA64
: val
= "PROCESSOR_ARCHITECTURE_IA64"; break;
144 case PROCESSOR_ARCHITECTURE_AMD64
: val
= "PROCESSOR_ARCHITECTURE_AMD64"; break;
146 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
149 static enum ndr_err_code
ndr_push_spoolss_ProcessorType(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_ProcessorType r
)
151 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
152 return NDR_ERR_SUCCESS
;
155 static enum ndr_err_code
ndr_pull_spoolss_ProcessorType(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_ProcessorType
*r
)
158 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
160 return NDR_ERR_SUCCESS
;
163 _PUBLIC_
void ndr_print_spoolss_ProcessorType(struct ndr_print
*ndr
, const char *name
, enum spoolss_ProcessorType r
)
165 const char *val
= NULL
;
168 case PROCESSOR_INTEL_386
: val
= "PROCESSOR_INTEL_386"; break;
169 case PROCESSOR_INTEL_486
: val
= "PROCESSOR_INTEL_486"; break;
170 case PROCESSOR_INTEL_PENTIUM
: val
= "PROCESSOR_INTEL_PENTIUM"; break;
171 case PROCESSOR_INTEL_IA64
: val
= "PROCESSOR_INTEL_IA64"; break;
172 case PROCESSOR_AMD_X8664
: val
= "PROCESSOR_AMD_X8664"; break;
174 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
177 static enum ndr_err_code
ndr_push_spoolss_MajorVersion(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_MajorVersion r
)
179 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
180 return NDR_ERR_SUCCESS
;
183 static enum ndr_err_code
ndr_pull_spoolss_MajorVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_MajorVersion
*r
)
186 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
188 return NDR_ERR_SUCCESS
;
191 _PUBLIC_
void ndr_print_spoolss_MajorVersion(struct ndr_print
*ndr
, const char *name
, enum spoolss_MajorVersion r
)
193 const char *val
= NULL
;
196 case SPOOLSS_MAJOR_VERSION_NT4_95_98_ME
: val
= "SPOOLSS_MAJOR_VERSION_NT4_95_98_ME"; break;
197 case SPOOLSS_MAJOR_VERSION_2000_2003_XP
: val
= "SPOOLSS_MAJOR_VERSION_2000_2003_XP"; break;
198 case SPOOLSS_MAJOR_VERSION_2008_VISTA
: val
= "SPOOLSS_MAJOR_VERSION_2008_VISTA"; break;
200 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
203 static enum ndr_err_code
ndr_push_spoolss_MinorVersion(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_MinorVersion r
)
205 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
206 return NDR_ERR_SUCCESS
;
209 static enum ndr_err_code
ndr_pull_spoolss_MinorVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_MinorVersion
*r
)
212 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
214 return NDR_ERR_SUCCESS
;
217 _PUBLIC_
void ndr_print_spoolss_MinorVersion(struct ndr_print
*ndr
, const char *name
, enum spoolss_MinorVersion r
)
219 const char *val
= NULL
;
222 case SPOOLSS_MINOR_VERSION_0
: val
= "SPOOLSS_MINOR_VERSION_0"; break;
223 case SPOOLSS_MINOR_VERSION_XP
: val
= "SPOOLSS_MINOR_VERSION_XP"; break;
224 case SPOOLSS_MINOR_VERSION_2003_XP64
: val
= "SPOOLSS_MINOR_VERSION_2003_XP64"; break;
225 case SPOOLSS_MINOR_VERSION_98
: val
= "SPOOLSS_MINOR_VERSION_98"; break;
226 case SPOOLSS_MINOR_VERSION_ME
: val
= "SPOOLSS_MINOR_VERSION_ME"; break;
228 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
231 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterStatus(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
233 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
234 return NDR_ERR_SUCCESS
;
237 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterStatus(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
240 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
242 return NDR_ERR_SUCCESS
;
245 _PUBLIC_
void ndr_print_spoolss_PrinterStatus(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
247 ndr_print_uint32(ndr
, name
, r
);
249 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_PAUSED", PRINTER_STATUS_PAUSED
, r
);
250 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_ERROR", PRINTER_STATUS_ERROR
, r
);
251 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_PENDING_DELETION", PRINTER_STATUS_PENDING_DELETION
, r
);
252 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_PAPER_JAM", PRINTER_STATUS_PAPER_JAM
, r
);
253 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_PAPER_OUT", PRINTER_STATUS_PAPER_OUT
, r
);
254 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_MANUAL_FEED", PRINTER_STATUS_MANUAL_FEED
, r
);
255 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_PAPER_PROBLEM", PRINTER_STATUS_PAPER_PROBLEM
, r
);
256 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_OFFLINE", PRINTER_STATUS_OFFLINE
, r
);
257 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_IO_ACTIVE", PRINTER_STATUS_IO_ACTIVE
, r
);
258 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_BUSY", PRINTER_STATUS_BUSY
, r
);
259 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_PRINTING", PRINTER_STATUS_PRINTING
, r
);
260 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_OUTPUT_BIN_FULL", PRINTER_STATUS_OUTPUT_BIN_FULL
, r
);
261 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_NOT_AVAILABLE", PRINTER_STATUS_NOT_AVAILABLE
, r
);
262 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_WAITING", PRINTER_STATUS_WAITING
, r
);
263 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_PROCESSING", PRINTER_STATUS_PROCESSING
, r
);
264 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_INITIALIZING", PRINTER_STATUS_INITIALIZING
, r
);
265 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_WARMING_UP", PRINTER_STATUS_WARMING_UP
, r
);
266 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_TONER_LOW", PRINTER_STATUS_TONER_LOW
, r
);
267 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_NO_TONER", PRINTER_STATUS_NO_TONER
, r
);
268 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_PAGE_PUNT", PRINTER_STATUS_PAGE_PUNT
, r
);
269 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_USER_INTERVENTION", PRINTER_STATUS_USER_INTERVENTION
, r
);
270 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_OUT_OF_MEMORY", PRINTER_STATUS_OUT_OF_MEMORY
, r
);
271 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_DOOR_OPEN", PRINTER_STATUS_DOOR_OPEN
, r
);
272 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_SERVER_UNKNOWN", PRINTER_STATUS_SERVER_UNKNOWN
, r
);
273 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_STATUS_POWER_SAVE", PRINTER_STATUS_POWER_SAVE
, r
);
277 static enum ndr_err_code
ndr_push_spoolss_JobStatus(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
279 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
280 return NDR_ERR_SUCCESS
;
283 static enum ndr_err_code
ndr_pull_spoolss_JobStatus(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
286 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
288 return NDR_ERR_SUCCESS
;
291 _PUBLIC_
void ndr_print_spoolss_JobStatus(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
293 ndr_print_uint32(ndr
, name
, r
);
295 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_PAUSED", JOB_STATUS_PAUSED
, r
);
296 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_ERROR", JOB_STATUS_ERROR
, r
);
297 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_DELETING", JOB_STATUS_DELETING
, r
);
298 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_SPOOLING", JOB_STATUS_SPOOLING
, r
);
299 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_PRINTING", JOB_STATUS_PRINTING
, r
);
300 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_OFFLINE", JOB_STATUS_OFFLINE
, r
);
301 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_PAPEROUT", JOB_STATUS_PAPEROUT
, r
);
302 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_PRINTED", JOB_STATUS_PRINTED
, r
);
303 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_DELETED", JOB_STATUS_DELETED
, r
);
304 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_BLOCKED_DEVQ", JOB_STATUS_BLOCKED_DEVQ
, r
);
305 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_USER_INTERVENTION", JOB_STATUS_USER_INTERVENTION
, r
);
306 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_RESTART", JOB_STATUS_RESTART
, r
);
307 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_STATUS_COMPLETE", JOB_STATUS_COMPLETE
, r
);
311 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo0(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo0
*r
)
313 if (ndr_flags
& NDR_SCALARS
) {
314 NDR_CHECK(ndr_push_align(ndr
, 5));
316 uint32_t _flags_save_string
= ndr
->flags
;
317 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
318 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printername
));
319 ndr
->flags
= _flags_save_string
;
322 uint32_t _flags_save_string
= ndr
->flags
;
323 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
324 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->servername
));
325 ndr
->flags
= _flags_save_string
;
327 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cjobs
));
328 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_jobs
));
329 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_bytes
));
330 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->time
));
331 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->global_counter
));
332 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
333 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
334 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->free_build
));
335 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->spooling
));
336 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_spooling
));
337 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->session_counter
));
338 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_error_out_of_paper
));
339 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_error_not_ready
));
340 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->job_error
));
341 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->number_of_processors
));
342 NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr
, NDR_SCALARS
, r
->processor_type
));
343 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->high_part_total_bytes
));
344 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->change_id
));
345 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->last_error
));
346 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, r
->status
));
347 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->enumerate_network_printers
));
348 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->c_setprinter
));
349 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, r
->processor_architecture
));
350 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->processor_level
));
351 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ref_ic
));
352 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved2
));
353 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved3
));
354 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
356 if (ndr_flags
& NDR_BUFFERS
) {
358 uint32_t _flags_save_string
= ndr
->flags
;
359 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
360 if (r
->printername
) {
361 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->printername
));
362 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printername
));
363 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->printername
));
365 ndr
->flags
= _flags_save_string
;
368 uint32_t _flags_save_string
= ndr
->flags
;
369 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
371 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->servername
));
372 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->servername
));
373 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->servername
));
375 ndr
->flags
= _flags_save_string
;
378 return NDR_ERR_SUCCESS
;
381 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo0(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo0
*r
)
383 uint32_t _ptr_printername
;
384 TALLOC_CTX
*_mem_save_printername_0
;
385 uint32_t _ptr_servername
;
386 TALLOC_CTX
*_mem_save_servername_0
;
387 if (ndr_flags
& NDR_SCALARS
) {
388 NDR_CHECK(ndr_pull_align(ndr
, 5));
390 uint32_t _flags_save_string
= ndr
->flags
;
391 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
392 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
393 if (_ptr_printername
) {
394 NDR_PULL_ALLOC(ndr
, r
->printername
);
395 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printername
, _ptr_printername
));
397 r
->printername
= NULL
;
399 ndr
->flags
= _flags_save_string
;
402 uint32_t _flags_save_string
= ndr
->flags
;
403 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
404 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
405 if (_ptr_servername
) {
406 NDR_PULL_ALLOC(ndr
, r
->servername
);
407 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->servername
, _ptr_servername
));
409 r
->servername
= NULL
;
411 ndr
->flags
= _flags_save_string
;
413 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cjobs
));
414 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_jobs
));
415 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_bytes
));
416 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->time
));
417 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->global_counter
));
418 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
419 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
420 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->free_build
));
421 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->spooling
));
422 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_spooling
));
423 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->session_counter
));
424 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_error_out_of_paper
));
425 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_error_not_ready
));
426 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->job_error
));
427 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->number_of_processors
));
428 NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr
, NDR_SCALARS
, &r
->processor_type
));
429 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->high_part_total_bytes
));
430 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->change_id
));
431 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->last_error
));
432 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
433 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->enumerate_network_printers
));
434 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->c_setprinter
));
435 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, &r
->processor_architecture
));
436 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->processor_level
));
437 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ref_ic
));
438 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved3
));
440 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
442 if (ndr_flags
& NDR_BUFFERS
) {
444 uint32_t _flags_save_string
= ndr
->flags
;
445 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
446 if (r
->printername
) {
447 uint32_t _relative_save_offset
;
448 _relative_save_offset
= ndr
->offset
;
449 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printername
));
450 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
451 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
452 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printername
));
453 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
454 if (ndr
->offset
> ndr
->relative_highest_offset
) {
455 ndr
->relative_highest_offset
= ndr
->offset
;
457 ndr
->offset
= _relative_save_offset
;
459 ndr
->flags
= _flags_save_string
;
462 uint32_t _flags_save_string
= ndr
->flags
;
463 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
465 uint32_t _relative_save_offset
;
466 _relative_save_offset
= ndr
->offset
;
467 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->servername
));
468 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
469 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
470 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->servername
));
471 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
472 if (ndr
->offset
> ndr
->relative_highest_offset
) {
473 ndr
->relative_highest_offset
= ndr
->offset
;
475 ndr
->offset
= _relative_save_offset
;
477 ndr
->flags
= _flags_save_string
;
480 return NDR_ERR_SUCCESS
;
483 _PUBLIC_
void ndr_print_spoolss_PrinterInfo0(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo0
*r
)
485 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo0");
487 ndr_print_ptr(ndr
, "printername", r
->printername
);
489 if (r
->printername
) {
490 ndr_print_string(ndr
, "printername", r
->printername
);
493 ndr_print_ptr(ndr
, "servername", r
->servername
);
496 ndr_print_string(ndr
, "servername", r
->servername
);
499 ndr_print_uint32(ndr
, "cjobs", r
->cjobs
);
500 ndr_print_uint32(ndr
, "total_jobs", r
->total_jobs
);
501 ndr_print_uint32(ndr
, "total_bytes", r
->total_bytes
);
502 ndr_print_spoolss_Time(ndr
, "time", &r
->time
);
503 ndr_print_uint32(ndr
, "global_counter", r
->global_counter
);
504 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
505 ndr_print_uint32(ndr
, "version", r
->version
);
506 ndr_print_uint32(ndr
, "free_build", r
->free_build
);
507 ndr_print_uint32(ndr
, "spooling", r
->spooling
);
508 ndr_print_uint32(ndr
, "max_spooling", r
->max_spooling
);
509 ndr_print_uint32(ndr
, "session_counter", r
->session_counter
);
510 ndr_print_uint32(ndr
, "num_error_out_of_paper", r
->num_error_out_of_paper
);
511 ndr_print_uint32(ndr
, "num_error_not_ready", r
->num_error_not_ready
);
512 ndr_print_spoolss_JobStatus(ndr
, "job_error", r
->job_error
);
513 ndr_print_uint32(ndr
, "number_of_processors", r
->number_of_processors
);
514 ndr_print_spoolss_ProcessorType(ndr
, "processor_type", r
->processor_type
);
515 ndr_print_uint32(ndr
, "high_part_total_bytes", r
->high_part_total_bytes
);
516 ndr_print_uint32(ndr
, "change_id", r
->change_id
);
517 ndr_print_WERROR(ndr
, "last_error", r
->last_error
);
518 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
519 ndr_print_uint32(ndr
, "enumerate_network_printers", r
->enumerate_network_printers
);
520 ndr_print_uint32(ndr
, "c_setprinter", r
->c_setprinter
);
521 ndr_print_spoolss_ProcessorArchitecture(ndr
, "processor_architecture", r
->processor_architecture
);
522 ndr_print_uint16(ndr
, "processor_level", r
->processor_level
);
523 ndr_print_uint32(ndr
, "ref_ic", r
->ref_ic
);
524 ndr_print_uint32(ndr
, "reserved2", r
->reserved2
);
525 ndr_print_uint32(ndr
, "reserved3", r
->reserved3
);
529 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo0(const struct spoolss_PrinterInfo0
*r
, struct smb_iconv_convenience
*ic
, int flags
)
531 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo0
, ic
);
534 static enum ndr_err_code
ndr_push_spoolss_DM_Signature(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DM_Signature r
)
536 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
537 return NDR_ERR_SUCCESS
;
540 static enum ndr_err_code
ndr_pull_spoolss_DM_Signature(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DM_Signature
*r
)
543 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
545 return NDR_ERR_SUCCESS
;
548 _PUBLIC_
void ndr_print_spoolss_DM_Signature(struct ndr_print
*ndr
, const char *name
, enum spoolss_DM_Signature r
)
550 const char *val
= NULL
;
553 case SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
: val
= "SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA"; break;
554 case SPOOLSS_DM_SIGNATURE_JTEXP
: val
= "SPOOLSS_DM_SIGNATURE_JTEXP"; break;
555 case SPOOLSS_DM_SIGNATURE_PSEXTRA
: val
= "SPOOLSS_DM_SIGNATURE_PSEXTRA"; break;
557 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
560 static enum ndr_err_code
ndr_push_spoolss_DM_Layout(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DM_Layout r
)
562 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
563 return NDR_ERR_SUCCESS
;
566 static enum ndr_err_code
ndr_pull_spoolss_DM_Layout(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DM_Layout
*r
)
569 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
571 return NDR_ERR_SUCCESS
;
574 _PUBLIC_
void ndr_print_spoolss_DM_Layout(struct ndr_print
*ndr
, const char *name
, enum spoolss_DM_Layout r
)
576 const char *val
= NULL
;
579 case SPOOLSS_DM_LAYOUT_NUP_DISABLED
: val
= "SPOOLSS_DM_LAYOUT_NUP_DISABLED"; break;
580 case SPOOLSS_DM_LAYOUT_NUP_2
: val
= "SPOOLSS_DM_LAYOUT_NUP_2"; break;
581 case SPOOLSS_DM_LAYOUT_NUP_4
: val
= "SPOOLSS_DM_LAYOUT_NUP_4"; break;
582 case SPOOLSS_DM_LAYOUT_NUP_6
: val
= "SPOOLSS_DM_LAYOUT_NUP_6"; break;
583 case SPOOLSS_DM_LAYOUT_NUP_9
: val
= "SPOOLSS_DM_LAYOUT_NUP_9"; break;
584 case SPOOLSS_DM_LAYOUT_NUP_16
: val
= "SPOOLSS_DM_LAYOUT_NUP_16"; break;
585 case SPOOLSS_DM_LAYOUT_BOOKLET
: val
= "SPOOLSS_DM_LAYOUT_BOOKLET"; break;
587 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
590 static enum ndr_err_code
ndr_push_spoolss_DM_NupDirection(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DM_NupDirection r
)
592 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
593 return NDR_ERR_SUCCESS
;
596 static enum ndr_err_code
ndr_pull_spoolss_DM_NupDirection(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DM_NupDirection
*r
)
599 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
601 return NDR_ERR_SUCCESS
;
604 _PUBLIC_
void ndr_print_spoolss_DM_NupDirection(struct ndr_print
*ndr
, const char *name
, enum spoolss_DM_NupDirection r
)
606 const char *val
= NULL
;
609 case SPOOLSS_DM_NUP_DIRECTION_L2R_T2B
: val
= "SPOOLSS_DM_NUP_DIRECTION_L2R_T2B"; break;
610 case SPOOLSS_DM_NUP_DIRECTION_T2B_L2R
: val
= "SPOOLSS_DM_NUP_DIRECTION_T2B_L2R"; break;
611 case SPOOLSS_DM_NUP_DIRECTION_R2L_T2B
: val
= "SPOOLSS_DM_NUP_DIRECTION_R2L_T2B"; break;
612 case SPOOLSS_DM_NUP_DIRECTION_T2B_R2L
: val
= "SPOOLSS_DM_NUP_DIRECTION_T2B_R2L"; break;
614 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
617 static enum ndr_err_code
ndr_push_spoolss_DM_NupBorderFlags(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DM_NupBorderFlags r
)
619 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
620 return NDR_ERR_SUCCESS
;
623 static enum ndr_err_code
ndr_pull_spoolss_DM_NupBorderFlags(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DM_NupBorderFlags
*r
)
626 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
628 return NDR_ERR_SUCCESS
;
631 _PUBLIC_
void ndr_print_spoolss_DM_NupBorderFlags(struct ndr_print
*ndr
, const char *name
, enum spoolss_DM_NupBorderFlags r
)
633 const char *val
= NULL
;
636 case SPOOLSS_DM_NUP_BORDER_PRINT
: val
= "SPOOLSS_DM_NUP_BORDER_PRINT"; break;
637 case SPOOLSS_DM_NUP_BORDER_NONE
: val
= "SPOOLSS_DM_NUP_BORDER_NONE"; break;
639 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
642 static enum ndr_err_code
ndr_push_spoolss_DM_BookletFlags(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DM_BookletFlags r
)
644 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
645 return NDR_ERR_SUCCESS
;
648 static enum ndr_err_code
ndr_pull_spoolss_DM_BookletFlags(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DM_BookletFlags
*r
)
651 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
653 return NDR_ERR_SUCCESS
;
656 _PUBLIC_
void ndr_print_spoolss_DM_BookletFlags(struct ndr_print
*ndr
, const char *name
, enum spoolss_DM_BookletFlags r
)
658 const char *val
= NULL
;
661 case SPOOLSS_DM_BOOKLET_LEFT_FLIP
: val
= "SPOOLSS_DM_BOOKLET_LEFT_FLIP"; break;
662 case SPOOLSS_DM_BOOKLET_RIGHT_FLIP
: val
= "SPOOLSS_DM_BOOKLET_RIGHT_FLIP"; break;
664 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
667 static enum ndr_err_code
ndr_push_spoolss_DMUNI_Quality(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DMUNI_Quality r
)
669 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
670 return NDR_ERR_SUCCESS
;
673 static enum ndr_err_code
ndr_pull_spoolss_DMUNI_Quality(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DMUNI_Quality
*r
)
676 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
678 return NDR_ERR_SUCCESS
;
681 _PUBLIC_
void ndr_print_spoolss_DMUNI_Quality(struct ndr_print
*ndr
, const char *name
, enum spoolss_DMUNI_Quality r
)
683 const char *val
= NULL
;
686 case SPOOLSS_DM_UNI_QUALITY_BEST
: val
= "SPOOLSS_DM_UNI_QUALITY_BEST"; break;
687 case SPOOLSS_DM_UNI_QUALITY_MEDIUM
: val
= "SPOOLSS_DM_UNI_QUALITY_MEDIUM"; break;
688 case SPOOLSS_DM_UNI_QUALITY_DRAFT
: val
= "SPOOLSS_DM_UNI_QUALITY_DRAFT"; break;
690 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
693 static enum ndr_err_code
ndr_push_spoolss_DMUNI_Flags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
695 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
696 return NDR_ERR_SUCCESS
;
699 static enum ndr_err_code
ndr_pull_spoolss_DMUNI_Flags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
702 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
704 return NDR_ERR_SUCCESS
;
707 _PUBLIC_
void ndr_print_spoolss_DMUNI_Flags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
709 ndr_print_uint32(ndr
, name
, r
);
711 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS", SPOOLSS_DM_UNI_FLAGS_PRINT_TEXT_AS_GRAPHICS
, r
);
712 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL", SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL
, r
);
713 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING", SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING
, r
);
717 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_UNIDRVEXTRA(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UNIDRVEXTRA
*r
)
719 uint32_t cntr_wReserved_0
;
720 uint32_t cntr_aOptions_0
;
721 if (ndr_flags
& NDR_SCALARS
) {
722 NDR_CHECK(ndr_push_align(ndr
, 4));
723 NDR_CHECK(ndr_push_spoolss_DM_Signature(ndr
, NDR_SCALARS
, SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
));
724 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, 0x0022));
725 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->wCoreJTExpSize
));
726 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, ndr_size_spoolss_UNIDRVEXTRA(r
, ndr
->iconv_convenience
, ndr
->flags
) + r
->wCoreJTExpSize
));
727 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->wOEMExtra
));
728 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dwChecksum32
));
729 NDR_CHECK(ndr_push_spoolss_DMUNI_Flags(ndr
, NDR_SCALARS
, r
->dwFlags
));
730 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bReversePrint
));
731 NDR_CHECK(ndr_push_spoolss_DM_Layout(ndr
, NDR_SCALARS
, r
->iLayout
));
732 NDR_CHECK(ndr_push_spoolss_DMUNI_Quality(ndr
, NDR_SCALARS
, r
->iQuality
));
733 for (cntr_wReserved_0
= 0; cntr_wReserved_0
< 6; cntr_wReserved_0
++) {
734 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->wReserved
[cntr_wReserved_0
]));
736 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dwOptions
));
737 for (cntr_aOptions_0
= 0; cntr_aOptions_0
< 128; cntr_aOptions_0
++) {
738 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->aOptions
[cntr_aOptions_0
]));
740 NDR_CHECK(ndr_push_spoolss_DM_NupDirection(ndr
, NDR_SCALARS
, r
->dwNupDirection
));
741 NDR_CHECK(ndr_push_spoolss_DM_NupBorderFlags(ndr
, NDR_SCALARS
, r
->dwNupBorderFlags
));
742 NDR_CHECK(ndr_push_spoolss_DM_BookletFlags(ndr
, NDR_SCALARS
, r
->dwBookletFlags
));
743 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
745 if (ndr_flags
& NDR_BUFFERS
) {
747 return NDR_ERR_SUCCESS
;
750 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_UNIDRVEXTRA(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UNIDRVEXTRA
*r
)
752 uint32_t cntr_wReserved_0
;
753 uint32_t cntr_aOptions_0
;
754 if (ndr_flags
& NDR_SCALARS
) {
755 NDR_CHECK(ndr_pull_align(ndr
, 4));
756 NDR_CHECK(ndr_pull_spoolss_DM_Signature(ndr
, NDR_SCALARS
, &r
->dwSignature
));
757 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->wVer
));
758 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->wCoreJTExpSize
));
759 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->wCoreFullSize
));
760 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->wOEMExtra
));
761 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dwChecksum32
));
762 NDR_CHECK(ndr_pull_spoolss_DMUNI_Flags(ndr
, NDR_SCALARS
, &r
->dwFlags
));
763 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bReversePrint
));
764 NDR_CHECK(ndr_pull_spoolss_DM_Layout(ndr
, NDR_SCALARS
, &r
->iLayout
));
765 NDR_CHECK(ndr_pull_spoolss_DMUNI_Quality(ndr
, NDR_SCALARS
, &r
->iQuality
));
766 for (cntr_wReserved_0
= 0; cntr_wReserved_0
< 6; cntr_wReserved_0
++) {
767 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->wReserved
[cntr_wReserved_0
]));
769 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dwOptions
));
770 for (cntr_aOptions_0
= 0; cntr_aOptions_0
< 128; cntr_aOptions_0
++) {
771 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->aOptions
[cntr_aOptions_0
]));
773 NDR_CHECK(ndr_pull_spoolss_DM_NupDirection(ndr
, NDR_SCALARS
, &r
->dwNupDirection
));
774 NDR_CHECK(ndr_pull_spoolss_DM_NupBorderFlags(ndr
, NDR_SCALARS
, &r
->dwNupBorderFlags
));
775 NDR_CHECK(ndr_pull_spoolss_DM_BookletFlags(ndr
, NDR_SCALARS
, &r
->dwBookletFlags
));
776 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
778 if (ndr_flags
& NDR_BUFFERS
) {
780 return NDR_ERR_SUCCESS
;
783 _PUBLIC_
void ndr_print_spoolss_UNIDRVEXTRA(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UNIDRVEXTRA
*r
)
785 uint32_t cntr_wReserved_0
;
786 uint32_t cntr_aOptions_0
;
787 ndr_print_struct(ndr
, name
, "spoolss_UNIDRVEXTRA");
789 ndr_print_spoolss_DM_Signature(ndr
, "dwSignature", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA
:r
->dwSignature
);
790 ndr_print_uint16(ndr
, "wVer", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x0022:r
->wVer
);
791 ndr_print_uint16(ndr
, "wCoreJTExpSize", r
->wCoreJTExpSize
);
792 ndr_print_uint16(ndr
, "wCoreFullSize", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?ndr_size_spoolss_UNIDRVEXTRA(r
, ndr
->iconv_convenience
, ndr
->flags
) + r
->wCoreJTExpSize
:r
->wCoreFullSize
);
793 ndr_print_uint16(ndr
, "wOEMExtra", r
->wOEMExtra
);
794 ndr_print_uint32(ndr
, "dwChecksum32", r
->dwChecksum32
);
795 ndr_print_spoolss_DMUNI_Flags(ndr
, "dwFlags", r
->dwFlags
);
796 ndr_print_uint32(ndr
, "bReversePrint", r
->bReversePrint
);
797 ndr_print_spoolss_DM_Layout(ndr
, "iLayout", r
->iLayout
);
798 ndr_print_spoolss_DMUNI_Quality(ndr
, "iQuality", r
->iQuality
);
799 ndr
->print(ndr
, "%s: ARRAY(%d)", "wReserved", (int)6);
801 for (cntr_wReserved_0
=0;cntr_wReserved_0
<6;cntr_wReserved_0
++) {
803 if (asprintf(&idx_0
, "[%d]", cntr_wReserved_0
) != -1) {
804 ndr_print_uint16(ndr
, "wReserved", r
->wReserved
[cntr_wReserved_0
]);
809 ndr_print_uint32(ndr
, "dwOptions", r
->dwOptions
);
810 ndr
->print(ndr
, "%s: ARRAY(%d)", "aOptions", (int)128);
812 for (cntr_aOptions_0
=0;cntr_aOptions_0
<128;cntr_aOptions_0
++) {
814 if (asprintf(&idx_0
, "[%d]", cntr_aOptions_0
) != -1) {
815 ndr_print_uint32(ndr
, "aOptions", r
->aOptions
[cntr_aOptions_0
]);
820 ndr_print_spoolss_DM_NupDirection(ndr
, "dwNupDirection", r
->dwNupDirection
);
821 ndr_print_spoolss_DM_NupBorderFlags(ndr
, "dwNupBorderFlags", r
->dwNupBorderFlags
);
822 ndr_print_spoolss_DM_BookletFlags(ndr
, "dwBookletFlags", r
->dwBookletFlags
);
826 _PUBLIC_
size_t ndr_size_spoolss_UNIDRVEXTRA(const struct spoolss_UNIDRVEXTRA
*r
, struct smb_iconv_convenience
*ic
, int flags
)
828 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_UNIDRVEXTRA
, ic
);
831 static enum ndr_err_code
ndr_push_spoolss_DeviceModeFields(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
833 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
834 return NDR_ERR_SUCCESS
;
837 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeFields(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
840 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
842 return NDR_ERR_SUCCESS
;
845 _PUBLIC_
void ndr_print_spoolss_DeviceModeFields(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
847 ndr_print_uint32(ndr
, name
, r
);
849 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_ORIENTATION", DEVMODE_ORIENTATION
, r
);
850 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_PAPERSIZE", DEVMODE_PAPERSIZE
, r
);
851 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_PAPERLENGTH", DEVMODE_PAPERLENGTH
, r
);
852 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_PAPERWIDTH", DEVMODE_PAPERWIDTH
, r
);
853 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_SCALE", DEVMODE_SCALE
, r
);
854 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_POSITION", DEVMODE_POSITION
, r
);
855 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_NUP", DEVMODE_NUP
, r
);
856 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_COPIES", DEVMODE_COPIES
, r
);
857 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_DEFAULTSOURCE", DEVMODE_DEFAULTSOURCE
, r
);
858 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_PRINTQUALITY", DEVMODE_PRINTQUALITY
, r
);
859 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_COLOR", DEVMODE_COLOR
, r
);
860 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_DUPLEX", DEVMODE_DUPLEX
, r
);
861 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_YRESOLUTION", DEVMODE_YRESOLUTION
, r
);
862 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_TTOPTION", DEVMODE_TTOPTION
, r
);
863 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_COLLATE", DEVMODE_COLLATE
, r
);
864 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_FORMNAME", DEVMODE_FORMNAME
, r
);
865 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_LOGPIXELS", DEVMODE_LOGPIXELS
, r
);
866 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_BITSPERPEL", DEVMODE_BITSPERPEL
, r
);
867 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_PELSWIDTH", DEVMODE_PELSWIDTH
, r
);
868 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_PELSHEIGHT", DEVMODE_PELSHEIGHT
, r
);
869 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_DISPLAYFLAGS", DEVMODE_DISPLAYFLAGS
, r
);
870 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_DISPLAYFREQUENCY", DEVMODE_DISPLAYFREQUENCY
, r
);
871 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_ICMMETHOD", DEVMODE_ICMMETHOD
, r
);
872 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_ICMINTENT", DEVMODE_ICMINTENT
, r
);
873 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_MEDIATYPE", DEVMODE_MEDIATYPE
, r
);
874 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_DITHERTYPE", DEVMODE_DITHERTYPE
, r
);
875 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_PANNINGWIDTH", DEVMODE_PANNINGWIDTH
, r
);
876 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DEVMODE_PANNINGHEIGHT", DEVMODE_PANNINGHEIGHT
, r
);
880 static enum ndr_err_code
ndr_push_spoolss_DeviceModeSpecVersion(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeSpecVersion r
)
882 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
883 return NDR_ERR_SUCCESS
;
886 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeSpecVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeSpecVersion
*r
)
889 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
891 return NDR_ERR_SUCCESS
;
894 _PUBLIC_
void ndr_print_spoolss_DeviceModeSpecVersion(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeSpecVersion r
)
896 const char *val
= NULL
;
899 case DMSPEC_NT3
: val
= "DMSPEC_NT3"; break;
900 case DMSPEC_WIN95_98_ME
: val
= "DMSPEC_WIN95_98_ME"; break;
901 case DMSPEC_NT4_AND_ABOVE
: val
= "DMSPEC_NT4_AND_ABOVE"; break;
903 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
906 static enum ndr_err_code
ndr_push_spoolss_DeviceModeOrientation(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeOrientation r
)
908 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
909 return NDR_ERR_SUCCESS
;
912 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeOrientation(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeOrientation
*r
)
915 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
917 return NDR_ERR_SUCCESS
;
920 _PUBLIC_
void ndr_print_spoolss_DeviceModeOrientation(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeOrientation r
)
922 const char *val
= NULL
;
925 case DMORIENT_PORTRAIT
: val
= "DMORIENT_PORTRAIT"; break;
926 case DMORIENT_LANDSCAPE
: val
= "DMORIENT_LANDSCAPE"; break;
928 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
931 static enum ndr_err_code
ndr_push_spoolss_DeviceModePaperSize(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModePaperSize r
)
933 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
934 return NDR_ERR_SUCCESS
;
937 static enum ndr_err_code
ndr_pull_spoolss_DeviceModePaperSize(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModePaperSize
*r
)
940 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
942 return NDR_ERR_SUCCESS
;
945 _PUBLIC_
void ndr_print_spoolss_DeviceModePaperSize(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModePaperSize r
)
947 const char *val
= NULL
;
950 case DMPAPER_LETTER
: val
= "DMPAPER_LETTER"; break;
951 case DMPAPER_LETTERSMALL
: val
= "DMPAPER_LETTERSMALL"; break;
952 case DMPAPER_TABLOID
: val
= "DMPAPER_TABLOID"; break;
953 case DMPAPER_LEDGER
: val
= "DMPAPER_LEDGER"; break;
954 case DMPAPER_LEGAL
: val
= "DMPAPER_LEGAL"; break;
955 case DMPAPER_STATEMENT
: val
= "DMPAPER_STATEMENT"; break;
956 case DMPAPER_EXECUTIVE
: val
= "DMPAPER_EXECUTIVE"; break;
957 case DMPAPER_A3
: val
= "DMPAPER_A3"; break;
958 case DMPAPER_A4
: val
= "DMPAPER_A4"; break;
959 case DMPAPER_A4SMALL
: val
= "DMPAPER_A4SMALL"; break;
960 case DMPAPER_A5
: val
= "DMPAPER_A5"; break;
961 case DMPAPER_B4
: val
= "DMPAPER_B4"; break;
962 case DMPAPER_B5
: val
= "DMPAPER_B5"; break;
963 case DMPAPER_FOLIO
: val
= "DMPAPER_FOLIO"; break;
964 case DMPAPER_QUARTO
: val
= "DMPAPER_QUARTO"; break;
965 case DMPAPER_10X14
: val
= "DMPAPER_10X14"; break;
966 case DMPAPER_11X17
: val
= "DMPAPER_11X17"; break;
967 case DMPAPER_NOTE
: val
= "DMPAPER_NOTE"; break;
968 case DMPAPER_ENV_9
: val
= "DMPAPER_ENV_9"; break;
969 case DMPAPER_ENV_10
: val
= "DMPAPER_ENV_10"; break;
970 case DMPAPER_ENV_11
: val
= "DMPAPER_ENV_11"; break;
971 case DMPAPER_ENV_12
: val
= "DMPAPER_ENV_12"; break;
972 case DMPAPER_ENV_14
: val
= "DMPAPER_ENV_14"; break;
973 case DMPAPER_CSHEET
: val
= "DMPAPER_CSHEET"; break;
974 case DMPAPER_DSHEET
: val
= "DMPAPER_DSHEET"; break;
975 case DMPAPER_ESHEET
: val
= "DMPAPER_ESHEET"; break;
976 case DMPAPER_ENV_DL
: val
= "DMPAPER_ENV_DL"; break;
977 case DMPAPER_ENV_C5
: val
= "DMPAPER_ENV_C5"; break;
978 case DMPAPER_ENV_C3
: val
= "DMPAPER_ENV_C3"; break;
979 case DMPAPER_ENV_C4
: val
= "DMPAPER_ENV_C4"; break;
980 case DMPAPER_ENV_C6
: val
= "DMPAPER_ENV_C6"; break;
981 case DMPAPER_ENV_C65
: val
= "DMPAPER_ENV_C65"; break;
982 case DMPAPER_ENV_B4
: val
= "DMPAPER_ENV_B4"; break;
983 case DMPAPER_ENV_B5
: val
= "DMPAPER_ENV_B5"; break;
984 case DMPAPER_ENV_B6
: val
= "DMPAPER_ENV_B6"; break;
985 case DMPAPER_ENV_ITALY
: val
= "DMPAPER_ENV_ITALY"; break;
986 case DMPAPER_ENV_MONARCH
: val
= "DMPAPER_ENV_MONARCH"; break;
987 case DMPAPER_ENV_PERSONAL
: val
= "DMPAPER_ENV_PERSONAL"; break;
988 case DMPAPER_FANFOLD_US
: val
= "DMPAPER_FANFOLD_US"; break;
989 case DMPAPER_FANFOLD_STD_GERMAN
: val
= "DMPAPER_FANFOLD_STD_GERMAN"; break;
990 case DMPAPER_FANFOLD_LGL_GERMAN
: val
= "DMPAPER_FANFOLD_LGL_GERMAN"; break;
991 case DMPAPER_DBL_JAPANESE_POSTCARD
: val
= "DMPAPER_DBL_JAPANESE_POSTCARD"; break;
992 case DMPAPER_A6
: val
= "DMPAPER_A6"; break;
993 case DMPAPER_JENV_KAKU2
: val
= "DMPAPER_JENV_KAKU2"; break;
994 case DMPAPER_JENV_KAKU3
: val
= "DMPAPER_JENV_KAKU3"; break;
995 case DMPAPER_JENV_CHOU3
: val
= "DMPAPER_JENV_CHOU3"; break;
996 case DMPAPER_JENV_CHOU4
: val
= "DMPAPER_JENV_CHOU4"; break;
997 case DMPAPER_LETTER_ROTATED
: val
= "DMPAPER_LETTER_ROTATED"; break;
998 case DMPAPER_A3_ROTATED
: val
= "DMPAPER_A3_ROTATED"; break;
999 case DMPAPER_A4_ROTATED
: val
= "DMPAPER_A4_ROTATED"; break;
1000 case DMPAPER_A5_ROTATED
: val
= "DMPAPER_A5_ROTATED"; break;
1001 case DMPAPER_B4_JIS_ROTATED
: val
= "DMPAPER_B4_JIS_ROTATED"; break;
1002 case DMPAPER_B5_JIS_ROTATED
: val
= "DMPAPER_B5_JIS_ROTATED"; break;
1003 case DMPAPER_JAPANESE_POSTCARD_ROTATED
: val
= "DMPAPER_JAPANESE_POSTCARD_ROTATED"; break;
1004 case DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED
: val
= "DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED"; break;
1005 case DMPAPER_A6_ROTATED
: val
= "DMPAPER_A6_ROTATED"; break;
1006 case DMPAPER_JENV_KAKU2_ROTATED
: val
= "DMPAPER_JENV_KAKU2_ROTATED"; break;
1007 case DMPAPER_JENV_KAKU3_ROTATED
: val
= "DMPAPER_JENV_KAKU3_ROTATED"; break;
1008 case DMPAPER_JENV_CHOU3_ROTATED
: val
= "DMPAPER_JENV_CHOU3_ROTATED"; break;
1009 case DMPAPER_JENV_CHOU4_ROTATED
: val
= "DMPAPER_JENV_CHOU4_ROTATED"; break;
1010 case DMPAPER_B6_JIS
: val
= "DMPAPER_B6_JIS"; break;
1011 case DMPAPER_B6_JIS_ROTATED
: val
= "DMPAPER_B6_JIS_ROTATED"; break;
1012 case DMPAPER_12X11
: val
= "DMPAPER_12X11"; break;
1013 case DMPAPER_JENV_YOU4
: val
= "DMPAPER_JENV_YOU4"; break;
1014 case DMPAPER_JENV_YOU4_ROTATED
: val
= "DMPAPER_JENV_YOU4_ROTATED"; break;
1015 case DMPAPER_P16K
: val
= "DMPAPER_P16K"; break;
1016 case DMPAPER_P32K
: val
= "DMPAPER_P32K"; break;
1017 case DMPAPER_P32KBIG
: val
= "DMPAPER_P32KBIG"; break;
1018 case DMPAPER_PENV_1
: val
= "DMPAPER_PENV_1"; break;
1019 case DMPAPER_PENV_2
: val
= "DMPAPER_PENV_2"; break;
1020 case DMPAPER_PENV_3
: val
= "DMPAPER_PENV_3"; break;
1021 case DMPAPER_PENV_4
: val
= "DMPAPER_PENV_4"; break;
1022 case DMPAPER_PENV_5
: val
= "DMPAPER_PENV_5"; break;
1023 case DMPAPER_PENV_6
: val
= "DMPAPER_PENV_6"; break;
1024 case DMPAPER_PENV_7
: val
= "DMPAPER_PENV_7"; break;
1025 case DMPAPER_PENV_8
: val
= "DMPAPER_PENV_8"; break;
1026 case DMPAPER_PENV_9
: val
= "DMPAPER_PENV_9"; break;
1027 case DMPAPER_PENV_10
: val
= "DMPAPER_PENV_10"; break;
1028 case DMPAPER_P16K_ROTATED
: val
= "DMPAPER_P16K_ROTATED"; break;
1029 case DMPAPER_P32K_ROTATED
: val
= "DMPAPER_P32K_ROTATED"; break;
1030 case DMPAPER_P32KBIG_ROTATED
: val
= "DMPAPER_P32KBIG_ROTATED"; break;
1031 case DMPAPER_PENV_1_ROTATED
: val
= "DMPAPER_PENV_1_ROTATED"; break;
1032 case DMPAPER_PENV_2_ROTATED
: val
= "DMPAPER_PENV_2_ROTATED"; break;
1033 case DMPAPER_PENV_3_ROTATED
: val
= "DMPAPER_PENV_3_ROTATED"; break;
1034 case DMPAPER_PENV_4_ROTATED
: val
= "DMPAPER_PENV_4_ROTATED"; break;
1035 case DMPAPER_PENV_5_ROTATED
: val
= "DMPAPER_PENV_5_ROTATED"; break;
1036 case DMPAPER_PENV_6_ROTATED
: val
= "DMPAPER_PENV_6_ROTATED"; break;
1037 case DMPAPER_PENV_7_ROTATED
: val
= "DMPAPER_PENV_7_ROTATED"; break;
1038 case DMPAPER_PENV_8_ROTATED
: val
= "DMPAPER_PENV_8_ROTATED"; break;
1039 case DMPAPER_PENV_9_ROTATED
: val
= "DMPAPER_PENV_9_ROTATED"; break;
1040 case DMPAPER_PENV_10_ROTATED
: val
= "DMPAPER_PENV_10_ROTATED"; break;
1042 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1045 static enum ndr_err_code
ndr_push_spoolss_DeviceModeDefaultSource(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeDefaultSource r
)
1047 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
1048 return NDR_ERR_SUCCESS
;
1051 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeDefaultSource(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeDefaultSource
*r
)
1054 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
1056 return NDR_ERR_SUCCESS
;
1059 _PUBLIC_
void ndr_print_spoolss_DeviceModeDefaultSource(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeDefaultSource r
)
1061 const char *val
= NULL
;
1064 case DMBIN_UPPER
: val
= "DMBIN_UPPER"; break;
1065 case DMBIN_LOWER
: val
= "DMBIN_LOWER"; break;
1066 case DMBIN_MIDDLE
: val
= "DMBIN_MIDDLE"; break;
1067 case DMBIN_MANUAL
: val
= "DMBIN_MANUAL"; break;
1068 case DMBIN_ENVELOPE
: val
= "DMBIN_ENVELOPE"; break;
1069 case DMBIN_ENVMANUAL
: val
= "DMBIN_ENVMANUAL"; break;
1070 case DMBIN_AUTO
: val
= "DMBIN_AUTO"; break;
1071 case DMBIN_TRACTOR
: val
= "DMBIN_TRACTOR"; break;
1072 case DMBIN_SMALLFMT
: val
= "DMBIN_SMALLFMT"; break;
1073 case DMBIN_LARGEFMT
: val
= "DMBIN_LARGEFMT"; break;
1074 case DMBIN_LARGECAPACITY
: val
= "DMBIN_LARGECAPACITY"; break;
1075 case DMBIN_CASSETTE
: val
= "DMBIN_CASSETTE"; break;
1076 case DMBIN_FORMSOURCE
: val
= "DMBIN_FORMSOURCE"; break;
1078 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1081 static enum ndr_err_code
ndr_push_spoolss_DeviceModePrintQuality(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModePrintQuality r
)
1083 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
1084 return NDR_ERR_SUCCESS
;
1087 static enum ndr_err_code
ndr_pull_spoolss_DeviceModePrintQuality(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModePrintQuality
*r
)
1090 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
1092 return NDR_ERR_SUCCESS
;
1095 _PUBLIC_
void ndr_print_spoolss_DeviceModePrintQuality(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModePrintQuality r
)
1097 const char *val
= NULL
;
1100 case DMRES_HIGH
: val
= "DMRES_HIGH"; break;
1101 case DMRES_MEDIUM
: val
= "DMRES_MEDIUM"; break;
1102 case DMRES_LOW
: val
= "DMRES_LOW"; break;
1103 case DMRES_DRAFT
: val
= "DMRES_DRAFT"; break;
1105 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1108 static enum ndr_err_code
ndr_push_spoolss_DeviceModeColor(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeColor r
)
1110 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
1111 return NDR_ERR_SUCCESS
;
1114 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeColor(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeColor
*r
)
1117 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
1119 return NDR_ERR_SUCCESS
;
1122 _PUBLIC_
void ndr_print_spoolss_DeviceModeColor(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeColor r
)
1124 const char *val
= NULL
;
1127 case DMRES_MONOCHROME
: val
= "DMRES_MONOCHROME"; break;
1128 case DMRES_COLOR
: val
= "DMRES_COLOR"; break;
1130 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1133 static enum ndr_err_code
ndr_push_spoolss_DeviceModeDuplex(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeDuplex r
)
1135 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
1136 return NDR_ERR_SUCCESS
;
1139 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeDuplex(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeDuplex
*r
)
1142 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
1144 return NDR_ERR_SUCCESS
;
1147 _PUBLIC_
void ndr_print_spoolss_DeviceModeDuplex(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeDuplex r
)
1149 const char *val
= NULL
;
1152 case DMDUP_SIMPLEX
: val
= "DMDUP_SIMPLEX"; break;
1153 case DMDUP_VERTICAL
: val
= "DMDUP_VERTICAL"; break;
1154 case DMDUP_HORIZONTAL
: val
= "DMDUP_HORIZONTAL"; break;
1156 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1159 static enum ndr_err_code
ndr_push_spoolss_DeviceModeTTOption(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeTTOption r
)
1161 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
1162 return NDR_ERR_SUCCESS
;
1165 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeTTOption(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeTTOption
*r
)
1168 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
1170 return NDR_ERR_SUCCESS
;
1173 _PUBLIC_
void ndr_print_spoolss_DeviceModeTTOption(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeTTOption r
)
1175 const char *val
= NULL
;
1178 case DMTT_BITMAP
: val
= "DMTT_BITMAP"; break;
1179 case DMTT_DOWNLOAD
: val
= "DMTT_DOWNLOAD"; break;
1180 case DMTT_SUBDEV
: val
= "DMTT_SUBDEV"; break;
1181 case DMTT_DOWNLOAD_OUTLINE
: val
= "DMTT_DOWNLOAD_OUTLINE"; break;
1183 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1186 static enum ndr_err_code
ndr_push_spoolss_DeviceModeCollate(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeCollate r
)
1188 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
1189 return NDR_ERR_SUCCESS
;
1192 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeCollate(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeCollate
*r
)
1195 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
1197 return NDR_ERR_SUCCESS
;
1200 _PUBLIC_
void ndr_print_spoolss_DeviceModeCollate(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeCollate r
)
1202 const char *val
= NULL
;
1205 case DMCOLLATE_FALSE
: val
= "DMCOLLATE_FALSE"; break;
1206 case DMCOLLATE_TRUE
: val
= "DMCOLLATE_TRUE"; break;
1208 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1211 static enum ndr_err_code
ndr_push_spoolss_DeviceModeNUp(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeNUp r
)
1213 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1214 return NDR_ERR_SUCCESS
;
1217 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeNUp(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeNUp
*r
)
1220 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1222 return NDR_ERR_SUCCESS
;
1225 _PUBLIC_
void ndr_print_spoolss_DeviceModeNUp(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeNUp r
)
1227 const char *val
= NULL
;
1230 case DMNUP_SYSTEM
: val
= "DMNUP_SYSTEM"; break;
1231 case DMNUP_ONEUP
: val
= "DMNUP_ONEUP"; break;
1233 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1236 static enum ndr_err_code
ndr_push_spoolss_DeviceModeICMMethod(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeICMMethod r
)
1238 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1239 return NDR_ERR_SUCCESS
;
1242 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeICMMethod(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeICMMethod
*r
)
1245 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1247 return NDR_ERR_SUCCESS
;
1250 _PUBLIC_
void ndr_print_spoolss_DeviceModeICMMethod(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeICMMethod r
)
1252 const char *val
= NULL
;
1255 case DMICMMETHOD_NONE
: val
= "DMICMMETHOD_NONE"; break;
1256 case DMICMMETHOD_SYSTEM
: val
= "DMICMMETHOD_SYSTEM"; break;
1257 case DMICMMETHOD_DRIVER
: val
= "DMICMMETHOD_DRIVER"; break;
1258 case DMICMMETHOD_DEVICE
: val
= "DMICMMETHOD_DEVICE"; break;
1260 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1263 static enum ndr_err_code
ndr_push_spoolss_DeviceModeICMIntent(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeICMIntent r
)
1265 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1266 return NDR_ERR_SUCCESS
;
1269 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeICMIntent(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeICMIntent
*r
)
1272 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1274 return NDR_ERR_SUCCESS
;
1277 _PUBLIC_
void ndr_print_spoolss_DeviceModeICMIntent(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeICMIntent r
)
1279 const char *val
= NULL
;
1282 case DMICM_SATURATE
: val
= "DMICM_SATURATE"; break;
1283 case DMICM_CONTRAST
: val
= "DMICM_CONTRAST"; break;
1284 case DMICM_COLORIMETRIC
: val
= "DMICM_COLORIMETRIC"; break;
1285 case DMICM_ABS_COLORIMETRIC
: val
= "DMICM_ABS_COLORIMETRIC"; break;
1287 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1290 static enum ndr_err_code
ndr_push_spoolss_DeviceModeMediaType(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeMediaType r
)
1292 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1293 return NDR_ERR_SUCCESS
;
1296 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeMediaType(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeMediaType
*r
)
1299 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1301 return NDR_ERR_SUCCESS
;
1304 _PUBLIC_
void ndr_print_spoolss_DeviceModeMediaType(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeMediaType r
)
1306 const char *val
= NULL
;
1309 case DMMEDIA_STANDARD
: val
= "DMMEDIA_STANDARD"; break;
1310 case DMMEDIA_TRANSPARENCY
: val
= "DMMEDIA_TRANSPARENCY"; break;
1311 case DMMEDIA_GLOSSY
: val
= "DMMEDIA_GLOSSY"; break;
1313 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1316 static enum ndr_err_code
ndr_push_spoolss_DeviceModeDitherType(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DeviceModeDitherType r
)
1318 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
1319 return NDR_ERR_SUCCESS
;
1322 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeDitherType(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DeviceModeDitherType
*r
)
1325 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
1327 return NDR_ERR_SUCCESS
;
1330 _PUBLIC_
void ndr_print_spoolss_DeviceModeDitherType(struct ndr_print
*ndr
, const char *name
, enum spoolss_DeviceModeDitherType r
)
1332 const char *val
= NULL
;
1335 case DMDITHER_NONE
: val
= "DMDITHER_NONE"; break;
1336 case DMDITHER_COARSE
: val
= "DMDITHER_COARSE"; break;
1337 case DMDITHER_FINE
: val
= "DMDITHER_FINE"; break;
1338 case DMDITHER_LINEART
: val
= "DMDITHER_LINEART"; break;
1339 case DMDITHER_ERRORDIFFUSION
: val
= "DMDITHER_ERRORDIFFUSION"; break;
1340 case DMDITHER_RESERVED6
: val
= "DMDITHER_RESERVED6"; break;
1341 case DMDITHER_RESERVED7
: val
= "DMDITHER_RESERVED7"; break;
1342 case DMDITHER_RESERVED8
: val
= "DMDITHER_RESERVED8"; break;
1343 case DMDITHER_RESERVED9
: val
= "DMDITHER_RESERVED9"; break;
1344 case DMDITHER_GRAYSCALE
: val
= "DMDITHER_GRAYSCALE"; break;
1346 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
1349 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DeviceMode(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DeviceMode
*r
)
1351 if (ndr_flags
& NDR_SCALARS
) {
1352 NDR_CHECK(ndr_push_align(ndr
, 4));
1353 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->devicename
, MAXDEVICENAME
, sizeof(uint16_t), CH_UTF16
));
1354 NDR_CHECK(ndr_push_spoolss_DeviceModeSpecVersion(ndr
, NDR_SCALARS
, r
->specversion
));
1355 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->driverversion
));
1356 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->size
));
1357 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->driverextra_data
.length
));
1358 NDR_CHECK(ndr_push_spoolss_DeviceModeFields(ndr
, NDR_SCALARS
, r
->fields
));
1359 NDR_CHECK(ndr_push_spoolss_DeviceModeOrientation(ndr
, NDR_SCALARS
, r
->orientation
));
1360 NDR_CHECK(ndr_push_spoolss_DeviceModePaperSize(ndr
, NDR_SCALARS
, r
->papersize
));
1361 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->paperlength
));
1362 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->paperwidth
));
1363 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->scale
));
1364 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->copies
));
1365 NDR_CHECK(ndr_push_spoolss_DeviceModeDefaultSource(ndr
, NDR_SCALARS
, r
->defaultsource
));
1366 NDR_CHECK(ndr_push_spoolss_DeviceModePrintQuality(ndr
, NDR_SCALARS
, r
->printquality
));
1367 NDR_CHECK(ndr_push_spoolss_DeviceModeColor(ndr
, NDR_SCALARS
, r
->color
));
1368 NDR_CHECK(ndr_push_spoolss_DeviceModeDuplex(ndr
, NDR_SCALARS
, r
->duplex
));
1369 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->yresolution
));
1370 NDR_CHECK(ndr_push_spoolss_DeviceModeTTOption(ndr
, NDR_SCALARS
, r
->ttoption
));
1371 NDR_CHECK(ndr_push_spoolss_DeviceModeCollate(ndr
, NDR_SCALARS
, r
->collate
));
1372 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->formname
, MAXDEVICENAME
, sizeof(uint16_t), CH_UTF16
));
1373 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->logpixels
));
1374 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bitsperpel
));
1375 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pelswidth
));
1376 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pelsheight
));
1377 NDR_CHECK(ndr_push_spoolss_DeviceModeNUp(ndr
, NDR_SCALARS
, r
->displayflags
));
1378 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->displayfrequency
));
1379 NDR_CHECK(ndr_push_spoolss_DeviceModeICMMethod(ndr
, NDR_SCALARS
, r
->icmmethod
));
1380 NDR_CHECK(ndr_push_spoolss_DeviceModeICMIntent(ndr
, NDR_SCALARS
, r
->icmintent
));
1381 NDR_CHECK(ndr_push_spoolss_DeviceModeMediaType(ndr
, NDR_SCALARS
, r
->mediatype
));
1382 NDR_CHECK(ndr_push_spoolss_DeviceModeDitherType(ndr
, NDR_SCALARS
, r
->dithertype
));
1383 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved1
));
1384 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved2
));
1385 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->panningwidth
));
1386 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->panningheight
));
1388 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
1389 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
1391 struct ndr_push
*_ndr_driverextra_data
;
1392 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_driverextra_data
, 0, r
->driverextra_data
.length
));
1393 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_driverextra_data
, NDR_SCALARS
, r
->driverextra_data
));
1394 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_driverextra_data
, 0, r
->driverextra_data
.length
));
1396 ndr
->flags
= _flags_save_DATA_BLOB
;
1398 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
1400 if (ndr_flags
& NDR_BUFFERS
) {
1402 return NDR_ERR_SUCCESS
;
1405 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DeviceMode(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DeviceMode
*r
)
1407 if (ndr_flags
& NDR_SCALARS
) {
1408 NDR_CHECK(ndr_pull_align(ndr
, 4));
1409 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->devicename
, MAXDEVICENAME
, sizeof(uint16_t), CH_UTF16
));
1410 NDR_CHECK(ndr_pull_spoolss_DeviceModeSpecVersion(ndr
, NDR_SCALARS
, &r
->specversion
));
1411 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->driverversion
));
1412 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->size
));
1413 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->__driverextra_length
));
1414 NDR_CHECK(ndr_pull_spoolss_DeviceModeFields(ndr
, NDR_SCALARS
, &r
->fields
));
1415 NDR_CHECK(ndr_pull_spoolss_DeviceModeOrientation(ndr
, NDR_SCALARS
, &r
->orientation
));
1416 NDR_CHECK(ndr_pull_spoolss_DeviceModePaperSize(ndr
, NDR_SCALARS
, &r
->papersize
));
1417 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->paperlength
));
1418 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->paperwidth
));
1419 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->scale
));
1420 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->copies
));
1421 NDR_CHECK(ndr_pull_spoolss_DeviceModeDefaultSource(ndr
, NDR_SCALARS
, &r
->defaultsource
));
1422 NDR_CHECK(ndr_pull_spoolss_DeviceModePrintQuality(ndr
, NDR_SCALARS
, &r
->printquality
));
1423 NDR_CHECK(ndr_pull_spoolss_DeviceModeColor(ndr
, NDR_SCALARS
, &r
->color
));
1424 NDR_CHECK(ndr_pull_spoolss_DeviceModeDuplex(ndr
, NDR_SCALARS
, &r
->duplex
));
1425 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->yresolution
));
1426 NDR_CHECK(ndr_pull_spoolss_DeviceModeTTOption(ndr
, NDR_SCALARS
, &r
->ttoption
));
1427 NDR_CHECK(ndr_pull_spoolss_DeviceModeCollate(ndr
, NDR_SCALARS
, &r
->collate
));
1428 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->formname
, MAXDEVICENAME
, sizeof(uint16_t), CH_UTF16
));
1429 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->logpixels
));
1430 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bitsperpel
));
1431 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pelswidth
));
1432 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pelsheight
));
1433 NDR_CHECK(ndr_pull_spoolss_DeviceModeNUp(ndr
, NDR_SCALARS
, &r
->displayflags
));
1434 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->displayfrequency
));
1435 NDR_CHECK(ndr_pull_spoolss_DeviceModeICMMethod(ndr
, NDR_SCALARS
, &r
->icmmethod
));
1436 NDR_CHECK(ndr_pull_spoolss_DeviceModeICMIntent(ndr
, NDR_SCALARS
, &r
->icmintent
));
1437 NDR_CHECK(ndr_pull_spoolss_DeviceModeMediaType(ndr
, NDR_SCALARS
, &r
->mediatype
));
1438 NDR_CHECK(ndr_pull_spoolss_DeviceModeDitherType(ndr
, NDR_SCALARS
, &r
->dithertype
));
1439 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved1
));
1440 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
1441 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->panningwidth
));
1442 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->panningheight
));
1444 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
1445 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
1447 struct ndr_pull
*_ndr_driverextra_data
;
1448 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_driverextra_data
, 0, r
->__driverextra_length
));
1449 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_driverextra_data
, NDR_SCALARS
, &r
->driverextra_data
));
1450 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_driverextra_data
, 0, r
->__driverextra_length
));
1452 ndr
->flags
= _flags_save_DATA_BLOB
;
1454 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
1456 if (ndr_flags
& NDR_BUFFERS
) {
1458 return NDR_ERR_SUCCESS
;
1461 _PUBLIC_
void ndr_print_spoolss_DeviceMode(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DeviceMode
*r
)
1463 ndr_print_struct(ndr
, name
, "spoolss_DeviceMode");
1465 ndr_print_string(ndr
, "devicename", r
->devicename
);
1466 ndr_print_spoolss_DeviceModeSpecVersion(ndr
, "specversion", r
->specversion
);
1467 ndr_print_uint16(ndr
, "driverversion", r
->driverversion
);
1468 ndr_print_uint16(ndr
, "size", r
->size
);
1469 ndr_print_uint16(ndr
, "__driverextra_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->driverextra_data
.length
:r
->__driverextra_length
);
1470 ndr_print_spoolss_DeviceModeFields(ndr
, "fields", r
->fields
);
1471 ndr_print_spoolss_DeviceModeOrientation(ndr
, "orientation", r
->orientation
);
1472 ndr_print_spoolss_DeviceModePaperSize(ndr
, "papersize", r
->papersize
);
1473 ndr_print_uint16(ndr
, "paperlength", r
->paperlength
);
1474 ndr_print_uint16(ndr
, "paperwidth", r
->paperwidth
);
1475 ndr_print_uint16(ndr
, "scale", r
->scale
);
1476 ndr_print_uint16(ndr
, "copies", r
->copies
);
1477 ndr_print_spoolss_DeviceModeDefaultSource(ndr
, "defaultsource", r
->defaultsource
);
1478 ndr_print_spoolss_DeviceModePrintQuality(ndr
, "printquality", r
->printquality
);
1479 ndr_print_spoolss_DeviceModeColor(ndr
, "color", r
->color
);
1480 ndr_print_spoolss_DeviceModeDuplex(ndr
, "duplex", r
->duplex
);
1481 ndr_print_uint16(ndr
, "yresolution", r
->yresolution
);
1482 ndr_print_spoolss_DeviceModeTTOption(ndr
, "ttoption", r
->ttoption
);
1483 ndr_print_spoolss_DeviceModeCollate(ndr
, "collate", r
->collate
);
1484 ndr_print_string(ndr
, "formname", r
->formname
);
1485 ndr_print_uint16(ndr
, "logpixels", r
->logpixels
);
1486 ndr_print_uint32(ndr
, "bitsperpel", r
->bitsperpel
);
1487 ndr_print_uint32(ndr
, "pelswidth", r
->pelswidth
);
1488 ndr_print_uint32(ndr
, "pelsheight", r
->pelsheight
);
1489 ndr_print_spoolss_DeviceModeNUp(ndr
, "displayflags", r
->displayflags
);
1490 ndr_print_uint32(ndr
, "displayfrequency", r
->displayfrequency
);
1491 ndr_print_spoolss_DeviceModeICMMethod(ndr
, "icmmethod", r
->icmmethod
);
1492 ndr_print_spoolss_DeviceModeICMIntent(ndr
, "icmintent", r
->icmintent
);
1493 ndr_print_spoolss_DeviceModeMediaType(ndr
, "mediatype", r
->mediatype
);
1494 ndr_print_spoolss_DeviceModeDitherType(ndr
, "dithertype", r
->dithertype
);
1495 ndr_print_uint32(ndr
, "reserved1", r
->reserved1
);
1496 ndr_print_uint32(ndr
, "reserved2", r
->reserved2
);
1497 ndr_print_uint32(ndr
, "panningwidth", r
->panningwidth
);
1498 ndr_print_uint32(ndr
, "panningheight", r
->panningheight
);
1499 ndr_print_DATA_BLOB(ndr
, "driverextra_data", r
->driverextra_data
);
1503 _PUBLIC_
size_t ndr_size_spoolss_DeviceMode(const struct spoolss_DeviceMode
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1505 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DeviceMode
, ic
);
1508 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_EnumPrinterFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
1510 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
1511 return NDR_ERR_SUCCESS
;
1514 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_EnumPrinterFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
1517 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
1519 return NDR_ERR_SUCCESS
;
1522 _PUBLIC_
void ndr_print_spoolss_EnumPrinterFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
1524 ndr_print_uint32(ndr
, name
, r
);
1526 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_DEFAULT", PRINTER_ENUM_DEFAULT
, r
);
1527 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL
, r
);
1528 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_CONNECTIONS", PRINTER_ENUM_CONNECTIONS
, r
);
1529 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_FAVORITE", PRINTER_ENUM_FAVORITE
, r
);
1530 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_NAME", PRINTER_ENUM_NAME
, r
);
1531 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_REMOTE", PRINTER_ENUM_REMOTE
, r
);
1532 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_SHARED", PRINTER_ENUM_SHARED
, r
);
1533 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_NETWORK", PRINTER_ENUM_NETWORK
, r
);
1534 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_EXPAND", PRINTER_ENUM_EXPAND
, r
);
1535 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_CONTAINER", PRINTER_ENUM_CONTAINER
, r
);
1536 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON1", PRINTER_ENUM_ICON1
, r
);
1537 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON2", PRINTER_ENUM_ICON2
, r
);
1538 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON3", PRINTER_ENUM_ICON3
, r
);
1539 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON4", PRINTER_ENUM_ICON4
, r
);
1540 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON5", PRINTER_ENUM_ICON5
, r
);
1541 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON6", PRINTER_ENUM_ICON6
, r
);
1542 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON7", PRINTER_ENUM_ICON7
, r
);
1543 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_ICON8", PRINTER_ENUM_ICON8
, r
);
1544 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ENUM_HIDE", PRINTER_ENUM_HIDE
, r
);
1548 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
1550 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
1551 return NDR_ERR_SUCCESS
;
1554 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
1557 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
1559 return NDR_ERR_SUCCESS
;
1562 _PUBLIC_
void ndr_print_spoolss_PrinterAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
1564 ndr_print_uint32(ndr
, name
, r
);
1566 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_QUEUED", PRINTER_ATTRIBUTE_QUEUED
, r
);
1567 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DIRECT", PRINTER_ATTRIBUTE_DIRECT
, r
);
1568 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DEFAULT", PRINTER_ATTRIBUTE_DEFAULT
, r
);
1569 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_SHARED", PRINTER_ATTRIBUTE_SHARED
, r
);
1570 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_NETWORK", PRINTER_ATTRIBUTE_NETWORK
, r
);
1571 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_HIDDEN", PRINTER_ATTRIBUTE_HIDDEN
, r
);
1572 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_LOCAL", PRINTER_ATTRIBUTE_LOCAL
, r
);
1573 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ
, r
);
1574 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS
, r
);
1575 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST
, r
);
1576 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_WORK_OFFLINE", PRINTER_ATTRIBUTE_WORK_OFFLINE
, r
);
1577 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_BIDI", PRINTER_ATTRIBUTE_ENABLE_BIDI
, r
);
1578 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_RAW_ONLY", PRINTER_ATTRIBUTE_RAW_ONLY
, r
);
1579 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_PUBLISHED", PRINTER_ATTRIBUTE_PUBLISHED
, r
);
1580 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_FAX", PRINTER_ATTRIBUTE_FAX
, r
);
1581 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ATTRIBUTE_TS", PRINTER_ATTRIBUTE_TS
, r
);
1585 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo1
*r
)
1587 if (ndr_flags
& NDR_SCALARS
) {
1588 NDR_CHECK(ndr_push_align(ndr
, 5));
1589 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->flags
));
1591 uint32_t _flags_save_string
= ndr
->flags
;
1592 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1593 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->description
));
1594 ndr
->flags
= _flags_save_string
;
1597 uint32_t _flags_save_string
= ndr
->flags
;
1598 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1599 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->name
));
1600 ndr
->flags
= _flags_save_string
;
1603 uint32_t _flags_save_string
= ndr
->flags
;
1604 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1605 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->comment
));
1606 ndr
->flags
= _flags_save_string
;
1608 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
1610 if (ndr_flags
& NDR_BUFFERS
) {
1612 uint32_t _flags_save_string
= ndr
->flags
;
1613 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1614 if (r
->description
) {
1615 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->description
));
1616 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->description
));
1617 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->description
));
1619 ndr
->flags
= _flags_save_string
;
1622 uint32_t _flags_save_string
= ndr
->flags
;
1623 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1625 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->name
));
1626 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->name
));
1627 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->name
));
1629 ndr
->flags
= _flags_save_string
;
1632 uint32_t _flags_save_string
= ndr
->flags
;
1633 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1635 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->comment
));
1636 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->comment
));
1637 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->comment
));
1639 ndr
->flags
= _flags_save_string
;
1642 return NDR_ERR_SUCCESS
;
1645 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo1
*r
)
1647 uint32_t _ptr_description
;
1648 TALLOC_CTX
*_mem_save_description_0
;
1650 TALLOC_CTX
*_mem_save_name_0
;
1651 uint32_t _ptr_comment
;
1652 TALLOC_CTX
*_mem_save_comment_0
;
1653 if (ndr_flags
& NDR_SCALARS
) {
1654 NDR_CHECK(ndr_pull_align(ndr
, 5));
1655 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->flags
));
1657 uint32_t _flags_save_string
= ndr
->flags
;
1658 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1659 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_description
));
1660 if (_ptr_description
) {
1661 NDR_PULL_ALLOC(ndr
, r
->description
);
1662 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->description
, _ptr_description
));
1664 r
->description
= NULL
;
1666 ndr
->flags
= _flags_save_string
;
1669 uint32_t _flags_save_string
= ndr
->flags
;
1670 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1671 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
1673 NDR_PULL_ALLOC(ndr
, r
->name
);
1674 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->name
, _ptr_name
));
1678 ndr
->flags
= _flags_save_string
;
1681 uint32_t _flags_save_string
= ndr
->flags
;
1682 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1683 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1685 NDR_PULL_ALLOC(ndr
, r
->comment
);
1686 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->comment
, _ptr_comment
));
1690 ndr
->flags
= _flags_save_string
;
1692 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1694 if (ndr_flags
& NDR_BUFFERS
) {
1696 uint32_t _flags_save_string
= ndr
->flags
;
1697 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1698 if (r
->description
) {
1699 uint32_t _relative_save_offset
;
1700 _relative_save_offset
= ndr
->offset
;
1701 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->description
));
1702 _mem_save_description_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1703 NDR_PULL_SET_MEM_CTX(ndr
, r
->description
, 0);
1704 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->description
));
1705 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_description_0
, 0);
1706 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1707 ndr
->relative_highest_offset
= ndr
->offset
;
1709 ndr
->offset
= _relative_save_offset
;
1711 ndr
->flags
= _flags_save_string
;
1714 uint32_t _flags_save_string
= ndr
->flags
;
1715 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1717 uint32_t _relative_save_offset
;
1718 _relative_save_offset
= ndr
->offset
;
1719 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->name
));
1720 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1721 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
1722 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->name
));
1723 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
1724 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1725 ndr
->relative_highest_offset
= ndr
->offset
;
1727 ndr
->offset
= _relative_save_offset
;
1729 ndr
->flags
= _flags_save_string
;
1732 uint32_t _flags_save_string
= ndr
->flags
;
1733 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1735 uint32_t _relative_save_offset
;
1736 _relative_save_offset
= ndr
->offset
;
1737 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->comment
));
1738 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1739 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
1740 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->comment
));
1741 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
1742 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1743 ndr
->relative_highest_offset
= ndr
->offset
;
1745 ndr
->offset
= _relative_save_offset
;
1747 ndr
->flags
= _flags_save_string
;
1750 return NDR_ERR_SUCCESS
;
1753 _PUBLIC_
void ndr_print_spoolss_PrinterInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo1
*r
)
1755 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo1");
1757 ndr_print_spoolss_PrinterAttributes(ndr
, "flags", r
->flags
);
1758 ndr_print_ptr(ndr
, "description", r
->description
);
1760 if (r
->description
) {
1761 ndr_print_string(ndr
, "description", r
->description
);
1764 ndr_print_ptr(ndr
, "name", r
->name
);
1767 ndr_print_string(ndr
, "name", r
->name
);
1770 ndr_print_ptr(ndr
, "comment", r
->comment
);
1773 ndr_print_string(ndr
, "comment", r
->comment
);
1779 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo1(const struct spoolss_PrinterInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
1781 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo1
, ic
);
1784 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo2
*r
)
1786 uint32_t _ptr_servername
;
1787 TALLOC_CTX
*_mem_save_servername_0
;
1788 uint32_t _ptr_printername
;
1789 TALLOC_CTX
*_mem_save_printername_0
;
1790 uint32_t _ptr_sharename
;
1791 TALLOC_CTX
*_mem_save_sharename_0
;
1792 uint32_t _ptr_portname
;
1793 TALLOC_CTX
*_mem_save_portname_0
;
1794 uint32_t _ptr_drivername
;
1795 TALLOC_CTX
*_mem_save_drivername_0
;
1796 uint32_t _ptr_comment
;
1797 TALLOC_CTX
*_mem_save_comment_0
;
1798 uint32_t _ptr_location
;
1799 TALLOC_CTX
*_mem_save_location_0
;
1800 uint32_t _ptr_devmode
;
1801 TALLOC_CTX
*_mem_save_devmode_0
;
1802 uint32_t _ptr_sepfile
;
1803 TALLOC_CTX
*_mem_save_sepfile_0
;
1804 uint32_t _ptr_printprocessor
;
1805 TALLOC_CTX
*_mem_save_printprocessor_0
;
1806 uint32_t _ptr_datatype
;
1807 TALLOC_CTX
*_mem_save_datatype_0
;
1808 uint32_t _ptr_parameters
;
1809 TALLOC_CTX
*_mem_save_parameters_0
;
1810 uint32_t _ptr_secdesc
;
1811 TALLOC_CTX
*_mem_save_secdesc_0
;
1812 if (ndr_flags
& NDR_SCALARS
) {
1813 NDR_CHECK(ndr_pull_align(ndr
, 5));
1815 uint32_t _flags_save_string
= ndr
->flags
;
1816 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1817 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
1818 if (_ptr_servername
) {
1819 NDR_PULL_ALLOC(ndr
, r
->servername
);
1820 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->servername
, _ptr_servername
));
1822 r
->servername
= NULL
;
1824 ndr
->flags
= _flags_save_string
;
1827 uint32_t _flags_save_string
= ndr
->flags
;
1828 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1829 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
1830 if (_ptr_printername
) {
1831 NDR_PULL_ALLOC(ndr
, r
->printername
);
1832 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printername
, _ptr_printername
));
1834 r
->printername
= NULL
;
1836 ndr
->flags
= _flags_save_string
;
1839 uint32_t _flags_save_string
= ndr
->flags
;
1840 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1841 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
1842 if (_ptr_sharename
) {
1843 NDR_PULL_ALLOC(ndr
, r
->sharename
);
1844 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->sharename
, _ptr_sharename
));
1846 r
->sharename
= NULL
;
1848 ndr
->flags
= _flags_save_string
;
1851 uint32_t _flags_save_string
= ndr
->flags
;
1852 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1853 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_portname
));
1854 if (_ptr_portname
) {
1855 NDR_PULL_ALLOC(ndr
, r
->portname
);
1856 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->portname
, _ptr_portname
));
1860 ndr
->flags
= _flags_save_string
;
1863 uint32_t _flags_save_string
= ndr
->flags
;
1864 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1865 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_drivername
));
1866 if (_ptr_drivername
) {
1867 NDR_PULL_ALLOC(ndr
, r
->drivername
);
1868 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->drivername
, _ptr_drivername
));
1870 r
->drivername
= NULL
;
1872 ndr
->flags
= _flags_save_string
;
1875 uint32_t _flags_save_string
= ndr
->flags
;
1876 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1877 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
1879 NDR_PULL_ALLOC(ndr
, r
->comment
);
1880 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->comment
, _ptr_comment
));
1884 ndr
->flags
= _flags_save_string
;
1887 uint32_t _flags_save_string
= ndr
->flags
;
1888 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1889 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_location
));
1890 if (_ptr_location
) {
1891 NDR_PULL_ALLOC(ndr
, r
->location
);
1892 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->location
, _ptr_location
));
1896 ndr
->flags
= _flags_save_string
;
1899 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
1900 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
1901 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
1903 NDR_PULL_ALLOC(ndr
, r
->devmode
);
1904 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->devmode
, _ptr_devmode
));
1908 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
1911 uint32_t _flags_save_string
= ndr
->flags
;
1912 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1913 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sepfile
));
1915 NDR_PULL_ALLOC(ndr
, r
->sepfile
);
1916 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->sepfile
, _ptr_sepfile
));
1920 ndr
->flags
= _flags_save_string
;
1923 uint32_t _flags_save_string
= ndr
->flags
;
1924 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1925 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printprocessor
));
1926 if (_ptr_printprocessor
) {
1927 NDR_PULL_ALLOC(ndr
, r
->printprocessor
);
1928 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printprocessor
, _ptr_printprocessor
));
1930 r
->printprocessor
= NULL
;
1932 ndr
->flags
= _flags_save_string
;
1935 uint32_t _flags_save_string
= ndr
->flags
;
1936 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1937 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
1938 if (_ptr_datatype
) {
1939 NDR_PULL_ALLOC(ndr
, r
->datatype
);
1940 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->datatype
, _ptr_datatype
));
1944 ndr
->flags
= _flags_save_string
;
1947 uint32_t _flags_save_string
= ndr
->flags
;
1948 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1949 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
1950 if (_ptr_parameters
) {
1951 NDR_PULL_ALLOC(ndr
, r
->parameters
);
1952 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->parameters
, _ptr_parameters
));
1954 r
->parameters
= NULL
;
1956 ndr
->flags
= _flags_save_string
;
1959 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
1960 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
1961 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
1963 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
1964 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->secdesc
, _ptr_secdesc
));
1968 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
1970 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
1971 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
1972 if (r
->priority
> 99) {
1973 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
1975 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->defaultpriority
));
1976 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->starttime
));
1977 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->untiltime
));
1978 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
1979 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cjobs
));
1980 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->averageppm
));
1981 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
1983 if (ndr_flags
& NDR_BUFFERS
) {
1985 uint32_t _flags_save_string
= ndr
->flags
;
1986 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
1987 if (r
->servername
) {
1988 uint32_t _relative_save_offset
;
1989 _relative_save_offset
= ndr
->offset
;
1990 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->servername
));
1991 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
1992 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
1993 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->servername
));
1994 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
1995 if (ndr
->offset
> ndr
->relative_highest_offset
) {
1996 ndr
->relative_highest_offset
= ndr
->offset
;
1998 ndr
->offset
= _relative_save_offset
;
2000 ndr
->flags
= _flags_save_string
;
2003 uint32_t _flags_save_string
= ndr
->flags
;
2004 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2005 if (r
->printername
) {
2006 uint32_t _relative_save_offset
;
2007 _relative_save_offset
= ndr
->offset
;
2008 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printername
));
2009 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2010 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
2011 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printername
));
2012 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
2013 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2014 ndr
->relative_highest_offset
= ndr
->offset
;
2016 ndr
->offset
= _relative_save_offset
;
2018 ndr
->flags
= _flags_save_string
;
2021 uint32_t _flags_save_string
= ndr
->flags
;
2022 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2024 uint32_t _relative_save_offset
;
2025 _relative_save_offset
= ndr
->offset
;
2026 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->sharename
));
2027 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2028 NDR_PULL_SET_MEM_CTX(ndr
, r
->sharename
, 0);
2029 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->sharename
));
2030 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
2031 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2032 ndr
->relative_highest_offset
= ndr
->offset
;
2034 ndr
->offset
= _relative_save_offset
;
2036 ndr
->flags
= _flags_save_string
;
2039 uint32_t _flags_save_string
= ndr
->flags
;
2040 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2042 uint32_t _relative_save_offset
;
2043 _relative_save_offset
= ndr
->offset
;
2044 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->portname
));
2045 _mem_save_portname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2046 NDR_PULL_SET_MEM_CTX(ndr
, r
->portname
, 0);
2047 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->portname
));
2048 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_portname_0
, 0);
2049 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2050 ndr
->relative_highest_offset
= ndr
->offset
;
2052 ndr
->offset
= _relative_save_offset
;
2054 ndr
->flags
= _flags_save_string
;
2057 uint32_t _flags_save_string
= ndr
->flags
;
2058 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2059 if (r
->drivername
) {
2060 uint32_t _relative_save_offset
;
2061 _relative_save_offset
= ndr
->offset
;
2062 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->drivername
));
2063 _mem_save_drivername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2064 NDR_PULL_SET_MEM_CTX(ndr
, r
->drivername
, 0);
2065 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->drivername
));
2066 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_drivername_0
, 0);
2067 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2068 ndr
->relative_highest_offset
= ndr
->offset
;
2070 ndr
->offset
= _relative_save_offset
;
2072 ndr
->flags
= _flags_save_string
;
2075 uint32_t _flags_save_string
= ndr
->flags
;
2076 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2078 uint32_t _relative_save_offset
;
2079 _relative_save_offset
= ndr
->offset
;
2080 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->comment
));
2081 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2082 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
2083 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->comment
));
2084 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
2085 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2086 ndr
->relative_highest_offset
= ndr
->offset
;
2088 ndr
->offset
= _relative_save_offset
;
2090 ndr
->flags
= _flags_save_string
;
2093 uint32_t _flags_save_string
= ndr
->flags
;
2094 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2096 uint32_t _relative_save_offset
;
2097 _relative_save_offset
= ndr
->offset
;
2098 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->location
));
2099 _mem_save_location_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2100 NDR_PULL_SET_MEM_CTX(ndr
, r
->location
, 0);
2101 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->location
));
2102 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_location_0
, 0);
2103 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2104 ndr
->relative_highest_offset
= ndr
->offset
;
2106 ndr
->offset
= _relative_save_offset
;
2108 ndr
->flags
= _flags_save_string
;
2111 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
2112 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2114 uint32_t _relative_save_offset
;
2115 _relative_save_offset
= ndr
->offset
;
2116 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->devmode
));
2117 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2118 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
2120 struct ndr_pull
*_ndr_devmode
;
2121 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
2122 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
2123 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
2125 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
2126 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2127 ndr
->relative_highest_offset
= ndr
->offset
;
2129 ndr
->offset
= _relative_save_offset
;
2131 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
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
->sepfile
));
2140 _mem_save_sepfile_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2141 NDR_PULL_SET_MEM_CTX(ndr
, r
->sepfile
, 0);
2142 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->sepfile
));
2143 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sepfile_0
, 0);
2144 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2145 ndr
->relative_highest_offset
= ndr
->offset
;
2147 ndr
->offset
= _relative_save_offset
;
2149 ndr
->flags
= _flags_save_string
;
2152 uint32_t _flags_save_string
= ndr
->flags
;
2153 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2154 if (r
->printprocessor
) {
2155 uint32_t _relative_save_offset
;
2156 _relative_save_offset
= ndr
->offset
;
2157 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printprocessor
));
2158 _mem_save_printprocessor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2159 NDR_PULL_SET_MEM_CTX(ndr
, r
->printprocessor
, 0);
2160 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printprocessor
));
2161 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printprocessor_0
, 0);
2162 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2163 ndr
->relative_highest_offset
= ndr
->offset
;
2165 ndr
->offset
= _relative_save_offset
;
2167 ndr
->flags
= _flags_save_string
;
2170 uint32_t _flags_save_string
= ndr
->flags
;
2171 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2173 uint32_t _relative_save_offset
;
2174 _relative_save_offset
= ndr
->offset
;
2175 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->datatype
));
2176 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2177 NDR_PULL_SET_MEM_CTX(ndr
, r
->datatype
, 0);
2178 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->datatype
));
2179 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
2180 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2181 ndr
->relative_highest_offset
= ndr
->offset
;
2183 ndr
->offset
= _relative_save_offset
;
2185 ndr
->flags
= _flags_save_string
;
2188 uint32_t _flags_save_string
= ndr
->flags
;
2189 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2190 if (r
->parameters
) {
2191 uint32_t _relative_save_offset
;
2192 _relative_save_offset
= ndr
->offset
;
2193 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->parameters
));
2194 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2195 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
2196 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->parameters
));
2197 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
2198 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2199 ndr
->relative_highest_offset
= ndr
->offset
;
2201 ndr
->offset
= _relative_save_offset
;
2203 ndr
->flags
= _flags_save_string
;
2206 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
2207 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2209 uint32_t _relative_save_offset
;
2210 _relative_save_offset
= ndr
->offset
;
2211 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->secdesc
));
2212 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2213 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
2215 struct ndr_pull
*_ndr_secdesc
;
2216 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
2217 NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
2218 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
2220 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
2221 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2222 ndr
->relative_highest_offset
= ndr
->offset
;
2224 ndr
->offset
= _relative_save_offset
;
2226 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
2229 return NDR_ERR_SUCCESS
;
2232 _PUBLIC_
void ndr_print_spoolss_PrinterInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo2
*r
)
2234 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo2");
2236 ndr_print_ptr(ndr
, "servername", r
->servername
);
2238 if (r
->servername
) {
2239 ndr_print_string(ndr
, "servername", r
->servername
);
2242 ndr_print_ptr(ndr
, "printername", r
->printername
);
2244 if (r
->printername
) {
2245 ndr_print_string(ndr
, "printername", r
->printername
);
2248 ndr_print_ptr(ndr
, "sharename", r
->sharename
);
2251 ndr_print_string(ndr
, "sharename", r
->sharename
);
2254 ndr_print_ptr(ndr
, "portname", r
->portname
);
2257 ndr_print_string(ndr
, "portname", r
->portname
);
2260 ndr_print_ptr(ndr
, "drivername", r
->drivername
);
2262 if (r
->drivername
) {
2263 ndr_print_string(ndr
, "drivername", r
->drivername
);
2266 ndr_print_ptr(ndr
, "comment", r
->comment
);
2269 ndr_print_string(ndr
, "comment", r
->comment
);
2272 ndr_print_ptr(ndr
, "location", r
->location
);
2275 ndr_print_string(ndr
, "location", r
->location
);
2278 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
2281 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
2284 ndr_print_ptr(ndr
, "sepfile", r
->sepfile
);
2287 ndr_print_string(ndr
, "sepfile", r
->sepfile
);
2290 ndr_print_ptr(ndr
, "printprocessor", r
->printprocessor
);
2292 if (r
->printprocessor
) {
2293 ndr_print_string(ndr
, "printprocessor", r
->printprocessor
);
2296 ndr_print_ptr(ndr
, "datatype", r
->datatype
);
2299 ndr_print_string(ndr
, "datatype", r
->datatype
);
2302 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
2304 if (r
->parameters
) {
2305 ndr_print_string(ndr
, "parameters", r
->parameters
);
2308 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
2311 ndr_print_spoolss_security_descriptor(ndr
, "secdesc", r
->secdesc
);
2314 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
2315 ndr_print_uint32(ndr
, "priority", r
->priority
);
2316 ndr_print_uint32(ndr
, "defaultpriority", r
->defaultpriority
);
2317 ndr_print_uint32(ndr
, "starttime", r
->starttime
);
2318 ndr_print_uint32(ndr
, "untiltime", r
->untiltime
);
2319 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
2320 ndr_print_uint32(ndr
, "cjobs", r
->cjobs
);
2321 ndr_print_uint32(ndr
, "averageppm", r
->averageppm
);
2325 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo2(const struct spoolss_PrinterInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2327 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo2
, ic
);
2330 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo3
*r
)
2332 if (ndr_flags
& NDR_SCALARS
) {
2333 NDR_CHECK(ndr_push_align(ndr
, 5));
2335 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
2336 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2337 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->secdesc
));
2338 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
2340 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2342 if (ndr_flags
& NDR_BUFFERS
) {
2344 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
2345 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2347 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->secdesc
));
2349 struct ndr_push
*_ndr_secdesc
;
2350 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
2351 NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
2352 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
2354 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->secdesc
));
2356 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
2359 return NDR_ERR_SUCCESS
;
2362 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo3
*r
)
2364 uint32_t _ptr_secdesc
;
2365 TALLOC_CTX
*_mem_save_secdesc_0
;
2366 if (ndr_flags
& NDR_SCALARS
) {
2367 NDR_CHECK(ndr_pull_align(ndr
, 5));
2369 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
2370 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2371 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
2373 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
2374 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->secdesc
, _ptr_secdesc
));
2378 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
2380 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2382 if (ndr_flags
& NDR_BUFFERS
) {
2384 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
2385 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2387 uint32_t _relative_save_offset
;
2388 _relative_save_offset
= ndr
->offset
;
2389 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->secdesc
));
2390 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2391 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
2393 struct ndr_pull
*_ndr_secdesc
;
2394 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
2395 NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
2396 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
2398 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
2399 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2400 ndr
->relative_highest_offset
= ndr
->offset
;
2402 ndr
->offset
= _relative_save_offset
;
2404 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
2407 return NDR_ERR_SUCCESS
;
2410 _PUBLIC_
void ndr_print_spoolss_PrinterInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo3
*r
)
2412 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo3");
2414 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
2417 ndr_print_spoolss_security_descriptor(ndr
, "secdesc", r
->secdesc
);
2423 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo3(const struct spoolss_PrinterInfo3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2425 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo3
, ic
);
2428 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo4
*r
)
2430 if (ndr_flags
& NDR_SCALARS
) {
2431 NDR_CHECK(ndr_push_align(ndr
, 5));
2433 uint32_t _flags_save_string
= ndr
->flags
;
2434 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2435 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printername
));
2436 ndr
->flags
= _flags_save_string
;
2439 uint32_t _flags_save_string
= ndr
->flags
;
2440 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2441 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->servername
));
2442 ndr
->flags
= _flags_save_string
;
2444 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
2445 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2447 if (ndr_flags
& NDR_BUFFERS
) {
2449 uint32_t _flags_save_string
= ndr
->flags
;
2450 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2451 if (r
->printername
) {
2452 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->printername
));
2453 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printername
));
2454 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->printername
));
2456 ndr
->flags
= _flags_save_string
;
2459 uint32_t _flags_save_string
= ndr
->flags
;
2460 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2461 if (r
->servername
) {
2462 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->servername
));
2463 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->servername
));
2464 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->servername
));
2466 ndr
->flags
= _flags_save_string
;
2469 return NDR_ERR_SUCCESS
;
2472 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo4
*r
)
2474 uint32_t _ptr_printername
;
2475 TALLOC_CTX
*_mem_save_printername_0
;
2476 uint32_t _ptr_servername
;
2477 TALLOC_CTX
*_mem_save_servername_0
;
2478 if (ndr_flags
& NDR_SCALARS
) {
2479 NDR_CHECK(ndr_pull_align(ndr
, 5));
2481 uint32_t _flags_save_string
= ndr
->flags
;
2482 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2483 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
2484 if (_ptr_printername
) {
2485 NDR_PULL_ALLOC(ndr
, r
->printername
);
2486 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printername
, _ptr_printername
));
2488 r
->printername
= NULL
;
2490 ndr
->flags
= _flags_save_string
;
2493 uint32_t _flags_save_string
= ndr
->flags
;
2494 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2495 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
2496 if (_ptr_servername
) {
2497 NDR_PULL_ALLOC(ndr
, r
->servername
);
2498 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->servername
, _ptr_servername
));
2500 r
->servername
= NULL
;
2502 ndr
->flags
= _flags_save_string
;
2504 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
2505 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2507 if (ndr_flags
& NDR_BUFFERS
) {
2509 uint32_t _flags_save_string
= ndr
->flags
;
2510 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2511 if (r
->printername
) {
2512 uint32_t _relative_save_offset
;
2513 _relative_save_offset
= ndr
->offset
;
2514 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printername
));
2515 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2516 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
2517 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printername
));
2518 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
2519 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2520 ndr
->relative_highest_offset
= ndr
->offset
;
2522 ndr
->offset
= _relative_save_offset
;
2524 ndr
->flags
= _flags_save_string
;
2527 uint32_t _flags_save_string
= ndr
->flags
;
2528 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2529 if (r
->servername
) {
2530 uint32_t _relative_save_offset
;
2531 _relative_save_offset
= ndr
->offset
;
2532 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->servername
));
2533 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2534 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
2535 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->servername
));
2536 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
2537 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2538 ndr
->relative_highest_offset
= ndr
->offset
;
2540 ndr
->offset
= _relative_save_offset
;
2542 ndr
->flags
= _flags_save_string
;
2545 return NDR_ERR_SUCCESS
;
2548 _PUBLIC_
void ndr_print_spoolss_PrinterInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo4
*r
)
2550 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo4");
2552 ndr_print_ptr(ndr
, "printername", r
->printername
);
2554 if (r
->printername
) {
2555 ndr_print_string(ndr
, "printername", r
->printername
);
2558 ndr_print_ptr(ndr
, "servername", r
->servername
);
2560 if (r
->servername
) {
2561 ndr_print_string(ndr
, "servername", r
->servername
);
2564 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
2568 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo4(const struct spoolss_PrinterInfo4
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2570 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo4
, ic
);
2573 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo5
*r
)
2575 if (ndr_flags
& NDR_SCALARS
) {
2576 NDR_CHECK(ndr_push_align(ndr
, 5));
2578 uint32_t _flags_save_string
= ndr
->flags
;
2579 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2580 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printername
));
2581 ndr
->flags
= _flags_save_string
;
2584 uint32_t _flags_save_string
= ndr
->flags
;
2585 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2586 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->portname
));
2587 ndr
->flags
= _flags_save_string
;
2589 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
2590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->device_not_selected_timeout
));
2591 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->transmission_retry_timeout
));
2592 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2594 if (ndr_flags
& NDR_BUFFERS
) {
2596 uint32_t _flags_save_string
= ndr
->flags
;
2597 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2598 if (r
->printername
) {
2599 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->printername
));
2600 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printername
));
2601 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->printername
));
2603 ndr
->flags
= _flags_save_string
;
2606 uint32_t _flags_save_string
= ndr
->flags
;
2607 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2609 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->portname
));
2610 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->portname
));
2611 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->portname
));
2613 ndr
->flags
= _flags_save_string
;
2616 return NDR_ERR_SUCCESS
;
2619 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo5
*r
)
2621 uint32_t _ptr_printername
;
2622 TALLOC_CTX
*_mem_save_printername_0
;
2623 uint32_t _ptr_portname
;
2624 TALLOC_CTX
*_mem_save_portname_0
;
2625 if (ndr_flags
& NDR_SCALARS
) {
2626 NDR_CHECK(ndr_pull_align(ndr
, 5));
2628 uint32_t _flags_save_string
= ndr
->flags
;
2629 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2630 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
2631 if (_ptr_printername
) {
2632 NDR_PULL_ALLOC(ndr
, r
->printername
);
2633 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printername
, _ptr_printername
));
2635 r
->printername
= NULL
;
2637 ndr
->flags
= _flags_save_string
;
2640 uint32_t _flags_save_string
= ndr
->flags
;
2641 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2642 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_portname
));
2643 if (_ptr_portname
) {
2644 NDR_PULL_ALLOC(ndr
, r
->portname
);
2645 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->portname
, _ptr_portname
));
2649 ndr
->flags
= _flags_save_string
;
2651 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
2652 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->device_not_selected_timeout
));
2653 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->transmission_retry_timeout
));
2654 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2656 if (ndr_flags
& NDR_BUFFERS
) {
2658 uint32_t _flags_save_string
= ndr
->flags
;
2659 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2660 if (r
->printername
) {
2661 uint32_t _relative_save_offset
;
2662 _relative_save_offset
= ndr
->offset
;
2663 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printername
));
2664 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2665 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
2666 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printername
));
2667 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
2668 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2669 ndr
->relative_highest_offset
= ndr
->offset
;
2671 ndr
->offset
= _relative_save_offset
;
2673 ndr
->flags
= _flags_save_string
;
2676 uint32_t _flags_save_string
= ndr
->flags
;
2677 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2679 uint32_t _relative_save_offset
;
2680 _relative_save_offset
= ndr
->offset
;
2681 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->portname
));
2682 _mem_save_portname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2683 NDR_PULL_SET_MEM_CTX(ndr
, r
->portname
, 0);
2684 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->portname
));
2685 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_portname_0
, 0);
2686 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2687 ndr
->relative_highest_offset
= ndr
->offset
;
2689 ndr
->offset
= _relative_save_offset
;
2691 ndr
->flags
= _flags_save_string
;
2694 return NDR_ERR_SUCCESS
;
2697 _PUBLIC_
void ndr_print_spoolss_PrinterInfo5(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo5
*r
)
2699 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo5");
2701 ndr_print_ptr(ndr
, "printername", r
->printername
);
2703 if (r
->printername
) {
2704 ndr_print_string(ndr
, "printername", r
->printername
);
2707 ndr_print_ptr(ndr
, "portname", r
->portname
);
2710 ndr_print_string(ndr
, "portname", r
->portname
);
2713 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
2714 ndr_print_uint32(ndr
, "device_not_selected_timeout", r
->device_not_selected_timeout
);
2715 ndr_print_uint32(ndr
, "transmission_retry_timeout", r
->transmission_retry_timeout
);
2719 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo5(const struct spoolss_PrinterInfo5
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2721 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo5
, ic
);
2724 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo6
*r
)
2726 if (ndr_flags
& NDR_SCALARS
) {
2727 NDR_CHECK(ndr_push_align(ndr
, 4));
2728 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, r
->status
));
2729 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
2731 if (ndr_flags
& NDR_BUFFERS
) {
2733 return NDR_ERR_SUCCESS
;
2736 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo6
*r
)
2738 if (ndr_flags
& NDR_SCALARS
) {
2739 NDR_CHECK(ndr_pull_align(ndr
, 4));
2740 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
2741 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
2743 if (ndr_flags
& NDR_BUFFERS
) {
2745 return NDR_ERR_SUCCESS
;
2748 _PUBLIC_
void ndr_print_spoolss_PrinterInfo6(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo6
*r
)
2750 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo6");
2752 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
2756 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo6(const struct spoolss_PrinterInfo6
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2758 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo6
, ic
);
2761 static enum ndr_err_code
ndr_push_spoolss_DsPrintAction(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
2763 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
2764 return NDR_ERR_SUCCESS
;
2767 static enum ndr_err_code
ndr_pull_spoolss_DsPrintAction(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
2770 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
2772 return NDR_ERR_SUCCESS
;
2775 _PUBLIC_
void ndr_print_spoolss_DsPrintAction(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
2777 ndr_print_uint32(ndr
, name
, r
);
2779 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_PUBLISH", DSPRINT_PUBLISH
, r
);
2780 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_UPDATE", DSPRINT_UPDATE
, r
);
2781 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_UNPUBLISH", DSPRINT_UNPUBLISH
, r
);
2782 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_REPUBLISH", DSPRINT_REPUBLISH
, r
);
2783 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DSPRINT_PENDING", DSPRINT_PENDING
, r
);
2787 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterInfo7
*r
)
2789 if (ndr_flags
& NDR_SCALARS
) {
2790 NDR_CHECK(ndr_push_align(ndr
, 5));
2792 uint32_t _flags_save_string
= ndr
->flags
;
2793 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2794 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->guid
));
2795 ndr
->flags
= _flags_save_string
;
2797 NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr
, NDR_SCALARS
, r
->action
));
2798 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2800 if (ndr_flags
& NDR_BUFFERS
) {
2802 uint32_t _flags_save_string
= ndr
->flags
;
2803 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2805 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->guid
));
2806 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->guid
));
2807 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->guid
));
2809 ndr
->flags
= _flags_save_string
;
2812 return NDR_ERR_SUCCESS
;
2815 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterInfo7
*r
)
2818 TALLOC_CTX
*_mem_save_guid_0
;
2819 if (ndr_flags
& NDR_SCALARS
) {
2820 NDR_CHECK(ndr_pull_align(ndr
, 5));
2822 uint32_t _flags_save_string
= ndr
->flags
;
2823 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2824 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_guid
));
2826 NDR_PULL_ALLOC(ndr
, r
->guid
);
2827 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->guid
, _ptr_guid
));
2831 ndr
->flags
= _flags_save_string
;
2833 NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr
, NDR_SCALARS
, &r
->action
));
2834 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2836 if (ndr_flags
& NDR_BUFFERS
) {
2838 uint32_t _flags_save_string
= ndr
->flags
;
2839 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
2841 uint32_t _relative_save_offset
;
2842 _relative_save_offset
= ndr
->offset
;
2843 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->guid
));
2844 _mem_save_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2845 NDR_PULL_SET_MEM_CTX(ndr
, r
->guid
, 0);
2846 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->guid
));
2847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_guid_0
, 0);
2848 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2849 ndr
->relative_highest_offset
= ndr
->offset
;
2851 ndr
->offset
= _relative_save_offset
;
2853 ndr
->flags
= _flags_save_string
;
2856 return NDR_ERR_SUCCESS
;
2859 _PUBLIC_
void ndr_print_spoolss_PrinterInfo7(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterInfo7
*r
)
2861 ndr_print_struct(ndr
, name
, "spoolss_PrinterInfo7");
2863 ndr_print_ptr(ndr
, "guid", r
->guid
);
2866 ndr_print_string(ndr
, "guid", r
->guid
);
2869 ndr_print_spoolss_DsPrintAction(ndr
, "action", r
->action
);
2873 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo7(const struct spoolss_PrinterInfo7
*r
, struct smb_iconv_convenience
*ic
, int flags
)
2875 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo7
, ic
);
2878 static enum ndr_err_code
ndr_push_spoolss_DeviceModeInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DeviceModeInfo
*r
)
2880 if (ndr_flags
& NDR_SCALARS
) {
2881 NDR_CHECK(ndr_push_align(ndr
, 5));
2883 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
2884 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2885 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->devmode
));
2886 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
2888 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
2890 if (ndr_flags
& NDR_BUFFERS
) {
2892 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
2893 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2895 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->devmode
));
2897 struct ndr_push
*_ndr_devmode
;
2898 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
2899 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
2900 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
2902 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->devmode
));
2904 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
2907 return NDR_ERR_SUCCESS
;
2910 static enum ndr_err_code
ndr_pull_spoolss_DeviceModeInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DeviceModeInfo
*r
)
2912 uint32_t _ptr_devmode
;
2913 TALLOC_CTX
*_mem_save_devmode_0
;
2914 if (ndr_flags
& NDR_SCALARS
) {
2915 NDR_CHECK(ndr_pull_align(ndr
, 5));
2917 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
2918 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2919 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
2921 NDR_PULL_ALLOC(ndr
, r
->devmode
);
2922 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->devmode
, _ptr_devmode
));
2926 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
2928 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
2930 if (ndr_flags
& NDR_BUFFERS
) {
2932 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
2933 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
2935 uint32_t _relative_save_offset
;
2936 _relative_save_offset
= ndr
->offset
;
2937 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->devmode
));
2938 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
2939 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
2941 struct ndr_pull
*_ndr_devmode
;
2942 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
2943 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
2944 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
2946 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
2947 if (ndr
->offset
> ndr
->relative_highest_offset
) {
2948 ndr
->relative_highest_offset
= ndr
->offset
;
2950 ndr
->offset
= _relative_save_offset
;
2952 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
2955 return NDR_ERR_SUCCESS
;
2958 _PUBLIC_
void ndr_print_spoolss_DeviceModeInfo(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DeviceModeInfo
*r
)
2960 ndr_print_struct(ndr
, name
, "spoolss_DeviceModeInfo");
2962 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
2965 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
2971 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrinterInfo
*r
)
2973 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
2975 uint32_t _flags_save_UNION
= ndr
->flags
;
2976 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
2977 if (ndr_flags
& NDR_SCALARS
) {
2978 int level
= ndr_push_get_switch_value(ndr
, r
);
2979 NDR_CHECK(ndr_push_union_align(ndr
, 5));
2982 NDR_CHECK(ndr_push_align(ndr
, 5));
2983 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2984 NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr
, NDR_SCALARS
, &r
->info0
));
2988 NDR_CHECK(ndr_push_align(ndr
, 5));
2989 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2990 NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
2994 NDR_CHECK(ndr_push_align(ndr
, 5));
2995 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
2996 NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
3000 NDR_CHECK(ndr_push_align(ndr
, 5));
3001 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3002 NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
3006 NDR_CHECK(ndr_push_align(ndr
, 5));
3007 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3008 NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
3012 NDR_CHECK(ndr_push_align(ndr
, 5));
3013 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3014 NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
3018 NDR_CHECK(ndr_push_align(ndr
, 4));
3019 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3020 NDR_CHECK(ndr_push_spoolss_PrinterInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
3024 NDR_CHECK(ndr_push_align(ndr
, 5));
3025 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3026 NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
3030 NDR_CHECK(ndr_push_align(ndr
, 5));
3031 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3032 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
, &r
->info8
));
3036 NDR_CHECK(ndr_push_align(ndr
, 5));
3037 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3038 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
, &r
->info9
));
3046 if (ndr_flags
& NDR_BUFFERS
) {
3047 int level
= ndr_push_get_switch_value(ndr
, r
);
3048 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
3051 NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr
, NDR_BUFFERS
, &r
->info0
));
3055 NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
3059 NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
3063 NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
3067 NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
3071 NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
3078 NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
3082 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_BUFFERS
, &r
->info8
));
3086 NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr
, NDR_BUFFERS
, &r
->info9
));
3094 ndr
->flags
= _flags_save_UNION
;
3096 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
3097 return NDR_ERR_SUCCESS
;
3100 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrinterInfo
*r
)
3102 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
3105 uint32_t _flags_save_UNION
= ndr
->flags
;
3106 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
3107 level
= ndr_pull_get_switch_value(ndr
, r
);
3108 if (ndr_flags
& NDR_SCALARS
) {
3109 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
3112 NDR_CHECK(ndr_pull_align(ndr
, 5));
3113 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3114 NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr
, NDR_SCALARS
, &r
->info0
));
3118 NDR_CHECK(ndr_pull_align(ndr
, 5));
3119 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3120 NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
3124 NDR_CHECK(ndr_pull_align(ndr
, 5));
3125 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3126 NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
3130 NDR_CHECK(ndr_pull_align(ndr
, 5));
3131 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3132 NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
3136 NDR_CHECK(ndr_pull_align(ndr
, 5));
3137 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3138 NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
3142 NDR_CHECK(ndr_pull_align(ndr
, 5));
3143 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3144 NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
3148 NDR_CHECK(ndr_pull_align(ndr
, 4));
3149 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3150 NDR_CHECK(ndr_pull_spoolss_PrinterInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
3154 NDR_CHECK(ndr_pull_align(ndr
, 5));
3155 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3156 NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
3160 NDR_CHECK(ndr_pull_align(ndr
, 5));
3161 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3162 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
, &r
->info8
));
3166 NDR_CHECK(ndr_pull_align(ndr
, 5));
3167 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
3168 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_SCALARS
, &r
->info9
));
3176 if (ndr_flags
& NDR_BUFFERS
) {
3177 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
3180 NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr
, NDR_BUFFERS
, &r
->info0
));
3184 NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
3188 NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
3192 NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
3196 NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
3200 NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
3207 NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
3211 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_BUFFERS
, &r
->info8
));
3215 NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr
, NDR_BUFFERS
, &r
->info9
));
3223 ndr
->flags
= _flags_save_UNION
;
3225 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
3226 return NDR_ERR_SUCCESS
;
3229 _PUBLIC_
void ndr_print_spoolss_PrinterInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrinterInfo
*r
)
3233 uint32_t _flags_save_UNION
= ndr
->flags
;
3234 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
3235 level
= ndr_print_get_switch_value(ndr
, r
);
3236 ndr_print_union(ndr
, name
, level
, "spoolss_PrinterInfo");
3239 ndr_print_spoolss_PrinterInfo0(ndr
, "info0", &r
->info0
);
3243 ndr_print_spoolss_PrinterInfo1(ndr
, "info1", &r
->info1
);
3247 ndr_print_spoolss_PrinterInfo2(ndr
, "info2", &r
->info2
);
3251 ndr_print_spoolss_PrinterInfo3(ndr
, "info3", &r
->info3
);
3255 ndr_print_spoolss_PrinterInfo4(ndr
, "info4", &r
->info4
);
3259 ndr_print_spoolss_PrinterInfo5(ndr
, "info5", &r
->info5
);
3263 ndr_print_spoolss_PrinterInfo6(ndr
, "info6", &r
->info6
);
3267 ndr_print_spoolss_PrinterInfo7(ndr
, "info7", &r
->info7
);
3271 ndr_print_spoolss_DeviceModeInfo(ndr
, "info8", &r
->info8
);
3275 ndr_print_spoolss_DeviceModeInfo(ndr
, "info9", &r
->info9
);
3282 ndr
->flags
= _flags_save_UNION
;
3286 _PUBLIC_
size_t ndr_size_spoolss_PrinterInfo(const union spoolss_PrinterInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
3288 flags
|= LIBNDR_FLAG_RELATIVE_REVERSE
;
3289 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterInfo
, ic
);
3292 static enum ndr_err_code
ndr_push_spoolss_DevmodeContainer(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DevmodeContainer
*r
)
3294 if (ndr_flags
& NDR_SCALARS
) {
3295 NDR_CHECK(ndr_push_align(ndr
, 5));
3296 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, _ndr_size_spoolss_DeviceMode(r
->devmode
, ndr
->iconv_convenience
, ndr
->flags
)));
3297 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->devmode
));
3298 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3300 if (ndr_flags
& NDR_BUFFERS
) {
3303 struct ndr_push
*_ndr_devmode
;
3304 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_devmode
, 4, _ndr_size_spoolss_DeviceMode(r
->devmode
, ndr
->iconv_convenience
, ndr
->flags
)));
3305 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
3306 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_devmode
, 4, _ndr_size_spoolss_DeviceMode(r
->devmode
, ndr
->iconv_convenience
, ndr
->flags
)));
3310 return NDR_ERR_SUCCESS
;
3313 static enum ndr_err_code
ndr_pull_spoolss_DevmodeContainer(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DevmodeContainer
*r
)
3315 uint32_t _ptr_devmode
;
3316 TALLOC_CTX
*_mem_save_devmode_0
;
3317 if (ndr_flags
& NDR_SCALARS
) {
3318 NDR_CHECK(ndr_pull_align(ndr
, 5));
3319 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size
));
3320 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
3322 NDR_PULL_ALLOC(ndr
, r
->devmode
);
3326 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3328 if (ndr_flags
& NDR_BUFFERS
) {
3330 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3331 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
3333 struct ndr_pull
*_ndr_devmode
;
3334 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 4, r
->_ndr_size
));
3335 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
3336 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 4, r
->_ndr_size
));
3338 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
3341 return NDR_ERR_SUCCESS
;
3344 _PUBLIC_
void ndr_print_spoolss_DevmodeContainer(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DevmodeContainer
*r
)
3346 ndr_print_struct(ndr
, name
, "spoolss_DevmodeContainer");
3348 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
);
3349 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
3352 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
3358 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfo1
*r
)
3360 if (ndr_flags
& NDR_SCALARS
) {
3361 NDR_CHECK(ndr_push_align(ndr
, 5));
3362 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
3364 uint32_t _flags_save_string
= ndr
->flags
;
3365 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3366 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printer_name
));
3367 ndr
->flags
= _flags_save_string
;
3370 uint32_t _flags_save_string
= ndr
->flags
;
3371 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3372 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->server_name
));
3373 ndr
->flags
= _flags_save_string
;
3376 uint32_t _flags_save_string
= ndr
->flags
;
3377 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3378 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->user_name
));
3379 ndr
->flags
= _flags_save_string
;
3382 uint32_t _flags_save_string
= ndr
->flags
;
3383 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3384 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->document_name
));
3385 ndr
->flags
= _flags_save_string
;
3388 uint32_t _flags_save_string
= ndr
->flags
;
3389 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3390 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_type
));
3391 ndr
->flags
= _flags_save_string
;
3394 uint32_t _flags_save_string
= ndr
->flags
;
3395 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3396 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->text_status
));
3397 ndr
->flags
= _flags_save_string
;
3399 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
3400 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
3401 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
3402 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
3403 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
3404 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
3405 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3407 if (ndr_flags
& NDR_BUFFERS
) {
3409 uint32_t _flags_save_string
= ndr
->flags
;
3410 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3411 if (r
->printer_name
) {
3412 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->printer_name
));
3413 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printer_name
));
3414 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->printer_name
));
3416 ndr
->flags
= _flags_save_string
;
3419 uint32_t _flags_save_string
= ndr
->flags
;
3420 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3421 if (r
->server_name
) {
3422 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->server_name
));
3423 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->server_name
));
3424 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->server_name
));
3426 ndr
->flags
= _flags_save_string
;
3429 uint32_t _flags_save_string
= ndr
->flags
;
3430 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3432 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->user_name
));
3433 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->user_name
));
3434 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->user_name
));
3436 ndr
->flags
= _flags_save_string
;
3439 uint32_t _flags_save_string
= ndr
->flags
;
3440 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3441 if (r
->document_name
) {
3442 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->document_name
));
3443 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->document_name
));
3444 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->document_name
));
3446 ndr
->flags
= _flags_save_string
;
3449 uint32_t _flags_save_string
= ndr
->flags
;
3450 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3452 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_type
));
3453 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_type
));
3454 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_type
));
3456 ndr
->flags
= _flags_save_string
;
3459 uint32_t _flags_save_string
= ndr
->flags
;
3460 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3461 if (r
->text_status
) {
3462 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->text_status
));
3463 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->text_status
));
3464 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->text_status
));
3466 ndr
->flags
= _flags_save_string
;
3469 return NDR_ERR_SUCCESS
;
3472 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfo1
*r
)
3474 uint32_t _ptr_printer_name
;
3475 TALLOC_CTX
*_mem_save_printer_name_0
;
3476 uint32_t _ptr_server_name
;
3477 TALLOC_CTX
*_mem_save_server_name_0
;
3478 uint32_t _ptr_user_name
;
3479 TALLOC_CTX
*_mem_save_user_name_0
;
3480 uint32_t _ptr_document_name
;
3481 TALLOC_CTX
*_mem_save_document_name_0
;
3482 uint32_t _ptr_data_type
;
3483 TALLOC_CTX
*_mem_save_data_type_0
;
3484 uint32_t _ptr_text_status
;
3485 TALLOC_CTX
*_mem_save_text_status_0
;
3486 if (ndr_flags
& NDR_SCALARS
) {
3487 NDR_CHECK(ndr_pull_align(ndr
, 5));
3488 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
3490 uint32_t _flags_save_string
= ndr
->flags
;
3491 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3492 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
3493 if (_ptr_printer_name
) {
3494 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
3495 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printer_name
, _ptr_printer_name
));
3497 r
->printer_name
= NULL
;
3499 ndr
->flags
= _flags_save_string
;
3502 uint32_t _flags_save_string
= ndr
->flags
;
3503 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3504 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
3505 if (_ptr_server_name
) {
3506 NDR_PULL_ALLOC(ndr
, r
->server_name
);
3507 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->server_name
, _ptr_server_name
));
3509 r
->server_name
= NULL
;
3511 ndr
->flags
= _flags_save_string
;
3514 uint32_t _flags_save_string
= ndr
->flags
;
3515 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3516 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
3517 if (_ptr_user_name
) {
3518 NDR_PULL_ALLOC(ndr
, r
->user_name
);
3519 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->user_name
, _ptr_user_name
));
3521 r
->user_name
= NULL
;
3523 ndr
->flags
= _flags_save_string
;
3526 uint32_t _flags_save_string
= ndr
->flags
;
3527 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3528 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
3529 if (_ptr_document_name
) {
3530 NDR_PULL_ALLOC(ndr
, r
->document_name
);
3531 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->document_name
, _ptr_document_name
));
3533 r
->document_name
= NULL
;
3535 ndr
->flags
= _flags_save_string
;
3538 uint32_t _flags_save_string
= ndr
->flags
;
3539 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3540 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
3541 if (_ptr_data_type
) {
3542 NDR_PULL_ALLOC(ndr
, r
->data_type
);
3543 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_type
, _ptr_data_type
));
3545 r
->data_type
= NULL
;
3547 ndr
->flags
= _flags_save_string
;
3550 uint32_t _flags_save_string
= ndr
->flags
;
3551 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3552 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
3553 if (_ptr_text_status
) {
3554 NDR_PULL_ALLOC(ndr
, r
->text_status
);
3555 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->text_status
, _ptr_text_status
));
3557 r
->text_status
= NULL
;
3559 ndr
->flags
= _flags_save_string
;
3561 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
3562 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
3563 if (r
->priority
> 99) {
3564 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
3566 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
3567 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
3568 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
3569 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
3570 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
3572 if (ndr_flags
& NDR_BUFFERS
) {
3574 uint32_t _flags_save_string
= ndr
->flags
;
3575 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3576 if (r
->printer_name
) {
3577 uint32_t _relative_save_offset
;
3578 _relative_save_offset
= ndr
->offset
;
3579 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printer_name
));
3580 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3581 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
3582 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printer_name
));
3583 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
3584 if (ndr
->offset
> ndr
->relative_highest_offset
) {
3585 ndr
->relative_highest_offset
= ndr
->offset
;
3587 ndr
->offset
= _relative_save_offset
;
3589 ndr
->flags
= _flags_save_string
;
3592 uint32_t _flags_save_string
= ndr
->flags
;
3593 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3594 if (r
->server_name
) {
3595 uint32_t _relative_save_offset
;
3596 _relative_save_offset
= ndr
->offset
;
3597 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->server_name
));
3598 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3599 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
3600 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->server_name
));
3601 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
3602 if (ndr
->offset
> ndr
->relative_highest_offset
) {
3603 ndr
->relative_highest_offset
= ndr
->offset
;
3605 ndr
->offset
= _relative_save_offset
;
3607 ndr
->flags
= _flags_save_string
;
3610 uint32_t _flags_save_string
= ndr
->flags
;
3611 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3613 uint32_t _relative_save_offset
;
3614 _relative_save_offset
= ndr
->offset
;
3615 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->user_name
));
3616 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3617 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
3618 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->user_name
));
3619 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
3620 if (ndr
->offset
> ndr
->relative_highest_offset
) {
3621 ndr
->relative_highest_offset
= ndr
->offset
;
3623 ndr
->offset
= _relative_save_offset
;
3625 ndr
->flags
= _flags_save_string
;
3628 uint32_t _flags_save_string
= ndr
->flags
;
3629 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3630 if (r
->document_name
) {
3631 uint32_t _relative_save_offset
;
3632 _relative_save_offset
= ndr
->offset
;
3633 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->document_name
));
3634 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3635 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
3636 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->document_name
));
3637 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
3638 if (ndr
->offset
> ndr
->relative_highest_offset
) {
3639 ndr
->relative_highest_offset
= ndr
->offset
;
3641 ndr
->offset
= _relative_save_offset
;
3643 ndr
->flags
= _flags_save_string
;
3646 uint32_t _flags_save_string
= ndr
->flags
;
3647 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3649 uint32_t _relative_save_offset
;
3650 _relative_save_offset
= ndr
->offset
;
3651 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_type
));
3652 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3653 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
3654 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_type
));
3655 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
3656 if (ndr
->offset
> ndr
->relative_highest_offset
) {
3657 ndr
->relative_highest_offset
= ndr
->offset
;
3659 ndr
->offset
= _relative_save_offset
;
3661 ndr
->flags
= _flags_save_string
;
3664 uint32_t _flags_save_string
= ndr
->flags
;
3665 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3666 if (r
->text_status
) {
3667 uint32_t _relative_save_offset
;
3668 _relative_save_offset
= ndr
->offset
;
3669 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->text_status
));
3670 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
3671 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
3672 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->text_status
));
3673 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
3674 if (ndr
->offset
> ndr
->relative_highest_offset
) {
3675 ndr
->relative_highest_offset
= ndr
->offset
;
3677 ndr
->offset
= _relative_save_offset
;
3679 ndr
->flags
= _flags_save_string
;
3682 return NDR_ERR_SUCCESS
;
3685 _PUBLIC_
void ndr_print_spoolss_JobInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfo1
*r
)
3687 ndr_print_struct(ndr
, name
, "spoolss_JobInfo1");
3689 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
3690 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
3692 if (r
->printer_name
) {
3693 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
3696 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
3698 if (r
->server_name
) {
3699 ndr_print_string(ndr
, "server_name", r
->server_name
);
3702 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
3705 ndr_print_string(ndr
, "user_name", r
->user_name
);
3708 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
3710 if (r
->document_name
) {
3711 ndr_print_string(ndr
, "document_name", r
->document_name
);
3714 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
3717 ndr_print_string(ndr
, "data_type", r
->data_type
);
3720 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
3722 if (r
->text_status
) {
3723 ndr_print_string(ndr
, "text_status", r
->text_status
);
3726 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
3727 ndr_print_uint32(ndr
, "priority", r
->priority
);
3728 ndr_print_uint32(ndr
, "position", r
->position
);
3729 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
3730 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
3731 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
3735 _PUBLIC_
size_t ndr_size_spoolss_JobInfo1(const struct spoolss_JobInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
3737 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo1
, ic
);
3740 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfo2
*r
)
3742 if (ndr_flags
& NDR_SCALARS
) {
3743 NDR_CHECK(ndr_push_align(ndr
, 5));
3744 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
3746 uint32_t _flags_save_string
= ndr
->flags
;
3747 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3748 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printer_name
));
3749 ndr
->flags
= _flags_save_string
;
3752 uint32_t _flags_save_string
= ndr
->flags
;
3753 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3754 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->server_name
));
3755 ndr
->flags
= _flags_save_string
;
3758 uint32_t _flags_save_string
= ndr
->flags
;
3759 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3760 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->user_name
));
3761 ndr
->flags
= _flags_save_string
;
3764 uint32_t _flags_save_string
= ndr
->flags
;
3765 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3766 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->document_name
));
3767 ndr
->flags
= _flags_save_string
;
3770 uint32_t _flags_save_string
= ndr
->flags
;
3771 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3772 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->notify_name
));
3773 ndr
->flags
= _flags_save_string
;
3776 uint32_t _flags_save_string
= ndr
->flags
;
3777 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3778 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_type
));
3779 ndr
->flags
= _flags_save_string
;
3782 uint32_t _flags_save_string
= ndr
->flags
;
3783 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3784 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->print_processor
));
3785 ndr
->flags
= _flags_save_string
;
3788 uint32_t _flags_save_string
= ndr
->flags
;
3789 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3790 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->parameters
));
3791 ndr
->flags
= _flags_save_string
;
3794 uint32_t _flags_save_string
= ndr
->flags
;
3795 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3796 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
3797 ndr
->flags
= _flags_save_string
;
3800 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
3801 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
3802 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->devmode
));
3803 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
3806 uint32_t _flags_save_string
= ndr
->flags
;
3807 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3808 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->text_status
));
3809 ndr
->flags
= _flags_save_string
;
3812 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
3813 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
3814 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->secdesc
));
3815 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
3817 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
3818 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
3819 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
3820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->start_time
));
3821 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->until_time
));
3822 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
3823 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
3824 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
3825 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time
));
3826 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
3827 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
3829 if (ndr_flags
& NDR_BUFFERS
) {
3831 uint32_t _flags_save_string
= ndr
->flags
;
3832 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3833 if (r
->printer_name
) {
3834 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->printer_name
));
3835 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printer_name
));
3836 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->printer_name
));
3838 ndr
->flags
= _flags_save_string
;
3841 uint32_t _flags_save_string
= ndr
->flags
;
3842 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3843 if (r
->server_name
) {
3844 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->server_name
));
3845 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->server_name
));
3846 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->server_name
));
3848 ndr
->flags
= _flags_save_string
;
3851 uint32_t _flags_save_string
= ndr
->flags
;
3852 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3854 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->user_name
));
3855 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->user_name
));
3856 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->user_name
));
3858 ndr
->flags
= _flags_save_string
;
3861 uint32_t _flags_save_string
= ndr
->flags
;
3862 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3863 if (r
->document_name
) {
3864 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->document_name
));
3865 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->document_name
));
3866 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->document_name
));
3868 ndr
->flags
= _flags_save_string
;
3871 uint32_t _flags_save_string
= ndr
->flags
;
3872 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3873 if (r
->notify_name
) {
3874 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->notify_name
));
3875 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->notify_name
));
3876 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->notify_name
));
3878 ndr
->flags
= _flags_save_string
;
3881 uint32_t _flags_save_string
= ndr
->flags
;
3882 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3884 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_type
));
3885 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_type
));
3886 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_type
));
3888 ndr
->flags
= _flags_save_string
;
3891 uint32_t _flags_save_string
= ndr
->flags
;
3892 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3893 if (r
->print_processor
) {
3894 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->print_processor
));
3895 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->print_processor
));
3896 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->print_processor
));
3898 ndr
->flags
= _flags_save_string
;
3901 uint32_t _flags_save_string
= ndr
->flags
;
3902 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3903 if (r
->parameters
) {
3904 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->parameters
));
3905 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->parameters
));
3906 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->parameters
));
3908 ndr
->flags
= _flags_save_string
;
3911 uint32_t _flags_save_string
= ndr
->flags
;
3912 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3913 if (r
->driver_name
) {
3914 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
3915 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
3916 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
3918 ndr
->flags
= _flags_save_string
;
3921 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
3922 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
3924 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->devmode
));
3926 struct ndr_push
*_ndr_devmode
;
3927 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
3928 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
3929 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
3931 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->devmode
));
3933 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
3936 uint32_t _flags_save_string
= ndr
->flags
;
3937 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3938 if (r
->text_status
) {
3939 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->text_status
));
3940 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->text_status
));
3941 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->text_status
));
3943 ndr
->flags
= _flags_save_string
;
3946 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
3947 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
3949 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->secdesc
));
3951 struct ndr_push
*_ndr_secdesc
;
3952 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
3953 NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
3954 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
3956 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->secdesc
));
3958 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
3961 return NDR_ERR_SUCCESS
;
3964 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfo2
*r
)
3966 uint32_t _ptr_printer_name
;
3967 TALLOC_CTX
*_mem_save_printer_name_0
;
3968 uint32_t _ptr_server_name
;
3969 TALLOC_CTX
*_mem_save_server_name_0
;
3970 uint32_t _ptr_user_name
;
3971 TALLOC_CTX
*_mem_save_user_name_0
;
3972 uint32_t _ptr_document_name
;
3973 TALLOC_CTX
*_mem_save_document_name_0
;
3974 uint32_t _ptr_notify_name
;
3975 TALLOC_CTX
*_mem_save_notify_name_0
;
3976 uint32_t _ptr_data_type
;
3977 TALLOC_CTX
*_mem_save_data_type_0
;
3978 uint32_t _ptr_print_processor
;
3979 TALLOC_CTX
*_mem_save_print_processor_0
;
3980 uint32_t _ptr_parameters
;
3981 TALLOC_CTX
*_mem_save_parameters_0
;
3982 uint32_t _ptr_driver_name
;
3983 TALLOC_CTX
*_mem_save_driver_name_0
;
3984 uint32_t _ptr_devmode
;
3985 TALLOC_CTX
*_mem_save_devmode_0
;
3986 uint32_t _ptr_text_status
;
3987 TALLOC_CTX
*_mem_save_text_status_0
;
3988 uint32_t _ptr_secdesc
;
3989 TALLOC_CTX
*_mem_save_secdesc_0
;
3990 if (ndr_flags
& NDR_SCALARS
) {
3991 NDR_CHECK(ndr_pull_align(ndr
, 5));
3992 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
3994 uint32_t _flags_save_string
= ndr
->flags
;
3995 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
3996 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
3997 if (_ptr_printer_name
) {
3998 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
3999 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printer_name
, _ptr_printer_name
));
4001 r
->printer_name
= NULL
;
4003 ndr
->flags
= _flags_save_string
;
4006 uint32_t _flags_save_string
= ndr
->flags
;
4007 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4008 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
4009 if (_ptr_server_name
) {
4010 NDR_PULL_ALLOC(ndr
, r
->server_name
);
4011 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->server_name
, _ptr_server_name
));
4013 r
->server_name
= NULL
;
4015 ndr
->flags
= _flags_save_string
;
4018 uint32_t _flags_save_string
= ndr
->flags
;
4019 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4020 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
4021 if (_ptr_user_name
) {
4022 NDR_PULL_ALLOC(ndr
, r
->user_name
);
4023 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->user_name
, _ptr_user_name
));
4025 r
->user_name
= NULL
;
4027 ndr
->flags
= _flags_save_string
;
4030 uint32_t _flags_save_string
= ndr
->flags
;
4031 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4032 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
4033 if (_ptr_document_name
) {
4034 NDR_PULL_ALLOC(ndr
, r
->document_name
);
4035 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->document_name
, _ptr_document_name
));
4037 r
->document_name
= NULL
;
4039 ndr
->flags
= _flags_save_string
;
4042 uint32_t _flags_save_string
= ndr
->flags
;
4043 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4044 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_name
));
4045 if (_ptr_notify_name
) {
4046 NDR_PULL_ALLOC(ndr
, r
->notify_name
);
4047 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->notify_name
, _ptr_notify_name
));
4049 r
->notify_name
= NULL
;
4051 ndr
->flags
= _flags_save_string
;
4054 uint32_t _flags_save_string
= ndr
->flags
;
4055 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4056 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
4057 if (_ptr_data_type
) {
4058 NDR_PULL_ALLOC(ndr
, r
->data_type
);
4059 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_type
, _ptr_data_type
));
4061 r
->data_type
= NULL
;
4063 ndr
->flags
= _flags_save_string
;
4066 uint32_t _flags_save_string
= ndr
->flags
;
4067 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4068 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
4069 if (_ptr_print_processor
) {
4070 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
4071 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->print_processor
, _ptr_print_processor
));
4073 r
->print_processor
= NULL
;
4075 ndr
->flags
= _flags_save_string
;
4078 uint32_t _flags_save_string
= ndr
->flags
;
4079 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4080 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
4081 if (_ptr_parameters
) {
4082 NDR_PULL_ALLOC(ndr
, r
->parameters
);
4083 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->parameters
, _ptr_parameters
));
4085 r
->parameters
= NULL
;
4087 ndr
->flags
= _flags_save_string
;
4090 uint32_t _flags_save_string
= ndr
->flags
;
4091 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4092 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
4093 if (_ptr_driver_name
) {
4094 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
4095 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
4097 r
->driver_name
= NULL
;
4099 ndr
->flags
= _flags_save_string
;
4102 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
4103 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4104 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
4106 NDR_PULL_ALLOC(ndr
, r
->devmode
);
4107 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->devmode
, _ptr_devmode
));
4111 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
4114 uint32_t _flags_save_string
= ndr
->flags
;
4115 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4116 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
4117 if (_ptr_text_status
) {
4118 NDR_PULL_ALLOC(ndr
, r
->text_status
);
4119 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->text_status
, _ptr_text_status
));
4121 r
->text_status
= NULL
;
4123 ndr
->flags
= _flags_save_string
;
4126 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
4127 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4128 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
4130 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
4131 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->secdesc
, _ptr_secdesc
));
4135 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
4137 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
4138 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
4139 if (r
->priority
> 99) {
4140 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4142 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
4143 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->start_time
));
4144 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->until_time
));
4145 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
4146 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
4147 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
4148 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time
));
4149 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
4150 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4152 if (ndr_flags
& NDR_BUFFERS
) {
4154 uint32_t _flags_save_string
= ndr
->flags
;
4155 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4156 if (r
->printer_name
) {
4157 uint32_t _relative_save_offset
;
4158 _relative_save_offset
= ndr
->offset
;
4159 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printer_name
));
4160 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4161 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
4162 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printer_name
));
4163 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
4164 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4165 ndr
->relative_highest_offset
= ndr
->offset
;
4167 ndr
->offset
= _relative_save_offset
;
4169 ndr
->flags
= _flags_save_string
;
4172 uint32_t _flags_save_string
= ndr
->flags
;
4173 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4174 if (r
->server_name
) {
4175 uint32_t _relative_save_offset
;
4176 _relative_save_offset
= ndr
->offset
;
4177 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->server_name
));
4178 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4179 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
4180 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->server_name
));
4181 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
4182 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4183 ndr
->relative_highest_offset
= ndr
->offset
;
4185 ndr
->offset
= _relative_save_offset
;
4187 ndr
->flags
= _flags_save_string
;
4190 uint32_t _flags_save_string
= ndr
->flags
;
4191 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4193 uint32_t _relative_save_offset
;
4194 _relative_save_offset
= ndr
->offset
;
4195 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->user_name
));
4196 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4197 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
4198 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->user_name
));
4199 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
4200 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4201 ndr
->relative_highest_offset
= ndr
->offset
;
4203 ndr
->offset
= _relative_save_offset
;
4205 ndr
->flags
= _flags_save_string
;
4208 uint32_t _flags_save_string
= ndr
->flags
;
4209 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4210 if (r
->document_name
) {
4211 uint32_t _relative_save_offset
;
4212 _relative_save_offset
= ndr
->offset
;
4213 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->document_name
));
4214 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4215 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
4216 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->document_name
));
4217 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
4218 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4219 ndr
->relative_highest_offset
= ndr
->offset
;
4221 ndr
->offset
= _relative_save_offset
;
4223 ndr
->flags
= _flags_save_string
;
4226 uint32_t _flags_save_string
= ndr
->flags
;
4227 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4228 if (r
->notify_name
) {
4229 uint32_t _relative_save_offset
;
4230 _relative_save_offset
= ndr
->offset
;
4231 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->notify_name
));
4232 _mem_save_notify_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4233 NDR_PULL_SET_MEM_CTX(ndr
, r
->notify_name
, 0);
4234 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->notify_name
));
4235 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_name_0
, 0);
4236 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4237 ndr
->relative_highest_offset
= ndr
->offset
;
4239 ndr
->offset
= _relative_save_offset
;
4241 ndr
->flags
= _flags_save_string
;
4244 uint32_t _flags_save_string
= ndr
->flags
;
4245 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4247 uint32_t _relative_save_offset
;
4248 _relative_save_offset
= ndr
->offset
;
4249 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_type
));
4250 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4251 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
4252 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_type
));
4253 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
4254 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4255 ndr
->relative_highest_offset
= ndr
->offset
;
4257 ndr
->offset
= _relative_save_offset
;
4259 ndr
->flags
= _flags_save_string
;
4262 uint32_t _flags_save_string
= ndr
->flags
;
4263 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4264 if (r
->print_processor
) {
4265 uint32_t _relative_save_offset
;
4266 _relative_save_offset
= ndr
->offset
;
4267 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->print_processor
));
4268 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4269 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
4270 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->print_processor
));
4271 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
4272 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4273 ndr
->relative_highest_offset
= ndr
->offset
;
4275 ndr
->offset
= _relative_save_offset
;
4277 ndr
->flags
= _flags_save_string
;
4280 uint32_t _flags_save_string
= ndr
->flags
;
4281 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4282 if (r
->parameters
) {
4283 uint32_t _relative_save_offset
;
4284 _relative_save_offset
= ndr
->offset
;
4285 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->parameters
));
4286 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4287 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
4288 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->parameters
));
4289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
4290 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4291 ndr
->relative_highest_offset
= ndr
->offset
;
4293 ndr
->offset
= _relative_save_offset
;
4295 ndr
->flags
= _flags_save_string
;
4298 uint32_t _flags_save_string
= ndr
->flags
;
4299 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4300 if (r
->driver_name
) {
4301 uint32_t _relative_save_offset
;
4302 _relative_save_offset
= ndr
->offset
;
4303 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
4304 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4305 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
4306 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
4307 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
4308 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4309 ndr
->relative_highest_offset
= ndr
->offset
;
4311 ndr
->offset
= _relative_save_offset
;
4313 ndr
->flags
= _flags_save_string
;
4316 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
4317 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4319 uint32_t _relative_save_offset
;
4320 _relative_save_offset
= ndr
->offset
;
4321 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->devmode
));
4322 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4323 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
4325 struct ndr_pull
*_ndr_devmode
;
4326 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
4327 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
4328 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
4330 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
4331 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4332 ndr
->relative_highest_offset
= ndr
->offset
;
4334 ndr
->offset
= _relative_save_offset
;
4336 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
4339 uint32_t _flags_save_string
= ndr
->flags
;
4340 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4341 if (r
->text_status
) {
4342 uint32_t _relative_save_offset
;
4343 _relative_save_offset
= ndr
->offset
;
4344 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->text_status
));
4345 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4346 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
4347 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->text_status
));
4348 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
4349 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4350 ndr
->relative_highest_offset
= ndr
->offset
;
4352 ndr
->offset
= _relative_save_offset
;
4354 ndr
->flags
= _flags_save_string
;
4357 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
4358 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4360 uint32_t _relative_save_offset
;
4361 _relative_save_offset
= ndr
->offset
;
4362 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->secdesc
));
4363 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4364 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
4366 struct ndr_pull
*_ndr_secdesc
;
4367 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
4368 NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
4369 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
4371 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
4372 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4373 ndr
->relative_highest_offset
= ndr
->offset
;
4375 ndr
->offset
= _relative_save_offset
;
4377 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
4380 return NDR_ERR_SUCCESS
;
4383 _PUBLIC_
void ndr_print_spoolss_JobInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfo2
*r
)
4385 ndr_print_struct(ndr
, name
, "spoolss_JobInfo2");
4387 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
4388 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
4390 if (r
->printer_name
) {
4391 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
4394 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
4396 if (r
->server_name
) {
4397 ndr_print_string(ndr
, "server_name", r
->server_name
);
4400 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
4403 ndr_print_string(ndr
, "user_name", r
->user_name
);
4406 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
4408 if (r
->document_name
) {
4409 ndr_print_string(ndr
, "document_name", r
->document_name
);
4412 ndr_print_ptr(ndr
, "notify_name", r
->notify_name
);
4414 if (r
->notify_name
) {
4415 ndr_print_string(ndr
, "notify_name", r
->notify_name
);
4418 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
4421 ndr_print_string(ndr
, "data_type", r
->data_type
);
4424 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
4426 if (r
->print_processor
) {
4427 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
4430 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
4432 if (r
->parameters
) {
4433 ndr_print_string(ndr
, "parameters", r
->parameters
);
4436 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
4438 if (r
->driver_name
) {
4439 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
4442 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
4445 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
4448 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
4450 if (r
->text_status
) {
4451 ndr_print_string(ndr
, "text_status", r
->text_status
);
4454 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
4457 ndr_print_spoolss_security_descriptor(ndr
, "secdesc", r
->secdesc
);
4460 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
4461 ndr_print_uint32(ndr
, "priority", r
->priority
);
4462 ndr_print_uint32(ndr
, "position", r
->position
);
4463 ndr_print_uint32(ndr
, "start_time", r
->start_time
);
4464 ndr_print_uint32(ndr
, "until_time", r
->until_time
);
4465 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
4466 ndr_print_uint32(ndr
, "size", r
->size
);
4467 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
4468 ndr_print_uint32(ndr
, "time", r
->time
);
4469 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
4473 _PUBLIC_
size_t ndr_size_spoolss_JobInfo2(const struct spoolss_JobInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
4475 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo2
, ic
);
4478 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfo3
*r
)
4480 if (ndr_flags
& NDR_SCALARS
) {
4481 NDR_CHECK(ndr_push_align(ndr
, 4));
4482 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
4483 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->next_job_id
));
4484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
4485 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
4487 if (ndr_flags
& NDR_BUFFERS
) {
4489 return NDR_ERR_SUCCESS
;
4492 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfo3
*r
)
4494 if (ndr_flags
& NDR_SCALARS
) {
4495 NDR_CHECK(ndr_pull_align(ndr
, 4));
4496 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
4497 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->next_job_id
));
4498 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
4499 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
4501 if (ndr_flags
& NDR_BUFFERS
) {
4503 return NDR_ERR_SUCCESS
;
4506 _PUBLIC_
void ndr_print_spoolss_JobInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfo3
*r
)
4508 ndr_print_struct(ndr
, name
, "spoolss_JobInfo3");
4510 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
4511 ndr_print_uint32(ndr
, "next_job_id", r
->next_job_id
);
4512 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
4516 _PUBLIC_
size_t ndr_size_spoolss_JobInfo3(const struct spoolss_JobInfo3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
4518 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo3
, ic
);
4521 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfo4
*r
)
4523 if (ndr_flags
& NDR_SCALARS
) {
4524 NDR_CHECK(ndr_push_align(ndr
, 5));
4525 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
4527 uint32_t _flags_save_string
= ndr
->flags
;
4528 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4529 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->printer_name
));
4530 ndr
->flags
= _flags_save_string
;
4533 uint32_t _flags_save_string
= ndr
->flags
;
4534 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4535 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->server_name
));
4536 ndr
->flags
= _flags_save_string
;
4539 uint32_t _flags_save_string
= ndr
->flags
;
4540 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4541 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->user_name
));
4542 ndr
->flags
= _flags_save_string
;
4545 uint32_t _flags_save_string
= ndr
->flags
;
4546 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4547 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->document_name
));
4548 ndr
->flags
= _flags_save_string
;
4551 uint32_t _flags_save_string
= ndr
->flags
;
4552 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4553 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->notify_name
));
4554 ndr
->flags
= _flags_save_string
;
4557 uint32_t _flags_save_string
= ndr
->flags
;
4558 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4559 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_type
));
4560 ndr
->flags
= _flags_save_string
;
4563 uint32_t _flags_save_string
= ndr
->flags
;
4564 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4565 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->print_processor
));
4566 ndr
->flags
= _flags_save_string
;
4569 uint32_t _flags_save_string
= ndr
->flags
;
4570 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4571 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->parameters
));
4572 ndr
->flags
= _flags_save_string
;
4575 uint32_t _flags_save_string
= ndr
->flags
;
4576 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4577 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
4578 ndr
->flags
= _flags_save_string
;
4581 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
4582 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4583 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->devmode
));
4584 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
4587 uint32_t _flags_save_string
= ndr
->flags
;
4588 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4589 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->text_status
));
4590 ndr
->flags
= _flags_save_string
;
4593 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
4594 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4595 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->secdesc
));
4596 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
4598 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
4599 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
4600 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
4601 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->start_time
));
4602 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->until_time
));
4603 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
4604 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
4605 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
4606 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time
));
4607 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
4608 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size_high
));
4609 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
4611 if (ndr_flags
& NDR_BUFFERS
) {
4613 uint32_t _flags_save_string
= ndr
->flags
;
4614 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4615 if (r
->printer_name
) {
4616 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->printer_name
));
4617 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->printer_name
));
4618 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->printer_name
));
4620 ndr
->flags
= _flags_save_string
;
4623 uint32_t _flags_save_string
= ndr
->flags
;
4624 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4625 if (r
->server_name
) {
4626 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->server_name
));
4627 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->server_name
));
4628 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->server_name
));
4630 ndr
->flags
= _flags_save_string
;
4633 uint32_t _flags_save_string
= ndr
->flags
;
4634 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4636 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->user_name
));
4637 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->user_name
));
4638 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->user_name
));
4640 ndr
->flags
= _flags_save_string
;
4643 uint32_t _flags_save_string
= ndr
->flags
;
4644 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4645 if (r
->document_name
) {
4646 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->document_name
));
4647 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->document_name
));
4648 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->document_name
));
4650 ndr
->flags
= _flags_save_string
;
4653 uint32_t _flags_save_string
= ndr
->flags
;
4654 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4655 if (r
->notify_name
) {
4656 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->notify_name
));
4657 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->notify_name
));
4658 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->notify_name
));
4660 ndr
->flags
= _flags_save_string
;
4663 uint32_t _flags_save_string
= ndr
->flags
;
4664 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4666 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_type
));
4667 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_type
));
4668 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_type
));
4670 ndr
->flags
= _flags_save_string
;
4673 uint32_t _flags_save_string
= ndr
->flags
;
4674 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4675 if (r
->print_processor
) {
4676 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->print_processor
));
4677 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->print_processor
));
4678 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->print_processor
));
4680 ndr
->flags
= _flags_save_string
;
4683 uint32_t _flags_save_string
= ndr
->flags
;
4684 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4685 if (r
->parameters
) {
4686 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->parameters
));
4687 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->parameters
));
4688 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->parameters
));
4690 ndr
->flags
= _flags_save_string
;
4693 uint32_t _flags_save_string
= ndr
->flags
;
4694 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4695 if (r
->driver_name
) {
4696 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
4697 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
4698 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
4700 ndr
->flags
= _flags_save_string
;
4703 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
4704 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4706 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->devmode
));
4708 struct ndr_push
*_ndr_devmode
;
4709 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
4710 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
4711 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
4713 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->devmode
));
4715 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
4718 uint32_t _flags_save_string
= ndr
->flags
;
4719 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4720 if (r
->text_status
) {
4721 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->text_status
));
4722 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->text_status
));
4723 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->text_status
));
4725 ndr
->flags
= _flags_save_string
;
4728 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
4729 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4731 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->secdesc
));
4733 struct ndr_push
*_ndr_secdesc
;
4734 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
4735 NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
4736 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
4738 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->secdesc
));
4740 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
4743 return NDR_ERR_SUCCESS
;
4746 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfo4
*r
)
4748 uint32_t _ptr_printer_name
;
4749 TALLOC_CTX
*_mem_save_printer_name_0
;
4750 uint32_t _ptr_server_name
;
4751 TALLOC_CTX
*_mem_save_server_name_0
;
4752 uint32_t _ptr_user_name
;
4753 TALLOC_CTX
*_mem_save_user_name_0
;
4754 uint32_t _ptr_document_name
;
4755 TALLOC_CTX
*_mem_save_document_name_0
;
4756 uint32_t _ptr_notify_name
;
4757 TALLOC_CTX
*_mem_save_notify_name_0
;
4758 uint32_t _ptr_data_type
;
4759 TALLOC_CTX
*_mem_save_data_type_0
;
4760 uint32_t _ptr_print_processor
;
4761 TALLOC_CTX
*_mem_save_print_processor_0
;
4762 uint32_t _ptr_parameters
;
4763 TALLOC_CTX
*_mem_save_parameters_0
;
4764 uint32_t _ptr_driver_name
;
4765 TALLOC_CTX
*_mem_save_driver_name_0
;
4766 uint32_t _ptr_devmode
;
4767 TALLOC_CTX
*_mem_save_devmode_0
;
4768 uint32_t _ptr_text_status
;
4769 TALLOC_CTX
*_mem_save_text_status_0
;
4770 uint32_t _ptr_secdesc
;
4771 TALLOC_CTX
*_mem_save_secdesc_0
;
4772 if (ndr_flags
& NDR_SCALARS
) {
4773 NDR_CHECK(ndr_pull_align(ndr
, 5));
4774 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
4776 uint32_t _flags_save_string
= ndr
->flags
;
4777 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4778 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
4779 if (_ptr_printer_name
) {
4780 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
4781 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->printer_name
, _ptr_printer_name
));
4783 r
->printer_name
= NULL
;
4785 ndr
->flags
= _flags_save_string
;
4788 uint32_t _flags_save_string
= ndr
->flags
;
4789 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4790 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
4791 if (_ptr_server_name
) {
4792 NDR_PULL_ALLOC(ndr
, r
->server_name
);
4793 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->server_name
, _ptr_server_name
));
4795 r
->server_name
= NULL
;
4797 ndr
->flags
= _flags_save_string
;
4800 uint32_t _flags_save_string
= ndr
->flags
;
4801 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4802 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
4803 if (_ptr_user_name
) {
4804 NDR_PULL_ALLOC(ndr
, r
->user_name
);
4805 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->user_name
, _ptr_user_name
));
4807 r
->user_name
= NULL
;
4809 ndr
->flags
= _flags_save_string
;
4812 uint32_t _flags_save_string
= ndr
->flags
;
4813 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4814 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
4815 if (_ptr_document_name
) {
4816 NDR_PULL_ALLOC(ndr
, r
->document_name
);
4817 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->document_name
, _ptr_document_name
));
4819 r
->document_name
= NULL
;
4821 ndr
->flags
= _flags_save_string
;
4824 uint32_t _flags_save_string
= ndr
->flags
;
4825 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4826 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_name
));
4827 if (_ptr_notify_name
) {
4828 NDR_PULL_ALLOC(ndr
, r
->notify_name
);
4829 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->notify_name
, _ptr_notify_name
));
4831 r
->notify_name
= NULL
;
4833 ndr
->flags
= _flags_save_string
;
4836 uint32_t _flags_save_string
= ndr
->flags
;
4837 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4838 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
4839 if (_ptr_data_type
) {
4840 NDR_PULL_ALLOC(ndr
, r
->data_type
);
4841 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_type
, _ptr_data_type
));
4843 r
->data_type
= NULL
;
4845 ndr
->flags
= _flags_save_string
;
4848 uint32_t _flags_save_string
= ndr
->flags
;
4849 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4850 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
4851 if (_ptr_print_processor
) {
4852 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
4853 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->print_processor
, _ptr_print_processor
));
4855 r
->print_processor
= NULL
;
4857 ndr
->flags
= _flags_save_string
;
4860 uint32_t _flags_save_string
= ndr
->flags
;
4861 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4862 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
4863 if (_ptr_parameters
) {
4864 NDR_PULL_ALLOC(ndr
, r
->parameters
);
4865 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->parameters
, _ptr_parameters
));
4867 r
->parameters
= NULL
;
4869 ndr
->flags
= _flags_save_string
;
4872 uint32_t _flags_save_string
= ndr
->flags
;
4873 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4874 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
4875 if (_ptr_driver_name
) {
4876 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
4877 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
4879 r
->driver_name
= NULL
;
4881 ndr
->flags
= _flags_save_string
;
4884 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
4885 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4886 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_devmode
));
4888 NDR_PULL_ALLOC(ndr
, r
->devmode
);
4889 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->devmode
, _ptr_devmode
));
4893 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
4896 uint32_t _flags_save_string
= ndr
->flags
;
4897 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4898 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
4899 if (_ptr_text_status
) {
4900 NDR_PULL_ALLOC(ndr
, r
->text_status
);
4901 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->text_status
, _ptr_text_status
));
4903 r
->text_status
= NULL
;
4905 ndr
->flags
= _flags_save_string
;
4908 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
4909 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
4910 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_secdesc
));
4912 NDR_PULL_ALLOC(ndr
, r
->secdesc
);
4913 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->secdesc
, _ptr_secdesc
));
4917 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
4919 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
4920 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
4921 if (r
->priority
> 99) {
4922 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
4924 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
4925 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->start_time
));
4926 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->until_time
));
4927 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
4928 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
4929 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
4930 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time
));
4931 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
4932 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size_high
));
4933 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
4935 if (ndr_flags
& NDR_BUFFERS
) {
4937 uint32_t _flags_save_string
= ndr
->flags
;
4938 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4939 if (r
->printer_name
) {
4940 uint32_t _relative_save_offset
;
4941 _relative_save_offset
= ndr
->offset
;
4942 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->printer_name
));
4943 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4944 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
4945 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->printer_name
));
4946 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
4947 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4948 ndr
->relative_highest_offset
= ndr
->offset
;
4950 ndr
->offset
= _relative_save_offset
;
4952 ndr
->flags
= _flags_save_string
;
4955 uint32_t _flags_save_string
= ndr
->flags
;
4956 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4957 if (r
->server_name
) {
4958 uint32_t _relative_save_offset
;
4959 _relative_save_offset
= ndr
->offset
;
4960 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->server_name
));
4961 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4962 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
4963 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->server_name
));
4964 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
4965 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4966 ndr
->relative_highest_offset
= ndr
->offset
;
4968 ndr
->offset
= _relative_save_offset
;
4970 ndr
->flags
= _flags_save_string
;
4973 uint32_t _flags_save_string
= ndr
->flags
;
4974 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4976 uint32_t _relative_save_offset
;
4977 _relative_save_offset
= ndr
->offset
;
4978 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->user_name
));
4979 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4980 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
4981 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->user_name
));
4982 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
4983 if (ndr
->offset
> ndr
->relative_highest_offset
) {
4984 ndr
->relative_highest_offset
= ndr
->offset
;
4986 ndr
->offset
= _relative_save_offset
;
4988 ndr
->flags
= _flags_save_string
;
4991 uint32_t _flags_save_string
= ndr
->flags
;
4992 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
4993 if (r
->document_name
) {
4994 uint32_t _relative_save_offset
;
4995 _relative_save_offset
= ndr
->offset
;
4996 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->document_name
));
4997 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
4998 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
4999 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->document_name
));
5000 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
5001 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5002 ndr
->relative_highest_offset
= ndr
->offset
;
5004 ndr
->offset
= _relative_save_offset
;
5006 ndr
->flags
= _flags_save_string
;
5009 uint32_t _flags_save_string
= ndr
->flags
;
5010 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
5011 if (r
->notify_name
) {
5012 uint32_t _relative_save_offset
;
5013 _relative_save_offset
= ndr
->offset
;
5014 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->notify_name
));
5015 _mem_save_notify_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5016 NDR_PULL_SET_MEM_CTX(ndr
, r
->notify_name
, 0);
5017 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->notify_name
));
5018 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_name_0
, 0);
5019 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5020 ndr
->relative_highest_offset
= ndr
->offset
;
5022 ndr
->offset
= _relative_save_offset
;
5024 ndr
->flags
= _flags_save_string
;
5027 uint32_t _flags_save_string
= ndr
->flags
;
5028 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
5030 uint32_t _relative_save_offset
;
5031 _relative_save_offset
= ndr
->offset
;
5032 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_type
));
5033 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5034 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
5035 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_type
));
5036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
5037 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5038 ndr
->relative_highest_offset
= ndr
->offset
;
5040 ndr
->offset
= _relative_save_offset
;
5042 ndr
->flags
= _flags_save_string
;
5045 uint32_t _flags_save_string
= ndr
->flags
;
5046 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
5047 if (r
->print_processor
) {
5048 uint32_t _relative_save_offset
;
5049 _relative_save_offset
= ndr
->offset
;
5050 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->print_processor
));
5051 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5052 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
5053 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->print_processor
));
5054 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
5055 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5056 ndr
->relative_highest_offset
= ndr
->offset
;
5058 ndr
->offset
= _relative_save_offset
;
5060 ndr
->flags
= _flags_save_string
;
5063 uint32_t _flags_save_string
= ndr
->flags
;
5064 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
5065 if (r
->parameters
) {
5066 uint32_t _relative_save_offset
;
5067 _relative_save_offset
= ndr
->offset
;
5068 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->parameters
));
5069 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5070 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
5071 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->parameters
));
5072 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
5073 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5074 ndr
->relative_highest_offset
= ndr
->offset
;
5076 ndr
->offset
= _relative_save_offset
;
5078 ndr
->flags
= _flags_save_string
;
5081 uint32_t _flags_save_string
= ndr
->flags
;
5082 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
5083 if (r
->driver_name
) {
5084 uint32_t _relative_save_offset
;
5085 _relative_save_offset
= ndr
->offset
;
5086 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
5087 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5088 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
5089 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
5090 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
5091 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5092 ndr
->relative_highest_offset
= ndr
->offset
;
5094 ndr
->offset
= _relative_save_offset
;
5096 ndr
->flags
= _flags_save_string
;
5099 uint32_t _flags_save_spoolss_DeviceMode
= ndr
->flags
;
5100 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
5102 uint32_t _relative_save_offset
;
5103 _relative_save_offset
= ndr
->offset
;
5104 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->devmode
));
5105 _mem_save_devmode_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5106 NDR_PULL_SET_MEM_CTX(ndr
, r
->devmode
, 0);
5108 struct ndr_pull
*_ndr_devmode
;
5109 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_devmode
, 0, -1));
5110 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode
, NDR_SCALARS
, r
->devmode
));
5111 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_devmode
, 0, -1));
5113 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_0
, 0);
5114 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5115 ndr
->relative_highest_offset
= ndr
->offset
;
5117 ndr
->offset
= _relative_save_offset
;
5119 ndr
->flags
= _flags_save_spoolss_DeviceMode
;
5122 uint32_t _flags_save_string
= ndr
->flags
;
5123 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
5124 if (r
->text_status
) {
5125 uint32_t _relative_save_offset
;
5126 _relative_save_offset
= ndr
->offset
;
5127 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->text_status
));
5128 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5129 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
5130 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->text_status
));
5131 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
5132 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5133 ndr
->relative_highest_offset
= ndr
->offset
;
5135 ndr
->offset
= _relative_save_offset
;
5137 ndr
->flags
= _flags_save_string
;
5140 uint32_t _flags_save_spoolss_security_descriptor
= ndr
->flags
;
5141 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_ALIGN4
);
5143 uint32_t _relative_save_offset
;
5144 _relative_save_offset
= ndr
->offset
;
5145 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->secdesc
));
5146 _mem_save_secdesc_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5147 NDR_PULL_SET_MEM_CTX(ndr
, r
->secdesc
, 0);
5149 struct ndr_pull
*_ndr_secdesc
;
5150 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_secdesc
, 0, -1));
5151 NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc
, NDR_SCALARS
|NDR_BUFFERS
, r
->secdesc
));
5152 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_secdesc
, 0, -1));
5154 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_0
, 0);
5155 if (ndr
->offset
> ndr
->relative_highest_offset
) {
5156 ndr
->relative_highest_offset
= ndr
->offset
;
5158 ndr
->offset
= _relative_save_offset
;
5160 ndr
->flags
= _flags_save_spoolss_security_descriptor
;
5163 return NDR_ERR_SUCCESS
;
5166 _PUBLIC_
void ndr_print_spoolss_JobInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfo4
*r
)
5168 ndr_print_struct(ndr
, name
, "spoolss_JobInfo4");
5170 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
5171 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
5173 if (r
->printer_name
) {
5174 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
5177 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
5179 if (r
->server_name
) {
5180 ndr_print_string(ndr
, "server_name", r
->server_name
);
5183 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
5186 ndr_print_string(ndr
, "user_name", r
->user_name
);
5189 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
5191 if (r
->document_name
) {
5192 ndr_print_string(ndr
, "document_name", r
->document_name
);
5195 ndr_print_ptr(ndr
, "notify_name", r
->notify_name
);
5197 if (r
->notify_name
) {
5198 ndr_print_string(ndr
, "notify_name", r
->notify_name
);
5201 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
5204 ndr_print_string(ndr
, "data_type", r
->data_type
);
5207 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
5209 if (r
->print_processor
) {
5210 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
5213 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
5215 if (r
->parameters
) {
5216 ndr_print_string(ndr
, "parameters", r
->parameters
);
5219 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
5221 if (r
->driver_name
) {
5222 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
5225 ndr_print_ptr(ndr
, "devmode", r
->devmode
);
5228 ndr_print_spoolss_DeviceMode(ndr
, "devmode", r
->devmode
);
5231 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
5233 if (r
->text_status
) {
5234 ndr_print_string(ndr
, "text_status", r
->text_status
);
5237 ndr_print_ptr(ndr
, "secdesc", r
->secdesc
);
5240 ndr_print_spoolss_security_descriptor(ndr
, "secdesc", r
->secdesc
);
5243 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
5244 ndr_print_uint32(ndr
, "priority", r
->priority
);
5245 ndr_print_uint32(ndr
, "position", r
->position
);
5246 ndr_print_uint32(ndr
, "start_time", r
->start_time
);
5247 ndr_print_uint32(ndr
, "until_time", r
->until_time
);
5248 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
5249 ndr_print_uint32(ndr
, "size", r
->size
);
5250 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
5251 ndr_print_uint32(ndr
, "time", r
->time
);
5252 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
5253 ndr_print_uint32(ndr
, "size_high", r
->size_high
);
5257 _PUBLIC_
size_t ndr_size_spoolss_JobInfo4(const struct spoolss_JobInfo4
*r
, struct smb_iconv_convenience
*ic
, int flags
)
5259 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo4
, ic
);
5262 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_JobInfo
*r
)
5264 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
5266 uint32_t _flags_save_UNION
= ndr
->flags
;
5267 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
5268 if (ndr_flags
& NDR_SCALARS
) {
5269 int level
= ndr_push_get_switch_value(ndr
, r
);
5270 NDR_CHECK(ndr_push_union_align(ndr
, 5));
5273 NDR_CHECK(ndr_push_align(ndr
, 5));
5274 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
5275 NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
5279 NDR_CHECK(ndr_push_align(ndr
, 5));
5280 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
5281 NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
5285 NDR_CHECK(ndr_push_align(ndr
, 4));
5286 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
5287 NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
5291 NDR_CHECK(ndr_push_align(ndr
, 5));
5292 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
5293 NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
5301 if (ndr_flags
& NDR_BUFFERS
) {
5302 int level
= ndr_push_get_switch_value(ndr
, r
);
5303 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
5306 NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
5310 NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
5317 NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
5325 ndr
->flags
= _flags_save_UNION
;
5327 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
5328 return NDR_ERR_SUCCESS
;
5331 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_JobInfo
*r
)
5333 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
5336 uint32_t _flags_save_UNION
= ndr
->flags
;
5337 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
5338 level
= ndr_pull_get_switch_value(ndr
, r
);
5339 if (ndr_flags
& NDR_SCALARS
) {
5340 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
5343 NDR_CHECK(ndr_pull_align(ndr
, 5));
5344 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
5345 NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
5349 NDR_CHECK(ndr_pull_align(ndr
, 5));
5350 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
5351 NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
5355 NDR_CHECK(ndr_pull_align(ndr
, 4));
5356 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
5357 NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
5361 NDR_CHECK(ndr_pull_align(ndr
, 5));
5362 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
5363 NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
5371 if (ndr_flags
& NDR_BUFFERS
) {
5372 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
5375 NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
5379 NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
5386 NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
5394 ndr
->flags
= _flags_save_UNION
;
5396 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
5397 return NDR_ERR_SUCCESS
;
5400 _PUBLIC_
void ndr_print_spoolss_JobInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_JobInfo
*r
)
5404 uint32_t _flags_save_UNION
= ndr
->flags
;
5405 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
5406 level
= ndr_print_get_switch_value(ndr
, r
);
5407 ndr_print_union(ndr
, name
, level
, "spoolss_JobInfo");
5410 ndr_print_spoolss_JobInfo1(ndr
, "info1", &r
->info1
);
5414 ndr_print_spoolss_JobInfo2(ndr
, "info2", &r
->info2
);
5418 ndr_print_spoolss_JobInfo3(ndr
, "info3", &r
->info3
);
5422 ndr_print_spoolss_JobInfo4(ndr
, "info4", &r
->info4
);
5429 ndr
->flags
= _flags_save_UNION
;
5433 _PUBLIC_
size_t ndr_size_spoolss_JobInfo(const union spoolss_JobInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
5435 flags
|= LIBNDR_FLAG_RELATIVE_REVERSE
;
5436 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_JobInfo
, ic
);
5439 static enum ndr_err_code
ndr_push_spoolss_SetJobInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetJobInfo1
*r
)
5441 if (ndr_flags
& NDR_SCALARS
) {
5442 NDR_CHECK(ndr_push_align(ndr
, 5));
5443 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
5444 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printer_name
));
5445 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
5446 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
5447 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->document_name
));
5448 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_type
));
5449 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->text_status
));
5450 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
5451 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
5452 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
5453 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
5454 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
5455 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
5456 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5458 if (ndr_flags
& NDR_BUFFERS
) {
5459 if (r
->printer_name
) {
5460 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
5461 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5462 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
5463 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printer_name
, ndr_charset_length(r
->printer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5465 if (r
->server_name
) {
5466 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
5467 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5468 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
5469 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5472 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
5473 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5474 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
5475 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5477 if (r
->document_name
) {
5478 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
5479 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5480 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
5481 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->document_name
, ndr_charset_length(r
->document_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5484 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
5485 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5486 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
5487 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_type
, ndr_charset_length(r
->data_type
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5489 if (r
->text_status
) {
5490 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
5491 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5492 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
5493 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->text_status
, ndr_charset_length(r
->text_status
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5496 return NDR_ERR_SUCCESS
;
5499 static enum ndr_err_code
ndr_pull_spoolss_SetJobInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetJobInfo1
*r
)
5501 uint32_t _ptr_printer_name
;
5502 TALLOC_CTX
*_mem_save_printer_name_0
;
5503 uint32_t _ptr_server_name
;
5504 TALLOC_CTX
*_mem_save_server_name_0
;
5505 uint32_t _ptr_user_name
;
5506 TALLOC_CTX
*_mem_save_user_name_0
;
5507 uint32_t _ptr_document_name
;
5508 TALLOC_CTX
*_mem_save_document_name_0
;
5509 uint32_t _ptr_data_type
;
5510 TALLOC_CTX
*_mem_save_data_type_0
;
5511 uint32_t _ptr_text_status
;
5512 TALLOC_CTX
*_mem_save_text_status_0
;
5513 if (ndr_flags
& NDR_SCALARS
) {
5514 NDR_CHECK(ndr_pull_align(ndr
, 5));
5515 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
5516 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
5517 if (_ptr_printer_name
) {
5518 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
5520 r
->printer_name
= NULL
;
5522 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
5523 if (_ptr_server_name
) {
5524 NDR_PULL_ALLOC(ndr
, r
->server_name
);
5526 r
->server_name
= NULL
;
5528 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
5529 if (_ptr_user_name
) {
5530 NDR_PULL_ALLOC(ndr
, r
->user_name
);
5532 r
->user_name
= NULL
;
5534 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
5535 if (_ptr_document_name
) {
5536 NDR_PULL_ALLOC(ndr
, r
->document_name
);
5538 r
->document_name
= NULL
;
5540 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
5541 if (_ptr_data_type
) {
5542 NDR_PULL_ALLOC(ndr
, r
->data_type
);
5544 r
->data_type
= NULL
;
5546 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
5547 if (_ptr_text_status
) {
5548 NDR_PULL_ALLOC(ndr
, r
->text_status
);
5550 r
->text_status
= NULL
;
5552 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
5553 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
5554 if (r
->priority
> 99) {
5555 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5557 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
5558 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
5559 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
5560 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
5561 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5563 if (ndr_flags
& NDR_BUFFERS
) {
5564 if (r
->printer_name
) {
5565 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5566 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
5567 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printer_name
));
5568 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printer_name
));
5569 if (ndr_get_array_length(ndr
, &r
->printer_name
) > ndr_get_array_size(ndr
, &r
->printer_name
)) {
5570 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
));
5572 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t)));
5573 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printer_name
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t), CH_UTF16
));
5574 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
5576 if (r
->server_name
) {
5577 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5578 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
5579 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
5580 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
5581 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
5582 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
));
5584 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
5585 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
5586 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
5589 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5590 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
5591 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
5592 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
5593 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
5594 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
));
5596 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
5597 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
5598 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
5600 if (r
->document_name
) {
5601 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5602 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
5603 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->document_name
));
5604 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->document_name
));
5605 if (ndr_get_array_length(ndr
, &r
->document_name
) > ndr_get_array_size(ndr
, &r
->document_name
)) {
5606 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
));
5608 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t)));
5609 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->document_name
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t), CH_UTF16
));
5610 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
5613 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5614 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
5615 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_type
));
5616 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_type
));
5617 if (ndr_get_array_length(ndr
, &r
->data_type
) > ndr_get_array_size(ndr
, &r
->data_type
)) {
5618 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
));
5620 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t)));
5621 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_type
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t), CH_UTF16
));
5622 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
5624 if (r
->text_status
) {
5625 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5626 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
5627 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->text_status
));
5628 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->text_status
));
5629 if (ndr_get_array_length(ndr
, &r
->text_status
) > ndr_get_array_size(ndr
, &r
->text_status
)) {
5630 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
));
5632 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t)));
5633 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->text_status
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t), CH_UTF16
));
5634 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
5637 return NDR_ERR_SUCCESS
;
5640 _PUBLIC_
void ndr_print_spoolss_SetJobInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetJobInfo1
*r
)
5642 ndr_print_struct(ndr
, name
, "spoolss_SetJobInfo1");
5644 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
5645 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
5647 if (r
->printer_name
) {
5648 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
5651 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
5653 if (r
->server_name
) {
5654 ndr_print_string(ndr
, "server_name", r
->server_name
);
5657 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
5660 ndr_print_string(ndr
, "user_name", r
->user_name
);
5663 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
5665 if (r
->document_name
) {
5666 ndr_print_string(ndr
, "document_name", r
->document_name
);
5669 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
5672 ndr_print_string(ndr
, "data_type", r
->data_type
);
5675 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
5677 if (r
->text_status
) {
5678 ndr_print_string(ndr
, "text_status", r
->text_status
);
5681 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
5682 ndr_print_uint32(ndr
, "priority", r
->priority
);
5683 ndr_print_uint32(ndr
, "position", r
->position
);
5684 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
5685 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
5686 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
5690 static enum ndr_err_code
ndr_push_spoolss_SetJobInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetJobInfo2
*r
)
5692 if (ndr_flags
& NDR_SCALARS
) {
5693 NDR_CHECK(ndr_push_align(ndr
, 5));
5694 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
5695 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printer_name
));
5696 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
5697 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
5698 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->document_name
));
5699 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->notify_name
));
5700 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_type
));
5701 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->print_processor
));
5702 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->parameters
));
5703 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
5704 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->_devmode_ptr
));
5705 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->text_status
));
5706 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->_secdesc_ptr
));
5707 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
5708 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
5709 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
5710 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->start_time
));
5711 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->until_time
));
5712 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
5713 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
5714 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
5715 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time
));
5716 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
5717 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
5719 if (ndr_flags
& NDR_BUFFERS
) {
5720 if (r
->printer_name
) {
5721 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
5722 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5723 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
5724 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printer_name
, ndr_charset_length(r
->printer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5726 if (r
->server_name
) {
5727 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
5728 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5729 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
5730 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5733 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
5734 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5735 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
5736 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5738 if (r
->document_name
) {
5739 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
5740 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5741 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
5742 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->document_name
, ndr_charset_length(r
->document_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5744 if (r
->notify_name
) {
5745 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->notify_name
, CH_UTF16
)));
5746 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5747 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->notify_name
, CH_UTF16
)));
5748 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->notify_name
, ndr_charset_length(r
->notify_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5751 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
5752 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5753 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
5754 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_type
, ndr_charset_length(r
->data_type
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5756 if (r
->print_processor
) {
5757 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
5758 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5759 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
5760 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->print_processor
, ndr_charset_length(r
->print_processor
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5762 if (r
->parameters
) {
5763 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
5764 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5765 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
5766 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->parameters
, ndr_charset_length(r
->parameters
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5768 if (r
->driver_name
) {
5769 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
5770 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5771 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
5772 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5774 if (r
->text_status
) {
5775 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
5776 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
5777 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
5778 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->text_status
, ndr_charset_length(r
->text_status
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
5781 return NDR_ERR_SUCCESS
;
5784 static enum ndr_err_code
ndr_pull_spoolss_SetJobInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetJobInfo2
*r
)
5786 uint32_t _ptr_printer_name
;
5787 TALLOC_CTX
*_mem_save_printer_name_0
;
5788 uint32_t _ptr_server_name
;
5789 TALLOC_CTX
*_mem_save_server_name_0
;
5790 uint32_t _ptr_user_name
;
5791 TALLOC_CTX
*_mem_save_user_name_0
;
5792 uint32_t _ptr_document_name
;
5793 TALLOC_CTX
*_mem_save_document_name_0
;
5794 uint32_t _ptr_notify_name
;
5795 TALLOC_CTX
*_mem_save_notify_name_0
;
5796 uint32_t _ptr_data_type
;
5797 TALLOC_CTX
*_mem_save_data_type_0
;
5798 uint32_t _ptr_print_processor
;
5799 TALLOC_CTX
*_mem_save_print_processor_0
;
5800 uint32_t _ptr_parameters
;
5801 TALLOC_CTX
*_mem_save_parameters_0
;
5802 uint32_t _ptr_driver_name
;
5803 TALLOC_CTX
*_mem_save_driver_name_0
;
5804 uint32_t _ptr_text_status
;
5805 TALLOC_CTX
*_mem_save_text_status_0
;
5806 if (ndr_flags
& NDR_SCALARS
) {
5807 NDR_CHECK(ndr_pull_align(ndr
, 5));
5808 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
5809 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
5810 if (_ptr_printer_name
) {
5811 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
5813 r
->printer_name
= NULL
;
5815 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
5816 if (_ptr_server_name
) {
5817 NDR_PULL_ALLOC(ndr
, r
->server_name
);
5819 r
->server_name
= NULL
;
5821 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
5822 if (_ptr_user_name
) {
5823 NDR_PULL_ALLOC(ndr
, r
->user_name
);
5825 r
->user_name
= NULL
;
5827 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
5828 if (_ptr_document_name
) {
5829 NDR_PULL_ALLOC(ndr
, r
->document_name
);
5831 r
->document_name
= NULL
;
5833 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_name
));
5834 if (_ptr_notify_name
) {
5835 NDR_PULL_ALLOC(ndr
, r
->notify_name
);
5837 r
->notify_name
= NULL
;
5839 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
5840 if (_ptr_data_type
) {
5841 NDR_PULL_ALLOC(ndr
, r
->data_type
);
5843 r
->data_type
= NULL
;
5845 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
5846 if (_ptr_print_processor
) {
5847 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
5849 r
->print_processor
= NULL
;
5851 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
5852 if (_ptr_parameters
) {
5853 NDR_PULL_ALLOC(ndr
, r
->parameters
);
5855 r
->parameters
= NULL
;
5857 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
5858 if (_ptr_driver_name
) {
5859 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
5861 r
->driver_name
= NULL
;
5863 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_devmode_ptr
));
5864 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
5865 if (_ptr_text_status
) {
5866 NDR_PULL_ALLOC(ndr
, r
->text_status
);
5868 r
->text_status
= NULL
;
5870 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_secdesc_ptr
));
5871 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
5872 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
5873 if (r
->priority
> 99) {
5874 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
5876 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
5877 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->start_time
));
5878 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->until_time
));
5879 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
5880 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
5881 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
5882 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time
));
5883 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
5884 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
5886 if (ndr_flags
& NDR_BUFFERS
) {
5887 if (r
->printer_name
) {
5888 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5889 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
5890 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printer_name
));
5891 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printer_name
));
5892 if (ndr_get_array_length(ndr
, &r
->printer_name
) > ndr_get_array_size(ndr
, &r
->printer_name
)) {
5893 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
));
5895 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t)));
5896 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printer_name
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t), CH_UTF16
));
5897 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
5899 if (r
->server_name
) {
5900 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5901 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
5902 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
5903 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
5904 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
5905 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
));
5907 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
5908 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
5909 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
5912 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5913 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
5914 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
5915 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
5916 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
5917 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
));
5919 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
5920 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
5921 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
5923 if (r
->document_name
) {
5924 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5925 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
5926 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->document_name
));
5927 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->document_name
));
5928 if (ndr_get_array_length(ndr
, &r
->document_name
) > ndr_get_array_size(ndr
, &r
->document_name
)) {
5929 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
));
5931 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t)));
5932 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->document_name
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t), CH_UTF16
));
5933 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
5935 if (r
->notify_name
) {
5936 _mem_save_notify_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5937 NDR_PULL_SET_MEM_CTX(ndr
, r
->notify_name
, 0);
5938 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->notify_name
));
5939 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->notify_name
));
5940 if (ndr_get_array_length(ndr
, &r
->notify_name
) > ndr_get_array_size(ndr
, &r
->notify_name
)) {
5941 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
));
5943 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->notify_name
), sizeof(uint16_t)));
5944 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->notify_name
, ndr_get_array_length(ndr
, &r
->notify_name
), sizeof(uint16_t), CH_UTF16
));
5945 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_name_0
, 0);
5948 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5949 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
5950 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_type
));
5951 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_type
));
5952 if (ndr_get_array_length(ndr
, &r
->data_type
) > ndr_get_array_size(ndr
, &r
->data_type
)) {
5953 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
));
5955 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t)));
5956 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_type
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t), CH_UTF16
));
5957 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
5959 if (r
->print_processor
) {
5960 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5961 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
5962 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->print_processor
));
5963 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->print_processor
));
5964 if (ndr_get_array_length(ndr
, &r
->print_processor
) > ndr_get_array_size(ndr
, &r
->print_processor
)) {
5965 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
));
5967 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t)));
5968 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->print_processor
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t), CH_UTF16
));
5969 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
5971 if (r
->parameters
) {
5972 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5973 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
5974 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->parameters
));
5975 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->parameters
));
5976 if (ndr_get_array_length(ndr
, &r
->parameters
) > ndr_get_array_size(ndr
, &r
->parameters
)) {
5977 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
));
5979 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t)));
5980 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->parameters
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t), CH_UTF16
));
5981 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
5983 if (r
->driver_name
) {
5984 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5985 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
5986 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
5987 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
5988 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
5989 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
));
5991 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
5992 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
5993 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
5995 if (r
->text_status
) {
5996 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
5997 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
5998 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->text_status
));
5999 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->text_status
));
6000 if (ndr_get_array_length(ndr
, &r
->text_status
) > ndr_get_array_size(ndr
, &r
->text_status
)) {
6001 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
));
6003 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t)));
6004 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->text_status
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t), CH_UTF16
));
6005 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
6008 return NDR_ERR_SUCCESS
;
6011 _PUBLIC_
void ndr_print_spoolss_SetJobInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetJobInfo2
*r
)
6013 ndr_print_struct(ndr
, name
, "spoolss_SetJobInfo2");
6015 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
6016 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
6018 if (r
->printer_name
) {
6019 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
6022 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
6024 if (r
->server_name
) {
6025 ndr_print_string(ndr
, "server_name", r
->server_name
);
6028 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
6031 ndr_print_string(ndr
, "user_name", r
->user_name
);
6034 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
6036 if (r
->document_name
) {
6037 ndr_print_string(ndr
, "document_name", r
->document_name
);
6040 ndr_print_ptr(ndr
, "notify_name", r
->notify_name
);
6042 if (r
->notify_name
) {
6043 ndr_print_string(ndr
, "notify_name", r
->notify_name
);
6046 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
6049 ndr_print_string(ndr
, "data_type", r
->data_type
);
6052 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
6054 if (r
->print_processor
) {
6055 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
6058 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
6060 if (r
->parameters
) {
6061 ndr_print_string(ndr
, "parameters", r
->parameters
);
6064 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
6066 if (r
->driver_name
) {
6067 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
6070 ndr_print_uint32(ndr
, "_devmode_ptr", r
->_devmode_ptr
);
6071 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
6073 if (r
->text_status
) {
6074 ndr_print_string(ndr
, "text_status", r
->text_status
);
6077 ndr_print_uint32(ndr
, "_secdesc_ptr", r
->_secdesc_ptr
);
6078 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
6079 ndr_print_uint32(ndr
, "priority", r
->priority
);
6080 ndr_print_uint32(ndr
, "position", r
->position
);
6081 ndr_print_uint32(ndr
, "start_time", r
->start_time
);
6082 ndr_print_uint32(ndr
, "until_time", r
->until_time
);
6083 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
6084 ndr_print_uint32(ndr
, "size", r
->size
);
6085 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
6086 ndr_print_uint32(ndr
, "time", r
->time
);
6087 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
6091 static enum ndr_err_code
ndr_push_spoolss_SetJobInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetJobInfo4
*r
)
6093 if (ndr_flags
& NDR_SCALARS
) {
6094 NDR_CHECK(ndr_push_align(ndr
, 5));
6095 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
6096 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printer_name
));
6097 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->server_name
));
6098 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user_name
));
6099 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->document_name
));
6100 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->notify_name
));
6101 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_type
));
6102 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->print_processor
));
6103 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->parameters
));
6104 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
6105 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->_devmode_ptr
));
6106 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->text_status
));
6107 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->_secdesc_ptr
));
6108 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr
, NDR_SCALARS
, r
->status
));
6109 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
6110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->position
));
6111 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->start_time
));
6112 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->until_time
));
6113 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
6114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
6115 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
6116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->time
));
6117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->pages_printed
));
6118 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size_high
));
6119 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
6121 if (ndr_flags
& NDR_BUFFERS
) {
6122 if (r
->printer_name
) {
6123 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
6124 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6125 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printer_name
, CH_UTF16
)));
6126 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printer_name
, ndr_charset_length(r
->printer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6128 if (r
->server_name
) {
6129 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
6130 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6131 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->server_name
, CH_UTF16
)));
6132 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->server_name
, ndr_charset_length(r
->server_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6135 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
6136 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6137 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user_name
, CH_UTF16
)));
6138 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user_name
, ndr_charset_length(r
->user_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6140 if (r
->document_name
) {
6141 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
6142 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6143 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
6144 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->document_name
, ndr_charset_length(r
->document_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6146 if (r
->notify_name
) {
6147 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->notify_name
, CH_UTF16
)));
6148 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6149 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->notify_name
, CH_UTF16
)));
6150 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->notify_name
, ndr_charset_length(r
->notify_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6153 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
6154 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6155 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_type
, CH_UTF16
)));
6156 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_type
, ndr_charset_length(r
->data_type
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6158 if (r
->print_processor
) {
6159 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
6160 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6161 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
6162 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->print_processor
, ndr_charset_length(r
->print_processor
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6164 if (r
->parameters
) {
6165 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
6166 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6167 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
6168 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->parameters
, ndr_charset_length(r
->parameters
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6170 if (r
->driver_name
) {
6171 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
6172 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6173 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
6174 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6176 if (r
->text_status
) {
6177 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
6178 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6179 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->text_status
, CH_UTF16
)));
6180 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->text_status
, ndr_charset_length(r
->text_status
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6183 return NDR_ERR_SUCCESS
;
6186 static enum ndr_err_code
ndr_pull_spoolss_SetJobInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetJobInfo4
*r
)
6188 uint32_t _ptr_printer_name
;
6189 TALLOC_CTX
*_mem_save_printer_name_0
;
6190 uint32_t _ptr_server_name
;
6191 TALLOC_CTX
*_mem_save_server_name_0
;
6192 uint32_t _ptr_user_name
;
6193 TALLOC_CTX
*_mem_save_user_name_0
;
6194 uint32_t _ptr_document_name
;
6195 TALLOC_CTX
*_mem_save_document_name_0
;
6196 uint32_t _ptr_notify_name
;
6197 TALLOC_CTX
*_mem_save_notify_name_0
;
6198 uint32_t _ptr_data_type
;
6199 TALLOC_CTX
*_mem_save_data_type_0
;
6200 uint32_t _ptr_print_processor
;
6201 TALLOC_CTX
*_mem_save_print_processor_0
;
6202 uint32_t _ptr_parameters
;
6203 TALLOC_CTX
*_mem_save_parameters_0
;
6204 uint32_t _ptr_driver_name
;
6205 TALLOC_CTX
*_mem_save_driver_name_0
;
6206 uint32_t _ptr_text_status
;
6207 TALLOC_CTX
*_mem_save_text_status_0
;
6208 if (ndr_flags
& NDR_SCALARS
) {
6209 NDR_CHECK(ndr_pull_align(ndr
, 5));
6210 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
6211 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printer_name
));
6212 if (_ptr_printer_name
) {
6213 NDR_PULL_ALLOC(ndr
, r
->printer_name
);
6215 r
->printer_name
= NULL
;
6217 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
6218 if (_ptr_server_name
) {
6219 NDR_PULL_ALLOC(ndr
, r
->server_name
);
6221 r
->server_name
= NULL
;
6223 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user_name
));
6224 if (_ptr_user_name
) {
6225 NDR_PULL_ALLOC(ndr
, r
->user_name
);
6227 r
->user_name
= NULL
;
6229 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
6230 if (_ptr_document_name
) {
6231 NDR_PULL_ALLOC(ndr
, r
->document_name
);
6233 r
->document_name
= NULL
;
6235 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_name
));
6236 if (_ptr_notify_name
) {
6237 NDR_PULL_ALLOC(ndr
, r
->notify_name
);
6239 r
->notify_name
= NULL
;
6241 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
6242 if (_ptr_data_type
) {
6243 NDR_PULL_ALLOC(ndr
, r
->data_type
);
6245 r
->data_type
= NULL
;
6247 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
6248 if (_ptr_print_processor
) {
6249 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
6251 r
->print_processor
= NULL
;
6253 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
6254 if (_ptr_parameters
) {
6255 NDR_PULL_ALLOC(ndr
, r
->parameters
);
6257 r
->parameters
= NULL
;
6259 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
6260 if (_ptr_driver_name
) {
6261 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
6263 r
->driver_name
= NULL
;
6265 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_devmode_ptr
));
6266 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_text_status
));
6267 if (_ptr_text_status
) {
6268 NDR_PULL_ALLOC(ndr
, r
->text_status
);
6270 r
->text_status
= NULL
;
6272 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_secdesc_ptr
));
6273 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr
, NDR_SCALARS
, &r
->status
));
6274 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
6275 if (r
->priority
> 99) {
6276 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
6278 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->position
));
6279 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->start_time
));
6280 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->until_time
));
6281 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
6282 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
6283 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->submitted
));
6284 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->time
));
6285 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->pages_printed
));
6286 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size_high
));
6287 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
6289 if (ndr_flags
& NDR_BUFFERS
) {
6290 if (r
->printer_name
) {
6291 _mem_save_printer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6292 NDR_PULL_SET_MEM_CTX(ndr
, r
->printer_name
, 0);
6293 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printer_name
));
6294 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printer_name
));
6295 if (ndr_get_array_length(ndr
, &r
->printer_name
) > ndr_get_array_size(ndr
, &r
->printer_name
)) {
6296 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
));
6298 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t)));
6299 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printer_name
, ndr_get_array_length(ndr
, &r
->printer_name
), sizeof(uint16_t), CH_UTF16
));
6300 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printer_name_0
, 0);
6302 if (r
->server_name
) {
6303 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6304 NDR_PULL_SET_MEM_CTX(ndr
, r
->server_name
, 0);
6305 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->server_name
));
6306 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->server_name
));
6307 if (ndr_get_array_length(ndr
, &r
->server_name
) > ndr_get_array_size(ndr
, &r
->server_name
)) {
6308 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
));
6310 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t)));
6311 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->server_name
, ndr_get_array_length(ndr
, &r
->server_name
), sizeof(uint16_t), CH_UTF16
));
6312 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
6315 _mem_save_user_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6316 NDR_PULL_SET_MEM_CTX(ndr
, r
->user_name
, 0);
6317 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user_name
));
6318 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user_name
));
6319 if (ndr_get_array_length(ndr
, &r
->user_name
) > ndr_get_array_size(ndr
, &r
->user_name
)) {
6320 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
));
6322 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t)));
6323 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user_name
, ndr_get_array_length(ndr
, &r
->user_name
), sizeof(uint16_t), CH_UTF16
));
6324 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_name_0
, 0);
6326 if (r
->document_name
) {
6327 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6328 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
6329 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->document_name
));
6330 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->document_name
));
6331 if (ndr_get_array_length(ndr
, &r
->document_name
) > ndr_get_array_size(ndr
, &r
->document_name
)) {
6332 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
));
6334 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t)));
6335 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->document_name
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t), CH_UTF16
));
6336 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
6338 if (r
->notify_name
) {
6339 _mem_save_notify_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6340 NDR_PULL_SET_MEM_CTX(ndr
, r
->notify_name
, 0);
6341 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->notify_name
));
6342 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->notify_name
));
6343 if (ndr_get_array_length(ndr
, &r
->notify_name
) > ndr_get_array_size(ndr
, &r
->notify_name
)) {
6344 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
));
6346 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->notify_name
), sizeof(uint16_t)));
6347 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->notify_name
, ndr_get_array_length(ndr
, &r
->notify_name
), sizeof(uint16_t), CH_UTF16
));
6348 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_name_0
, 0);
6351 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6352 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_type
, 0);
6353 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_type
));
6354 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_type
));
6355 if (ndr_get_array_length(ndr
, &r
->data_type
) > ndr_get_array_size(ndr
, &r
->data_type
)) {
6356 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
));
6358 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t)));
6359 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_type
, ndr_get_array_length(ndr
, &r
->data_type
), sizeof(uint16_t), CH_UTF16
));
6360 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
6362 if (r
->print_processor
) {
6363 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6364 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
6365 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->print_processor
));
6366 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->print_processor
));
6367 if (ndr_get_array_length(ndr
, &r
->print_processor
) > ndr_get_array_size(ndr
, &r
->print_processor
)) {
6368 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
));
6370 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t)));
6371 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->print_processor
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t), CH_UTF16
));
6372 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
6374 if (r
->parameters
) {
6375 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6376 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
6377 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->parameters
));
6378 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->parameters
));
6379 if (ndr_get_array_length(ndr
, &r
->parameters
) > ndr_get_array_size(ndr
, &r
->parameters
)) {
6380 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
));
6382 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t)));
6383 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->parameters
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t), CH_UTF16
));
6384 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
6386 if (r
->driver_name
) {
6387 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6388 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
6389 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
6390 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
6391 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
6392 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
));
6394 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
6395 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
6396 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
6398 if (r
->text_status
) {
6399 _mem_save_text_status_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6400 NDR_PULL_SET_MEM_CTX(ndr
, r
->text_status
, 0);
6401 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->text_status
));
6402 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->text_status
));
6403 if (ndr_get_array_length(ndr
, &r
->text_status
) > ndr_get_array_size(ndr
, &r
->text_status
)) {
6404 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
));
6406 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t)));
6407 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->text_status
, ndr_get_array_length(ndr
, &r
->text_status
), sizeof(uint16_t), CH_UTF16
));
6408 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_text_status_0
, 0);
6411 return NDR_ERR_SUCCESS
;
6414 _PUBLIC_
void ndr_print_spoolss_SetJobInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetJobInfo4
*r
)
6416 ndr_print_struct(ndr
, name
, "spoolss_SetJobInfo4");
6418 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
6419 ndr_print_ptr(ndr
, "printer_name", r
->printer_name
);
6421 if (r
->printer_name
) {
6422 ndr_print_string(ndr
, "printer_name", r
->printer_name
);
6425 ndr_print_ptr(ndr
, "server_name", r
->server_name
);
6427 if (r
->server_name
) {
6428 ndr_print_string(ndr
, "server_name", r
->server_name
);
6431 ndr_print_ptr(ndr
, "user_name", r
->user_name
);
6434 ndr_print_string(ndr
, "user_name", r
->user_name
);
6437 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
6439 if (r
->document_name
) {
6440 ndr_print_string(ndr
, "document_name", r
->document_name
);
6443 ndr_print_ptr(ndr
, "notify_name", r
->notify_name
);
6445 if (r
->notify_name
) {
6446 ndr_print_string(ndr
, "notify_name", r
->notify_name
);
6449 ndr_print_ptr(ndr
, "data_type", r
->data_type
);
6452 ndr_print_string(ndr
, "data_type", r
->data_type
);
6455 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
6457 if (r
->print_processor
) {
6458 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
6461 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
6463 if (r
->parameters
) {
6464 ndr_print_string(ndr
, "parameters", r
->parameters
);
6467 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
6469 if (r
->driver_name
) {
6470 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
6473 ndr_print_uint32(ndr
, "_devmode_ptr", r
->_devmode_ptr
);
6474 ndr_print_ptr(ndr
, "text_status", r
->text_status
);
6476 if (r
->text_status
) {
6477 ndr_print_string(ndr
, "text_status", r
->text_status
);
6480 ndr_print_uint32(ndr
, "_secdesc_ptr", r
->_secdesc_ptr
);
6481 ndr_print_spoolss_JobStatus(ndr
, "status", r
->status
);
6482 ndr_print_uint32(ndr
, "priority", r
->priority
);
6483 ndr_print_uint32(ndr
, "position", r
->position
);
6484 ndr_print_uint32(ndr
, "start_time", r
->start_time
);
6485 ndr_print_uint32(ndr
, "until_time", r
->until_time
);
6486 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
6487 ndr_print_uint32(ndr
, "size", r
->size
);
6488 ndr_print_spoolss_Time(ndr
, "submitted", &r
->submitted
);
6489 ndr_print_uint32(ndr
, "time", r
->time
);
6490 ndr_print_uint32(ndr
, "pages_printed", r
->pages_printed
);
6491 ndr_print_uint32(ndr
, "size_high", r
->size_high
);
6495 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_SetJobInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_SetJobInfo
*r
)
6497 if (ndr_flags
& NDR_SCALARS
) {
6498 int level
= ndr_push_get_switch_value(ndr
, r
);
6499 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
6500 NDR_CHECK(ndr_push_union_align(ndr
, 5));
6503 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
6507 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
6511 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
6515 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
6523 if (ndr_flags
& NDR_BUFFERS
) {
6524 int level
= ndr_push_get_switch_value(ndr
, r
);
6528 NDR_CHECK(ndr_push_spoolss_SetJobInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
6534 NDR_CHECK(ndr_push_spoolss_SetJobInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
6540 NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr
, NDR_SCALARS
, r
->info3
));
6546 NDR_CHECK(ndr_push_spoolss_SetJobInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
6555 return NDR_ERR_SUCCESS
;
6558 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_SetJobInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_SetJobInfo
*r
)
6562 TALLOC_CTX
*_mem_save_info1_0
;
6563 TALLOC_CTX
*_mem_save_info2_0
;
6564 TALLOC_CTX
*_mem_save_info3_0
;
6565 TALLOC_CTX
*_mem_save_info4_0
;
6566 level
= ndr_pull_get_switch_value(ndr
, r
);
6567 if (ndr_flags
& NDR_SCALARS
) {
6568 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
6569 if (_level
!= level
) {
6570 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
6572 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
6575 uint32_t _ptr_info1
;
6576 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
6578 NDR_PULL_ALLOC(ndr
, r
->info1
);
6585 uint32_t _ptr_info2
;
6586 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
6588 NDR_PULL_ALLOC(ndr
, r
->info2
);
6595 uint32_t _ptr_info3
;
6596 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
6598 NDR_PULL_ALLOC(ndr
, r
->info3
);
6605 uint32_t _ptr_info4
;
6606 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
6608 NDR_PULL_ALLOC(ndr
, r
->info4
);
6619 if (ndr_flags
& NDR_BUFFERS
) {
6623 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6624 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
6625 NDR_CHECK(ndr_pull_spoolss_SetJobInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
6626 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
6632 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6633 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
6634 NDR_CHECK(ndr_pull_spoolss_SetJobInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
6635 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
6641 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6642 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
6643 NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr
, NDR_SCALARS
, r
->info3
));
6644 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
6650 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6651 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
6652 NDR_CHECK(ndr_pull_spoolss_SetJobInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
6653 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
6662 return NDR_ERR_SUCCESS
;
6665 _PUBLIC_
void ndr_print_spoolss_SetJobInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_SetJobInfo
*r
)
6668 level
= ndr_print_get_switch_value(ndr
, r
);
6669 ndr_print_union(ndr
, name
, level
, "spoolss_SetJobInfo");
6672 ndr_print_ptr(ndr
, "info1", r
->info1
);
6675 ndr_print_spoolss_SetJobInfo1(ndr
, "info1", r
->info1
);
6681 ndr_print_ptr(ndr
, "info2", r
->info2
);
6684 ndr_print_spoolss_SetJobInfo2(ndr
, "info2", r
->info2
);
6690 ndr_print_ptr(ndr
, "info3", r
->info3
);
6693 ndr_print_spoolss_JobInfo3(ndr
, "info3", r
->info3
);
6699 ndr_print_ptr(ndr
, "info4", r
->info4
);
6702 ndr_print_spoolss_SetJobInfo4(ndr
, "info4", r
->info4
);
6713 static enum ndr_err_code
ndr_push_spoolss_JobInfoContainer(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_JobInfoContainer
*r
)
6715 if (ndr_flags
& NDR_SCALARS
) {
6716 NDR_CHECK(ndr_push_align(ndr
, 5));
6717 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
6718 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->level
));
6719 NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr
, NDR_SCALARS
, &r
->info
));
6720 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
6722 if (ndr_flags
& NDR_BUFFERS
) {
6723 NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr
, NDR_BUFFERS
, &r
->info
));
6725 return NDR_ERR_SUCCESS
;
6728 static enum ndr_err_code
ndr_pull_spoolss_JobInfoContainer(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_JobInfoContainer
*r
)
6730 if (ndr_flags
& NDR_SCALARS
) {
6731 NDR_CHECK(ndr_pull_align(ndr
, 5));
6732 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
6733 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->level
));
6734 NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr
, NDR_SCALARS
, &r
->info
));
6735 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
6737 if (ndr_flags
& NDR_BUFFERS
) {
6738 NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr
, NDR_BUFFERS
, &r
->info
));
6740 return NDR_ERR_SUCCESS
;
6743 _PUBLIC_
void ndr_print_spoolss_JobInfoContainer(struct ndr_print
*ndr
, const char *name
, const struct spoolss_JobInfoContainer
*r
)
6745 ndr_print_struct(ndr
, name
, "spoolss_JobInfoContainer");
6747 ndr_print_uint32(ndr
, "level", r
->level
);
6748 ndr_print_set_switch_value(ndr
, &r
->info
, r
->level
);
6749 ndr_print_spoolss_SetJobInfo(ndr
, "info", &r
->info
);
6753 static enum ndr_err_code
ndr_push_spoolss_JobControl(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_JobControl r
)
6755 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
6756 return NDR_ERR_SUCCESS
;
6759 static enum ndr_err_code
ndr_pull_spoolss_JobControl(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_JobControl
*r
)
6762 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
6764 return NDR_ERR_SUCCESS
;
6767 _PUBLIC_
void ndr_print_spoolss_JobControl(struct ndr_print
*ndr
, const char *name
, enum spoolss_JobControl r
)
6769 const char *val
= NULL
;
6772 case SPOOLSS_JOB_CONTROL_PAUSE
: val
= "SPOOLSS_JOB_CONTROL_PAUSE"; break;
6773 case SPOOLSS_JOB_CONTROL_RESUME
: val
= "SPOOLSS_JOB_CONTROL_RESUME"; break;
6774 case SPOOLSS_JOB_CONTROL_CANCEL
: val
= "SPOOLSS_JOB_CONTROL_CANCEL"; break;
6775 case SPOOLSS_JOB_CONTROL_RESTART
: val
= "SPOOLSS_JOB_CONTROL_RESTART"; break;
6776 case SPOOLSS_JOB_CONTROL_DELETE
: val
= "SPOOLSS_JOB_CONTROL_DELETE"; break;
6777 case SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER
: val
= "SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER"; break;
6778 case SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED
: val
= "SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED"; break;
6779 case SPOOLSS_JOB_CONTROL_RETAIN
: val
= "SPOOLSS_JOB_CONTROL_RETAIN"; break;
6780 case SPOOLSS_JOB_CONTROL_RELEASE
: val
= "SPOOLSS_JOB_CONTROL_RELEASE"; break;
6782 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
6785 static enum ndr_err_code
ndr_push_spoolss_PrinterControl(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PrinterControl r
)
6787 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
6788 return NDR_ERR_SUCCESS
;
6791 static enum ndr_err_code
ndr_pull_spoolss_PrinterControl(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PrinterControl
*r
)
6794 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
6796 return NDR_ERR_SUCCESS
;
6799 _PUBLIC_
void ndr_print_spoolss_PrinterControl(struct ndr_print
*ndr
, const char *name
, enum spoolss_PrinterControl r
)
6801 const char *val
= NULL
;
6804 case SPOOLSS_PRINTER_CONTROL_UNPAUSE
: val
= "SPOOLSS_PRINTER_CONTROL_UNPAUSE"; break;
6805 case SPOOLSS_PRINTER_CONTROL_PAUSE
: val
= "SPOOLSS_PRINTER_CONTROL_PAUSE"; break;
6806 case SPOOLSS_PRINTER_CONTROL_RESUME
: val
= "SPOOLSS_PRINTER_CONTROL_RESUME"; break;
6807 case SPOOLSS_PRINTER_CONTROL_PURGE
: val
= "SPOOLSS_PRINTER_CONTROL_PURGE"; break;
6808 case SPOOLSS_PRINTER_CONTROL_SET_STATUS
: val
= "SPOOLSS_PRINTER_CONTROL_SET_STATUS"; break;
6810 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
6813 static enum ndr_err_code
ndr_push_spoolss_Build(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_Build r
)
6815 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
6816 return NDR_ERR_SUCCESS
;
6819 static enum ndr_err_code
ndr_pull_spoolss_Build(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_Build
*r
)
6822 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
6824 return NDR_ERR_SUCCESS
;
6827 _PUBLIC_
void ndr_print_spoolss_Build(struct ndr_print
*ndr
, const char *name
, enum spoolss_Build r
)
6829 const char *val
= NULL
;
6832 case SPOOLSS_DEBUGGING_BUILD
: val
= "SPOOLSS_DEBUGGING_BUILD"; break;
6833 case SPOOLSS_RELEASE_BUILD
: val
= "SPOOLSS_RELEASE_BUILD"; break;
6835 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
6838 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo0(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo0
*r
)
6840 if (ndr_flags
& NDR_SCALARS
) {
6841 NDR_CHECK(ndr_push_align(ndr
, 5));
6842 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->servername
));
6843 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printername
));
6844 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cjobs
));
6845 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_jobs
));
6846 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_bytes
));
6847 NDR_CHECK(ndr_push_spoolss_Time(ndr
, NDR_SCALARS
, &r
->time
));
6848 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->global_counter
));
6849 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->total_pages
));
6850 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->version
));
6851 NDR_CHECK(ndr_push_spoolss_Build(ndr
, NDR_SCALARS
, r
->free_build
));
6852 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->spooling
));
6853 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->max_spooling
));
6854 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->session_counter
));
6855 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_error_out_of_paper
));
6856 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->num_error_not_ready
));
6857 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_error
));
6858 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->number_of_processors
));
6859 NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr
, NDR_SCALARS
, r
->processor_type
));
6860 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->high_part_total_bytes
));
6861 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->change_id
));
6862 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->last_error
));
6863 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->status
));
6864 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->enumerate_network_printers
));
6865 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->c_setprinter
));
6866 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, r
->processor_architecture
));
6867 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->processor_level
));
6868 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ref_ic
));
6869 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved2
));
6870 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved3
));
6871 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
6873 if (ndr_flags
& NDR_BUFFERS
) {
6874 if (r
->servername
) {
6875 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
6876 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6877 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
6878 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->servername
, ndr_charset_length(r
->servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6880 if (r
->printername
) {
6881 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
6882 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
6883 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
6884 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printername
, ndr_charset_length(r
->printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
6887 return NDR_ERR_SUCCESS
;
6890 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo0(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo0
*r
)
6892 uint32_t _ptr_servername
;
6893 TALLOC_CTX
*_mem_save_servername_0
;
6894 uint32_t _ptr_printername
;
6895 TALLOC_CTX
*_mem_save_printername_0
;
6896 if (ndr_flags
& NDR_SCALARS
) {
6897 NDR_CHECK(ndr_pull_align(ndr
, 5));
6898 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
6899 if (_ptr_servername
) {
6900 NDR_PULL_ALLOC(ndr
, r
->servername
);
6902 r
->servername
= NULL
;
6904 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
6905 if (_ptr_printername
) {
6906 NDR_PULL_ALLOC(ndr
, r
->printername
);
6908 r
->printername
= NULL
;
6910 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cjobs
));
6911 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_jobs
));
6912 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_bytes
));
6913 NDR_CHECK(ndr_pull_spoolss_Time(ndr
, NDR_SCALARS
, &r
->time
));
6914 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->global_counter
));
6915 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->total_pages
));
6916 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
6917 NDR_CHECK(ndr_pull_spoolss_Build(ndr
, NDR_SCALARS
, &r
->free_build
));
6918 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->spooling
));
6919 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->max_spooling
));
6920 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->session_counter
));
6921 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_error_out_of_paper
));
6922 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->num_error_not_ready
));
6923 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_error
));
6924 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->number_of_processors
));
6925 NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr
, NDR_SCALARS
, &r
->processor_type
));
6926 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->high_part_total_bytes
));
6927 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->change_id
));
6928 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->last_error
));
6929 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->status
));
6930 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->enumerate_network_printers
));
6931 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->c_setprinter
));
6932 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, &r
->processor_architecture
));
6933 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->processor_level
));
6934 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ref_ic
));
6935 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved2
));
6936 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved3
));
6937 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
6939 if (ndr_flags
& NDR_BUFFERS
) {
6940 if (r
->servername
) {
6941 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6942 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
6943 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->servername
));
6944 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->servername
));
6945 if (ndr_get_array_length(ndr
, &r
->servername
) > ndr_get_array_size(ndr
, &r
->servername
)) {
6946 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
));
6948 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t)));
6949 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->servername
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t), CH_UTF16
));
6950 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
6952 if (r
->printername
) {
6953 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
6954 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
6955 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printername
));
6956 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printername
));
6957 if (ndr_get_array_length(ndr
, &r
->printername
) > ndr_get_array_size(ndr
, &r
->printername
)) {
6958 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
));
6960 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t)));
6961 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printername
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t), CH_UTF16
));
6962 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
6965 return NDR_ERR_SUCCESS
;
6968 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo0(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo0
*r
)
6970 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo0");
6972 ndr_print_ptr(ndr
, "servername", r
->servername
);
6974 if (r
->servername
) {
6975 ndr_print_string(ndr
, "servername", r
->servername
);
6978 ndr_print_ptr(ndr
, "printername", r
->printername
);
6980 if (r
->printername
) {
6981 ndr_print_string(ndr
, "printername", r
->printername
);
6984 ndr_print_uint32(ndr
, "cjobs", r
->cjobs
);
6985 ndr_print_uint32(ndr
, "total_jobs", r
->total_jobs
);
6986 ndr_print_uint32(ndr
, "total_bytes", r
->total_bytes
);
6987 ndr_print_spoolss_Time(ndr
, "time", &r
->time
);
6988 ndr_print_uint32(ndr
, "global_counter", r
->global_counter
);
6989 ndr_print_uint32(ndr
, "total_pages", r
->total_pages
);
6990 ndr_print_uint32(ndr
, "version", r
->version
);
6991 ndr_print_spoolss_Build(ndr
, "free_build", r
->free_build
);
6992 ndr_print_uint32(ndr
, "spooling", r
->spooling
);
6993 ndr_print_uint32(ndr
, "max_spooling", r
->max_spooling
);
6994 ndr_print_uint32(ndr
, "session_counter", r
->session_counter
);
6995 ndr_print_uint32(ndr
, "num_error_out_of_paper", r
->num_error_out_of_paper
);
6996 ndr_print_uint32(ndr
, "num_error_not_ready", r
->num_error_not_ready
);
6997 ndr_print_uint32(ndr
, "job_error", r
->job_error
);
6998 ndr_print_uint32(ndr
, "number_of_processors", r
->number_of_processors
);
6999 ndr_print_spoolss_ProcessorType(ndr
, "processor_type", r
->processor_type
);
7000 ndr_print_uint32(ndr
, "high_part_total_bytes", r
->high_part_total_bytes
);
7001 ndr_print_uint32(ndr
, "change_id", r
->change_id
);
7002 ndr_print_WERROR(ndr
, "last_error", r
->last_error
);
7003 ndr_print_uint32(ndr
, "status", r
->status
);
7004 ndr_print_uint32(ndr
, "enumerate_network_printers", r
->enumerate_network_printers
);
7005 ndr_print_uint32(ndr
, "c_setprinter", r
->c_setprinter
);
7006 ndr_print_spoolss_ProcessorArchitecture(ndr
, "processor_architecture", r
->processor_architecture
);
7007 ndr_print_uint16(ndr
, "processor_level", r
->processor_level
);
7008 ndr_print_uint32(ndr
, "ref_ic", r
->ref_ic
);
7009 ndr_print_uint32(ndr
, "reserved2", r
->reserved2
);
7010 ndr_print_uint32(ndr
, "reserved3", r
->reserved3
);
7014 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo1
*r
)
7016 if (ndr_flags
& NDR_SCALARS
) {
7017 NDR_CHECK(ndr_push_align(ndr
, 5));
7018 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->flags
));
7019 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->description
));
7020 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->name
));
7021 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
7022 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7024 if (ndr_flags
& NDR_BUFFERS
) {
7025 if (r
->description
) {
7026 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->description
, CH_UTF16
)));
7027 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7028 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->description
, CH_UTF16
)));
7029 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->description
, ndr_charset_length(r
->description
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7032 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
7033 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7034 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->name
, CH_UTF16
)));
7035 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->name
, ndr_charset_length(r
->name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7038 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
7039 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7040 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
7041 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7044 return NDR_ERR_SUCCESS
;
7047 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo1
*r
)
7049 uint32_t _ptr_description
;
7050 TALLOC_CTX
*_mem_save_description_0
;
7052 TALLOC_CTX
*_mem_save_name_0
;
7053 uint32_t _ptr_comment
;
7054 TALLOC_CTX
*_mem_save_comment_0
;
7055 if (ndr_flags
& NDR_SCALARS
) {
7056 NDR_CHECK(ndr_pull_align(ndr
, 5));
7057 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->flags
));
7058 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_description
));
7059 if (_ptr_description
) {
7060 NDR_PULL_ALLOC(ndr
, r
->description
);
7062 r
->description
= NULL
;
7064 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name
));
7066 NDR_PULL_ALLOC(ndr
, r
->name
);
7070 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
7072 NDR_PULL_ALLOC(ndr
, r
->comment
);
7076 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7078 if (ndr_flags
& NDR_BUFFERS
) {
7079 if (r
->description
) {
7080 _mem_save_description_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7081 NDR_PULL_SET_MEM_CTX(ndr
, r
->description
, 0);
7082 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->description
));
7083 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->description
));
7084 if (ndr_get_array_length(ndr
, &r
->description
) > ndr_get_array_size(ndr
, &r
->description
)) {
7085 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
));
7087 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->description
), sizeof(uint16_t)));
7088 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->description
, ndr_get_array_length(ndr
, &r
->description
), sizeof(uint16_t), CH_UTF16
));
7089 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_description_0
, 0);
7092 _mem_save_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7093 NDR_PULL_SET_MEM_CTX(ndr
, r
->name
, 0);
7094 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->name
));
7095 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->name
));
7096 if (ndr_get_array_length(ndr
, &r
->name
) > ndr_get_array_size(ndr
, &r
->name
)) {
7097 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
));
7099 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t)));
7100 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->name
, ndr_get_array_length(ndr
, &r
->name
), sizeof(uint16_t), CH_UTF16
));
7101 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_0
, 0);
7104 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7105 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
7106 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
7107 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
7108 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
7109 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
));
7111 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
7112 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
7113 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
7116 return NDR_ERR_SUCCESS
;
7119 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo1
*r
)
7121 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo1");
7123 ndr_print_spoolss_PrinterAttributes(ndr
, "flags", r
->flags
);
7124 ndr_print_ptr(ndr
, "description", r
->description
);
7126 if (r
->description
) {
7127 ndr_print_string(ndr
, "description", r
->description
);
7130 ndr_print_ptr(ndr
, "name", r
->name
);
7133 ndr_print_string(ndr
, "name", r
->name
);
7136 ndr_print_ptr(ndr
, "comment", r
->comment
);
7139 ndr_print_string(ndr
, "comment", r
->comment
);
7145 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo2
*r
)
7147 if (ndr_flags
& NDR_SCALARS
) {
7148 NDR_CHECK(ndr_push_align(ndr
, 5));
7149 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->servername
));
7150 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printername
));
7151 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sharename
));
7152 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->portname
));
7153 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->drivername
));
7154 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->comment
));
7155 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->location
));
7156 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->devmode_ptr
));
7157 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->sepfile
));
7158 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printprocessor
));
7159 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->datatype
));
7160 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->parameters
));
7161 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->secdesc_ptr
));
7162 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
7163 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->priority
));
7164 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->defaultpriority
));
7165 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->starttime
));
7166 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->untiltime
));
7167 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, r
->status
));
7168 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->cjobs
));
7169 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->averageppm
));
7170 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7172 if (ndr_flags
& NDR_BUFFERS
) {
7173 if (r
->servername
) {
7174 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
7175 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7176 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
7177 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->servername
, ndr_charset_length(r
->servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7179 if (r
->printername
) {
7180 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
7181 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7182 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
7183 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printername
, ndr_charset_length(r
->printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7186 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->sharename
, CH_UTF16
)));
7187 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7188 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->sharename
, CH_UTF16
)));
7189 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->sharename
, ndr_charset_length(r
->sharename
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7192 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->portname
, CH_UTF16
)));
7193 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7194 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->portname
, CH_UTF16
)));
7195 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->portname
, ndr_charset_length(r
->portname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7197 if (r
->drivername
) {
7198 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->drivername
, CH_UTF16
)));
7199 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7200 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->drivername
, CH_UTF16
)));
7201 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->drivername
, ndr_charset_length(r
->drivername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7204 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
7205 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7206 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->comment
, CH_UTF16
)));
7207 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->comment
, ndr_charset_length(r
->comment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7210 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->location
, CH_UTF16
)));
7211 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7212 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->location
, CH_UTF16
)));
7213 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->location
, ndr_charset_length(r
->location
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7216 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->sepfile
, CH_UTF16
)));
7217 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7218 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->sepfile
, CH_UTF16
)));
7219 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->sepfile
, ndr_charset_length(r
->sepfile
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7221 if (r
->printprocessor
) {
7222 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printprocessor
, CH_UTF16
)));
7223 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7224 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printprocessor
, CH_UTF16
)));
7225 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printprocessor
, ndr_charset_length(r
->printprocessor
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7228 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->datatype
, CH_UTF16
)));
7229 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7230 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->datatype
, CH_UTF16
)));
7231 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->datatype
, ndr_charset_length(r
->datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7233 if (r
->parameters
) {
7234 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
7235 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7236 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->parameters
, CH_UTF16
)));
7237 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->parameters
, ndr_charset_length(r
->parameters
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7240 return NDR_ERR_SUCCESS
;
7243 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo2
*r
)
7245 uint32_t _ptr_servername
;
7246 TALLOC_CTX
*_mem_save_servername_0
;
7247 uint32_t _ptr_printername
;
7248 TALLOC_CTX
*_mem_save_printername_0
;
7249 uint32_t _ptr_sharename
;
7250 TALLOC_CTX
*_mem_save_sharename_0
;
7251 uint32_t _ptr_portname
;
7252 TALLOC_CTX
*_mem_save_portname_0
;
7253 uint32_t _ptr_drivername
;
7254 TALLOC_CTX
*_mem_save_drivername_0
;
7255 uint32_t _ptr_comment
;
7256 TALLOC_CTX
*_mem_save_comment_0
;
7257 uint32_t _ptr_location
;
7258 TALLOC_CTX
*_mem_save_location_0
;
7259 uint32_t _ptr_sepfile
;
7260 TALLOC_CTX
*_mem_save_sepfile_0
;
7261 uint32_t _ptr_printprocessor
;
7262 TALLOC_CTX
*_mem_save_printprocessor_0
;
7263 uint32_t _ptr_datatype
;
7264 TALLOC_CTX
*_mem_save_datatype_0
;
7265 uint32_t _ptr_parameters
;
7266 TALLOC_CTX
*_mem_save_parameters_0
;
7267 if (ndr_flags
& NDR_SCALARS
) {
7268 NDR_CHECK(ndr_pull_align(ndr
, 5));
7269 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
7270 if (_ptr_servername
) {
7271 NDR_PULL_ALLOC(ndr
, r
->servername
);
7273 r
->servername
= NULL
;
7275 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
7276 if (_ptr_printername
) {
7277 NDR_PULL_ALLOC(ndr
, r
->printername
);
7279 r
->printername
= NULL
;
7281 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sharename
));
7282 if (_ptr_sharename
) {
7283 NDR_PULL_ALLOC(ndr
, r
->sharename
);
7285 r
->sharename
= NULL
;
7287 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_portname
));
7288 if (_ptr_portname
) {
7289 NDR_PULL_ALLOC(ndr
, r
->portname
);
7293 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_drivername
));
7294 if (_ptr_drivername
) {
7295 NDR_PULL_ALLOC(ndr
, r
->drivername
);
7297 r
->drivername
= NULL
;
7299 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_comment
));
7301 NDR_PULL_ALLOC(ndr
, r
->comment
);
7305 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_location
));
7306 if (_ptr_location
) {
7307 NDR_PULL_ALLOC(ndr
, r
->location
);
7311 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->devmode_ptr
));
7312 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_sepfile
));
7314 NDR_PULL_ALLOC(ndr
, r
->sepfile
);
7318 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printprocessor
));
7319 if (_ptr_printprocessor
) {
7320 NDR_PULL_ALLOC(ndr
, r
->printprocessor
);
7322 r
->printprocessor
= NULL
;
7324 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
7325 if (_ptr_datatype
) {
7326 NDR_PULL_ALLOC(ndr
, r
->datatype
);
7330 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_parameters
));
7331 if (_ptr_parameters
) {
7332 NDR_PULL_ALLOC(ndr
, r
->parameters
);
7334 r
->parameters
= NULL
;
7336 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->secdesc_ptr
));
7337 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
7338 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->priority
));
7339 if (r
->priority
> 99) {
7340 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
7342 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->defaultpriority
));
7343 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->starttime
));
7344 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->untiltime
));
7345 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
7346 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->cjobs
));
7347 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->averageppm
));
7348 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7350 if (ndr_flags
& NDR_BUFFERS
) {
7351 if (r
->servername
) {
7352 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7353 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
7354 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->servername
));
7355 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->servername
));
7356 if (ndr_get_array_length(ndr
, &r
->servername
) > ndr_get_array_size(ndr
, &r
->servername
)) {
7357 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
));
7359 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t)));
7360 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->servername
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t), CH_UTF16
));
7361 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
7363 if (r
->printername
) {
7364 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7365 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
7366 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printername
));
7367 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printername
));
7368 if (ndr_get_array_length(ndr
, &r
->printername
) > ndr_get_array_size(ndr
, &r
->printername
)) {
7369 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
));
7371 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t)));
7372 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printername
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t), CH_UTF16
));
7373 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
7376 _mem_save_sharename_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7377 NDR_PULL_SET_MEM_CTX(ndr
, r
->sharename
, 0);
7378 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sharename
));
7379 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->sharename
));
7380 if (ndr_get_array_length(ndr
, &r
->sharename
) > ndr_get_array_size(ndr
, &r
->sharename
)) {
7381 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
));
7383 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->sharename
), sizeof(uint16_t)));
7384 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->sharename
, ndr_get_array_length(ndr
, &r
->sharename
), sizeof(uint16_t), CH_UTF16
));
7385 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sharename_0
, 0);
7388 _mem_save_portname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7389 NDR_PULL_SET_MEM_CTX(ndr
, r
->portname
, 0);
7390 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->portname
));
7391 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->portname
));
7392 if (ndr_get_array_length(ndr
, &r
->portname
) > ndr_get_array_size(ndr
, &r
->portname
)) {
7393 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
));
7395 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->portname
), sizeof(uint16_t)));
7396 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->portname
, ndr_get_array_length(ndr
, &r
->portname
), sizeof(uint16_t), CH_UTF16
));
7397 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_portname_0
, 0);
7399 if (r
->drivername
) {
7400 _mem_save_drivername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7401 NDR_PULL_SET_MEM_CTX(ndr
, r
->drivername
, 0);
7402 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->drivername
));
7403 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->drivername
));
7404 if (ndr_get_array_length(ndr
, &r
->drivername
) > ndr_get_array_size(ndr
, &r
->drivername
)) {
7405 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
));
7407 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->drivername
), sizeof(uint16_t)));
7408 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->drivername
, ndr_get_array_length(ndr
, &r
->drivername
), sizeof(uint16_t), CH_UTF16
));
7409 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_drivername_0
, 0);
7412 _mem_save_comment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7413 NDR_PULL_SET_MEM_CTX(ndr
, r
->comment
, 0);
7414 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->comment
));
7415 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->comment
));
7416 if (ndr_get_array_length(ndr
, &r
->comment
) > ndr_get_array_size(ndr
, &r
->comment
)) {
7417 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
));
7419 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t)));
7420 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->comment
, ndr_get_array_length(ndr
, &r
->comment
), sizeof(uint16_t), CH_UTF16
));
7421 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_comment_0
, 0);
7424 _mem_save_location_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7425 NDR_PULL_SET_MEM_CTX(ndr
, r
->location
, 0);
7426 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->location
));
7427 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->location
));
7428 if (ndr_get_array_length(ndr
, &r
->location
) > ndr_get_array_size(ndr
, &r
->location
)) {
7429 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
));
7431 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->location
), sizeof(uint16_t)));
7432 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->location
, ndr_get_array_length(ndr
, &r
->location
), sizeof(uint16_t), CH_UTF16
));
7433 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_location_0
, 0);
7436 _mem_save_sepfile_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7437 NDR_PULL_SET_MEM_CTX(ndr
, r
->sepfile
, 0);
7438 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->sepfile
));
7439 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->sepfile
));
7440 if (ndr_get_array_length(ndr
, &r
->sepfile
) > ndr_get_array_size(ndr
, &r
->sepfile
)) {
7441 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
));
7443 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->sepfile
), sizeof(uint16_t)));
7444 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->sepfile
, ndr_get_array_length(ndr
, &r
->sepfile
), sizeof(uint16_t), CH_UTF16
));
7445 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_sepfile_0
, 0);
7447 if (r
->printprocessor
) {
7448 _mem_save_printprocessor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7449 NDR_PULL_SET_MEM_CTX(ndr
, r
->printprocessor
, 0);
7450 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printprocessor
));
7451 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printprocessor
));
7452 if (ndr_get_array_length(ndr
, &r
->printprocessor
) > ndr_get_array_size(ndr
, &r
->printprocessor
)) {
7453 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
));
7455 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printprocessor
), sizeof(uint16_t)));
7456 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printprocessor
, ndr_get_array_length(ndr
, &r
->printprocessor
), sizeof(uint16_t), CH_UTF16
));
7457 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printprocessor_0
, 0);
7460 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7461 NDR_PULL_SET_MEM_CTX(ndr
, r
->datatype
, 0);
7462 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->datatype
));
7463 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->datatype
));
7464 if (ndr_get_array_length(ndr
, &r
->datatype
) > ndr_get_array_size(ndr
, &r
->datatype
)) {
7465 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
));
7467 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->datatype
), sizeof(uint16_t)));
7468 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->datatype
, ndr_get_array_length(ndr
, &r
->datatype
), sizeof(uint16_t), CH_UTF16
));
7469 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
7471 if (r
->parameters
) {
7472 _mem_save_parameters_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7473 NDR_PULL_SET_MEM_CTX(ndr
, r
->parameters
, 0);
7474 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->parameters
));
7475 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->parameters
));
7476 if (ndr_get_array_length(ndr
, &r
->parameters
) > ndr_get_array_size(ndr
, &r
->parameters
)) {
7477 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
));
7479 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t)));
7480 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->parameters
, ndr_get_array_length(ndr
, &r
->parameters
), sizeof(uint16_t), CH_UTF16
));
7481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_parameters_0
, 0);
7484 return NDR_ERR_SUCCESS
;
7487 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo2
*r
)
7489 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo2");
7491 ndr_print_ptr(ndr
, "servername", r
->servername
);
7493 if (r
->servername
) {
7494 ndr_print_string(ndr
, "servername", r
->servername
);
7497 ndr_print_ptr(ndr
, "printername", r
->printername
);
7499 if (r
->printername
) {
7500 ndr_print_string(ndr
, "printername", r
->printername
);
7503 ndr_print_ptr(ndr
, "sharename", r
->sharename
);
7506 ndr_print_string(ndr
, "sharename", r
->sharename
);
7509 ndr_print_ptr(ndr
, "portname", r
->portname
);
7512 ndr_print_string(ndr
, "portname", r
->portname
);
7515 ndr_print_ptr(ndr
, "drivername", r
->drivername
);
7517 if (r
->drivername
) {
7518 ndr_print_string(ndr
, "drivername", r
->drivername
);
7521 ndr_print_ptr(ndr
, "comment", r
->comment
);
7524 ndr_print_string(ndr
, "comment", r
->comment
);
7527 ndr_print_ptr(ndr
, "location", r
->location
);
7530 ndr_print_string(ndr
, "location", r
->location
);
7533 ndr_print_uint32(ndr
, "devmode_ptr", r
->devmode_ptr
);
7534 ndr_print_ptr(ndr
, "sepfile", r
->sepfile
);
7537 ndr_print_string(ndr
, "sepfile", r
->sepfile
);
7540 ndr_print_ptr(ndr
, "printprocessor", r
->printprocessor
);
7542 if (r
->printprocessor
) {
7543 ndr_print_string(ndr
, "printprocessor", r
->printprocessor
);
7546 ndr_print_ptr(ndr
, "datatype", r
->datatype
);
7549 ndr_print_string(ndr
, "datatype", r
->datatype
);
7552 ndr_print_ptr(ndr
, "parameters", r
->parameters
);
7554 if (r
->parameters
) {
7555 ndr_print_string(ndr
, "parameters", r
->parameters
);
7558 ndr_print_uint32(ndr
, "secdesc_ptr", r
->secdesc_ptr
);
7559 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
7560 ndr_print_uint32(ndr
, "priority", r
->priority
);
7561 ndr_print_uint32(ndr
, "defaultpriority", r
->defaultpriority
);
7562 ndr_print_uint32(ndr
, "starttime", r
->starttime
);
7563 ndr_print_uint32(ndr
, "untiltime", r
->untiltime
);
7564 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
7565 ndr_print_uint32(ndr
, "cjobs", r
->cjobs
);
7566 ndr_print_uint32(ndr
, "averageppm", r
->averageppm
);
7570 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo3
*r
)
7572 if (ndr_flags
& NDR_SCALARS
) {
7573 NDR_CHECK(ndr_push_align(ndr
, 4));
7574 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->sec_desc_ptr
));
7575 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
7577 if (ndr_flags
& NDR_BUFFERS
) {
7579 return NDR_ERR_SUCCESS
;
7582 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo3
*r
)
7584 if (ndr_flags
& NDR_SCALARS
) {
7585 NDR_CHECK(ndr_pull_align(ndr
, 4));
7586 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->sec_desc_ptr
));
7587 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
7589 if (ndr_flags
& NDR_BUFFERS
) {
7591 return NDR_ERR_SUCCESS
;
7594 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo3
*r
)
7596 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo3");
7598 ndr_print_uint32(ndr
, "sec_desc_ptr", r
->sec_desc_ptr
);
7602 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo4
*r
)
7604 if (ndr_flags
& NDR_SCALARS
) {
7605 NDR_CHECK(ndr_push_align(ndr
, 5));
7606 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printername
));
7607 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->servername
));
7608 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
7609 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7611 if (ndr_flags
& NDR_BUFFERS
) {
7612 if (r
->printername
) {
7613 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
7614 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7615 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
7616 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printername
, ndr_charset_length(r
->printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7618 if (r
->servername
) {
7619 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
7620 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7621 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->servername
, CH_UTF16
)));
7622 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->servername
, ndr_charset_length(r
->servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7625 return NDR_ERR_SUCCESS
;
7628 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo4
*r
)
7630 uint32_t _ptr_printername
;
7631 TALLOC_CTX
*_mem_save_printername_0
;
7632 uint32_t _ptr_servername
;
7633 TALLOC_CTX
*_mem_save_servername_0
;
7634 if (ndr_flags
& NDR_SCALARS
) {
7635 NDR_CHECK(ndr_pull_align(ndr
, 5));
7636 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
7637 if (_ptr_printername
) {
7638 NDR_PULL_ALLOC(ndr
, r
->printername
);
7640 r
->printername
= NULL
;
7642 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
7643 if (_ptr_servername
) {
7644 NDR_PULL_ALLOC(ndr
, r
->servername
);
7646 r
->servername
= NULL
;
7648 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
7649 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7651 if (ndr_flags
& NDR_BUFFERS
) {
7652 if (r
->printername
) {
7653 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7654 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
7655 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printername
));
7656 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printername
));
7657 if (ndr_get_array_length(ndr
, &r
->printername
) > ndr_get_array_size(ndr
, &r
->printername
)) {
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
->printername
), ndr_get_array_length(ndr
, &r
->printername
));
7660 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t)));
7661 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printername
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t), CH_UTF16
));
7662 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
7664 if (r
->servername
) {
7665 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7666 NDR_PULL_SET_MEM_CTX(ndr
, r
->servername
, 0);
7667 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->servername
));
7668 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->servername
));
7669 if (ndr_get_array_length(ndr
, &r
->servername
) > ndr_get_array_size(ndr
, &r
->servername
)) {
7670 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
));
7672 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t)));
7673 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->servername
, ndr_get_array_length(ndr
, &r
->servername
), sizeof(uint16_t), CH_UTF16
));
7674 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
7677 return NDR_ERR_SUCCESS
;
7680 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo4
*r
)
7682 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo4");
7684 ndr_print_ptr(ndr
, "printername", r
->printername
);
7686 if (r
->printername
) {
7687 ndr_print_string(ndr
, "printername", r
->printername
);
7690 ndr_print_ptr(ndr
, "servername", r
->servername
);
7692 if (r
->servername
) {
7693 ndr_print_string(ndr
, "servername", r
->servername
);
7696 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
7700 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo5
*r
)
7702 if (ndr_flags
& NDR_SCALARS
) {
7703 NDR_CHECK(ndr_push_align(ndr
, 5));
7704 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->printername
));
7705 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->portname
));
7706 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, r
->attributes
));
7707 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->device_not_selected_timeout
));
7708 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->transmission_retry_timeout
));
7709 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7711 if (ndr_flags
& NDR_BUFFERS
) {
7712 if (r
->printername
) {
7713 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
7714 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7715 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->printername
, CH_UTF16
)));
7716 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->printername
, ndr_charset_length(r
->printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7719 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->portname
, CH_UTF16
)));
7720 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7721 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->portname
, CH_UTF16
)));
7722 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->portname
, ndr_charset_length(r
->portname
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7725 return NDR_ERR_SUCCESS
;
7728 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo5
*r
)
7730 uint32_t _ptr_printername
;
7731 TALLOC_CTX
*_mem_save_printername_0
;
7732 uint32_t _ptr_portname
;
7733 TALLOC_CTX
*_mem_save_portname_0
;
7734 if (ndr_flags
& NDR_SCALARS
) {
7735 NDR_CHECK(ndr_pull_align(ndr
, 5));
7736 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
7737 if (_ptr_printername
) {
7738 NDR_PULL_ALLOC(ndr
, r
->printername
);
7740 r
->printername
= NULL
;
7742 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_portname
));
7743 if (_ptr_portname
) {
7744 NDR_PULL_ALLOC(ndr
, r
->portname
);
7748 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr
, NDR_SCALARS
, &r
->attributes
));
7749 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->device_not_selected_timeout
));
7750 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->transmission_retry_timeout
));
7751 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7753 if (ndr_flags
& NDR_BUFFERS
) {
7754 if (r
->printername
) {
7755 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7756 NDR_PULL_SET_MEM_CTX(ndr
, r
->printername
, 0);
7757 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->printername
));
7758 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->printername
));
7759 if (ndr_get_array_length(ndr
, &r
->printername
) > ndr_get_array_size(ndr
, &r
->printername
)) {
7760 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
));
7762 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t)));
7763 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->printername
, ndr_get_array_length(ndr
, &r
->printername
), sizeof(uint16_t), CH_UTF16
));
7764 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
7767 _mem_save_portname_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7768 NDR_PULL_SET_MEM_CTX(ndr
, r
->portname
, 0);
7769 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->portname
));
7770 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->portname
));
7771 if (ndr_get_array_length(ndr
, &r
->portname
) > ndr_get_array_size(ndr
, &r
->portname
)) {
7772 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
));
7774 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->portname
), sizeof(uint16_t)));
7775 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->portname
, ndr_get_array_length(ndr
, &r
->portname
), sizeof(uint16_t), CH_UTF16
));
7776 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_portname_0
, 0);
7779 return NDR_ERR_SUCCESS
;
7782 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo5(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo5
*r
)
7784 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo5");
7786 ndr_print_ptr(ndr
, "printername", r
->printername
);
7788 if (r
->printername
) {
7789 ndr_print_string(ndr
, "printername", r
->printername
);
7792 ndr_print_ptr(ndr
, "portname", r
->portname
);
7795 ndr_print_string(ndr
, "portname", r
->portname
);
7798 ndr_print_spoolss_PrinterAttributes(ndr
, "attributes", r
->attributes
);
7799 ndr_print_uint32(ndr
, "device_not_selected_timeout", r
->device_not_selected_timeout
);
7800 ndr_print_uint32(ndr
, "transmission_retry_timeout", r
->transmission_retry_timeout
);
7804 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo6
*r
)
7806 if (ndr_flags
& NDR_SCALARS
) {
7807 NDR_CHECK(ndr_push_align(ndr
, 4));
7808 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, r
->status
));
7809 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
7811 if (ndr_flags
& NDR_BUFFERS
) {
7813 return NDR_ERR_SUCCESS
;
7816 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo6
*r
)
7818 if (ndr_flags
& NDR_SCALARS
) {
7819 NDR_CHECK(ndr_pull_align(ndr
, 4));
7820 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr
, NDR_SCALARS
, &r
->status
));
7821 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
7823 if (ndr_flags
& NDR_BUFFERS
) {
7825 return NDR_ERR_SUCCESS
;
7828 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo6(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo6
*r
)
7830 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo6");
7832 ndr_print_spoolss_PrinterStatus(ndr
, "status", r
->status
);
7836 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo7
*r
)
7838 if (ndr_flags
& NDR_SCALARS
) {
7839 NDR_CHECK(ndr_push_align(ndr
, 5));
7840 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->guid
));
7841 NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr
, NDR_SCALARS
, r
->action
));
7842 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
7844 if (ndr_flags
& NDR_BUFFERS
) {
7846 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->guid
, CH_UTF16
)));
7847 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
7848 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->guid
, CH_UTF16
)));
7849 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->guid
, ndr_charset_length(r
->guid
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
7852 return NDR_ERR_SUCCESS
;
7855 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo7
*r
)
7858 TALLOC_CTX
*_mem_save_guid_0
;
7859 if (ndr_flags
& NDR_SCALARS
) {
7860 NDR_CHECK(ndr_pull_align(ndr
, 5));
7861 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_guid
));
7863 NDR_PULL_ALLOC(ndr
, r
->guid
);
7867 NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr
, NDR_SCALARS
, &r
->action
));
7868 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
7870 if (ndr_flags
& NDR_BUFFERS
) {
7872 _mem_save_guid_0
= NDR_PULL_GET_MEM_CTX(ndr
);
7873 NDR_PULL_SET_MEM_CTX(ndr
, r
->guid
, 0);
7874 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->guid
));
7875 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->guid
));
7876 if (ndr_get_array_length(ndr
, &r
->guid
) > ndr_get_array_size(ndr
, &r
->guid
)) {
7877 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
));
7879 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->guid
), sizeof(uint16_t)));
7880 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->guid
, ndr_get_array_length(ndr
, &r
->guid
), sizeof(uint16_t), CH_UTF16
));
7881 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_guid_0
, 0);
7884 return NDR_ERR_SUCCESS
;
7887 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo7(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo7
*r
)
7889 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo7");
7891 ndr_print_ptr(ndr
, "guid", r
->guid
);
7894 ndr_print_string(ndr
, "guid", r
->guid
);
7897 ndr_print_spoolss_DsPrintAction(ndr
, "action", r
->action
);
7901 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo8
*r
)
7903 if (ndr_flags
& NDR_SCALARS
) {
7904 NDR_CHECK(ndr_push_align(ndr
, 4));
7905 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->devmode_ptr
));
7906 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
7908 if (ndr_flags
& NDR_BUFFERS
) {
7910 return NDR_ERR_SUCCESS
;
7913 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo8
*r
)
7915 if (ndr_flags
& NDR_SCALARS
) {
7916 NDR_CHECK(ndr_pull_align(ndr
, 4));
7917 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->devmode_ptr
));
7918 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
7920 if (ndr_flags
& NDR_BUFFERS
) {
7922 return NDR_ERR_SUCCESS
;
7925 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo8(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo8
*r
)
7927 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo8");
7929 ndr_print_uint32(ndr
, "devmode_ptr", r
->devmode_ptr
);
7933 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo9(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfo9
*r
)
7935 if (ndr_flags
& NDR_SCALARS
) {
7936 NDR_CHECK(ndr_push_align(ndr
, 4));
7937 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->devmode_ptr
));
7938 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
7940 if (ndr_flags
& NDR_BUFFERS
) {
7942 return NDR_ERR_SUCCESS
;
7945 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo9(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfo9
*r
)
7947 if (ndr_flags
& NDR_SCALARS
) {
7948 NDR_CHECK(ndr_pull_align(ndr
, 4));
7949 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->devmode_ptr
));
7950 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
7952 if (ndr_flags
& NDR_BUFFERS
) {
7954 return NDR_ERR_SUCCESS
;
7957 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo9(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfo9
*r
)
7959 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfo9");
7961 ndr_print_uint32(ndr
, "devmode_ptr", r
->devmode_ptr
);
7965 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_SetPrinterInfo
*r
)
7967 if (ndr_flags
& NDR_SCALARS
) {
7968 int level
= ndr_push_get_switch_value(ndr
, r
);
7969 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
7970 NDR_CHECK(ndr_push_union_align(ndr
, 5));
7973 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
7977 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
7981 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
7985 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
7989 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
7993 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info5
));
7997 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
8001 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info7
));
8005 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info8
));
8009 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info9
));
8017 if (ndr_flags
& NDR_BUFFERS
) {
8018 int level
= ndr_push_get_switch_value(ndr
, r
);
8022 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
8028 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
8034 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
8040 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo3(ndr
, NDR_SCALARS
, r
->info3
));
8046 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
8052 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
8058 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo6(ndr
, NDR_SCALARS
, r
->info6
));
8064 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo7(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info7
));
8070 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo8(ndr
, NDR_SCALARS
, r
->info8
));
8076 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo9(ndr
, NDR_SCALARS
, r
->info9
));
8085 return NDR_ERR_SUCCESS
;
8088 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_SetPrinterInfo
*r
)
8092 TALLOC_CTX
*_mem_save_info0_0
;
8093 TALLOC_CTX
*_mem_save_info1_0
;
8094 TALLOC_CTX
*_mem_save_info2_0
;
8095 TALLOC_CTX
*_mem_save_info3_0
;
8096 TALLOC_CTX
*_mem_save_info4_0
;
8097 TALLOC_CTX
*_mem_save_info5_0
;
8098 TALLOC_CTX
*_mem_save_info6_0
;
8099 TALLOC_CTX
*_mem_save_info7_0
;
8100 TALLOC_CTX
*_mem_save_info8_0
;
8101 TALLOC_CTX
*_mem_save_info9_0
;
8102 level
= ndr_pull_get_switch_value(ndr
, r
);
8103 if (ndr_flags
& NDR_SCALARS
) {
8104 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
8105 if (_level
!= level
) {
8106 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
8108 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
8111 uint32_t _ptr_info0
;
8112 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
8114 NDR_PULL_ALLOC(ndr
, r
->info0
);
8121 uint32_t _ptr_info1
;
8122 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
8124 NDR_PULL_ALLOC(ndr
, r
->info1
);
8131 uint32_t _ptr_info2
;
8132 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
8134 NDR_PULL_ALLOC(ndr
, r
->info2
);
8141 uint32_t _ptr_info3
;
8142 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
8144 NDR_PULL_ALLOC(ndr
, r
->info3
);
8151 uint32_t _ptr_info4
;
8152 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
8154 NDR_PULL_ALLOC(ndr
, r
->info4
);
8161 uint32_t _ptr_info5
;
8162 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info5
));
8164 NDR_PULL_ALLOC(ndr
, r
->info5
);
8171 uint32_t _ptr_info6
;
8172 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
8174 NDR_PULL_ALLOC(ndr
, r
->info6
);
8181 uint32_t _ptr_info7
;
8182 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info7
));
8184 NDR_PULL_ALLOC(ndr
, r
->info7
);
8191 uint32_t _ptr_info8
;
8192 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info8
));
8194 NDR_PULL_ALLOC(ndr
, r
->info8
);
8201 uint32_t _ptr_info9
;
8202 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info9
));
8204 NDR_PULL_ALLOC(ndr
, r
->info9
);
8215 if (ndr_flags
& NDR_BUFFERS
) {
8219 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8220 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
8221 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo0(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
8222 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
8228 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8229 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
8230 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
8231 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
8237 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8238 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
8239 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
8240 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
8246 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8247 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
8248 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo3(ndr
, NDR_SCALARS
, r
->info3
));
8249 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
8255 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8256 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
8257 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
8258 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
8264 _mem_save_info5_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8265 NDR_PULL_SET_MEM_CTX(ndr
, r
->info5
, 0);
8266 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo5(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info5
));
8267 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info5_0
, 0);
8273 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8274 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
8275 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo6(ndr
, NDR_SCALARS
, r
->info6
));
8276 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
8282 _mem_save_info7_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8283 NDR_PULL_SET_MEM_CTX(ndr
, r
->info7
, 0);
8284 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo7(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info7
));
8285 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info7_0
, 0);
8291 _mem_save_info8_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8292 NDR_PULL_SET_MEM_CTX(ndr
, r
->info8
, 0);
8293 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo8(ndr
, NDR_SCALARS
, r
->info8
));
8294 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info8_0
, 0);
8300 _mem_save_info9_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8301 NDR_PULL_SET_MEM_CTX(ndr
, r
->info9
, 0);
8302 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo9(ndr
, NDR_SCALARS
, r
->info9
));
8303 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info9_0
, 0);
8312 return NDR_ERR_SUCCESS
;
8315 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_SetPrinterInfo
*r
)
8318 level
= ndr_print_get_switch_value(ndr
, r
);
8319 ndr_print_union(ndr
, name
, level
, "spoolss_SetPrinterInfo");
8322 ndr_print_ptr(ndr
, "info0", r
->info0
);
8325 ndr_print_spoolss_SetPrinterInfo0(ndr
, "info0", r
->info0
);
8331 ndr_print_ptr(ndr
, "info1", r
->info1
);
8334 ndr_print_spoolss_SetPrinterInfo1(ndr
, "info1", r
->info1
);
8340 ndr_print_ptr(ndr
, "info2", r
->info2
);
8343 ndr_print_spoolss_SetPrinterInfo2(ndr
, "info2", r
->info2
);
8349 ndr_print_ptr(ndr
, "info3", r
->info3
);
8352 ndr_print_spoolss_SetPrinterInfo3(ndr
, "info3", r
->info3
);
8358 ndr_print_ptr(ndr
, "info4", r
->info4
);
8361 ndr_print_spoolss_SetPrinterInfo4(ndr
, "info4", r
->info4
);
8367 ndr_print_ptr(ndr
, "info5", r
->info5
);
8370 ndr_print_spoolss_SetPrinterInfo5(ndr
, "info5", r
->info5
);
8376 ndr_print_ptr(ndr
, "info6", r
->info6
);
8379 ndr_print_spoolss_SetPrinterInfo6(ndr
, "info6", r
->info6
);
8385 ndr_print_ptr(ndr
, "info7", r
->info7
);
8388 ndr_print_spoolss_SetPrinterInfo7(ndr
, "info7", r
->info7
);
8394 ndr_print_ptr(ndr
, "info8", r
->info8
);
8397 ndr_print_spoolss_SetPrinterInfo8(ndr
, "info8", r
->info8
);
8403 ndr_print_ptr(ndr
, "info9", r
->info9
);
8406 ndr_print_spoolss_SetPrinterInfo9(ndr
, "info9", r
->info9
);
8417 static enum ndr_err_code
ndr_push_spoolss_SetPrinterInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_SetPrinterInfoCtr
*r
)
8419 if (ndr_flags
& NDR_SCALARS
) {
8420 NDR_CHECK(ndr_push_align(ndr
, 5));
8421 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
8422 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->level
));
8423 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr
, NDR_SCALARS
, &r
->info
));
8424 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8426 if (ndr_flags
& NDR_BUFFERS
) {
8427 NDR_CHECK(ndr_push_spoolss_SetPrinterInfo(ndr
, NDR_BUFFERS
, &r
->info
));
8429 return NDR_ERR_SUCCESS
;
8432 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_SetPrinterInfoCtr
*r
)
8434 if (ndr_flags
& NDR_SCALARS
) {
8435 NDR_CHECK(ndr_pull_align(ndr
, 5));
8436 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
8437 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->level
));
8438 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr
, NDR_SCALARS
, &r
->info
));
8439 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8441 if (ndr_flags
& NDR_BUFFERS
) {
8442 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfo(ndr
, NDR_BUFFERS
, &r
->info
));
8444 return NDR_ERR_SUCCESS
;
8447 _PUBLIC_
void ndr_print_spoolss_SetPrinterInfoCtr(struct ndr_print
*ndr
, const char *name
, const struct spoolss_SetPrinterInfoCtr
*r
)
8449 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterInfoCtr");
8451 ndr_print_uint32(ndr
, "level", r
->level
);
8452 ndr_print_set_switch_value(ndr
, &r
->info
, r
->level
);
8453 ndr_print_spoolss_SetPrinterInfo(ndr
, "info", &r
->info
);
8457 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_StringArray(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_StringArray
*r
)
8459 if (ndr_flags
& NDR_SCALARS
) {
8460 NDR_CHECK(ndr_push_align(ndr
, 4));
8461 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, (ndr_size_spoolss_StringArray(r
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2));
8463 uint32_t _flags_save_string_array
= ndr
->flags
;
8464 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
8465 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->string
));
8466 ndr
->flags
= _flags_save_string_array
;
8468 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
8470 if (ndr_flags
& NDR_BUFFERS
) {
8472 return NDR_ERR_SUCCESS
;
8475 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_StringArray(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_StringArray
*r
)
8477 if (ndr_flags
& NDR_SCALARS
) {
8478 NDR_CHECK(ndr_pull_align(ndr
, 4));
8479 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size
));
8481 uint32_t _flags_save_string_array
= ndr
->flags
;
8482 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
8483 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->string
));
8484 ndr
->flags
= _flags_save_string_array
;
8486 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
8488 if (ndr_flags
& NDR_BUFFERS
) {
8490 return NDR_ERR_SUCCESS
;
8493 _PUBLIC_
void ndr_print_spoolss_StringArray(struct ndr_print
*ndr
, const char *name
, const struct spoolss_StringArray
*r
)
8495 ndr_print_struct(ndr
, name
, "spoolss_StringArray");
8497 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
);
8498 ndr_print_string_array(ndr
, "string", r
->string
);
8502 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo1
*r
)
8504 if (ndr_flags
& NDR_SCALARS
) {
8505 NDR_CHECK(ndr_push_align(ndr
, 5));
8506 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
8507 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8509 if (ndr_flags
& NDR_BUFFERS
) {
8510 if (r
->driver_name
) {
8511 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8512 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8513 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8514 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8517 return NDR_ERR_SUCCESS
;
8520 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo1
*r
)
8522 uint32_t _ptr_driver_name
;
8523 TALLOC_CTX
*_mem_save_driver_name_0
;
8524 if (ndr_flags
& NDR_SCALARS
) {
8525 NDR_CHECK(ndr_pull_align(ndr
, 5));
8526 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
8527 if (_ptr_driver_name
) {
8528 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
8530 r
->driver_name
= NULL
;
8532 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8534 if (ndr_flags
& NDR_BUFFERS
) {
8535 if (r
->driver_name
) {
8536 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8537 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
8538 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
8539 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
8540 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
8541 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
));
8543 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
8544 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
8545 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
8548 return NDR_ERR_SUCCESS
;
8551 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo1
*r
)
8553 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo1");
8555 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
8557 if (r
->driver_name
) {
8558 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
8564 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverOSVersion(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DriverOSVersion r
)
8566 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
8567 return NDR_ERR_SUCCESS
;
8570 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverOSVersion(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DriverOSVersion
*r
)
8573 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
8575 return NDR_ERR_SUCCESS
;
8578 _PUBLIC_
void ndr_print_spoolss_DriverOSVersion(struct ndr_print
*ndr
, const char *name
, enum spoolss_DriverOSVersion r
)
8580 const char *val
= NULL
;
8583 case SPOOLSS_DRIVER_VERSION_9X
: val
= "SPOOLSS_DRIVER_VERSION_9X"; break;
8584 case SPOOLSS_DRIVER_VERSION_NT35
: val
= "SPOOLSS_DRIVER_VERSION_NT35"; break;
8585 case SPOOLSS_DRIVER_VERSION_NT4
: val
= "SPOOLSS_DRIVER_VERSION_NT4"; break;
8586 case SPOOLSS_DRIVER_VERSION_200X
: val
= "SPOOLSS_DRIVER_VERSION_200X"; break;
8588 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
8591 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo2
*r
)
8593 if (ndr_flags
& NDR_SCALARS
) {
8594 NDR_CHECK(ndr_push_align(ndr
, 5));
8595 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
8596 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
8597 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
8598 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
8599 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
8600 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
8601 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8603 if (ndr_flags
& NDR_BUFFERS
) {
8604 if (r
->driver_name
) {
8605 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8606 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8607 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8608 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8610 if (r
->architecture
) {
8611 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8612 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8613 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8614 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8616 if (r
->driver_path
) {
8617 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8618 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8619 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8620 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8623 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8624 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8625 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8626 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8628 if (r
->config_file
) {
8629 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8630 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8631 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8632 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8635 return NDR_ERR_SUCCESS
;
8638 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo2
*r
)
8640 uint32_t _ptr_driver_name
;
8641 TALLOC_CTX
*_mem_save_driver_name_0
;
8642 uint32_t _ptr_architecture
;
8643 TALLOC_CTX
*_mem_save_architecture_0
;
8644 uint32_t _ptr_driver_path
;
8645 TALLOC_CTX
*_mem_save_driver_path_0
;
8646 uint32_t _ptr_data_file
;
8647 TALLOC_CTX
*_mem_save_data_file_0
;
8648 uint32_t _ptr_config_file
;
8649 TALLOC_CTX
*_mem_save_config_file_0
;
8650 if (ndr_flags
& NDR_SCALARS
) {
8651 NDR_CHECK(ndr_pull_align(ndr
, 5));
8652 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
8653 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
8654 if (_ptr_driver_name
) {
8655 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
8657 r
->driver_name
= NULL
;
8659 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
8660 if (_ptr_architecture
) {
8661 NDR_PULL_ALLOC(ndr
, r
->architecture
);
8663 r
->architecture
= NULL
;
8665 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
8666 if (_ptr_driver_path
) {
8667 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
8669 r
->driver_path
= NULL
;
8671 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
8672 if (_ptr_data_file
) {
8673 NDR_PULL_ALLOC(ndr
, r
->data_file
);
8675 r
->data_file
= NULL
;
8677 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
8678 if (_ptr_config_file
) {
8679 NDR_PULL_ALLOC(ndr
, r
->config_file
);
8681 r
->config_file
= NULL
;
8683 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8685 if (ndr_flags
& NDR_BUFFERS
) {
8686 if (r
->driver_name
) {
8687 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8688 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
8689 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
8690 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
8691 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
8692 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->driver_name
), ndr_get_array_length(ndr
, &r
->driver_name
));
8694 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
8695 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
8696 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
8698 if (r
->architecture
) {
8699 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8700 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
8701 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
8702 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
8703 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
8704 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->architecture
), ndr_get_array_length(ndr
, &r
->architecture
));
8706 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
8707 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
8708 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
8710 if (r
->driver_path
) {
8711 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8712 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
8713 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
8714 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
8715 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
8716 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->driver_path
), ndr_get_array_length(ndr
, &r
->driver_path
));
8718 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
8719 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
8720 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
8723 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8724 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
8725 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
8726 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
8727 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
8728 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->data_file
), ndr_get_array_length(ndr
, &r
->data_file
));
8730 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
8731 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
8732 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
8734 if (r
->config_file
) {
8735 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8736 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
8737 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
8738 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
8739 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
8740 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->config_file
), ndr_get_array_length(ndr
, &r
->config_file
));
8742 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
8743 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
8744 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
8747 return NDR_ERR_SUCCESS
;
8750 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo2
*r
)
8752 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo2");
8754 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
8755 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
8757 if (r
->driver_name
) {
8758 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
8761 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
8763 if (r
->architecture
) {
8764 ndr_print_string(ndr
, "architecture", r
->architecture
);
8767 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
8769 if (r
->driver_path
) {
8770 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
8773 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
8776 ndr_print_string(ndr
, "data_file", r
->data_file
);
8779 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
8781 if (r
->config_file
) {
8782 ndr_print_string(ndr
, "config_file", r
->config_file
);
8788 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo3
*r
)
8790 if (ndr_flags
& NDR_SCALARS
) {
8791 NDR_CHECK(ndr_push_align(ndr
, 5));
8792 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
8793 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
8794 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
8795 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
8796 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
8797 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
8798 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->help_file
));
8799 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->monitor_name
));
8800 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->default_datatype
));
8801 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->dependent_files
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
8802 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependent_files
));
8803 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
8805 if (ndr_flags
& NDR_BUFFERS
) {
8806 if (r
->driver_name
) {
8807 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8808 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8809 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
8810 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8812 if (r
->architecture
) {
8813 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8814 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8815 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
8816 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8818 if (r
->driver_path
) {
8819 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8820 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8821 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
8822 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8825 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8826 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8827 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
8828 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8830 if (r
->config_file
) {
8831 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8832 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8833 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
8834 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8837 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
8838 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8839 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
8840 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->help_file
, ndr_charset_length(r
->help_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8842 if (r
->monitor_name
) {
8843 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
8844 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8845 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
8846 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->monitor_name
, ndr_charset_length(r
->monitor_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8848 if (r
->default_datatype
) {
8849 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
8850 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
8851 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
8852 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->default_datatype
, ndr_charset_length(r
->default_datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
8854 if (r
->dependent_files
) {
8855 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
8858 return NDR_ERR_SUCCESS
;
8861 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo3
*r
)
8863 uint32_t _ptr_driver_name
;
8864 TALLOC_CTX
*_mem_save_driver_name_0
;
8865 uint32_t _ptr_architecture
;
8866 TALLOC_CTX
*_mem_save_architecture_0
;
8867 uint32_t _ptr_driver_path
;
8868 TALLOC_CTX
*_mem_save_driver_path_0
;
8869 uint32_t _ptr_data_file
;
8870 TALLOC_CTX
*_mem_save_data_file_0
;
8871 uint32_t _ptr_config_file
;
8872 TALLOC_CTX
*_mem_save_config_file_0
;
8873 uint32_t _ptr_help_file
;
8874 TALLOC_CTX
*_mem_save_help_file_0
;
8875 uint32_t _ptr_monitor_name
;
8876 TALLOC_CTX
*_mem_save_monitor_name_0
;
8877 uint32_t _ptr_default_datatype
;
8878 TALLOC_CTX
*_mem_save_default_datatype_0
;
8879 uint32_t _ptr_dependent_files
;
8880 TALLOC_CTX
*_mem_save_dependent_files_0
;
8881 if (ndr_flags
& NDR_SCALARS
) {
8882 NDR_CHECK(ndr_pull_align(ndr
, 5));
8883 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
8884 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
8885 if (_ptr_driver_name
) {
8886 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
8888 r
->driver_name
= NULL
;
8890 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
8891 if (_ptr_architecture
) {
8892 NDR_PULL_ALLOC(ndr
, r
->architecture
);
8894 r
->architecture
= NULL
;
8896 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
8897 if (_ptr_driver_path
) {
8898 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
8900 r
->driver_path
= NULL
;
8902 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
8903 if (_ptr_data_file
) {
8904 NDR_PULL_ALLOC(ndr
, r
->data_file
);
8906 r
->data_file
= NULL
;
8908 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
8909 if (_ptr_config_file
) {
8910 NDR_PULL_ALLOC(ndr
, r
->config_file
);
8912 r
->config_file
= NULL
;
8914 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
8915 if (_ptr_help_file
) {
8916 NDR_PULL_ALLOC(ndr
, r
->help_file
);
8918 r
->help_file
= NULL
;
8920 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
8921 if (_ptr_monitor_name
) {
8922 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
8924 r
->monitor_name
= NULL
;
8926 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
8927 if (_ptr_default_datatype
) {
8928 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
8930 r
->default_datatype
= NULL
;
8932 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_dependent_files
));
8933 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
8934 if (_ptr_dependent_files
) {
8935 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
8937 r
->dependent_files
= NULL
;
8939 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
8941 if (ndr_flags
& NDR_BUFFERS
) {
8942 if (r
->driver_name
) {
8943 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8944 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
8945 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
8946 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
8947 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
8948 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
));
8950 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
8951 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
8952 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
8954 if (r
->architecture
) {
8955 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8956 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
8957 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
8958 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
8959 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
8960 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
));
8962 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
8963 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
8964 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
8966 if (r
->driver_path
) {
8967 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8968 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
8969 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
8970 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
8971 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
8972 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
));
8974 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
8975 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
8976 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
8979 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8980 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
8981 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
8982 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
8983 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
8984 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
));
8986 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
8987 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
8988 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
8990 if (r
->config_file
) {
8991 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
8992 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
8993 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
8994 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
8995 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
8996 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
));
8998 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
8999 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
9000 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
9003 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9004 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
9005 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->help_file
));
9006 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->help_file
));
9007 if (ndr_get_array_length(ndr
, &r
->help_file
) > ndr_get_array_size(ndr
, &r
->help_file
)) {
9008 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
));
9010 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t)));
9011 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->help_file
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t), CH_UTF16
));
9012 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
9014 if (r
->monitor_name
) {
9015 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9016 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
9017 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->monitor_name
));
9018 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->monitor_name
));
9019 if (ndr_get_array_length(ndr
, &r
->monitor_name
) > ndr_get_array_size(ndr
, &r
->monitor_name
)) {
9020 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
));
9022 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t)));
9023 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->monitor_name
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t), CH_UTF16
));
9024 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
9026 if (r
->default_datatype
) {
9027 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9028 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
9029 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->default_datatype
));
9030 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->default_datatype
));
9031 if (ndr_get_array_length(ndr
, &r
->default_datatype
) > ndr_get_array_size(ndr
, &r
->default_datatype
)) {
9032 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
));
9034 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t)));
9035 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->default_datatype
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t), CH_UTF16
));
9036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
9038 if (r
->dependent_files
) {
9039 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9040 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
9041 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
9042 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
9045 return NDR_ERR_SUCCESS
;
9048 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo3
*r
)
9050 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo3");
9052 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
9053 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
9055 if (r
->driver_name
) {
9056 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
9059 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
9061 if (r
->architecture
) {
9062 ndr_print_string(ndr
, "architecture", r
->architecture
);
9065 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
9067 if (r
->driver_path
) {
9068 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
9071 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
9074 ndr_print_string(ndr
, "data_file", r
->data_file
);
9077 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
9079 if (r
->config_file
) {
9080 ndr_print_string(ndr
, "config_file", r
->config_file
);
9083 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
9086 ndr_print_string(ndr
, "help_file", r
->help_file
);
9089 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
9091 if (r
->monitor_name
) {
9092 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
9095 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
9097 if (r
->default_datatype
) {
9098 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
9101 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
);
9102 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
9104 if (r
->dependent_files
) {
9105 ndr_print_spoolss_StringArray(ndr
, "dependent_files", r
->dependent_files
);
9111 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo4
*r
)
9113 if (ndr_flags
& NDR_SCALARS
) {
9114 NDR_CHECK(ndr_push_align(ndr
, 5));
9115 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
9116 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
9117 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
9118 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
9119 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
9120 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
9121 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->help_file
));
9122 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->monitor_name
));
9123 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->default_datatype
));
9124 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->dependent_files
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
9125 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependent_files
));
9126 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->previous_names
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
9127 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->previous_names
));
9128 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
9130 if (ndr_flags
& NDR_BUFFERS
) {
9131 if (r
->driver_name
) {
9132 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
9133 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9134 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
9135 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9137 if (r
->architecture
) {
9138 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
9139 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9140 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
9141 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9143 if (r
->driver_path
) {
9144 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
9145 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9146 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
9147 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9150 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
9151 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9152 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
9153 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9155 if (r
->config_file
) {
9156 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
9157 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9158 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
9159 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9162 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
9163 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9164 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
9165 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->help_file
, ndr_charset_length(r
->help_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9167 if (r
->monitor_name
) {
9168 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
9169 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9170 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
9171 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->monitor_name
, ndr_charset_length(r
->monitor_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9173 if (r
->default_datatype
) {
9174 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
9175 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9176 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
9177 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->default_datatype
, ndr_charset_length(r
->default_datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9179 if (r
->dependent_files
) {
9180 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
9182 if (r
->previous_names
) {
9183 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
9186 return NDR_ERR_SUCCESS
;
9189 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo4
*r
)
9191 uint32_t _ptr_driver_name
;
9192 TALLOC_CTX
*_mem_save_driver_name_0
;
9193 uint32_t _ptr_architecture
;
9194 TALLOC_CTX
*_mem_save_architecture_0
;
9195 uint32_t _ptr_driver_path
;
9196 TALLOC_CTX
*_mem_save_driver_path_0
;
9197 uint32_t _ptr_data_file
;
9198 TALLOC_CTX
*_mem_save_data_file_0
;
9199 uint32_t _ptr_config_file
;
9200 TALLOC_CTX
*_mem_save_config_file_0
;
9201 uint32_t _ptr_help_file
;
9202 TALLOC_CTX
*_mem_save_help_file_0
;
9203 uint32_t _ptr_monitor_name
;
9204 TALLOC_CTX
*_mem_save_monitor_name_0
;
9205 uint32_t _ptr_default_datatype
;
9206 TALLOC_CTX
*_mem_save_default_datatype_0
;
9207 uint32_t _ptr_dependent_files
;
9208 TALLOC_CTX
*_mem_save_dependent_files_0
;
9209 uint32_t _ptr_previous_names
;
9210 TALLOC_CTX
*_mem_save_previous_names_0
;
9211 if (ndr_flags
& NDR_SCALARS
) {
9212 NDR_CHECK(ndr_pull_align(ndr
, 5));
9213 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
9214 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
9215 if (_ptr_driver_name
) {
9216 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
9218 r
->driver_name
= NULL
;
9220 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
9221 if (_ptr_architecture
) {
9222 NDR_PULL_ALLOC(ndr
, r
->architecture
);
9224 r
->architecture
= NULL
;
9226 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
9227 if (_ptr_driver_path
) {
9228 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
9230 r
->driver_path
= NULL
;
9232 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
9233 if (_ptr_data_file
) {
9234 NDR_PULL_ALLOC(ndr
, r
->data_file
);
9236 r
->data_file
= NULL
;
9238 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
9239 if (_ptr_config_file
) {
9240 NDR_PULL_ALLOC(ndr
, r
->config_file
);
9242 r
->config_file
= NULL
;
9244 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
9245 if (_ptr_help_file
) {
9246 NDR_PULL_ALLOC(ndr
, r
->help_file
);
9248 r
->help_file
= NULL
;
9250 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
9251 if (_ptr_monitor_name
) {
9252 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
9254 r
->monitor_name
= NULL
;
9256 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
9257 if (_ptr_default_datatype
) {
9258 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
9260 r
->default_datatype
= NULL
;
9262 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_dependent_files
));
9263 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
9264 if (_ptr_dependent_files
) {
9265 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
9267 r
->dependent_files
= NULL
;
9269 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_previous_names
));
9270 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
9271 if (_ptr_previous_names
) {
9272 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
9274 r
->previous_names
= NULL
;
9276 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
9278 if (ndr_flags
& NDR_BUFFERS
) {
9279 if (r
->driver_name
) {
9280 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9281 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
9282 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
9283 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
9284 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
9285 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
));
9287 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
9288 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
9289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
9291 if (r
->architecture
) {
9292 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9293 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
9294 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
9295 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
9296 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
9297 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
));
9299 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
9300 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
9301 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
9303 if (r
->driver_path
) {
9304 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9305 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
9306 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
9307 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
9308 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
9309 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
));
9311 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
9312 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
9313 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
9316 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9317 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
9318 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
9319 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
9320 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
9321 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
));
9323 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
9324 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
9325 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
9327 if (r
->config_file
) {
9328 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9329 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
9330 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
9331 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
9332 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
9333 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
));
9335 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
9336 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
9337 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
9340 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9341 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
9342 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->help_file
));
9343 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->help_file
));
9344 if (ndr_get_array_length(ndr
, &r
->help_file
) > ndr_get_array_size(ndr
, &r
->help_file
)) {
9345 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
));
9347 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t)));
9348 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->help_file
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t), CH_UTF16
));
9349 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
9351 if (r
->monitor_name
) {
9352 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9353 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
9354 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->monitor_name
));
9355 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->monitor_name
));
9356 if (ndr_get_array_length(ndr
, &r
->monitor_name
) > ndr_get_array_size(ndr
, &r
->monitor_name
)) {
9357 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
));
9359 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t)));
9360 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->monitor_name
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t), CH_UTF16
));
9361 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
9363 if (r
->default_datatype
) {
9364 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9365 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
9366 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->default_datatype
));
9367 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->default_datatype
));
9368 if (ndr_get_array_length(ndr
, &r
->default_datatype
) > ndr_get_array_size(ndr
, &r
->default_datatype
)) {
9369 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
));
9371 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t)));
9372 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->default_datatype
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t), CH_UTF16
));
9373 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
9375 if (r
->dependent_files
) {
9376 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9377 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
9378 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
9379 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
9381 if (r
->previous_names
) {
9382 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9383 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
9384 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
9385 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
9388 return NDR_ERR_SUCCESS
;
9391 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo4
*r
)
9393 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo4");
9395 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
9396 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
9398 if (r
->driver_name
) {
9399 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
9402 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
9404 if (r
->architecture
) {
9405 ndr_print_string(ndr
, "architecture", r
->architecture
);
9408 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
9410 if (r
->driver_path
) {
9411 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
9414 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
9417 ndr_print_string(ndr
, "data_file", r
->data_file
);
9420 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
9422 if (r
->config_file
) {
9423 ndr_print_string(ndr
, "config_file", r
->config_file
);
9426 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
9429 ndr_print_string(ndr
, "help_file", r
->help_file
);
9432 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
9434 if (r
->monitor_name
) {
9435 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
9438 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
9440 if (r
->default_datatype
) {
9441 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
9444 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
);
9445 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
9447 if (r
->dependent_files
) {
9448 ndr_print_spoolss_StringArray(ndr
, "dependent_files", r
->dependent_files
);
9451 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
);
9452 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
9454 if (r
->previous_names
) {
9455 ndr_print_spoolss_StringArray(ndr
, "previous_names", r
->previous_names
);
9461 static enum ndr_err_code
ndr_push_spoolss_DriverAttributes(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
9463 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
9464 return NDR_ERR_SUCCESS
;
9467 static enum ndr_err_code
ndr_pull_spoolss_DriverAttributes(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
9470 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
9472 return NDR_ERR_SUCCESS
;
9475 _PUBLIC_
void ndr_print_spoolss_DriverAttributes(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
9477 ndr_print_uint32(ndr
, name
, r
);
9479 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_DRIVER_PACKAGE_AWARE", PRINTER_DRIVER_PACKAGE_AWARE
, r
);
9483 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo6
*r
)
9485 if (ndr_flags
& NDR_SCALARS
) {
9486 NDR_CHECK(ndr_push_align(ndr
, 8));
9487 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
9488 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
9489 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
9490 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
9491 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
9492 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
9493 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->help_file
));
9494 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->monitor_name
));
9495 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->default_datatype
));
9496 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->dependent_files
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
9497 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependent_files
));
9498 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->previous_names
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
9499 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->previous_names
));
9500 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
9501 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
9502 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->manufacturer_name
));
9503 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->manufacturer_url
));
9504 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->hardware_id
));
9505 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->provider
));
9506 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
9508 if (ndr_flags
& NDR_BUFFERS
) {
9509 if (r
->driver_name
) {
9510 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
9511 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9512 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
9513 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9515 if (r
->architecture
) {
9516 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
9517 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9518 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
9519 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9521 if (r
->driver_path
) {
9522 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
9523 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9524 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
9525 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9528 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
9529 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9530 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
9531 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9533 if (r
->config_file
) {
9534 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
9535 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9536 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
9537 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9540 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
9541 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9542 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
9543 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->help_file
, ndr_charset_length(r
->help_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9545 if (r
->monitor_name
) {
9546 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
9547 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9548 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
9549 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->monitor_name
, ndr_charset_length(r
->monitor_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9551 if (r
->default_datatype
) {
9552 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
9553 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9554 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
9555 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->default_datatype
, ndr_charset_length(r
->default_datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9557 if (r
->dependent_files
) {
9558 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
9560 if (r
->previous_names
) {
9561 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
9563 if (r
->manufacturer_name
) {
9564 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
)));
9565 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9566 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
)));
9567 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->manufacturer_name
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9569 if (r
->manufacturer_url
) {
9570 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
)));
9571 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9572 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
)));
9573 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->manufacturer_url
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9575 if (r
->hardware_id
) {
9576 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->hardware_id
, CH_UTF16
)));
9577 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9578 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->hardware_id
, CH_UTF16
)));
9579 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hardware_id
, ndr_charset_length(r
->hardware_id
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9582 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->provider
, CH_UTF16
)));
9583 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
9584 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->provider
, CH_UTF16
)));
9585 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->provider
, ndr_charset_length(r
->provider
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
9588 return NDR_ERR_SUCCESS
;
9591 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo6
*r
)
9593 uint32_t _ptr_driver_name
;
9594 TALLOC_CTX
*_mem_save_driver_name_0
;
9595 uint32_t _ptr_architecture
;
9596 TALLOC_CTX
*_mem_save_architecture_0
;
9597 uint32_t _ptr_driver_path
;
9598 TALLOC_CTX
*_mem_save_driver_path_0
;
9599 uint32_t _ptr_data_file
;
9600 TALLOC_CTX
*_mem_save_data_file_0
;
9601 uint32_t _ptr_config_file
;
9602 TALLOC_CTX
*_mem_save_config_file_0
;
9603 uint32_t _ptr_help_file
;
9604 TALLOC_CTX
*_mem_save_help_file_0
;
9605 uint32_t _ptr_monitor_name
;
9606 TALLOC_CTX
*_mem_save_monitor_name_0
;
9607 uint32_t _ptr_default_datatype
;
9608 TALLOC_CTX
*_mem_save_default_datatype_0
;
9609 uint32_t _ptr_dependent_files
;
9610 TALLOC_CTX
*_mem_save_dependent_files_0
;
9611 uint32_t _ptr_previous_names
;
9612 TALLOC_CTX
*_mem_save_previous_names_0
;
9613 uint32_t _ptr_manufacturer_name
;
9614 TALLOC_CTX
*_mem_save_manufacturer_name_0
;
9615 uint32_t _ptr_manufacturer_url
;
9616 TALLOC_CTX
*_mem_save_manufacturer_url_0
;
9617 uint32_t _ptr_hardware_id
;
9618 TALLOC_CTX
*_mem_save_hardware_id_0
;
9619 uint32_t _ptr_provider
;
9620 TALLOC_CTX
*_mem_save_provider_0
;
9621 if (ndr_flags
& NDR_SCALARS
) {
9622 NDR_CHECK(ndr_pull_align(ndr
, 8));
9623 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
9624 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
9625 if (_ptr_driver_name
) {
9626 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
9628 r
->driver_name
= NULL
;
9630 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
9631 if (_ptr_architecture
) {
9632 NDR_PULL_ALLOC(ndr
, r
->architecture
);
9634 r
->architecture
= NULL
;
9636 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
9637 if (_ptr_driver_path
) {
9638 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
9640 r
->driver_path
= NULL
;
9642 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
9643 if (_ptr_data_file
) {
9644 NDR_PULL_ALLOC(ndr
, r
->data_file
);
9646 r
->data_file
= NULL
;
9648 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
9649 if (_ptr_config_file
) {
9650 NDR_PULL_ALLOC(ndr
, r
->config_file
);
9652 r
->config_file
= NULL
;
9654 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
9655 if (_ptr_help_file
) {
9656 NDR_PULL_ALLOC(ndr
, r
->help_file
);
9658 r
->help_file
= NULL
;
9660 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
9661 if (_ptr_monitor_name
) {
9662 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
9664 r
->monitor_name
= NULL
;
9666 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
9667 if (_ptr_default_datatype
) {
9668 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
9670 r
->default_datatype
= NULL
;
9672 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_dependent_files
));
9673 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
9674 if (_ptr_dependent_files
) {
9675 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
9677 r
->dependent_files
= NULL
;
9679 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_previous_names
));
9680 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
9681 if (_ptr_previous_names
) {
9682 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
9684 r
->previous_names
= NULL
;
9686 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
9687 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
9688 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_name
));
9689 if (_ptr_manufacturer_name
) {
9690 NDR_PULL_ALLOC(ndr
, r
->manufacturer_name
);
9692 r
->manufacturer_name
= NULL
;
9694 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_url
));
9695 if (_ptr_manufacturer_url
) {
9696 NDR_PULL_ALLOC(ndr
, r
->manufacturer_url
);
9698 r
->manufacturer_url
= NULL
;
9700 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hardware_id
));
9701 if (_ptr_hardware_id
) {
9702 NDR_PULL_ALLOC(ndr
, r
->hardware_id
);
9704 r
->hardware_id
= NULL
;
9706 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_provider
));
9707 if (_ptr_provider
) {
9708 NDR_PULL_ALLOC(ndr
, r
->provider
);
9712 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
9714 if (ndr_flags
& NDR_BUFFERS
) {
9715 if (r
->driver_name
) {
9716 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9717 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
9718 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
9719 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
9720 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
9721 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
));
9723 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
9724 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
9725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
9727 if (r
->architecture
) {
9728 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9729 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
9730 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
9731 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
9732 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
9733 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
));
9735 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
9736 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
9737 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
9739 if (r
->driver_path
) {
9740 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9741 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
9742 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
9743 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
9744 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
9745 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
));
9747 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
9748 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
9749 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
9752 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9753 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
9754 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
9755 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
9756 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
9757 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
));
9759 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
9760 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
9761 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
9763 if (r
->config_file
) {
9764 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9765 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
9766 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
9767 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
9768 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
9769 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
));
9771 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
9772 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
9773 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
9776 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9777 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
9778 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->help_file
));
9779 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->help_file
));
9780 if (ndr_get_array_length(ndr
, &r
->help_file
) > ndr_get_array_size(ndr
, &r
->help_file
)) {
9781 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
));
9783 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t)));
9784 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->help_file
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t), CH_UTF16
));
9785 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
9787 if (r
->monitor_name
) {
9788 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9789 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
9790 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->monitor_name
));
9791 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->monitor_name
));
9792 if (ndr_get_array_length(ndr
, &r
->monitor_name
) > ndr_get_array_size(ndr
, &r
->monitor_name
)) {
9793 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
));
9795 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t)));
9796 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->monitor_name
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t), CH_UTF16
));
9797 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
9799 if (r
->default_datatype
) {
9800 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9801 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
9802 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->default_datatype
));
9803 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->default_datatype
));
9804 if (ndr_get_array_length(ndr
, &r
->default_datatype
) > ndr_get_array_size(ndr
, &r
->default_datatype
)) {
9805 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
));
9807 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t)));
9808 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->default_datatype
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t), CH_UTF16
));
9809 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
9811 if (r
->dependent_files
) {
9812 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9813 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
9814 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
9815 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
9817 if (r
->previous_names
) {
9818 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9819 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
9820 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
9821 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
9823 if (r
->manufacturer_name
) {
9824 _mem_save_manufacturer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9825 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_name
, 0);
9826 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->manufacturer_name
));
9827 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->manufacturer_name
));
9828 if (ndr_get_array_length(ndr
, &r
->manufacturer_name
) > ndr_get_array_size(ndr
, &r
->manufacturer_name
)) {
9829 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
));
9831 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->manufacturer_name
), sizeof(uint16_t)));
9832 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->manufacturer_name
, ndr_get_array_length(ndr
, &r
->manufacturer_name
), sizeof(uint16_t), CH_UTF16
));
9833 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_name_0
, 0);
9835 if (r
->manufacturer_url
) {
9836 _mem_save_manufacturer_url_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9837 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_url
, 0);
9838 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->manufacturer_url
));
9839 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->manufacturer_url
));
9840 if (ndr_get_array_length(ndr
, &r
->manufacturer_url
) > ndr_get_array_size(ndr
, &r
->manufacturer_url
)) {
9841 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
));
9843 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->manufacturer_url
), sizeof(uint16_t)));
9844 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->manufacturer_url
, ndr_get_array_length(ndr
, &r
->manufacturer_url
), sizeof(uint16_t), CH_UTF16
));
9845 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_url_0
, 0);
9847 if (r
->hardware_id
) {
9848 _mem_save_hardware_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9849 NDR_PULL_SET_MEM_CTX(ndr
, r
->hardware_id
, 0);
9850 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->hardware_id
));
9851 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->hardware_id
));
9852 if (ndr_get_array_length(ndr
, &r
->hardware_id
) > ndr_get_array_size(ndr
, &r
->hardware_id
)) {
9853 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->hardware_id
), ndr_get_array_length(ndr
, &r
->hardware_id
));
9855 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->hardware_id
), sizeof(uint16_t)));
9856 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hardware_id
, ndr_get_array_length(ndr
, &r
->hardware_id
), sizeof(uint16_t), CH_UTF16
));
9857 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hardware_id_0
, 0);
9860 _mem_save_provider_0
= NDR_PULL_GET_MEM_CTX(ndr
);
9861 NDR_PULL_SET_MEM_CTX(ndr
, r
->provider
, 0);
9862 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->provider
));
9863 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->provider
));
9864 if (ndr_get_array_length(ndr
, &r
->provider
) > ndr_get_array_size(ndr
, &r
->provider
)) {
9865 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
));
9867 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->provider
), sizeof(uint16_t)));
9868 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->provider
, ndr_get_array_length(ndr
, &r
->provider
), sizeof(uint16_t), CH_UTF16
));
9869 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_provider_0
, 0);
9872 return NDR_ERR_SUCCESS
;
9875 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo6(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo6
*r
)
9877 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo6");
9879 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
9880 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
9882 if (r
->driver_name
) {
9883 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
9886 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
9888 if (r
->architecture
) {
9889 ndr_print_string(ndr
, "architecture", r
->architecture
);
9892 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
9894 if (r
->driver_path
) {
9895 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
9898 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
9901 ndr_print_string(ndr
, "data_file", r
->data_file
);
9904 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
9906 if (r
->config_file
) {
9907 ndr_print_string(ndr
, "config_file", r
->config_file
);
9910 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
9913 ndr_print_string(ndr
, "help_file", r
->help_file
);
9916 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
9918 if (r
->monitor_name
) {
9919 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
9922 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
9924 if (r
->default_datatype
) {
9925 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
9928 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
);
9929 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
9931 if (r
->dependent_files
) {
9932 ndr_print_spoolss_StringArray(ndr
, "dependent_files", r
->dependent_files
);
9935 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
);
9936 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
9938 if (r
->previous_names
) {
9939 ndr_print_spoolss_StringArray(ndr
, "previous_names", r
->previous_names
);
9942 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
9943 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
9944 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
9946 if (r
->manufacturer_name
) {
9947 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
9950 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
9952 if (r
->manufacturer_url
) {
9953 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
9956 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
9958 if (r
->hardware_id
) {
9959 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
9962 ndr_print_ptr(ndr
, "provider", r
->provider
);
9965 ndr_print_string(ndr
, "provider", r
->provider
);
9971 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfo8
*r
)
9973 if (ndr_flags
& NDR_SCALARS
) {
9974 NDR_CHECK(ndr_push_align(ndr
, 8));
9975 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
9976 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_name
));
9977 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->architecture
));
9978 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->driver_path
));
9979 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->data_file
));
9980 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->config_file
));
9981 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->help_file
));
9982 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->monitor_name
));
9983 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->default_datatype
));
9984 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->dependent_files
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
9985 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->dependent_files
));
9986 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->previous_names
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
9987 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->previous_names
));
9988 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
9989 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
9990 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->manufacturer_name
));
9991 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->manufacturer_url
));
9992 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->hardware_id
));
9993 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->provider
));
9994 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->print_processor
));
9995 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->vendor_setup
));
9996 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->color_profiles
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
9997 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->color_profiles
));
9998 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->inf_path
));
9999 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->printer_driver_attributes
));
10000 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ((ndr_size_spoolss_StringArray(r
->core_driver_dependencies
, ndr
->iconv_convenience
, ndr
->flags
) - 4) / 2)));
10001 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->core_driver_dependencies
));
10002 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->min_inbox_driver_ver_date
));
10003 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->min_inbox_driver_ver_version
));
10004 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
10006 if (ndr_flags
& NDR_BUFFERS
) {
10007 if (r
->driver_name
) {
10008 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
10009 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10010 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_name
, CH_UTF16
)));
10011 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_name
, ndr_charset_length(r
->driver_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10013 if (r
->architecture
) {
10014 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
10015 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10016 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->architecture
, CH_UTF16
)));
10017 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->architecture
, ndr_charset_length(r
->architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10019 if (r
->driver_path
) {
10020 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
10021 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10022 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->driver_path
, CH_UTF16
)));
10023 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->driver_path
, ndr_charset_length(r
->driver_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10025 if (r
->data_file
) {
10026 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
10027 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10028 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->data_file
, CH_UTF16
)));
10029 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->data_file
, ndr_charset_length(r
->data_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10031 if (r
->config_file
) {
10032 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
10033 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10034 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->config_file
, CH_UTF16
)));
10035 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->config_file
, ndr_charset_length(r
->config_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10037 if (r
->help_file
) {
10038 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
10039 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10040 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->help_file
, CH_UTF16
)));
10041 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->help_file
, ndr_charset_length(r
->help_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10043 if (r
->monitor_name
) {
10044 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
10045 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10046 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->monitor_name
, CH_UTF16
)));
10047 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->monitor_name
, ndr_charset_length(r
->monitor_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10049 if (r
->default_datatype
) {
10050 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
10051 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10052 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->default_datatype
, CH_UTF16
)));
10053 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->default_datatype
, ndr_charset_length(r
->default_datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10055 if (r
->dependent_files
) {
10056 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
10058 if (r
->previous_names
) {
10059 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
10061 if (r
->manufacturer_name
) {
10062 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
)));
10063 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10064 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
)));
10065 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->manufacturer_name
, ndr_charset_length(r
->manufacturer_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10067 if (r
->manufacturer_url
) {
10068 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
)));
10069 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10070 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
)));
10071 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->manufacturer_url
, ndr_charset_length(r
->manufacturer_url
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10073 if (r
->hardware_id
) {
10074 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->hardware_id
, CH_UTF16
)));
10075 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10076 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->hardware_id
, CH_UTF16
)));
10077 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hardware_id
, ndr_charset_length(r
->hardware_id
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10080 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->provider
, CH_UTF16
)));
10081 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10082 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->provider
, CH_UTF16
)));
10083 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->provider
, ndr_charset_length(r
->provider
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10085 if (r
->print_processor
) {
10086 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
10087 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10088 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->print_processor
, CH_UTF16
)));
10089 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->print_processor
, ndr_charset_length(r
->print_processor
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10091 if (r
->vendor_setup
) {
10092 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->vendor_setup
, CH_UTF16
)));
10093 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10094 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->vendor_setup
, CH_UTF16
)));
10095 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->vendor_setup
, ndr_charset_length(r
->vendor_setup
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10097 if (r
->color_profiles
) {
10098 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->color_profiles
));
10101 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->inf_path
, CH_UTF16
)));
10102 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
10103 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->inf_path
, CH_UTF16
)));
10104 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->inf_path
, ndr_charset_length(r
->inf_path
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
10106 if (r
->core_driver_dependencies
) {
10107 NDR_CHECK(ndr_push_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->core_driver_dependencies
));
10110 return NDR_ERR_SUCCESS
;
10113 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfo8
*r
)
10115 uint32_t _ptr_driver_name
;
10116 TALLOC_CTX
*_mem_save_driver_name_0
;
10117 uint32_t _ptr_architecture
;
10118 TALLOC_CTX
*_mem_save_architecture_0
;
10119 uint32_t _ptr_driver_path
;
10120 TALLOC_CTX
*_mem_save_driver_path_0
;
10121 uint32_t _ptr_data_file
;
10122 TALLOC_CTX
*_mem_save_data_file_0
;
10123 uint32_t _ptr_config_file
;
10124 TALLOC_CTX
*_mem_save_config_file_0
;
10125 uint32_t _ptr_help_file
;
10126 TALLOC_CTX
*_mem_save_help_file_0
;
10127 uint32_t _ptr_monitor_name
;
10128 TALLOC_CTX
*_mem_save_monitor_name_0
;
10129 uint32_t _ptr_default_datatype
;
10130 TALLOC_CTX
*_mem_save_default_datatype_0
;
10131 uint32_t _ptr_dependent_files
;
10132 TALLOC_CTX
*_mem_save_dependent_files_0
;
10133 uint32_t _ptr_previous_names
;
10134 TALLOC_CTX
*_mem_save_previous_names_0
;
10135 uint32_t _ptr_manufacturer_name
;
10136 TALLOC_CTX
*_mem_save_manufacturer_name_0
;
10137 uint32_t _ptr_manufacturer_url
;
10138 TALLOC_CTX
*_mem_save_manufacturer_url_0
;
10139 uint32_t _ptr_hardware_id
;
10140 TALLOC_CTX
*_mem_save_hardware_id_0
;
10141 uint32_t _ptr_provider
;
10142 TALLOC_CTX
*_mem_save_provider_0
;
10143 uint32_t _ptr_print_processor
;
10144 TALLOC_CTX
*_mem_save_print_processor_0
;
10145 uint32_t _ptr_vendor_setup
;
10146 TALLOC_CTX
*_mem_save_vendor_setup_0
;
10147 uint32_t _ptr_color_profiles
;
10148 TALLOC_CTX
*_mem_save_color_profiles_0
;
10149 uint32_t _ptr_inf_path
;
10150 TALLOC_CTX
*_mem_save_inf_path_0
;
10151 uint32_t _ptr_core_driver_dependencies
;
10152 TALLOC_CTX
*_mem_save_core_driver_dependencies_0
;
10153 if (ndr_flags
& NDR_SCALARS
) {
10154 NDR_CHECK(ndr_pull_align(ndr
, 8));
10155 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
10156 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
10157 if (_ptr_driver_name
) {
10158 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
10160 r
->driver_name
= NULL
;
10162 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
10163 if (_ptr_architecture
) {
10164 NDR_PULL_ALLOC(ndr
, r
->architecture
);
10166 r
->architecture
= NULL
;
10168 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
10169 if (_ptr_driver_path
) {
10170 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
10172 r
->driver_path
= NULL
;
10174 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
10175 if (_ptr_data_file
) {
10176 NDR_PULL_ALLOC(ndr
, r
->data_file
);
10178 r
->data_file
= NULL
;
10180 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
10181 if (_ptr_config_file
) {
10182 NDR_PULL_ALLOC(ndr
, r
->config_file
);
10184 r
->config_file
= NULL
;
10186 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
10187 if (_ptr_help_file
) {
10188 NDR_PULL_ALLOC(ndr
, r
->help_file
);
10190 r
->help_file
= NULL
;
10192 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
10193 if (_ptr_monitor_name
) {
10194 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
10196 r
->monitor_name
= NULL
;
10198 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
10199 if (_ptr_default_datatype
) {
10200 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
10202 r
->default_datatype
= NULL
;
10204 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_dependent_files
));
10205 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
10206 if (_ptr_dependent_files
) {
10207 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
10209 r
->dependent_files
= NULL
;
10211 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_previous_names
));
10212 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
10213 if (_ptr_previous_names
) {
10214 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
10216 r
->previous_names
= NULL
;
10218 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
10219 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
10220 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_name
));
10221 if (_ptr_manufacturer_name
) {
10222 NDR_PULL_ALLOC(ndr
, r
->manufacturer_name
);
10224 r
->manufacturer_name
= NULL
;
10226 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_url
));
10227 if (_ptr_manufacturer_url
) {
10228 NDR_PULL_ALLOC(ndr
, r
->manufacturer_url
);
10230 r
->manufacturer_url
= NULL
;
10232 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hardware_id
));
10233 if (_ptr_hardware_id
) {
10234 NDR_PULL_ALLOC(ndr
, r
->hardware_id
);
10236 r
->hardware_id
= NULL
;
10238 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_provider
));
10239 if (_ptr_provider
) {
10240 NDR_PULL_ALLOC(ndr
, r
->provider
);
10242 r
->provider
= NULL
;
10244 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
10245 if (_ptr_print_processor
) {
10246 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
10248 r
->print_processor
= NULL
;
10250 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_vendor_setup
));
10251 if (_ptr_vendor_setup
) {
10252 NDR_PULL_ALLOC(ndr
, r
->vendor_setup
);
10254 r
->vendor_setup
= NULL
;
10256 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_color_profiles
));
10257 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_color_profiles
));
10258 if (_ptr_color_profiles
) {
10259 NDR_PULL_ALLOC(ndr
, r
->color_profiles
);
10261 r
->color_profiles
= NULL
;
10263 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_inf_path
));
10264 if (_ptr_inf_path
) {
10265 NDR_PULL_ALLOC(ndr
, r
->inf_path
);
10267 r
->inf_path
= NULL
;
10269 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->printer_driver_attributes
));
10270 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size_core_driver_dependencies
));
10271 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_core_driver_dependencies
));
10272 if (_ptr_core_driver_dependencies
) {
10273 NDR_PULL_ALLOC(ndr
, r
->core_driver_dependencies
);
10275 r
->core_driver_dependencies
= NULL
;
10277 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->min_inbox_driver_ver_date
));
10278 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->min_inbox_driver_ver_version
));
10279 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
10281 if (ndr_flags
& NDR_BUFFERS
) {
10282 if (r
->driver_name
) {
10283 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10284 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
10285 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_name
));
10286 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_name
));
10287 if (ndr_get_array_length(ndr
, &r
->driver_name
) > ndr_get_array_size(ndr
, &r
->driver_name
)) {
10288 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
));
10290 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t)));
10291 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_name
, ndr_get_array_length(ndr
, &r
->driver_name
), sizeof(uint16_t), CH_UTF16
));
10292 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
10294 if (r
->architecture
) {
10295 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10296 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
10297 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->architecture
));
10298 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->architecture
));
10299 if (ndr_get_array_length(ndr
, &r
->architecture
) > ndr_get_array_size(ndr
, &r
->architecture
)) {
10300 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
));
10302 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t)));
10303 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->architecture
, ndr_get_array_length(ndr
, &r
->architecture
), sizeof(uint16_t), CH_UTF16
));
10304 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
10306 if (r
->driver_path
) {
10307 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10308 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
10309 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->driver_path
));
10310 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->driver_path
));
10311 if (ndr_get_array_length(ndr
, &r
->driver_path
) > ndr_get_array_size(ndr
, &r
->driver_path
)) {
10312 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
));
10314 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t)));
10315 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->driver_path
, ndr_get_array_length(ndr
, &r
->driver_path
), sizeof(uint16_t), CH_UTF16
));
10316 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
10318 if (r
->data_file
) {
10319 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10320 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
10321 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->data_file
));
10322 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->data_file
));
10323 if (ndr_get_array_length(ndr
, &r
->data_file
) > ndr_get_array_size(ndr
, &r
->data_file
)) {
10324 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
));
10326 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t)));
10327 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->data_file
, ndr_get_array_length(ndr
, &r
->data_file
), sizeof(uint16_t), CH_UTF16
));
10328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
10330 if (r
->config_file
) {
10331 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10332 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
10333 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->config_file
));
10334 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->config_file
));
10335 if (ndr_get_array_length(ndr
, &r
->config_file
) > ndr_get_array_size(ndr
, &r
->config_file
)) {
10336 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
));
10338 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t)));
10339 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->config_file
, ndr_get_array_length(ndr
, &r
->config_file
), sizeof(uint16_t), CH_UTF16
));
10340 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
10342 if (r
->help_file
) {
10343 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10344 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
10345 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->help_file
));
10346 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->help_file
));
10347 if (ndr_get_array_length(ndr
, &r
->help_file
) > ndr_get_array_size(ndr
, &r
->help_file
)) {
10348 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
));
10350 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t)));
10351 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->help_file
, ndr_get_array_length(ndr
, &r
->help_file
), sizeof(uint16_t), CH_UTF16
));
10352 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
10354 if (r
->monitor_name
) {
10355 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10356 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
10357 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->monitor_name
));
10358 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->monitor_name
));
10359 if (ndr_get_array_length(ndr
, &r
->monitor_name
) > ndr_get_array_size(ndr
, &r
->monitor_name
)) {
10360 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
));
10362 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t)));
10363 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->monitor_name
, ndr_get_array_length(ndr
, &r
->monitor_name
), sizeof(uint16_t), CH_UTF16
));
10364 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
10366 if (r
->default_datatype
) {
10367 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10368 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
10369 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->default_datatype
));
10370 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->default_datatype
));
10371 if (ndr_get_array_length(ndr
, &r
->default_datatype
) > ndr_get_array_size(ndr
, &r
->default_datatype
)) {
10372 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
));
10374 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t)));
10375 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->default_datatype
, ndr_get_array_length(ndr
, &r
->default_datatype
), sizeof(uint16_t), CH_UTF16
));
10376 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
10378 if (r
->dependent_files
) {
10379 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10380 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
10381 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->dependent_files
));
10382 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
10384 if (r
->previous_names
) {
10385 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10386 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
10387 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->previous_names
));
10388 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
10390 if (r
->manufacturer_name
) {
10391 _mem_save_manufacturer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10392 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_name
, 0);
10393 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->manufacturer_name
));
10394 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->manufacturer_name
));
10395 if (ndr_get_array_length(ndr
, &r
->manufacturer_name
) > ndr_get_array_size(ndr
, &r
->manufacturer_name
)) {
10396 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
));
10398 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->manufacturer_name
), sizeof(uint16_t)));
10399 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->manufacturer_name
, ndr_get_array_length(ndr
, &r
->manufacturer_name
), sizeof(uint16_t), CH_UTF16
));
10400 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_name_0
, 0);
10402 if (r
->manufacturer_url
) {
10403 _mem_save_manufacturer_url_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10404 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_url
, 0);
10405 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->manufacturer_url
));
10406 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->manufacturer_url
));
10407 if (ndr_get_array_length(ndr
, &r
->manufacturer_url
) > ndr_get_array_size(ndr
, &r
->manufacturer_url
)) {
10408 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
));
10410 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->manufacturer_url
), sizeof(uint16_t)));
10411 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->manufacturer_url
, ndr_get_array_length(ndr
, &r
->manufacturer_url
), sizeof(uint16_t), CH_UTF16
));
10412 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_url_0
, 0);
10414 if (r
->hardware_id
) {
10415 _mem_save_hardware_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10416 NDR_PULL_SET_MEM_CTX(ndr
, r
->hardware_id
, 0);
10417 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->hardware_id
));
10418 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->hardware_id
));
10419 if (ndr_get_array_length(ndr
, &r
->hardware_id
) > ndr_get_array_size(ndr
, &r
->hardware_id
)) {
10420 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
));
10422 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->hardware_id
), sizeof(uint16_t)));
10423 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hardware_id
, ndr_get_array_length(ndr
, &r
->hardware_id
), sizeof(uint16_t), CH_UTF16
));
10424 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hardware_id_0
, 0);
10427 _mem_save_provider_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10428 NDR_PULL_SET_MEM_CTX(ndr
, r
->provider
, 0);
10429 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->provider
));
10430 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->provider
));
10431 if (ndr_get_array_length(ndr
, &r
->provider
) > ndr_get_array_size(ndr
, &r
->provider
)) {
10432 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
));
10434 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->provider
), sizeof(uint16_t)));
10435 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->provider
, ndr_get_array_length(ndr
, &r
->provider
), sizeof(uint16_t), CH_UTF16
));
10436 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_provider_0
, 0);
10438 if (r
->print_processor
) {
10439 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10440 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
10441 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->print_processor
));
10442 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->print_processor
));
10443 if (ndr_get_array_length(ndr
, &r
->print_processor
) > ndr_get_array_size(ndr
, &r
->print_processor
)) {
10444 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
));
10446 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t)));
10447 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->print_processor
, ndr_get_array_length(ndr
, &r
->print_processor
), sizeof(uint16_t), CH_UTF16
));
10448 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
10450 if (r
->vendor_setup
) {
10451 _mem_save_vendor_setup_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10452 NDR_PULL_SET_MEM_CTX(ndr
, r
->vendor_setup
, 0);
10453 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->vendor_setup
));
10454 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->vendor_setup
));
10455 if (ndr_get_array_length(ndr
, &r
->vendor_setup
) > ndr_get_array_size(ndr
, &r
->vendor_setup
)) {
10456 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
));
10458 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->vendor_setup
), sizeof(uint16_t)));
10459 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->vendor_setup
, ndr_get_array_length(ndr
, &r
->vendor_setup
), sizeof(uint16_t), CH_UTF16
));
10460 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_vendor_setup_0
, 0);
10462 if (r
->color_profiles
) {
10463 _mem_save_color_profiles_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10464 NDR_PULL_SET_MEM_CTX(ndr
, r
->color_profiles
, 0);
10465 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->color_profiles
));
10466 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_color_profiles_0
, 0);
10469 _mem_save_inf_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10470 NDR_PULL_SET_MEM_CTX(ndr
, r
->inf_path
, 0);
10471 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->inf_path
));
10472 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->inf_path
));
10473 if (ndr_get_array_length(ndr
, &r
->inf_path
) > ndr_get_array_size(ndr
, &r
->inf_path
)) {
10474 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
));
10476 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->inf_path
), sizeof(uint16_t)));
10477 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->inf_path
, ndr_get_array_length(ndr
, &r
->inf_path
), sizeof(uint16_t), CH_UTF16
));
10478 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_inf_path_0
, 0);
10480 if (r
->core_driver_dependencies
) {
10481 _mem_save_core_driver_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10482 NDR_PULL_SET_MEM_CTX(ndr
, r
->core_driver_dependencies
, 0);
10483 NDR_CHECK(ndr_pull_spoolss_StringArray(ndr
, NDR_SCALARS
, r
->core_driver_dependencies
));
10484 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_core_driver_dependencies_0
, 0);
10487 return NDR_ERR_SUCCESS
;
10490 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo8(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfo8
*r
)
10492 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfo8");
10494 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
10495 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
10497 if (r
->driver_name
) {
10498 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
10501 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
10503 if (r
->architecture
) {
10504 ndr_print_string(ndr
, "architecture", r
->architecture
);
10507 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
10509 if (r
->driver_path
) {
10510 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
10513 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
10515 if (r
->data_file
) {
10516 ndr_print_string(ndr
, "data_file", r
->data_file
);
10519 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
10521 if (r
->config_file
) {
10522 ndr_print_string(ndr
, "config_file", r
->config_file
);
10525 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
10527 if (r
->help_file
) {
10528 ndr_print_string(ndr
, "help_file", r
->help_file
);
10531 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
10533 if (r
->monitor_name
) {
10534 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
10537 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
10539 if (r
->default_datatype
) {
10540 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
10543 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
);
10544 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
10546 if (r
->dependent_files
) {
10547 ndr_print_spoolss_StringArray(ndr
, "dependent_files", r
->dependent_files
);
10550 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
);
10551 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
10553 if (r
->previous_names
) {
10554 ndr_print_spoolss_StringArray(ndr
, "previous_names", r
->previous_names
);
10557 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
10558 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
10559 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
10561 if (r
->manufacturer_name
) {
10562 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
10565 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
10567 if (r
->manufacturer_url
) {
10568 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
10571 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
10573 if (r
->hardware_id
) {
10574 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
10577 ndr_print_ptr(ndr
, "provider", r
->provider
);
10580 ndr_print_string(ndr
, "provider", r
->provider
);
10583 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
10585 if (r
->print_processor
) {
10586 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
10589 ndr_print_ptr(ndr
, "vendor_setup", r
->vendor_setup
);
10591 if (r
->vendor_setup
) {
10592 ndr_print_string(ndr
, "vendor_setup", r
->vendor_setup
);
10595 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
);
10596 ndr_print_ptr(ndr
, "color_profiles", r
->color_profiles
);
10598 if (r
->color_profiles
) {
10599 ndr_print_spoolss_StringArray(ndr
, "color_profiles", r
->color_profiles
);
10602 ndr_print_ptr(ndr
, "inf_path", r
->inf_path
);
10605 ndr_print_string(ndr
, "inf_path", r
->inf_path
);
10608 ndr_print_uint32(ndr
, "printer_driver_attributes", r
->printer_driver_attributes
);
10609 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
);
10610 ndr_print_ptr(ndr
, "core_driver_dependencies", r
->core_driver_dependencies
);
10612 if (r
->core_driver_dependencies
) {
10613 ndr_print_spoolss_StringArray(ndr
, "core_driver_dependencies", r
->core_driver_dependencies
);
10616 ndr_print_NTTIME(ndr
, "min_inbox_driver_ver_date", r
->min_inbox_driver_ver_date
);
10617 ndr_print_hyper(ndr
, "min_inbox_driver_ver_version", r
->min_inbox_driver_ver_version
);
10621 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_AddDriverInfo
*r
)
10623 if (ndr_flags
& NDR_SCALARS
) {
10624 int level
= ndr_push_get_switch_value(ndr
, r
);
10625 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
10626 NDR_CHECK(ndr_push_union_align(ndr
, 5));
10629 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
10633 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
10637 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info3
));
10641 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info4
));
10645 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info6
));
10649 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info8
));
10653 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
10656 if (ndr_flags
& NDR_BUFFERS
) {
10657 int level
= ndr_push_get_switch_value(ndr
, r
);
10661 NDR_CHECK(ndr_push_spoolss_AddDriverInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
10667 NDR_CHECK(ndr_push_spoolss_AddDriverInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
10673 NDR_CHECK(ndr_push_spoolss_AddDriverInfo3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
10679 NDR_CHECK(ndr_push_spoolss_AddDriverInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
10685 NDR_CHECK(ndr_push_spoolss_AddDriverInfo6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
10691 NDR_CHECK(ndr_push_spoolss_AddDriverInfo8(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info8
));
10696 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
10699 return NDR_ERR_SUCCESS
;
10702 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_AddDriverInfo
*r
)
10706 TALLOC_CTX
*_mem_save_info1_0
;
10707 TALLOC_CTX
*_mem_save_info2_0
;
10708 TALLOC_CTX
*_mem_save_info3_0
;
10709 TALLOC_CTX
*_mem_save_info4_0
;
10710 TALLOC_CTX
*_mem_save_info6_0
;
10711 TALLOC_CTX
*_mem_save_info8_0
;
10712 level
= ndr_pull_get_switch_value(ndr
, r
);
10713 if (ndr_flags
& NDR_SCALARS
) {
10714 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
10715 if (_level
!= level
) {
10716 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
10718 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
10721 uint32_t _ptr_info1
;
10722 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
10724 NDR_PULL_ALLOC(ndr
, r
->info1
);
10731 uint32_t _ptr_info2
;
10732 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
10734 NDR_PULL_ALLOC(ndr
, r
->info2
);
10741 uint32_t _ptr_info3
;
10742 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info3
));
10744 NDR_PULL_ALLOC(ndr
, r
->info3
);
10751 uint32_t _ptr_info4
;
10752 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info4
));
10754 NDR_PULL_ALLOC(ndr
, r
->info4
);
10761 uint32_t _ptr_info6
;
10762 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info6
));
10764 NDR_PULL_ALLOC(ndr
, r
->info6
);
10771 uint32_t _ptr_info8
;
10772 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info8
));
10774 NDR_PULL_ALLOC(ndr
, r
->info8
);
10781 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
10784 if (ndr_flags
& NDR_BUFFERS
) {
10788 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10789 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
10790 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
10791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
10797 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10798 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
10799 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
10800 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
10806 _mem_save_info3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10807 NDR_PULL_SET_MEM_CTX(ndr
, r
->info3
, 0);
10808 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info3
));
10809 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info3_0
, 0);
10815 _mem_save_info4_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10816 NDR_PULL_SET_MEM_CTX(ndr
, r
->info4
, 0);
10817 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo4(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info4
));
10818 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info4_0
, 0);
10824 _mem_save_info6_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10825 NDR_PULL_SET_MEM_CTX(ndr
, r
->info6
, 0);
10826 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo6(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info6
));
10827 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info6_0
, 0);
10833 _mem_save_info8_0
= NDR_PULL_GET_MEM_CTX(ndr
);
10834 NDR_PULL_SET_MEM_CTX(ndr
, r
->info8
, 0);
10835 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo8(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info8
));
10836 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info8_0
, 0);
10841 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
10844 return NDR_ERR_SUCCESS
;
10847 _PUBLIC_
void ndr_print_spoolss_AddDriverInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_AddDriverInfo
*r
)
10850 level
= ndr_print_get_switch_value(ndr
, r
);
10851 ndr_print_union(ndr
, name
, level
, "spoolss_AddDriverInfo");
10854 ndr_print_ptr(ndr
, "info1", r
->info1
);
10857 ndr_print_spoolss_AddDriverInfo1(ndr
, "info1", r
->info1
);
10863 ndr_print_ptr(ndr
, "info2", r
->info2
);
10866 ndr_print_spoolss_AddDriverInfo2(ndr
, "info2", r
->info2
);
10872 ndr_print_ptr(ndr
, "info3", r
->info3
);
10875 ndr_print_spoolss_AddDriverInfo3(ndr
, "info3", r
->info3
);
10881 ndr_print_ptr(ndr
, "info4", r
->info4
);
10884 ndr_print_spoolss_AddDriverInfo4(ndr
, "info4", r
->info4
);
10890 ndr_print_ptr(ndr
, "info6", r
->info6
);
10893 ndr_print_spoolss_AddDriverInfo6(ndr
, "info6", r
->info6
);
10899 ndr_print_ptr(ndr
, "info8", r
->info8
);
10902 ndr_print_spoolss_AddDriverInfo8(ndr
, "info8", r
->info8
);
10908 ndr_print_bad_level(ndr
, name
, level
);
10912 static enum ndr_err_code
ndr_push_spoolss_AddDriverInfoCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddDriverInfoCtr
*r
)
10914 if (ndr_flags
& NDR_SCALARS
) {
10915 NDR_CHECK(ndr_push_align(ndr
, 5));
10916 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
10917 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->info
, r
->level
));
10918 NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr
, NDR_SCALARS
, &r
->info
));
10919 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
10921 if (ndr_flags
& NDR_BUFFERS
) {
10922 NDR_CHECK(ndr_push_spoolss_AddDriverInfo(ndr
, NDR_BUFFERS
, &r
->info
));
10924 return NDR_ERR_SUCCESS
;
10927 static enum ndr_err_code
ndr_pull_spoolss_AddDriverInfoCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddDriverInfoCtr
*r
)
10929 if (ndr_flags
& NDR_SCALARS
) {
10930 NDR_CHECK(ndr_pull_align(ndr
, 5));
10931 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
10932 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->info
, r
->level
));
10933 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr
, NDR_SCALARS
, &r
->info
));
10934 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
10936 if (ndr_flags
& NDR_BUFFERS
) {
10937 NDR_CHECK(ndr_pull_spoolss_AddDriverInfo(ndr
, NDR_BUFFERS
, &r
->info
));
10939 return NDR_ERR_SUCCESS
;
10942 _PUBLIC_
void ndr_print_spoolss_AddDriverInfoCtr(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddDriverInfoCtr
*r
)
10944 ndr_print_struct(ndr
, name
, "spoolss_AddDriverInfoCtr");
10946 ndr_print_uint32(ndr
, "level", r
->level
);
10947 ndr_print_set_switch_value(ndr
, &r
->info
, r
->level
);
10948 ndr_print_spoolss_AddDriverInfo(ndr
, "info", &r
->info
);
10952 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo1
*r
)
10954 if (ndr_flags
& NDR_SCALARS
) {
10955 NDR_CHECK(ndr_push_align(ndr
, 5));
10957 uint32_t _flags_save_string
= ndr
->flags
;
10958 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10959 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
10960 ndr
->flags
= _flags_save_string
;
10962 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
10964 if (ndr_flags
& NDR_BUFFERS
) {
10966 uint32_t _flags_save_string
= ndr
->flags
;
10967 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10968 if (r
->driver_name
) {
10969 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
10970 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
10971 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
10973 ndr
->flags
= _flags_save_string
;
10976 return NDR_ERR_SUCCESS
;
10979 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo1
*r
)
10981 uint32_t _ptr_driver_name
;
10982 TALLOC_CTX
*_mem_save_driver_name_0
;
10983 if (ndr_flags
& NDR_SCALARS
) {
10984 NDR_CHECK(ndr_pull_align(ndr
, 5));
10986 uint32_t _flags_save_string
= ndr
->flags
;
10987 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
10988 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
10989 if (_ptr_driver_name
) {
10990 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
10991 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
10993 r
->driver_name
= NULL
;
10995 ndr
->flags
= _flags_save_string
;
10997 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
10999 if (ndr_flags
& NDR_BUFFERS
) {
11001 uint32_t _flags_save_string
= ndr
->flags
;
11002 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11003 if (r
->driver_name
) {
11004 uint32_t _relative_save_offset
;
11005 _relative_save_offset
= ndr
->offset
;
11006 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
11007 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11008 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
11009 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
11010 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
11011 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11012 ndr
->relative_highest_offset
= ndr
->offset
;
11014 ndr
->offset
= _relative_save_offset
;
11016 ndr
->flags
= _flags_save_string
;
11019 return NDR_ERR_SUCCESS
;
11022 _PUBLIC_
void ndr_print_spoolss_DriverInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo1
*r
)
11024 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo1");
11026 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
11028 if (r
->driver_name
) {
11029 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
11035 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo1(const struct spoolss_DriverInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
11037 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo1
, ic
);
11040 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo2
*r
)
11042 if (ndr_flags
& NDR_SCALARS
) {
11043 NDR_CHECK(ndr_push_align(ndr
, 5));
11044 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
11046 uint32_t _flags_save_string
= ndr
->flags
;
11047 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11048 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
11049 ndr
->flags
= _flags_save_string
;
11052 uint32_t _flags_save_string
= ndr
->flags
;
11053 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11054 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
11055 ndr
->flags
= _flags_save_string
;
11058 uint32_t _flags_save_string
= ndr
->flags
;
11059 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11060 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
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 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
11067 ndr
->flags
= _flags_save_string
;
11070 uint32_t _flags_save_string
= ndr
->flags
;
11071 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11072 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
11073 ndr
->flags
= _flags_save_string
;
11075 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
11077 if (ndr_flags
& NDR_BUFFERS
) {
11079 uint32_t _flags_save_string
= ndr
->flags
;
11080 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11081 if (r
->driver_name
) {
11082 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
11083 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
11084 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
11086 ndr
->flags
= _flags_save_string
;
11089 uint32_t _flags_save_string
= ndr
->flags
;
11090 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11091 if (r
->architecture
) {
11092 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->architecture
));
11093 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
11094 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->architecture
));
11096 ndr
->flags
= _flags_save_string
;
11099 uint32_t _flags_save_string
= ndr
->flags
;
11100 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11101 if (r
->driver_path
) {
11102 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_path
));
11103 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
11104 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_path
));
11106 ndr
->flags
= _flags_save_string
;
11109 uint32_t _flags_save_string
= ndr
->flags
;
11110 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11111 if (r
->data_file
) {
11112 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_file
));
11113 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
11114 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_file
));
11116 ndr
->flags
= _flags_save_string
;
11119 uint32_t _flags_save_string
= ndr
->flags
;
11120 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11121 if (r
->config_file
) {
11122 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->config_file
));
11123 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
11124 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->config_file
));
11126 ndr
->flags
= _flags_save_string
;
11129 return NDR_ERR_SUCCESS
;
11132 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo2
*r
)
11134 uint32_t _ptr_driver_name
;
11135 TALLOC_CTX
*_mem_save_driver_name_0
;
11136 uint32_t _ptr_architecture
;
11137 TALLOC_CTX
*_mem_save_architecture_0
;
11138 uint32_t _ptr_driver_path
;
11139 TALLOC_CTX
*_mem_save_driver_path_0
;
11140 uint32_t _ptr_data_file
;
11141 TALLOC_CTX
*_mem_save_data_file_0
;
11142 uint32_t _ptr_config_file
;
11143 TALLOC_CTX
*_mem_save_config_file_0
;
11144 if (ndr_flags
& NDR_SCALARS
) {
11145 NDR_CHECK(ndr_pull_align(ndr
, 5));
11146 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
11148 uint32_t _flags_save_string
= ndr
->flags
;
11149 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11150 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
11151 if (_ptr_driver_name
) {
11152 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
11153 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
11155 r
->driver_name
= NULL
;
11157 ndr
->flags
= _flags_save_string
;
11160 uint32_t _flags_save_string
= ndr
->flags
;
11161 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11162 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
11163 if (_ptr_architecture
) {
11164 NDR_PULL_ALLOC(ndr
, r
->architecture
);
11165 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
11167 r
->architecture
= NULL
;
11169 ndr
->flags
= _flags_save_string
;
11172 uint32_t _flags_save_string
= ndr
->flags
;
11173 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11174 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
11175 if (_ptr_driver_path
) {
11176 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
11177 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
11179 r
->driver_path
= NULL
;
11181 ndr
->flags
= _flags_save_string
;
11184 uint32_t _flags_save_string
= ndr
->flags
;
11185 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11186 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
11187 if (_ptr_data_file
) {
11188 NDR_PULL_ALLOC(ndr
, r
->data_file
);
11189 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
11191 r
->data_file
= NULL
;
11193 ndr
->flags
= _flags_save_string
;
11196 uint32_t _flags_save_string
= ndr
->flags
;
11197 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11198 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
11199 if (_ptr_config_file
) {
11200 NDR_PULL_ALLOC(ndr
, r
->config_file
);
11201 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
11203 r
->config_file
= NULL
;
11205 ndr
->flags
= _flags_save_string
;
11207 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
11209 if (ndr_flags
& NDR_BUFFERS
) {
11211 uint32_t _flags_save_string
= ndr
->flags
;
11212 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11213 if (r
->driver_name
) {
11214 uint32_t _relative_save_offset
;
11215 _relative_save_offset
= ndr
->offset
;
11216 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
11217 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11218 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
11219 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
11220 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
11221 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11222 ndr
->relative_highest_offset
= ndr
->offset
;
11224 ndr
->offset
= _relative_save_offset
;
11226 ndr
->flags
= _flags_save_string
;
11229 uint32_t _flags_save_string
= ndr
->flags
;
11230 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11231 if (r
->architecture
) {
11232 uint32_t _relative_save_offset
;
11233 _relative_save_offset
= ndr
->offset
;
11234 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
11235 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11236 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
11237 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
11238 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
11239 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11240 ndr
->relative_highest_offset
= ndr
->offset
;
11242 ndr
->offset
= _relative_save_offset
;
11244 ndr
->flags
= _flags_save_string
;
11247 uint32_t _flags_save_string
= ndr
->flags
;
11248 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11249 if (r
->driver_path
) {
11250 uint32_t _relative_save_offset
;
11251 _relative_save_offset
= ndr
->offset
;
11252 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
11253 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11254 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
11255 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
11256 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
11257 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11258 ndr
->relative_highest_offset
= ndr
->offset
;
11260 ndr
->offset
= _relative_save_offset
;
11262 ndr
->flags
= _flags_save_string
;
11265 uint32_t _flags_save_string
= ndr
->flags
;
11266 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11267 if (r
->data_file
) {
11268 uint32_t _relative_save_offset
;
11269 _relative_save_offset
= ndr
->offset
;
11270 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
11271 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11272 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
11273 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
11274 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
11275 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11276 ndr
->relative_highest_offset
= ndr
->offset
;
11278 ndr
->offset
= _relative_save_offset
;
11280 ndr
->flags
= _flags_save_string
;
11283 uint32_t _flags_save_string
= ndr
->flags
;
11284 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11285 if (r
->config_file
) {
11286 uint32_t _relative_save_offset
;
11287 _relative_save_offset
= ndr
->offset
;
11288 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
11289 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11290 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
11291 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
11292 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
11293 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11294 ndr
->relative_highest_offset
= ndr
->offset
;
11296 ndr
->offset
= _relative_save_offset
;
11298 ndr
->flags
= _flags_save_string
;
11301 return NDR_ERR_SUCCESS
;
11304 _PUBLIC_
void ndr_print_spoolss_DriverInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo2
*r
)
11306 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo2");
11308 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
11309 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
11311 if (r
->driver_name
) {
11312 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
11315 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
11317 if (r
->architecture
) {
11318 ndr_print_string(ndr
, "architecture", r
->architecture
);
11321 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
11323 if (r
->driver_path
) {
11324 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
11327 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
11329 if (r
->data_file
) {
11330 ndr_print_string(ndr
, "data_file", r
->data_file
);
11333 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
11335 if (r
->config_file
) {
11336 ndr_print_string(ndr
, "config_file", r
->config_file
);
11342 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo2(const struct spoolss_DriverInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
11344 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo2
, ic
);
11347 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo3
*r
)
11349 if (ndr_flags
& NDR_SCALARS
) {
11350 NDR_CHECK(ndr_push_align(ndr
, 5));
11351 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
11353 uint32_t _flags_save_string
= ndr
->flags
;
11354 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11355 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
11356 ndr
->flags
= _flags_save_string
;
11359 uint32_t _flags_save_string
= ndr
->flags
;
11360 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11361 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
11362 ndr
->flags
= _flags_save_string
;
11365 uint32_t _flags_save_string
= ndr
->flags
;
11366 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11367 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
11368 ndr
->flags
= _flags_save_string
;
11371 uint32_t _flags_save_string
= ndr
->flags
;
11372 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11373 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
11374 ndr
->flags
= _flags_save_string
;
11377 uint32_t _flags_save_string
= ndr
->flags
;
11378 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11379 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
11380 ndr
->flags
= _flags_save_string
;
11383 uint32_t _flags_save_string
= ndr
->flags
;
11384 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11385 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->help_file
));
11386 ndr
->flags
= _flags_save_string
;
11389 uint32_t _flags_save_string_array
= ndr
->flags
;
11390 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11391 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dependent_files
));
11392 ndr
->flags
= _flags_save_string_array
;
11395 uint32_t _flags_save_string
= ndr
->flags
;
11396 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11397 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
11398 ndr
->flags
= _flags_save_string
;
11401 uint32_t _flags_save_string
= ndr
->flags
;
11402 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11403 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->default_datatype
));
11404 ndr
->flags
= _flags_save_string
;
11406 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
11408 if (ndr_flags
& NDR_BUFFERS
) {
11410 uint32_t _flags_save_string
= ndr
->flags
;
11411 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11412 if (r
->driver_name
) {
11413 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
11414 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
11415 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
11417 ndr
->flags
= _flags_save_string
;
11420 uint32_t _flags_save_string
= ndr
->flags
;
11421 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11422 if (r
->architecture
) {
11423 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->architecture
));
11424 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
11425 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->architecture
));
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
->driver_path
) {
11433 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_path
));
11434 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
11435 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_path
));
11437 ndr
->flags
= _flags_save_string
;
11440 uint32_t _flags_save_string
= ndr
->flags
;
11441 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11442 if (r
->data_file
) {
11443 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_file
));
11444 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
11445 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_file
));
11447 ndr
->flags
= _flags_save_string
;
11450 uint32_t _flags_save_string
= ndr
->flags
;
11451 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11452 if (r
->config_file
) {
11453 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->config_file
));
11454 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
11455 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->config_file
));
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
->help_file
) {
11463 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->help_file
));
11464 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->help_file
));
11465 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->help_file
));
11467 ndr
->flags
= _flags_save_string
;
11470 uint32_t _flags_save_string_array
= ndr
->flags
;
11471 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11472 if (r
->dependent_files
) {
11473 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->dependent_files
));
11474 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->dependent_files
));
11475 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->dependent_files
));
11477 ndr
->flags
= _flags_save_string_array
;
11480 uint32_t _flags_save_string
= ndr
->flags
;
11481 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11482 if (r
->monitor_name
) {
11483 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->monitor_name
));
11484 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
11485 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->monitor_name
));
11487 ndr
->flags
= _flags_save_string
;
11490 uint32_t _flags_save_string
= ndr
->flags
;
11491 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11492 if (r
->default_datatype
) {
11493 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->default_datatype
));
11494 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->default_datatype
));
11495 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->default_datatype
));
11497 ndr
->flags
= _flags_save_string
;
11500 return NDR_ERR_SUCCESS
;
11503 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo3
*r
)
11505 uint32_t _ptr_driver_name
;
11506 TALLOC_CTX
*_mem_save_driver_name_0
;
11507 uint32_t _ptr_architecture
;
11508 TALLOC_CTX
*_mem_save_architecture_0
;
11509 uint32_t _ptr_driver_path
;
11510 TALLOC_CTX
*_mem_save_driver_path_0
;
11511 uint32_t _ptr_data_file
;
11512 TALLOC_CTX
*_mem_save_data_file_0
;
11513 uint32_t _ptr_config_file
;
11514 TALLOC_CTX
*_mem_save_config_file_0
;
11515 uint32_t _ptr_help_file
;
11516 TALLOC_CTX
*_mem_save_help_file_0
;
11517 uint32_t _ptr_dependent_files
;
11518 TALLOC_CTX
*_mem_save_dependent_files_0
;
11519 uint32_t _ptr_monitor_name
;
11520 TALLOC_CTX
*_mem_save_monitor_name_0
;
11521 uint32_t _ptr_default_datatype
;
11522 TALLOC_CTX
*_mem_save_default_datatype_0
;
11523 if (ndr_flags
& NDR_SCALARS
) {
11524 NDR_CHECK(ndr_pull_align(ndr
, 5));
11525 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
11527 uint32_t _flags_save_string
= ndr
->flags
;
11528 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11529 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
11530 if (_ptr_driver_name
) {
11531 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
11532 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
11534 r
->driver_name
= NULL
;
11536 ndr
->flags
= _flags_save_string
;
11539 uint32_t _flags_save_string
= ndr
->flags
;
11540 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11541 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
11542 if (_ptr_architecture
) {
11543 NDR_PULL_ALLOC(ndr
, r
->architecture
);
11544 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
11546 r
->architecture
= NULL
;
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_pull_generic_ptr(ndr
, &_ptr_driver_path
));
11554 if (_ptr_driver_path
) {
11555 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
11556 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
11558 r
->driver_path
= NULL
;
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_pull_generic_ptr(ndr
, &_ptr_data_file
));
11566 if (_ptr_data_file
) {
11567 NDR_PULL_ALLOC(ndr
, r
->data_file
);
11568 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
11570 r
->data_file
= NULL
;
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_pull_generic_ptr(ndr
, &_ptr_config_file
));
11578 if (_ptr_config_file
) {
11579 NDR_PULL_ALLOC(ndr
, r
->config_file
);
11580 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
11582 r
->config_file
= NULL
;
11584 ndr
->flags
= _flags_save_string
;
11587 uint32_t _flags_save_string
= ndr
->flags
;
11588 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11589 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
11590 if (_ptr_help_file
) {
11591 NDR_PULL_ALLOC(ndr
, r
->help_file
);
11592 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->help_file
, _ptr_help_file
));
11594 r
->help_file
= NULL
;
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_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
11602 if (_ptr_dependent_files
) {
11603 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
11604 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dependent_files
, _ptr_dependent_files
));
11606 r
->dependent_files
= NULL
;
11608 ndr
->flags
= _flags_save_string_array
;
11611 uint32_t _flags_save_string
= ndr
->flags
;
11612 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11613 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
11614 if (_ptr_monitor_name
) {
11615 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
11616 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
11618 r
->monitor_name
= NULL
;
11620 ndr
->flags
= _flags_save_string
;
11623 uint32_t _flags_save_string
= ndr
->flags
;
11624 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11625 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
11626 if (_ptr_default_datatype
) {
11627 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
11628 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->default_datatype
, _ptr_default_datatype
));
11630 r
->default_datatype
= NULL
;
11632 ndr
->flags
= _flags_save_string
;
11634 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
11636 if (ndr_flags
& NDR_BUFFERS
) {
11638 uint32_t _flags_save_string
= ndr
->flags
;
11639 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11640 if (r
->driver_name
) {
11641 uint32_t _relative_save_offset
;
11642 _relative_save_offset
= ndr
->offset
;
11643 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
11644 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11645 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
11646 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
11647 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
11648 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11649 ndr
->relative_highest_offset
= ndr
->offset
;
11651 ndr
->offset
= _relative_save_offset
;
11653 ndr
->flags
= _flags_save_string
;
11656 uint32_t _flags_save_string
= ndr
->flags
;
11657 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11658 if (r
->architecture
) {
11659 uint32_t _relative_save_offset
;
11660 _relative_save_offset
= ndr
->offset
;
11661 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
11662 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11663 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
11664 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
11665 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
11666 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11667 ndr
->relative_highest_offset
= ndr
->offset
;
11669 ndr
->offset
= _relative_save_offset
;
11671 ndr
->flags
= _flags_save_string
;
11674 uint32_t _flags_save_string
= ndr
->flags
;
11675 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11676 if (r
->driver_path
) {
11677 uint32_t _relative_save_offset
;
11678 _relative_save_offset
= ndr
->offset
;
11679 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
11680 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11681 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
11682 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
11683 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
11684 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11685 ndr
->relative_highest_offset
= ndr
->offset
;
11687 ndr
->offset
= _relative_save_offset
;
11689 ndr
->flags
= _flags_save_string
;
11692 uint32_t _flags_save_string
= ndr
->flags
;
11693 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11694 if (r
->data_file
) {
11695 uint32_t _relative_save_offset
;
11696 _relative_save_offset
= ndr
->offset
;
11697 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
11698 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11699 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
11700 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
11701 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
11702 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11703 ndr
->relative_highest_offset
= ndr
->offset
;
11705 ndr
->offset
= _relative_save_offset
;
11707 ndr
->flags
= _flags_save_string
;
11710 uint32_t _flags_save_string
= ndr
->flags
;
11711 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11712 if (r
->config_file
) {
11713 uint32_t _relative_save_offset
;
11714 _relative_save_offset
= ndr
->offset
;
11715 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
11716 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11717 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
11718 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
11719 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
11720 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11721 ndr
->relative_highest_offset
= ndr
->offset
;
11723 ndr
->offset
= _relative_save_offset
;
11725 ndr
->flags
= _flags_save_string
;
11728 uint32_t _flags_save_string
= ndr
->flags
;
11729 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11730 if (r
->help_file
) {
11731 uint32_t _relative_save_offset
;
11732 _relative_save_offset
= ndr
->offset
;
11733 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->help_file
));
11734 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11735 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
11736 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->help_file
));
11737 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
11738 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11739 ndr
->relative_highest_offset
= ndr
->offset
;
11741 ndr
->offset
= _relative_save_offset
;
11743 ndr
->flags
= _flags_save_string
;
11746 uint32_t _flags_save_string_array
= ndr
->flags
;
11747 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11748 if (r
->dependent_files
) {
11749 uint32_t _relative_save_offset
;
11750 _relative_save_offset
= ndr
->offset
;
11751 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dependent_files
));
11752 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11753 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
11754 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->dependent_files
));
11755 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
11756 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11757 ndr
->relative_highest_offset
= ndr
->offset
;
11759 ndr
->offset
= _relative_save_offset
;
11761 ndr
->flags
= _flags_save_string_array
;
11764 uint32_t _flags_save_string
= ndr
->flags
;
11765 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11766 if (r
->monitor_name
) {
11767 uint32_t _relative_save_offset
;
11768 _relative_save_offset
= ndr
->offset
;
11769 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
11770 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11771 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
11772 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
11773 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
11774 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11775 ndr
->relative_highest_offset
= ndr
->offset
;
11777 ndr
->offset
= _relative_save_offset
;
11779 ndr
->flags
= _flags_save_string
;
11782 uint32_t _flags_save_string
= ndr
->flags
;
11783 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11784 if (r
->default_datatype
) {
11785 uint32_t _relative_save_offset
;
11786 _relative_save_offset
= ndr
->offset
;
11787 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->default_datatype
));
11788 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
11789 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
11790 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->default_datatype
));
11791 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
11792 if (ndr
->offset
> ndr
->relative_highest_offset
) {
11793 ndr
->relative_highest_offset
= ndr
->offset
;
11795 ndr
->offset
= _relative_save_offset
;
11797 ndr
->flags
= _flags_save_string
;
11800 return NDR_ERR_SUCCESS
;
11803 _PUBLIC_
void ndr_print_spoolss_DriverInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo3
*r
)
11805 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo3");
11807 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
11808 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
11810 if (r
->driver_name
) {
11811 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
11814 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
11816 if (r
->architecture
) {
11817 ndr_print_string(ndr
, "architecture", r
->architecture
);
11820 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
11822 if (r
->driver_path
) {
11823 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
11826 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
11828 if (r
->data_file
) {
11829 ndr_print_string(ndr
, "data_file", r
->data_file
);
11832 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
11834 if (r
->config_file
) {
11835 ndr_print_string(ndr
, "config_file", r
->config_file
);
11838 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
11840 if (r
->help_file
) {
11841 ndr_print_string(ndr
, "help_file", r
->help_file
);
11844 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
11846 if (r
->dependent_files
) {
11847 ndr_print_string_array(ndr
, "dependent_files", r
->dependent_files
);
11850 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
11852 if (r
->monitor_name
) {
11853 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
11856 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
11858 if (r
->default_datatype
) {
11859 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
11865 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo3(const struct spoolss_DriverInfo3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
11867 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo3
, ic
);
11870 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo4(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo4
*r
)
11872 if (ndr_flags
& NDR_SCALARS
) {
11873 NDR_CHECK(ndr_push_align(ndr
, 5));
11874 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
11876 uint32_t _flags_save_string
= ndr
->flags
;
11877 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11878 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
11879 ndr
->flags
= _flags_save_string
;
11882 uint32_t _flags_save_string
= ndr
->flags
;
11883 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11884 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
11885 ndr
->flags
= _flags_save_string
;
11888 uint32_t _flags_save_string
= ndr
->flags
;
11889 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11890 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
11891 ndr
->flags
= _flags_save_string
;
11894 uint32_t _flags_save_string
= ndr
->flags
;
11895 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11896 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
11897 ndr
->flags
= _flags_save_string
;
11900 uint32_t _flags_save_string
= ndr
->flags
;
11901 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11902 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
11903 ndr
->flags
= _flags_save_string
;
11906 uint32_t _flags_save_string
= ndr
->flags
;
11907 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11908 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->help_file
));
11909 ndr
->flags
= _flags_save_string
;
11912 uint32_t _flags_save_string_array
= ndr
->flags
;
11913 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11914 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dependent_files
));
11915 ndr
->flags
= _flags_save_string_array
;
11918 uint32_t _flags_save_string
= ndr
->flags
;
11919 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11920 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
11921 ndr
->flags
= _flags_save_string
;
11924 uint32_t _flags_save_string
= ndr
->flags
;
11925 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11926 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->default_datatype
));
11927 ndr
->flags
= _flags_save_string
;
11930 uint32_t _flags_save_string_array
= ndr
->flags
;
11931 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11932 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->previous_names
));
11933 ndr
->flags
= _flags_save_string_array
;
11935 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
11937 if (ndr_flags
& NDR_BUFFERS
) {
11939 uint32_t _flags_save_string
= ndr
->flags
;
11940 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11941 if (r
->driver_name
) {
11942 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
11943 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
11944 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
11946 ndr
->flags
= _flags_save_string
;
11949 uint32_t _flags_save_string
= ndr
->flags
;
11950 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11951 if (r
->architecture
) {
11952 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->architecture
));
11953 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
11954 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->architecture
));
11956 ndr
->flags
= _flags_save_string
;
11959 uint32_t _flags_save_string
= ndr
->flags
;
11960 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11961 if (r
->driver_path
) {
11962 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_path
));
11963 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
11964 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_path
));
11966 ndr
->flags
= _flags_save_string
;
11969 uint32_t _flags_save_string
= ndr
->flags
;
11970 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11971 if (r
->data_file
) {
11972 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_file
));
11973 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
11974 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_file
));
11976 ndr
->flags
= _flags_save_string
;
11979 uint32_t _flags_save_string
= ndr
->flags
;
11980 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11981 if (r
->config_file
) {
11982 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->config_file
));
11983 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
11984 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->config_file
));
11986 ndr
->flags
= _flags_save_string
;
11989 uint32_t _flags_save_string
= ndr
->flags
;
11990 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
11991 if (r
->help_file
) {
11992 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->help_file
));
11993 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->help_file
));
11994 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->help_file
));
11996 ndr
->flags
= _flags_save_string
;
11999 uint32_t _flags_save_string_array
= ndr
->flags
;
12000 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12001 if (r
->dependent_files
) {
12002 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->dependent_files
));
12003 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->dependent_files
));
12004 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->dependent_files
));
12006 ndr
->flags
= _flags_save_string_array
;
12009 uint32_t _flags_save_string
= ndr
->flags
;
12010 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12011 if (r
->monitor_name
) {
12012 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->monitor_name
));
12013 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
12014 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->monitor_name
));
12016 ndr
->flags
= _flags_save_string
;
12019 uint32_t _flags_save_string
= ndr
->flags
;
12020 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12021 if (r
->default_datatype
) {
12022 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->default_datatype
));
12023 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->default_datatype
));
12024 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->default_datatype
));
12026 ndr
->flags
= _flags_save_string
;
12029 uint32_t _flags_save_string_array
= ndr
->flags
;
12030 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12031 if (r
->previous_names
) {
12032 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->previous_names
));
12033 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->previous_names
));
12034 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->previous_names
));
12036 ndr
->flags
= _flags_save_string_array
;
12039 return NDR_ERR_SUCCESS
;
12042 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo4(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo4
*r
)
12044 uint32_t _ptr_driver_name
;
12045 TALLOC_CTX
*_mem_save_driver_name_0
;
12046 uint32_t _ptr_architecture
;
12047 TALLOC_CTX
*_mem_save_architecture_0
;
12048 uint32_t _ptr_driver_path
;
12049 TALLOC_CTX
*_mem_save_driver_path_0
;
12050 uint32_t _ptr_data_file
;
12051 TALLOC_CTX
*_mem_save_data_file_0
;
12052 uint32_t _ptr_config_file
;
12053 TALLOC_CTX
*_mem_save_config_file_0
;
12054 uint32_t _ptr_help_file
;
12055 TALLOC_CTX
*_mem_save_help_file_0
;
12056 uint32_t _ptr_dependent_files
;
12057 TALLOC_CTX
*_mem_save_dependent_files_0
;
12058 uint32_t _ptr_monitor_name
;
12059 TALLOC_CTX
*_mem_save_monitor_name_0
;
12060 uint32_t _ptr_default_datatype
;
12061 TALLOC_CTX
*_mem_save_default_datatype_0
;
12062 uint32_t _ptr_previous_names
;
12063 TALLOC_CTX
*_mem_save_previous_names_0
;
12064 if (ndr_flags
& NDR_SCALARS
) {
12065 NDR_CHECK(ndr_pull_align(ndr
, 5));
12066 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
12068 uint32_t _flags_save_string
= ndr
->flags
;
12069 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12070 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
12071 if (_ptr_driver_name
) {
12072 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
12073 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
12075 r
->driver_name
= NULL
;
12077 ndr
->flags
= _flags_save_string
;
12080 uint32_t _flags_save_string
= ndr
->flags
;
12081 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12082 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
12083 if (_ptr_architecture
) {
12084 NDR_PULL_ALLOC(ndr
, r
->architecture
);
12085 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
12087 r
->architecture
= NULL
;
12089 ndr
->flags
= _flags_save_string
;
12092 uint32_t _flags_save_string
= ndr
->flags
;
12093 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12094 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
12095 if (_ptr_driver_path
) {
12096 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
12097 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
12099 r
->driver_path
= NULL
;
12101 ndr
->flags
= _flags_save_string
;
12104 uint32_t _flags_save_string
= ndr
->flags
;
12105 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12106 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
12107 if (_ptr_data_file
) {
12108 NDR_PULL_ALLOC(ndr
, r
->data_file
);
12109 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
12111 r
->data_file
= NULL
;
12113 ndr
->flags
= _flags_save_string
;
12116 uint32_t _flags_save_string
= ndr
->flags
;
12117 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12118 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
12119 if (_ptr_config_file
) {
12120 NDR_PULL_ALLOC(ndr
, r
->config_file
);
12121 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
12123 r
->config_file
= NULL
;
12125 ndr
->flags
= _flags_save_string
;
12128 uint32_t _flags_save_string
= ndr
->flags
;
12129 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12130 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
12131 if (_ptr_help_file
) {
12132 NDR_PULL_ALLOC(ndr
, r
->help_file
);
12133 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->help_file
, _ptr_help_file
));
12135 r
->help_file
= NULL
;
12137 ndr
->flags
= _flags_save_string
;
12140 uint32_t _flags_save_string_array
= ndr
->flags
;
12141 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12142 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
12143 if (_ptr_dependent_files
) {
12144 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
12145 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dependent_files
, _ptr_dependent_files
));
12147 r
->dependent_files
= NULL
;
12149 ndr
->flags
= _flags_save_string_array
;
12152 uint32_t _flags_save_string
= ndr
->flags
;
12153 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12154 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
12155 if (_ptr_monitor_name
) {
12156 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
12157 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
12159 r
->monitor_name
= NULL
;
12161 ndr
->flags
= _flags_save_string
;
12164 uint32_t _flags_save_string
= ndr
->flags
;
12165 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12166 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
12167 if (_ptr_default_datatype
) {
12168 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
12169 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->default_datatype
, _ptr_default_datatype
));
12171 r
->default_datatype
= NULL
;
12173 ndr
->flags
= _flags_save_string
;
12176 uint32_t _flags_save_string_array
= ndr
->flags
;
12177 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12178 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
12179 if (_ptr_previous_names
) {
12180 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
12181 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->previous_names
, _ptr_previous_names
));
12183 r
->previous_names
= NULL
;
12185 ndr
->flags
= _flags_save_string_array
;
12187 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
12189 if (ndr_flags
& NDR_BUFFERS
) {
12191 uint32_t _flags_save_string
= ndr
->flags
;
12192 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12193 if (r
->driver_name
) {
12194 uint32_t _relative_save_offset
;
12195 _relative_save_offset
= ndr
->offset
;
12196 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
12197 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12198 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
12199 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
12200 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
12201 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12202 ndr
->relative_highest_offset
= ndr
->offset
;
12204 ndr
->offset
= _relative_save_offset
;
12206 ndr
->flags
= _flags_save_string
;
12209 uint32_t _flags_save_string
= ndr
->flags
;
12210 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12211 if (r
->architecture
) {
12212 uint32_t _relative_save_offset
;
12213 _relative_save_offset
= ndr
->offset
;
12214 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
12215 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12216 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
12217 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
12218 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
12219 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12220 ndr
->relative_highest_offset
= ndr
->offset
;
12222 ndr
->offset
= _relative_save_offset
;
12224 ndr
->flags
= _flags_save_string
;
12227 uint32_t _flags_save_string
= ndr
->flags
;
12228 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12229 if (r
->driver_path
) {
12230 uint32_t _relative_save_offset
;
12231 _relative_save_offset
= ndr
->offset
;
12232 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
12233 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12234 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
12235 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
12236 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
12237 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12238 ndr
->relative_highest_offset
= ndr
->offset
;
12240 ndr
->offset
= _relative_save_offset
;
12242 ndr
->flags
= _flags_save_string
;
12245 uint32_t _flags_save_string
= ndr
->flags
;
12246 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12247 if (r
->data_file
) {
12248 uint32_t _relative_save_offset
;
12249 _relative_save_offset
= ndr
->offset
;
12250 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
12251 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12252 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
12253 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
12254 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
12255 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12256 ndr
->relative_highest_offset
= ndr
->offset
;
12258 ndr
->offset
= _relative_save_offset
;
12260 ndr
->flags
= _flags_save_string
;
12263 uint32_t _flags_save_string
= ndr
->flags
;
12264 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12265 if (r
->config_file
) {
12266 uint32_t _relative_save_offset
;
12267 _relative_save_offset
= ndr
->offset
;
12268 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
12269 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12270 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
12271 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
12272 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
12273 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12274 ndr
->relative_highest_offset
= ndr
->offset
;
12276 ndr
->offset
= _relative_save_offset
;
12278 ndr
->flags
= _flags_save_string
;
12281 uint32_t _flags_save_string
= ndr
->flags
;
12282 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12283 if (r
->help_file
) {
12284 uint32_t _relative_save_offset
;
12285 _relative_save_offset
= ndr
->offset
;
12286 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->help_file
));
12287 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12288 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
12289 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->help_file
));
12290 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
12291 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12292 ndr
->relative_highest_offset
= ndr
->offset
;
12294 ndr
->offset
= _relative_save_offset
;
12296 ndr
->flags
= _flags_save_string
;
12299 uint32_t _flags_save_string_array
= ndr
->flags
;
12300 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12301 if (r
->dependent_files
) {
12302 uint32_t _relative_save_offset
;
12303 _relative_save_offset
= ndr
->offset
;
12304 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dependent_files
));
12305 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12306 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
12307 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->dependent_files
));
12308 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
12309 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12310 ndr
->relative_highest_offset
= ndr
->offset
;
12312 ndr
->offset
= _relative_save_offset
;
12314 ndr
->flags
= _flags_save_string_array
;
12317 uint32_t _flags_save_string
= ndr
->flags
;
12318 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12319 if (r
->monitor_name
) {
12320 uint32_t _relative_save_offset
;
12321 _relative_save_offset
= ndr
->offset
;
12322 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
12323 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12324 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
12325 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
12326 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
12327 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12328 ndr
->relative_highest_offset
= ndr
->offset
;
12330 ndr
->offset
= _relative_save_offset
;
12332 ndr
->flags
= _flags_save_string
;
12335 uint32_t _flags_save_string
= ndr
->flags
;
12336 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12337 if (r
->default_datatype
) {
12338 uint32_t _relative_save_offset
;
12339 _relative_save_offset
= ndr
->offset
;
12340 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->default_datatype
));
12341 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12342 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
12343 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->default_datatype
));
12344 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
12345 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12346 ndr
->relative_highest_offset
= ndr
->offset
;
12348 ndr
->offset
= _relative_save_offset
;
12350 ndr
->flags
= _flags_save_string
;
12353 uint32_t _flags_save_string_array
= ndr
->flags
;
12354 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12355 if (r
->previous_names
) {
12356 uint32_t _relative_save_offset
;
12357 _relative_save_offset
= ndr
->offset
;
12358 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->previous_names
));
12359 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12360 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
12361 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->previous_names
));
12362 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
12363 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12364 ndr
->relative_highest_offset
= ndr
->offset
;
12366 ndr
->offset
= _relative_save_offset
;
12368 ndr
->flags
= _flags_save_string_array
;
12371 return NDR_ERR_SUCCESS
;
12374 _PUBLIC_
void ndr_print_spoolss_DriverInfo4(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo4
*r
)
12376 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo4");
12378 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
12379 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
12381 if (r
->driver_name
) {
12382 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
12385 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
12387 if (r
->architecture
) {
12388 ndr_print_string(ndr
, "architecture", r
->architecture
);
12391 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
12393 if (r
->driver_path
) {
12394 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
12397 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
12399 if (r
->data_file
) {
12400 ndr_print_string(ndr
, "data_file", r
->data_file
);
12403 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
12405 if (r
->config_file
) {
12406 ndr_print_string(ndr
, "config_file", r
->config_file
);
12409 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
12411 if (r
->help_file
) {
12412 ndr_print_string(ndr
, "help_file", r
->help_file
);
12415 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
12417 if (r
->dependent_files
) {
12418 ndr_print_string_array(ndr
, "dependent_files", r
->dependent_files
);
12421 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
12423 if (r
->monitor_name
) {
12424 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
12427 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
12429 if (r
->default_datatype
) {
12430 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
12433 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
12435 if (r
->previous_names
) {
12436 ndr_print_string_array(ndr
, "previous_names", r
->previous_names
);
12442 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo4(const struct spoolss_DriverInfo4
*r
, struct smb_iconv_convenience
*ic
, int flags
)
12444 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo4
, ic
);
12447 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo5(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo5
*r
)
12449 if (ndr_flags
& NDR_SCALARS
) {
12450 NDR_CHECK(ndr_push_align(ndr
, 5));
12451 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
12453 uint32_t _flags_save_string
= ndr
->flags
;
12454 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12455 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
12456 ndr
->flags
= _flags_save_string
;
12459 uint32_t _flags_save_string
= ndr
->flags
;
12460 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12461 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
12462 ndr
->flags
= _flags_save_string
;
12465 uint32_t _flags_save_string
= ndr
->flags
;
12466 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12467 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
12468 ndr
->flags
= _flags_save_string
;
12471 uint32_t _flags_save_string
= ndr
->flags
;
12472 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12473 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
12474 ndr
->flags
= _flags_save_string
;
12477 uint32_t _flags_save_string
= ndr
->flags
;
12478 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12479 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
12480 ndr
->flags
= _flags_save_string
;
12482 NDR_CHECK(ndr_push_spoolss_DriverAttributes(ndr
, NDR_SCALARS
, r
->driver_attributes
));
12483 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->config_version
));
12484 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->driver_version
));
12485 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
12487 if (ndr_flags
& NDR_BUFFERS
) {
12489 uint32_t _flags_save_string
= ndr
->flags
;
12490 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12491 if (r
->driver_name
) {
12492 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
12493 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
12494 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
12496 ndr
->flags
= _flags_save_string
;
12499 uint32_t _flags_save_string
= ndr
->flags
;
12500 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12501 if (r
->architecture
) {
12502 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->architecture
));
12503 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
12504 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->architecture
));
12506 ndr
->flags
= _flags_save_string
;
12509 uint32_t _flags_save_string
= ndr
->flags
;
12510 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12511 if (r
->driver_path
) {
12512 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_path
));
12513 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
12514 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_path
));
12516 ndr
->flags
= _flags_save_string
;
12519 uint32_t _flags_save_string
= ndr
->flags
;
12520 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12521 if (r
->data_file
) {
12522 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_file
));
12523 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
12524 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_file
));
12526 ndr
->flags
= _flags_save_string
;
12529 uint32_t _flags_save_string
= ndr
->flags
;
12530 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12531 if (r
->config_file
) {
12532 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->config_file
));
12533 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
12534 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->config_file
));
12536 ndr
->flags
= _flags_save_string
;
12539 return NDR_ERR_SUCCESS
;
12542 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo5(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo5
*r
)
12544 uint32_t _ptr_driver_name
;
12545 TALLOC_CTX
*_mem_save_driver_name_0
;
12546 uint32_t _ptr_architecture
;
12547 TALLOC_CTX
*_mem_save_architecture_0
;
12548 uint32_t _ptr_driver_path
;
12549 TALLOC_CTX
*_mem_save_driver_path_0
;
12550 uint32_t _ptr_data_file
;
12551 TALLOC_CTX
*_mem_save_data_file_0
;
12552 uint32_t _ptr_config_file
;
12553 TALLOC_CTX
*_mem_save_config_file_0
;
12554 if (ndr_flags
& NDR_SCALARS
) {
12555 NDR_CHECK(ndr_pull_align(ndr
, 5));
12556 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
12558 uint32_t _flags_save_string
= ndr
->flags
;
12559 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12560 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
12561 if (_ptr_driver_name
) {
12562 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
12563 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
12565 r
->driver_name
= NULL
;
12567 ndr
->flags
= _flags_save_string
;
12570 uint32_t _flags_save_string
= ndr
->flags
;
12571 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12572 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
12573 if (_ptr_architecture
) {
12574 NDR_PULL_ALLOC(ndr
, r
->architecture
);
12575 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
12577 r
->architecture
= NULL
;
12579 ndr
->flags
= _flags_save_string
;
12582 uint32_t _flags_save_string
= ndr
->flags
;
12583 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12584 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
12585 if (_ptr_driver_path
) {
12586 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
12587 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
12589 r
->driver_path
= NULL
;
12591 ndr
->flags
= _flags_save_string
;
12594 uint32_t _flags_save_string
= ndr
->flags
;
12595 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12596 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
12597 if (_ptr_data_file
) {
12598 NDR_PULL_ALLOC(ndr
, r
->data_file
);
12599 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
12601 r
->data_file
= NULL
;
12603 ndr
->flags
= _flags_save_string
;
12606 uint32_t _flags_save_string
= ndr
->flags
;
12607 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12608 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
12609 if (_ptr_config_file
) {
12610 NDR_PULL_ALLOC(ndr
, r
->config_file
);
12611 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
12613 r
->config_file
= NULL
;
12615 ndr
->flags
= _flags_save_string
;
12617 NDR_CHECK(ndr_pull_spoolss_DriverAttributes(ndr
, NDR_SCALARS
, &r
->driver_attributes
));
12618 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->config_version
));
12619 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->driver_version
));
12620 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
12622 if (ndr_flags
& NDR_BUFFERS
) {
12624 uint32_t _flags_save_string
= ndr
->flags
;
12625 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12626 if (r
->driver_name
) {
12627 uint32_t _relative_save_offset
;
12628 _relative_save_offset
= ndr
->offset
;
12629 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
12630 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12631 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
12632 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
12633 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
12634 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12635 ndr
->relative_highest_offset
= ndr
->offset
;
12637 ndr
->offset
= _relative_save_offset
;
12639 ndr
->flags
= _flags_save_string
;
12642 uint32_t _flags_save_string
= ndr
->flags
;
12643 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12644 if (r
->architecture
) {
12645 uint32_t _relative_save_offset
;
12646 _relative_save_offset
= ndr
->offset
;
12647 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
12648 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12649 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
12650 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
12651 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
12652 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12653 ndr
->relative_highest_offset
= ndr
->offset
;
12655 ndr
->offset
= _relative_save_offset
;
12657 ndr
->flags
= _flags_save_string
;
12660 uint32_t _flags_save_string
= ndr
->flags
;
12661 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12662 if (r
->driver_path
) {
12663 uint32_t _relative_save_offset
;
12664 _relative_save_offset
= ndr
->offset
;
12665 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
12666 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12667 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
12668 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
12669 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
12670 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12671 ndr
->relative_highest_offset
= ndr
->offset
;
12673 ndr
->offset
= _relative_save_offset
;
12675 ndr
->flags
= _flags_save_string
;
12678 uint32_t _flags_save_string
= ndr
->flags
;
12679 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12680 if (r
->data_file
) {
12681 uint32_t _relative_save_offset
;
12682 _relative_save_offset
= ndr
->offset
;
12683 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
12684 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12685 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
12686 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
12687 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
12688 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12689 ndr
->relative_highest_offset
= ndr
->offset
;
12691 ndr
->offset
= _relative_save_offset
;
12693 ndr
->flags
= _flags_save_string
;
12696 uint32_t _flags_save_string
= ndr
->flags
;
12697 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12698 if (r
->config_file
) {
12699 uint32_t _relative_save_offset
;
12700 _relative_save_offset
= ndr
->offset
;
12701 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
12702 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
12703 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
12704 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
12705 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
12706 if (ndr
->offset
> ndr
->relative_highest_offset
) {
12707 ndr
->relative_highest_offset
= ndr
->offset
;
12709 ndr
->offset
= _relative_save_offset
;
12711 ndr
->flags
= _flags_save_string
;
12714 return NDR_ERR_SUCCESS
;
12717 _PUBLIC_
void ndr_print_spoolss_DriverInfo5(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo5
*r
)
12719 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo5");
12721 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
12722 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
12724 if (r
->driver_name
) {
12725 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
12728 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
12730 if (r
->architecture
) {
12731 ndr_print_string(ndr
, "architecture", r
->architecture
);
12734 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
12736 if (r
->driver_path
) {
12737 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
12740 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
12742 if (r
->data_file
) {
12743 ndr_print_string(ndr
, "data_file", r
->data_file
);
12746 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
12748 if (r
->config_file
) {
12749 ndr_print_string(ndr
, "config_file", r
->config_file
);
12752 ndr_print_spoolss_DriverAttributes(ndr
, "driver_attributes", r
->driver_attributes
);
12753 ndr_print_uint32(ndr
, "config_version", r
->config_version
);
12754 ndr_print_uint32(ndr
, "driver_version", r
->driver_version
);
12758 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo5(const struct spoolss_DriverInfo5
*r
, struct smb_iconv_convenience
*ic
, int flags
)
12760 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo5
, ic
);
12763 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo6(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo6
*r
)
12765 if (ndr_flags
& NDR_SCALARS
) {
12766 NDR_CHECK(ndr_push_align(ndr
, 8));
12767 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
12769 uint32_t _flags_save_string
= ndr
->flags
;
12770 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12771 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
12772 ndr
->flags
= _flags_save_string
;
12775 uint32_t _flags_save_string
= ndr
->flags
;
12776 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12777 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
12778 ndr
->flags
= _flags_save_string
;
12781 uint32_t _flags_save_string
= ndr
->flags
;
12782 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12783 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
12784 ndr
->flags
= _flags_save_string
;
12787 uint32_t _flags_save_string
= ndr
->flags
;
12788 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12789 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
12790 ndr
->flags
= _flags_save_string
;
12793 uint32_t _flags_save_string
= ndr
->flags
;
12794 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12795 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
12796 ndr
->flags
= _flags_save_string
;
12799 uint32_t _flags_save_string
= ndr
->flags
;
12800 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12801 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->help_file
));
12802 ndr
->flags
= _flags_save_string
;
12805 uint32_t _flags_save_string_array
= ndr
->flags
;
12806 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12807 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dependent_files
));
12808 ndr
->flags
= _flags_save_string_array
;
12811 uint32_t _flags_save_string
= ndr
->flags
;
12812 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12813 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
12814 ndr
->flags
= _flags_save_string
;
12817 uint32_t _flags_save_string
= ndr
->flags
;
12818 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12819 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->default_datatype
));
12820 ndr
->flags
= _flags_save_string
;
12823 uint32_t _flags_save_string_array
= ndr
->flags
;
12824 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12825 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->previous_names
));
12826 ndr
->flags
= _flags_save_string_array
;
12828 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
12829 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
12831 uint32_t _flags_save_string
= ndr
->flags
;
12832 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12833 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->manufacturer_name
));
12834 ndr
->flags
= _flags_save_string
;
12837 uint32_t _flags_save_string
= ndr
->flags
;
12838 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12839 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->manufacturer_url
));
12840 ndr
->flags
= _flags_save_string
;
12843 uint32_t _flags_save_string
= ndr
->flags
;
12844 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12845 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->hardware_id
));
12846 ndr
->flags
= _flags_save_string
;
12849 uint32_t _flags_save_string
= ndr
->flags
;
12850 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12851 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->provider
));
12852 ndr
->flags
= _flags_save_string
;
12854 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
12856 if (ndr_flags
& NDR_BUFFERS
) {
12858 uint32_t _flags_save_string
= ndr
->flags
;
12859 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12860 if (r
->driver_name
) {
12861 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
12862 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
12863 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
12865 ndr
->flags
= _flags_save_string
;
12868 uint32_t _flags_save_string
= ndr
->flags
;
12869 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12870 if (r
->architecture
) {
12871 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->architecture
));
12872 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
12873 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->architecture
));
12875 ndr
->flags
= _flags_save_string
;
12878 uint32_t _flags_save_string
= ndr
->flags
;
12879 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12880 if (r
->driver_path
) {
12881 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_path
));
12882 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
12883 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_path
));
12885 ndr
->flags
= _flags_save_string
;
12888 uint32_t _flags_save_string
= ndr
->flags
;
12889 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12890 if (r
->data_file
) {
12891 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_file
));
12892 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
12893 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_file
));
12895 ndr
->flags
= _flags_save_string
;
12898 uint32_t _flags_save_string
= ndr
->flags
;
12899 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12900 if (r
->config_file
) {
12901 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->config_file
));
12902 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
12903 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->config_file
));
12905 ndr
->flags
= _flags_save_string
;
12908 uint32_t _flags_save_string
= ndr
->flags
;
12909 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12910 if (r
->help_file
) {
12911 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->help_file
));
12912 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->help_file
));
12913 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->help_file
));
12915 ndr
->flags
= _flags_save_string
;
12918 uint32_t _flags_save_string_array
= ndr
->flags
;
12919 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12920 if (r
->dependent_files
) {
12921 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->dependent_files
));
12922 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->dependent_files
));
12923 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->dependent_files
));
12925 ndr
->flags
= _flags_save_string_array
;
12928 uint32_t _flags_save_string
= ndr
->flags
;
12929 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12930 if (r
->monitor_name
) {
12931 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->monitor_name
));
12932 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
12933 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->monitor_name
));
12935 ndr
->flags
= _flags_save_string
;
12938 uint32_t _flags_save_string
= ndr
->flags
;
12939 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12940 if (r
->default_datatype
) {
12941 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->default_datatype
));
12942 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->default_datatype
));
12943 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->default_datatype
));
12945 ndr
->flags
= _flags_save_string
;
12948 uint32_t _flags_save_string_array
= ndr
->flags
;
12949 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12950 if (r
->previous_names
) {
12951 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->previous_names
));
12952 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->previous_names
));
12953 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->previous_names
));
12955 ndr
->flags
= _flags_save_string_array
;
12958 uint32_t _flags_save_string
= ndr
->flags
;
12959 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12960 if (r
->manufacturer_name
) {
12961 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->manufacturer_name
));
12962 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->manufacturer_name
));
12963 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->manufacturer_name
));
12965 ndr
->flags
= _flags_save_string
;
12968 uint32_t _flags_save_string
= ndr
->flags
;
12969 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12970 if (r
->manufacturer_url
) {
12971 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->manufacturer_url
));
12972 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->manufacturer_url
));
12973 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->manufacturer_url
));
12975 ndr
->flags
= _flags_save_string
;
12978 uint32_t _flags_save_string
= ndr
->flags
;
12979 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12980 if (r
->hardware_id
) {
12981 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->hardware_id
));
12982 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->hardware_id
));
12983 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->hardware_id
));
12985 ndr
->flags
= _flags_save_string
;
12988 uint32_t _flags_save_string
= ndr
->flags
;
12989 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
12991 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->provider
));
12992 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->provider
));
12993 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->provider
));
12995 ndr
->flags
= _flags_save_string
;
12998 return NDR_ERR_SUCCESS
;
13001 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo6(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo6
*r
)
13003 uint32_t _ptr_driver_name
;
13004 TALLOC_CTX
*_mem_save_driver_name_0
;
13005 uint32_t _ptr_architecture
;
13006 TALLOC_CTX
*_mem_save_architecture_0
;
13007 uint32_t _ptr_driver_path
;
13008 TALLOC_CTX
*_mem_save_driver_path_0
;
13009 uint32_t _ptr_data_file
;
13010 TALLOC_CTX
*_mem_save_data_file_0
;
13011 uint32_t _ptr_config_file
;
13012 TALLOC_CTX
*_mem_save_config_file_0
;
13013 uint32_t _ptr_help_file
;
13014 TALLOC_CTX
*_mem_save_help_file_0
;
13015 uint32_t _ptr_dependent_files
;
13016 TALLOC_CTX
*_mem_save_dependent_files_0
;
13017 uint32_t _ptr_monitor_name
;
13018 TALLOC_CTX
*_mem_save_monitor_name_0
;
13019 uint32_t _ptr_default_datatype
;
13020 TALLOC_CTX
*_mem_save_default_datatype_0
;
13021 uint32_t _ptr_previous_names
;
13022 TALLOC_CTX
*_mem_save_previous_names_0
;
13023 uint32_t _ptr_manufacturer_name
;
13024 TALLOC_CTX
*_mem_save_manufacturer_name_0
;
13025 uint32_t _ptr_manufacturer_url
;
13026 TALLOC_CTX
*_mem_save_manufacturer_url_0
;
13027 uint32_t _ptr_hardware_id
;
13028 TALLOC_CTX
*_mem_save_hardware_id_0
;
13029 uint32_t _ptr_provider
;
13030 TALLOC_CTX
*_mem_save_provider_0
;
13031 if (ndr_flags
& NDR_SCALARS
) {
13032 NDR_CHECK(ndr_pull_align(ndr
, 8));
13033 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
13035 uint32_t _flags_save_string
= ndr
->flags
;
13036 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13037 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
13038 if (_ptr_driver_name
) {
13039 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
13040 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
13042 r
->driver_name
= NULL
;
13044 ndr
->flags
= _flags_save_string
;
13047 uint32_t _flags_save_string
= ndr
->flags
;
13048 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13049 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
13050 if (_ptr_architecture
) {
13051 NDR_PULL_ALLOC(ndr
, r
->architecture
);
13052 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
13054 r
->architecture
= NULL
;
13056 ndr
->flags
= _flags_save_string
;
13059 uint32_t _flags_save_string
= ndr
->flags
;
13060 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13061 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
13062 if (_ptr_driver_path
) {
13063 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
13064 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
13066 r
->driver_path
= NULL
;
13068 ndr
->flags
= _flags_save_string
;
13071 uint32_t _flags_save_string
= ndr
->flags
;
13072 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13073 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
13074 if (_ptr_data_file
) {
13075 NDR_PULL_ALLOC(ndr
, r
->data_file
);
13076 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
13078 r
->data_file
= NULL
;
13080 ndr
->flags
= _flags_save_string
;
13083 uint32_t _flags_save_string
= ndr
->flags
;
13084 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13085 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
13086 if (_ptr_config_file
) {
13087 NDR_PULL_ALLOC(ndr
, r
->config_file
);
13088 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
13090 r
->config_file
= NULL
;
13092 ndr
->flags
= _flags_save_string
;
13095 uint32_t _flags_save_string
= ndr
->flags
;
13096 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13097 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
13098 if (_ptr_help_file
) {
13099 NDR_PULL_ALLOC(ndr
, r
->help_file
);
13100 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->help_file
, _ptr_help_file
));
13102 r
->help_file
= NULL
;
13104 ndr
->flags
= _flags_save_string
;
13107 uint32_t _flags_save_string_array
= ndr
->flags
;
13108 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13109 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
13110 if (_ptr_dependent_files
) {
13111 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
13112 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dependent_files
, _ptr_dependent_files
));
13114 r
->dependent_files
= NULL
;
13116 ndr
->flags
= _flags_save_string_array
;
13119 uint32_t _flags_save_string
= ndr
->flags
;
13120 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13121 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
13122 if (_ptr_monitor_name
) {
13123 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
13124 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
13126 r
->monitor_name
= NULL
;
13128 ndr
->flags
= _flags_save_string
;
13131 uint32_t _flags_save_string
= ndr
->flags
;
13132 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13133 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
13134 if (_ptr_default_datatype
) {
13135 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
13136 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->default_datatype
, _ptr_default_datatype
));
13138 r
->default_datatype
= NULL
;
13140 ndr
->flags
= _flags_save_string
;
13143 uint32_t _flags_save_string_array
= ndr
->flags
;
13144 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13145 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
13146 if (_ptr_previous_names
) {
13147 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
13148 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->previous_names
, _ptr_previous_names
));
13150 r
->previous_names
= NULL
;
13152 ndr
->flags
= _flags_save_string_array
;
13154 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
13155 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
13157 uint32_t _flags_save_string
= ndr
->flags
;
13158 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13159 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_name
));
13160 if (_ptr_manufacturer_name
) {
13161 NDR_PULL_ALLOC(ndr
, r
->manufacturer_name
);
13162 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->manufacturer_name
, _ptr_manufacturer_name
));
13164 r
->manufacturer_name
= NULL
;
13166 ndr
->flags
= _flags_save_string
;
13169 uint32_t _flags_save_string
= ndr
->flags
;
13170 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13171 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_url
));
13172 if (_ptr_manufacturer_url
) {
13173 NDR_PULL_ALLOC(ndr
, r
->manufacturer_url
);
13174 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->manufacturer_url
, _ptr_manufacturer_url
));
13176 r
->manufacturer_url
= NULL
;
13178 ndr
->flags
= _flags_save_string
;
13181 uint32_t _flags_save_string
= ndr
->flags
;
13182 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13183 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hardware_id
));
13184 if (_ptr_hardware_id
) {
13185 NDR_PULL_ALLOC(ndr
, r
->hardware_id
);
13186 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->hardware_id
, _ptr_hardware_id
));
13188 r
->hardware_id
= NULL
;
13190 ndr
->flags
= _flags_save_string
;
13193 uint32_t _flags_save_string
= ndr
->flags
;
13194 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13195 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_provider
));
13196 if (_ptr_provider
) {
13197 NDR_PULL_ALLOC(ndr
, r
->provider
);
13198 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->provider
, _ptr_provider
));
13200 r
->provider
= NULL
;
13202 ndr
->flags
= _flags_save_string
;
13204 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
13206 if (ndr_flags
& NDR_BUFFERS
) {
13208 uint32_t _flags_save_string
= ndr
->flags
;
13209 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13210 if (r
->driver_name
) {
13211 uint32_t _relative_save_offset
;
13212 _relative_save_offset
= ndr
->offset
;
13213 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
13214 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13215 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
13216 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
13217 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
13218 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13219 ndr
->relative_highest_offset
= ndr
->offset
;
13221 ndr
->offset
= _relative_save_offset
;
13223 ndr
->flags
= _flags_save_string
;
13226 uint32_t _flags_save_string
= ndr
->flags
;
13227 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13228 if (r
->architecture
) {
13229 uint32_t _relative_save_offset
;
13230 _relative_save_offset
= ndr
->offset
;
13231 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
13232 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13233 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
13234 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
13235 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
13236 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13237 ndr
->relative_highest_offset
= ndr
->offset
;
13239 ndr
->offset
= _relative_save_offset
;
13241 ndr
->flags
= _flags_save_string
;
13244 uint32_t _flags_save_string
= ndr
->flags
;
13245 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13246 if (r
->driver_path
) {
13247 uint32_t _relative_save_offset
;
13248 _relative_save_offset
= ndr
->offset
;
13249 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
13250 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13251 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
13252 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
13253 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
13254 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13255 ndr
->relative_highest_offset
= ndr
->offset
;
13257 ndr
->offset
= _relative_save_offset
;
13259 ndr
->flags
= _flags_save_string
;
13262 uint32_t _flags_save_string
= ndr
->flags
;
13263 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13264 if (r
->data_file
) {
13265 uint32_t _relative_save_offset
;
13266 _relative_save_offset
= ndr
->offset
;
13267 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
13268 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13269 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
13270 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
13271 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
13272 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13273 ndr
->relative_highest_offset
= ndr
->offset
;
13275 ndr
->offset
= _relative_save_offset
;
13277 ndr
->flags
= _flags_save_string
;
13280 uint32_t _flags_save_string
= ndr
->flags
;
13281 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13282 if (r
->config_file
) {
13283 uint32_t _relative_save_offset
;
13284 _relative_save_offset
= ndr
->offset
;
13285 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
13286 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13287 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
13288 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
13289 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
13290 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13291 ndr
->relative_highest_offset
= ndr
->offset
;
13293 ndr
->offset
= _relative_save_offset
;
13295 ndr
->flags
= _flags_save_string
;
13298 uint32_t _flags_save_string
= ndr
->flags
;
13299 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13300 if (r
->help_file
) {
13301 uint32_t _relative_save_offset
;
13302 _relative_save_offset
= ndr
->offset
;
13303 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->help_file
));
13304 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13305 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
13306 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->help_file
));
13307 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
13308 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13309 ndr
->relative_highest_offset
= ndr
->offset
;
13311 ndr
->offset
= _relative_save_offset
;
13313 ndr
->flags
= _flags_save_string
;
13316 uint32_t _flags_save_string_array
= ndr
->flags
;
13317 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13318 if (r
->dependent_files
) {
13319 uint32_t _relative_save_offset
;
13320 _relative_save_offset
= ndr
->offset
;
13321 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dependent_files
));
13322 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13323 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
13324 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->dependent_files
));
13325 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
13326 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13327 ndr
->relative_highest_offset
= ndr
->offset
;
13329 ndr
->offset
= _relative_save_offset
;
13331 ndr
->flags
= _flags_save_string_array
;
13334 uint32_t _flags_save_string
= ndr
->flags
;
13335 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13336 if (r
->monitor_name
) {
13337 uint32_t _relative_save_offset
;
13338 _relative_save_offset
= ndr
->offset
;
13339 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
13340 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13341 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
13342 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
13343 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
13344 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13345 ndr
->relative_highest_offset
= ndr
->offset
;
13347 ndr
->offset
= _relative_save_offset
;
13349 ndr
->flags
= _flags_save_string
;
13352 uint32_t _flags_save_string
= ndr
->flags
;
13353 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13354 if (r
->default_datatype
) {
13355 uint32_t _relative_save_offset
;
13356 _relative_save_offset
= ndr
->offset
;
13357 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->default_datatype
));
13358 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13359 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
13360 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->default_datatype
));
13361 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
13362 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13363 ndr
->relative_highest_offset
= ndr
->offset
;
13365 ndr
->offset
= _relative_save_offset
;
13367 ndr
->flags
= _flags_save_string
;
13370 uint32_t _flags_save_string_array
= ndr
->flags
;
13371 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13372 if (r
->previous_names
) {
13373 uint32_t _relative_save_offset
;
13374 _relative_save_offset
= ndr
->offset
;
13375 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->previous_names
));
13376 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13377 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
13378 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->previous_names
));
13379 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
13380 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13381 ndr
->relative_highest_offset
= ndr
->offset
;
13383 ndr
->offset
= _relative_save_offset
;
13385 ndr
->flags
= _flags_save_string_array
;
13388 uint32_t _flags_save_string
= ndr
->flags
;
13389 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13390 if (r
->manufacturer_name
) {
13391 uint32_t _relative_save_offset
;
13392 _relative_save_offset
= ndr
->offset
;
13393 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->manufacturer_name
));
13394 _mem_save_manufacturer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13395 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_name
, 0);
13396 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->manufacturer_name
));
13397 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_name_0
, 0);
13398 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13399 ndr
->relative_highest_offset
= ndr
->offset
;
13401 ndr
->offset
= _relative_save_offset
;
13403 ndr
->flags
= _flags_save_string
;
13406 uint32_t _flags_save_string
= ndr
->flags
;
13407 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13408 if (r
->manufacturer_url
) {
13409 uint32_t _relative_save_offset
;
13410 _relative_save_offset
= ndr
->offset
;
13411 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->manufacturer_url
));
13412 _mem_save_manufacturer_url_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13413 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_url
, 0);
13414 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->manufacturer_url
));
13415 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_url_0
, 0);
13416 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13417 ndr
->relative_highest_offset
= ndr
->offset
;
13419 ndr
->offset
= _relative_save_offset
;
13421 ndr
->flags
= _flags_save_string
;
13424 uint32_t _flags_save_string
= ndr
->flags
;
13425 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13426 if (r
->hardware_id
) {
13427 uint32_t _relative_save_offset
;
13428 _relative_save_offset
= ndr
->offset
;
13429 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->hardware_id
));
13430 _mem_save_hardware_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13431 NDR_PULL_SET_MEM_CTX(ndr
, r
->hardware_id
, 0);
13432 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->hardware_id
));
13433 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hardware_id_0
, 0);
13434 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13435 ndr
->relative_highest_offset
= ndr
->offset
;
13437 ndr
->offset
= _relative_save_offset
;
13439 ndr
->flags
= _flags_save_string
;
13442 uint32_t _flags_save_string
= ndr
->flags
;
13443 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13445 uint32_t _relative_save_offset
;
13446 _relative_save_offset
= ndr
->offset
;
13447 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->provider
));
13448 _mem_save_provider_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13449 NDR_PULL_SET_MEM_CTX(ndr
, r
->provider
, 0);
13450 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->provider
));
13451 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_provider_0
, 0);
13452 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13453 ndr
->relative_highest_offset
= ndr
->offset
;
13455 ndr
->offset
= _relative_save_offset
;
13457 ndr
->flags
= _flags_save_string
;
13460 return NDR_ERR_SUCCESS
;
13463 _PUBLIC_
void ndr_print_spoolss_DriverInfo6(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo6
*r
)
13465 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo6");
13467 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
13468 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
13470 if (r
->driver_name
) {
13471 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
13474 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
13476 if (r
->architecture
) {
13477 ndr_print_string(ndr
, "architecture", r
->architecture
);
13480 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
13482 if (r
->driver_path
) {
13483 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
13486 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
13488 if (r
->data_file
) {
13489 ndr_print_string(ndr
, "data_file", r
->data_file
);
13492 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
13494 if (r
->config_file
) {
13495 ndr_print_string(ndr
, "config_file", r
->config_file
);
13498 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
13500 if (r
->help_file
) {
13501 ndr_print_string(ndr
, "help_file", r
->help_file
);
13504 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
13506 if (r
->dependent_files
) {
13507 ndr_print_string_array(ndr
, "dependent_files", r
->dependent_files
);
13510 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
13512 if (r
->monitor_name
) {
13513 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
13516 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
13518 if (r
->default_datatype
) {
13519 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
13522 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
13524 if (r
->previous_names
) {
13525 ndr_print_string_array(ndr
, "previous_names", r
->previous_names
);
13528 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
13529 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
13530 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
13532 if (r
->manufacturer_name
) {
13533 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
13536 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
13538 if (r
->manufacturer_url
) {
13539 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
13542 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
13544 if (r
->hardware_id
) {
13545 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
13548 ndr_print_ptr(ndr
, "provider", r
->provider
);
13551 ndr_print_string(ndr
, "provider", r
->provider
);
13557 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo6(const struct spoolss_DriverInfo6
*r
, struct smb_iconv_convenience
*ic
, int flags
)
13559 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo6
, ic
);
13562 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo7(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo7
*r
)
13564 if (ndr_flags
& NDR_SCALARS
) {
13565 NDR_CHECK(ndr_push_align(ndr
, 5));
13566 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
13567 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
13569 uint32_t _flags_save_string
= ndr
->flags
;
13570 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13571 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
13572 ndr
->flags
= _flags_save_string
;
13575 uint32_t _flags_save_string
= ndr
->flags
;
13576 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13577 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->inf_name
));
13578 ndr
->flags
= _flags_save_string
;
13581 uint32_t _flags_save_string
= ndr
->flags
;
13582 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13583 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->install_source_root
));
13584 ndr
->flags
= _flags_save_string
;
13586 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
13588 if (ndr_flags
& NDR_BUFFERS
) {
13590 uint32_t _flags_save_string
= ndr
->flags
;
13591 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13592 if (r
->driver_name
) {
13593 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
13594 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
13595 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
13597 ndr
->flags
= _flags_save_string
;
13600 uint32_t _flags_save_string
= ndr
->flags
;
13601 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13603 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->inf_name
));
13604 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->inf_name
));
13605 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->inf_name
));
13607 ndr
->flags
= _flags_save_string
;
13610 uint32_t _flags_save_string
= ndr
->flags
;
13611 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13612 if (r
->install_source_root
) {
13613 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->install_source_root
));
13614 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->install_source_root
));
13615 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->install_source_root
));
13617 ndr
->flags
= _flags_save_string
;
13620 return NDR_ERR_SUCCESS
;
13623 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo7(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo7
*r
)
13625 uint32_t _ptr_driver_name
;
13626 TALLOC_CTX
*_mem_save_driver_name_0
;
13627 uint32_t _ptr_inf_name
;
13628 TALLOC_CTX
*_mem_save_inf_name_0
;
13629 uint32_t _ptr_install_source_root
;
13630 TALLOC_CTX
*_mem_save_install_source_root_0
;
13631 if (ndr_flags
& NDR_SCALARS
) {
13632 NDR_CHECK(ndr_pull_align(ndr
, 5));
13633 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
13634 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
13636 uint32_t _flags_save_string
= ndr
->flags
;
13637 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13638 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
13639 if (_ptr_driver_name
) {
13640 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
13641 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
13643 r
->driver_name
= NULL
;
13645 ndr
->flags
= _flags_save_string
;
13648 uint32_t _flags_save_string
= ndr
->flags
;
13649 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13650 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_inf_name
));
13651 if (_ptr_inf_name
) {
13652 NDR_PULL_ALLOC(ndr
, r
->inf_name
);
13653 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->inf_name
, _ptr_inf_name
));
13655 r
->inf_name
= NULL
;
13657 ndr
->flags
= _flags_save_string
;
13660 uint32_t _flags_save_string
= ndr
->flags
;
13661 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13662 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_install_source_root
));
13663 if (_ptr_install_source_root
) {
13664 NDR_PULL_ALLOC(ndr
, r
->install_source_root
);
13665 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->install_source_root
, _ptr_install_source_root
));
13667 r
->install_source_root
= NULL
;
13669 ndr
->flags
= _flags_save_string
;
13671 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
13673 if (ndr_flags
& NDR_BUFFERS
) {
13675 uint32_t _flags_save_string
= ndr
->flags
;
13676 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13677 if (r
->driver_name
) {
13678 uint32_t _relative_save_offset
;
13679 _relative_save_offset
= ndr
->offset
;
13680 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
13681 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13682 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
13683 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
13684 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
13685 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13686 ndr
->relative_highest_offset
= ndr
->offset
;
13688 ndr
->offset
= _relative_save_offset
;
13690 ndr
->flags
= _flags_save_string
;
13693 uint32_t _flags_save_string
= ndr
->flags
;
13694 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13696 uint32_t _relative_save_offset
;
13697 _relative_save_offset
= ndr
->offset
;
13698 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->inf_name
));
13699 _mem_save_inf_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13700 NDR_PULL_SET_MEM_CTX(ndr
, r
->inf_name
, 0);
13701 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->inf_name
));
13702 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_inf_name_0
, 0);
13703 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13704 ndr
->relative_highest_offset
= ndr
->offset
;
13706 ndr
->offset
= _relative_save_offset
;
13708 ndr
->flags
= _flags_save_string
;
13711 uint32_t _flags_save_string
= ndr
->flags
;
13712 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13713 if (r
->install_source_root
) {
13714 uint32_t _relative_save_offset
;
13715 _relative_save_offset
= ndr
->offset
;
13716 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->install_source_root
));
13717 _mem_save_install_source_root_0
= NDR_PULL_GET_MEM_CTX(ndr
);
13718 NDR_PULL_SET_MEM_CTX(ndr
, r
->install_source_root
, 0);
13719 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->install_source_root
));
13720 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_install_source_root_0
, 0);
13721 if (ndr
->offset
> ndr
->relative_highest_offset
) {
13722 ndr
->relative_highest_offset
= ndr
->offset
;
13724 ndr
->offset
= _relative_save_offset
;
13726 ndr
->flags
= _flags_save_string
;
13729 return NDR_ERR_SUCCESS
;
13732 _PUBLIC_
void ndr_print_spoolss_DriverInfo7(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo7
*r
)
13734 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo7");
13736 ndr_print_uint32(ndr
, "size", r
->size
);
13737 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
13738 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
13740 if (r
->driver_name
) {
13741 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
13744 ndr_print_ptr(ndr
, "inf_name", r
->inf_name
);
13747 ndr_print_string(ndr
, "inf_name", r
->inf_name
);
13750 ndr_print_ptr(ndr
, "install_source_root", r
->install_source_root
);
13752 if (r
->install_source_root
) {
13753 ndr_print_string(ndr
, "install_source_root", r
->install_source_root
);
13759 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo7(const struct spoolss_DriverInfo7
*r
, struct smb_iconv_convenience
*ic
, int flags
)
13761 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo7
, ic
);
13764 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo8(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverInfo8
*r
)
13766 if (ndr_flags
& NDR_SCALARS
) {
13767 NDR_CHECK(ndr_push_align(ndr
, 8));
13768 NDR_CHECK(ndr_push_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, r
->version
));
13770 uint32_t _flags_save_string
= ndr
->flags
;
13771 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13772 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_name
));
13773 ndr
->flags
= _flags_save_string
;
13776 uint32_t _flags_save_string
= ndr
->flags
;
13777 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13778 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->architecture
));
13779 ndr
->flags
= _flags_save_string
;
13782 uint32_t _flags_save_string
= ndr
->flags
;
13783 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13784 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->driver_path
));
13785 ndr
->flags
= _flags_save_string
;
13788 uint32_t _flags_save_string
= ndr
->flags
;
13789 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13790 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data_file
));
13791 ndr
->flags
= _flags_save_string
;
13794 uint32_t _flags_save_string
= ndr
->flags
;
13795 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13796 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->config_file
));
13797 ndr
->flags
= _flags_save_string
;
13800 uint32_t _flags_save_string
= ndr
->flags
;
13801 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13802 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->help_file
));
13803 ndr
->flags
= _flags_save_string
;
13806 uint32_t _flags_save_string_array
= ndr
->flags
;
13807 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13808 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dependent_files
));
13809 ndr
->flags
= _flags_save_string_array
;
13812 uint32_t _flags_save_string
= ndr
->flags
;
13813 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13814 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
13815 ndr
->flags
= _flags_save_string
;
13818 uint32_t _flags_save_string
= ndr
->flags
;
13819 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13820 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->default_datatype
));
13821 ndr
->flags
= _flags_save_string
;
13824 uint32_t _flags_save_string_array
= ndr
->flags
;
13825 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13826 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->previous_names
));
13827 ndr
->flags
= _flags_save_string_array
;
13829 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
13830 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
13832 uint32_t _flags_save_string
= ndr
->flags
;
13833 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13834 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->manufacturer_name
));
13835 ndr
->flags
= _flags_save_string
;
13838 uint32_t _flags_save_string
= ndr
->flags
;
13839 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13840 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->manufacturer_url
));
13841 ndr
->flags
= _flags_save_string
;
13844 uint32_t _flags_save_string
= ndr
->flags
;
13845 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13846 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->hardware_id
));
13847 ndr
->flags
= _flags_save_string
;
13850 uint32_t _flags_save_string
= ndr
->flags
;
13851 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13852 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->provider
));
13853 ndr
->flags
= _flags_save_string
;
13856 uint32_t _flags_save_string
= ndr
->flags
;
13857 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13858 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->print_processor
));
13859 ndr
->flags
= _flags_save_string
;
13862 uint32_t _flags_save_string
= ndr
->flags
;
13863 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13864 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->vendor_setup
));
13865 ndr
->flags
= _flags_save_string
;
13868 uint32_t _flags_save_string_array
= ndr
->flags
;
13869 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13870 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->color_profiles
));
13871 ndr
->flags
= _flags_save_string_array
;
13874 uint32_t _flags_save_string
= ndr
->flags
;
13875 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13876 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->inf_path
));
13877 ndr
->flags
= _flags_save_string
;
13879 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->printer_driver_attributes
));
13881 uint32_t _flags_save_string_array
= ndr
->flags
;
13882 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13883 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->core_driver_dependencies
));
13884 ndr
->flags
= _flags_save_string_array
;
13886 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->min_inbox_driver_ver_date
));
13887 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->min_inbox_driver_ver_version
));
13888 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
13890 if (ndr_flags
& NDR_BUFFERS
) {
13892 uint32_t _flags_save_string
= ndr
->flags
;
13893 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13894 if (r
->driver_name
) {
13895 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_name
));
13896 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_name
));
13897 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_name
));
13899 ndr
->flags
= _flags_save_string
;
13902 uint32_t _flags_save_string
= ndr
->flags
;
13903 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13904 if (r
->architecture
) {
13905 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->architecture
));
13906 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->architecture
));
13907 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->architecture
));
13909 ndr
->flags
= _flags_save_string
;
13912 uint32_t _flags_save_string
= ndr
->flags
;
13913 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13914 if (r
->driver_path
) {
13915 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->driver_path
));
13916 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->driver_path
));
13917 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->driver_path
));
13919 ndr
->flags
= _flags_save_string
;
13922 uint32_t _flags_save_string
= ndr
->flags
;
13923 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13924 if (r
->data_file
) {
13925 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data_file
));
13926 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->data_file
));
13927 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data_file
));
13929 ndr
->flags
= _flags_save_string
;
13932 uint32_t _flags_save_string
= ndr
->flags
;
13933 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13934 if (r
->config_file
) {
13935 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->config_file
));
13936 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->config_file
));
13937 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->config_file
));
13939 ndr
->flags
= _flags_save_string
;
13942 uint32_t _flags_save_string
= ndr
->flags
;
13943 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13944 if (r
->help_file
) {
13945 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->help_file
));
13946 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->help_file
));
13947 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->help_file
));
13949 ndr
->flags
= _flags_save_string
;
13952 uint32_t _flags_save_string_array
= ndr
->flags
;
13953 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13954 if (r
->dependent_files
) {
13955 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->dependent_files
));
13956 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->dependent_files
));
13957 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->dependent_files
));
13959 ndr
->flags
= _flags_save_string_array
;
13962 uint32_t _flags_save_string
= ndr
->flags
;
13963 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13964 if (r
->monitor_name
) {
13965 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->monitor_name
));
13966 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
13967 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->monitor_name
));
13969 ndr
->flags
= _flags_save_string
;
13972 uint32_t _flags_save_string
= ndr
->flags
;
13973 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13974 if (r
->default_datatype
) {
13975 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->default_datatype
));
13976 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->default_datatype
));
13977 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->default_datatype
));
13979 ndr
->flags
= _flags_save_string
;
13982 uint32_t _flags_save_string_array
= ndr
->flags
;
13983 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13984 if (r
->previous_names
) {
13985 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->previous_names
));
13986 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->previous_names
));
13987 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->previous_names
));
13989 ndr
->flags
= _flags_save_string_array
;
13992 uint32_t _flags_save_string
= ndr
->flags
;
13993 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
13994 if (r
->manufacturer_name
) {
13995 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->manufacturer_name
));
13996 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->manufacturer_name
));
13997 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->manufacturer_name
));
13999 ndr
->flags
= _flags_save_string
;
14002 uint32_t _flags_save_string
= ndr
->flags
;
14003 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14004 if (r
->manufacturer_url
) {
14005 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->manufacturer_url
));
14006 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->manufacturer_url
));
14007 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->manufacturer_url
));
14009 ndr
->flags
= _flags_save_string
;
14012 uint32_t _flags_save_string
= ndr
->flags
;
14013 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14014 if (r
->hardware_id
) {
14015 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->hardware_id
));
14016 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->hardware_id
));
14017 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->hardware_id
));
14019 ndr
->flags
= _flags_save_string
;
14022 uint32_t _flags_save_string
= ndr
->flags
;
14023 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14025 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->provider
));
14026 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->provider
));
14027 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->provider
));
14029 ndr
->flags
= _flags_save_string
;
14032 uint32_t _flags_save_string
= ndr
->flags
;
14033 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14034 if (r
->print_processor
) {
14035 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->print_processor
));
14036 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->print_processor
));
14037 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->print_processor
));
14039 ndr
->flags
= _flags_save_string
;
14042 uint32_t _flags_save_string
= ndr
->flags
;
14043 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14044 if (r
->vendor_setup
) {
14045 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->vendor_setup
));
14046 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->vendor_setup
));
14047 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->vendor_setup
));
14049 ndr
->flags
= _flags_save_string
;
14052 uint32_t _flags_save_string_array
= ndr
->flags
;
14053 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14054 if (r
->color_profiles
) {
14055 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->color_profiles
));
14056 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->color_profiles
));
14057 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->color_profiles
));
14059 ndr
->flags
= _flags_save_string_array
;
14062 uint32_t _flags_save_string
= ndr
->flags
;
14063 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14065 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->inf_path
));
14066 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->inf_path
));
14067 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->inf_path
));
14069 ndr
->flags
= _flags_save_string
;
14072 uint32_t _flags_save_string_array
= ndr
->flags
;
14073 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14074 if (r
->core_driver_dependencies
) {
14075 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->core_driver_dependencies
));
14076 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->core_driver_dependencies
));
14077 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->core_driver_dependencies
));
14079 ndr
->flags
= _flags_save_string_array
;
14082 return NDR_ERR_SUCCESS
;
14085 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo8(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverInfo8
*r
)
14087 uint32_t _ptr_driver_name
;
14088 TALLOC_CTX
*_mem_save_driver_name_0
;
14089 uint32_t _ptr_architecture
;
14090 TALLOC_CTX
*_mem_save_architecture_0
;
14091 uint32_t _ptr_driver_path
;
14092 TALLOC_CTX
*_mem_save_driver_path_0
;
14093 uint32_t _ptr_data_file
;
14094 TALLOC_CTX
*_mem_save_data_file_0
;
14095 uint32_t _ptr_config_file
;
14096 TALLOC_CTX
*_mem_save_config_file_0
;
14097 uint32_t _ptr_help_file
;
14098 TALLOC_CTX
*_mem_save_help_file_0
;
14099 uint32_t _ptr_dependent_files
;
14100 TALLOC_CTX
*_mem_save_dependent_files_0
;
14101 uint32_t _ptr_monitor_name
;
14102 TALLOC_CTX
*_mem_save_monitor_name_0
;
14103 uint32_t _ptr_default_datatype
;
14104 TALLOC_CTX
*_mem_save_default_datatype_0
;
14105 uint32_t _ptr_previous_names
;
14106 TALLOC_CTX
*_mem_save_previous_names_0
;
14107 uint32_t _ptr_manufacturer_name
;
14108 TALLOC_CTX
*_mem_save_manufacturer_name_0
;
14109 uint32_t _ptr_manufacturer_url
;
14110 TALLOC_CTX
*_mem_save_manufacturer_url_0
;
14111 uint32_t _ptr_hardware_id
;
14112 TALLOC_CTX
*_mem_save_hardware_id_0
;
14113 uint32_t _ptr_provider
;
14114 TALLOC_CTX
*_mem_save_provider_0
;
14115 uint32_t _ptr_print_processor
;
14116 TALLOC_CTX
*_mem_save_print_processor_0
;
14117 uint32_t _ptr_vendor_setup
;
14118 TALLOC_CTX
*_mem_save_vendor_setup_0
;
14119 uint32_t _ptr_color_profiles
;
14120 TALLOC_CTX
*_mem_save_color_profiles_0
;
14121 uint32_t _ptr_inf_path
;
14122 TALLOC_CTX
*_mem_save_inf_path_0
;
14123 uint32_t _ptr_core_driver_dependencies
;
14124 TALLOC_CTX
*_mem_save_core_driver_dependencies_0
;
14125 if (ndr_flags
& NDR_SCALARS
) {
14126 NDR_CHECK(ndr_pull_align(ndr
, 8));
14127 NDR_CHECK(ndr_pull_spoolss_DriverOSVersion(ndr
, NDR_SCALARS
, &r
->version
));
14129 uint32_t _flags_save_string
= ndr
->flags
;
14130 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14131 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_name
));
14132 if (_ptr_driver_name
) {
14133 NDR_PULL_ALLOC(ndr
, r
->driver_name
);
14134 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_name
, _ptr_driver_name
));
14136 r
->driver_name
= NULL
;
14138 ndr
->flags
= _flags_save_string
;
14141 uint32_t _flags_save_string
= ndr
->flags
;
14142 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14143 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
14144 if (_ptr_architecture
) {
14145 NDR_PULL_ALLOC(ndr
, r
->architecture
);
14146 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->architecture
, _ptr_architecture
));
14148 r
->architecture
= NULL
;
14150 ndr
->flags
= _flags_save_string
;
14153 uint32_t _flags_save_string
= ndr
->flags
;
14154 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14155 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_path
));
14156 if (_ptr_driver_path
) {
14157 NDR_PULL_ALLOC(ndr
, r
->driver_path
);
14158 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->driver_path
, _ptr_driver_path
));
14160 r
->driver_path
= NULL
;
14162 ndr
->flags
= _flags_save_string
;
14165 uint32_t _flags_save_string
= ndr
->flags
;
14166 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14167 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_file
));
14168 if (_ptr_data_file
) {
14169 NDR_PULL_ALLOC(ndr
, r
->data_file
);
14170 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data_file
, _ptr_data_file
));
14172 r
->data_file
= NULL
;
14174 ndr
->flags
= _flags_save_string
;
14177 uint32_t _flags_save_string
= ndr
->flags
;
14178 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14179 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_config_file
));
14180 if (_ptr_config_file
) {
14181 NDR_PULL_ALLOC(ndr
, r
->config_file
);
14182 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->config_file
, _ptr_config_file
));
14184 r
->config_file
= NULL
;
14186 ndr
->flags
= _flags_save_string
;
14189 uint32_t _flags_save_string
= ndr
->flags
;
14190 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14191 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_help_file
));
14192 if (_ptr_help_file
) {
14193 NDR_PULL_ALLOC(ndr
, r
->help_file
);
14194 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->help_file
, _ptr_help_file
));
14196 r
->help_file
= NULL
;
14198 ndr
->flags
= _flags_save_string
;
14201 uint32_t _flags_save_string_array
= ndr
->flags
;
14202 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14203 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dependent_files
));
14204 if (_ptr_dependent_files
) {
14205 NDR_PULL_ALLOC(ndr
, r
->dependent_files
);
14206 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dependent_files
, _ptr_dependent_files
));
14208 r
->dependent_files
= NULL
;
14210 ndr
->flags
= _flags_save_string_array
;
14213 uint32_t _flags_save_string
= ndr
->flags
;
14214 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14215 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
14216 if (_ptr_monitor_name
) {
14217 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
14218 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
14220 r
->monitor_name
= NULL
;
14222 ndr
->flags
= _flags_save_string
;
14225 uint32_t _flags_save_string
= ndr
->flags
;
14226 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14227 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_default_datatype
));
14228 if (_ptr_default_datatype
) {
14229 NDR_PULL_ALLOC(ndr
, r
->default_datatype
);
14230 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->default_datatype
, _ptr_default_datatype
));
14232 r
->default_datatype
= NULL
;
14234 ndr
->flags
= _flags_save_string
;
14237 uint32_t _flags_save_string_array
= ndr
->flags
;
14238 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14239 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_previous_names
));
14240 if (_ptr_previous_names
) {
14241 NDR_PULL_ALLOC(ndr
, r
->previous_names
);
14242 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->previous_names
, _ptr_previous_names
));
14244 r
->previous_names
= NULL
;
14246 ndr
->flags
= _flags_save_string_array
;
14248 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
14249 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
14251 uint32_t _flags_save_string
= ndr
->flags
;
14252 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14253 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_name
));
14254 if (_ptr_manufacturer_name
) {
14255 NDR_PULL_ALLOC(ndr
, r
->manufacturer_name
);
14256 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->manufacturer_name
, _ptr_manufacturer_name
));
14258 r
->manufacturer_name
= NULL
;
14260 ndr
->flags
= _flags_save_string
;
14263 uint32_t _flags_save_string
= ndr
->flags
;
14264 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14265 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_manufacturer_url
));
14266 if (_ptr_manufacturer_url
) {
14267 NDR_PULL_ALLOC(ndr
, r
->manufacturer_url
);
14268 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->manufacturer_url
, _ptr_manufacturer_url
));
14270 r
->manufacturer_url
= NULL
;
14272 ndr
->flags
= _flags_save_string
;
14275 uint32_t _flags_save_string
= ndr
->flags
;
14276 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14277 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_hardware_id
));
14278 if (_ptr_hardware_id
) {
14279 NDR_PULL_ALLOC(ndr
, r
->hardware_id
);
14280 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->hardware_id
, _ptr_hardware_id
));
14282 r
->hardware_id
= NULL
;
14284 ndr
->flags
= _flags_save_string
;
14287 uint32_t _flags_save_string
= ndr
->flags
;
14288 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14289 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_provider
));
14290 if (_ptr_provider
) {
14291 NDR_PULL_ALLOC(ndr
, r
->provider
);
14292 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->provider
, _ptr_provider
));
14294 r
->provider
= NULL
;
14296 ndr
->flags
= _flags_save_string
;
14299 uint32_t _flags_save_string
= ndr
->flags
;
14300 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14301 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor
));
14302 if (_ptr_print_processor
) {
14303 NDR_PULL_ALLOC(ndr
, r
->print_processor
);
14304 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->print_processor
, _ptr_print_processor
));
14306 r
->print_processor
= NULL
;
14308 ndr
->flags
= _flags_save_string
;
14311 uint32_t _flags_save_string
= ndr
->flags
;
14312 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14313 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_vendor_setup
));
14314 if (_ptr_vendor_setup
) {
14315 NDR_PULL_ALLOC(ndr
, r
->vendor_setup
);
14316 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->vendor_setup
, _ptr_vendor_setup
));
14318 r
->vendor_setup
= NULL
;
14320 ndr
->flags
= _flags_save_string
;
14323 uint32_t _flags_save_string_array
= ndr
->flags
;
14324 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14325 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_color_profiles
));
14326 if (_ptr_color_profiles
) {
14327 NDR_PULL_ALLOC(ndr
, r
->color_profiles
);
14328 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->color_profiles
, _ptr_color_profiles
));
14330 r
->color_profiles
= NULL
;
14332 ndr
->flags
= _flags_save_string_array
;
14335 uint32_t _flags_save_string
= ndr
->flags
;
14336 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14337 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_inf_path
));
14338 if (_ptr_inf_path
) {
14339 NDR_PULL_ALLOC(ndr
, r
->inf_path
);
14340 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->inf_path
, _ptr_inf_path
));
14342 r
->inf_path
= NULL
;
14344 ndr
->flags
= _flags_save_string
;
14346 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->printer_driver_attributes
));
14348 uint32_t _flags_save_string_array
= ndr
->flags
;
14349 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14350 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_core_driver_dependencies
));
14351 if (_ptr_core_driver_dependencies
) {
14352 NDR_PULL_ALLOC(ndr
, r
->core_driver_dependencies
);
14353 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->core_driver_dependencies
, _ptr_core_driver_dependencies
));
14355 r
->core_driver_dependencies
= NULL
;
14357 ndr
->flags
= _flags_save_string_array
;
14359 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->min_inbox_driver_ver_date
));
14360 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->min_inbox_driver_ver_version
));
14361 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
14363 if (ndr_flags
& NDR_BUFFERS
) {
14365 uint32_t _flags_save_string
= ndr
->flags
;
14366 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14367 if (r
->driver_name
) {
14368 uint32_t _relative_save_offset
;
14369 _relative_save_offset
= ndr
->offset
;
14370 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_name
));
14371 _mem_save_driver_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14372 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_name
, 0);
14373 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_name
));
14374 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_name_0
, 0);
14375 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14376 ndr
->relative_highest_offset
= ndr
->offset
;
14378 ndr
->offset
= _relative_save_offset
;
14380 ndr
->flags
= _flags_save_string
;
14383 uint32_t _flags_save_string
= ndr
->flags
;
14384 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14385 if (r
->architecture
) {
14386 uint32_t _relative_save_offset
;
14387 _relative_save_offset
= ndr
->offset
;
14388 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->architecture
));
14389 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14390 NDR_PULL_SET_MEM_CTX(ndr
, r
->architecture
, 0);
14391 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->architecture
));
14392 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
14393 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14394 ndr
->relative_highest_offset
= ndr
->offset
;
14396 ndr
->offset
= _relative_save_offset
;
14398 ndr
->flags
= _flags_save_string
;
14401 uint32_t _flags_save_string
= ndr
->flags
;
14402 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14403 if (r
->driver_path
) {
14404 uint32_t _relative_save_offset
;
14405 _relative_save_offset
= ndr
->offset
;
14406 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->driver_path
));
14407 _mem_save_driver_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14408 NDR_PULL_SET_MEM_CTX(ndr
, r
->driver_path
, 0);
14409 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->driver_path
));
14410 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_path_0
, 0);
14411 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14412 ndr
->relative_highest_offset
= ndr
->offset
;
14414 ndr
->offset
= _relative_save_offset
;
14416 ndr
->flags
= _flags_save_string
;
14419 uint32_t _flags_save_string
= ndr
->flags
;
14420 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14421 if (r
->data_file
) {
14422 uint32_t _relative_save_offset
;
14423 _relative_save_offset
= ndr
->offset
;
14424 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data_file
));
14425 _mem_save_data_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14426 NDR_PULL_SET_MEM_CTX(ndr
, r
->data_file
, 0);
14427 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->data_file
));
14428 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_file_0
, 0);
14429 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14430 ndr
->relative_highest_offset
= ndr
->offset
;
14432 ndr
->offset
= _relative_save_offset
;
14434 ndr
->flags
= _flags_save_string
;
14437 uint32_t _flags_save_string
= ndr
->flags
;
14438 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14439 if (r
->config_file
) {
14440 uint32_t _relative_save_offset
;
14441 _relative_save_offset
= ndr
->offset
;
14442 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->config_file
));
14443 _mem_save_config_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14444 NDR_PULL_SET_MEM_CTX(ndr
, r
->config_file
, 0);
14445 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->config_file
));
14446 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_config_file_0
, 0);
14447 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14448 ndr
->relative_highest_offset
= ndr
->offset
;
14450 ndr
->offset
= _relative_save_offset
;
14452 ndr
->flags
= _flags_save_string
;
14455 uint32_t _flags_save_string
= ndr
->flags
;
14456 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14457 if (r
->help_file
) {
14458 uint32_t _relative_save_offset
;
14459 _relative_save_offset
= ndr
->offset
;
14460 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->help_file
));
14461 _mem_save_help_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14462 NDR_PULL_SET_MEM_CTX(ndr
, r
->help_file
, 0);
14463 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->help_file
));
14464 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_help_file_0
, 0);
14465 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14466 ndr
->relative_highest_offset
= ndr
->offset
;
14468 ndr
->offset
= _relative_save_offset
;
14470 ndr
->flags
= _flags_save_string
;
14473 uint32_t _flags_save_string_array
= ndr
->flags
;
14474 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14475 if (r
->dependent_files
) {
14476 uint32_t _relative_save_offset
;
14477 _relative_save_offset
= ndr
->offset
;
14478 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dependent_files
));
14479 _mem_save_dependent_files_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14480 NDR_PULL_SET_MEM_CTX(ndr
, r
->dependent_files
, 0);
14481 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->dependent_files
));
14482 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dependent_files_0
, 0);
14483 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14484 ndr
->relative_highest_offset
= ndr
->offset
;
14486 ndr
->offset
= _relative_save_offset
;
14488 ndr
->flags
= _flags_save_string_array
;
14491 uint32_t _flags_save_string
= ndr
->flags
;
14492 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14493 if (r
->monitor_name
) {
14494 uint32_t _relative_save_offset
;
14495 _relative_save_offset
= ndr
->offset
;
14496 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
14497 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14498 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
14499 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
14500 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
14501 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14502 ndr
->relative_highest_offset
= ndr
->offset
;
14504 ndr
->offset
= _relative_save_offset
;
14506 ndr
->flags
= _flags_save_string
;
14509 uint32_t _flags_save_string
= ndr
->flags
;
14510 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14511 if (r
->default_datatype
) {
14512 uint32_t _relative_save_offset
;
14513 _relative_save_offset
= ndr
->offset
;
14514 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->default_datatype
));
14515 _mem_save_default_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14516 NDR_PULL_SET_MEM_CTX(ndr
, r
->default_datatype
, 0);
14517 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->default_datatype
));
14518 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_default_datatype_0
, 0);
14519 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14520 ndr
->relative_highest_offset
= ndr
->offset
;
14522 ndr
->offset
= _relative_save_offset
;
14524 ndr
->flags
= _flags_save_string
;
14527 uint32_t _flags_save_string_array
= ndr
->flags
;
14528 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14529 if (r
->previous_names
) {
14530 uint32_t _relative_save_offset
;
14531 _relative_save_offset
= ndr
->offset
;
14532 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->previous_names
));
14533 _mem_save_previous_names_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14534 NDR_PULL_SET_MEM_CTX(ndr
, r
->previous_names
, 0);
14535 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->previous_names
));
14536 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_previous_names_0
, 0);
14537 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14538 ndr
->relative_highest_offset
= ndr
->offset
;
14540 ndr
->offset
= _relative_save_offset
;
14542 ndr
->flags
= _flags_save_string_array
;
14545 uint32_t _flags_save_string
= ndr
->flags
;
14546 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14547 if (r
->manufacturer_name
) {
14548 uint32_t _relative_save_offset
;
14549 _relative_save_offset
= ndr
->offset
;
14550 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->manufacturer_name
));
14551 _mem_save_manufacturer_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14552 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_name
, 0);
14553 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->manufacturer_name
));
14554 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_name_0
, 0);
14555 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14556 ndr
->relative_highest_offset
= ndr
->offset
;
14558 ndr
->offset
= _relative_save_offset
;
14560 ndr
->flags
= _flags_save_string
;
14563 uint32_t _flags_save_string
= ndr
->flags
;
14564 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14565 if (r
->manufacturer_url
) {
14566 uint32_t _relative_save_offset
;
14567 _relative_save_offset
= ndr
->offset
;
14568 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->manufacturer_url
));
14569 _mem_save_manufacturer_url_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14570 NDR_PULL_SET_MEM_CTX(ndr
, r
->manufacturer_url
, 0);
14571 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->manufacturer_url
));
14572 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_manufacturer_url_0
, 0);
14573 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14574 ndr
->relative_highest_offset
= ndr
->offset
;
14576 ndr
->offset
= _relative_save_offset
;
14578 ndr
->flags
= _flags_save_string
;
14581 uint32_t _flags_save_string
= ndr
->flags
;
14582 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14583 if (r
->hardware_id
) {
14584 uint32_t _relative_save_offset
;
14585 _relative_save_offset
= ndr
->offset
;
14586 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->hardware_id
));
14587 _mem_save_hardware_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14588 NDR_PULL_SET_MEM_CTX(ndr
, r
->hardware_id
, 0);
14589 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->hardware_id
));
14590 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_hardware_id_0
, 0);
14591 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14592 ndr
->relative_highest_offset
= ndr
->offset
;
14594 ndr
->offset
= _relative_save_offset
;
14596 ndr
->flags
= _flags_save_string
;
14599 uint32_t _flags_save_string
= ndr
->flags
;
14600 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14602 uint32_t _relative_save_offset
;
14603 _relative_save_offset
= ndr
->offset
;
14604 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->provider
));
14605 _mem_save_provider_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14606 NDR_PULL_SET_MEM_CTX(ndr
, r
->provider
, 0);
14607 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->provider
));
14608 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_provider_0
, 0);
14609 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14610 ndr
->relative_highest_offset
= ndr
->offset
;
14612 ndr
->offset
= _relative_save_offset
;
14614 ndr
->flags
= _flags_save_string
;
14617 uint32_t _flags_save_string
= ndr
->flags
;
14618 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14619 if (r
->print_processor
) {
14620 uint32_t _relative_save_offset
;
14621 _relative_save_offset
= ndr
->offset
;
14622 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->print_processor
));
14623 _mem_save_print_processor_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14624 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor
, 0);
14625 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->print_processor
));
14626 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_0
, 0);
14627 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14628 ndr
->relative_highest_offset
= ndr
->offset
;
14630 ndr
->offset
= _relative_save_offset
;
14632 ndr
->flags
= _flags_save_string
;
14635 uint32_t _flags_save_string
= ndr
->flags
;
14636 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14637 if (r
->vendor_setup
) {
14638 uint32_t _relative_save_offset
;
14639 _relative_save_offset
= ndr
->offset
;
14640 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->vendor_setup
));
14641 _mem_save_vendor_setup_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14642 NDR_PULL_SET_MEM_CTX(ndr
, r
->vendor_setup
, 0);
14643 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->vendor_setup
));
14644 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_vendor_setup_0
, 0);
14645 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14646 ndr
->relative_highest_offset
= ndr
->offset
;
14648 ndr
->offset
= _relative_save_offset
;
14650 ndr
->flags
= _flags_save_string
;
14653 uint32_t _flags_save_string_array
= ndr
->flags
;
14654 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14655 if (r
->color_profiles
) {
14656 uint32_t _relative_save_offset
;
14657 _relative_save_offset
= ndr
->offset
;
14658 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->color_profiles
));
14659 _mem_save_color_profiles_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14660 NDR_PULL_SET_MEM_CTX(ndr
, r
->color_profiles
, 0);
14661 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->color_profiles
));
14662 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_color_profiles_0
, 0);
14663 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14664 ndr
->relative_highest_offset
= ndr
->offset
;
14666 ndr
->offset
= _relative_save_offset
;
14668 ndr
->flags
= _flags_save_string_array
;
14671 uint32_t _flags_save_string
= ndr
->flags
;
14672 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14674 uint32_t _relative_save_offset
;
14675 _relative_save_offset
= ndr
->offset
;
14676 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->inf_path
));
14677 _mem_save_inf_path_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14678 NDR_PULL_SET_MEM_CTX(ndr
, r
->inf_path
, 0);
14679 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->inf_path
));
14680 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_inf_path_0
, 0);
14681 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14682 ndr
->relative_highest_offset
= ndr
->offset
;
14684 ndr
->offset
= _relative_save_offset
;
14686 ndr
->flags
= _flags_save_string
;
14689 uint32_t _flags_save_string_array
= ndr
->flags
;
14690 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14691 if (r
->core_driver_dependencies
) {
14692 uint32_t _relative_save_offset
;
14693 _relative_save_offset
= ndr
->offset
;
14694 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->core_driver_dependencies
));
14695 _mem_save_core_driver_dependencies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14696 NDR_PULL_SET_MEM_CTX(ndr
, r
->core_driver_dependencies
, 0);
14697 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->core_driver_dependencies
));
14698 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_core_driver_dependencies_0
, 0);
14699 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14700 ndr
->relative_highest_offset
= ndr
->offset
;
14702 ndr
->offset
= _relative_save_offset
;
14704 ndr
->flags
= _flags_save_string_array
;
14707 return NDR_ERR_SUCCESS
;
14710 _PUBLIC_
void ndr_print_spoolss_DriverInfo8(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo8
*r
)
14712 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo8");
14714 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
14715 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
14717 if (r
->driver_name
) {
14718 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
14721 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
14723 if (r
->architecture
) {
14724 ndr_print_string(ndr
, "architecture", r
->architecture
);
14727 ndr_print_ptr(ndr
, "driver_path", r
->driver_path
);
14729 if (r
->driver_path
) {
14730 ndr_print_string(ndr
, "driver_path", r
->driver_path
);
14733 ndr_print_ptr(ndr
, "data_file", r
->data_file
);
14735 if (r
->data_file
) {
14736 ndr_print_string(ndr
, "data_file", r
->data_file
);
14739 ndr_print_ptr(ndr
, "config_file", r
->config_file
);
14741 if (r
->config_file
) {
14742 ndr_print_string(ndr
, "config_file", r
->config_file
);
14745 ndr_print_ptr(ndr
, "help_file", r
->help_file
);
14747 if (r
->help_file
) {
14748 ndr_print_string(ndr
, "help_file", r
->help_file
);
14751 ndr_print_ptr(ndr
, "dependent_files", r
->dependent_files
);
14753 if (r
->dependent_files
) {
14754 ndr_print_string_array(ndr
, "dependent_files", r
->dependent_files
);
14757 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
14759 if (r
->monitor_name
) {
14760 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
14763 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
14765 if (r
->default_datatype
) {
14766 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
14769 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
14771 if (r
->previous_names
) {
14772 ndr_print_string_array(ndr
, "previous_names", r
->previous_names
);
14775 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
14776 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
14777 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
14779 if (r
->manufacturer_name
) {
14780 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
14783 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
14785 if (r
->manufacturer_url
) {
14786 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
14789 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
14791 if (r
->hardware_id
) {
14792 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
14795 ndr_print_ptr(ndr
, "provider", r
->provider
);
14798 ndr_print_string(ndr
, "provider", r
->provider
);
14801 ndr_print_ptr(ndr
, "print_processor", r
->print_processor
);
14803 if (r
->print_processor
) {
14804 ndr_print_string(ndr
, "print_processor", r
->print_processor
);
14807 ndr_print_ptr(ndr
, "vendor_setup", r
->vendor_setup
);
14809 if (r
->vendor_setup
) {
14810 ndr_print_string(ndr
, "vendor_setup", r
->vendor_setup
);
14813 ndr_print_ptr(ndr
, "color_profiles", r
->color_profiles
);
14815 if (r
->color_profiles
) {
14816 ndr_print_string_array(ndr
, "color_profiles", r
->color_profiles
);
14819 ndr_print_ptr(ndr
, "inf_path", r
->inf_path
);
14822 ndr_print_string(ndr
, "inf_path", r
->inf_path
);
14825 ndr_print_uint32(ndr
, "printer_driver_attributes", r
->printer_driver_attributes
);
14826 ndr_print_ptr(ndr
, "core_driver_dependencies", r
->core_driver_dependencies
);
14828 if (r
->core_driver_dependencies
) {
14829 ndr_print_string_array(ndr
, "core_driver_dependencies", r
->core_driver_dependencies
);
14832 ndr_print_NTTIME(ndr
, "min_inbox_driver_ver_date", r
->min_inbox_driver_ver_date
);
14833 ndr_print_hyper(ndr
, "min_inbox_driver_ver_version", r
->min_inbox_driver_ver_version
);
14837 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo8(const struct spoolss_DriverInfo8
*r
, struct smb_iconv_convenience
*ic
, int flags
)
14839 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo8
, ic
);
14842 static enum ndr_err_code
ndr_push_spoolss_DriverFileType(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_DriverFileType r
)
14844 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
14845 return NDR_ERR_SUCCESS
;
14848 static enum ndr_err_code
ndr_pull_spoolss_DriverFileType(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_DriverFileType
*r
)
14851 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
14853 return NDR_ERR_SUCCESS
;
14856 _PUBLIC_
void ndr_print_spoolss_DriverFileType(struct ndr_print
*ndr
, const char *name
, enum spoolss_DriverFileType r
)
14858 const char *val
= NULL
;
14861 case SPOOLSS_DRIVER_FILE_TYPE_RENDERING
: val
= "SPOOLSS_DRIVER_FILE_TYPE_RENDERING"; break;
14862 case SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION
: val
= "SPOOLSS_DRIVER_FILE_TYPE_CONFIGURATION"; break;
14863 case SPOOLSS_DRIVER_FILE_TYPE_DATA
: val
= "SPOOLSS_DRIVER_FILE_TYPE_DATA"; break;
14864 case SPOOLSS_DRIVER_FILE_TYPE_HELP
: val
= "SPOOLSS_DRIVER_FILE_TYPE_HELP"; break;
14865 case SPOOLSS_DRIVER_FILE_TYPE_OTHER
: val
= "SPOOLSS_DRIVER_FILE_TYPE_OTHER"; break;
14867 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
14870 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverFileInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverFileInfo
*r
)
14872 if (ndr_flags
& NDR_SCALARS
) {
14873 NDR_CHECK(ndr_push_align(ndr
, 5));
14875 uint32_t _flags_save_string
= ndr
->flags
;
14876 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14877 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->file_name
));
14878 ndr
->flags
= _flags_save_string
;
14880 NDR_CHECK(ndr_push_spoolss_DriverFileType(ndr
, NDR_SCALARS
, r
->file_type
));
14881 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->file_version
));
14882 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
14884 if (ndr_flags
& NDR_BUFFERS
) {
14886 uint32_t _flags_save_string
= ndr
->flags
;
14887 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14888 if (r
->file_name
) {
14889 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->file_name
));
14890 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->file_name
));
14891 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->file_name
));
14893 ndr
->flags
= _flags_save_string
;
14896 return NDR_ERR_SUCCESS
;
14899 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverFileInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverFileInfo
*r
)
14901 uint32_t _ptr_file_name
;
14902 TALLOC_CTX
*_mem_save_file_name_0
;
14903 if (ndr_flags
& NDR_SCALARS
) {
14904 NDR_CHECK(ndr_pull_align(ndr
, 5));
14906 uint32_t _flags_save_string
= ndr
->flags
;
14907 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14908 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_file_name
));
14909 if (_ptr_file_name
) {
14910 NDR_PULL_ALLOC(ndr
, r
->file_name
);
14911 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->file_name
, _ptr_file_name
));
14913 r
->file_name
= NULL
;
14915 ndr
->flags
= _flags_save_string
;
14917 NDR_CHECK(ndr_pull_spoolss_DriverFileType(ndr
, NDR_SCALARS
, &r
->file_type
));
14918 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->file_version
));
14919 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
14921 if (ndr_flags
& NDR_BUFFERS
) {
14923 uint32_t _flags_save_string
= ndr
->flags
;
14924 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
14925 if (r
->file_name
) {
14926 uint32_t _relative_save_offset
;
14927 _relative_save_offset
= ndr
->offset
;
14928 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->file_name
));
14929 _mem_save_file_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
14930 NDR_PULL_SET_MEM_CTX(ndr
, r
->file_name
, 0);
14931 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->file_name
));
14932 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_file_name_0
, 0);
14933 if (ndr
->offset
> ndr
->relative_highest_offset
) {
14934 ndr
->relative_highest_offset
= ndr
->offset
;
14936 ndr
->offset
= _relative_save_offset
;
14938 ndr
->flags
= _flags_save_string
;
14941 return NDR_ERR_SUCCESS
;
14944 _PUBLIC_
void ndr_print_spoolss_DriverFileInfo(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverFileInfo
*r
)
14946 ndr_print_struct(ndr
, name
, "spoolss_DriverFileInfo");
14948 ndr_print_ptr(ndr
, "file_name", r
->file_name
);
14950 if (r
->file_name
) {
14951 ndr_print_string(ndr
, "file_name", r
->file_name
);
14954 ndr_print_spoolss_DriverFileType(ndr
, "file_type", r
->file_type
);
14955 ndr_print_uint32(ndr
, "file_version", r
->file_version
);
14959 _PUBLIC_
void ndr_print_spoolss_DriverInfo101(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverInfo101
*r
)
14961 uint32_t cntr_file_info_1
;
14962 ndr_print_struct(ndr
, name
, "spoolss_DriverInfo101");
14964 ndr_print_spoolss_DriverOSVersion(ndr
, "version", r
->version
);
14965 ndr_print_ptr(ndr
, "driver_name", r
->driver_name
);
14967 if (r
->driver_name
) {
14968 ndr_print_string(ndr
, "driver_name", r
->driver_name
);
14971 ndr_print_ptr(ndr
, "architecture", r
->architecture
);
14973 if (r
->architecture
) {
14974 ndr_print_string(ndr
, "architecture", r
->architecture
);
14977 ndr_print_ptr(ndr
, "file_info", r
->file_info
);
14979 if (r
->file_info
) {
14980 ndr
->print(ndr
, "%s: ARRAY(%d)", "file_info", (int)r
->file_count
);
14982 for (cntr_file_info_1
=0;cntr_file_info_1
<r
->file_count
;cntr_file_info_1
++) {
14984 if (asprintf(&idx_1
, "[%d]", cntr_file_info_1
) != -1) {
14985 ndr_print_spoolss_DriverFileInfo(ndr
, "file_info", &r
->file_info
[cntr_file_info_1
]);
14992 ndr_print_uint32(ndr
, "file_count", r
->file_count
);
14993 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
14995 if (r
->monitor_name
) {
14996 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
14999 ndr_print_ptr(ndr
, "default_datatype", r
->default_datatype
);
15001 if (r
->default_datatype
) {
15002 ndr_print_string(ndr
, "default_datatype", r
->default_datatype
);
15005 ndr_print_ptr(ndr
, "previous_names", r
->previous_names
);
15007 if (r
->previous_names
) {
15008 ndr_print_string_array(ndr
, "previous_names", r
->previous_names
);
15011 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
15012 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
15013 ndr_print_ptr(ndr
, "manufacturer_name", r
->manufacturer_name
);
15015 if (r
->manufacturer_name
) {
15016 ndr_print_string(ndr
, "manufacturer_name", r
->manufacturer_name
);
15019 ndr_print_ptr(ndr
, "manufacturer_url", r
->manufacturer_url
);
15021 if (r
->manufacturer_url
) {
15022 ndr_print_string(ndr
, "manufacturer_url", r
->manufacturer_url
);
15025 ndr_print_ptr(ndr
, "hardware_id", r
->hardware_id
);
15027 if (r
->hardware_id
) {
15028 ndr_print_string(ndr
, "hardware_id", r
->hardware_id
);
15031 ndr_print_ptr(ndr
, "provider", r
->provider
);
15034 ndr_print_string(ndr
, "provider", r
->provider
);
15040 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo101(const struct spoolss_DriverInfo101
*r
, struct smb_iconv_convenience
*ic
, int flags
)
15042 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo101
, ic
);
15045 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_DriverInfo
*r
)
15047 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
15049 uint32_t _flags_save_UNION
= ndr
->flags
;
15050 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15051 if (ndr_flags
& NDR_SCALARS
) {
15052 int level
= ndr_push_get_switch_value(ndr
, r
);
15053 NDR_CHECK(ndr_push_union_align(ndr
, 8));
15056 NDR_CHECK(ndr_push_align(ndr
, 5));
15057 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15058 NDR_CHECK(ndr_push_spoolss_DriverInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15062 NDR_CHECK(ndr_push_align(ndr
, 5));
15063 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15064 NDR_CHECK(ndr_push_spoolss_DriverInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
15068 NDR_CHECK(ndr_push_align(ndr
, 5));
15069 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15070 NDR_CHECK(ndr_push_spoolss_DriverInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
15074 NDR_CHECK(ndr_push_align(ndr
, 5));
15075 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15076 NDR_CHECK(ndr_push_spoolss_DriverInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
15080 NDR_CHECK(ndr_push_align(ndr
, 5));
15081 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15082 NDR_CHECK(ndr_push_spoolss_DriverInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
15086 NDR_CHECK(ndr_push_align(ndr
, 8));
15087 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15088 NDR_CHECK(ndr_push_spoolss_DriverInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
15092 NDR_CHECK(ndr_push_align(ndr
, 5));
15093 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15094 NDR_CHECK(ndr_push_spoolss_DriverInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
15098 NDR_CHECK(ndr_push_align(ndr
, 8));
15099 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15100 NDR_CHECK(ndr_push_spoolss_DriverInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
15104 NDR_CHECK(ndr_push_align(ndr
, 8));
15105 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15106 NDR_CHECK(ndr_push_spoolss_DriverInfo101(ndr
, NDR_SCALARS
, &r
->info101
));
15114 if (ndr_flags
& NDR_BUFFERS
) {
15115 int level
= ndr_push_get_switch_value(ndr
, r
);
15116 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
15119 NDR_CHECK(ndr_push_spoolss_DriverInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
15123 NDR_CHECK(ndr_push_spoolss_DriverInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
15127 NDR_CHECK(ndr_push_spoolss_DriverInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
15131 NDR_CHECK(ndr_push_spoolss_DriverInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
15135 NDR_CHECK(ndr_push_spoolss_DriverInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
15139 NDR_CHECK(ndr_push_spoolss_DriverInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
15143 NDR_CHECK(ndr_push_spoolss_DriverInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
15147 NDR_CHECK(ndr_push_spoolss_DriverInfo8(ndr
, NDR_BUFFERS
, &r
->info8
));
15151 NDR_CHECK(ndr_push_spoolss_DriverInfo101(ndr
, NDR_BUFFERS
, &r
->info101
));
15159 ndr
->flags
= _flags_save_UNION
;
15161 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15162 return NDR_ERR_SUCCESS
;
15165 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_DriverInfo
*r
)
15167 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
15170 uint32_t _flags_save_UNION
= ndr
->flags
;
15171 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15172 level
= ndr_pull_get_switch_value(ndr
, r
);
15173 if (ndr_flags
& NDR_SCALARS
) {
15174 NDR_CHECK(ndr_pull_union_align(ndr
, 8));
15177 NDR_CHECK(ndr_pull_align(ndr
, 5));
15178 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15179 NDR_CHECK(ndr_pull_spoolss_DriverInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15183 NDR_CHECK(ndr_pull_align(ndr
, 5));
15184 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15185 NDR_CHECK(ndr_pull_spoolss_DriverInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
15189 NDR_CHECK(ndr_pull_align(ndr
, 5));
15190 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15191 NDR_CHECK(ndr_pull_spoolss_DriverInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
15195 NDR_CHECK(ndr_pull_align(ndr
, 5));
15196 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15197 NDR_CHECK(ndr_pull_spoolss_DriverInfo4(ndr
, NDR_SCALARS
, &r
->info4
));
15201 NDR_CHECK(ndr_pull_align(ndr
, 5));
15202 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15203 NDR_CHECK(ndr_pull_spoolss_DriverInfo5(ndr
, NDR_SCALARS
, &r
->info5
));
15207 NDR_CHECK(ndr_pull_align(ndr
, 8));
15208 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15209 NDR_CHECK(ndr_pull_spoolss_DriverInfo6(ndr
, NDR_SCALARS
, &r
->info6
));
15213 NDR_CHECK(ndr_pull_align(ndr
, 5));
15214 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15215 NDR_CHECK(ndr_pull_spoolss_DriverInfo7(ndr
, NDR_SCALARS
, &r
->info7
));
15219 NDR_CHECK(ndr_pull_align(ndr
, 8));
15220 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15221 NDR_CHECK(ndr_pull_spoolss_DriverInfo8(ndr
, NDR_SCALARS
, &r
->info8
));
15225 NDR_CHECK(ndr_pull_align(ndr
, 8));
15226 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15227 NDR_CHECK(ndr_pull_spoolss_DriverInfo101(ndr
, NDR_SCALARS
, &r
->info101
));
15235 if (ndr_flags
& NDR_BUFFERS
) {
15236 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
15239 NDR_CHECK(ndr_pull_spoolss_DriverInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
15243 NDR_CHECK(ndr_pull_spoolss_DriverInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
15247 NDR_CHECK(ndr_pull_spoolss_DriverInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
15251 NDR_CHECK(ndr_pull_spoolss_DriverInfo4(ndr
, NDR_BUFFERS
, &r
->info4
));
15255 NDR_CHECK(ndr_pull_spoolss_DriverInfo5(ndr
, NDR_BUFFERS
, &r
->info5
));
15259 NDR_CHECK(ndr_pull_spoolss_DriverInfo6(ndr
, NDR_BUFFERS
, &r
->info6
));
15263 NDR_CHECK(ndr_pull_spoolss_DriverInfo7(ndr
, NDR_BUFFERS
, &r
->info7
));
15267 NDR_CHECK(ndr_pull_spoolss_DriverInfo8(ndr
, NDR_BUFFERS
, &r
->info8
));
15271 NDR_CHECK(ndr_pull_spoolss_DriverInfo101(ndr
, NDR_BUFFERS
, &r
->info101
));
15279 ndr
->flags
= _flags_save_UNION
;
15281 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15282 return NDR_ERR_SUCCESS
;
15285 _PUBLIC_
void ndr_print_spoolss_DriverInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_DriverInfo
*r
)
15289 uint32_t _flags_save_UNION
= ndr
->flags
;
15290 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15291 level
= ndr_print_get_switch_value(ndr
, r
);
15292 ndr_print_union(ndr
, name
, level
, "spoolss_DriverInfo");
15295 ndr_print_spoolss_DriverInfo1(ndr
, "info1", &r
->info1
);
15299 ndr_print_spoolss_DriverInfo2(ndr
, "info2", &r
->info2
);
15303 ndr_print_spoolss_DriverInfo3(ndr
, "info3", &r
->info3
);
15307 ndr_print_spoolss_DriverInfo4(ndr
, "info4", &r
->info4
);
15311 ndr_print_spoolss_DriverInfo5(ndr
, "info5", &r
->info5
);
15315 ndr_print_spoolss_DriverInfo6(ndr
, "info6", &r
->info6
);
15319 ndr_print_spoolss_DriverInfo7(ndr
, "info7", &r
->info7
);
15323 ndr_print_spoolss_DriverInfo8(ndr
, "info8", &r
->info8
);
15327 ndr_print_spoolss_DriverInfo101(ndr
, "info101", &r
->info101
);
15334 ndr
->flags
= _flags_save_UNION
;
15338 _PUBLIC_
size_t ndr_size_spoolss_DriverInfo(const union spoolss_DriverInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
15340 flags
|= LIBNDR_FLAG_RELATIVE_REVERSE
;
15341 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverInfo
, ic
);
15344 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverDirectoryInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DriverDirectoryInfo1
*r
)
15346 if (ndr_flags
& NDR_SCALARS
) {
15347 NDR_CHECK(ndr_push_align(ndr
, 4));
15349 uint32_t _flags_save_string
= ndr
->flags
;
15350 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15351 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->directory_name
));
15352 ndr
->flags
= _flags_save_string
;
15354 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
15356 if (ndr_flags
& NDR_BUFFERS
) {
15358 return NDR_ERR_SUCCESS
;
15361 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverDirectoryInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DriverDirectoryInfo1
*r
)
15363 if (ndr_flags
& NDR_SCALARS
) {
15364 NDR_CHECK(ndr_pull_align(ndr
, 4));
15366 uint32_t _flags_save_string
= ndr
->flags
;
15367 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15368 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->directory_name
));
15369 ndr
->flags
= _flags_save_string
;
15371 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
15373 if (ndr_flags
& NDR_BUFFERS
) {
15375 return NDR_ERR_SUCCESS
;
15378 _PUBLIC_
void ndr_print_spoolss_DriverDirectoryInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DriverDirectoryInfo1
*r
)
15380 ndr_print_struct(ndr
, name
, "spoolss_DriverDirectoryInfo1");
15382 ndr_print_string(ndr
, "directory_name", r
->directory_name
);
15386 _PUBLIC_
size_t ndr_size_spoolss_DriverDirectoryInfo1(const struct spoolss_DriverDirectoryInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
15388 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverDirectoryInfo1
, ic
);
15391 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DriverDirectoryInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_DriverDirectoryInfo
*r
)
15393 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
15395 uint32_t _flags_save_UNION
= ndr
->flags
;
15396 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15397 if (ndr_flags
& NDR_SCALARS
) {
15398 int level
= ndr_push_get_switch_value(ndr
, r
);
15399 NDR_CHECK(ndr_push_union_align(ndr
, 4));
15402 NDR_CHECK(ndr_push_align(ndr
, 4));
15403 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15404 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15408 NDR_CHECK(ndr_push_align(ndr
, 4));
15409 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15410 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15415 if (ndr_flags
& NDR_BUFFERS
) {
15416 int level
= ndr_push_get_switch_value(ndr
, r
);
15417 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
15427 ndr
->flags
= _flags_save_UNION
;
15429 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15430 return NDR_ERR_SUCCESS
;
15433 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DriverDirectoryInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_DriverDirectoryInfo
*r
)
15435 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
15438 uint32_t _flags_save_UNION
= ndr
->flags
;
15439 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15440 level
= ndr_pull_get_switch_value(ndr
, r
);
15441 if (ndr_flags
& NDR_SCALARS
) {
15442 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
15445 NDR_CHECK(ndr_pull_align(ndr
, 4));
15446 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15447 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15451 NDR_CHECK(ndr_pull_align(ndr
, 4));
15452 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15453 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15458 if (ndr_flags
& NDR_BUFFERS
) {
15459 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
15469 ndr
->flags
= _flags_save_UNION
;
15471 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15472 return NDR_ERR_SUCCESS
;
15475 _PUBLIC_
void ndr_print_spoolss_DriverDirectoryInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_DriverDirectoryInfo
*r
)
15479 uint32_t _flags_save_UNION
= ndr
->flags
;
15480 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15481 level
= ndr_print_get_switch_value(ndr
, r
);
15482 ndr_print_union(ndr
, name
, level
, "spoolss_DriverDirectoryInfo");
15485 ndr_print_spoolss_DriverDirectoryInfo1(ndr
, "info1", &r
->info1
);
15489 ndr_print_spoolss_DriverDirectoryInfo1(ndr
, "info1", &r
->info1
);
15493 ndr
->flags
= _flags_save_UNION
;
15497 _PUBLIC_
size_t ndr_size_spoolss_DriverDirectoryInfo(const union spoolss_DriverDirectoryInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
15499 flags
|= LIBNDR_FLAG_RELATIVE_REVERSE
;
15500 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_DriverDirectoryInfo
, ic
);
15503 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcessorInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrintProcessorInfo1
*r
)
15505 if (ndr_flags
& NDR_SCALARS
) {
15506 NDR_CHECK(ndr_push_align(ndr
, 5));
15508 uint32_t _flags_save_string
= ndr
->flags
;
15509 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15510 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->print_processor_name
));
15511 ndr
->flags
= _flags_save_string
;
15513 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
15515 if (ndr_flags
& NDR_BUFFERS
) {
15517 uint32_t _flags_save_string
= ndr
->flags
;
15518 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15519 if (r
->print_processor_name
) {
15520 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->print_processor_name
));
15521 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->print_processor_name
));
15522 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->print_processor_name
));
15524 ndr
->flags
= _flags_save_string
;
15527 return NDR_ERR_SUCCESS
;
15530 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcessorInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrintProcessorInfo1
*r
)
15532 uint32_t _ptr_print_processor_name
;
15533 TALLOC_CTX
*_mem_save_print_processor_name_0
;
15534 if (ndr_flags
& NDR_SCALARS
) {
15535 NDR_CHECK(ndr_pull_align(ndr
, 5));
15537 uint32_t _flags_save_string
= ndr
->flags
;
15538 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15539 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor_name
));
15540 if (_ptr_print_processor_name
) {
15541 NDR_PULL_ALLOC(ndr
, r
->print_processor_name
);
15542 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->print_processor_name
, _ptr_print_processor_name
));
15544 r
->print_processor_name
= NULL
;
15546 ndr
->flags
= _flags_save_string
;
15548 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
15550 if (ndr_flags
& NDR_BUFFERS
) {
15552 uint32_t _flags_save_string
= ndr
->flags
;
15553 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15554 if (r
->print_processor_name
) {
15555 uint32_t _relative_save_offset
;
15556 _relative_save_offset
= ndr
->offset
;
15557 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->print_processor_name
));
15558 _mem_save_print_processor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15559 NDR_PULL_SET_MEM_CTX(ndr
, r
->print_processor_name
, 0);
15560 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->print_processor_name
));
15561 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_name_0
, 0);
15562 if (ndr
->offset
> ndr
->relative_highest_offset
) {
15563 ndr
->relative_highest_offset
= ndr
->offset
;
15565 ndr
->offset
= _relative_save_offset
;
15567 ndr
->flags
= _flags_save_string
;
15570 return NDR_ERR_SUCCESS
;
15573 _PUBLIC_
void ndr_print_spoolss_PrintProcessorInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrintProcessorInfo1
*r
)
15575 ndr_print_struct(ndr
, name
, "spoolss_PrintProcessorInfo1");
15577 ndr_print_ptr(ndr
, "print_processor_name", r
->print_processor_name
);
15579 if (r
->print_processor_name
) {
15580 ndr_print_string(ndr
, "print_processor_name", r
->print_processor_name
);
15586 _PUBLIC_
size_t ndr_size_spoolss_PrintProcessorInfo1(const struct spoolss_PrintProcessorInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
15588 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrintProcessorInfo1
, ic
);
15591 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcessorInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrintProcessorInfo
*r
)
15593 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
15595 uint32_t _flags_save_UNION
= ndr
->flags
;
15596 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15597 if (ndr_flags
& NDR_SCALARS
) {
15598 int level
= ndr_push_get_switch_value(ndr
, r
);
15599 NDR_CHECK(ndr_push_union_align(ndr
, 5));
15602 NDR_CHECK(ndr_push_align(ndr
, 5));
15603 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15604 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15612 if (ndr_flags
& NDR_BUFFERS
) {
15613 int level
= ndr_push_get_switch_value(ndr
, r
);
15614 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
15617 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
15625 ndr
->flags
= _flags_save_UNION
;
15627 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15628 return NDR_ERR_SUCCESS
;
15631 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcessorInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrintProcessorInfo
*r
)
15633 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
15636 uint32_t _flags_save_UNION
= ndr
->flags
;
15637 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15638 level
= ndr_pull_get_switch_value(ndr
, r
);
15639 if (ndr_flags
& NDR_SCALARS
) {
15640 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
15643 NDR_CHECK(ndr_pull_align(ndr
, 5));
15644 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15645 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15653 if (ndr_flags
& NDR_BUFFERS
) {
15654 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
15657 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
15665 ndr
->flags
= _flags_save_UNION
;
15667 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15668 return NDR_ERR_SUCCESS
;
15671 _PUBLIC_
void ndr_print_spoolss_PrintProcessorInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrintProcessorInfo
*r
)
15675 uint32_t _flags_save_UNION
= ndr
->flags
;
15676 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15677 level
= ndr_print_get_switch_value(ndr
, r
);
15678 ndr_print_union(ndr
, name
, level
, "spoolss_PrintProcessorInfo");
15681 ndr_print_spoolss_PrintProcessorInfo1(ndr
, "info1", &r
->info1
);
15688 ndr
->flags
= _flags_save_UNION
;
15692 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcessorDirectoryInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrintProcessorDirectoryInfo1
*r
)
15694 if (ndr_flags
& NDR_SCALARS
) {
15695 NDR_CHECK(ndr_push_align(ndr
, 4));
15697 uint32_t _flags_save_string
= ndr
->flags
;
15698 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15699 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->directory_name
));
15700 ndr
->flags
= _flags_save_string
;
15702 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
15704 if (ndr_flags
& NDR_BUFFERS
) {
15706 return NDR_ERR_SUCCESS
;
15709 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcessorDirectoryInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrintProcessorDirectoryInfo1
*r
)
15711 if (ndr_flags
& NDR_SCALARS
) {
15712 NDR_CHECK(ndr_pull_align(ndr
, 4));
15714 uint32_t _flags_save_string
= ndr
->flags
;
15715 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
15716 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->directory_name
));
15717 ndr
->flags
= _flags_save_string
;
15719 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
15721 if (ndr_flags
& NDR_BUFFERS
) {
15723 return NDR_ERR_SUCCESS
;
15726 _PUBLIC_
void ndr_print_spoolss_PrintProcessorDirectoryInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrintProcessorDirectoryInfo1
*r
)
15728 ndr_print_struct(ndr
, name
, "spoolss_PrintProcessorDirectoryInfo1");
15730 ndr_print_string(ndr
, "directory_name", r
->directory_name
);
15734 _PUBLIC_
size_t ndr_size_spoolss_PrintProcessorDirectoryInfo1(const struct spoolss_PrintProcessorDirectoryInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
15736 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrintProcessorDirectoryInfo1
, ic
);
15739 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcessorDirectoryInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrintProcessorDirectoryInfo
*r
)
15741 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
15743 uint32_t _flags_save_UNION
= ndr
->flags
;
15744 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15745 if (ndr_flags
& NDR_SCALARS
) {
15746 int level
= ndr_push_get_switch_value(ndr
, r
);
15747 NDR_CHECK(ndr_push_union_align(ndr
, 4));
15750 NDR_CHECK(ndr_push_align(ndr
, 4));
15751 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15752 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15756 NDR_CHECK(ndr_push_align(ndr
, 4));
15757 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15758 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15763 if (ndr_flags
& NDR_BUFFERS
) {
15764 int level
= ndr_push_get_switch_value(ndr
, r
);
15765 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
15775 ndr
->flags
= _flags_save_UNION
;
15777 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15778 return NDR_ERR_SUCCESS
;
15781 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcessorDirectoryInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrintProcessorDirectoryInfo
*r
)
15783 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
15786 uint32_t _flags_save_UNION
= ndr
->flags
;
15787 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15788 level
= ndr_pull_get_switch_value(ndr
, r
);
15789 if (ndr_flags
& NDR_SCALARS
) {
15790 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
15793 NDR_CHECK(ndr_pull_align(ndr
, 4));
15794 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15795 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15799 NDR_CHECK(ndr_pull_align(ndr
, 4));
15800 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
15801 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
15806 if (ndr_flags
& NDR_BUFFERS
) {
15807 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
15817 ndr
->flags
= _flags_save_UNION
;
15819 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
15820 return NDR_ERR_SUCCESS
;
15823 _PUBLIC_
void ndr_print_spoolss_PrintProcessorDirectoryInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrintProcessorDirectoryInfo
*r
)
15827 uint32_t _flags_save_UNION
= ndr
->flags
;
15828 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
15829 level
= ndr_print_get_switch_value(ndr
, r
);
15830 ndr_print_union(ndr
, name
, level
, "spoolss_PrintProcessorDirectoryInfo");
15833 ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr
, "info1", &r
->info1
);
15837 ndr_print_spoolss_PrintProcessorDirectoryInfo1(ndr
, "info1", &r
->info1
);
15841 ndr
->flags
= _flags_save_UNION
;
15845 _PUBLIC_
size_t ndr_size_spoolss_PrintProcessorDirectoryInfo(const union spoolss_PrintProcessorDirectoryInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
15847 flags
|= LIBNDR_FLAG_RELATIVE_REVERSE
;
15848 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrintProcessorDirectoryInfo
, ic
);
15851 static enum ndr_err_code
ndr_push_spoolss_DocumentInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_DocumentInfo1
*r
)
15853 if (ndr_flags
& NDR_SCALARS
) {
15854 NDR_CHECK(ndr_push_align(ndr
, 5));
15855 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->document_name
));
15856 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->output_file
));
15857 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->datatype
));
15858 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
15860 if (ndr_flags
& NDR_BUFFERS
) {
15861 if (r
->document_name
) {
15862 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
15863 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
15864 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->document_name
, CH_UTF16
)));
15865 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->document_name
, ndr_charset_length(r
->document_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
15867 if (r
->output_file
) {
15868 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->output_file
, CH_UTF16
)));
15869 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
15870 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->output_file
, CH_UTF16
)));
15871 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->output_file
, ndr_charset_length(r
->output_file
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
15874 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->datatype
, CH_UTF16
)));
15875 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
15876 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->datatype
, CH_UTF16
)));
15877 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->datatype
, ndr_charset_length(r
->datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
15880 return NDR_ERR_SUCCESS
;
15883 static enum ndr_err_code
ndr_pull_spoolss_DocumentInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_DocumentInfo1
*r
)
15885 uint32_t _ptr_document_name
;
15886 TALLOC_CTX
*_mem_save_document_name_0
;
15887 uint32_t _ptr_output_file
;
15888 TALLOC_CTX
*_mem_save_output_file_0
;
15889 uint32_t _ptr_datatype
;
15890 TALLOC_CTX
*_mem_save_datatype_0
;
15891 if (ndr_flags
& NDR_SCALARS
) {
15892 NDR_CHECK(ndr_pull_align(ndr
, 5));
15893 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_document_name
));
15894 if (_ptr_document_name
) {
15895 NDR_PULL_ALLOC(ndr
, r
->document_name
);
15897 r
->document_name
= NULL
;
15899 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_output_file
));
15900 if (_ptr_output_file
) {
15901 NDR_PULL_ALLOC(ndr
, r
->output_file
);
15903 r
->output_file
= NULL
;
15905 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
15906 if (_ptr_datatype
) {
15907 NDR_PULL_ALLOC(ndr
, r
->datatype
);
15909 r
->datatype
= NULL
;
15911 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
15913 if (ndr_flags
& NDR_BUFFERS
) {
15914 if (r
->document_name
) {
15915 _mem_save_document_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15916 NDR_PULL_SET_MEM_CTX(ndr
, r
->document_name
, 0);
15917 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->document_name
));
15918 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->document_name
));
15919 if (ndr_get_array_length(ndr
, &r
->document_name
) > ndr_get_array_size(ndr
, &r
->document_name
)) {
15920 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
));
15922 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t)));
15923 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->document_name
, ndr_get_array_length(ndr
, &r
->document_name
), sizeof(uint16_t), CH_UTF16
));
15924 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_document_name_0
, 0);
15926 if (r
->output_file
) {
15927 _mem_save_output_file_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15928 NDR_PULL_SET_MEM_CTX(ndr
, r
->output_file
, 0);
15929 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->output_file
));
15930 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->output_file
));
15931 if (ndr_get_array_length(ndr
, &r
->output_file
) > ndr_get_array_size(ndr
, &r
->output_file
)) {
15932 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
));
15934 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->output_file
), sizeof(uint16_t)));
15935 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->output_file
, ndr_get_array_length(ndr
, &r
->output_file
), sizeof(uint16_t), CH_UTF16
));
15936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_output_file_0
, 0);
15939 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
15940 NDR_PULL_SET_MEM_CTX(ndr
, r
->datatype
, 0);
15941 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->datatype
));
15942 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->datatype
));
15943 if (ndr_get_array_length(ndr
, &r
->datatype
) > ndr_get_array_size(ndr
, &r
->datatype
)) {
15944 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
));
15946 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->datatype
), sizeof(uint16_t)));
15947 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->datatype
, ndr_get_array_length(ndr
, &r
->datatype
), sizeof(uint16_t), CH_UTF16
));
15948 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
15951 return NDR_ERR_SUCCESS
;
15954 _PUBLIC_
void ndr_print_spoolss_DocumentInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_DocumentInfo1
*r
)
15956 ndr_print_struct(ndr
, name
, "spoolss_DocumentInfo1");
15958 ndr_print_ptr(ndr
, "document_name", r
->document_name
);
15960 if (r
->document_name
) {
15961 ndr_print_string(ndr
, "document_name", r
->document_name
);
15964 ndr_print_ptr(ndr
, "output_file", r
->output_file
);
15966 if (r
->output_file
) {
15967 ndr_print_string(ndr
, "output_file", r
->output_file
);
15970 ndr_print_ptr(ndr
, "datatype", r
->datatype
);
15973 ndr_print_string(ndr
, "datatype", r
->datatype
);
15979 static enum ndr_err_code
ndr_push_spoolss_DocumentInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_DocumentInfo
*r
)
15981 if (ndr_flags
& NDR_SCALARS
) {
15982 int level
= ndr_push_get_switch_value(ndr
, r
);
15983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
15984 NDR_CHECK(ndr_push_union_align(ndr
, 5));
15987 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
16001 if (ndr_flags
& NDR_BUFFERS
) {
16002 int level
= ndr_push_get_switch_value(ndr
, r
);
16006 NDR_CHECK(ndr_push_spoolss_DocumentInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
16021 return NDR_ERR_SUCCESS
;
16024 static enum ndr_err_code
ndr_pull_spoolss_DocumentInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_DocumentInfo
*r
)
16028 TALLOC_CTX
*_mem_save_info1_0
;
16029 level
= ndr_pull_get_switch_value(ndr
, r
);
16030 if (ndr_flags
& NDR_SCALARS
) {
16031 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
16032 if (_level
!= level
) {
16033 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
16035 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
16038 uint32_t _ptr_info1
;
16039 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
16041 NDR_PULL_ALLOC(ndr
, r
->info1
);
16058 if (ndr_flags
& NDR_BUFFERS
) {
16062 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16063 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
16064 NDR_CHECK(ndr_pull_spoolss_DocumentInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
16065 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
16080 return NDR_ERR_SUCCESS
;
16083 _PUBLIC_
void ndr_print_spoolss_DocumentInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_DocumentInfo
*r
)
16086 level
= ndr_print_get_switch_value(ndr
, r
);
16087 ndr_print_union(ndr
, name
, level
, "spoolss_DocumentInfo");
16090 ndr_print_ptr(ndr
, "info1", r
->info1
);
16093 ndr_print_spoolss_DocumentInfo1(ndr
, "info1", r
->info1
);
16110 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_OSVersion(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_OSVersion
*r
)
16112 if (ndr_flags
& NDR_SCALARS
) {
16113 NDR_CHECK(ndr_push_align(ndr
, 4));
16114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_spoolss_OSVersion(r
, ndr
->iconv_convenience
, ndr
->flags
)));
16115 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->major
));
16116 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->minor
));
16117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->build
));
16118 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
16120 uint32_t _flags_save_string
= ndr
->flags
;
16121 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16123 struct ndr_push
*_ndr_extra_string
;
16124 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_extra_string
, 0, 256));
16125 NDR_CHECK(ndr_push_string(_ndr_extra_string
, NDR_SCALARS
, r
->extra_string
));
16126 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_extra_string
, 0, 256));
16128 ndr
->flags
= _flags_save_string
;
16130 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
16132 if (ndr_flags
& NDR_BUFFERS
) {
16134 return NDR_ERR_SUCCESS
;
16137 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_OSVersion(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_OSVersion
*r
)
16139 if (ndr_flags
& NDR_SCALARS
) {
16140 NDR_CHECK(ndr_pull_align(ndr
, 4));
16141 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size
));
16142 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->major
));
16143 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->minor
));
16144 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->build
));
16145 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->platform_id
));
16147 uint32_t _flags_save_string
= ndr
->flags
;
16148 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16150 struct ndr_pull
*_ndr_extra_string
;
16151 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_extra_string
, 0, 256));
16152 NDR_CHECK(ndr_pull_string(_ndr_extra_string
, NDR_SCALARS
, &r
->extra_string
));
16153 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_extra_string
, 0, 256));
16155 ndr
->flags
= _flags_save_string
;
16157 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
16159 if (ndr_flags
& NDR_BUFFERS
) {
16161 return NDR_ERR_SUCCESS
;
16164 _PUBLIC_
void ndr_print_spoolss_OSVersion(struct ndr_print
*ndr
, const char *name
, const struct spoolss_OSVersion
*r
)
16166 ndr_print_struct(ndr
, name
, "spoolss_OSVersion");
16168 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
);
16169 ndr_print_uint32(ndr
, "major", r
->major
);
16170 ndr_print_uint32(ndr
, "minor", r
->minor
);
16171 ndr_print_uint32(ndr
, "build", r
->build
);
16172 ndr_print_uint32(ndr
, "platform_id", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->platform_id
);
16173 ndr_print_string(ndr
, "extra_string", r
->extra_string
);
16177 _PUBLIC_
size_t ndr_size_spoolss_OSVersion(const struct spoolss_OSVersion
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16179 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_OSVersion
, ic
);
16182 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_OSVersionEx(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_OSVersionEx
*r
)
16184 if (ndr_flags
& NDR_SCALARS
) {
16185 NDR_CHECK(ndr_push_align(ndr
, 4));
16186 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, ndr_size_spoolss_OSVersionEx(r
, ndr
->iconv_convenience
, ndr
->flags
)));
16187 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->major
));
16188 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->minor
));
16189 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->build
));
16190 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
16192 uint32_t _flags_save_string
= ndr
->flags
;
16193 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16195 struct ndr_push
*_ndr_extra_string
;
16196 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_extra_string
, 0, 256));
16197 NDR_CHECK(ndr_push_string(_ndr_extra_string
, NDR_SCALARS
, r
->extra_string
));
16198 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_extra_string
, 0, 256));
16200 ndr
->flags
= _flags_save_string
;
16202 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->service_pack_major
));
16203 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->service_pack_minor
));
16204 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->suite_mask
));
16205 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->product_type
));
16206 NDR_CHECK(ndr_push_uint8(ndr
, NDR_SCALARS
, r
->reserved
));
16207 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
16209 if (ndr_flags
& NDR_BUFFERS
) {
16211 return NDR_ERR_SUCCESS
;
16214 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_OSVersionEx(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_OSVersionEx
*r
)
16216 if (ndr_flags
& NDR_SCALARS
) {
16217 NDR_CHECK(ndr_pull_align(ndr
, 4));
16218 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->_ndr_size
));
16219 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->major
));
16220 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->minor
));
16221 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->build
));
16222 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->platform_id
));
16224 uint32_t _flags_save_string
= ndr
->flags
;
16225 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16227 struct ndr_pull
*_ndr_extra_string
;
16228 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_extra_string
, 0, 256));
16229 NDR_CHECK(ndr_pull_string(_ndr_extra_string
, NDR_SCALARS
, &r
->extra_string
));
16230 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_extra_string
, 0, 256));
16232 ndr
->flags
= _flags_save_string
;
16234 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->service_pack_major
));
16235 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->service_pack_minor
));
16236 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->suite_mask
));
16237 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->product_type
));
16238 NDR_CHECK(ndr_pull_uint8(ndr
, NDR_SCALARS
, &r
->reserved
));
16239 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
16241 if (ndr_flags
& NDR_BUFFERS
) {
16243 return NDR_ERR_SUCCESS
;
16246 _PUBLIC_
void ndr_print_spoolss_OSVersionEx(struct ndr_print
*ndr
, const char *name
, const struct spoolss_OSVersionEx
*r
)
16248 ndr_print_struct(ndr
, name
, "spoolss_OSVersionEx");
16250 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
);
16251 ndr_print_uint32(ndr
, "major", r
->major
);
16252 ndr_print_uint32(ndr
, "minor", r
->minor
);
16253 ndr_print_uint32(ndr
, "build", r
->build
);
16254 ndr_print_uint32(ndr
, "platform_id", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->platform_id
);
16255 ndr_print_string(ndr
, "extra_string", r
->extra_string
);
16256 ndr_print_uint16(ndr
, "service_pack_major", r
->service_pack_major
);
16257 ndr_print_uint16(ndr
, "service_pack_minor", r
->service_pack_minor
);
16258 ndr_print_uint16(ndr
, "suite_mask", r
->suite_mask
);
16259 ndr_print_uint8(ndr
, "product_type", r
->product_type
);
16260 ndr_print_uint8(ndr
, "reserved", r
->reserved
);
16264 _PUBLIC_
size_t ndr_size_spoolss_OSVersionEx(const struct spoolss_OSVersionEx
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16266 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_OSVersionEx
, ic
);
16269 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterData(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrinterData
*r
)
16271 if (ndr_flags
& NDR_SCALARS
) {
16272 int level
= ndr_push_get_switch_value(ndr
, r
);
16273 NDR_CHECK(ndr_push_union_align(ndr
, 4));
16280 uint32_t _flags_save_string
= ndr
->flags
;
16281 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16282 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->string
));
16283 ndr
->flags
= _flags_save_string
;
16289 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
16290 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
16291 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->binary
));
16292 ndr
->flags
= _flags_save_DATA_BLOB
;
16297 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->value
));
16300 case REG_MULTI_SZ
: {
16302 uint32_t _flags_save_string_array
= ndr
->flags
;
16303 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16304 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->string_array
));
16305 ndr
->flags
= _flags_save_string_array
;
16311 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
16312 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
16313 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->data
));
16314 ndr
->flags
= _flags_save_DATA_BLOB
;
16320 if (ndr_flags
& NDR_BUFFERS
) {
16321 int level
= ndr_push_get_switch_value(ndr
, r
);
16343 return NDR_ERR_SUCCESS
;
16346 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterData(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrinterData
*r
)
16349 level
= ndr_pull_get_switch_value(ndr
, r
);
16350 if (ndr_flags
& NDR_SCALARS
) {
16351 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
16358 uint32_t _flags_save_string
= ndr
->flags
;
16359 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16360 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->string
));
16361 ndr
->flags
= _flags_save_string
;
16367 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
16368 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
16369 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->binary
));
16370 ndr
->flags
= _flags_save_DATA_BLOB
;
16375 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->value
));
16378 case REG_MULTI_SZ
: {
16380 uint32_t _flags_save_string_array
= ndr
->flags
;
16381 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16382 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->string_array
));
16383 ndr
->flags
= _flags_save_string_array
;
16389 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
16390 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
16391 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->data
));
16392 ndr
->flags
= _flags_save_DATA_BLOB
;
16398 if (ndr_flags
& NDR_BUFFERS
) {
16420 return NDR_ERR_SUCCESS
;
16423 _PUBLIC_
void ndr_print_spoolss_PrinterData(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrinterData
*r
)
16426 level
= ndr_print_get_switch_value(ndr
, r
);
16427 ndr_print_union(ndr
, name
, level
, "spoolss_PrinterData");
16433 ndr_print_string(ndr
, "string", r
->string
);
16437 ndr_print_DATA_BLOB(ndr
, "binary", r
->binary
);
16441 ndr_print_uint32(ndr
, "value", r
->value
);
16445 ndr_print_string_array(ndr
, "string_array", r
->string_array
);
16449 ndr_print_DATA_BLOB(ndr
, "data", r
->data
);
16455 static enum ndr_err_code
ndr_push_spoolss_FormFlags(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_FormFlags r
)
16457 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
16458 return NDR_ERR_SUCCESS
;
16461 static enum ndr_err_code
ndr_pull_spoolss_FormFlags(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_FormFlags
*r
)
16464 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
16466 return NDR_ERR_SUCCESS
;
16469 _PUBLIC_
void ndr_print_spoolss_FormFlags(struct ndr_print
*ndr
, const char *name
, enum spoolss_FormFlags r
)
16471 const char *val
= NULL
;
16474 case SPOOLSS_FORM_USER
: val
= "SPOOLSS_FORM_USER"; break;
16475 case SPOOLSS_FORM_BUILTIN
: val
= "SPOOLSS_FORM_BUILTIN"; break;
16476 case SPOOLSS_FORM_PRINTER
: val
= "SPOOLSS_FORM_PRINTER"; break;
16478 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
16481 static enum ndr_err_code
ndr_push_spoolss_FormSize(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_FormSize
*r
)
16483 if (ndr_flags
& NDR_SCALARS
) {
16484 NDR_CHECK(ndr_push_align(ndr
, 4));
16485 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->width
));
16486 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->height
));
16487 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
16489 if (ndr_flags
& NDR_BUFFERS
) {
16491 return NDR_ERR_SUCCESS
;
16494 static enum ndr_err_code
ndr_pull_spoolss_FormSize(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_FormSize
*r
)
16496 if (ndr_flags
& NDR_SCALARS
) {
16497 NDR_CHECK(ndr_pull_align(ndr
, 4));
16498 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->width
));
16499 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->height
));
16500 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
16502 if (ndr_flags
& NDR_BUFFERS
) {
16504 return NDR_ERR_SUCCESS
;
16507 _PUBLIC_
void ndr_print_spoolss_FormSize(struct ndr_print
*ndr
, const char *name
, const struct spoolss_FormSize
*r
)
16509 ndr_print_struct(ndr
, name
, "spoolss_FormSize");
16511 ndr_print_uint32(ndr
, "width", r
->width
);
16512 ndr_print_uint32(ndr
, "height", r
->height
);
16516 static enum ndr_err_code
ndr_push_spoolss_FormArea(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_FormArea
*r
)
16518 if (ndr_flags
& NDR_SCALARS
) {
16519 NDR_CHECK(ndr_push_align(ndr
, 4));
16520 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->left
));
16521 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->top
));
16522 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->right
));
16523 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->bottom
));
16524 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
16526 if (ndr_flags
& NDR_BUFFERS
) {
16528 return NDR_ERR_SUCCESS
;
16531 static enum ndr_err_code
ndr_pull_spoolss_FormArea(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_FormArea
*r
)
16533 if (ndr_flags
& NDR_SCALARS
) {
16534 NDR_CHECK(ndr_pull_align(ndr
, 4));
16535 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->left
));
16536 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->top
));
16537 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->right
));
16538 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->bottom
));
16539 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
16541 if (ndr_flags
& NDR_BUFFERS
) {
16543 return NDR_ERR_SUCCESS
;
16546 _PUBLIC_
void ndr_print_spoolss_FormArea(struct ndr_print
*ndr
, const char *name
, const struct spoolss_FormArea
*r
)
16548 ndr_print_struct(ndr
, name
, "spoolss_FormArea");
16550 ndr_print_uint32(ndr
, "left", r
->left
);
16551 ndr_print_uint32(ndr
, "top", r
->top
);
16552 ndr_print_uint32(ndr
, "right", r
->right
);
16553 ndr_print_uint32(ndr
, "bottom", r
->bottom
);
16557 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_FormInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_FormInfo1
*r
)
16559 if (ndr_flags
& NDR_SCALARS
) {
16560 NDR_CHECK(ndr_push_align(ndr
, 5));
16561 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr
, NDR_SCALARS
, r
->flags
));
16563 uint32_t _flags_save_string
= ndr
->flags
;
16564 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16565 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->form_name
));
16566 ndr
->flags
= _flags_save_string
;
16568 NDR_CHECK(ndr_push_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
16569 NDR_CHECK(ndr_push_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
16570 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
16572 if (ndr_flags
& NDR_BUFFERS
) {
16574 uint32_t _flags_save_string
= ndr
->flags
;
16575 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16576 if (r
->form_name
) {
16577 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->form_name
));
16578 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->form_name
));
16579 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->form_name
));
16581 ndr
->flags
= _flags_save_string
;
16584 return NDR_ERR_SUCCESS
;
16587 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_FormInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_FormInfo1
*r
)
16589 uint32_t _ptr_form_name
;
16590 TALLOC_CTX
*_mem_save_form_name_0
;
16591 if (ndr_flags
& NDR_SCALARS
) {
16592 NDR_CHECK(ndr_pull_align(ndr
, 5));
16593 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr
, NDR_SCALARS
, &r
->flags
));
16595 uint32_t _flags_save_string
= ndr
->flags
;
16596 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16597 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_form_name
));
16598 if (_ptr_form_name
) {
16599 NDR_PULL_ALLOC(ndr
, r
->form_name
);
16600 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->form_name
, _ptr_form_name
));
16602 r
->form_name
= NULL
;
16604 ndr
->flags
= _flags_save_string
;
16606 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
16607 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
16608 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
16610 if (ndr_flags
& NDR_BUFFERS
) {
16612 uint32_t _flags_save_string
= ndr
->flags
;
16613 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16614 if (r
->form_name
) {
16615 uint32_t _relative_save_offset
;
16616 _relative_save_offset
= ndr
->offset
;
16617 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->form_name
));
16618 _mem_save_form_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16619 NDR_PULL_SET_MEM_CTX(ndr
, r
->form_name
, 0);
16620 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->form_name
));
16621 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_form_name_0
, 0);
16622 if (ndr
->offset
> ndr
->relative_highest_offset
) {
16623 ndr
->relative_highest_offset
= ndr
->offset
;
16625 ndr
->offset
= _relative_save_offset
;
16627 ndr
->flags
= _flags_save_string
;
16630 return NDR_ERR_SUCCESS
;
16633 _PUBLIC_
void ndr_print_spoolss_FormInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_FormInfo1
*r
)
16635 ndr_print_struct(ndr
, name
, "spoolss_FormInfo1");
16637 ndr_print_spoolss_FormFlags(ndr
, "flags", r
->flags
);
16638 ndr_print_ptr(ndr
, "form_name", r
->form_name
);
16640 if (r
->form_name
) {
16641 ndr_print_string(ndr
, "form_name", r
->form_name
);
16644 ndr_print_spoolss_FormSize(ndr
, "size", &r
->size
);
16645 ndr_print_spoolss_FormArea(ndr
, "area", &r
->area
);
16649 _PUBLIC_
size_t ndr_size_spoolss_FormInfo1(const struct spoolss_FormInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16651 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_FormInfo1
, ic
);
16654 static enum ndr_err_code
ndr_push_spoolss_FormStringType(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
16656 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
16657 return NDR_ERR_SUCCESS
;
16660 static enum ndr_err_code
ndr_pull_spoolss_FormStringType(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
16663 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
16665 return NDR_ERR_SUCCESS
;
16668 _PUBLIC_
void ndr_print_spoolss_FormStringType(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
16670 ndr_print_uint32(ndr
, name
, r
);
16672 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_NONE", SPOOLSS_FORM_STRING_TYPE_NONE
, r
);
16673 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_MUI_DLL", SPOOLSS_FORM_STRING_TYPE_MUI_DLL
, r
);
16674 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_FORM_STRING_TYPE_LANG_PAIR", SPOOLSS_FORM_STRING_TYPE_LANG_PAIR
, r
);
16678 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_FormInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_FormInfo2
*r
)
16680 if (ndr_flags
& NDR_SCALARS
) {
16681 NDR_CHECK(ndr_push_align(ndr
, 5));
16682 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr
, NDR_SCALARS
, r
->flags
));
16684 uint32_t _flags_save_string
= ndr
->flags
;
16685 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16686 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->form_name
));
16687 ndr
->flags
= _flags_save_string
;
16689 NDR_CHECK(ndr_push_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
16690 NDR_CHECK(ndr_push_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
16692 uint32_t _flags_save_string
= ndr
->flags
;
16693 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
16694 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->keyword
));
16695 ndr
->flags
= _flags_save_string
;
16697 NDR_CHECK(ndr_push_spoolss_FormStringType(ndr
, NDR_SCALARS
, r
->string_type
));
16699 uint32_t _flags_save_string
= ndr
->flags
;
16700 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16701 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->mui_dll
));
16702 ndr
->flags
= _flags_save_string
;
16704 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ressource_id
));
16706 uint32_t _flags_save_string
= ndr
->flags
;
16707 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16708 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->display_name
));
16709 ndr
->flags
= _flags_save_string
;
16711 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->lang_id
));
16712 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->unused
));
16713 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
16715 if (ndr_flags
& NDR_BUFFERS
) {
16717 uint32_t _flags_save_string
= ndr
->flags
;
16718 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16719 if (r
->form_name
) {
16720 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->form_name
));
16721 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->form_name
));
16722 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->form_name
));
16724 ndr
->flags
= _flags_save_string
;
16727 uint32_t _flags_save_string
= ndr
->flags
;
16728 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
16730 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->keyword
));
16731 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->keyword
));
16732 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->keyword
));
16734 ndr
->flags
= _flags_save_string
;
16737 uint32_t _flags_save_string
= ndr
->flags
;
16738 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16740 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->mui_dll
));
16741 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->mui_dll
));
16742 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->mui_dll
));
16744 ndr
->flags
= _flags_save_string
;
16747 uint32_t _flags_save_string
= ndr
->flags
;
16748 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16749 if (r
->display_name
) {
16750 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->display_name
));
16751 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->display_name
));
16752 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->display_name
));
16754 ndr
->flags
= _flags_save_string
;
16757 return NDR_ERR_SUCCESS
;
16760 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_FormInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_FormInfo2
*r
)
16762 uint32_t _ptr_form_name
;
16763 TALLOC_CTX
*_mem_save_form_name_0
;
16764 uint32_t _ptr_keyword
;
16765 TALLOC_CTX
*_mem_save_keyword_0
;
16766 uint32_t _ptr_mui_dll
;
16767 TALLOC_CTX
*_mem_save_mui_dll_0
;
16768 uint32_t _ptr_display_name
;
16769 TALLOC_CTX
*_mem_save_display_name_0
;
16770 if (ndr_flags
& NDR_SCALARS
) {
16771 NDR_CHECK(ndr_pull_align(ndr
, 5));
16772 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr
, NDR_SCALARS
, &r
->flags
));
16774 uint32_t _flags_save_string
= ndr
->flags
;
16775 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16776 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_form_name
));
16777 if (_ptr_form_name
) {
16778 NDR_PULL_ALLOC(ndr
, r
->form_name
);
16779 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->form_name
, _ptr_form_name
));
16781 r
->form_name
= NULL
;
16783 ndr
->flags
= _flags_save_string
;
16785 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
16786 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
16788 uint32_t _flags_save_string
= ndr
->flags
;
16789 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
16790 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_keyword
));
16791 if (_ptr_keyword
) {
16792 NDR_PULL_ALLOC(ndr
, r
->keyword
);
16793 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->keyword
, _ptr_keyword
));
16797 ndr
->flags
= _flags_save_string
;
16799 NDR_CHECK(ndr_pull_spoolss_FormStringType(ndr
, NDR_SCALARS
, &r
->string_type
));
16801 uint32_t _flags_save_string
= ndr
->flags
;
16802 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16803 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_mui_dll
));
16804 if (_ptr_mui_dll
) {
16805 NDR_PULL_ALLOC(ndr
, r
->mui_dll
);
16806 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->mui_dll
, _ptr_mui_dll
));
16810 ndr
->flags
= _flags_save_string
;
16812 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ressource_id
));
16814 uint32_t _flags_save_string
= ndr
->flags
;
16815 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16816 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
16817 if (_ptr_display_name
) {
16818 NDR_PULL_ALLOC(ndr
, r
->display_name
);
16819 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->display_name
, _ptr_display_name
));
16821 r
->display_name
= NULL
;
16823 ndr
->flags
= _flags_save_string
;
16825 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->lang_id
));
16826 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->unused
));
16827 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
16829 if (ndr_flags
& NDR_BUFFERS
) {
16831 uint32_t _flags_save_string
= ndr
->flags
;
16832 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16833 if (r
->form_name
) {
16834 uint32_t _relative_save_offset
;
16835 _relative_save_offset
= ndr
->offset
;
16836 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->form_name
));
16837 _mem_save_form_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16838 NDR_PULL_SET_MEM_CTX(ndr
, r
->form_name
, 0);
16839 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->form_name
));
16840 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_form_name_0
, 0);
16841 if (ndr
->offset
> ndr
->relative_highest_offset
) {
16842 ndr
->relative_highest_offset
= ndr
->offset
;
16844 ndr
->offset
= _relative_save_offset
;
16846 ndr
->flags
= _flags_save_string
;
16849 uint32_t _flags_save_string
= ndr
->flags
;
16850 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_ASCII
|LIBNDR_FLAG_STR_NULLTERM
);
16852 uint32_t _relative_save_offset
;
16853 _relative_save_offset
= ndr
->offset
;
16854 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->keyword
));
16855 _mem_save_keyword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16856 NDR_PULL_SET_MEM_CTX(ndr
, r
->keyword
, 0);
16857 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->keyword
));
16858 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keyword_0
, 0);
16859 if (ndr
->offset
> ndr
->relative_highest_offset
) {
16860 ndr
->relative_highest_offset
= ndr
->offset
;
16862 ndr
->offset
= _relative_save_offset
;
16864 ndr
->flags
= _flags_save_string
;
16867 uint32_t _flags_save_string
= ndr
->flags
;
16868 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16870 uint32_t _relative_save_offset
;
16871 _relative_save_offset
= ndr
->offset
;
16872 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->mui_dll
));
16873 _mem_save_mui_dll_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16874 NDR_PULL_SET_MEM_CTX(ndr
, r
->mui_dll
, 0);
16875 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->mui_dll
));
16876 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_mui_dll_0
, 0);
16877 if (ndr
->offset
> ndr
->relative_highest_offset
) {
16878 ndr
->relative_highest_offset
= ndr
->offset
;
16880 ndr
->offset
= _relative_save_offset
;
16882 ndr
->flags
= _flags_save_string
;
16885 uint32_t _flags_save_string
= ndr
->flags
;
16886 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
16887 if (r
->display_name
) {
16888 uint32_t _relative_save_offset
;
16889 _relative_save_offset
= ndr
->offset
;
16890 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->display_name
));
16891 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
16892 NDR_PULL_SET_MEM_CTX(ndr
, r
->display_name
, 0);
16893 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->display_name
));
16894 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, 0);
16895 if (ndr
->offset
> ndr
->relative_highest_offset
) {
16896 ndr
->relative_highest_offset
= ndr
->offset
;
16898 ndr
->offset
= _relative_save_offset
;
16900 ndr
->flags
= _flags_save_string
;
16903 return NDR_ERR_SUCCESS
;
16906 _PUBLIC_
void ndr_print_spoolss_FormInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_FormInfo2
*r
)
16908 ndr_print_struct(ndr
, name
, "spoolss_FormInfo2");
16910 ndr_print_spoolss_FormFlags(ndr
, "flags", r
->flags
);
16911 ndr_print_ptr(ndr
, "form_name", r
->form_name
);
16913 if (r
->form_name
) {
16914 ndr_print_string(ndr
, "form_name", r
->form_name
);
16917 ndr_print_spoolss_FormSize(ndr
, "size", &r
->size
);
16918 ndr_print_spoolss_FormArea(ndr
, "area", &r
->area
);
16919 ndr_print_ptr(ndr
, "keyword", r
->keyword
);
16922 ndr_print_string(ndr
, "keyword", r
->keyword
);
16925 ndr_print_spoolss_FormStringType(ndr
, "string_type", r
->string_type
);
16926 ndr_print_ptr(ndr
, "mui_dll", r
->mui_dll
);
16929 ndr_print_string(ndr
, "mui_dll", r
->mui_dll
);
16932 ndr_print_uint32(ndr
, "ressource_id", r
->ressource_id
);
16933 ndr_print_ptr(ndr
, "display_name", r
->display_name
);
16935 if (r
->display_name
) {
16936 ndr_print_string(ndr
, "display_name", r
->display_name
);
16939 ndr_print_uint16(ndr
, "lang_id", r
->lang_id
);
16940 ndr_print_uint16(ndr
, "unused", r
->unused
);
16944 _PUBLIC_
size_t ndr_size_spoolss_FormInfo2(const struct spoolss_FormInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
16946 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_FormInfo2
, ic
);
16949 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_FormInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_FormInfo
*r
)
16951 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
16953 uint32_t _flags_save_UNION
= ndr
->flags
;
16954 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
16955 if (ndr_flags
& NDR_SCALARS
) {
16956 int level
= ndr_push_get_switch_value(ndr
, r
);
16957 NDR_CHECK(ndr_push_union_align(ndr
, 5));
16960 NDR_CHECK(ndr_push_align(ndr
, 5));
16961 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16962 NDR_CHECK(ndr_push_spoolss_FormInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
16966 NDR_CHECK(ndr_push_align(ndr
, 5));
16967 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
16968 NDR_CHECK(ndr_push_spoolss_FormInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
16976 if (ndr_flags
& NDR_BUFFERS
) {
16977 int level
= ndr_push_get_switch_value(ndr
, r
);
16978 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
16981 NDR_CHECK(ndr_push_spoolss_FormInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
16985 NDR_CHECK(ndr_push_spoolss_FormInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
16993 ndr
->flags
= _flags_save_UNION
;
16995 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
16996 return NDR_ERR_SUCCESS
;
16999 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_FormInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_FormInfo
*r
)
17001 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
17004 uint32_t _flags_save_UNION
= ndr
->flags
;
17005 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
17006 level
= ndr_pull_get_switch_value(ndr
, r
);
17007 if (ndr_flags
& NDR_SCALARS
) {
17008 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
17011 NDR_CHECK(ndr_pull_align(ndr
, 5));
17012 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
17013 NDR_CHECK(ndr_pull_spoolss_FormInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
17017 NDR_CHECK(ndr_pull_align(ndr
, 5));
17018 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
17019 NDR_CHECK(ndr_pull_spoolss_FormInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
17027 if (ndr_flags
& NDR_BUFFERS
) {
17028 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
17031 NDR_CHECK(ndr_pull_spoolss_FormInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
17035 NDR_CHECK(ndr_pull_spoolss_FormInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
17043 ndr
->flags
= _flags_save_UNION
;
17045 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
17046 return NDR_ERR_SUCCESS
;
17049 _PUBLIC_
void ndr_print_spoolss_FormInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_FormInfo
*r
)
17053 uint32_t _flags_save_UNION
= ndr
->flags
;
17054 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
17055 level
= ndr_print_get_switch_value(ndr
, r
);
17056 ndr_print_union(ndr
, name
, level
, "spoolss_FormInfo");
17059 ndr_print_spoolss_FormInfo1(ndr
, "info1", &r
->info1
);
17063 ndr_print_spoolss_FormInfo2(ndr
, "info2", &r
->info2
);
17070 ndr
->flags
= _flags_save_UNION
;
17074 _PUBLIC_
size_t ndr_size_spoolss_FormInfo(const union spoolss_FormInfo
*r
, uint32_t level
, struct smb_iconv_convenience
*ic
, int flags
)
17076 flags
|= LIBNDR_FLAG_RELATIVE_REVERSE
;
17077 return ndr_size_union(r
, flags
, level
, (ndr_push_flags_fn_t
)ndr_push_spoolss_FormInfo
, ic
);
17080 static enum ndr_err_code
ndr_push_spoolss_AddFormInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddFormInfo1
*r
)
17082 if (ndr_flags
& NDR_SCALARS
) {
17083 NDR_CHECK(ndr_push_align(ndr
, 5));
17084 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr
, NDR_SCALARS
, r
->flags
));
17085 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->form_name
));
17086 NDR_CHECK(ndr_push_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
17087 NDR_CHECK(ndr_push_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
17088 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
17090 if (ndr_flags
& NDR_BUFFERS
) {
17091 if (r
->form_name
) {
17092 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->form_name
, CH_UTF16
)));
17093 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
17094 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->form_name
, CH_UTF16
)));
17095 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->form_name
, ndr_charset_length(r
->form_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
17098 return NDR_ERR_SUCCESS
;
17101 static enum ndr_err_code
ndr_pull_spoolss_AddFormInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddFormInfo1
*r
)
17103 uint32_t _ptr_form_name
;
17104 TALLOC_CTX
*_mem_save_form_name_0
;
17105 if (ndr_flags
& NDR_SCALARS
) {
17106 NDR_CHECK(ndr_pull_align(ndr
, 5));
17107 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr
, NDR_SCALARS
, &r
->flags
));
17108 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_form_name
));
17109 if (_ptr_form_name
) {
17110 NDR_PULL_ALLOC(ndr
, r
->form_name
);
17112 r
->form_name
= NULL
;
17114 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
17115 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
17116 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
17118 if (ndr_flags
& NDR_BUFFERS
) {
17119 if (r
->form_name
) {
17120 _mem_save_form_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17121 NDR_PULL_SET_MEM_CTX(ndr
, r
->form_name
, 0);
17122 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->form_name
));
17123 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->form_name
));
17124 if (ndr_get_array_length(ndr
, &r
->form_name
) > ndr_get_array_size(ndr
, &r
->form_name
)) {
17125 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
));
17127 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->form_name
), sizeof(uint16_t)));
17128 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->form_name
, ndr_get_array_length(ndr
, &r
->form_name
), sizeof(uint16_t), CH_UTF16
));
17129 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_form_name_0
, 0);
17132 return NDR_ERR_SUCCESS
;
17135 _PUBLIC_
void ndr_print_spoolss_AddFormInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddFormInfo1
*r
)
17137 ndr_print_struct(ndr
, name
, "spoolss_AddFormInfo1");
17139 ndr_print_spoolss_FormFlags(ndr
, "flags", r
->flags
);
17140 ndr_print_ptr(ndr
, "form_name", r
->form_name
);
17142 if (r
->form_name
) {
17143 ndr_print_string(ndr
, "form_name", r
->form_name
);
17146 ndr_print_spoolss_FormSize(ndr
, "size", &r
->size
);
17147 ndr_print_spoolss_FormArea(ndr
, "area", &r
->area
);
17151 static enum ndr_err_code
ndr_push_spoolss_AddFormInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_AddFormInfo2
*r
)
17153 if (ndr_flags
& NDR_SCALARS
) {
17154 NDR_CHECK(ndr_push_align(ndr
, 5));
17155 NDR_CHECK(ndr_push_spoolss_FormFlags(ndr
, NDR_SCALARS
, r
->flags
));
17156 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->form_name
));
17157 NDR_CHECK(ndr_push_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
17158 NDR_CHECK(ndr_push_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
17159 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->keyword
));
17160 NDR_CHECK(ndr_push_spoolss_FormStringType(ndr
, NDR_SCALARS
, r
->string_type
));
17161 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->mui_dll
));
17162 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->ressource_id
));
17163 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->display_name
));
17164 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->lang_id
));
17165 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
17167 if (ndr_flags
& NDR_BUFFERS
) {
17168 if (r
->form_name
) {
17169 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->form_name
, CH_UTF16
)));
17170 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
17171 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->form_name
, CH_UTF16
)));
17172 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->form_name
, ndr_charset_length(r
->form_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
17175 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->keyword
, CH_DOS
)));
17176 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
17177 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->keyword
, CH_DOS
)));
17178 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->keyword
, ndr_charset_length(r
->keyword
, CH_DOS
), sizeof(uint8_t), CH_DOS
));
17181 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->mui_dll
, CH_UTF16
)));
17182 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
17183 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->mui_dll
, CH_UTF16
)));
17184 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->mui_dll
, ndr_charset_length(r
->mui_dll
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
17186 if (r
->display_name
) {
17187 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->display_name
, CH_UTF16
)));
17188 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
17189 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->display_name
, CH_UTF16
)));
17190 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->display_name
, ndr_charset_length(r
->display_name
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
17193 return NDR_ERR_SUCCESS
;
17196 static enum ndr_err_code
ndr_pull_spoolss_AddFormInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_AddFormInfo2
*r
)
17198 uint32_t _ptr_form_name
;
17199 TALLOC_CTX
*_mem_save_form_name_0
;
17200 uint32_t _ptr_keyword
;
17201 TALLOC_CTX
*_mem_save_keyword_0
;
17202 uint32_t _ptr_mui_dll
;
17203 TALLOC_CTX
*_mem_save_mui_dll_0
;
17204 uint32_t _ptr_display_name
;
17205 TALLOC_CTX
*_mem_save_display_name_0
;
17206 if (ndr_flags
& NDR_SCALARS
) {
17207 NDR_CHECK(ndr_pull_align(ndr
, 5));
17208 NDR_CHECK(ndr_pull_spoolss_FormFlags(ndr
, NDR_SCALARS
, &r
->flags
));
17209 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_form_name
));
17210 if (_ptr_form_name
) {
17211 NDR_PULL_ALLOC(ndr
, r
->form_name
);
17213 r
->form_name
= NULL
;
17215 NDR_CHECK(ndr_pull_spoolss_FormSize(ndr
, NDR_SCALARS
, &r
->size
));
17216 NDR_CHECK(ndr_pull_spoolss_FormArea(ndr
, NDR_SCALARS
, &r
->area
));
17217 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_keyword
));
17218 if (_ptr_keyword
) {
17219 NDR_PULL_ALLOC(ndr
, r
->keyword
);
17223 NDR_CHECK(ndr_pull_spoolss_FormStringType(ndr
, NDR_SCALARS
, &r
->string_type
));
17224 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_mui_dll
));
17225 if (_ptr_mui_dll
) {
17226 NDR_PULL_ALLOC(ndr
, r
->mui_dll
);
17230 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->ressource_id
));
17231 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_display_name
));
17232 if (_ptr_display_name
) {
17233 NDR_PULL_ALLOC(ndr
, r
->display_name
);
17235 r
->display_name
= NULL
;
17237 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->lang_id
));
17238 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
17240 if (ndr_flags
& NDR_BUFFERS
) {
17241 if (r
->form_name
) {
17242 _mem_save_form_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17243 NDR_PULL_SET_MEM_CTX(ndr
, r
->form_name
, 0);
17244 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->form_name
));
17245 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->form_name
));
17246 if (ndr_get_array_length(ndr
, &r
->form_name
) > ndr_get_array_size(ndr
, &r
->form_name
)) {
17247 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
));
17249 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->form_name
), sizeof(uint16_t)));
17250 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->form_name
, ndr_get_array_length(ndr
, &r
->form_name
), sizeof(uint16_t), CH_UTF16
));
17251 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_form_name_0
, 0);
17254 _mem_save_keyword_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17255 NDR_PULL_SET_MEM_CTX(ndr
, r
->keyword
, 0);
17256 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->keyword
));
17257 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->keyword
));
17258 if (ndr_get_array_length(ndr
, &r
->keyword
) > ndr_get_array_size(ndr
, &r
->keyword
)) {
17259 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
));
17261 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->keyword
), sizeof(uint8_t)));
17262 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->keyword
, ndr_get_array_length(ndr
, &r
->keyword
), sizeof(uint8_t), CH_DOS
));
17263 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_keyword_0
, 0);
17266 _mem_save_mui_dll_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17267 NDR_PULL_SET_MEM_CTX(ndr
, r
->mui_dll
, 0);
17268 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->mui_dll
));
17269 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->mui_dll
));
17270 if (ndr_get_array_length(ndr
, &r
->mui_dll
) > ndr_get_array_size(ndr
, &r
->mui_dll
)) {
17271 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
));
17273 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->mui_dll
), sizeof(uint16_t)));
17274 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->mui_dll
, ndr_get_array_length(ndr
, &r
->mui_dll
), sizeof(uint16_t), CH_UTF16
));
17275 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_mui_dll_0
, 0);
17277 if (r
->display_name
) {
17278 _mem_save_display_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17279 NDR_PULL_SET_MEM_CTX(ndr
, r
->display_name
, 0);
17280 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->display_name
));
17281 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->display_name
));
17282 if (ndr_get_array_length(ndr
, &r
->display_name
) > ndr_get_array_size(ndr
, &r
->display_name
)) {
17283 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
));
17285 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->display_name
), sizeof(uint16_t)));
17286 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->display_name
, ndr_get_array_length(ndr
, &r
->display_name
), sizeof(uint16_t), CH_UTF16
));
17287 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_display_name_0
, 0);
17290 return NDR_ERR_SUCCESS
;
17293 _PUBLIC_
void ndr_print_spoolss_AddFormInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_AddFormInfo2
*r
)
17295 ndr_print_struct(ndr
, name
, "spoolss_AddFormInfo2");
17297 ndr_print_spoolss_FormFlags(ndr
, "flags", r
->flags
);
17298 ndr_print_ptr(ndr
, "form_name", r
->form_name
);
17300 if (r
->form_name
) {
17301 ndr_print_string(ndr
, "form_name", r
->form_name
);
17304 ndr_print_spoolss_FormSize(ndr
, "size", &r
->size
);
17305 ndr_print_spoolss_FormArea(ndr
, "area", &r
->area
);
17306 ndr_print_ptr(ndr
, "keyword", r
->keyword
);
17309 ndr_print_string(ndr
, "keyword", r
->keyword
);
17312 ndr_print_spoolss_FormStringType(ndr
, "string_type", r
->string_type
);
17313 ndr_print_ptr(ndr
, "mui_dll", r
->mui_dll
);
17316 ndr_print_string(ndr
, "mui_dll", r
->mui_dll
);
17319 ndr_print_uint32(ndr
, "ressource_id", r
->ressource_id
);
17320 ndr_print_ptr(ndr
, "display_name", r
->display_name
);
17322 if (r
->display_name
) {
17323 ndr_print_string(ndr
, "display_name", r
->display_name
);
17326 ndr_print_uint32(ndr
, "lang_id", r
->lang_id
);
17330 static enum ndr_err_code
ndr_push_spoolss_AddFormInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_AddFormInfo
*r
)
17332 if (ndr_flags
& NDR_SCALARS
) {
17333 int level
= ndr_push_get_switch_value(ndr
, r
);
17334 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
17335 NDR_CHECK(ndr_push_union_align(ndr
, 5));
17338 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info1
));
17342 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info2
));
17346 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
17349 if (ndr_flags
& NDR_BUFFERS
) {
17350 int level
= ndr_push_get_switch_value(ndr
, r
);
17354 NDR_CHECK(ndr_push_spoolss_AddFormInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
17360 NDR_CHECK(ndr_push_spoolss_AddFormInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
17365 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
17368 return NDR_ERR_SUCCESS
;
17371 static enum ndr_err_code
ndr_pull_spoolss_AddFormInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_AddFormInfo
*r
)
17375 TALLOC_CTX
*_mem_save_info1_0
;
17376 TALLOC_CTX
*_mem_save_info2_0
;
17377 level
= ndr_pull_get_switch_value(ndr
, r
);
17378 if (ndr_flags
& NDR_SCALARS
) {
17379 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
17380 if (_level
!= level
) {
17381 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
17383 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
17386 uint32_t _ptr_info1
;
17387 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info1
));
17389 NDR_PULL_ALLOC(ndr
, r
->info1
);
17396 uint32_t _ptr_info2
;
17397 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info2
));
17399 NDR_PULL_ALLOC(ndr
, r
->info2
);
17406 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
17409 if (ndr_flags
& NDR_BUFFERS
) {
17413 _mem_save_info1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17414 NDR_PULL_SET_MEM_CTX(ndr
, r
->info1
, 0);
17415 NDR_CHECK(ndr_pull_spoolss_AddFormInfo1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info1
));
17416 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info1_0
, 0);
17422 _mem_save_info2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17423 NDR_PULL_SET_MEM_CTX(ndr
, r
->info2
, 0);
17424 NDR_CHECK(ndr_pull_spoolss_AddFormInfo2(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info2
));
17425 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info2_0
, 0);
17430 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
17433 return NDR_ERR_SUCCESS
;
17436 _PUBLIC_
void ndr_print_spoolss_AddFormInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_AddFormInfo
*r
)
17439 level
= ndr_print_get_switch_value(ndr
, r
);
17440 ndr_print_union(ndr
, name
, level
, "spoolss_AddFormInfo");
17443 ndr_print_ptr(ndr
, "info1", r
->info1
);
17446 ndr_print_spoolss_AddFormInfo1(ndr
, "info1", r
->info1
);
17452 ndr_print_ptr(ndr
, "info2", r
->info2
);
17455 ndr_print_spoolss_AddFormInfo2(ndr
, "info2", r
->info2
);
17461 ndr_print_bad_level(ndr
, name
, level
);
17465 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortInfo1
*r
)
17467 if (ndr_flags
& NDR_SCALARS
) {
17468 NDR_CHECK(ndr_push_align(ndr
, 5));
17470 uint32_t _flags_save_string
= ndr
->flags
;
17471 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17472 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->port_name
));
17473 ndr
->flags
= _flags_save_string
;
17475 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
17477 if (ndr_flags
& NDR_BUFFERS
) {
17479 uint32_t _flags_save_string
= ndr
->flags
;
17480 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17481 if (r
->port_name
) {
17482 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->port_name
));
17483 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->port_name
));
17484 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->port_name
));
17486 ndr
->flags
= _flags_save_string
;
17489 return NDR_ERR_SUCCESS
;
17492 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortInfo1
*r
)
17494 uint32_t _ptr_port_name
;
17495 TALLOC_CTX
*_mem_save_port_name_0
;
17496 if (ndr_flags
& NDR_SCALARS
) {
17497 NDR_CHECK(ndr_pull_align(ndr
, 5));
17499 uint32_t _flags_save_string
= ndr
->flags
;
17500 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17501 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_port_name
));
17502 if (_ptr_port_name
) {
17503 NDR_PULL_ALLOC(ndr
, r
->port_name
);
17504 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->port_name
, _ptr_port_name
));
17506 r
->port_name
= NULL
;
17508 ndr
->flags
= _flags_save_string
;
17510 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
17512 if (ndr_flags
& NDR_BUFFERS
) {
17514 uint32_t _flags_save_string
= ndr
->flags
;
17515 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17516 if (r
->port_name
) {
17517 uint32_t _relative_save_offset
;
17518 _relative_save_offset
= ndr
->offset
;
17519 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->port_name
));
17520 _mem_save_port_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17521 NDR_PULL_SET_MEM_CTX(ndr
, r
->port_name
, 0);
17522 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->port_name
));
17523 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_port_name_0
, 0);
17524 if (ndr
->offset
> ndr
->relative_highest_offset
) {
17525 ndr
->relative_highest_offset
= ndr
->offset
;
17527 ndr
->offset
= _relative_save_offset
;
17529 ndr
->flags
= _flags_save_string
;
17532 return NDR_ERR_SUCCESS
;
17535 _PUBLIC_
void ndr_print_spoolss_PortInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortInfo1
*r
)
17537 ndr_print_struct(ndr
, name
, "spoolss_PortInfo1");
17539 ndr_print_ptr(ndr
, "port_name", r
->port_name
);
17541 if (r
->port_name
) {
17542 ndr_print_string(ndr
, "port_name", r
->port_name
);
17548 _PUBLIC_
size_t ndr_size_spoolss_PortInfo1(const struct spoolss_PortInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
17550 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PortInfo1
, ic
);
17553 static enum ndr_err_code
ndr_push_spoolss_PortType(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
17555 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
17556 return NDR_ERR_SUCCESS
;
17559 static enum ndr_err_code
ndr_pull_spoolss_PortType(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
17562 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
17564 return NDR_ERR_SUCCESS
;
17567 _PUBLIC_
void ndr_print_spoolss_PortType(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
17569 ndr_print_uint32(ndr
, name
, r
);
17571 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_WRITE", SPOOLSS_PORT_TYPE_WRITE
, r
);
17572 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_READ", SPOOLSS_PORT_TYPE_READ
, r
);
17573 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_REDIRECTED", SPOOLSS_PORT_TYPE_REDIRECTED
, r
);
17574 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SPOOLSS_PORT_TYPE_NET_ATTACHED", SPOOLSS_PORT_TYPE_NET_ATTACHED
, r
);
17578 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortInfo2
*r
)
17580 if (ndr_flags
& NDR_SCALARS
) {
17581 NDR_CHECK(ndr_push_align(ndr
, 5));
17583 uint32_t _flags_save_string
= ndr
->flags
;
17584 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17585 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->port_name
));
17586 ndr
->flags
= _flags_save_string
;
17589 uint32_t _flags_save_string
= ndr
->flags
;
17590 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17591 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
17592 ndr
->flags
= _flags_save_string
;
17595 uint32_t _flags_save_string
= ndr
->flags
;
17596 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17597 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->description
));
17598 ndr
->flags
= _flags_save_string
;
17600 NDR_CHECK(ndr_push_spoolss_PortType(ndr
, NDR_SCALARS
, r
->port_type
));
17601 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
17602 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
17604 if (ndr_flags
& NDR_BUFFERS
) {
17606 uint32_t _flags_save_string
= ndr
->flags
;
17607 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17608 if (r
->port_name
) {
17609 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->port_name
));
17610 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->port_name
));
17611 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->port_name
));
17613 ndr
->flags
= _flags_save_string
;
17616 uint32_t _flags_save_string
= ndr
->flags
;
17617 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17618 if (r
->monitor_name
) {
17619 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->monitor_name
));
17620 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
17621 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->monitor_name
));
17623 ndr
->flags
= _flags_save_string
;
17626 uint32_t _flags_save_string
= ndr
->flags
;
17627 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17628 if (r
->description
) {
17629 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->description
));
17630 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->description
));
17631 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->description
));
17633 ndr
->flags
= _flags_save_string
;
17636 return NDR_ERR_SUCCESS
;
17639 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortInfo2
*r
)
17641 uint32_t _ptr_port_name
;
17642 TALLOC_CTX
*_mem_save_port_name_0
;
17643 uint32_t _ptr_monitor_name
;
17644 TALLOC_CTX
*_mem_save_monitor_name_0
;
17645 uint32_t _ptr_description
;
17646 TALLOC_CTX
*_mem_save_description_0
;
17647 if (ndr_flags
& NDR_SCALARS
) {
17648 NDR_CHECK(ndr_pull_align(ndr
, 5));
17650 uint32_t _flags_save_string
= ndr
->flags
;
17651 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17652 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_port_name
));
17653 if (_ptr_port_name
) {
17654 NDR_PULL_ALLOC(ndr
, r
->port_name
);
17655 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->port_name
, _ptr_port_name
));
17657 r
->port_name
= NULL
;
17659 ndr
->flags
= _flags_save_string
;
17662 uint32_t _flags_save_string
= ndr
->flags
;
17663 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17664 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
17665 if (_ptr_monitor_name
) {
17666 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
17667 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
17669 r
->monitor_name
= NULL
;
17671 ndr
->flags
= _flags_save_string
;
17674 uint32_t _flags_save_string
= ndr
->flags
;
17675 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17676 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_description
));
17677 if (_ptr_description
) {
17678 NDR_PULL_ALLOC(ndr
, r
->description
);
17679 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->description
, _ptr_description
));
17681 r
->description
= NULL
;
17683 ndr
->flags
= _flags_save_string
;
17685 NDR_CHECK(ndr_pull_spoolss_PortType(ndr
, NDR_SCALARS
, &r
->port_type
));
17686 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
17687 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
17689 if (ndr_flags
& NDR_BUFFERS
) {
17691 uint32_t _flags_save_string
= ndr
->flags
;
17692 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17693 if (r
->port_name
) {
17694 uint32_t _relative_save_offset
;
17695 _relative_save_offset
= ndr
->offset
;
17696 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->port_name
));
17697 _mem_save_port_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17698 NDR_PULL_SET_MEM_CTX(ndr
, r
->port_name
, 0);
17699 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->port_name
));
17700 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_port_name_0
, 0);
17701 if (ndr
->offset
> ndr
->relative_highest_offset
) {
17702 ndr
->relative_highest_offset
= ndr
->offset
;
17704 ndr
->offset
= _relative_save_offset
;
17706 ndr
->flags
= _flags_save_string
;
17709 uint32_t _flags_save_string
= ndr
->flags
;
17710 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17711 if (r
->monitor_name
) {
17712 uint32_t _relative_save_offset
;
17713 _relative_save_offset
= ndr
->offset
;
17714 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
17715 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17716 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
17717 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
17718 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
17719 if (ndr
->offset
> ndr
->relative_highest_offset
) {
17720 ndr
->relative_highest_offset
= ndr
->offset
;
17722 ndr
->offset
= _relative_save_offset
;
17724 ndr
->flags
= _flags_save_string
;
17727 uint32_t _flags_save_string
= ndr
->flags
;
17728 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17729 if (r
->description
) {
17730 uint32_t _relative_save_offset
;
17731 _relative_save_offset
= ndr
->offset
;
17732 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->description
));
17733 _mem_save_description_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17734 NDR_PULL_SET_MEM_CTX(ndr
, r
->description
, 0);
17735 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->description
));
17736 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_description_0
, 0);
17737 if (ndr
->offset
> ndr
->relative_highest_offset
) {
17738 ndr
->relative_highest_offset
= ndr
->offset
;
17740 ndr
->offset
= _relative_save_offset
;
17742 ndr
->flags
= _flags_save_string
;
17745 return NDR_ERR_SUCCESS
;
17748 _PUBLIC_
void ndr_print_spoolss_PortInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortInfo2
*r
)
17750 ndr_print_struct(ndr
, name
, "spoolss_PortInfo2");
17752 ndr_print_ptr(ndr
, "port_name", r
->port_name
);
17754 if (r
->port_name
) {
17755 ndr_print_string(ndr
, "port_name", r
->port_name
);
17758 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
17760 if (r
->monitor_name
) {
17761 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
17764 ndr_print_ptr(ndr
, "description", r
->description
);
17766 if (r
->description
) {
17767 ndr_print_string(ndr
, "description", r
->description
);
17770 ndr_print_spoolss_PortType(ndr
, "port_type", r
->port_type
);
17771 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
17775 _PUBLIC_
size_t ndr_size_spoolss_PortInfo2(const struct spoolss_PortInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
17777 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PortInfo2
, ic
);
17780 static enum ndr_err_code
ndr_push_spoolss_PortStatus(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PortStatus r
)
17782 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
17783 return NDR_ERR_SUCCESS
;
17786 static enum ndr_err_code
ndr_pull_spoolss_PortStatus(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PortStatus
*r
)
17789 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
17791 return NDR_ERR_SUCCESS
;
17794 _PUBLIC_
void ndr_print_spoolss_PortStatus(struct ndr_print
*ndr
, const char *name
, enum spoolss_PortStatus r
)
17796 const char *val
= NULL
;
17799 case PORT_STATUS_CLEAR
: val
= "PORT_STATUS_CLEAR"; break;
17800 case PORT_STATUS_OFFLINE
: val
= "PORT_STATUS_OFFLINE"; break;
17801 case PORT_STATUS_PAPER_JAM
: val
= "PORT_STATUS_PAPER_JAM"; break;
17802 case PORT_STATUS_PAPER_OUT
: val
= "PORT_STATUS_PAPER_OUT"; break;
17803 case PORT_STATUS_OUTPUT_BIN_FULL
: val
= "PORT_STATUS_OUTPUT_BIN_FULL"; break;
17804 case PORT_STATUS_PAPER_PROBLEM
: val
= "PORT_STATUS_PAPER_PROBLEM"; break;
17805 case PORT_STATUS_NO_TONER
: val
= "PORT_STATUS_NO_TONER"; break;
17806 case PORT_STATUS_DOOR_OPEN
: val
= "PORT_STATUS_DOOR_OPEN"; break;
17807 case PORT_STATUS_USER_INTERVENTION
: val
= "PORT_STATUS_USER_INTERVENTION"; break;
17808 case PORT_STATUS_OUT_OF_MEMORY
: val
= "PORT_STATUS_OUT_OF_MEMORY"; break;
17809 case PORT_STATUS_TONER_LOW
: val
= "PORT_STATUS_TONER_LOW"; break;
17810 case PORT_STATUS_WARMING_UP
: val
= "PORT_STATUS_WARMING_UP"; break;
17811 case PORT_STATUS_POWER_SAVE
: val
= "PORT_STATUS_POWER_SAVE"; break;
17813 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
17816 static enum ndr_err_code
ndr_push_spoolss_PortSeverity(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PortSeverity r
)
17818 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
17819 return NDR_ERR_SUCCESS
;
17822 static enum ndr_err_code
ndr_pull_spoolss_PortSeverity(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PortSeverity
*r
)
17825 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
17827 return NDR_ERR_SUCCESS
;
17830 _PUBLIC_
void ndr_print_spoolss_PortSeverity(struct ndr_print
*ndr
, const char *name
, enum spoolss_PortSeverity r
)
17832 const char *val
= NULL
;
17835 case PORT_STATUS_TYPE_ERROR
: val
= "PORT_STATUS_TYPE_ERROR"; break;
17836 case PORT_STATUS_TYPE_WARNING
: val
= "PORT_STATUS_TYPE_WARNING"; break;
17837 case PORT_STATUS_TYPE_INFO
: val
= "PORT_STATUS_TYPE_INFO"; break;
17839 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
17842 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfo3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortInfo3
*r
)
17844 if (ndr_flags
& NDR_SCALARS
) {
17845 NDR_CHECK(ndr_push_align(ndr
, 5));
17846 NDR_CHECK(ndr_push_spoolss_PortStatus(ndr
, NDR_SCALARS
, r
->status
));
17848 uint32_t _flags_save_string
= ndr
->flags
;
17849 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17850 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->status_string
));
17851 ndr
->flags
= _flags_save_string
;
17853 NDR_CHECK(ndr_push_spoolss_PortSeverity(ndr
, NDR_SCALARS
, r
->severity
));
17854 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
17856 if (ndr_flags
& NDR_BUFFERS
) {
17858 uint32_t _flags_save_string
= ndr
->flags
;
17859 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17860 if (r
->status_string
) {
17861 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->status_string
));
17862 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->status_string
));
17863 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->status_string
));
17865 ndr
->flags
= _flags_save_string
;
17868 return NDR_ERR_SUCCESS
;
17871 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfo3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortInfo3
*r
)
17873 uint32_t _ptr_status_string
;
17874 TALLOC_CTX
*_mem_save_status_string_0
;
17875 if (ndr_flags
& NDR_SCALARS
) {
17876 NDR_CHECK(ndr_pull_align(ndr
, 5));
17877 NDR_CHECK(ndr_pull_spoolss_PortStatus(ndr
, NDR_SCALARS
, &r
->status
));
17879 uint32_t _flags_save_string
= ndr
->flags
;
17880 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17881 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_status_string
));
17882 if (_ptr_status_string
) {
17883 NDR_PULL_ALLOC(ndr
, r
->status_string
);
17884 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->status_string
, _ptr_status_string
));
17886 r
->status_string
= NULL
;
17888 ndr
->flags
= _flags_save_string
;
17890 NDR_CHECK(ndr_pull_spoolss_PortSeverity(ndr
, NDR_SCALARS
, &r
->severity
));
17891 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
17893 if (ndr_flags
& NDR_BUFFERS
) {
17895 uint32_t _flags_save_string
= ndr
->flags
;
17896 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17897 if (r
->status_string
) {
17898 uint32_t _relative_save_offset
;
17899 _relative_save_offset
= ndr
->offset
;
17900 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->status_string
));
17901 _mem_save_status_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17902 NDR_PULL_SET_MEM_CTX(ndr
, r
->status_string
, 0);
17903 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->status_string
));
17904 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_status_string_0
, 0);
17905 if (ndr
->offset
> ndr
->relative_highest_offset
) {
17906 ndr
->relative_highest_offset
= ndr
->offset
;
17908 ndr
->offset
= _relative_save_offset
;
17910 ndr
->flags
= _flags_save_string
;
17913 return NDR_ERR_SUCCESS
;
17916 _PUBLIC_
void ndr_print_spoolss_PortInfo3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortInfo3
*r
)
17918 ndr_print_struct(ndr
, name
, "spoolss_PortInfo3");
17920 ndr_print_spoolss_PortStatus(ndr
, "status", r
->status
);
17921 ndr_print_ptr(ndr
, "status_string", r
->status_string
);
17923 if (r
->status_string
) {
17924 ndr_print_string(ndr
, "status_string", r
->status_string
);
17927 ndr_print_spoolss_PortSeverity(ndr
, "severity", r
->severity
);
17931 _PUBLIC_
size_t ndr_size_spoolss_PortInfo3(const struct spoolss_PortInfo3
*r
, struct smb_iconv_convenience
*ic
, int flags
)
17933 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PortInfo3
, ic
);
17936 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfoFF(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortInfoFF
*r
)
17938 if (ndr_flags
& NDR_SCALARS
) {
17939 NDR_CHECK(ndr_push_align(ndr
, 5));
17941 uint32_t _flags_save_string
= ndr
->flags
;
17942 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17943 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->port_name
));
17944 ndr
->flags
= _flags_save_string
;
17946 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->monitor_data
));
17947 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
17949 if (ndr_flags
& NDR_BUFFERS
) {
17951 uint32_t _flags_save_string
= ndr
->flags
;
17952 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17953 if (r
->port_name
) {
17954 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->port_name
));
17955 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->port_name
));
17956 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->port_name
));
17958 ndr
->flags
= _flags_save_string
;
17961 return NDR_ERR_SUCCESS
;
17964 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfoFF(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortInfoFF
*r
)
17966 uint32_t _ptr_port_name
;
17967 TALLOC_CTX
*_mem_save_port_name_0
;
17968 if (ndr_flags
& NDR_SCALARS
) {
17969 NDR_CHECK(ndr_pull_align(ndr
, 5));
17971 uint32_t _flags_save_string
= ndr
->flags
;
17972 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17973 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_port_name
));
17974 if (_ptr_port_name
) {
17975 NDR_PULL_ALLOC(ndr
, r
->port_name
);
17976 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->port_name
, _ptr_port_name
));
17978 r
->port_name
= NULL
;
17980 ndr
->flags
= _flags_save_string
;
17982 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->monitor_data
));
17983 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
17985 if (ndr_flags
& NDR_BUFFERS
) {
17987 uint32_t _flags_save_string
= ndr
->flags
;
17988 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
17989 if (r
->port_name
) {
17990 uint32_t _relative_save_offset
;
17991 _relative_save_offset
= ndr
->offset
;
17992 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->port_name
));
17993 _mem_save_port_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
17994 NDR_PULL_SET_MEM_CTX(ndr
, r
->port_name
, 0);
17995 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->port_name
));
17996 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_port_name_0
, 0);
17997 if (ndr
->offset
> ndr
->relative_highest_offset
) {
17998 ndr
->relative_highest_offset
= ndr
->offset
;
18000 ndr
->offset
= _relative_save_offset
;
18002 ndr
->flags
= _flags_save_string
;
18005 return NDR_ERR_SUCCESS
;
18008 _PUBLIC_
void ndr_print_spoolss_PortInfoFF(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortInfoFF
*r
)
18010 ndr_print_struct(ndr
, name
, "spoolss_PortInfoFF");
18012 ndr_print_ptr(ndr
, "port_name", r
->port_name
);
18014 if (r
->port_name
) {
18015 ndr_print_string(ndr
, "port_name", r
->port_name
);
18018 ndr_print_DATA_BLOB(ndr
, "monitor_data", r
->monitor_data
);
18022 _PUBLIC_
size_t ndr_size_spoolss_PortInfoFF(const struct spoolss_PortInfoFF
*r
, struct smb_iconv_convenience
*ic
, int flags
)
18024 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PortInfoFF
, ic
);
18027 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PortInfo
*r
)
18029 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
18031 uint32_t _flags_save_UNION
= ndr
->flags
;
18032 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18033 if (ndr_flags
& NDR_SCALARS
) {
18034 int level
= ndr_push_get_switch_value(ndr
, r
);
18035 NDR_CHECK(ndr_push_union_align(ndr
, 5));
18038 NDR_CHECK(ndr_push_align(ndr
, 5));
18039 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18040 NDR_CHECK(ndr_push_spoolss_PortInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
18044 NDR_CHECK(ndr_push_align(ndr
, 5));
18045 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18046 NDR_CHECK(ndr_push_spoolss_PortInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
18050 NDR_CHECK(ndr_push_align(ndr
, 5));
18051 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18052 NDR_CHECK(ndr_push_spoolss_PortInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
18056 NDR_CHECK(ndr_push_align(ndr
, 5));
18057 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18058 NDR_CHECK(ndr_push_spoolss_PortInfoFF(ndr
, NDR_SCALARS
, &r
->infoFF
));
18066 if (ndr_flags
& NDR_BUFFERS
) {
18067 int level
= ndr_push_get_switch_value(ndr
, r
);
18068 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
18071 NDR_CHECK(ndr_push_spoolss_PortInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
18075 NDR_CHECK(ndr_push_spoolss_PortInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
18079 NDR_CHECK(ndr_push_spoolss_PortInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
18083 NDR_CHECK(ndr_push_spoolss_PortInfoFF(ndr
, NDR_BUFFERS
, &r
->infoFF
));
18091 ndr
->flags
= _flags_save_UNION
;
18093 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
18094 return NDR_ERR_SUCCESS
;
18097 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PortInfo
*r
)
18099 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
18102 uint32_t _flags_save_UNION
= ndr
->flags
;
18103 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18104 level
= ndr_pull_get_switch_value(ndr
, r
);
18105 if (ndr_flags
& NDR_SCALARS
) {
18106 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
18109 NDR_CHECK(ndr_pull_align(ndr
, 5));
18110 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18111 NDR_CHECK(ndr_pull_spoolss_PortInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
18115 NDR_CHECK(ndr_pull_align(ndr
, 5));
18116 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18117 NDR_CHECK(ndr_pull_spoolss_PortInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
18121 NDR_CHECK(ndr_pull_align(ndr
, 5));
18122 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18123 NDR_CHECK(ndr_pull_spoolss_PortInfo3(ndr
, NDR_SCALARS
, &r
->info3
));
18127 NDR_CHECK(ndr_pull_align(ndr
, 5));
18128 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18129 NDR_CHECK(ndr_pull_spoolss_PortInfoFF(ndr
, NDR_SCALARS
, &r
->infoFF
));
18137 if (ndr_flags
& NDR_BUFFERS
) {
18138 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
18141 NDR_CHECK(ndr_pull_spoolss_PortInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
18145 NDR_CHECK(ndr_pull_spoolss_PortInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
18149 NDR_CHECK(ndr_pull_spoolss_PortInfo3(ndr
, NDR_BUFFERS
, &r
->info3
));
18153 NDR_CHECK(ndr_pull_spoolss_PortInfoFF(ndr
, NDR_BUFFERS
, &r
->infoFF
));
18161 ndr
->flags
= _flags_save_UNION
;
18163 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
18164 return NDR_ERR_SUCCESS
;
18167 _PUBLIC_
void ndr_print_spoolss_PortInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PortInfo
*r
)
18171 uint32_t _flags_save_UNION
= ndr
->flags
;
18172 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18173 level
= ndr_print_get_switch_value(ndr
, r
);
18174 ndr_print_union(ndr
, name
, level
, "spoolss_PortInfo");
18177 ndr_print_spoolss_PortInfo1(ndr
, "info1", &r
->info1
);
18181 ndr_print_spoolss_PortInfo2(ndr
, "info2", &r
->info2
);
18185 ndr_print_spoolss_PortInfo3(ndr
, "info3", &r
->info3
);
18189 ndr_print_spoolss_PortInfoFF(ndr
, "infoFF", &r
->infoFF
);
18196 ndr
->flags
= _flags_save_UNION
;
18200 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_MonitorInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_MonitorInfo1
*r
)
18202 if (ndr_flags
& NDR_SCALARS
) {
18203 NDR_CHECK(ndr_push_align(ndr
, 5));
18205 uint32_t _flags_save_string
= ndr
->flags
;
18206 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18207 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
18208 ndr
->flags
= _flags_save_string
;
18210 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
18212 if (ndr_flags
& NDR_BUFFERS
) {
18214 uint32_t _flags_save_string
= ndr
->flags
;
18215 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18216 if (r
->monitor_name
) {
18217 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->monitor_name
));
18218 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
18219 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->monitor_name
));
18221 ndr
->flags
= _flags_save_string
;
18224 return NDR_ERR_SUCCESS
;
18227 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_MonitorInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_MonitorInfo1
*r
)
18229 uint32_t _ptr_monitor_name
;
18230 TALLOC_CTX
*_mem_save_monitor_name_0
;
18231 if (ndr_flags
& NDR_SCALARS
) {
18232 NDR_CHECK(ndr_pull_align(ndr
, 5));
18234 uint32_t _flags_save_string
= ndr
->flags
;
18235 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18236 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
18237 if (_ptr_monitor_name
) {
18238 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
18239 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
18241 r
->monitor_name
= NULL
;
18243 ndr
->flags
= _flags_save_string
;
18245 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
18247 if (ndr_flags
& NDR_BUFFERS
) {
18249 uint32_t _flags_save_string
= ndr
->flags
;
18250 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18251 if (r
->monitor_name
) {
18252 uint32_t _relative_save_offset
;
18253 _relative_save_offset
= ndr
->offset
;
18254 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
18255 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18256 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
18257 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
18258 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
18259 if (ndr
->offset
> ndr
->relative_highest_offset
) {
18260 ndr
->relative_highest_offset
= ndr
->offset
;
18262 ndr
->offset
= _relative_save_offset
;
18264 ndr
->flags
= _flags_save_string
;
18267 return NDR_ERR_SUCCESS
;
18270 _PUBLIC_
void ndr_print_spoolss_MonitorInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_MonitorInfo1
*r
)
18272 ndr_print_struct(ndr
, name
, "spoolss_MonitorInfo1");
18274 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
18276 if (r
->monitor_name
) {
18277 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
18283 _PUBLIC_
size_t ndr_size_spoolss_MonitorInfo1(const struct spoolss_MonitorInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
18285 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_MonitorInfo1
, ic
);
18288 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_MonitorInfo2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_MonitorInfo2
*r
)
18290 if (ndr_flags
& NDR_SCALARS
) {
18291 NDR_CHECK(ndr_push_align(ndr
, 5));
18293 uint32_t _flags_save_string
= ndr
->flags
;
18294 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18295 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->monitor_name
));
18296 ndr
->flags
= _flags_save_string
;
18299 uint32_t _flags_save_string
= ndr
->flags
;
18300 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18301 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->environment
));
18302 ndr
->flags
= _flags_save_string
;
18305 uint32_t _flags_save_string
= ndr
->flags
;
18306 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18307 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->dll_name
));
18308 ndr
->flags
= _flags_save_string
;
18310 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
18312 if (ndr_flags
& NDR_BUFFERS
) {
18314 uint32_t _flags_save_string
= ndr
->flags
;
18315 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18316 if (r
->monitor_name
) {
18317 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->monitor_name
));
18318 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->monitor_name
));
18319 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->monitor_name
));
18321 ndr
->flags
= _flags_save_string
;
18324 uint32_t _flags_save_string
= ndr
->flags
;
18325 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18326 if (r
->environment
) {
18327 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->environment
));
18328 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->environment
));
18329 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->environment
));
18331 ndr
->flags
= _flags_save_string
;
18334 uint32_t _flags_save_string
= ndr
->flags
;
18335 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18337 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->dll_name
));
18338 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->dll_name
));
18339 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->dll_name
));
18341 ndr
->flags
= _flags_save_string
;
18344 return NDR_ERR_SUCCESS
;
18347 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_MonitorInfo2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_MonitorInfo2
*r
)
18349 uint32_t _ptr_monitor_name
;
18350 TALLOC_CTX
*_mem_save_monitor_name_0
;
18351 uint32_t _ptr_environment
;
18352 TALLOC_CTX
*_mem_save_environment_0
;
18353 uint32_t _ptr_dll_name
;
18354 TALLOC_CTX
*_mem_save_dll_name_0
;
18355 if (ndr_flags
& NDR_SCALARS
) {
18356 NDR_CHECK(ndr_pull_align(ndr
, 5));
18358 uint32_t _flags_save_string
= ndr
->flags
;
18359 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18360 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_monitor_name
));
18361 if (_ptr_monitor_name
) {
18362 NDR_PULL_ALLOC(ndr
, r
->monitor_name
);
18363 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->monitor_name
, _ptr_monitor_name
));
18365 r
->monitor_name
= NULL
;
18367 ndr
->flags
= _flags_save_string
;
18370 uint32_t _flags_save_string
= ndr
->flags
;
18371 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18372 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
18373 if (_ptr_environment
) {
18374 NDR_PULL_ALLOC(ndr
, r
->environment
);
18375 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->environment
, _ptr_environment
));
18377 r
->environment
= NULL
;
18379 ndr
->flags
= _flags_save_string
;
18382 uint32_t _flags_save_string
= ndr
->flags
;
18383 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18384 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_dll_name
));
18385 if (_ptr_dll_name
) {
18386 NDR_PULL_ALLOC(ndr
, r
->dll_name
);
18387 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->dll_name
, _ptr_dll_name
));
18389 r
->dll_name
= NULL
;
18391 ndr
->flags
= _flags_save_string
;
18393 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
18395 if (ndr_flags
& NDR_BUFFERS
) {
18397 uint32_t _flags_save_string
= ndr
->flags
;
18398 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18399 if (r
->monitor_name
) {
18400 uint32_t _relative_save_offset
;
18401 _relative_save_offset
= ndr
->offset
;
18402 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->monitor_name
));
18403 _mem_save_monitor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18404 NDR_PULL_SET_MEM_CTX(ndr
, r
->monitor_name
, 0);
18405 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->monitor_name
));
18406 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_monitor_name_0
, 0);
18407 if (ndr
->offset
> ndr
->relative_highest_offset
) {
18408 ndr
->relative_highest_offset
= ndr
->offset
;
18410 ndr
->offset
= _relative_save_offset
;
18412 ndr
->flags
= _flags_save_string
;
18415 uint32_t _flags_save_string
= ndr
->flags
;
18416 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18417 if (r
->environment
) {
18418 uint32_t _relative_save_offset
;
18419 _relative_save_offset
= ndr
->offset
;
18420 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->environment
));
18421 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18422 NDR_PULL_SET_MEM_CTX(ndr
, r
->environment
, 0);
18423 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->environment
));
18424 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
18425 if (ndr
->offset
> ndr
->relative_highest_offset
) {
18426 ndr
->relative_highest_offset
= ndr
->offset
;
18428 ndr
->offset
= _relative_save_offset
;
18430 ndr
->flags
= _flags_save_string
;
18433 uint32_t _flags_save_string
= ndr
->flags
;
18434 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18436 uint32_t _relative_save_offset
;
18437 _relative_save_offset
= ndr
->offset
;
18438 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->dll_name
));
18439 _mem_save_dll_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18440 NDR_PULL_SET_MEM_CTX(ndr
, r
->dll_name
, 0);
18441 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->dll_name
));
18442 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_dll_name_0
, 0);
18443 if (ndr
->offset
> ndr
->relative_highest_offset
) {
18444 ndr
->relative_highest_offset
= ndr
->offset
;
18446 ndr
->offset
= _relative_save_offset
;
18448 ndr
->flags
= _flags_save_string
;
18451 return NDR_ERR_SUCCESS
;
18454 _PUBLIC_
void ndr_print_spoolss_MonitorInfo2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_MonitorInfo2
*r
)
18456 ndr_print_struct(ndr
, name
, "spoolss_MonitorInfo2");
18458 ndr_print_ptr(ndr
, "monitor_name", r
->monitor_name
);
18460 if (r
->monitor_name
) {
18461 ndr_print_string(ndr
, "monitor_name", r
->monitor_name
);
18464 ndr_print_ptr(ndr
, "environment", r
->environment
);
18466 if (r
->environment
) {
18467 ndr_print_string(ndr
, "environment", r
->environment
);
18470 ndr_print_ptr(ndr
, "dll_name", r
->dll_name
);
18473 ndr_print_string(ndr
, "dll_name", r
->dll_name
);
18479 _PUBLIC_
size_t ndr_size_spoolss_MonitorInfo2(const struct spoolss_MonitorInfo2
*r
, struct smb_iconv_convenience
*ic
, int flags
)
18481 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_MonitorInfo2
, ic
);
18484 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_MonitorInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_MonitorInfo
*r
)
18486 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
18488 uint32_t _flags_save_UNION
= ndr
->flags
;
18489 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18490 if (ndr_flags
& NDR_SCALARS
) {
18491 int level
= ndr_push_get_switch_value(ndr
, r
);
18492 NDR_CHECK(ndr_push_union_align(ndr
, 5));
18495 NDR_CHECK(ndr_push_align(ndr
, 5));
18496 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18497 NDR_CHECK(ndr_push_spoolss_MonitorInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
18501 NDR_CHECK(ndr_push_align(ndr
, 5));
18502 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18503 NDR_CHECK(ndr_push_spoolss_MonitorInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
18511 if (ndr_flags
& NDR_BUFFERS
) {
18512 int level
= ndr_push_get_switch_value(ndr
, r
);
18513 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
18516 NDR_CHECK(ndr_push_spoolss_MonitorInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
18520 NDR_CHECK(ndr_push_spoolss_MonitorInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
18528 ndr
->flags
= _flags_save_UNION
;
18530 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
18531 return NDR_ERR_SUCCESS
;
18534 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_MonitorInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_MonitorInfo
*r
)
18536 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
18539 uint32_t _flags_save_UNION
= ndr
->flags
;
18540 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18541 level
= ndr_pull_get_switch_value(ndr
, r
);
18542 if (ndr_flags
& NDR_SCALARS
) {
18543 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
18546 NDR_CHECK(ndr_pull_align(ndr
, 5));
18547 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18548 NDR_CHECK(ndr_pull_spoolss_MonitorInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
18552 NDR_CHECK(ndr_pull_align(ndr
, 5));
18553 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18554 NDR_CHECK(ndr_pull_spoolss_MonitorInfo2(ndr
, NDR_SCALARS
, &r
->info2
));
18562 if (ndr_flags
& NDR_BUFFERS
) {
18563 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
18566 NDR_CHECK(ndr_pull_spoolss_MonitorInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
18570 NDR_CHECK(ndr_pull_spoolss_MonitorInfo2(ndr
, NDR_BUFFERS
, &r
->info2
));
18578 ndr
->flags
= _flags_save_UNION
;
18580 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
18581 return NDR_ERR_SUCCESS
;
18584 _PUBLIC_
void ndr_print_spoolss_MonitorInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_MonitorInfo
*r
)
18588 uint32_t _flags_save_UNION
= ndr
->flags
;
18589 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18590 level
= ndr_print_get_switch_value(ndr
, r
);
18591 ndr_print_union(ndr
, name
, level
, "spoolss_MonitorInfo");
18594 ndr_print_spoolss_MonitorInfo1(ndr
, "info1", &r
->info1
);
18598 ndr_print_spoolss_MonitorInfo2(ndr
, "info2", &r
->info2
);
18605 ndr
->flags
= _flags_save_UNION
;
18609 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcDataTypesInfo1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrintProcDataTypesInfo1
*r
)
18611 if (ndr_flags
& NDR_SCALARS
) {
18612 NDR_CHECK(ndr_push_align(ndr
, 5));
18614 uint32_t _flags_save_string
= ndr
->flags
;
18615 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18616 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->name_array
));
18617 ndr
->flags
= _flags_save_string
;
18619 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
18621 if (ndr_flags
& NDR_BUFFERS
) {
18623 uint32_t _flags_save_string
= ndr
->flags
;
18624 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18625 if (r
->name_array
) {
18626 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->name_array
));
18627 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->name_array
));
18628 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->name_array
));
18630 ndr
->flags
= _flags_save_string
;
18633 return NDR_ERR_SUCCESS
;
18636 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcDataTypesInfo1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrintProcDataTypesInfo1
*r
)
18638 uint32_t _ptr_name_array
;
18639 TALLOC_CTX
*_mem_save_name_array_0
;
18640 if (ndr_flags
& NDR_SCALARS
) {
18641 NDR_CHECK(ndr_pull_align(ndr
, 5));
18643 uint32_t _flags_save_string
= ndr
->flags
;
18644 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18645 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_name_array
));
18646 if (_ptr_name_array
) {
18647 NDR_PULL_ALLOC(ndr
, r
->name_array
);
18648 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->name_array
, _ptr_name_array
));
18650 r
->name_array
= NULL
;
18652 ndr
->flags
= _flags_save_string
;
18654 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
18656 if (ndr_flags
& NDR_BUFFERS
) {
18658 uint32_t _flags_save_string
= ndr
->flags
;
18659 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
18660 if (r
->name_array
) {
18661 uint32_t _relative_save_offset
;
18662 _relative_save_offset
= ndr
->offset
;
18663 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->name_array
));
18664 _mem_save_name_array_0
= NDR_PULL_GET_MEM_CTX(ndr
);
18665 NDR_PULL_SET_MEM_CTX(ndr
, r
->name_array
, 0);
18666 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->name_array
));
18667 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_name_array_0
, 0);
18668 if (ndr
->offset
> ndr
->relative_highest_offset
) {
18669 ndr
->relative_highest_offset
= ndr
->offset
;
18671 ndr
->offset
= _relative_save_offset
;
18673 ndr
->flags
= _flags_save_string
;
18676 return NDR_ERR_SUCCESS
;
18679 _PUBLIC_
void ndr_print_spoolss_PrintProcDataTypesInfo1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrintProcDataTypesInfo1
*r
)
18681 ndr_print_struct(ndr
, name
, "spoolss_PrintProcDataTypesInfo1");
18683 ndr_print_ptr(ndr
, "name_array", r
->name_array
);
18685 if (r
->name_array
) {
18686 ndr_print_string(ndr
, "name_array", r
->name_array
);
18692 _PUBLIC_
size_t ndr_size_spoolss_PrintProcDataTypesInfo1(const struct spoolss_PrintProcDataTypesInfo1
*r
, struct smb_iconv_convenience
*ic
, int flags
)
18694 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrintProcDataTypesInfo1
, ic
);
18697 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintProcDataTypesInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_PrintProcDataTypesInfo
*r
)
18699 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
18701 uint32_t _flags_save_UNION
= ndr
->flags
;
18702 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18703 if (ndr_flags
& NDR_SCALARS
) {
18704 int level
= ndr_push_get_switch_value(ndr
, r
);
18705 NDR_CHECK(ndr_push_union_align(ndr
, 5));
18708 NDR_CHECK(ndr_push_align(ndr
, 5));
18709 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18710 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
18718 if (ndr_flags
& NDR_BUFFERS
) {
18719 int level
= ndr_push_get_switch_value(ndr
, r
);
18720 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
18723 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
18731 ndr
->flags
= _flags_save_UNION
;
18733 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
18734 return NDR_ERR_SUCCESS
;
18737 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintProcDataTypesInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_PrintProcDataTypesInfo
*r
)
18739 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
18742 uint32_t _flags_save_UNION
= ndr
->flags
;
18743 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18744 level
= ndr_pull_get_switch_value(ndr
, r
);
18745 if (ndr_flags
& NDR_SCALARS
) {
18746 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
18749 NDR_CHECK(ndr_pull_align(ndr
, 5));
18750 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
18751 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr
, NDR_SCALARS
, &r
->info1
));
18759 if (ndr_flags
& NDR_BUFFERS
) {
18760 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
18763 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo1(ndr
, NDR_BUFFERS
, &r
->info1
));
18771 ndr
->flags
= _flags_save_UNION
;
18773 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
18774 return NDR_ERR_SUCCESS
;
18777 _PUBLIC_
void ndr_print_spoolss_PrintProcDataTypesInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_PrintProcDataTypesInfo
*r
)
18781 uint32_t _flags_save_UNION
= ndr
->flags
;
18782 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_RELATIVE_REVERSE
);
18783 level
= ndr_print_get_switch_value(ndr
, r
);
18784 ndr_print_union(ndr
, name
, level
, "spoolss_PrintProcDataTypesInfo");
18787 ndr_print_spoolss_PrintProcDataTypesInfo1(ndr
, "info1", &r
->info1
);
18794 ndr
->flags
= _flags_save_UNION
;
18798 static enum ndr_err_code
ndr_push_spoolss_PrinterChangeFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
18800 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
18801 return NDR_ERR_SUCCESS
;
18804 static enum ndr_err_code
ndr_pull_spoolss_PrinterChangeFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
18807 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
18809 return NDR_ERR_SUCCESS
;
18812 _PUBLIC_
void ndr_print_spoolss_PrinterChangeFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
18814 ndr_print_uint32(ndr
, name
, r
);
18816 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINTER", PRINTER_CHANGE_ADD_PRINTER
, r
);
18817 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SET_PRINTER", PRINTER_CHANGE_SET_PRINTER
, r
);
18818 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINTER", PRINTER_CHANGE_DELETE_PRINTER
, r
);
18819 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_FAILED_CONNECTION_PRINTER", PRINTER_CHANGE_FAILED_CONNECTION_PRINTER
, r
);
18820 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_JOB", PRINTER_CHANGE_ADD_JOB
, r
);
18821 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SET_JOB", PRINTER_CHANGE_SET_JOB
, r
);
18822 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_JOB", PRINTER_CHANGE_DELETE_JOB
, r
);
18823 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_WRITE_JOB", PRINTER_CHANGE_WRITE_JOB
, r
);
18824 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_FORM", PRINTER_CHANGE_ADD_FORM
, r
);
18825 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SET_FORM", PRINTER_CHANGE_SET_FORM
, r
);
18826 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_FORM", PRINTER_CHANGE_DELETE_FORM
, r
);
18827 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PORT", PRINTER_CHANGE_ADD_PORT
, r
);
18828 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_CONFIGURE_PORT", PRINTER_CHANGE_CONFIGURE_PORT
, r
);
18829 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PORT", PRINTER_CHANGE_DELETE_PORT
, r
);
18830 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINT_PROCESSOR", PRINTER_CHANGE_ADD_PRINT_PROCESSOR
, r
);
18831 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINT_PROCESSOR", PRINTER_CHANGE_DELETE_PRINT_PROCESSOR
, r
);
18832 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SERVER", PRINTER_CHANGE_SERVER
, r
);
18833 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_ADD_PRINTER_DRIVER", PRINTER_CHANGE_ADD_PRINTER_DRIVER
, r
);
18834 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_SET_PRINTER_DRIVER", PRINTER_CHANGE_SET_PRINTER_DRIVER
, r
);
18835 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_DELETE_PRINTER_DRIVER", PRINTER_CHANGE_DELETE_PRINTER_DRIVER
, r
);
18836 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_CHANGE_TIMEOUT", PRINTER_CHANGE_TIMEOUT
, r
);
18840 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_JobNotifyField(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_JobNotifyField r
)
18842 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
18843 return NDR_ERR_SUCCESS
;
18846 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_JobNotifyField(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_JobNotifyField
*r
)
18849 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
18851 return NDR_ERR_SUCCESS
;
18854 _PUBLIC_
void ndr_print_spoolss_JobNotifyField(struct ndr_print
*ndr
, const char *name
, enum spoolss_JobNotifyField r
)
18856 const char *val
= NULL
;
18859 case JOB_NOTIFY_FIELD_PRINTER_NAME
: val
= "JOB_NOTIFY_FIELD_PRINTER_NAME"; break;
18860 case JOB_NOTIFY_FIELD_MACHINE_NAME
: val
= "JOB_NOTIFY_FIELD_MACHINE_NAME"; break;
18861 case JOB_NOTIFY_FIELD_PORT_NAME
: val
= "JOB_NOTIFY_FIELD_PORT_NAME"; break;
18862 case JOB_NOTIFY_FIELD_USER_NAME
: val
= "JOB_NOTIFY_FIELD_USER_NAME"; break;
18863 case JOB_NOTIFY_FIELD_NOTIFY_NAME
: val
= "JOB_NOTIFY_FIELD_NOTIFY_NAME"; break;
18864 case JOB_NOTIFY_FIELD_DATATYPE
: val
= "JOB_NOTIFY_FIELD_DATATYPE"; break;
18865 case JOB_NOTIFY_FIELD_PRINT_PROCESSOR
: val
= "JOB_NOTIFY_FIELD_PRINT_PROCESSOR"; break;
18866 case JOB_NOTIFY_FIELD_PARAMETERS
: val
= "JOB_NOTIFY_FIELD_PARAMETERS"; break;
18867 case JOB_NOTIFY_FIELD_DRIVER_NAME
: val
= "JOB_NOTIFY_FIELD_DRIVER_NAME"; break;
18868 case JOB_NOTIFY_FIELD_DEVMODE
: val
= "JOB_NOTIFY_FIELD_DEVMODE"; break;
18869 case JOB_NOTIFY_FIELD_STATUS
: val
= "JOB_NOTIFY_FIELD_STATUS"; break;
18870 case JOB_NOTIFY_FIELD_STATUS_STRING
: val
= "JOB_NOTIFY_FIELD_STATUS_STRING"; break;
18871 case JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR
: val
= "JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR"; break;
18872 case JOB_NOTIFY_FIELD_DOCUMENT
: val
= "JOB_NOTIFY_FIELD_DOCUMENT"; break;
18873 case JOB_NOTIFY_FIELD_PRIORITY
: val
= "JOB_NOTIFY_FIELD_PRIORITY"; break;
18874 case JOB_NOTIFY_FIELD_POSITION
: val
= "JOB_NOTIFY_FIELD_POSITION"; break;
18875 case JOB_NOTIFY_FIELD_SUBMITTED
: val
= "JOB_NOTIFY_FIELD_SUBMITTED"; break;
18876 case JOB_NOTIFY_FIELD_START_TIME
: val
= "JOB_NOTIFY_FIELD_START_TIME"; break;
18877 case JOB_NOTIFY_FIELD_UNTIL_TIME
: val
= "JOB_NOTIFY_FIELD_UNTIL_TIME"; break;
18878 case JOB_NOTIFY_FIELD_TIME
: val
= "JOB_NOTIFY_FIELD_TIME"; break;
18879 case JOB_NOTIFY_FIELD_TOTAL_PAGES
: val
= "JOB_NOTIFY_FIELD_TOTAL_PAGES"; break;
18880 case JOB_NOTIFY_FIELD_PAGES_PRINTED
: val
= "JOB_NOTIFY_FIELD_PAGES_PRINTED"; break;
18881 case JOB_NOTIFY_FIELD_TOTAL_BYTES
: val
= "JOB_NOTIFY_FIELD_TOTAL_BYTES"; break;
18882 case JOB_NOTIFY_FIELD_BYTES_PRINTED
: val
= "JOB_NOTIFY_FIELD_BYTES_PRINTED"; break;
18884 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
18887 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrintNotifyField(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PrintNotifyField r
)
18889 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
18890 return NDR_ERR_SUCCESS
;
18893 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrintNotifyField(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PrintNotifyField
*r
)
18896 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
18898 return NDR_ERR_SUCCESS
;
18901 _PUBLIC_
void ndr_print_spoolss_PrintNotifyField(struct ndr_print
*ndr
, const char *name
, enum spoolss_PrintNotifyField r
)
18903 const char *val
= NULL
;
18906 case PRINTER_NOTIFY_FIELD_SERVER_NAME
: val
= "PRINTER_NOTIFY_FIELD_SERVER_NAME"; break;
18907 case PRINTER_NOTIFY_FIELD_PRINTER_NAME
: val
= "PRINTER_NOTIFY_FIELD_PRINTER_NAME"; break;
18908 case PRINTER_NOTIFY_FIELD_SHARE_NAME
: val
= "PRINTER_NOTIFY_FIELD_SHARE_NAME"; break;
18909 case PRINTER_NOTIFY_FIELD_PORT_NAME
: val
= "PRINTER_NOTIFY_FIELD_PORT_NAME"; break;
18910 case PRINTER_NOTIFY_FIELD_DRIVER_NAME
: val
= "PRINTER_NOTIFY_FIELD_DRIVER_NAME"; break;
18911 case PRINTER_NOTIFY_FIELD_COMMENT
: val
= "PRINTER_NOTIFY_FIELD_COMMENT"; break;
18912 case PRINTER_NOTIFY_FIELD_LOCATION
: val
= "PRINTER_NOTIFY_FIELD_LOCATION"; break;
18913 case PRINTER_NOTIFY_FIELD_DEVMODE
: val
= "PRINTER_NOTIFY_FIELD_DEVMODE"; break;
18914 case PRINTER_NOTIFY_FIELD_SEPFILE
: val
= "PRINTER_NOTIFY_FIELD_SEPFILE"; break;
18915 case PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR
: val
= "PRINTER_NOTIFY_FIELD_PRINT_PROCESSOR"; break;
18916 case PRINTER_NOTIFY_FIELD_PARAMETERS
: val
= "PRINTER_NOTIFY_FIELD_PARAMETERS"; break;
18917 case PRINTER_NOTIFY_FIELD_DATATYPE
: val
= "PRINTER_NOTIFY_FIELD_DATATYPE"; break;
18918 case PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR
: val
= "PRINTER_NOTIFY_FIELD_SECURITY_DESCRIPTOR"; break;
18919 case PRINTER_NOTIFY_FIELD_ATTRIBUTES
: val
= "PRINTER_NOTIFY_FIELD_ATTRIBUTES"; break;
18920 case PRINTER_NOTIFY_FIELD_PRIORITY
: val
= "PRINTER_NOTIFY_FIELD_PRIORITY"; break;
18921 case PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY
: val
= "PRINTER_NOTIFY_FIELD_DEFAULT_PRIORITY"; break;
18922 case PRINTER_NOTIFY_FIELD_START_TIME
: val
= "PRINTER_NOTIFY_FIELD_START_TIME"; break;
18923 case PRINTER_NOTIFY_FIELD_UNTIL_TIME
: val
= "PRINTER_NOTIFY_FIELD_UNTIL_TIME"; break;
18924 case PRINTER_NOTIFY_FIELD_STATUS
: val
= "PRINTER_NOTIFY_FIELD_STATUS"; break;
18925 case PRINTER_NOTIFY_FIELD_STATUS_STRING
: val
= "PRINTER_NOTIFY_FIELD_STATUS_STRING"; break;
18926 case PRINTER_NOTIFY_FIELD_CJOBS
: val
= "PRINTER_NOTIFY_FIELD_CJOBS"; break;
18927 case PRINTER_NOTIFY_FIELD_AVERAGE_PPM
: val
= "PRINTER_NOTIFY_FIELD_AVERAGE_PPM"; break;
18928 case PRINTER_NOTIFY_FIELD_TOTAL_PAGES
: val
= "PRINTER_NOTIFY_FIELD_TOTAL_PAGES"; break;
18929 case PRINTER_NOTIFY_FIELD_PAGES_PRINTED
: val
= "PRINTER_NOTIFY_FIELD_PAGES_PRINTED"; break;
18930 case PRINTER_NOTIFY_FIELD_TOTAL_BYTES
: val
= "PRINTER_NOTIFY_FIELD_TOTAL_BYTES"; break;
18931 case PRINTER_NOTIFY_FIELD_BYTES_PRINTED
: val
= "PRINTER_NOTIFY_FIELD_BYTES_PRINTED"; break;
18932 case PRINTER_NOTIFY_FIELD_OBJECT_GUID
: val
= "PRINTER_NOTIFY_FIELD_OBJECT_GUID"; break;
18933 case PRINTER_NOTIFY_FIELD_FRIENDLY_NAME
: val
= "PRINTER_NOTIFY_FIELD_FRIENDLY_NAME"; break;
18935 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
18938 static enum ndr_err_code
ndr_push_spoolss_NotifyType(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_NotifyType r
)
18940 NDR_CHECK(ndr_push_enum_uint16(ndr
, NDR_SCALARS
, r
));
18941 return NDR_ERR_SUCCESS
;
18944 static enum ndr_err_code
ndr_pull_spoolss_NotifyType(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_NotifyType
*r
)
18947 NDR_CHECK(ndr_pull_enum_uint16(ndr
, NDR_SCALARS
, &v
));
18949 return NDR_ERR_SUCCESS
;
18952 _PUBLIC_
void ndr_print_spoolss_NotifyType(struct ndr_print
*ndr
, const char *name
, enum spoolss_NotifyType r
)
18954 const char *val
= NULL
;
18957 case PRINTER_NOTIFY_TYPE
: val
= "PRINTER_NOTIFY_TYPE"; break;
18958 case JOB_NOTIFY_TYPE
: val
= "JOB_NOTIFY_TYPE"; break;
18960 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
18963 static enum ndr_err_code
ndr_push_spoolss_Field(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_Field
*r
)
18965 if (ndr_flags
& NDR_SCALARS
) {
18966 int level
= ndr_push_get_switch_value(ndr
, r
);
18967 NDR_CHECK(ndr_push_union_align(ndr
, 2));
18969 case PRINTER_NOTIFY_TYPE
: {
18970 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->field
));
18973 case JOB_NOTIFY_TYPE
: {
18974 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->field
));
18978 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->field
));
18983 if (ndr_flags
& NDR_BUFFERS
) {
18984 int level
= ndr_push_get_switch_value(ndr
, r
);
18986 case PRINTER_NOTIFY_TYPE
:
18989 case JOB_NOTIFY_TYPE
:
18997 return NDR_ERR_SUCCESS
;
19000 static enum ndr_err_code
ndr_pull_spoolss_Field(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_Field
*r
)
19003 level
= ndr_pull_get_switch_value(ndr
, r
);
19004 if (ndr_flags
& NDR_SCALARS
) {
19005 NDR_CHECK(ndr_pull_union_align(ndr
, 2));
19007 case PRINTER_NOTIFY_TYPE
: {
19008 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->field
));
19011 case JOB_NOTIFY_TYPE
: {
19012 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->field
));
19016 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->field
));
19021 if (ndr_flags
& NDR_BUFFERS
) {
19023 case PRINTER_NOTIFY_TYPE
:
19026 case JOB_NOTIFY_TYPE
:
19034 return NDR_ERR_SUCCESS
;
19037 static enum ndr_err_code
ndr_push_spoolss_NotifyOptionType(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_NotifyOptionType
*r
)
19039 uint32_t cntr_fields_1
;
19040 if (ndr_flags
& NDR_SCALARS
) {
19041 NDR_CHECK(ndr_push_align(ndr
, 5));
19042 NDR_CHECK(ndr_push_spoolss_NotifyType(ndr
, NDR_SCALARS
, r
->type
));
19043 NDR_CHECK(ndr_push_uint16(ndr
, NDR_SCALARS
, r
->u1
));
19044 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u2
));
19045 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->u3
));
19046 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
19047 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->fields
));
19048 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
19050 if (ndr_flags
& NDR_BUFFERS
) {
19052 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
19053 for (cntr_fields_1
= 0; cntr_fields_1
< r
->count
; cntr_fields_1
++) {
19054 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->fields
[cntr_fields_1
], r
->type
));
19055 NDR_CHECK(ndr_push_spoolss_Field(ndr
, NDR_SCALARS
, &r
->fields
[cntr_fields_1
]));
19059 return NDR_ERR_SUCCESS
;
19062 static enum ndr_err_code
ndr_pull_spoolss_NotifyOptionType(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_NotifyOptionType
*r
)
19064 uint32_t _ptr_fields
;
19065 uint32_t cntr_fields_1
;
19066 TALLOC_CTX
*_mem_save_fields_0
;
19067 TALLOC_CTX
*_mem_save_fields_1
;
19068 if (ndr_flags
& NDR_SCALARS
) {
19069 NDR_CHECK(ndr_pull_align(ndr
, 5));
19070 NDR_CHECK(ndr_pull_spoolss_NotifyType(ndr
, NDR_SCALARS
, &r
->type
));
19071 NDR_CHECK(ndr_pull_uint16(ndr
, NDR_SCALARS
, &r
->u1
));
19072 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u2
));
19073 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->u3
));
19074 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
19075 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_fields
));
19077 NDR_PULL_ALLOC(ndr
, r
->fields
);
19081 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
19083 if (ndr_flags
& NDR_BUFFERS
) {
19085 _mem_save_fields_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19086 NDR_PULL_SET_MEM_CTX(ndr
, r
->fields
, 0);
19087 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->fields
));
19088 NDR_PULL_ALLOC_N(ndr
, r
->fields
, ndr_get_array_size(ndr
, &r
->fields
));
19089 _mem_save_fields_1
= NDR_PULL_GET_MEM_CTX(ndr
);
19090 NDR_PULL_SET_MEM_CTX(ndr
, r
->fields
, 0);
19091 for (cntr_fields_1
= 0; cntr_fields_1
< r
->count
; cntr_fields_1
++) {
19092 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->fields
[cntr_fields_1
], r
->type
));
19093 NDR_CHECK(ndr_pull_spoolss_Field(ndr
, NDR_SCALARS
, &r
->fields
[cntr_fields_1
]));
19095 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_fields_1
, 0);
19096 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_fields_0
, 0);
19099 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->fields
, r
->count
));
19102 return NDR_ERR_SUCCESS
;
19105 _PUBLIC_
void ndr_print_spoolss_NotifyOptionType(struct ndr_print
*ndr
, const char *name
, const struct spoolss_NotifyOptionType
*r
)
19107 uint32_t cntr_fields_1
;
19108 ndr_print_struct(ndr
, name
, "spoolss_NotifyOptionType");
19110 ndr_print_spoolss_NotifyType(ndr
, "type", r
->type
);
19111 ndr_print_uint16(ndr
, "u1", r
->u1
);
19112 ndr_print_uint32(ndr
, "u2", r
->u2
);
19113 ndr_print_uint32(ndr
, "u3", r
->u3
);
19114 ndr_print_uint32(ndr
, "count", r
->count
);
19115 ndr_print_ptr(ndr
, "fields", r
->fields
);
19118 ndr
->print(ndr
, "%s: ARRAY(%d)", "fields", (int)r
->count
);
19120 for (cntr_fields_1
=0;cntr_fields_1
<r
->count
;cntr_fields_1
++) {
19122 if (asprintf(&idx_1
, "[%d]", cntr_fields_1
) != -1) {
19123 ndr_print_set_switch_value(ndr
, &r
->fields
[cntr_fields_1
], r
->type
);
19124 ndr_print_spoolss_Field(ndr
, "fields", &r
->fields
[cntr_fields_1
]);
19134 static enum ndr_err_code
ndr_push_spoolssNotifyOptionFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
19136 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
19137 return NDR_ERR_SUCCESS
;
19140 static enum ndr_err_code
ndr_pull_spoolssNotifyOptionFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
19143 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
19145 return NDR_ERR_SUCCESS
;
19148 _PUBLIC_
void ndr_print_spoolssNotifyOptionFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
19150 ndr_print_uint32(ndr
, name
, r
);
19152 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_NOTIFY_OPTIONS_REFRESH", PRINTER_NOTIFY_OPTIONS_REFRESH
, r
);
19156 static enum ndr_err_code
ndr_push_spoolss_NotifyOption(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_NotifyOption
*r
)
19158 uint32_t cntr_types_1
;
19159 if (ndr_flags
& NDR_SCALARS
) {
19160 NDR_CHECK(ndr_push_align(ndr
, 5));
19161 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
19162 NDR_CHECK(ndr_push_spoolssNotifyOptionFlags(ndr
, NDR_SCALARS
, r
->flags
));
19163 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
19164 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->types
));
19165 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
19167 if (ndr_flags
& NDR_BUFFERS
) {
19169 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
19170 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
19171 NDR_CHECK(ndr_push_spoolss_NotifyOptionType(ndr
, NDR_SCALARS
, &r
->types
[cntr_types_1
]));
19173 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
19174 NDR_CHECK(ndr_push_spoolss_NotifyOptionType(ndr
, NDR_BUFFERS
, &r
->types
[cntr_types_1
]));
19178 return NDR_ERR_SUCCESS
;
19181 static enum ndr_err_code
ndr_pull_spoolss_NotifyOption(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_NotifyOption
*r
)
19183 uint32_t _ptr_types
;
19184 uint32_t cntr_types_1
;
19185 TALLOC_CTX
*_mem_save_types_0
;
19186 TALLOC_CTX
*_mem_save_types_1
;
19187 if (ndr_flags
& NDR_SCALARS
) {
19188 NDR_CHECK(ndr_pull_align(ndr
, 5));
19189 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
19190 NDR_CHECK(ndr_pull_spoolssNotifyOptionFlags(ndr
, NDR_SCALARS
, &r
->flags
));
19191 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
19192 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_types
));
19194 NDR_PULL_ALLOC(ndr
, r
->types
);
19198 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
19200 if (ndr_flags
& NDR_BUFFERS
) {
19202 _mem_save_types_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19203 NDR_PULL_SET_MEM_CTX(ndr
, r
->types
, 0);
19204 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->types
));
19205 NDR_PULL_ALLOC_N(ndr
, r
->types
, ndr_get_array_size(ndr
, &r
->types
));
19206 _mem_save_types_1
= NDR_PULL_GET_MEM_CTX(ndr
);
19207 NDR_PULL_SET_MEM_CTX(ndr
, r
->types
, 0);
19208 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
19209 NDR_CHECK(ndr_pull_spoolss_NotifyOptionType(ndr
, NDR_SCALARS
, &r
->types
[cntr_types_1
]));
19211 for (cntr_types_1
= 0; cntr_types_1
< r
->count
; cntr_types_1
++) {
19212 NDR_CHECK(ndr_pull_spoolss_NotifyOptionType(ndr
, NDR_BUFFERS
, &r
->types
[cntr_types_1
]));
19214 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_1
, 0);
19215 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_types_0
, 0);
19218 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->types
, r
->count
));
19221 return NDR_ERR_SUCCESS
;
19224 _PUBLIC_
void ndr_print_spoolss_NotifyOption(struct ndr_print
*ndr
, const char *name
, const struct spoolss_NotifyOption
*r
)
19226 uint32_t cntr_types_1
;
19227 ndr_print_struct(ndr
, name
, "spoolss_NotifyOption");
19229 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->version
);
19230 ndr_print_spoolssNotifyOptionFlags(ndr
, "flags", r
->flags
);
19231 ndr_print_uint32(ndr
, "count", r
->count
);
19232 ndr_print_ptr(ndr
, "types", r
->types
);
19235 ndr
->print(ndr
, "%s: ARRAY(%d)", "types", (int)r
->count
);
19237 for (cntr_types_1
=0;cntr_types_1
<r
->count
;cntr_types_1
++) {
19239 if (asprintf(&idx_1
, "[%d]", cntr_types_1
) != -1) {
19240 ndr_print_spoolss_NotifyOptionType(ndr
, "types", &r
->types
[cntr_types_1
]);
19250 static enum ndr_err_code
ndr_push_spoolss_NotifyString(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_NotifyString
*r
)
19252 if (ndr_flags
& NDR_SCALARS
) {
19253 NDR_CHECK(ndr_push_align(ndr
, 5));
19254 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
19255 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->string
));
19256 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
19258 if (ndr_flags
& NDR_BUFFERS
) {
19260 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->size
/ 2));
19261 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->string
, r
->size
/ 2, sizeof(uint16_t), CH_UTF16
));
19264 return NDR_ERR_SUCCESS
;
19267 static enum ndr_err_code
ndr_pull_spoolss_NotifyString(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_NotifyString
*r
)
19269 uint32_t _ptr_string
;
19270 TALLOC_CTX
*_mem_save_string_0
;
19271 if (ndr_flags
& NDR_SCALARS
) {
19272 NDR_CHECK(ndr_pull_align(ndr
, 5));
19273 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
19274 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_string
));
19276 NDR_PULL_ALLOC(ndr
, r
->string
);
19280 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
19282 if (ndr_flags
& NDR_BUFFERS
) {
19284 _mem_save_string_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19285 NDR_PULL_SET_MEM_CTX(ndr
, r
->string
, 0);
19286 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->string
));
19287 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->string
, ndr_get_array_size(ndr
, &r
->string
), sizeof(uint16_t), CH_UTF16
));
19288 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_string_0
, 0);
19291 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->string
, r
->size
/ 2));
19294 return NDR_ERR_SUCCESS
;
19297 _PUBLIC_
void ndr_print_spoolss_NotifyString(struct ndr_print
*ndr
, const char *name
, const struct spoolss_NotifyString
*r
)
19299 ndr_print_struct(ndr
, name
, "spoolss_NotifyString");
19301 ndr_print_uint32(ndr
, "size", r
->size
);
19302 ndr_print_ptr(ndr
, "string", r
->string
);
19305 ndr_print_string(ndr
, "string", r
->string
);
19311 static enum ndr_err_code
ndr_push_spoolss_NotifyTable(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_NotifyTable r
)
19313 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
19314 return NDR_ERR_SUCCESS
;
19317 static enum ndr_err_code
ndr_pull_spoolss_NotifyTable(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_NotifyTable
*r
)
19320 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
19322 return NDR_ERR_SUCCESS
;
19325 _PUBLIC_
void ndr_print_spoolss_NotifyTable(struct ndr_print
*ndr
, const char *name
, enum spoolss_NotifyTable r
)
19327 const char *val
= NULL
;
19330 case NOTIFY_TABLE_DWORD
: val
= "NOTIFY_TABLE_DWORD"; break;
19331 case NOTIFY_TABLE_STRING
: val
= "NOTIFY_TABLE_STRING"; break;
19332 case NOTIFY_TABLE_DEVMODE
: val
= "NOTIFY_TABLE_DEVMODE"; break;
19333 case NOTIFY_TABLE_TIME
: val
= "NOTIFY_TABLE_TIME"; break;
19334 case NOTIFY_TABLE_SECURITYDESCRIPTOR
: val
= "NOTIFY_TABLE_SECURITYDESCRIPTOR"; break;
19336 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
19339 static enum ndr_err_code
ndr_push_spoolss_NotifyData(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_NotifyData
*r
)
19341 if (ndr_flags
& NDR_SCALARS
) {
19342 int level
= ndr_push_get_switch_value(ndr
, r
);
19343 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
19344 NDR_CHECK(ndr_push_union_align(ndr
, 5));
19347 uint32_t cntr_integer_0
;
19348 for (cntr_integer_0
= 0; cntr_integer_0
< 2; cntr_integer_0
++) {
19349 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->integer
[cntr_integer_0
]));
19354 NDR_CHECK(ndr_push_spoolss_NotifyString(ndr
, NDR_SCALARS
, &r
->string
));
19358 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
, &r
->devmode
));
19362 NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr
, NDR_SCALARS
, &r
->time
));
19366 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sd
));
19370 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
19373 if (ndr_flags
& NDR_BUFFERS
) {
19374 int level
= ndr_push_get_switch_value(ndr
, r
);
19380 NDR_CHECK(ndr_push_spoolss_NotifyString(ndr
, NDR_BUFFERS
, &r
->string
));
19384 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_BUFFERS
, &r
->devmode
));
19388 NDR_CHECK(ndr_push_spoolss_TimeCtr(ndr
, NDR_BUFFERS
, &r
->time
));
19392 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sd
));
19396 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
19399 return NDR_ERR_SUCCESS
;
19402 static enum ndr_err_code
ndr_pull_spoolss_NotifyData(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_NotifyData
*r
)
19406 level
= ndr_pull_get_switch_value(ndr
, r
);
19407 if (ndr_flags
& NDR_SCALARS
) {
19408 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
19409 if (_level
!= level
) {
19410 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
19412 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
19415 uint32_t cntr_integer_0
;
19416 for (cntr_integer_0
= 0; cntr_integer_0
< 2; cntr_integer_0
++) {
19417 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->integer
[cntr_integer_0
]));
19422 NDR_CHECK(ndr_pull_spoolss_NotifyString(ndr
, NDR_SCALARS
, &r
->string
));
19426 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
, &r
->devmode
));
19430 NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr
, NDR_SCALARS
, &r
->time
));
19434 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
, &r
->sd
));
19438 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
19441 if (ndr_flags
& NDR_BUFFERS
) {
19447 NDR_CHECK(ndr_pull_spoolss_NotifyString(ndr
, NDR_BUFFERS
, &r
->string
));
19451 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_BUFFERS
, &r
->devmode
));
19455 NDR_CHECK(ndr_pull_spoolss_TimeCtr(ndr
, NDR_BUFFERS
, &r
->time
));
19459 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_BUFFERS
, &r
->sd
));
19463 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
19466 return NDR_ERR_SUCCESS
;
19469 _PUBLIC_
void ndr_print_spoolss_NotifyData(struct ndr_print
*ndr
, const char *name
, const union spoolss_NotifyData
*r
)
19472 uint32_t cntr_integer_0
;
19473 level
= ndr_print_get_switch_value(ndr
, r
);
19474 ndr_print_union(ndr
, name
, level
, "spoolss_NotifyData");
19477 ndr
->print(ndr
, "%s: ARRAY(%d)", "integer", (int)2);
19479 for (cntr_integer_0
=0;cntr_integer_0
<2;cntr_integer_0
++) {
19481 if (asprintf(&idx_0
, "[%d]", cntr_integer_0
) != -1) {
19482 ndr_print_uint32(ndr
, "integer", r
->integer
[cntr_integer_0
]);
19490 ndr_print_spoolss_NotifyString(ndr
, "string", &r
->string
);
19494 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode", &r
->devmode
);
19498 ndr_print_spoolss_TimeCtr(ndr
, "time", &r
->time
);
19502 ndr_print_sec_desc_buf(ndr
, "sd", &r
->sd
);
19506 ndr_print_bad_level(ndr
, name
, level
);
19510 static enum ndr_err_code
ndr_push_spoolss_Notify(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_Notify
*r
)
19512 if (ndr_flags
& NDR_SCALARS
) {
19513 NDR_CHECK(ndr_push_align(ndr
, 5));
19514 NDR_CHECK(ndr_push_spoolss_NotifyType(ndr
, NDR_SCALARS
, r
->type
));
19515 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->field
, r
->type
));
19516 NDR_CHECK(ndr_push_spoolss_Field(ndr
, NDR_SCALARS
, &r
->field
));
19517 NDR_CHECK(ndr_push_spoolss_NotifyTable(ndr
, NDR_SCALARS
, r
->variable_type
));
19518 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->job_id
));
19519 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->data
, r
->variable_type
));
19520 NDR_CHECK(ndr_push_spoolss_NotifyData(ndr
, NDR_SCALARS
, &r
->data
));
19521 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
19523 if (ndr_flags
& NDR_BUFFERS
) {
19524 NDR_CHECK(ndr_push_spoolss_NotifyData(ndr
, NDR_BUFFERS
, &r
->data
));
19526 return NDR_ERR_SUCCESS
;
19529 static enum ndr_err_code
ndr_pull_spoolss_Notify(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_Notify
*r
)
19531 if (ndr_flags
& NDR_SCALARS
) {
19532 NDR_CHECK(ndr_pull_align(ndr
, 5));
19533 NDR_CHECK(ndr_pull_spoolss_NotifyType(ndr
, NDR_SCALARS
, &r
->type
));
19534 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->field
, r
->type
));
19535 NDR_CHECK(ndr_pull_spoolss_Field(ndr
, NDR_SCALARS
, &r
->field
));
19536 NDR_CHECK(ndr_pull_spoolss_NotifyTable(ndr
, NDR_SCALARS
, &r
->variable_type
));
19537 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->job_id
));
19538 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->data
, r
->variable_type
));
19539 NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr
, NDR_SCALARS
, &r
->data
));
19540 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
19542 if (ndr_flags
& NDR_BUFFERS
) {
19543 NDR_CHECK(ndr_pull_spoolss_NotifyData(ndr
, NDR_BUFFERS
, &r
->data
));
19545 return NDR_ERR_SUCCESS
;
19548 _PUBLIC_
void ndr_print_spoolss_Notify(struct ndr_print
*ndr
, const char *name
, const struct spoolss_Notify
*r
)
19550 ndr_print_struct(ndr
, name
, "spoolss_Notify");
19552 ndr_print_spoolss_NotifyType(ndr
, "type", r
->type
);
19553 ndr_print_set_switch_value(ndr
, &r
->field
, r
->type
);
19554 ndr_print_spoolss_Field(ndr
, "field", &r
->field
);
19555 ndr_print_spoolss_NotifyTable(ndr
, "variable_type", r
->variable_type
);
19556 ndr_print_uint32(ndr
, "job_id", r
->job_id
);
19557 ndr_print_set_switch_value(ndr
, &r
->data
, r
->variable_type
);
19558 ndr_print_spoolss_NotifyData(ndr
, "data", &r
->data
);
19562 static enum ndr_err_code
ndr_push_spoolss_NotifyInfo(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_NotifyInfo
*r
)
19564 uint32_t cntr_notifies_0
;
19565 if (ndr_flags
& NDR_SCALARS
) {
19566 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->count
));
19567 NDR_CHECK(ndr_push_align(ndr
, 5));
19568 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2));
19569 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
19570 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->count
));
19571 for (cntr_notifies_0
= 0; cntr_notifies_0
< r
->count
; cntr_notifies_0
++) {
19572 NDR_CHECK(ndr_push_spoolss_Notify(ndr
, NDR_SCALARS
, &r
->notifies
[cntr_notifies_0
]));
19574 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
19576 if (ndr_flags
& NDR_BUFFERS
) {
19577 for (cntr_notifies_0
= 0; cntr_notifies_0
< r
->count
; cntr_notifies_0
++) {
19578 NDR_CHECK(ndr_push_spoolss_Notify(ndr
, NDR_BUFFERS
, &r
->notifies
[cntr_notifies_0
]));
19581 return NDR_ERR_SUCCESS
;
19584 static enum ndr_err_code
ndr_pull_spoolss_NotifyInfo(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_NotifyInfo
*r
)
19586 uint32_t cntr_notifies_0
;
19587 TALLOC_CTX
*_mem_save_notifies_0
;
19588 if (ndr_flags
& NDR_SCALARS
) {
19589 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->notifies
));
19590 NDR_CHECK(ndr_pull_align(ndr
, 5));
19591 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
19592 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
19593 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->count
));
19594 NDR_PULL_ALLOC_N(ndr
, r
->notifies
, ndr_get_array_size(ndr
, &r
->notifies
));
19595 _mem_save_notifies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19596 NDR_PULL_SET_MEM_CTX(ndr
, r
->notifies
, 0);
19597 for (cntr_notifies_0
= 0; cntr_notifies_0
< r
->count
; cntr_notifies_0
++) {
19598 NDR_CHECK(ndr_pull_spoolss_Notify(ndr
, NDR_SCALARS
, &r
->notifies
[cntr_notifies_0
]));
19600 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notifies_0
, 0);
19602 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->notifies
, r
->count
));
19604 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
19606 if (ndr_flags
& NDR_BUFFERS
) {
19607 _mem_save_notifies_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19608 NDR_PULL_SET_MEM_CTX(ndr
, r
->notifies
, 0);
19609 for (cntr_notifies_0
= 0; cntr_notifies_0
< r
->count
; cntr_notifies_0
++) {
19610 NDR_CHECK(ndr_pull_spoolss_Notify(ndr
, NDR_BUFFERS
, &r
->notifies
[cntr_notifies_0
]));
19612 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notifies_0
, 0);
19614 return NDR_ERR_SUCCESS
;
19617 _PUBLIC_
void ndr_print_spoolss_NotifyInfo(struct ndr_print
*ndr
, const char *name
, const struct spoolss_NotifyInfo
*r
)
19619 uint32_t cntr_notifies_0
;
19620 ndr_print_struct(ndr
, name
, "spoolss_NotifyInfo");
19622 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2:r
->version
);
19623 ndr_print_uint32(ndr
, "flags", r
->flags
);
19624 ndr_print_uint32(ndr
, "count", r
->count
);
19625 ndr
->print(ndr
, "%s: ARRAY(%d)", "notifies", (int)r
->count
);
19627 for (cntr_notifies_0
=0;cntr_notifies_0
<r
->count
;cntr_notifies_0
++) {
19629 if (asprintf(&idx_0
, "[%d]", cntr_notifies_0
) != -1) {
19630 ndr_print_spoolss_Notify(ndr
, "notifies", &r
->notifies
[cntr_notifies_0
]);
19638 static enum ndr_err_code
ndr_push_spoolss_ReplyPrinterInfo(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_ReplyPrinterInfo
*r
)
19640 if (ndr_flags
& NDR_SCALARS
) {
19641 int level
= ndr_push_get_switch_value(ndr
, r
);
19642 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
19643 NDR_CHECK(ndr_push_union_align(ndr
, 5));
19646 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->info0
));
19650 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
19653 if (ndr_flags
& NDR_BUFFERS
) {
19654 int level
= ndr_push_get_switch_value(ndr
, r
);
19658 NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
19663 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
19666 return NDR_ERR_SUCCESS
;
19669 static enum ndr_err_code
ndr_pull_spoolss_ReplyPrinterInfo(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_ReplyPrinterInfo
*r
)
19673 TALLOC_CTX
*_mem_save_info0_0
;
19674 level
= ndr_pull_get_switch_value(ndr
, r
);
19675 if (ndr_flags
& NDR_SCALARS
) {
19676 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
19677 if (_level
!= level
) {
19678 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
19680 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
19683 uint32_t _ptr_info0
;
19684 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info0
));
19686 NDR_PULL_ALLOC(ndr
, r
->info0
);
19693 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
19696 if (ndr_flags
& NDR_BUFFERS
) {
19700 _mem_save_info0_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19701 NDR_PULL_SET_MEM_CTX(ndr
, r
->info0
, 0);
19702 NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->info0
));
19703 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info0_0
, 0);
19708 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
19711 return NDR_ERR_SUCCESS
;
19714 _PUBLIC_
void ndr_print_spoolss_ReplyPrinterInfo(struct ndr_print
*ndr
, const char *name
, const union spoolss_ReplyPrinterInfo
*r
)
19717 level
= ndr_print_get_switch_value(ndr
, r
);
19718 ndr_print_union(ndr
, name
, level
, "spoolss_ReplyPrinterInfo");
19721 ndr_print_ptr(ndr
, "info0", r
->info0
);
19724 ndr_print_spoolss_NotifyInfo(ndr
, "info0", r
->info0
);
19730 ndr_print_bad_level(ndr
, name
, level
);
19734 static enum ndr_err_code
ndr_push_spoolss_PrinterNotifyFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
19736 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
19737 return NDR_ERR_SUCCESS
;
19740 static enum ndr_err_code
ndr_pull_spoolss_PrinterNotifyFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
19743 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
19745 return NDR_ERR_SUCCESS
;
19748 _PUBLIC_
void ndr_print_spoolss_PrinterNotifyFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
19750 ndr_print_uint32(ndr
, name
, r
);
19752 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDED", PRINTER_NOTIFY_INFO_DISCARDED
, r
);
19753 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_DISCARDNOTED", PRINTER_NOTIFY_INFO_DISCARDNOTED
, r
);
19754 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_NOTIFY_INFO_COLOR_MISMATCH", PRINTER_NOTIFY_INFO_COLOR_MISMATCH
, r
);
19758 static enum ndr_err_code
ndr_push_spoolss_UserLevel1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UserLevel1
*r
)
19760 if (ndr_flags
& NDR_SCALARS
) {
19761 NDR_CHECK(ndr_push_align(ndr
, 5));
19762 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
19763 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->client
));
19764 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user
));
19765 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->build
));
19766 NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr
, NDR_SCALARS
, r
->major
));
19767 NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr
, NDR_SCALARS
, r
->minor
));
19768 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, r
->processor
));
19769 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
19771 if (ndr_flags
& NDR_BUFFERS
) {
19773 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client
, CH_UTF16
)));
19774 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
19775 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client
, CH_UTF16
)));
19776 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->client
, ndr_charset_length(r
->client
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
19779 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
19780 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
19781 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
19782 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user
, ndr_charset_length(r
->user
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
19785 return NDR_ERR_SUCCESS
;
19788 static enum ndr_err_code
ndr_pull_spoolss_UserLevel1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UserLevel1
*r
)
19790 uint32_t _ptr_client
;
19791 TALLOC_CTX
*_mem_save_client_0
;
19792 uint32_t _ptr_user
;
19793 TALLOC_CTX
*_mem_save_user_0
;
19794 if (ndr_flags
& NDR_SCALARS
) {
19795 NDR_CHECK(ndr_pull_align(ndr
, 5));
19796 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
19797 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_client
));
19799 NDR_PULL_ALLOC(ndr
, r
->client
);
19803 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user
));
19805 NDR_PULL_ALLOC(ndr
, r
->user
);
19809 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->build
));
19810 NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr
, NDR_SCALARS
, &r
->major
));
19811 NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr
, NDR_SCALARS
, &r
->minor
));
19812 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, &r
->processor
));
19813 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
19815 if (ndr_flags
& NDR_BUFFERS
) {
19817 _mem_save_client_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19818 NDR_PULL_SET_MEM_CTX(ndr
, r
->client
, 0);
19819 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->client
));
19820 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->client
));
19821 if (ndr_get_array_length(ndr
, &r
->client
) > ndr_get_array_size(ndr
, &r
->client
)) {
19822 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
));
19824 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->client
), sizeof(uint16_t)));
19825 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->client
, ndr_get_array_length(ndr
, &r
->client
), sizeof(uint16_t), CH_UTF16
));
19826 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_client_0
, 0);
19829 _mem_save_user_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19830 NDR_PULL_SET_MEM_CTX(ndr
, r
->user
, 0);
19831 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user
));
19832 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user
));
19833 if (ndr_get_array_length(ndr
, &r
->user
) > ndr_get_array_size(ndr
, &r
->user
)) {
19834 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
));
19836 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t)));
19837 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t), CH_UTF16
));
19838 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_0
, 0);
19841 return NDR_ERR_SUCCESS
;
19844 _PUBLIC_
void ndr_print_spoolss_UserLevel1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UserLevel1
*r
)
19846 ndr_print_struct(ndr
, name
, "spoolss_UserLevel1");
19848 ndr_print_uint32(ndr
, "size", r
->size
);
19849 ndr_print_ptr(ndr
, "client", r
->client
);
19852 ndr_print_string(ndr
, "client", r
->client
);
19855 ndr_print_ptr(ndr
, "user", r
->user
);
19858 ndr_print_string(ndr
, "user", r
->user
);
19861 ndr_print_uint32(ndr
, "build", r
->build
);
19862 ndr_print_spoolss_MajorVersion(ndr
, "major", r
->major
);
19863 ndr_print_spoolss_MinorVersion(ndr
, "minor", r
->minor
);
19864 ndr_print_spoolss_ProcessorArchitecture(ndr
, "processor", r
->processor
);
19868 static enum ndr_err_code
ndr_push_spoolss_UserLevel2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UserLevel2
*r
)
19870 if (ndr_flags
& NDR_SCALARS
) {
19871 NDR_CHECK(ndr_push_align(ndr
, 4));
19872 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->not_used
));
19873 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
19875 if (ndr_flags
& NDR_BUFFERS
) {
19877 return NDR_ERR_SUCCESS
;
19880 static enum ndr_err_code
ndr_pull_spoolss_UserLevel2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UserLevel2
*r
)
19882 if (ndr_flags
& NDR_SCALARS
) {
19883 NDR_CHECK(ndr_pull_align(ndr
, 4));
19884 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->not_used
));
19885 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
19887 if (ndr_flags
& NDR_BUFFERS
) {
19889 return NDR_ERR_SUCCESS
;
19892 _PUBLIC_
void ndr_print_spoolss_UserLevel2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UserLevel2
*r
)
19894 ndr_print_struct(ndr
, name
, "spoolss_UserLevel2");
19896 ndr_print_uint32(ndr
, "not_used", r
->not_used
);
19900 static enum ndr_err_code
ndr_push_spoolss_UserLevel3(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UserLevel3
*r
)
19902 if (ndr_flags
& NDR_SCALARS
) {
19903 NDR_CHECK(ndr_push_align(ndr
, 5));
19904 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size
));
19905 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->flags
));
19906 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->size2
));
19907 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->client
));
19908 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->user
));
19909 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->build
));
19910 NDR_CHECK(ndr_push_spoolss_MajorVersion(ndr
, NDR_SCALARS
, r
->major
));
19911 NDR_CHECK(ndr_push_spoolss_MinorVersion(ndr
, NDR_SCALARS
, r
->minor
));
19912 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, r
->processor
));
19913 NDR_CHECK(ndr_push_udlong(ndr
, NDR_SCALARS
, r
->reserved
));
19914 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
19916 if (ndr_flags
& NDR_BUFFERS
) {
19918 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client
, CH_UTF16
)));
19919 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
19920 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->client
, CH_UTF16
)));
19921 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->client
, ndr_charset_length(r
->client
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
19924 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
19925 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
19926 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->user
, CH_UTF16
)));
19927 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->user
, ndr_charset_length(r
->user
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
19930 return NDR_ERR_SUCCESS
;
19933 static enum ndr_err_code
ndr_pull_spoolss_UserLevel3(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UserLevel3
*r
)
19935 uint32_t _ptr_client
;
19936 TALLOC_CTX
*_mem_save_client_0
;
19937 uint32_t _ptr_user
;
19938 TALLOC_CTX
*_mem_save_user_0
;
19939 if (ndr_flags
& NDR_SCALARS
) {
19940 NDR_CHECK(ndr_pull_align(ndr
, 5));
19941 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
19942 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->flags
));
19943 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size2
));
19944 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_client
));
19946 NDR_PULL_ALLOC(ndr
, r
->client
);
19950 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_user
));
19952 NDR_PULL_ALLOC(ndr
, r
->user
);
19956 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->build
));
19957 NDR_CHECK(ndr_pull_spoolss_MajorVersion(ndr
, NDR_SCALARS
, &r
->major
));
19958 NDR_CHECK(ndr_pull_spoolss_MinorVersion(ndr
, NDR_SCALARS
, &r
->minor
));
19959 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr
, NDR_SCALARS
, &r
->processor
));
19960 NDR_CHECK(ndr_pull_udlong(ndr
, NDR_SCALARS
, &r
->reserved
));
19961 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
19963 if (ndr_flags
& NDR_BUFFERS
) {
19965 _mem_save_client_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19966 NDR_PULL_SET_MEM_CTX(ndr
, r
->client
, 0);
19967 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->client
));
19968 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->client
));
19969 if (ndr_get_array_length(ndr
, &r
->client
) > ndr_get_array_size(ndr
, &r
->client
)) {
19970 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
));
19972 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->client
), sizeof(uint16_t)));
19973 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->client
, ndr_get_array_length(ndr
, &r
->client
), sizeof(uint16_t), CH_UTF16
));
19974 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_client_0
, 0);
19977 _mem_save_user_0
= NDR_PULL_GET_MEM_CTX(ndr
);
19978 NDR_PULL_SET_MEM_CTX(ndr
, r
->user
, 0);
19979 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->user
));
19980 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->user
));
19981 if (ndr_get_array_length(ndr
, &r
->user
) > ndr_get_array_size(ndr
, &r
->user
)) {
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
->user
), ndr_get_array_length(ndr
, &r
->user
));
19984 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t)));
19985 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->user
, ndr_get_array_length(ndr
, &r
->user
), sizeof(uint16_t), CH_UTF16
));
19986 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_user_0
, 0);
19989 return NDR_ERR_SUCCESS
;
19992 _PUBLIC_
void ndr_print_spoolss_UserLevel3(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UserLevel3
*r
)
19994 ndr_print_struct(ndr
, name
, "spoolss_UserLevel3");
19996 ndr_print_uint32(ndr
, "size", r
->size
);
19997 ndr_print_uint32(ndr
, "flags", r
->flags
);
19998 ndr_print_uint32(ndr
, "size2", r
->size2
);
19999 ndr_print_ptr(ndr
, "client", r
->client
);
20002 ndr_print_string(ndr
, "client", r
->client
);
20005 ndr_print_ptr(ndr
, "user", r
->user
);
20008 ndr_print_string(ndr
, "user", r
->user
);
20011 ndr_print_uint32(ndr
, "build", r
->build
);
20012 ndr_print_spoolss_MajorVersion(ndr
, "major", r
->major
);
20013 ndr_print_spoolss_MinorVersion(ndr
, "minor", r
->minor
);
20014 ndr_print_spoolss_ProcessorArchitecture(ndr
, "processor", r
->processor
);
20015 ndr_print_udlong(ndr
, "reserved", r
->reserved
);
20019 static enum ndr_err_code
ndr_push_spoolss_UserLevel(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_UserLevel
*r
)
20021 if (ndr_flags
& NDR_SCALARS
) {
20022 int level
= ndr_push_get_switch_value(ndr
, r
);
20023 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, level
));
20024 NDR_CHECK(ndr_push_union_align(ndr
, 5));
20027 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->level1
));
20031 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->level2
));
20035 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->level3
));
20039 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
20042 if (ndr_flags
& NDR_BUFFERS
) {
20043 int level
= ndr_push_get_switch_value(ndr
, r
);
20047 NDR_CHECK(ndr_push_spoolss_UserLevel1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->level1
));
20053 NDR_CHECK(ndr_push_spoolss_UserLevel2(ndr
, NDR_SCALARS
, r
->level2
));
20059 NDR_CHECK(ndr_push_spoolss_UserLevel3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->level3
));
20064 return ndr_push_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
20067 return NDR_ERR_SUCCESS
;
20070 static enum ndr_err_code
ndr_pull_spoolss_UserLevel(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_UserLevel
*r
)
20074 TALLOC_CTX
*_mem_save_level1_0
;
20075 TALLOC_CTX
*_mem_save_level2_0
;
20076 TALLOC_CTX
*_mem_save_level3_0
;
20077 level
= ndr_pull_get_switch_value(ndr
, r
);
20078 if (ndr_flags
& NDR_SCALARS
) {
20079 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &_level
));
20080 if (_level
!= level
) {
20081 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u for r at %s", _level
, __location__
);
20083 NDR_CHECK(ndr_pull_union_align(ndr
, 5));
20086 uint32_t _ptr_level1
;
20087 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_level1
));
20089 NDR_PULL_ALLOC(ndr
, r
->level1
);
20096 uint32_t _ptr_level2
;
20097 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_level2
));
20099 NDR_PULL_ALLOC(ndr
, r
->level2
);
20106 uint32_t _ptr_level3
;
20107 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_level3
));
20109 NDR_PULL_ALLOC(ndr
, r
->level3
);
20116 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
20119 if (ndr_flags
& NDR_BUFFERS
) {
20123 _mem_save_level1_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20124 NDR_PULL_SET_MEM_CTX(ndr
, r
->level1
, 0);
20125 NDR_CHECK(ndr_pull_spoolss_UserLevel1(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->level1
));
20126 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level1_0
, 0);
20132 _mem_save_level2_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20133 NDR_PULL_SET_MEM_CTX(ndr
, r
->level2
, 0);
20134 NDR_CHECK(ndr_pull_spoolss_UserLevel2(ndr
, NDR_SCALARS
, r
->level2
));
20135 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level2_0
, 0);
20141 _mem_save_level3_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20142 NDR_PULL_SET_MEM_CTX(ndr
, r
->level3
, 0);
20143 NDR_CHECK(ndr_pull_spoolss_UserLevel3(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->level3
));
20144 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_level3_0
, 0);
20149 return ndr_pull_error(ndr
, NDR_ERR_BAD_SWITCH
, "Bad switch value %u at %s", level
, __location__
);
20152 return NDR_ERR_SUCCESS
;
20155 _PUBLIC_
void ndr_print_spoolss_UserLevel(struct ndr_print
*ndr
, const char *name
, const union spoolss_UserLevel
*r
)
20158 level
= ndr_print_get_switch_value(ndr
, r
);
20159 ndr_print_union(ndr
, name
, level
, "spoolss_UserLevel");
20162 ndr_print_ptr(ndr
, "level1", r
->level1
);
20165 ndr_print_spoolss_UserLevel1(ndr
, "level1", r
->level1
);
20171 ndr_print_ptr(ndr
, "level2", r
->level2
);
20174 ndr_print_spoolss_UserLevel2(ndr
, "level2", r
->level2
);
20180 ndr_print_ptr(ndr
, "level3", r
->level3
);
20183 ndr_print_spoolss_UserLevel3(ndr
, "level3", r
->level3
);
20189 ndr_print_bad_level(ndr
, name
, level
);
20193 static enum ndr_err_code
ndr_push_spoolss_UserLevelCtr(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_UserLevelCtr
*r
)
20195 if (ndr_flags
& NDR_SCALARS
) {
20196 NDR_CHECK(ndr_push_align(ndr
, 5));
20197 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->level
));
20198 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->user_info
, r
->level
));
20199 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr
, NDR_SCALARS
, &r
->user_info
));
20200 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
20202 if (ndr_flags
& NDR_BUFFERS
) {
20203 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr
, NDR_BUFFERS
, &r
->user_info
));
20205 return NDR_ERR_SUCCESS
;
20208 static enum ndr_err_code
ndr_pull_spoolss_UserLevelCtr(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_UserLevelCtr
*r
)
20210 if (ndr_flags
& NDR_SCALARS
) {
20211 NDR_CHECK(ndr_pull_align(ndr
, 5));
20212 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->level
));
20213 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->user_info
, r
->level
));
20214 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr
, NDR_SCALARS
, &r
->user_info
));
20215 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
20217 if (ndr_flags
& NDR_BUFFERS
) {
20218 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr
, NDR_BUFFERS
, &r
->user_info
));
20220 return NDR_ERR_SUCCESS
;
20223 _PUBLIC_
void ndr_print_spoolss_UserLevelCtr(struct ndr_print
*ndr
, const char *name
, const struct spoolss_UserLevelCtr
*r
)
20225 ndr_print_struct(ndr
, name
, "spoolss_UserLevelCtr");
20227 ndr_print_uint32(ndr
, "level", r
->level
);
20228 ndr_print_set_switch_value(ndr
, &r
->user_info
, r
->level
);
20229 ndr_print_spoolss_UserLevel(ndr
, "user_info", &r
->user_info
);
20233 static enum ndr_err_code
ndr_push_spoolss_AccessRights(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
20235 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
20236 return NDR_ERR_SUCCESS
;
20239 static enum ndr_err_code
ndr_pull_spoolss_AccessRights(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
20242 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
20244 return NDR_ERR_SUCCESS
;
20247 _PUBLIC_
void ndr_print_spoolss_AccessRights(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
20249 ndr_print_uint32(ndr
, name
, r
);
20251 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SERVER_ACCESS_ADMINISTER", SERVER_ACCESS_ADMINISTER
, r
);
20252 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "SERVER_ACCESS_ENUMERATE", SERVER_ACCESS_ENUMERATE
, r
);
20253 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ACCESS_ADMINISTER", PRINTER_ACCESS_ADMINISTER
, r
);
20254 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "PRINTER_ACCESS_USE", PRINTER_ACCESS_USE
, r
);
20255 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_ACCESS_ADMINISTER", JOB_ACCESS_ADMINISTER
, r
);
20256 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "JOB_ACCESS_READ", JOB_ACCESS_READ
, r
);
20260 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PrinterEnumValues(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PrinterEnumValues
*r
)
20262 uint32_t _save_relative_base_offset
= ndr_push_get_relative_base_offset(ndr
);
20263 if (ndr_flags
& NDR_SCALARS
) {
20264 NDR_CHECK(ndr_push_align(ndr
, 5));
20265 NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
20267 uint32_t _flags_save_string
= ndr
->flags
;
20268 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
20269 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->value_name
));
20270 ndr
->flags
= _flags_save_string
;
20272 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 2 * strlen_m_term(r
->value_name
)));
20273 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->type
));
20275 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
20276 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
20277 NDR_CHECK(ndr_push_relative_ptr1(ndr
, r
->data
));
20278 ndr
->flags
= _flags_save_DATA_BLOB
;
20280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->data
->length
));
20281 NDR_CHECK(ndr_push_trailer_align(ndr
, 5));
20283 if (ndr_flags
& NDR_BUFFERS
) {
20284 NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr
, r
));
20286 uint32_t _flags_save_string
= ndr
->flags
;
20287 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
20288 if (r
->value_name
) {
20289 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->value_name
));
20290 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->value_name
));
20291 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->value_name
));
20293 ndr
->flags
= _flags_save_string
;
20296 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
20297 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
20299 NDR_CHECK(ndr_push_relative_ptr2_start(ndr
, r
->data
));
20301 struct ndr_push
*_ndr_data
;
20302 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_data
, 0, r
->data
->length
));
20303 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_data
, NDR_SCALARS
, *r
->data
));
20304 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_data
, 0, r
->data
->length
));
20306 NDR_CHECK(ndr_push_relative_ptr2_end(ndr
, r
->data
));
20308 ndr
->flags
= _flags_save_DATA_BLOB
;
20311 ndr_push_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
20312 return NDR_ERR_SUCCESS
;
20315 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PrinterEnumValues(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PrinterEnumValues
*r
)
20317 uint32_t _save_relative_base_offset
= ndr_pull_get_relative_base_offset(ndr
);
20318 uint32_t _ptr_value_name
;
20319 TALLOC_CTX
*_mem_save_value_name_0
;
20320 uint32_t _ptr_data
;
20321 TALLOC_CTX
*_mem_save_data_0
;
20322 if (ndr_flags
& NDR_SCALARS
) {
20323 NDR_CHECK(ndr_pull_align(ndr
, 5));
20324 NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr
, r
, ndr
->offset
));
20326 uint32_t _flags_save_string
= ndr
->flags
;
20327 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
20328 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_value_name
));
20329 if (_ptr_value_name
) {
20330 NDR_PULL_ALLOC(ndr
, r
->value_name
);
20331 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->value_name
, _ptr_value_name
));
20333 r
->value_name
= NULL
;
20335 ndr
->flags
= _flags_save_string
;
20337 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->value_name_len
));
20338 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->type
));
20340 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
20341 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
20342 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data
));
20344 NDR_PULL_ALLOC(ndr
, r
->data
);
20345 NDR_CHECK(ndr_pull_relative_ptr1(ndr
, r
->data
, _ptr_data
));
20349 ndr
->flags
= _flags_save_DATA_BLOB
;
20351 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->data_length
));
20352 NDR_CHECK(ndr_pull_trailer_align(ndr
, 5));
20354 if (ndr_flags
& NDR_BUFFERS
) {
20355 NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr
, r
));
20357 uint32_t _flags_save_string
= ndr
->flags
;
20358 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
20359 if (r
->value_name
) {
20360 uint32_t _relative_save_offset
;
20361 _relative_save_offset
= ndr
->offset
;
20362 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->value_name
));
20363 _mem_save_value_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20364 NDR_PULL_SET_MEM_CTX(ndr
, r
->value_name
, 0);
20365 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->value_name
));
20366 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_name_0
, 0);
20367 if (ndr
->offset
> ndr
->relative_highest_offset
) {
20368 ndr
->relative_highest_offset
= ndr
->offset
;
20370 ndr
->offset
= _relative_save_offset
;
20372 ndr
->flags
= _flags_save_string
;
20375 uint32_t _flags_save_DATA_BLOB
= ndr
->flags
;
20376 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_REMAINING
);
20378 uint32_t _relative_save_offset
;
20379 _relative_save_offset
= ndr
->offset
;
20380 NDR_CHECK(ndr_pull_relative_ptr2(ndr
, r
->data
));
20381 _mem_save_data_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20382 NDR_PULL_SET_MEM_CTX(ndr
, r
->data
, 0);
20384 struct ndr_pull
*_ndr_data
;
20385 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_data
, 0, r
->data_length
));
20386 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_data
, NDR_SCALARS
, r
->data
));
20387 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_data
, 0, r
->data_length
));
20389 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_0
, 0);
20390 if (ndr
->offset
> ndr
->relative_highest_offset
) {
20391 ndr
->relative_highest_offset
= ndr
->offset
;
20393 ndr
->offset
= _relative_save_offset
;
20395 ndr
->flags
= _flags_save_DATA_BLOB
;
20398 ndr_pull_restore_relative_base_offset(ndr
, _save_relative_base_offset
);
20399 return NDR_ERR_SUCCESS
;
20402 _PUBLIC_
void ndr_print_spoolss_PrinterEnumValues(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PrinterEnumValues
*r
)
20404 ndr_print_struct(ndr
, name
, "spoolss_PrinterEnumValues");
20406 ndr_print_ptr(ndr
, "value_name", r
->value_name
);
20408 if (r
->value_name
) {
20409 ndr_print_string(ndr
, "value_name", r
->value_name
);
20412 ndr_print_uint32(ndr
, "value_name_len", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?2 * strlen_m_term(r
->value_name
):r
->value_name_len
);
20413 ndr_print_winreg_Type(ndr
, "type", r
->type
);
20414 ndr_print_ptr(ndr
, "data", r
->data
);
20417 ndr_print_DATA_BLOB(ndr
, "data", *r
->data
);
20420 ndr_print_uint32(ndr
, "data_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->data
->length
:r
->data_length
);
20424 _PUBLIC_
size_t ndr_size_spoolss_PrinterEnumValues(const struct spoolss_PrinterEnumValues
*r
, struct smb_iconv_convenience
*ic
, int flags
)
20426 return ndr_size_struct(r
, flags
, (ndr_push_flags_fn_t
)ndr_push_spoolss_PrinterEnumValues
, ic
);
20429 static enum ndr_err_code
ndr_push_spoolss_KeyNames(struct ndr_push
*ndr
, int ndr_flags
, const union spoolss_KeyNames
*r
)
20431 if (ndr_flags
& NDR_SCALARS
) {
20432 int level
= ndr_push_get_switch_value(ndr
, r
);
20433 NDR_CHECK(ndr_push_union_align(ndr
, 4));
20443 uint32_t _flags_save_string_array
= ndr
->flags
;
20444 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
20445 NDR_CHECK(ndr_push_string_array(ndr
, NDR_SCALARS
, r
->string_array
));
20446 ndr
->flags
= _flags_save_string_array
;
20452 if (ndr_flags
& NDR_BUFFERS
) {
20453 int level
= ndr_push_get_switch_value(ndr
, r
);
20466 return NDR_ERR_SUCCESS
;
20469 static enum ndr_err_code
ndr_pull_spoolss_KeyNames(struct ndr_pull
*ndr
, int ndr_flags
, union spoolss_KeyNames
*r
)
20472 level
= ndr_pull_get_switch_value(ndr
, r
);
20473 if (ndr_flags
& NDR_SCALARS
) {
20474 NDR_CHECK(ndr_pull_union_align(ndr
, 4));
20484 uint32_t _flags_save_string_array
= ndr
->flags
;
20485 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
20486 NDR_CHECK(ndr_pull_string_array(ndr
, NDR_SCALARS
, &r
->string_array
));
20487 ndr
->flags
= _flags_save_string_array
;
20493 if (ndr_flags
& NDR_BUFFERS
) {
20506 return NDR_ERR_SUCCESS
;
20509 _PUBLIC_
void ndr_print_spoolss_KeyNames(struct ndr_print
*ndr
, const char *name
, const union spoolss_KeyNames
*r
)
20512 level
= ndr_print_get_switch_value(ndr
, r
);
20513 ndr_print_union(ndr
, name
, level
, "spoolss_KeyNames");
20522 ndr_print_string_array(ndr
, "string_array", r
->string_array
);
20528 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_DeleteDriverFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
20530 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
20531 return NDR_ERR_SUCCESS
;
20534 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_DeleteDriverFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
20537 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
20539 return NDR_ERR_SUCCESS
;
20542 _PUBLIC_
void ndr_print_spoolss_DeleteDriverFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
20544 ndr_print_uint32(ndr
, name
, r
);
20546 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DPD_DELETE_UNUSED_FILES", DPD_DELETE_UNUSED_FILES
, r
);
20547 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DPD_DELETE_SPECIFIC_VERSION", DPD_DELETE_SPECIFIC_VERSION
, r
);
20548 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "DPD_DELETE_ALL_FILES", DPD_DELETE_ALL_FILES
, r
);
20552 static enum ndr_err_code
ndr_push_spoolss_PortProtocol(struct ndr_push
*ndr
, int ndr_flags
, enum spoolss_PortProtocol r
)
20554 NDR_CHECK(ndr_push_enum_uint32(ndr
, NDR_SCALARS
, r
));
20555 return NDR_ERR_SUCCESS
;
20558 static enum ndr_err_code
ndr_pull_spoolss_PortProtocol(struct ndr_pull
*ndr
, int ndr_flags
, enum spoolss_PortProtocol
*r
)
20561 NDR_CHECK(ndr_pull_enum_uint32(ndr
, NDR_SCALARS
, &v
));
20563 return NDR_ERR_SUCCESS
;
20566 _PUBLIC_
void ndr_print_spoolss_PortProtocol(struct ndr_print
*ndr
, const char *name
, enum spoolss_PortProtocol r
)
20568 const char *val
= NULL
;
20571 case PROTOCOL_RAWTCP_TYPE
: val
= "PROTOCOL_RAWTCP_TYPE"; break;
20572 case PROTOCOL_LPR_TYPE
: val
= "PROTOCOL_LPR_TYPE"; break;
20574 ndr_print_enum(ndr
, name
, "ENUM", val
, r
);
20577 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortData1(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortData1
*r
)
20579 if (ndr_flags
& NDR_SCALARS
) {
20580 NDR_CHECK(ndr_push_align(ndr
, 4));
20581 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->portname
, 64, sizeof(uint16_t), CH_UTF16
));
20582 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x00000001));
20583 NDR_CHECK(ndr_push_spoolss_PortProtocol(ndr
, NDR_SCALARS
, r
->protocol
));
20584 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, sizeof(r
)));
20585 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
20586 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hostaddress
, 49, sizeof(uint16_t), CH_UTF16
));
20587 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->snmpcommunity
, 33, sizeof(uint16_t), CH_UTF16
));
20588 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dblspool
));
20589 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->queue
, 33, sizeof(uint16_t), CH_UTF16
));
20590 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->ip_address
, 16, sizeof(uint16_t), CH_UTF16
));
20591 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hardware_address
, 13, sizeof(uint16_t), CH_UTF16
));
20592 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->device_type
, 257, sizeof(uint16_t), CH_UTF16
));
20593 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->port_number
));
20594 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->snmp_enabled
));
20595 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->snmp_dev_index
));
20596 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
20598 if (ndr_flags
& NDR_BUFFERS
) {
20600 return NDR_ERR_SUCCESS
;
20603 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortData1(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortData1
*r
)
20605 if (ndr_flags
& NDR_SCALARS
) {
20606 NDR_CHECK(ndr_pull_align(ndr
, 4));
20607 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->portname
, 64, sizeof(uint16_t), CH_UTF16
));
20608 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
20609 NDR_CHECK(ndr_pull_spoolss_PortProtocol(ndr
, NDR_SCALARS
, &r
->protocol
));
20610 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
20611 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
20612 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hostaddress
, 49, sizeof(uint16_t), CH_UTF16
));
20613 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->snmpcommunity
, 33, sizeof(uint16_t), CH_UTF16
));
20614 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dblspool
));
20615 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->queue
, 33, sizeof(uint16_t), CH_UTF16
));
20616 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->ip_address
, 16, sizeof(uint16_t), CH_UTF16
));
20617 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hardware_address
, 13, sizeof(uint16_t), CH_UTF16
));
20618 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->device_type
, 257, sizeof(uint16_t), CH_UTF16
));
20619 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->port_number
));
20620 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->snmp_enabled
));
20621 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->snmp_dev_index
));
20622 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
20624 if (ndr_flags
& NDR_BUFFERS
) {
20626 return NDR_ERR_SUCCESS
;
20629 _PUBLIC_
void ndr_print_spoolss_PortData1(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortData1
*r
)
20631 ndr_print_struct(ndr
, name
, "spoolss_PortData1");
20633 ndr_print_string(ndr
, "portname", r
->portname
);
20634 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x00000001:r
->version
);
20635 ndr_print_spoolss_PortProtocol(ndr
, "protocol", r
->protocol
);
20636 ndr_print_uint32(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?sizeof(r
):r
->size
);
20637 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
20638 ndr_print_string(ndr
, "hostaddress", r
->hostaddress
);
20639 ndr_print_string(ndr
, "snmpcommunity", r
->snmpcommunity
);
20640 ndr_print_uint32(ndr
, "dblspool", r
->dblspool
);
20641 ndr_print_string(ndr
, "queue", r
->queue
);
20642 ndr_print_string(ndr
, "ip_address", r
->ip_address
);
20643 ndr_print_string(ndr
, "hardware_address", r
->hardware_address
);
20644 ndr_print_string(ndr
, "device_type", r
->device_type
);
20645 ndr_print_uint32(ndr
, "port_number", r
->port_number
);
20646 ndr_print_uint32(ndr
, "snmp_enabled", r
->snmp_enabled
);
20647 ndr_print_uint32(ndr
, "snmp_dev_index", r
->snmp_dev_index
);
20651 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_PortData2(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_PortData2
*r
)
20653 if (ndr_flags
& NDR_SCALARS
) {
20654 NDR_CHECK(ndr_push_align(ndr
, 4));
20655 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->portname
, 64, sizeof(uint16_t), CH_UTF16
));
20656 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, 0x00000002));
20657 NDR_CHECK(ndr_push_spoolss_PortProtocol(ndr
, NDR_SCALARS
, r
->protocol
));
20658 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, sizeof(r
)));
20659 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->reserved
));
20660 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->hostaddress
, 128, sizeof(uint16_t), CH_UTF16
));
20661 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->snmpcommunity
, 33, sizeof(uint16_t), CH_UTF16
));
20662 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->dblspool
));
20663 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->queue
, 33, sizeof(uint16_t), CH_UTF16
));
20664 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->device_type
, 257, sizeof(uint16_t), CH_UTF16
));
20665 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->port_number
));
20666 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->snmp_enabled
));
20667 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->snmp_dev_index
));
20668 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->port_monitor_mib_index
));
20669 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
20671 if (ndr_flags
& NDR_BUFFERS
) {
20673 return NDR_ERR_SUCCESS
;
20676 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_PortData2(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_PortData2
*r
)
20678 if (ndr_flags
& NDR_SCALARS
) {
20679 NDR_CHECK(ndr_pull_align(ndr
, 4));
20680 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->portname
, 64, sizeof(uint16_t), CH_UTF16
));
20681 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->version
));
20682 NDR_CHECK(ndr_pull_spoolss_PortProtocol(ndr
, NDR_SCALARS
, &r
->protocol
));
20683 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->size
));
20684 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->reserved
));
20685 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->hostaddress
, 128, sizeof(uint16_t), CH_UTF16
));
20686 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->snmpcommunity
, 33, sizeof(uint16_t), CH_UTF16
));
20687 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->dblspool
));
20688 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->queue
, 33, sizeof(uint16_t), CH_UTF16
));
20689 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->device_type
, 257, sizeof(uint16_t), CH_UTF16
));
20690 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->port_number
));
20691 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->snmp_enabled
));
20692 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->snmp_dev_index
));
20693 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->port_monitor_mib_index
));
20694 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
20696 if (ndr_flags
& NDR_BUFFERS
) {
20698 return NDR_ERR_SUCCESS
;
20701 _PUBLIC_
void ndr_print_spoolss_PortData2(struct ndr_print
*ndr
, const char *name
, const struct spoolss_PortData2
*r
)
20703 ndr_print_struct(ndr
, name
, "spoolss_PortData2");
20705 ndr_print_string(ndr
, "portname", r
->portname
);
20706 ndr_print_uint32(ndr
, "version", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?0x00000002:r
->version
);
20707 ndr_print_spoolss_PortProtocol(ndr
, "protocol", r
->protocol
);
20708 ndr_print_uint32(ndr
, "size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?sizeof(r
):r
->size
);
20709 ndr_print_uint32(ndr
, "reserved", r
->reserved
);
20710 ndr_print_string(ndr
, "hostaddress", r
->hostaddress
);
20711 ndr_print_string(ndr
, "snmpcommunity", r
->snmpcommunity
);
20712 ndr_print_uint32(ndr
, "dblspool", r
->dblspool
);
20713 ndr_print_string(ndr
, "queue", r
->queue
);
20714 ndr_print_string(ndr
, "device_type", r
->device_type
);
20715 ndr_print_uint32(ndr
, "port_number", r
->port_number
);
20716 ndr_print_uint32(ndr
, "snmp_enabled", r
->snmp_enabled
);
20717 ndr_print_uint32(ndr
, "snmp_dev_index", r
->snmp_dev_index
);
20718 ndr_print_uint32(ndr
, "port_monitor_mib_index", r
->port_monitor_mib_index
);
20722 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_MonitorUi(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_MonitorUi
*r
)
20724 if (ndr_flags
& NDR_SCALARS
) {
20725 NDR_CHECK(ndr_push_align(ndr
, 4));
20727 uint32_t _flags_save_string
= ndr
->flags
;
20728 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
20729 NDR_CHECK(ndr_push_string(ndr
, NDR_SCALARS
, r
->dll_name
));
20730 ndr
->flags
= _flags_save_string
;
20732 NDR_CHECK(ndr_push_trailer_align(ndr
, 4));
20734 if (ndr_flags
& NDR_BUFFERS
) {
20736 return NDR_ERR_SUCCESS
;
20739 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_MonitorUi(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_MonitorUi
*r
)
20741 if (ndr_flags
& NDR_SCALARS
) {
20742 NDR_CHECK(ndr_pull_align(ndr
, 4));
20744 uint32_t _flags_save_string
= ndr
->flags
;
20745 ndr_set_flags(&ndr
->flags
, LIBNDR_FLAG_STR_NULLTERM
);
20746 NDR_CHECK(ndr_pull_string(ndr
, NDR_SCALARS
, &r
->dll_name
));
20747 ndr
->flags
= _flags_save_string
;
20749 NDR_CHECK(ndr_pull_trailer_align(ndr
, 4));
20751 if (ndr_flags
& NDR_BUFFERS
) {
20753 return NDR_ERR_SUCCESS
;
20756 _PUBLIC_
void ndr_print_spoolss_MonitorUi(struct ndr_print
*ndr
, const char *name
, const struct spoolss_MonitorUi
*r
)
20758 ndr_print_struct(ndr
, name
, "spoolss_MonitorUi");
20760 ndr_print_string(ndr
, "dll_name", r
->dll_name
);
20764 static enum ndr_err_code
ndr_push_spoolss_AddPrinterDriverExFlags(struct ndr_push
*ndr
, int ndr_flags
, uint32_t r
)
20766 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
));
20767 return NDR_ERR_SUCCESS
;
20770 static enum ndr_err_code
ndr_pull_spoolss_AddPrinterDriverExFlags(struct ndr_pull
*ndr
, int ndr_flags
, uint32_t *r
)
20773 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &v
));
20775 return NDR_ERR_SUCCESS
;
20778 _PUBLIC_
void ndr_print_spoolss_AddPrinterDriverExFlags(struct ndr_print
*ndr
, const char *name
, uint32_t r
)
20780 ndr_print_uint32(ndr
, name
, r
);
20782 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_STRICT_UPGRADE", APD_STRICT_UPGRADE
, r
);
20783 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_STRICT_DOWNGRADE", APD_STRICT_DOWNGRADE
, r
);
20784 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_COPY_ALL_FILES", APD_COPY_ALL_FILES
, r
);
20785 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_COPY_NEW_FILES", APD_COPY_NEW_FILES
, r
);
20786 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_COPY_FROM_DIRECTORY", APD_COPY_FROM_DIRECTORY
, r
);
20787 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_DONT_COPY_FILES_TO_CLUSTER", APD_DONT_COPY_FILES_TO_CLUSTER
, r
);
20788 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_COPY_TO_ALL_SPOOLERS", APD_COPY_TO_ALL_SPOOLERS
, r
);
20789 ndr_print_bitmap_flag(ndr
, sizeof(uint32_t), "APD_RETURN_BLOCKING_STATUS_CODE", APD_RETURN_BLOCKING_STATUS_CODE
, r
);
20793 static enum ndr_err_code
ndr_push_spoolss_CorePrinterDriver(struct ndr_push
*ndr
, int ndr_flags
, const struct spoolss_CorePrinterDriver
*r
)
20795 if (ndr_flags
& NDR_SCALARS
) {
20796 NDR_CHECK(ndr_push_align(ndr
, 8));
20797 NDR_CHECK(ndr_push_GUID(ndr
, NDR_SCALARS
, &r
->core_driver_guid
));
20798 NDR_CHECK(ndr_push_NTTIME(ndr
, NDR_SCALARS
, r
->driver_date
));
20799 NDR_CHECK(ndr_push_hyper(ndr
, NDR_SCALARS
, r
->driver_version
));
20800 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->formname
, 520, sizeof(uint8_t), CH_UTF8
));
20801 NDR_CHECK(ndr_push_trailer_align(ndr
, 8));
20803 if (ndr_flags
& NDR_BUFFERS
) {
20805 return NDR_ERR_SUCCESS
;
20808 static enum ndr_err_code
ndr_pull_spoolss_CorePrinterDriver(struct ndr_pull
*ndr
, int ndr_flags
, struct spoolss_CorePrinterDriver
*r
)
20810 if (ndr_flags
& NDR_SCALARS
) {
20811 NDR_CHECK(ndr_pull_align(ndr
, 8));
20812 NDR_CHECK(ndr_pull_GUID(ndr
, NDR_SCALARS
, &r
->core_driver_guid
));
20813 NDR_CHECK(ndr_pull_NTTIME(ndr
, NDR_SCALARS
, &r
->driver_date
));
20814 NDR_CHECK(ndr_pull_hyper(ndr
, NDR_SCALARS
, &r
->driver_version
));
20815 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->formname
, 520, sizeof(uint8_t), CH_UTF8
));
20816 NDR_CHECK(ndr_pull_trailer_align(ndr
, 8));
20818 if (ndr_flags
& NDR_BUFFERS
) {
20820 return NDR_ERR_SUCCESS
;
20823 _PUBLIC_
void ndr_print_spoolss_CorePrinterDriver(struct ndr_print
*ndr
, const char *name
, const struct spoolss_CorePrinterDriver
*r
)
20825 ndr_print_struct(ndr
, name
, "spoolss_CorePrinterDriver");
20827 ndr_print_GUID(ndr
, "core_driver_guid", &r
->core_driver_guid
);
20828 ndr_print_NTTIME(ndr
, "driver_date", r
->driver_date
);
20829 ndr_print_hyper(ndr
, "driver_version", r
->driver_version
);
20830 ndr_print_string(ndr
, "formname", r
->formname
);
20834 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrinters(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrinters
*r
)
20836 if (flags
& NDR_IN
) {
20837 NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
20838 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
20839 if (r
->in
.server
) {
20840 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20841 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
20842 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
20843 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
20845 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
20846 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
20847 if (r
->in
.buffer
) {
20848 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
20850 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
20852 if (flags
& NDR_OUT
) {
20853 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
20855 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
20857 if (r
->out
.needed
== NULL
) {
20858 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
20860 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
20861 if (r
->out
.count
== NULL
) {
20862 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
20864 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
20865 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
20867 return NDR_ERR_SUCCESS
;
20870 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrinters(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrinters
*r
)
20872 uint32_t _ptr_server
;
20873 uint32_t _ptr_buffer
;
20874 uint32_t _ptr_info
;
20875 TALLOC_CTX
*_mem_save_server_0
;
20876 TALLOC_CTX
*_mem_save_buffer_0
;
20877 TALLOC_CTX
*_mem_save_info_0
;
20878 TALLOC_CTX
*_mem_save_needed_0
;
20879 TALLOC_CTX
*_mem_save_count_0
;
20880 if (flags
& NDR_IN
) {
20881 ZERO_STRUCT(r
->out
);
20883 NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
20884 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
20886 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
20888 r
->in
.server
= NULL
;
20890 if (r
->in
.server
) {
20891 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20892 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
20893 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
20894 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
20895 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
20896 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
));
20898 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
20899 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
20900 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
20902 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
20903 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
20905 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
20907 r
->in
.buffer
= NULL
;
20909 if (r
->in
.buffer
) {
20910 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20911 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
20912 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
20913 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
20915 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
20916 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
20917 ZERO_STRUCTP(r
->out
.needed
);
20918 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
20919 ZERO_STRUCTP(r
->out
.count
);
20921 if (flags
& NDR_OUT
) {
20922 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
20924 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
20926 r
->out
.info
= NULL
;
20929 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20930 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
20931 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
20932 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
20934 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
20935 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
20937 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20938 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
20939 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
20940 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
20941 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
20942 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
20944 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20945 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
20946 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
20947 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
20948 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
20950 return NDR_ERR_SUCCESS
;
20953 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrinters(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrinters
*r
)
20955 uint32_t cntr_info_0
;
20956 if (flags
& NDR_IN
) {
20957 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
20958 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
20960 if (flags
& NDR_OUT
) {
20961 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20962 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
20963 NDR_CHECK(ndr_push_spoolss_PrinterInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
20965 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20966 NDR_CHECK(ndr_push_spoolss_PrinterInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
20969 return NDR_ERR_SUCCESS
;
20972 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrinters(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrinters
*r
)
20974 uint32_t cntr_info_0
;
20975 TALLOC_CTX
*_mem_save_info_0
;
20976 if (flags
& NDR_IN
) {
20977 ZERO_STRUCT(r
->out
);
20979 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
20980 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
20982 if (flags
& NDR_OUT
) {
20983 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
20984 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
20985 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
20986 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20987 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
20988 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
20990 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
20991 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
20993 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
20995 return NDR_ERR_SUCCESS
;
20998 _PUBLIC_
void ndr_print_spoolss_EnumPrinters(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinters
*r
)
21000 uint32_t cntr_info_2
;
21001 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinters");
21003 if (flags
& NDR_SET_VALUES
) {
21004 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21006 if (flags
& NDR_IN
) {
21007 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinters");
21009 ndr_print_spoolss_EnumPrinterFlags(ndr
, "flags", r
->in
.flags
);
21010 ndr_print_ptr(ndr
, "server", r
->in
.server
);
21012 if (r
->in
.server
) {
21013 ndr_print_string(ndr
, "server", r
->in
.server
);
21016 ndr_print_uint32(ndr
, "level", r
->in
.level
);
21017 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
21019 if (r
->in
.buffer
) {
21020 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
21023 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
21026 if (flags
& NDR_OUT
) {
21027 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinters");
21029 ndr_print_ptr(ndr
, "count", r
->out
.count
);
21031 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
21033 ndr_print_ptr(ndr
, "info", r
->out
.info
);
21035 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
21037 if (*r
->out
.info
) {
21038 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
21040 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
21042 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
21043 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
21044 ndr_print_spoolss_PrinterInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
21052 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
21054 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
21056 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21062 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_OpenPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_OpenPrinter
*r
)
21064 if (flags
& NDR_IN
) {
21065 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.printername
));
21066 if (r
->in
.printername
) {
21067 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.printername
, CH_UTF16
)));
21068 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
21069 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.printername
, CH_UTF16
)));
21070 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.printername
, ndr_charset_length(r
->in
.printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
21072 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.datatype
));
21073 if (r
->in
.datatype
) {
21074 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
)));
21075 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
21076 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
)));
21077 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.datatype
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
21079 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.devmode_ctr
));
21080 NDR_CHECK(ndr_push_spoolss_AccessRights(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
21082 if (flags
& NDR_OUT
) {
21083 if (r
->out
.handle
== NULL
) {
21084 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21086 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
21087 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21089 return NDR_ERR_SUCCESS
;
21092 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_OpenPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_OpenPrinter
*r
)
21094 uint32_t _ptr_printername
;
21095 uint32_t _ptr_datatype
;
21096 TALLOC_CTX
*_mem_save_printername_0
;
21097 TALLOC_CTX
*_mem_save_datatype_0
;
21098 TALLOC_CTX
*_mem_save_handle_0
;
21099 if (flags
& NDR_IN
) {
21100 ZERO_STRUCT(r
->out
);
21102 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
21103 if (_ptr_printername
) {
21104 NDR_PULL_ALLOC(ndr
, r
->in
.printername
);
21106 r
->in
.printername
= NULL
;
21108 if (r
->in
.printername
) {
21109 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21110 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.printername
, 0);
21111 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.printername
));
21112 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.printername
));
21113 if (ndr_get_array_length(ndr
, &r
->in
.printername
) > ndr_get_array_size(ndr
, &r
->in
.printername
)) {
21114 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
));
21116 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.printername
), sizeof(uint16_t)));
21117 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.printername
, ndr_get_array_length(ndr
, &r
->in
.printername
), sizeof(uint16_t), CH_UTF16
));
21118 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
21120 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
21121 if (_ptr_datatype
) {
21122 NDR_PULL_ALLOC(ndr
, r
->in
.datatype
);
21124 r
->in
.datatype
= NULL
;
21126 if (r
->in
.datatype
) {
21127 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21128 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.datatype
, 0);
21129 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.datatype
));
21130 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.datatype
));
21131 if (ndr_get_array_length(ndr
, &r
->in
.datatype
) > ndr_get_array_size(ndr
, &r
->in
.datatype
)) {
21132 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
));
21134 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.datatype
), sizeof(uint16_t)));
21135 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.datatype
, ndr_get_array_length(ndr
, &r
->in
.datatype
), sizeof(uint16_t), CH_UTF16
));
21136 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
21138 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.devmode_ctr
));
21139 NDR_CHECK(ndr_pull_spoolss_AccessRights(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
21140 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
21141 ZERO_STRUCTP(r
->out
.handle
);
21143 if (flags
& NDR_OUT
) {
21144 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21145 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
21147 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21148 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21149 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
21150 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21151 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21153 return NDR_ERR_SUCCESS
;
21156 _PUBLIC_
void ndr_print_spoolss_OpenPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_OpenPrinter
*r
)
21158 ndr_print_struct(ndr
, name
, "spoolss_OpenPrinter");
21160 if (flags
& NDR_SET_VALUES
) {
21161 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21163 if (flags
& NDR_IN
) {
21164 ndr_print_struct(ndr
, "in", "spoolss_OpenPrinter");
21166 ndr_print_ptr(ndr
, "printername", r
->in
.printername
);
21168 if (r
->in
.printername
) {
21169 ndr_print_string(ndr
, "printername", r
->in
.printername
);
21172 ndr_print_ptr(ndr
, "datatype", r
->in
.datatype
);
21174 if (r
->in
.datatype
) {
21175 ndr_print_string(ndr
, "datatype", r
->in
.datatype
);
21178 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", &r
->in
.devmode_ctr
);
21179 ndr_print_spoolss_AccessRights(ndr
, "access_mask", r
->in
.access_mask
);
21182 if (flags
& NDR_OUT
) {
21183 ndr_print_struct(ndr
, "out", "spoolss_OpenPrinter");
21185 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
21187 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
21189 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21195 static enum ndr_err_code
ndr_push_spoolss_SetJob(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetJob
*r
)
21197 if (flags
& NDR_IN
) {
21198 if (r
->in
.handle
== NULL
) {
21199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21201 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21202 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.job_id
));
21203 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.ctr
));
21205 NDR_CHECK(ndr_push_spoolss_JobInfoContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.ctr
));
21207 NDR_CHECK(ndr_push_spoolss_JobControl(ndr
, NDR_SCALARS
, r
->in
.command
));
21209 if (flags
& NDR_OUT
) {
21210 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21212 return NDR_ERR_SUCCESS
;
21215 static enum ndr_err_code
ndr_pull_spoolss_SetJob(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetJob
*r
)
21218 TALLOC_CTX
*_mem_save_handle_0
;
21219 TALLOC_CTX
*_mem_save_ctr_0
;
21220 if (flags
& NDR_IN
) {
21221 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21222 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21224 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21225 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21226 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21227 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21228 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.job_id
));
21229 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_ctr
));
21231 NDR_PULL_ALLOC(ndr
, r
->in
.ctr
);
21236 _mem_save_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21237 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.ctr
, 0);
21238 NDR_CHECK(ndr_pull_spoolss_JobInfoContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.ctr
));
21239 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_ctr_0
, 0);
21241 NDR_CHECK(ndr_pull_spoolss_JobControl(ndr
, NDR_SCALARS
, &r
->in
.command
));
21243 if (flags
& NDR_OUT
) {
21244 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21246 return NDR_ERR_SUCCESS
;
21249 _PUBLIC_
void ndr_print_spoolss_SetJob(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetJob
*r
)
21251 ndr_print_struct(ndr
, name
, "spoolss_SetJob");
21253 if (flags
& NDR_SET_VALUES
) {
21254 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21256 if (flags
& NDR_IN
) {
21257 ndr_print_struct(ndr
, "in", "spoolss_SetJob");
21259 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21261 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21263 ndr_print_uint32(ndr
, "job_id", r
->in
.job_id
);
21264 ndr_print_ptr(ndr
, "ctr", r
->in
.ctr
);
21267 ndr_print_spoolss_JobInfoContainer(ndr
, "ctr", r
->in
.ctr
);
21270 ndr_print_spoolss_JobControl(ndr
, "command", r
->in
.command
);
21273 if (flags
& NDR_OUT
) {
21274 ndr_print_struct(ndr
, "out", "spoolss_SetJob");
21276 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21282 static enum ndr_err_code
ndr_push_spoolss_GetJob(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetJob
*r
)
21284 if (flags
& NDR_IN
) {
21285 if (r
->in
.handle
== NULL
) {
21286 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21288 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21289 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.job_id
));
21290 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
21291 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
21292 if (r
->in
.buffer
) {
21293 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
21295 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
21297 if (flags
& NDR_OUT
) {
21298 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
21301 struct ndr_push
*_ndr_info
;
21302 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
21303 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
21304 NDR_CHECK(ndr_push_spoolss_JobInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
21305 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
21308 if (r
->out
.needed
== NULL
) {
21309 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21311 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
21312 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21314 return NDR_ERR_SUCCESS
;
21317 static enum ndr_err_code
ndr_pull_spoolss_GetJob(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetJob
*r
)
21319 uint32_t _ptr_buffer
;
21320 uint32_t _ptr_info
;
21321 TALLOC_CTX
*_mem_save_handle_0
;
21322 TALLOC_CTX
*_mem_save_buffer_0
;
21323 TALLOC_CTX
*_mem_save_info_0
;
21324 TALLOC_CTX
*_mem_save_needed_0
;
21325 if (flags
& NDR_IN
) {
21326 ZERO_STRUCT(r
->out
);
21328 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21329 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21331 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21332 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21333 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21334 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21335 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.job_id
));
21336 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
21337 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
21339 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
21341 r
->in
.buffer
= NULL
;
21343 if (r
->in
.buffer
) {
21344 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21345 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
21346 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
21347 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
21349 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
21350 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21351 ZERO_STRUCTP(r
->out
.needed
);
21353 if (flags
& NDR_OUT
) {
21354 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
21356 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
21358 r
->out
.info
= NULL
;
21361 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21362 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
21364 struct ndr_pull
*_ndr_info
;
21365 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
21366 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
21367 NDR_CHECK(ndr_pull_spoolss_JobInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
21368 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
21370 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
21372 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21373 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21375 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21376 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
21377 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
21378 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
21379 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21381 return NDR_ERR_SUCCESS
;
21384 _PUBLIC_
void ndr_print_spoolss_GetJob(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetJob
*r
)
21386 ndr_print_struct(ndr
, name
, "spoolss_GetJob");
21388 if (flags
& NDR_SET_VALUES
) {
21389 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21391 if (flags
& NDR_IN
) {
21392 ndr_print_struct(ndr
, "in", "spoolss_GetJob");
21394 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21396 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21398 ndr_print_uint32(ndr
, "job_id", r
->in
.job_id
);
21399 ndr_print_uint32(ndr
, "level", r
->in
.level
);
21400 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
21402 if (r
->in
.buffer
) {
21403 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
21406 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
21409 if (flags
& NDR_OUT
) {
21410 ndr_print_struct(ndr
, "out", "spoolss_GetJob");
21412 ndr_print_ptr(ndr
, "info", r
->out
.info
);
21415 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
21416 ndr_print_spoolss_JobInfo(ndr
, "info", r
->out
.info
);
21419 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
21421 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
21423 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21429 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumJobs(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumJobs
*r
)
21431 if (flags
& NDR_IN
) {
21432 if (r
->in
.handle
== NULL
) {
21433 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21435 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21436 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.firstjob
));
21437 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.numjobs
));
21438 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
21439 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
21440 if (r
->in
.buffer
) {
21441 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
21443 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
21445 if (flags
& NDR_OUT
) {
21446 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
21448 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
21450 if (r
->out
.needed
== NULL
) {
21451 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21453 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
21454 if (r
->out
.count
== NULL
) {
21455 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21457 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
21458 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21460 return NDR_ERR_SUCCESS
;
21463 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumJobs(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumJobs
*r
)
21465 uint32_t _ptr_buffer
;
21466 uint32_t _ptr_info
;
21467 TALLOC_CTX
*_mem_save_handle_0
;
21468 TALLOC_CTX
*_mem_save_buffer_0
;
21469 TALLOC_CTX
*_mem_save_info_0
;
21470 TALLOC_CTX
*_mem_save_needed_0
;
21471 TALLOC_CTX
*_mem_save_count_0
;
21472 if (flags
& NDR_IN
) {
21473 ZERO_STRUCT(r
->out
);
21475 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21476 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21478 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21479 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21480 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21481 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21482 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.firstjob
));
21483 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.numjobs
));
21484 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
21485 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
21487 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
21489 r
->in
.buffer
= NULL
;
21491 if (r
->in
.buffer
) {
21492 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21493 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
21494 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
21495 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
21497 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
21498 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21499 ZERO_STRUCTP(r
->out
.needed
);
21500 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
21501 ZERO_STRUCTP(r
->out
.count
);
21503 if (flags
& NDR_OUT
) {
21504 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
21506 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
21508 r
->out
.info
= NULL
;
21511 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21512 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
21513 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
21514 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
21516 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21517 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
21519 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21520 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
21521 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
21522 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
21523 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21524 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
21526 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21527 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
21528 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
21529 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
21530 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21532 return NDR_ERR_SUCCESS
;
21535 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumJobs(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumJobs
*r
)
21537 uint32_t cntr_info_0
;
21538 if (flags
& NDR_IN
) {
21539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
21540 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
21542 if (flags
& NDR_OUT
) {
21543 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
21544 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
21545 NDR_CHECK(ndr_push_spoolss_JobInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
21547 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
21548 NDR_CHECK(ndr_push_spoolss_JobInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
21551 return NDR_ERR_SUCCESS
;
21554 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumJobs(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumJobs
*r
)
21556 uint32_t cntr_info_0
;
21557 TALLOC_CTX
*_mem_save_info_0
;
21558 if (flags
& NDR_IN
) {
21559 ZERO_STRUCT(r
->out
);
21561 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
21562 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
21564 if (flags
& NDR_OUT
) {
21565 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
21566 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21567 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
21568 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
21569 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
21570 NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
21572 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
21573 NDR_CHECK(ndr_pull_spoolss_JobInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
21575 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
21577 return NDR_ERR_SUCCESS
;
21580 _PUBLIC_
void ndr_print_spoolss_EnumJobs(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumJobs
*r
)
21582 uint32_t cntr_info_2
;
21583 ndr_print_struct(ndr
, name
, "spoolss_EnumJobs");
21585 if (flags
& NDR_SET_VALUES
) {
21586 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21588 if (flags
& NDR_IN
) {
21589 ndr_print_struct(ndr
, "in", "spoolss_EnumJobs");
21591 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21593 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21595 ndr_print_uint32(ndr
, "firstjob", r
->in
.firstjob
);
21596 ndr_print_uint32(ndr
, "numjobs", r
->in
.numjobs
);
21597 ndr_print_uint32(ndr
, "level", r
->in
.level
);
21598 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
21600 if (r
->in
.buffer
) {
21601 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
21604 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
21607 if (flags
& NDR_OUT
) {
21608 ndr_print_struct(ndr
, "out", "spoolss_EnumJobs");
21610 ndr_print_ptr(ndr
, "count", r
->out
.count
);
21612 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
21614 ndr_print_ptr(ndr
, "info", r
->out
.info
);
21616 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
21618 if (*r
->out
.info
) {
21619 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
21621 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
21623 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
21624 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
21625 ndr_print_spoolss_JobInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
21633 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
21635 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
21637 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21643 static enum ndr_err_code
ndr_push_spoolss_AddPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinter
*r
)
21645 if (flags
& NDR_IN
) {
21646 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
21647 if (r
->in
.server
) {
21648 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
21649 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
21650 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
21651 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
21653 if (r
->in
.info_ctr
== NULL
) {
21654 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21656 NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
21657 if (r
->in
.devmode_ctr
== NULL
) {
21658 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21660 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
21661 if (r
->in
.secdesc_ctr
== NULL
) {
21662 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21664 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
21666 if (flags
& NDR_OUT
) {
21667 if (r
->out
.handle
== NULL
) {
21668 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21670 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
21671 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21673 return NDR_ERR_SUCCESS
;
21676 static enum ndr_err_code
ndr_pull_spoolss_AddPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinter
*r
)
21678 uint32_t _ptr_server
;
21679 TALLOC_CTX
*_mem_save_server_0
;
21680 TALLOC_CTX
*_mem_save_info_ctr_0
;
21681 TALLOC_CTX
*_mem_save_devmode_ctr_0
;
21682 TALLOC_CTX
*_mem_save_secdesc_ctr_0
;
21683 TALLOC_CTX
*_mem_save_handle_0
;
21684 if (flags
& NDR_IN
) {
21685 ZERO_STRUCT(r
->out
);
21687 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
21689 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
21691 r
->in
.server
= NULL
;
21693 if (r
->in
.server
) {
21694 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21695 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
21696 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
21697 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
21698 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
21699 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
));
21701 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
21702 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
21703 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
21705 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21706 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
21708 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21709 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
21710 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
21711 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
21712 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21713 NDR_PULL_ALLOC(ndr
, r
->in
.devmode_ctr
);
21715 _mem_save_devmode_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21716 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.devmode_ctr
, LIBNDR_FLAG_REF_ALLOC
);
21717 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
21718 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
21719 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21720 NDR_PULL_ALLOC(ndr
, r
->in
.secdesc_ctr
);
21722 _mem_save_secdesc_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21723 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.secdesc_ctr
, LIBNDR_FLAG_REF_ALLOC
);
21724 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
21725 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
21726 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
21727 ZERO_STRUCTP(r
->out
.handle
);
21729 if (flags
& NDR_OUT
) {
21730 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21731 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
21733 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21734 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21735 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
21736 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21737 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21739 return NDR_ERR_SUCCESS
;
21742 _PUBLIC_
void ndr_print_spoolss_AddPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinter
*r
)
21744 ndr_print_struct(ndr
, name
, "spoolss_AddPrinter");
21746 if (flags
& NDR_SET_VALUES
) {
21747 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21749 if (flags
& NDR_IN
) {
21750 ndr_print_struct(ndr
, "in", "spoolss_AddPrinter");
21752 ndr_print_ptr(ndr
, "server", r
->in
.server
);
21754 if (r
->in
.server
) {
21755 ndr_print_string(ndr
, "server", r
->in
.server
);
21758 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
21760 ndr_print_spoolss_SetPrinterInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
21762 ndr_print_ptr(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
21764 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
21766 ndr_print_ptr(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
21768 ndr_print_sec_desc_buf(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
21772 if (flags
& NDR_OUT
) {
21773 ndr_print_struct(ndr
, "out", "spoolss_AddPrinter");
21775 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
21777 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
21779 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21785 static enum ndr_err_code
ndr_push_spoolss_DeletePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinter
*r
)
21787 if (flags
& NDR_IN
) {
21788 if (r
->in
.handle
== NULL
) {
21789 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21791 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21793 if (flags
& NDR_OUT
) {
21794 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21796 return NDR_ERR_SUCCESS
;
21799 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinter
*r
)
21801 TALLOC_CTX
*_mem_save_handle_0
;
21802 if (flags
& NDR_IN
) {
21803 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21804 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21806 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21807 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21808 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21809 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21811 if (flags
& NDR_OUT
) {
21812 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21814 return NDR_ERR_SUCCESS
;
21817 _PUBLIC_
void ndr_print_spoolss_DeletePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinter
*r
)
21819 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinter");
21821 if (flags
& NDR_SET_VALUES
) {
21822 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21824 if (flags
& NDR_IN
) {
21825 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinter");
21827 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21829 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21833 if (flags
& NDR_OUT
) {
21834 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinter");
21836 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21842 static enum ndr_err_code
ndr_push_spoolss_SetPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetPrinter
*r
)
21844 if (flags
& NDR_IN
) {
21845 if (r
->in
.handle
== NULL
) {
21846 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21848 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21849 if (r
->in
.info_ctr
== NULL
) {
21850 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21852 NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
21853 if (r
->in
.devmode_ctr
== NULL
) {
21854 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21856 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
21857 if (r
->in
.secdesc_ctr
== NULL
) {
21858 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21860 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
21861 NDR_CHECK(ndr_push_spoolss_PrinterControl(ndr
, NDR_SCALARS
, r
->in
.command
));
21863 if (flags
& NDR_OUT
) {
21864 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21866 return NDR_ERR_SUCCESS
;
21869 static enum ndr_err_code
ndr_pull_spoolss_SetPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetPrinter
*r
)
21871 TALLOC_CTX
*_mem_save_handle_0
;
21872 TALLOC_CTX
*_mem_save_info_ctr_0
;
21873 TALLOC_CTX
*_mem_save_devmode_ctr_0
;
21874 TALLOC_CTX
*_mem_save_secdesc_ctr_0
;
21875 if (flags
& NDR_IN
) {
21876 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21877 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21879 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21880 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
21881 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21882 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
21883 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21884 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
21886 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21887 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
21888 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
21889 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
21890 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21891 NDR_PULL_ALLOC(ndr
, r
->in
.devmode_ctr
);
21893 _mem_save_devmode_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21894 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.devmode_ctr
, LIBNDR_FLAG_REF_ALLOC
);
21895 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
21896 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
21897 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21898 NDR_PULL_ALLOC(ndr
, r
->in
.secdesc_ctr
);
21900 _mem_save_secdesc_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21901 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.secdesc_ctr
, LIBNDR_FLAG_REF_ALLOC
);
21902 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
21903 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
21904 NDR_CHECK(ndr_pull_spoolss_PrinterControl(ndr
, NDR_SCALARS
, &r
->in
.command
));
21906 if (flags
& NDR_OUT
) {
21907 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
21909 return NDR_ERR_SUCCESS
;
21912 _PUBLIC_
void ndr_print_spoolss_SetPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetPrinter
*r
)
21914 ndr_print_struct(ndr
, name
, "spoolss_SetPrinter");
21916 if (flags
& NDR_SET_VALUES
) {
21917 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
21919 if (flags
& NDR_IN
) {
21920 ndr_print_struct(ndr
, "in", "spoolss_SetPrinter");
21922 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
21924 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
21926 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
21928 ndr_print_spoolss_SetPrinterInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
21930 ndr_print_ptr(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
21932 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
21934 ndr_print_ptr(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
21936 ndr_print_sec_desc_buf(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
21938 ndr_print_spoolss_PrinterControl(ndr
, "command", r
->in
.command
);
21941 if (flags
& NDR_OUT
) {
21942 ndr_print_struct(ndr
, "out", "spoolss_SetPrinter");
21944 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
21950 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_GetPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinter
*r
)
21952 if (flags
& NDR_IN
) {
21953 if (r
->in
.handle
== NULL
) {
21954 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21956 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
21957 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
21958 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
21959 if (r
->in
.buffer
) {
21960 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
21962 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
21964 if (flags
& NDR_OUT
) {
21965 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
21968 struct ndr_push
*_ndr_info
;
21969 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
21970 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
21971 NDR_CHECK(ndr_push_spoolss_PrinterInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
21972 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
21975 if (r
->out
.needed
== NULL
) {
21976 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
21978 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
21979 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
21981 return NDR_ERR_SUCCESS
;
21984 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_GetPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinter
*r
)
21986 uint32_t _ptr_buffer
;
21987 uint32_t _ptr_info
;
21988 TALLOC_CTX
*_mem_save_handle_0
;
21989 TALLOC_CTX
*_mem_save_buffer_0
;
21990 TALLOC_CTX
*_mem_save_info_0
;
21991 TALLOC_CTX
*_mem_save_needed_0
;
21992 if (flags
& NDR_IN
) {
21993 ZERO_STRUCT(r
->out
);
21995 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
21996 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
21998 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
21999 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22000 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22001 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22002 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22003 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
22005 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
22007 r
->in
.buffer
= NULL
;
22009 if (r
->in
.buffer
) {
22010 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22011 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
22012 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
22013 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
22015 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
22016 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22017 ZERO_STRUCTP(r
->out
.needed
);
22019 if (flags
& NDR_OUT
) {
22020 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
22022 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
22024 r
->out
.info
= NULL
;
22027 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22028 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22030 struct ndr_pull
*_ndr_info
;
22031 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
22032 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
22033 NDR_CHECK(ndr_pull_spoolss_PrinterInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
22034 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
22036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22038 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22039 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22041 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22042 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
22043 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
22044 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
22045 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22047 return NDR_ERR_SUCCESS
;
22050 _PUBLIC_
void ndr_print_spoolss_GetPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinter
*r
)
22052 ndr_print_struct(ndr
, name
, "spoolss_GetPrinter");
22054 if (flags
& NDR_SET_VALUES
) {
22055 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22057 if (flags
& NDR_IN
) {
22058 ndr_print_struct(ndr
, "in", "spoolss_GetPrinter");
22060 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22062 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22064 ndr_print_uint32(ndr
, "level", r
->in
.level
);
22065 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
22067 if (r
->in
.buffer
) {
22068 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
22071 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
22074 if (flags
& NDR_OUT
) {
22075 ndr_print_struct(ndr
, "out", "spoolss_GetPrinter");
22077 ndr_print_ptr(ndr
, "info", r
->out
.info
);
22080 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
22081 ndr_print_spoolss_PrinterInfo(ndr
, "info", r
->out
.info
);
22084 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
22086 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
22088 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22094 static enum ndr_err_code
ndr_push_spoolss_AddPrinterDriver(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinterDriver
*r
)
22096 if (flags
& NDR_IN
) {
22097 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
22098 if (r
->in
.servername
) {
22099 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
22100 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22101 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
22102 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22104 if (r
->in
.info_ctr
== NULL
) {
22105 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22107 NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
22109 if (flags
& NDR_OUT
) {
22110 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22112 return NDR_ERR_SUCCESS
;
22115 static enum ndr_err_code
ndr_pull_spoolss_AddPrinterDriver(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinterDriver
*r
)
22117 uint32_t _ptr_servername
;
22118 TALLOC_CTX
*_mem_save_servername_0
;
22119 TALLOC_CTX
*_mem_save_info_ctr_0
;
22120 if (flags
& NDR_IN
) {
22121 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
22122 if (_ptr_servername
) {
22123 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
22125 r
->in
.servername
= NULL
;
22127 if (r
->in
.servername
) {
22128 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22129 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
22130 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
22131 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
22132 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
22133 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
));
22135 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
22136 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
22137 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
22139 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22140 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
22142 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22143 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
22144 NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
22145 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
22147 if (flags
& NDR_OUT
) {
22148 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22150 return NDR_ERR_SUCCESS
;
22153 _PUBLIC_
void ndr_print_spoolss_AddPrinterDriver(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinterDriver
*r
)
22155 ndr_print_struct(ndr
, name
, "spoolss_AddPrinterDriver");
22157 if (flags
& NDR_SET_VALUES
) {
22158 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22160 if (flags
& NDR_IN
) {
22161 ndr_print_struct(ndr
, "in", "spoolss_AddPrinterDriver");
22163 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
22165 if (r
->in
.servername
) {
22166 ndr_print_string(ndr
, "servername", r
->in
.servername
);
22169 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
22171 ndr_print_spoolss_AddDriverInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
22175 if (flags
& NDR_OUT
) {
22176 ndr_print_struct(ndr
, "out", "spoolss_AddPrinterDriver");
22178 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22184 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrinterDrivers(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrinterDrivers
*r
)
22186 if (flags
& NDR_IN
) {
22187 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
22188 if (r
->in
.server
) {
22189 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
22190 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22191 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
22192 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22194 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.environment
));
22195 if (r
->in
.environment
) {
22196 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
22197 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22198 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
22199 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.environment
, ndr_charset_length(r
->in
.environment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22201 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22202 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
22203 if (r
->in
.buffer
) {
22204 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
22206 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
22208 if (flags
& NDR_OUT
) {
22209 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
22211 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
22213 if (r
->out
.needed
== NULL
) {
22214 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22216 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
22217 if (r
->out
.count
== NULL
) {
22218 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22220 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
22221 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22223 return NDR_ERR_SUCCESS
;
22226 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrinterDrivers(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrinterDrivers
*r
)
22228 uint32_t _ptr_server
;
22229 uint32_t _ptr_environment
;
22230 uint32_t _ptr_buffer
;
22231 uint32_t _ptr_info
;
22232 TALLOC_CTX
*_mem_save_server_0
;
22233 TALLOC_CTX
*_mem_save_environment_0
;
22234 TALLOC_CTX
*_mem_save_buffer_0
;
22235 TALLOC_CTX
*_mem_save_info_0
;
22236 TALLOC_CTX
*_mem_save_needed_0
;
22237 TALLOC_CTX
*_mem_save_count_0
;
22238 if (flags
& NDR_IN
) {
22239 ZERO_STRUCT(r
->out
);
22241 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
22243 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
22245 r
->in
.server
= NULL
;
22247 if (r
->in
.server
) {
22248 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22249 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
22250 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
22251 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
22252 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
22253 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
));
22255 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
22256 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
22257 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
22259 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
22260 if (_ptr_environment
) {
22261 NDR_PULL_ALLOC(ndr
, r
->in
.environment
);
22263 r
->in
.environment
= NULL
;
22265 if (r
->in
.environment
) {
22266 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22267 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.environment
, 0);
22268 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.environment
));
22269 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.environment
));
22270 if (ndr_get_array_length(ndr
, &r
->in
.environment
) > ndr_get_array_size(ndr
, &r
->in
.environment
)) {
22271 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
));
22273 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t)));
22274 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.environment
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t), CH_UTF16
));
22275 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
22277 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22278 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
22280 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
22282 r
->in
.buffer
= NULL
;
22284 if (r
->in
.buffer
) {
22285 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22286 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
22287 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
22288 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
22290 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
22291 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22292 ZERO_STRUCTP(r
->out
.needed
);
22293 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
22294 ZERO_STRUCTP(r
->out
.count
);
22296 if (flags
& NDR_OUT
) {
22297 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
22299 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
22301 r
->out
.info
= NULL
;
22304 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22305 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22306 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
22307 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22309 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22310 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22312 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22313 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
22314 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
22315 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
22316 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22317 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
22319 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22320 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
22321 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
22322 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
22323 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22325 return NDR_ERR_SUCCESS
;
22328 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrinterDrivers(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrinterDrivers
*r
)
22330 uint32_t cntr_info_0
;
22331 if (flags
& NDR_IN
) {
22332 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22333 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
22335 if (flags
& NDR_OUT
) {
22336 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22337 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
22338 NDR_CHECK(ndr_push_spoolss_DriverInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
22340 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22341 NDR_CHECK(ndr_push_spoolss_DriverInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
22344 return NDR_ERR_SUCCESS
;
22347 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrinterDrivers(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrinterDrivers
*r
)
22349 uint32_t cntr_info_0
;
22350 TALLOC_CTX
*_mem_save_info_0
;
22351 if (flags
& NDR_IN
) {
22352 ZERO_STRUCT(r
->out
);
22354 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22355 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
22357 if (flags
& NDR_OUT
) {
22358 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
22359 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22360 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22361 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22362 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
22363 NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
22365 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
22366 NDR_CHECK(ndr_pull_spoolss_DriverInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
22368 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22370 return NDR_ERR_SUCCESS
;
22373 _PUBLIC_
void ndr_print_spoolss_EnumPrinterDrivers(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinterDrivers
*r
)
22375 uint32_t cntr_info_2
;
22376 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinterDrivers");
22378 if (flags
& NDR_SET_VALUES
) {
22379 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22381 if (flags
& NDR_IN
) {
22382 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinterDrivers");
22384 ndr_print_ptr(ndr
, "server", r
->in
.server
);
22386 if (r
->in
.server
) {
22387 ndr_print_string(ndr
, "server", r
->in
.server
);
22390 ndr_print_ptr(ndr
, "environment", r
->in
.environment
);
22392 if (r
->in
.environment
) {
22393 ndr_print_string(ndr
, "environment", r
->in
.environment
);
22396 ndr_print_uint32(ndr
, "level", r
->in
.level
);
22397 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
22399 if (r
->in
.buffer
) {
22400 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
22403 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
22406 if (flags
& NDR_OUT
) {
22407 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinterDrivers");
22409 ndr_print_ptr(ndr
, "count", r
->out
.count
);
22411 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
22413 ndr_print_ptr(ndr
, "info", r
->out
.info
);
22415 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
22417 if (*r
->out
.info
) {
22418 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
22420 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
22422 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
22423 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
22424 ndr_print_spoolss_DriverInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
22432 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
22434 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
22436 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22442 static enum ndr_err_code
ndr_push_spoolss_GetPrinterDriver(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDriver
*r
)
22444 if (flags
& NDR_IN
) {
22445 if (r
->in
.handle
== NULL
) {
22446 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22448 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22449 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.architecture
));
22450 if (r
->in
.architecture
) {
22451 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
22452 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22453 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
22454 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22456 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22457 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
22458 if (r
->in
.buffer
) {
22459 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
22461 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
22463 if (flags
& NDR_OUT
) {
22464 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
22467 struct ndr_push
*_ndr_info
;
22468 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
22469 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
22470 NDR_CHECK(ndr_push_spoolss_DriverInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
22471 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
22474 if (r
->out
.needed
== NULL
) {
22475 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22477 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
22478 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22480 return NDR_ERR_SUCCESS
;
22483 static enum ndr_err_code
ndr_pull_spoolss_GetPrinterDriver(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDriver
*r
)
22485 uint32_t _ptr_architecture
;
22486 uint32_t _ptr_buffer
;
22487 uint32_t _ptr_info
;
22488 TALLOC_CTX
*_mem_save_handle_0
;
22489 TALLOC_CTX
*_mem_save_architecture_0
;
22490 TALLOC_CTX
*_mem_save_buffer_0
;
22491 TALLOC_CTX
*_mem_save_info_0
;
22492 TALLOC_CTX
*_mem_save_needed_0
;
22493 if (flags
& NDR_IN
) {
22494 ZERO_STRUCT(r
->out
);
22496 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22497 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
22499 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22500 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
22501 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
22502 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
22503 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
22504 if (_ptr_architecture
) {
22505 NDR_PULL_ALLOC(ndr
, r
->in
.architecture
);
22507 r
->in
.architecture
= NULL
;
22509 if (r
->in
.architecture
) {
22510 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22511 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.architecture
, 0);
22512 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
22513 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
22514 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
22515 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
));
22517 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
22518 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
22519 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
22521 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22522 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
22524 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
22526 r
->in
.buffer
= NULL
;
22528 if (r
->in
.buffer
) {
22529 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22530 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
22531 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
22532 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
22534 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
22535 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22536 ZERO_STRUCTP(r
->out
.needed
);
22538 if (flags
& NDR_OUT
) {
22539 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
22541 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
22543 r
->out
.info
= NULL
;
22546 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22547 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22549 struct ndr_pull
*_ndr_info
;
22550 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
22551 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
22552 NDR_CHECK(ndr_pull_spoolss_DriverInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
22553 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
22555 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22557 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22558 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22560 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22561 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
22562 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
22563 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
22564 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22566 return NDR_ERR_SUCCESS
;
22569 _PUBLIC_
void ndr_print_spoolss_GetPrinterDriver(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDriver
*r
)
22571 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDriver");
22573 if (flags
& NDR_SET_VALUES
) {
22574 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22576 if (flags
& NDR_IN
) {
22577 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDriver");
22579 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
22581 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
22583 ndr_print_ptr(ndr
, "architecture", r
->in
.architecture
);
22585 if (r
->in
.architecture
) {
22586 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
22589 ndr_print_uint32(ndr
, "level", r
->in
.level
);
22590 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
22592 if (r
->in
.buffer
) {
22593 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
22596 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
22599 if (flags
& NDR_OUT
) {
22600 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDriver");
22602 ndr_print_ptr(ndr
, "info", r
->out
.info
);
22605 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
22606 ndr_print_spoolss_DriverInfo(ndr
, "info", r
->out
.info
);
22609 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
22611 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
22613 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22619 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_GetPrinterDriverDirectory(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDriverDirectory
*r
)
22621 if (flags
& NDR_IN
) {
22622 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
22623 if (r
->in
.server
) {
22624 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
22625 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22626 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
22627 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22629 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.environment
));
22630 if (r
->in
.environment
) {
22631 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
22632 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22633 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
22634 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.environment
, ndr_charset_length(r
->in
.environment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22636 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
22637 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
22638 if (r
->in
.buffer
) {
22639 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
22641 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
22643 if (flags
& NDR_OUT
) {
22644 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
22647 struct ndr_push
*_ndr_info
;
22648 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
22649 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
22650 NDR_CHECK(ndr_push_spoolss_DriverDirectoryInfo(_ndr_info
, NDR_SCALARS
, r
->out
.info
));
22651 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
22654 if (r
->out
.needed
== NULL
) {
22655 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
22657 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
22658 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22660 return NDR_ERR_SUCCESS
;
22663 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_GetPrinterDriverDirectory(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDriverDirectory
*r
)
22665 uint32_t _ptr_server
;
22666 uint32_t _ptr_environment
;
22667 uint32_t _ptr_buffer
;
22668 uint32_t _ptr_info
;
22669 TALLOC_CTX
*_mem_save_server_0
;
22670 TALLOC_CTX
*_mem_save_environment_0
;
22671 TALLOC_CTX
*_mem_save_buffer_0
;
22672 TALLOC_CTX
*_mem_save_info_0
;
22673 TALLOC_CTX
*_mem_save_needed_0
;
22674 if (flags
& NDR_IN
) {
22675 ZERO_STRUCT(r
->out
);
22677 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
22679 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
22681 r
->in
.server
= NULL
;
22683 if (r
->in
.server
) {
22684 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22685 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
22686 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
22687 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
22688 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
22689 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
));
22691 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
22692 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
22693 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
22695 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
22696 if (_ptr_environment
) {
22697 NDR_PULL_ALLOC(ndr
, r
->in
.environment
);
22699 r
->in
.environment
= NULL
;
22701 if (r
->in
.environment
) {
22702 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22703 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.environment
, 0);
22704 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.environment
));
22705 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.environment
));
22706 if (ndr_get_array_length(ndr
, &r
->in
.environment
) > ndr_get_array_size(ndr
, &r
->in
.environment
)) {
22707 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
));
22709 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t)));
22710 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.environment
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t), CH_UTF16
));
22711 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
22713 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
22714 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
22716 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
22718 r
->in
.buffer
= NULL
;
22720 if (r
->in
.buffer
) {
22721 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22722 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
22723 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
22724 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
22726 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
22727 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22728 ZERO_STRUCTP(r
->out
.needed
);
22730 if (flags
& NDR_OUT
) {
22731 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
22733 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
22735 r
->out
.info
= NULL
;
22738 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22739 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
22741 struct ndr_pull
*_ndr_info
;
22742 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
22743 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
22744 NDR_CHECK(ndr_pull_spoolss_DriverDirectoryInfo(_ndr_info
, NDR_SCALARS
, r
->out
.info
));
22745 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
22747 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
22749 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
22750 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
22752 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22753 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
22754 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
22755 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
22756 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22758 return NDR_ERR_SUCCESS
;
22761 _PUBLIC_
void ndr_print_spoolss_GetPrinterDriverDirectory(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDriverDirectory
*r
)
22763 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDriverDirectory");
22765 if (flags
& NDR_SET_VALUES
) {
22766 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22768 if (flags
& NDR_IN
) {
22769 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDriverDirectory");
22771 ndr_print_ptr(ndr
, "server", r
->in
.server
);
22773 if (r
->in
.server
) {
22774 ndr_print_string(ndr
, "server", r
->in
.server
);
22777 ndr_print_ptr(ndr
, "environment", r
->in
.environment
);
22779 if (r
->in
.environment
) {
22780 ndr_print_string(ndr
, "environment", r
->in
.environment
);
22783 ndr_print_uint32(ndr
, "level", r
->in
.level
);
22784 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
22786 if (r
->in
.buffer
) {
22787 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
22790 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
22793 if (flags
& NDR_OUT
) {
22794 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDriverDirectory");
22796 ndr_print_ptr(ndr
, "info", r
->out
.info
);
22799 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
22800 ndr_print_spoolss_DriverDirectoryInfo(ndr
, "info", r
->out
.info
);
22803 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
22805 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
22807 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22813 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterDriver(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterDriver
*r
)
22815 if (flags
& NDR_IN
) {
22816 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
22817 if (r
->in
.server
) {
22818 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
22819 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22820 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
22821 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22823 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
22824 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22825 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
22826 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22827 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.driver
, CH_UTF16
)));
22828 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22829 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.driver
, CH_UTF16
)));
22830 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.driver
, ndr_charset_length(r
->in
.driver
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22832 if (flags
& NDR_OUT
) {
22833 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22835 return NDR_ERR_SUCCESS
;
22838 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterDriver(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterDriver
*r
)
22840 uint32_t _ptr_server
;
22841 TALLOC_CTX
*_mem_save_server_0
;
22842 if (flags
& NDR_IN
) {
22843 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
22845 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
22847 r
->in
.server
= NULL
;
22849 if (r
->in
.server
) {
22850 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22851 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
22852 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
22853 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
22854 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
22855 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
));
22857 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
22858 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
22859 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
22861 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
22862 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
22863 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
22864 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
));
22866 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
22867 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
22868 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.driver
));
22869 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.driver
));
22870 if (ndr_get_array_length(ndr
, &r
->in
.driver
) > ndr_get_array_size(ndr
, &r
->in
.driver
)) {
22871 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
));
22873 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.driver
), sizeof(uint16_t)));
22874 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.driver
, ndr_get_array_length(ndr
, &r
->in
.driver
), sizeof(uint16_t), CH_UTF16
));
22876 if (flags
& NDR_OUT
) {
22877 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22879 return NDR_ERR_SUCCESS
;
22882 _PUBLIC_
void ndr_print_spoolss_DeletePrinterDriver(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterDriver
*r
)
22884 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterDriver");
22886 if (flags
& NDR_SET_VALUES
) {
22887 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22889 if (flags
& NDR_IN
) {
22890 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterDriver");
22892 ndr_print_ptr(ndr
, "server", r
->in
.server
);
22894 if (r
->in
.server
) {
22895 ndr_print_string(ndr
, "server", r
->in
.server
);
22898 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
22899 ndr_print_string(ndr
, "driver", r
->in
.driver
);
22902 if (flags
& NDR_OUT
) {
22903 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterDriver");
22905 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
22911 static enum ndr_err_code
ndr_push_spoolss_AddPrintProcessor(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrintProcessor
*r
)
22913 if (flags
& NDR_IN
) {
22914 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
22915 if (r
->in
.server
) {
22916 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
22917 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22918 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
22919 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22921 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
22922 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22923 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
22924 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
22925 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.path_name
, CH_UTF16
)));
22926 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22927 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.path_name
, CH_UTF16
)));
22928 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
));
22929 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.print_processor_name
, CH_UTF16
)));
22930 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
22931 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.print_processor_name
, CH_UTF16
)));
22932 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
));
22934 if (flags
& NDR_OUT
) {
22935 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
22937 return NDR_ERR_SUCCESS
;
22940 static enum ndr_err_code
ndr_pull_spoolss_AddPrintProcessor(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrintProcessor
*r
)
22942 uint32_t _ptr_server
;
22943 TALLOC_CTX
*_mem_save_server_0
;
22944 if (flags
& NDR_IN
) {
22945 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
22947 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
22949 r
->in
.server
= NULL
;
22951 if (r
->in
.server
) {
22952 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
22953 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
22954 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
22955 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
22956 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
22957 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
));
22959 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
22960 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
22961 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
22963 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
22964 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
22965 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
22966 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
));
22968 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
22969 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
22970 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.path_name
));
22971 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.path_name
));
22972 if (ndr_get_array_length(ndr
, &r
->in
.path_name
) > ndr_get_array_size(ndr
, &r
->in
.path_name
)) {
22973 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
));
22975 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.path_name
), sizeof(uint16_t)));
22976 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
));
22977 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.print_processor_name
));
22978 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.print_processor_name
));
22979 if (ndr_get_array_length(ndr
, &r
->in
.print_processor_name
) > ndr_get_array_size(ndr
, &r
->in
.print_processor_name
)) {
22980 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
));
22982 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.print_processor_name
), sizeof(uint16_t)));
22983 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
));
22985 if (flags
& NDR_OUT
) {
22986 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
22988 return NDR_ERR_SUCCESS
;
22991 _PUBLIC_
void ndr_print_spoolss_AddPrintProcessor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrintProcessor
*r
)
22993 ndr_print_struct(ndr
, name
, "spoolss_AddPrintProcessor");
22995 if (flags
& NDR_SET_VALUES
) {
22996 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
22998 if (flags
& NDR_IN
) {
22999 ndr_print_struct(ndr
, "in", "spoolss_AddPrintProcessor");
23001 ndr_print_ptr(ndr
, "server", r
->in
.server
);
23003 if (r
->in
.server
) {
23004 ndr_print_string(ndr
, "server", r
->in
.server
);
23007 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
23008 ndr_print_string(ndr
, "path_name", r
->in
.path_name
);
23009 ndr_print_string(ndr
, "print_processor_name", r
->in
.print_processor_name
);
23012 if (flags
& NDR_OUT
) {
23013 ndr_print_struct(ndr
, "out", "spoolss_AddPrintProcessor");
23015 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23021 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrintProcessors(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrintProcessors
*r
)
23023 if (flags
& NDR_IN
) {
23024 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
23025 if (r
->in
.servername
) {
23026 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
23027 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
23028 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
23029 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
23031 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.environment
));
23032 if (r
->in
.environment
) {
23033 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
23034 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
23035 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
23036 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.environment
, ndr_charset_length(r
->in
.environment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
23038 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
23039 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
23040 if (r
->in
.buffer
) {
23041 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
23043 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
23045 if (flags
& NDR_OUT
) {
23046 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
23048 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
23050 if (r
->out
.needed
== NULL
) {
23051 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23053 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
23054 if (r
->out
.count
== NULL
) {
23055 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23057 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
23058 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23060 return NDR_ERR_SUCCESS
;
23063 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrintProcessors(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrintProcessors
*r
)
23065 uint32_t _ptr_servername
;
23066 uint32_t _ptr_environment
;
23067 uint32_t _ptr_buffer
;
23068 uint32_t _ptr_info
;
23069 TALLOC_CTX
*_mem_save_servername_0
;
23070 TALLOC_CTX
*_mem_save_environment_0
;
23071 TALLOC_CTX
*_mem_save_buffer_0
;
23072 TALLOC_CTX
*_mem_save_info_0
;
23073 TALLOC_CTX
*_mem_save_needed_0
;
23074 TALLOC_CTX
*_mem_save_count_0
;
23075 if (flags
& NDR_IN
) {
23076 ZERO_STRUCT(r
->out
);
23078 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
23079 if (_ptr_servername
) {
23080 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
23082 r
->in
.servername
= NULL
;
23084 if (r
->in
.servername
) {
23085 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23086 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
23087 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
23088 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
23089 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
23090 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
));
23092 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
23093 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
23094 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
23096 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
23097 if (_ptr_environment
) {
23098 NDR_PULL_ALLOC(ndr
, r
->in
.environment
);
23100 r
->in
.environment
= NULL
;
23102 if (r
->in
.environment
) {
23103 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23104 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.environment
, 0);
23105 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.environment
));
23106 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.environment
));
23107 if (ndr_get_array_length(ndr
, &r
->in
.environment
) > ndr_get_array_size(ndr
, &r
->in
.environment
)) {
23108 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
));
23110 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t)));
23111 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.environment
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t), CH_UTF16
));
23112 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
23114 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
23115 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
23117 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
23119 r
->in
.buffer
= NULL
;
23121 if (r
->in
.buffer
) {
23122 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23123 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
23124 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
23125 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
23127 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
23128 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
23129 ZERO_STRUCTP(r
->out
.needed
);
23130 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
23131 ZERO_STRUCTP(r
->out
.count
);
23133 if (flags
& NDR_OUT
) {
23134 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
23136 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
23138 r
->out
.info
= NULL
;
23141 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23142 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
23143 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
23144 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
23146 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23147 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
23149 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23150 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
23151 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
23152 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
23153 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23154 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
23156 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23157 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
23158 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
23159 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
23160 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23162 return NDR_ERR_SUCCESS
;
23165 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrintProcessors(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrintProcessors
*r
)
23167 uint32_t cntr_info_0
;
23168 if (flags
& NDR_IN
) {
23169 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
23170 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
23172 if (flags
& NDR_OUT
) {
23173 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
23174 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
23175 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
23177 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
23178 NDR_CHECK(ndr_push_spoolss_PrintProcessorInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
23181 return NDR_ERR_SUCCESS
;
23184 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrintProcessors(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrintProcessors
*r
)
23186 uint32_t cntr_info_0
;
23187 TALLOC_CTX
*_mem_save_info_0
;
23188 if (flags
& NDR_IN
) {
23189 ZERO_STRUCT(r
->out
);
23191 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
23192 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
23194 if (flags
& NDR_OUT
) {
23195 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
23196 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23197 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
23198 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
23199 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
23200 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
23202 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
23203 NDR_CHECK(ndr_pull_spoolss_PrintProcessorInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
23205 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
23207 return NDR_ERR_SUCCESS
;
23210 _PUBLIC_
void ndr_print_spoolss_EnumPrintProcessors(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrintProcessors
*r
)
23212 uint32_t cntr_info_2
;
23213 ndr_print_struct(ndr
, name
, "spoolss_EnumPrintProcessors");
23215 if (flags
& NDR_SET_VALUES
) {
23216 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23218 if (flags
& NDR_IN
) {
23219 ndr_print_struct(ndr
, "in", "spoolss_EnumPrintProcessors");
23221 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
23223 if (r
->in
.servername
) {
23224 ndr_print_string(ndr
, "servername", r
->in
.servername
);
23227 ndr_print_ptr(ndr
, "environment", r
->in
.environment
);
23229 if (r
->in
.environment
) {
23230 ndr_print_string(ndr
, "environment", r
->in
.environment
);
23233 ndr_print_uint32(ndr
, "level", r
->in
.level
);
23234 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
23236 if (r
->in
.buffer
) {
23237 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
23240 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
23243 if (flags
& NDR_OUT
) {
23244 ndr_print_struct(ndr
, "out", "spoolss_EnumPrintProcessors");
23246 ndr_print_ptr(ndr
, "count", r
->out
.count
);
23248 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
23250 ndr_print_ptr(ndr
, "info", r
->out
.info
);
23252 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
23254 if (*r
->out
.info
) {
23255 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
23257 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
23259 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
23260 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
23261 ndr_print_spoolss_PrintProcessorInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
23269 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
23271 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
23273 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23279 static enum ndr_err_code
ndr_push_spoolss_GetPrintProcessorDirectory(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrintProcessorDirectory
*r
)
23281 if (flags
& NDR_IN
) {
23282 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
23283 if (r
->in
.server
) {
23284 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
23285 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
23286 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
23287 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
23289 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.environment
));
23290 if (r
->in
.environment
) {
23291 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
23292 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
23293 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.environment
, CH_UTF16
)));
23294 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.environment
, ndr_charset_length(r
->in
.environment
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
23296 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
23297 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
23298 if (r
->in
.buffer
) {
23299 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
23301 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
23303 if (flags
& NDR_OUT
) {
23304 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
23307 struct ndr_push
*_ndr_info
;
23308 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
23309 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
23310 NDR_CHECK(ndr_push_spoolss_PrintProcessorDirectoryInfo(_ndr_info
, NDR_SCALARS
, r
->out
.info
));
23311 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
23314 if (r
->out
.needed
== NULL
) {
23315 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23317 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
23318 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23320 return NDR_ERR_SUCCESS
;
23323 static enum ndr_err_code
ndr_pull_spoolss_GetPrintProcessorDirectory(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrintProcessorDirectory
*r
)
23325 uint32_t _ptr_server
;
23326 uint32_t _ptr_environment
;
23327 uint32_t _ptr_buffer
;
23328 uint32_t _ptr_info
;
23329 TALLOC_CTX
*_mem_save_server_0
;
23330 TALLOC_CTX
*_mem_save_environment_0
;
23331 TALLOC_CTX
*_mem_save_buffer_0
;
23332 TALLOC_CTX
*_mem_save_info_0
;
23333 TALLOC_CTX
*_mem_save_needed_0
;
23334 if (flags
& NDR_IN
) {
23335 ZERO_STRUCT(r
->out
);
23337 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
23339 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
23341 r
->in
.server
= NULL
;
23343 if (r
->in
.server
) {
23344 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23345 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
23346 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
23347 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
23348 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
23349 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
));
23351 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
23352 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
23353 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
23355 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_environment
));
23356 if (_ptr_environment
) {
23357 NDR_PULL_ALLOC(ndr
, r
->in
.environment
);
23359 r
->in
.environment
= NULL
;
23361 if (r
->in
.environment
) {
23362 _mem_save_environment_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23363 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.environment
, 0);
23364 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.environment
));
23365 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.environment
));
23366 if (ndr_get_array_length(ndr
, &r
->in
.environment
) > ndr_get_array_size(ndr
, &r
->in
.environment
)) {
23367 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
));
23369 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t)));
23370 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.environment
, ndr_get_array_length(ndr
, &r
->in
.environment
), sizeof(uint16_t), CH_UTF16
));
23371 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_environment_0
, 0);
23373 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
23374 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
23376 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
23378 r
->in
.buffer
= NULL
;
23380 if (r
->in
.buffer
) {
23381 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23382 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
23383 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
23384 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
23386 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
23387 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
23388 ZERO_STRUCTP(r
->out
.needed
);
23390 if (flags
& NDR_OUT
) {
23391 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
23393 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
23395 r
->out
.info
= NULL
;
23398 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23399 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
23401 struct ndr_pull
*_ndr_info
;
23402 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
23403 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
23404 NDR_CHECK(ndr_pull_spoolss_PrintProcessorDirectoryInfo(_ndr_info
, NDR_SCALARS
, r
->out
.info
));
23405 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
23407 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
23409 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23410 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
23412 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23413 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
23414 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
23415 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
23416 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23418 return NDR_ERR_SUCCESS
;
23421 _PUBLIC_
void ndr_print_spoolss_GetPrintProcessorDirectory(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrintProcessorDirectory
*r
)
23423 ndr_print_struct(ndr
, name
, "spoolss_GetPrintProcessorDirectory");
23425 if (flags
& NDR_SET_VALUES
) {
23426 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23428 if (flags
& NDR_IN
) {
23429 ndr_print_struct(ndr
, "in", "spoolss_GetPrintProcessorDirectory");
23431 ndr_print_ptr(ndr
, "server", r
->in
.server
);
23433 if (r
->in
.server
) {
23434 ndr_print_string(ndr
, "server", r
->in
.server
);
23437 ndr_print_ptr(ndr
, "environment", r
->in
.environment
);
23439 if (r
->in
.environment
) {
23440 ndr_print_string(ndr
, "environment", r
->in
.environment
);
23443 ndr_print_uint32(ndr
, "level", r
->in
.level
);
23444 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
23446 if (r
->in
.buffer
) {
23447 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
23450 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
23453 if (flags
& NDR_OUT
) {
23454 ndr_print_struct(ndr
, "out", "spoolss_GetPrintProcessorDirectory");
23456 ndr_print_ptr(ndr
, "info", r
->out
.info
);
23459 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
23460 ndr_print_spoolss_PrintProcessorDirectoryInfo(ndr
, "info", r
->out
.info
);
23463 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
23465 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
23467 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23473 static enum ndr_err_code
ndr_push_spoolss_StartDocPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_StartDocPrinter
*r
)
23475 if (flags
& NDR_IN
) {
23476 if (r
->in
.handle
== NULL
) {
23477 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23479 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23480 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
23481 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
23482 NDR_CHECK(ndr_push_spoolss_DocumentInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
23484 if (flags
& NDR_OUT
) {
23485 if (r
->out
.job_id
== NULL
) {
23486 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23488 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.job_id
));
23489 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23491 return NDR_ERR_SUCCESS
;
23494 static enum ndr_err_code
ndr_pull_spoolss_StartDocPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_StartDocPrinter
*r
)
23496 TALLOC_CTX
*_mem_save_handle_0
;
23497 TALLOC_CTX
*_mem_save_job_id_0
;
23498 if (flags
& NDR_IN
) {
23499 ZERO_STRUCT(r
->out
);
23501 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23502 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
23504 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23505 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
23506 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23507 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
23508 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
23509 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
23510 NDR_CHECK(ndr_pull_spoolss_DocumentInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
23511 NDR_PULL_ALLOC(ndr
, r
->out
.job_id
);
23512 ZERO_STRUCTP(r
->out
.job_id
);
23514 if (flags
& NDR_OUT
) {
23515 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23516 NDR_PULL_ALLOC(ndr
, r
->out
.job_id
);
23518 _mem_save_job_id_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23519 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.job_id
, LIBNDR_FLAG_REF_ALLOC
);
23520 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.job_id
));
23521 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_job_id_0
, LIBNDR_FLAG_REF_ALLOC
);
23522 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23524 return NDR_ERR_SUCCESS
;
23527 _PUBLIC_
void ndr_print_spoolss_StartDocPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_StartDocPrinter
*r
)
23529 ndr_print_struct(ndr
, name
, "spoolss_StartDocPrinter");
23531 if (flags
& NDR_SET_VALUES
) {
23532 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23534 if (flags
& NDR_IN
) {
23535 ndr_print_struct(ndr
, "in", "spoolss_StartDocPrinter");
23537 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
23539 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
23541 ndr_print_uint32(ndr
, "level", r
->in
.level
);
23542 ndr_print_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
);
23543 ndr_print_spoolss_DocumentInfo(ndr
, "info", &r
->in
.info
);
23546 if (flags
& NDR_OUT
) {
23547 ndr_print_struct(ndr
, "out", "spoolss_StartDocPrinter");
23549 ndr_print_ptr(ndr
, "job_id", r
->out
.job_id
);
23551 ndr_print_uint32(ndr
, "job_id", *r
->out
.job_id
);
23553 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23559 static enum ndr_err_code
ndr_push_spoolss_StartPagePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_StartPagePrinter
*r
)
23561 if (flags
& NDR_IN
) {
23562 if (r
->in
.handle
== NULL
) {
23563 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23565 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23567 if (flags
& NDR_OUT
) {
23568 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23570 return NDR_ERR_SUCCESS
;
23573 static enum ndr_err_code
ndr_pull_spoolss_StartPagePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_StartPagePrinter
*r
)
23575 TALLOC_CTX
*_mem_save_handle_0
;
23576 if (flags
& NDR_IN
) {
23577 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23578 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
23580 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23581 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
23582 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23583 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
23585 if (flags
& NDR_OUT
) {
23586 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23588 return NDR_ERR_SUCCESS
;
23591 _PUBLIC_
void ndr_print_spoolss_StartPagePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_StartPagePrinter
*r
)
23593 ndr_print_struct(ndr
, name
, "spoolss_StartPagePrinter");
23595 if (flags
& NDR_SET_VALUES
) {
23596 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23598 if (flags
& NDR_IN
) {
23599 ndr_print_struct(ndr
, "in", "spoolss_StartPagePrinter");
23601 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
23603 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
23607 if (flags
& NDR_OUT
) {
23608 ndr_print_struct(ndr
, "out", "spoolss_StartPagePrinter");
23610 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23616 static enum ndr_err_code
ndr_push_spoolss_WritePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_WritePrinter
*r
)
23618 if (flags
& NDR_IN
) {
23619 if (r
->in
.handle
== NULL
) {
23620 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23622 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23623 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.data
));
23624 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data
.length
));
23626 if (flags
& NDR_OUT
) {
23627 if (r
->out
.num_written
== NULL
) {
23628 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23630 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.num_written
));
23631 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23633 return NDR_ERR_SUCCESS
;
23636 static enum ndr_err_code
ndr_pull_spoolss_WritePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_WritePrinter
*r
)
23638 TALLOC_CTX
*_mem_save_handle_0
;
23639 TALLOC_CTX
*_mem_save_num_written_0
;
23640 if (flags
& NDR_IN
) {
23641 ZERO_STRUCT(r
->out
);
23643 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23644 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
23646 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23647 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
23648 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23649 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
23650 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->in
.data
));
23651 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
._data_size
));
23652 NDR_PULL_ALLOC(ndr
, r
->out
.num_written
);
23653 ZERO_STRUCTP(r
->out
.num_written
);
23655 if (flags
& NDR_OUT
) {
23656 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23657 NDR_PULL_ALLOC(ndr
, r
->out
.num_written
);
23659 _mem_save_num_written_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23660 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.num_written
, LIBNDR_FLAG_REF_ALLOC
);
23661 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.num_written
));
23662 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_num_written_0
, LIBNDR_FLAG_REF_ALLOC
);
23663 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23665 return NDR_ERR_SUCCESS
;
23668 _PUBLIC_
void ndr_print_spoolss_WritePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_WritePrinter
*r
)
23670 ndr_print_struct(ndr
, name
, "spoolss_WritePrinter");
23672 if (flags
& NDR_SET_VALUES
) {
23673 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23675 if (flags
& NDR_IN
) {
23676 ndr_print_struct(ndr
, "in", "spoolss_WritePrinter");
23678 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
23680 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
23682 ndr_print_DATA_BLOB(ndr
, "data", r
->in
.data
);
23683 ndr_print_uint32(ndr
, "_data_size", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->in
.data
.length
:r
->in
._data_size
);
23686 if (flags
& NDR_OUT
) {
23687 ndr_print_struct(ndr
, "out", "spoolss_WritePrinter");
23689 ndr_print_ptr(ndr
, "num_written", r
->out
.num_written
);
23691 ndr_print_uint32(ndr
, "num_written", *r
->out
.num_written
);
23693 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23699 static enum ndr_err_code
ndr_push_spoolss_EndPagePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_EndPagePrinter
*r
)
23701 if (flags
& NDR_IN
) {
23702 if (r
->in
.handle
== NULL
) {
23703 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23705 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23707 if (flags
& NDR_OUT
) {
23708 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23710 return NDR_ERR_SUCCESS
;
23713 static enum ndr_err_code
ndr_pull_spoolss_EndPagePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_EndPagePrinter
*r
)
23715 TALLOC_CTX
*_mem_save_handle_0
;
23716 if (flags
& NDR_IN
) {
23717 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23718 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
23720 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23721 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
23722 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23723 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
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_EndPagePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EndPagePrinter
*r
)
23733 ndr_print_struct(ndr
, name
, "spoolss_EndPagePrinter");
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_EndPagePrinter");
23741 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
23743 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
23747 if (flags
& NDR_OUT
) {
23748 ndr_print_struct(ndr
, "out", "spoolss_EndPagePrinter");
23750 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23756 static enum ndr_err_code
ndr_push_spoolss_AbortPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_AbortPrinter
*r
)
23758 if (flags
& NDR_IN
) {
23759 if (r
->in
.handle
== NULL
) {
23760 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23762 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23764 if (flags
& NDR_OUT
) {
23765 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23767 return NDR_ERR_SUCCESS
;
23770 static enum ndr_err_code
ndr_pull_spoolss_AbortPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_AbortPrinter
*r
)
23772 TALLOC_CTX
*_mem_save_handle_0
;
23773 if (flags
& NDR_IN
) {
23774 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23775 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
23777 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23778 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
23779 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23780 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
23782 if (flags
& NDR_OUT
) {
23783 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23785 return NDR_ERR_SUCCESS
;
23788 _PUBLIC_
void ndr_print_spoolss_AbortPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AbortPrinter
*r
)
23790 ndr_print_struct(ndr
, name
, "spoolss_AbortPrinter");
23792 if (flags
& NDR_SET_VALUES
) {
23793 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23795 if (flags
& NDR_IN
) {
23796 ndr_print_struct(ndr
, "in", "spoolss_AbortPrinter");
23798 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
23800 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
23804 if (flags
& NDR_OUT
) {
23805 ndr_print_struct(ndr
, "out", "spoolss_AbortPrinter");
23807 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23813 static enum ndr_err_code
ndr_push_spoolss_ReadPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ReadPrinter
*r
)
23815 if (flags
& NDR_IN
) {
23816 if (r
->in
.handle
== NULL
) {
23817 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23819 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23820 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_size
));
23822 if (flags
& NDR_OUT
) {
23823 if (r
->out
.data
== NULL
) {
23824 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23826 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.data_size
));
23827 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.data_size
));
23828 if (r
->out
._data_size
== NULL
) {
23829 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23831 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
._data_size
));
23832 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23834 return NDR_ERR_SUCCESS
;
23837 static enum ndr_err_code
ndr_pull_spoolss_ReadPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ReadPrinter
*r
)
23839 TALLOC_CTX
*_mem_save_handle_0
;
23840 TALLOC_CTX
*_mem_save__data_size_0
;
23841 if (flags
& NDR_IN
) {
23842 ZERO_STRUCT(r
->out
);
23844 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23845 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
23847 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23848 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
23849 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23850 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
23851 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.data_size
));
23852 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.data_size
);
23853 memset(r
->out
.data
, 0, (r
->in
.data_size
) * sizeof(*r
->out
.data
));
23854 NDR_PULL_ALLOC(ndr
, r
->out
._data_size
);
23855 ZERO_STRUCTP(r
->out
._data_size
);
23857 if (flags
& NDR_OUT
) {
23858 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
23859 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23860 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
23862 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
)));
23863 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23864 NDR_PULL_ALLOC(ndr
, r
->out
._data_size
);
23866 _mem_save__data_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23867 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
._data_size
, LIBNDR_FLAG_REF_ALLOC
);
23868 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
._data_size
));
23869 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save__data_size_0
, LIBNDR_FLAG_REF_ALLOC
);
23870 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23872 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.data_size
));
23875 return NDR_ERR_SUCCESS
;
23878 _PUBLIC_
void ndr_print_spoolss_ReadPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ReadPrinter
*r
)
23880 ndr_print_struct(ndr
, name
, "spoolss_ReadPrinter");
23882 if (flags
& NDR_SET_VALUES
) {
23883 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23885 if (flags
& NDR_IN
) {
23886 ndr_print_struct(ndr
, "in", "spoolss_ReadPrinter");
23888 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
23890 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
23892 ndr_print_uint32(ndr
, "data_size", r
->in
.data_size
);
23895 if (flags
& NDR_OUT
) {
23896 ndr_print_struct(ndr
, "out", "spoolss_ReadPrinter");
23898 ndr_print_ptr(ndr
, "data", r
->out
.data
);
23900 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.data_size
);
23902 ndr_print_ptr(ndr
, "_data_size", r
->out
._data_size
);
23904 ndr_print_uint32(ndr
, "_data_size", *r
->out
._data_size
);
23906 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23912 static enum ndr_err_code
ndr_push_spoolss_EndDocPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_EndDocPrinter
*r
)
23914 if (flags
& NDR_IN
) {
23915 if (r
->in
.handle
== NULL
) {
23916 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23918 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23920 if (flags
& NDR_OUT
) {
23921 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23923 return NDR_ERR_SUCCESS
;
23926 static enum ndr_err_code
ndr_pull_spoolss_EndDocPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_EndDocPrinter
*r
)
23928 TALLOC_CTX
*_mem_save_handle_0
;
23929 if (flags
& NDR_IN
) {
23930 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
23931 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
23933 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
23934 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
23935 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23936 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
23938 if (flags
& NDR_OUT
) {
23939 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
23941 return NDR_ERR_SUCCESS
;
23944 _PUBLIC_
void ndr_print_spoolss_EndDocPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EndDocPrinter
*r
)
23946 ndr_print_struct(ndr
, name
, "spoolss_EndDocPrinter");
23948 if (flags
& NDR_SET_VALUES
) {
23949 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
23951 if (flags
& NDR_IN
) {
23952 ndr_print_struct(ndr
, "in", "spoolss_EndDocPrinter");
23954 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
23956 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
23960 if (flags
& NDR_OUT
) {
23961 ndr_print_struct(ndr
, "out", "spoolss_EndDocPrinter");
23963 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
23969 static enum ndr_err_code
ndr_push_spoolss_AddJob(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddJob
*r
)
23971 if (flags
& NDR_IN
) {
23972 if (r
->in
.handle
== NULL
) {
23973 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23975 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
23976 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
23977 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
23978 if (r
->in
.buffer
) {
23979 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
23980 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, r
->in
.offered
));
23982 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
23984 if (flags
& NDR_OUT
) {
23985 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.buffer
));
23986 if (r
->out
.buffer
) {
23987 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
23988 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, r
->in
.offered
));
23990 if (r
->out
.needed
== NULL
) {
23991 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
23993 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
23994 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
23996 return NDR_ERR_SUCCESS
;
23999 static enum ndr_err_code
ndr_pull_spoolss_AddJob(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddJob
*r
)
24001 uint32_t _ptr_buffer
;
24002 TALLOC_CTX
*_mem_save_handle_0
;
24003 TALLOC_CTX
*_mem_save_buffer_0
;
24004 TALLOC_CTX
*_mem_save_needed_0
;
24005 if (flags
& NDR_IN
) {
24006 ZERO_STRUCT(r
->out
);
24008 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24009 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24011 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24012 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24013 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24014 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24015 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
24016 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
24018 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
24020 r
->in
.buffer
= NULL
;
24022 if (r
->in
.buffer
) {
24023 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24024 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
24025 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
24026 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
24027 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
)));
24028 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
24030 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
24031 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24032 ZERO_STRUCTP(r
->out
.needed
);
24033 if (r
->in
.buffer
) {
24034 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, r
->in
.offered
));
24037 if (flags
& NDR_OUT
) {
24038 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
24040 NDR_PULL_ALLOC(ndr
, r
->out
.buffer
);
24042 r
->out
.buffer
= NULL
;
24044 if (r
->out
.buffer
) {
24045 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24046 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.buffer
, 0);
24047 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.buffer
));
24048 NDR_PULL_ALLOC_N(ndr
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
));
24049 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.buffer
, ndr_get_array_size(ndr
, &r
->out
.buffer
)));
24050 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
24052 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24053 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24055 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24056 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
24057 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
24058 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
24059 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24060 if (r
->out
.buffer
) {
24061 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.buffer
, r
->in
.offered
));
24064 return NDR_ERR_SUCCESS
;
24067 _PUBLIC_
void ndr_print_spoolss_AddJob(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddJob
*r
)
24069 ndr_print_struct(ndr
, name
, "spoolss_AddJob");
24071 if (flags
& NDR_SET_VALUES
) {
24072 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24074 if (flags
& NDR_IN
) {
24075 ndr_print_struct(ndr
, "in", "spoolss_AddJob");
24077 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24079 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24081 ndr_print_uint32(ndr
, "level", r
->in
.level
);
24082 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
24084 if (r
->in
.buffer
) {
24085 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, r
->in
.offered
);
24088 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
24091 if (flags
& NDR_OUT
) {
24092 ndr_print_struct(ndr
, "out", "spoolss_AddJob");
24094 ndr_print_ptr(ndr
, "buffer", r
->out
.buffer
);
24096 if (r
->out
.buffer
) {
24097 ndr_print_array_uint8(ndr
, "buffer", r
->out
.buffer
, r
->in
.offered
);
24100 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
24102 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
24104 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24110 static enum ndr_err_code
ndr_push_spoolss_ScheduleJob(struct ndr_push
*ndr
, int flags
, const struct spoolss_ScheduleJob
*r
)
24112 if (flags
& NDR_IN
) {
24113 if (r
->in
.handle
== NULL
) {
24114 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24116 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24117 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.jobid
));
24119 if (flags
& NDR_OUT
) {
24120 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24122 return NDR_ERR_SUCCESS
;
24125 static enum ndr_err_code
ndr_pull_spoolss_ScheduleJob(struct ndr_pull
*ndr
, int flags
, struct spoolss_ScheduleJob
*r
)
24127 TALLOC_CTX
*_mem_save_handle_0
;
24128 if (flags
& NDR_IN
) {
24129 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24130 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24132 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24133 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24134 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24135 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24136 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.jobid
));
24138 if (flags
& NDR_OUT
) {
24139 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24141 return NDR_ERR_SUCCESS
;
24144 _PUBLIC_
void ndr_print_spoolss_ScheduleJob(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ScheduleJob
*r
)
24146 ndr_print_struct(ndr
, name
, "spoolss_ScheduleJob");
24148 if (flags
& NDR_SET_VALUES
) {
24149 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24151 if (flags
& NDR_IN
) {
24152 ndr_print_struct(ndr
, "in", "spoolss_ScheduleJob");
24154 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24156 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24158 ndr_print_uint32(ndr
, "jobid", r
->in
.jobid
);
24161 if (flags
& NDR_OUT
) {
24162 ndr_print_struct(ndr
, "out", "spoolss_ScheduleJob");
24164 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24170 static enum ndr_err_code
ndr_push_spoolss_GetPrinterData(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterData
*r
)
24172 if (flags
& NDR_IN
) {
24173 if (r
->in
.handle
== NULL
) {
24174 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24176 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24177 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
24178 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
24179 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
24180 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
));
24181 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
24183 if (flags
& NDR_OUT
) {
24184 if (r
->out
.type
== NULL
) {
24185 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24187 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->out
.type
));
24188 if (r
->out
.data
== NULL
) {
24189 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24191 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
24192 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.offered
));
24193 if (r
->out
.needed
== NULL
) {
24194 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24196 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
24197 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24199 return NDR_ERR_SUCCESS
;
24202 static enum ndr_err_code
ndr_pull_spoolss_GetPrinterData(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterData
*r
)
24204 TALLOC_CTX
*_mem_save_handle_0
;
24205 TALLOC_CTX
*_mem_save_type_0
;
24206 TALLOC_CTX
*_mem_save_needed_0
;
24207 if (flags
& NDR_IN
) {
24208 ZERO_STRUCT(r
->out
);
24210 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24211 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24213 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24214 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24215 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24216 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24217 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
24218 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
24219 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
24220 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
));
24222 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
24223 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
));
24224 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
24225 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
24226 ZERO_STRUCTP(r
->out
.type
);
24227 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.offered
);
24228 memset(r
->out
.data
, 0, (r
->in
.offered
) * sizeof(*r
->out
.data
));
24229 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24230 ZERO_STRUCTP(r
->out
.needed
);
24232 if (flags
& NDR_OUT
) {
24233 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24234 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
24236 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24237 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.type
, LIBNDR_FLAG_REF_ALLOC
);
24238 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->out
.type
));
24239 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, LIBNDR_FLAG_REF_ALLOC
);
24240 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
24241 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24242 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
24244 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
)));
24245 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24246 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24248 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24249 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
24250 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
24251 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
24252 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24254 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.offered
));
24257 return NDR_ERR_SUCCESS
;
24260 _PUBLIC_
void ndr_print_spoolss_GetPrinterData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterData
*r
)
24262 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterData");
24264 if (flags
& NDR_SET_VALUES
) {
24265 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24267 if (flags
& NDR_IN
) {
24268 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterData");
24270 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24272 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24274 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
24275 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
24278 if (flags
& NDR_OUT
) {
24279 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterData");
24281 ndr_print_ptr(ndr
, "type", r
->out
.type
);
24283 ndr_print_winreg_Type(ndr
, "type", *r
->out
.type
);
24285 ndr_print_ptr(ndr
, "data", r
->out
.data
);
24287 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.offered
);
24289 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
24291 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
24293 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24299 static enum ndr_err_code
ndr_push_spoolss_SetPrinterData(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetPrinterData
*r
)
24301 if (flags
& NDR_IN
) {
24302 if (r
->in
.handle
== NULL
) {
24303 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24305 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24306 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
24307 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
24308 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
24309 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
));
24310 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
24311 if (r
->in
.data
== NULL
) {
24312 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24314 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
24315 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, r
->in
.offered
));
24316 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
24318 if (flags
& NDR_OUT
) {
24319 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24321 return NDR_ERR_SUCCESS
;
24324 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterData(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetPrinterData
*r
)
24326 TALLOC_CTX
*_mem_save_handle_0
;
24327 if (flags
& NDR_IN
) {
24328 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24329 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24331 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24332 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24333 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24334 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24335 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
24336 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
24337 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
24338 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
));
24340 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
24341 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
));
24342 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->in
.type
));
24343 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data
));
24344 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24345 NDR_PULL_ALLOC_N(ndr
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
));
24347 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
)));
24348 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
24350 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.data
, r
->in
.offered
));
24353 if (flags
& NDR_OUT
) {
24354 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24356 return NDR_ERR_SUCCESS
;
24359 _PUBLIC_
void ndr_print_spoolss_SetPrinterData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetPrinterData
*r
)
24361 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterData");
24363 if (flags
& NDR_SET_VALUES
) {
24364 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24366 if (flags
& NDR_IN
) {
24367 ndr_print_struct(ndr
, "in", "spoolss_SetPrinterData");
24369 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24371 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24373 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
24374 ndr_print_winreg_Type(ndr
, "type", r
->in
.type
);
24375 ndr_print_ptr(ndr
, "data", r
->in
.data
);
24377 ndr_print_array_uint8(ndr
, "data", r
->in
.data
, r
->in
.offered
);
24379 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
24382 if (flags
& NDR_OUT
) {
24383 ndr_print_struct(ndr
, "out", "spoolss_SetPrinterData");
24385 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24391 static enum ndr_err_code
ndr_push_spoolss_WaitForPrinterChange(struct ndr_push
*ndr
, int flags
, const struct spoolss_WaitForPrinterChange
*r
)
24393 if (flags
& NDR_IN
) {
24395 if (flags
& NDR_OUT
) {
24396 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24398 return NDR_ERR_SUCCESS
;
24401 static enum ndr_err_code
ndr_pull_spoolss_WaitForPrinterChange(struct ndr_pull
*ndr
, int flags
, struct spoolss_WaitForPrinterChange
*r
)
24403 if (flags
& NDR_IN
) {
24405 if (flags
& NDR_OUT
) {
24406 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24408 return NDR_ERR_SUCCESS
;
24411 _PUBLIC_
void ndr_print_spoolss_WaitForPrinterChange(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_WaitForPrinterChange
*r
)
24413 ndr_print_struct(ndr
, name
, "spoolss_WaitForPrinterChange");
24415 if (flags
& NDR_SET_VALUES
) {
24416 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24418 if (flags
& NDR_IN
) {
24419 ndr_print_struct(ndr
, "in", "spoolss_WaitForPrinterChange");
24423 if (flags
& NDR_OUT
) {
24424 ndr_print_struct(ndr
, "out", "spoolss_WaitForPrinterChange");
24426 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24432 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_ClosePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ClosePrinter
*r
)
24434 if (flags
& NDR_IN
) {
24435 if (r
->in
.handle
== NULL
) {
24436 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24438 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24440 if (flags
& NDR_OUT
) {
24441 if (r
->out
.handle
== NULL
) {
24442 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24444 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
24445 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24447 return NDR_ERR_SUCCESS
;
24450 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_ClosePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ClosePrinter
*r
)
24452 TALLOC_CTX
*_mem_save_handle_0
;
24453 if (flags
& NDR_IN
) {
24454 ZERO_STRUCT(r
->out
);
24456 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24457 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24459 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24460 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24461 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24462 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24463 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
24464 *r
->out
.handle
= *r
->in
.handle
;
24466 if (flags
& NDR_OUT
) {
24467 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24468 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
24470 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24471 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24472 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
24473 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24474 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24476 return NDR_ERR_SUCCESS
;
24479 _PUBLIC_
void ndr_print_spoolss_ClosePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ClosePrinter
*r
)
24481 ndr_print_struct(ndr
, name
, "spoolss_ClosePrinter");
24483 if (flags
& NDR_SET_VALUES
) {
24484 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24486 if (flags
& NDR_IN
) {
24487 ndr_print_struct(ndr
, "in", "spoolss_ClosePrinter");
24489 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24491 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24495 if (flags
& NDR_OUT
) {
24496 ndr_print_struct(ndr
, "out", "spoolss_ClosePrinter");
24498 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
24500 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
24502 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24508 static enum ndr_err_code
ndr_push_spoolss_AddForm(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddForm
*r
)
24510 if (flags
& NDR_IN
) {
24511 if (r
->in
.handle
== NULL
) {
24512 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24514 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24515 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
24516 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
24517 NDR_CHECK(ndr_push_spoolss_AddFormInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
24519 if (flags
& NDR_OUT
) {
24520 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24522 return NDR_ERR_SUCCESS
;
24525 static enum ndr_err_code
ndr_pull_spoolss_AddForm(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddForm
*r
)
24527 TALLOC_CTX
*_mem_save_handle_0
;
24528 if (flags
& NDR_IN
) {
24529 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24530 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24532 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24533 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24534 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24535 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24536 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
24537 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
24538 NDR_CHECK(ndr_pull_spoolss_AddFormInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
24540 if (flags
& NDR_OUT
) {
24541 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24543 return NDR_ERR_SUCCESS
;
24546 _PUBLIC_
void ndr_print_spoolss_AddForm(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddForm
*r
)
24548 ndr_print_struct(ndr
, name
, "spoolss_AddForm");
24550 if (flags
& NDR_SET_VALUES
) {
24551 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24553 if (flags
& NDR_IN
) {
24554 ndr_print_struct(ndr
, "in", "spoolss_AddForm");
24556 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24558 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24560 ndr_print_uint32(ndr
, "level", r
->in
.level
);
24561 ndr_print_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
);
24562 ndr_print_spoolss_AddFormInfo(ndr
, "info", &r
->in
.info
);
24565 if (flags
& NDR_OUT
) {
24566 ndr_print_struct(ndr
, "out", "spoolss_AddForm");
24568 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24574 static enum ndr_err_code
ndr_push_spoolss_DeleteForm(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeleteForm
*r
)
24576 if (flags
& NDR_IN
) {
24577 if (r
->in
.handle
== NULL
) {
24578 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24580 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24581 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
24582 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
24583 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
24584 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
));
24586 if (flags
& NDR_OUT
) {
24587 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24589 return NDR_ERR_SUCCESS
;
24592 static enum ndr_err_code
ndr_pull_spoolss_DeleteForm(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeleteForm
*r
)
24594 TALLOC_CTX
*_mem_save_handle_0
;
24595 if (flags
& NDR_IN
) {
24596 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24597 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24599 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24600 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24601 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24602 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24603 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.form_name
));
24604 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.form_name
));
24605 if (ndr_get_array_length(ndr
, &r
->in
.form_name
) > ndr_get_array_size(ndr
, &r
->in
.form_name
)) {
24606 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
));
24608 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.form_name
), sizeof(uint16_t)));
24609 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
));
24611 if (flags
& NDR_OUT
) {
24612 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24614 return NDR_ERR_SUCCESS
;
24617 _PUBLIC_
void ndr_print_spoolss_DeleteForm(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeleteForm
*r
)
24619 ndr_print_struct(ndr
, name
, "spoolss_DeleteForm");
24621 if (flags
& NDR_SET_VALUES
) {
24622 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24624 if (flags
& NDR_IN
) {
24625 ndr_print_struct(ndr
, "in", "spoolss_DeleteForm");
24627 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24629 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24631 ndr_print_string(ndr
, "form_name", r
->in
.form_name
);
24634 if (flags
& NDR_OUT
) {
24635 ndr_print_struct(ndr
, "out", "spoolss_DeleteForm");
24637 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24643 static enum ndr_err_code
ndr_push_spoolss_GetForm(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetForm
*r
)
24645 if (flags
& NDR_IN
) {
24646 if (r
->in
.handle
== NULL
) {
24647 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24649 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24650 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
24651 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
24652 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
24653 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
));
24654 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
24655 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
24656 if (r
->in
.buffer
) {
24657 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
24659 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
24661 if (flags
& NDR_OUT
) {
24662 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
24665 struct ndr_push
*_ndr_info
;
24666 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
24667 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
24668 NDR_CHECK(ndr_push_spoolss_FormInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
24669 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
24672 if (r
->out
.needed
== NULL
) {
24673 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24675 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
24676 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24678 return NDR_ERR_SUCCESS
;
24681 static enum ndr_err_code
ndr_pull_spoolss_GetForm(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetForm
*r
)
24683 uint32_t _ptr_buffer
;
24684 uint32_t _ptr_info
;
24685 TALLOC_CTX
*_mem_save_handle_0
;
24686 TALLOC_CTX
*_mem_save_buffer_0
;
24687 TALLOC_CTX
*_mem_save_info_0
;
24688 TALLOC_CTX
*_mem_save_needed_0
;
24689 if (flags
& NDR_IN
) {
24690 ZERO_STRUCT(r
->out
);
24692 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24693 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24695 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24696 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24697 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24698 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24699 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.form_name
));
24700 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.form_name
));
24701 if (ndr_get_array_length(ndr
, &r
->in
.form_name
) > ndr_get_array_size(ndr
, &r
->in
.form_name
)) {
24702 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
));
24704 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.form_name
), sizeof(uint16_t)));
24705 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
));
24706 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
24707 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
24709 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
24711 r
->in
.buffer
= NULL
;
24713 if (r
->in
.buffer
) {
24714 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24715 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
24716 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
24717 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
24719 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
24720 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24721 ZERO_STRUCTP(r
->out
.needed
);
24723 if (flags
& NDR_OUT
) {
24724 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
24726 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
24728 r
->out
.info
= NULL
;
24731 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24732 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
24734 struct ndr_pull
*_ndr_info
;
24735 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
24736 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
24737 NDR_CHECK(ndr_pull_spoolss_FormInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
24738 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
24740 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
24742 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24743 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24745 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24746 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
24747 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
24748 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
24749 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24751 return NDR_ERR_SUCCESS
;
24754 _PUBLIC_
void ndr_print_spoolss_GetForm(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetForm
*r
)
24756 ndr_print_struct(ndr
, name
, "spoolss_GetForm");
24758 if (flags
& NDR_SET_VALUES
) {
24759 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24761 if (flags
& NDR_IN
) {
24762 ndr_print_struct(ndr
, "in", "spoolss_GetForm");
24764 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24766 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24768 ndr_print_string(ndr
, "form_name", r
->in
.form_name
);
24769 ndr_print_uint32(ndr
, "level", r
->in
.level
);
24770 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
24772 if (r
->in
.buffer
) {
24773 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
24776 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
24779 if (flags
& NDR_OUT
) {
24780 ndr_print_struct(ndr
, "out", "spoolss_GetForm");
24782 ndr_print_ptr(ndr
, "info", r
->out
.info
);
24785 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
24786 ndr_print_spoolss_FormInfo(ndr
, "info", r
->out
.info
);
24789 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
24791 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
24793 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24799 static enum ndr_err_code
ndr_push_spoolss_SetForm(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetForm
*r
)
24801 if (flags
& NDR_IN
) {
24802 if (r
->in
.handle
== NULL
) {
24803 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24805 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24806 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
24807 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
24808 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.form_name
, CH_UTF16
)));
24809 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
));
24810 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
24811 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
24812 NDR_CHECK(ndr_push_spoolss_AddFormInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
24814 if (flags
& NDR_OUT
) {
24815 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24817 return NDR_ERR_SUCCESS
;
24820 static enum ndr_err_code
ndr_pull_spoolss_SetForm(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetForm
*r
)
24822 TALLOC_CTX
*_mem_save_handle_0
;
24823 if (flags
& NDR_IN
) {
24824 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24825 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24827 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24828 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24829 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24830 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24831 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.form_name
));
24832 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.form_name
));
24833 if (ndr_get_array_length(ndr
, &r
->in
.form_name
) > ndr_get_array_size(ndr
, &r
->in
.form_name
)) {
24834 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
));
24836 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.form_name
), sizeof(uint16_t)));
24837 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
));
24838 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
24839 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
));
24840 NDR_CHECK(ndr_pull_spoolss_AddFormInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
24842 if (flags
& NDR_OUT
) {
24843 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24845 return NDR_ERR_SUCCESS
;
24848 _PUBLIC_
void ndr_print_spoolss_SetForm(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetForm
*r
)
24850 ndr_print_struct(ndr
, name
, "spoolss_SetForm");
24852 if (flags
& NDR_SET_VALUES
) {
24853 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
24855 if (flags
& NDR_IN
) {
24856 ndr_print_struct(ndr
, "in", "spoolss_SetForm");
24858 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
24860 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
24862 ndr_print_string(ndr
, "form_name", r
->in
.form_name
);
24863 ndr_print_uint32(ndr
, "level", r
->in
.level
);
24864 ndr_print_set_switch_value(ndr
, &r
->in
.info
, r
->in
.level
);
24865 ndr_print_spoolss_AddFormInfo(ndr
, "info", &r
->in
.info
);
24868 if (flags
& NDR_OUT
) {
24869 ndr_print_struct(ndr
, "out", "spoolss_SetForm");
24871 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
24877 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumForms(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumForms
*r
)
24879 if (flags
& NDR_IN
) {
24880 if (r
->in
.handle
== NULL
) {
24881 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24883 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24884 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
24885 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
24886 if (r
->in
.buffer
) {
24887 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
24889 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
24891 if (flags
& NDR_OUT
) {
24892 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
24894 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
24896 if (r
->out
.needed
== NULL
) {
24897 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24899 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
24900 if (r
->out
.count
== NULL
) {
24901 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
24903 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
24904 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
24906 return NDR_ERR_SUCCESS
;
24909 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumForms(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumForms
*r
)
24911 uint32_t _ptr_buffer
;
24912 uint32_t _ptr_info
;
24913 TALLOC_CTX
*_mem_save_handle_0
;
24914 TALLOC_CTX
*_mem_save_buffer_0
;
24915 TALLOC_CTX
*_mem_save_info_0
;
24916 TALLOC_CTX
*_mem_save_needed_0
;
24917 TALLOC_CTX
*_mem_save_count_0
;
24918 if (flags
& NDR_IN
) {
24919 ZERO_STRUCT(r
->out
);
24921 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24922 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
24924 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24925 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
24926 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
24927 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
24928 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
24929 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
24931 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
24933 r
->in
.buffer
= NULL
;
24935 if (r
->in
.buffer
) {
24936 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24937 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
24938 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
24939 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
24941 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
24942 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24943 ZERO_STRUCTP(r
->out
.needed
);
24944 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
24945 ZERO_STRUCTP(r
->out
.count
);
24947 if (flags
& NDR_OUT
) {
24948 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
24950 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
24952 r
->out
.info
= NULL
;
24955 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24956 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
24957 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
24958 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
24960 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24961 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
24963 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24964 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
24965 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
24966 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
24967 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
24968 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
24970 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
24971 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
24972 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
24973 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
24974 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
24976 return NDR_ERR_SUCCESS
;
24979 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumForms(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumForms
*r
)
24981 uint32_t cntr_info_0
;
24982 if (flags
& NDR_IN
) {
24983 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
24984 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
24986 if (flags
& NDR_OUT
) {
24987 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
24988 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
24989 NDR_CHECK(ndr_push_spoolss_FormInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
24991 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
24992 NDR_CHECK(ndr_push_spoolss_FormInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
24995 return NDR_ERR_SUCCESS
;
24998 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumForms(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumForms
*r
)
25000 uint32_t cntr_info_0
;
25001 TALLOC_CTX
*_mem_save_info_0
;
25002 if (flags
& NDR_IN
) {
25003 ZERO_STRUCT(r
->out
);
25005 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
25006 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
25008 if (flags
& NDR_OUT
) {
25009 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
25010 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25011 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
25012 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25013 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
25014 NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
25016 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25017 NDR_CHECK(ndr_pull_spoolss_FormInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
25019 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
25021 return NDR_ERR_SUCCESS
;
25024 _PUBLIC_
void ndr_print_spoolss_EnumForms(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumForms
*r
)
25026 uint32_t cntr_info_2
;
25027 ndr_print_struct(ndr
, name
, "spoolss_EnumForms");
25029 if (flags
& NDR_SET_VALUES
) {
25030 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25032 if (flags
& NDR_IN
) {
25033 ndr_print_struct(ndr
, "in", "spoolss_EnumForms");
25035 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
25037 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
25039 ndr_print_uint32(ndr
, "level", r
->in
.level
);
25040 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
25042 if (r
->in
.buffer
) {
25043 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
25046 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
25049 if (flags
& NDR_OUT
) {
25050 ndr_print_struct(ndr
, "out", "spoolss_EnumForms");
25052 ndr_print_ptr(ndr
, "count", r
->out
.count
);
25054 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
25056 ndr_print_ptr(ndr
, "info", r
->out
.info
);
25058 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
25060 if (*r
->out
.info
) {
25061 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
25063 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
25065 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
25066 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
25067 ndr_print_spoolss_FormInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
25075 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
25077 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
25079 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25085 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPorts(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPorts
*r
)
25087 if (flags
& NDR_IN
) {
25088 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
25089 if (r
->in
.servername
) {
25090 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
25091 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
25092 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
25093 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
25095 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
25096 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
25097 if (r
->in
.buffer
) {
25098 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
25100 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
25102 if (flags
& NDR_OUT
) {
25103 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
25105 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
25107 if (r
->out
.needed
== NULL
) {
25108 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25110 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
25111 if (r
->out
.count
== NULL
) {
25112 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25114 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
25115 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25117 return NDR_ERR_SUCCESS
;
25120 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPorts(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPorts
*r
)
25122 uint32_t _ptr_servername
;
25123 uint32_t _ptr_buffer
;
25124 uint32_t _ptr_info
;
25125 TALLOC_CTX
*_mem_save_servername_0
;
25126 TALLOC_CTX
*_mem_save_buffer_0
;
25127 TALLOC_CTX
*_mem_save_info_0
;
25128 TALLOC_CTX
*_mem_save_needed_0
;
25129 TALLOC_CTX
*_mem_save_count_0
;
25130 if (flags
& NDR_IN
) {
25131 ZERO_STRUCT(r
->out
);
25133 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
25134 if (_ptr_servername
) {
25135 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
25137 r
->in
.servername
= NULL
;
25139 if (r
->in
.servername
) {
25140 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25141 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
25142 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
25143 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
25144 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
25145 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
));
25147 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
25148 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
25149 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
25151 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
25152 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
25154 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
25156 r
->in
.buffer
= NULL
;
25158 if (r
->in
.buffer
) {
25159 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25160 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
25161 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
25162 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
25164 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
25165 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
25166 ZERO_STRUCTP(r
->out
.needed
);
25167 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
25168 ZERO_STRUCTP(r
->out
.count
);
25170 if (flags
& NDR_OUT
) {
25171 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
25173 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
25175 r
->out
.info
= NULL
;
25178 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25179 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
25180 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
25181 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
25183 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25184 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
25186 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25187 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
25188 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
25189 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
25190 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25191 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
25193 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25194 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
25195 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
25196 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
25197 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25199 return NDR_ERR_SUCCESS
;
25202 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPorts(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPorts
*r
)
25204 uint32_t cntr_info_0
;
25205 if (flags
& NDR_IN
) {
25206 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
25207 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
25209 if (flags
& NDR_OUT
) {
25210 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25211 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
25212 NDR_CHECK(ndr_push_spoolss_PortInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
25214 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25215 NDR_CHECK(ndr_push_spoolss_PortInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
25218 return NDR_ERR_SUCCESS
;
25221 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPorts(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPorts
*r
)
25223 uint32_t cntr_info_0
;
25224 TALLOC_CTX
*_mem_save_info_0
;
25225 if (flags
& NDR_IN
) {
25226 ZERO_STRUCT(r
->out
);
25228 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
25229 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
25231 if (flags
& NDR_OUT
) {
25232 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
25233 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25234 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
25235 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25236 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
25237 NDR_CHECK(ndr_pull_spoolss_PortInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
25239 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25240 NDR_CHECK(ndr_pull_spoolss_PortInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
25242 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
25244 return NDR_ERR_SUCCESS
;
25247 _PUBLIC_
void ndr_print_spoolss_EnumPorts(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPorts
*r
)
25249 uint32_t cntr_info_2
;
25250 ndr_print_struct(ndr
, name
, "spoolss_EnumPorts");
25252 if (flags
& NDR_SET_VALUES
) {
25253 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25255 if (flags
& NDR_IN
) {
25256 ndr_print_struct(ndr
, "in", "spoolss_EnumPorts");
25258 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
25260 if (r
->in
.servername
) {
25261 ndr_print_string(ndr
, "servername", r
->in
.servername
);
25264 ndr_print_uint32(ndr
, "level", r
->in
.level
);
25265 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
25267 if (r
->in
.buffer
) {
25268 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
25271 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
25274 if (flags
& NDR_OUT
) {
25275 ndr_print_struct(ndr
, "out", "spoolss_EnumPorts");
25277 ndr_print_ptr(ndr
, "count", r
->out
.count
);
25279 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
25281 ndr_print_ptr(ndr
, "info", r
->out
.info
);
25283 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
25285 if (*r
->out
.info
) {
25286 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
25288 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
25290 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
25291 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
25292 ndr_print_spoolss_PortInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
25300 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
25302 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
25304 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25310 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumMonitors(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumMonitors
*r
)
25312 if (flags
& NDR_IN
) {
25313 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
25314 if (r
->in
.servername
) {
25315 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
25316 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
25317 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
25318 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
25320 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
25321 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
25322 if (r
->in
.buffer
) {
25323 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
25325 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
25327 if (flags
& NDR_OUT
) {
25328 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
25330 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
25332 if (r
->out
.needed
== NULL
) {
25333 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25335 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
25336 if (r
->out
.count
== NULL
) {
25337 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25339 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
25340 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25342 return NDR_ERR_SUCCESS
;
25345 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumMonitors(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumMonitors
*r
)
25347 uint32_t _ptr_servername
;
25348 uint32_t _ptr_buffer
;
25349 uint32_t _ptr_info
;
25350 TALLOC_CTX
*_mem_save_servername_0
;
25351 TALLOC_CTX
*_mem_save_buffer_0
;
25352 TALLOC_CTX
*_mem_save_info_0
;
25353 TALLOC_CTX
*_mem_save_needed_0
;
25354 TALLOC_CTX
*_mem_save_count_0
;
25355 if (flags
& NDR_IN
) {
25356 ZERO_STRUCT(r
->out
);
25358 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
25359 if (_ptr_servername
) {
25360 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
25362 r
->in
.servername
= NULL
;
25364 if (r
->in
.servername
) {
25365 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25366 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
25367 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
25368 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
25369 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
25370 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
));
25372 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
25373 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
25374 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
25376 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
25377 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
25379 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
25381 r
->in
.buffer
= NULL
;
25383 if (r
->in
.buffer
) {
25384 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25385 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
25386 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
25387 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
25389 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
25390 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
25391 ZERO_STRUCTP(r
->out
.needed
);
25392 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
25393 ZERO_STRUCTP(r
->out
.count
);
25395 if (flags
& NDR_OUT
) {
25396 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
25398 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
25400 r
->out
.info
= NULL
;
25403 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25404 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
25405 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
25406 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
25408 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25409 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
25411 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25412 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
25413 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
25414 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
25415 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25416 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
25418 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25419 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
25420 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
25421 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
25422 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25424 return NDR_ERR_SUCCESS
;
25427 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumMonitors(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumMonitors
*r
)
25429 uint32_t cntr_info_0
;
25430 if (flags
& NDR_IN
) {
25431 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
25432 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
25434 if (flags
& NDR_OUT
) {
25435 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25436 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
25437 NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
25439 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25440 NDR_CHECK(ndr_push_spoolss_MonitorInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
25443 return NDR_ERR_SUCCESS
;
25446 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumMonitors(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumMonitors
*r
)
25448 uint32_t cntr_info_0
;
25449 TALLOC_CTX
*_mem_save_info_0
;
25450 if (flags
& NDR_IN
) {
25451 ZERO_STRUCT(r
->out
);
25453 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
25454 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
25456 if (flags
& NDR_OUT
) {
25457 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
25458 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25459 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
25460 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25461 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
25462 NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
25464 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
25465 NDR_CHECK(ndr_pull_spoolss_MonitorInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
25467 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
25469 return NDR_ERR_SUCCESS
;
25472 _PUBLIC_
void ndr_print_spoolss_EnumMonitors(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumMonitors
*r
)
25474 uint32_t cntr_info_2
;
25475 ndr_print_struct(ndr
, name
, "spoolss_EnumMonitors");
25477 if (flags
& NDR_SET_VALUES
) {
25478 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25480 if (flags
& NDR_IN
) {
25481 ndr_print_struct(ndr
, "in", "spoolss_EnumMonitors");
25483 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
25485 if (r
->in
.servername
) {
25486 ndr_print_string(ndr
, "servername", r
->in
.servername
);
25489 ndr_print_uint32(ndr
, "level", r
->in
.level
);
25490 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
25492 if (r
->in
.buffer
) {
25493 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
25496 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
25499 if (flags
& NDR_OUT
) {
25500 ndr_print_struct(ndr
, "out", "spoolss_EnumMonitors");
25502 ndr_print_ptr(ndr
, "count", r
->out
.count
);
25504 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
25506 ndr_print_ptr(ndr
, "info", r
->out
.info
);
25508 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
25510 if (*r
->out
.info
) {
25511 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
25513 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
25515 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
25516 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
25517 ndr_print_spoolss_MonitorInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
25525 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
25527 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
25529 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25535 static enum ndr_err_code
ndr_push_spoolss_AddPort(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPort
*r
)
25537 if (flags
& NDR_IN
) {
25538 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server_name
));
25539 if (r
->in
.server_name
) {
25540 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
25541 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
25542 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
25543 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
));
25545 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.unknown
));
25546 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.monitor_name
, CH_UTF16
)));
25547 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
25548 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.monitor_name
, CH_UTF16
)));
25549 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
));
25551 if (flags
& NDR_OUT
) {
25552 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25554 return NDR_ERR_SUCCESS
;
25557 static enum ndr_err_code
ndr_pull_spoolss_AddPort(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPort
*r
)
25559 uint32_t _ptr_server_name
;
25560 TALLOC_CTX
*_mem_save_server_name_0
;
25561 if (flags
& NDR_IN
) {
25562 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server_name
));
25563 if (_ptr_server_name
) {
25564 NDR_PULL_ALLOC(ndr
, r
->in
.server_name
);
25566 r
->in
.server_name
= NULL
;
25568 if (r
->in
.server_name
) {
25569 _mem_save_server_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25570 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server_name
, 0);
25571 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
25572 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
25573 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
25574 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
));
25576 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
25577 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
));
25578 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_name_0
, 0);
25580 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.unknown
));
25581 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.monitor_name
));
25582 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.monitor_name
));
25583 if (ndr_get_array_length(ndr
, &r
->in
.monitor_name
) > ndr_get_array_size(ndr
, &r
->in
.monitor_name
)) {
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
.monitor_name
), ndr_get_array_length(ndr
, &r
->in
.monitor_name
));
25586 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.monitor_name
), sizeof(uint16_t)));
25587 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
));
25589 if (flags
& NDR_OUT
) {
25590 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25592 return NDR_ERR_SUCCESS
;
25595 _PUBLIC_
void ndr_print_spoolss_AddPort(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPort
*r
)
25597 ndr_print_struct(ndr
, name
, "spoolss_AddPort");
25599 if (flags
& NDR_SET_VALUES
) {
25600 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25602 if (flags
& NDR_IN
) {
25603 ndr_print_struct(ndr
, "in", "spoolss_AddPort");
25605 ndr_print_ptr(ndr
, "server_name", r
->in
.server_name
);
25607 if (r
->in
.server_name
) {
25608 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
25611 ndr_print_uint32(ndr
, "unknown", r
->in
.unknown
);
25612 ndr_print_string(ndr
, "monitor_name", r
->in
.monitor_name
);
25615 if (flags
& NDR_OUT
) {
25616 ndr_print_struct(ndr
, "out", "spoolss_AddPort");
25618 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25624 static enum ndr_err_code
ndr_push_spoolss_ConfigurePort(struct ndr_push
*ndr
, int flags
, const struct spoolss_ConfigurePort
*r
)
25626 if (flags
& NDR_IN
) {
25628 if (flags
& NDR_OUT
) {
25629 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25631 return NDR_ERR_SUCCESS
;
25634 static enum ndr_err_code
ndr_pull_spoolss_ConfigurePort(struct ndr_pull
*ndr
, int flags
, struct spoolss_ConfigurePort
*r
)
25636 if (flags
& NDR_IN
) {
25638 if (flags
& NDR_OUT
) {
25639 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25641 return NDR_ERR_SUCCESS
;
25644 _PUBLIC_
void ndr_print_spoolss_ConfigurePort(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ConfigurePort
*r
)
25646 ndr_print_struct(ndr
, name
, "spoolss_ConfigurePort");
25648 if (flags
& NDR_SET_VALUES
) {
25649 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25651 if (flags
& NDR_IN
) {
25652 ndr_print_struct(ndr
, "in", "spoolss_ConfigurePort");
25656 if (flags
& NDR_OUT
) {
25657 ndr_print_struct(ndr
, "out", "spoolss_ConfigurePort");
25659 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25665 static enum ndr_err_code
ndr_push_spoolss_DeletePort(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePort
*r
)
25667 if (flags
& NDR_IN
) {
25669 if (flags
& NDR_OUT
) {
25670 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25672 return NDR_ERR_SUCCESS
;
25675 static enum ndr_err_code
ndr_pull_spoolss_DeletePort(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePort
*r
)
25677 if (flags
& NDR_IN
) {
25679 if (flags
& NDR_OUT
) {
25680 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25682 return NDR_ERR_SUCCESS
;
25685 _PUBLIC_
void ndr_print_spoolss_DeletePort(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePort
*r
)
25687 ndr_print_struct(ndr
, name
, "spoolss_DeletePort");
25689 if (flags
& NDR_SET_VALUES
) {
25690 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25692 if (flags
& NDR_IN
) {
25693 ndr_print_struct(ndr
, "in", "spoolss_DeletePort");
25697 if (flags
& NDR_OUT
) {
25698 ndr_print_struct(ndr
, "out", "spoolss_DeletePort");
25700 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25706 static enum ndr_err_code
ndr_push_spoolss_CreatePrinterIC(struct ndr_push
*ndr
, int flags
, const struct spoolss_CreatePrinterIC
*r
)
25708 if (flags
& NDR_IN
) {
25709 if (r
->in
.handle
== NULL
) {
25710 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25712 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25713 if (r
->in
.devmode_ctr
== NULL
) {
25714 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25716 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
25718 if (flags
& NDR_OUT
) {
25719 if (r
->out
.gdi_handle
== NULL
) {
25720 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25722 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.gdi_handle
));
25723 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25725 return NDR_ERR_SUCCESS
;
25728 static enum ndr_err_code
ndr_pull_spoolss_CreatePrinterIC(struct ndr_pull
*ndr
, int flags
, struct spoolss_CreatePrinterIC
*r
)
25730 TALLOC_CTX
*_mem_save_handle_0
;
25731 TALLOC_CTX
*_mem_save_gdi_handle_0
;
25732 TALLOC_CTX
*_mem_save_devmode_ctr_0
;
25733 if (flags
& NDR_IN
) {
25734 ZERO_STRUCT(r
->out
);
25736 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25737 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
25739 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25740 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
25741 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
25742 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25743 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25744 NDR_PULL_ALLOC(ndr
, r
->in
.devmode_ctr
);
25746 _mem_save_devmode_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25747 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.devmode_ctr
, LIBNDR_FLAG_REF_ALLOC
);
25748 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
25749 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
25750 NDR_PULL_ALLOC(ndr
, r
->out
.gdi_handle
);
25751 ZERO_STRUCTP(r
->out
.gdi_handle
);
25753 if (flags
& NDR_OUT
) {
25754 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25755 NDR_PULL_ALLOC(ndr
, r
->out
.gdi_handle
);
25757 _mem_save_gdi_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25758 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.gdi_handle
, LIBNDR_FLAG_REF_ALLOC
);
25759 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.gdi_handle
));
25760 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_gdi_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25761 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25763 return NDR_ERR_SUCCESS
;
25766 _PUBLIC_
void ndr_print_spoolss_CreatePrinterIC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_CreatePrinterIC
*r
)
25768 ndr_print_struct(ndr
, name
, "spoolss_CreatePrinterIC");
25770 if (flags
& NDR_SET_VALUES
) {
25771 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25773 if (flags
& NDR_IN
) {
25774 ndr_print_struct(ndr
, "in", "spoolss_CreatePrinterIC");
25776 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
25778 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
25780 ndr_print_ptr(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
25782 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
25786 if (flags
& NDR_OUT
) {
25787 ndr_print_struct(ndr
, "out", "spoolss_CreatePrinterIC");
25789 ndr_print_ptr(ndr
, "gdi_handle", r
->out
.gdi_handle
);
25791 ndr_print_policy_handle(ndr
, "gdi_handle", r
->out
.gdi_handle
);
25793 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25799 static enum ndr_err_code
ndr_push_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_push
*ndr
, int flags
, const struct spoolss_PlayGDIScriptOnPrinterIC
*r
)
25801 if (flags
& NDR_IN
) {
25803 if (flags
& NDR_OUT
) {
25804 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25806 return NDR_ERR_SUCCESS
;
25809 static enum ndr_err_code
ndr_pull_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_pull
*ndr
, int flags
, struct spoolss_PlayGDIScriptOnPrinterIC
*r
)
25811 if (flags
& NDR_IN
) {
25813 if (flags
& NDR_OUT
) {
25814 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25816 return NDR_ERR_SUCCESS
;
25819 _PUBLIC_
void ndr_print_spoolss_PlayGDIScriptOnPrinterIC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_PlayGDIScriptOnPrinterIC
*r
)
25821 ndr_print_struct(ndr
, name
, "spoolss_PlayGDIScriptOnPrinterIC");
25823 if (flags
& NDR_SET_VALUES
) {
25824 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25826 if (flags
& NDR_IN
) {
25827 ndr_print_struct(ndr
, "in", "spoolss_PlayGDIScriptOnPrinterIC");
25831 if (flags
& NDR_OUT
) {
25832 ndr_print_struct(ndr
, "out", "spoolss_PlayGDIScriptOnPrinterIC");
25834 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25840 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterIC(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterIC
*r
)
25842 if (flags
& NDR_IN
) {
25843 if (r
->in
.gdi_handle
== NULL
) {
25844 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25846 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.gdi_handle
));
25848 if (flags
& NDR_OUT
) {
25849 if (r
->out
.gdi_handle
== NULL
) {
25850 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
25852 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.gdi_handle
));
25853 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25855 return NDR_ERR_SUCCESS
;
25858 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterIC(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterIC
*r
)
25860 TALLOC_CTX
*_mem_save_gdi_handle_0
;
25861 if (flags
& NDR_IN
) {
25862 ZERO_STRUCT(r
->out
);
25864 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25865 NDR_PULL_ALLOC(ndr
, r
->in
.gdi_handle
);
25867 _mem_save_gdi_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25868 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.gdi_handle
, LIBNDR_FLAG_REF_ALLOC
);
25869 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.gdi_handle
));
25870 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_gdi_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25871 NDR_PULL_ALLOC(ndr
, r
->out
.gdi_handle
);
25872 *r
->out
.gdi_handle
= *r
->in
.gdi_handle
;
25874 if (flags
& NDR_OUT
) {
25875 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
25876 NDR_PULL_ALLOC(ndr
, r
->out
.gdi_handle
);
25878 _mem_save_gdi_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
25879 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.gdi_handle
, LIBNDR_FLAG_REF_ALLOC
);
25880 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.gdi_handle
));
25881 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_gdi_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
25882 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25884 return NDR_ERR_SUCCESS
;
25887 _PUBLIC_
void ndr_print_spoolss_DeletePrinterIC(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterIC
*r
)
25889 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterIC");
25891 if (flags
& NDR_SET_VALUES
) {
25892 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25894 if (flags
& NDR_IN
) {
25895 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterIC");
25897 ndr_print_ptr(ndr
, "gdi_handle", r
->in
.gdi_handle
);
25899 ndr_print_policy_handle(ndr
, "gdi_handle", r
->in
.gdi_handle
);
25903 if (flags
& NDR_OUT
) {
25904 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterIC");
25906 ndr_print_ptr(ndr
, "gdi_handle", r
->out
.gdi_handle
);
25908 ndr_print_policy_handle(ndr
, "gdi_handle", r
->out
.gdi_handle
);
25910 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25916 static enum ndr_err_code
ndr_push_spoolss_AddPrinterConnection(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinterConnection
*r
)
25918 if (flags
& NDR_IN
) {
25920 if (flags
& NDR_OUT
) {
25921 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25923 return NDR_ERR_SUCCESS
;
25926 static enum ndr_err_code
ndr_pull_spoolss_AddPrinterConnection(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinterConnection
*r
)
25928 if (flags
& NDR_IN
) {
25930 if (flags
& NDR_OUT
) {
25931 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25933 return NDR_ERR_SUCCESS
;
25936 _PUBLIC_
void ndr_print_spoolss_AddPrinterConnection(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinterConnection
*r
)
25938 ndr_print_struct(ndr
, name
, "spoolss_AddPrinterConnection");
25940 if (flags
& NDR_SET_VALUES
) {
25941 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25943 if (flags
& NDR_IN
) {
25944 ndr_print_struct(ndr
, "in", "spoolss_AddPrinterConnection");
25948 if (flags
& NDR_OUT
) {
25949 ndr_print_struct(ndr
, "out", "spoolss_AddPrinterConnection");
25951 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25957 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterConnection(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterConnection
*r
)
25959 if (flags
& NDR_IN
) {
25961 if (flags
& NDR_OUT
) {
25962 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
25964 return NDR_ERR_SUCCESS
;
25967 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterConnection(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterConnection
*r
)
25969 if (flags
& NDR_IN
) {
25971 if (flags
& NDR_OUT
) {
25972 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
25974 return NDR_ERR_SUCCESS
;
25977 _PUBLIC_
void ndr_print_spoolss_DeletePrinterConnection(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterConnection
*r
)
25979 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterConnection");
25981 if (flags
& NDR_SET_VALUES
) {
25982 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
25984 if (flags
& NDR_IN
) {
25985 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterConnection");
25989 if (flags
& NDR_OUT
) {
25990 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterConnection");
25992 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
25998 static enum ndr_err_code
ndr_push_spoolss_PrinterMessageBox(struct ndr_push
*ndr
, int flags
, const struct spoolss_PrinterMessageBox
*r
)
26000 if (flags
& NDR_IN
) {
26002 if (flags
& NDR_OUT
) {
26003 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26005 return NDR_ERR_SUCCESS
;
26008 static enum ndr_err_code
ndr_pull_spoolss_PrinterMessageBox(struct ndr_pull
*ndr
, int flags
, struct spoolss_PrinterMessageBox
*r
)
26010 if (flags
& NDR_IN
) {
26012 if (flags
& NDR_OUT
) {
26013 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26015 return NDR_ERR_SUCCESS
;
26018 _PUBLIC_
void ndr_print_spoolss_PrinterMessageBox(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_PrinterMessageBox
*r
)
26020 ndr_print_struct(ndr
, name
, "spoolss_PrinterMessageBox");
26022 if (flags
& NDR_SET_VALUES
) {
26023 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26025 if (flags
& NDR_IN
) {
26026 ndr_print_struct(ndr
, "in", "spoolss_PrinterMessageBox");
26030 if (flags
& NDR_OUT
) {
26031 ndr_print_struct(ndr
, "out", "spoolss_PrinterMessageBox");
26033 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26039 static enum ndr_err_code
ndr_push_spoolss_AddMonitor(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddMonitor
*r
)
26041 if (flags
& NDR_IN
) {
26043 if (flags
& NDR_OUT
) {
26044 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26046 return NDR_ERR_SUCCESS
;
26049 static enum ndr_err_code
ndr_pull_spoolss_AddMonitor(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddMonitor
*r
)
26051 if (flags
& NDR_IN
) {
26053 if (flags
& NDR_OUT
) {
26054 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26056 return NDR_ERR_SUCCESS
;
26059 _PUBLIC_
void ndr_print_spoolss_AddMonitor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddMonitor
*r
)
26061 ndr_print_struct(ndr
, name
, "spoolss_AddMonitor");
26063 if (flags
& NDR_SET_VALUES
) {
26064 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26066 if (flags
& NDR_IN
) {
26067 ndr_print_struct(ndr
, "in", "spoolss_AddMonitor");
26071 if (flags
& NDR_OUT
) {
26072 ndr_print_struct(ndr
, "out", "spoolss_AddMonitor");
26074 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26080 static enum ndr_err_code
ndr_push_spoolss_DeleteMonitor(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeleteMonitor
*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_DeleteMonitor(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeleteMonitor
*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_DeleteMonitor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeleteMonitor
*r
)
26102 ndr_print_struct(ndr
, name
, "spoolss_DeleteMonitor");
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_DeleteMonitor");
26112 if (flags
& NDR_OUT
) {
26113 ndr_print_struct(ndr
, "out", "spoolss_DeleteMonitor");
26115 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26121 static enum ndr_err_code
ndr_push_spoolss_DeletePrintProcessor(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrintProcessor
*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_DeletePrintProcessor(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrintProcessor
*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_DeletePrintProcessor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrintProcessor
*r
)
26143 ndr_print_struct(ndr
, name
, "spoolss_DeletePrintProcessor");
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_DeletePrintProcessor");
26153 if (flags
& NDR_OUT
) {
26154 ndr_print_struct(ndr
, "out", "spoolss_DeletePrintProcessor");
26156 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26162 static enum ndr_err_code
ndr_push_spoolss_AddPrintProvidor(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrintProvidor
*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_AddPrintProvidor(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrintProvidor
*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_AddPrintProvidor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrintProvidor
*r
)
26184 ndr_print_struct(ndr
, name
, "spoolss_AddPrintProvidor");
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_AddPrintProvidor");
26194 if (flags
& NDR_OUT
) {
26195 ndr_print_struct(ndr
, "out", "spoolss_AddPrintProvidor");
26197 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26203 static enum ndr_err_code
ndr_push_spoolss_DeletePrintProvidor(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrintProvidor
*r
)
26205 if (flags
& NDR_IN
) {
26207 if (flags
& NDR_OUT
) {
26208 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26210 return NDR_ERR_SUCCESS
;
26213 static enum ndr_err_code
ndr_pull_spoolss_DeletePrintProvidor(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrintProvidor
*r
)
26215 if (flags
& NDR_IN
) {
26217 if (flags
& NDR_OUT
) {
26218 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26220 return NDR_ERR_SUCCESS
;
26223 _PUBLIC_
void ndr_print_spoolss_DeletePrintProvidor(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrintProvidor
*r
)
26225 ndr_print_struct(ndr
, name
, "spoolss_DeletePrintProvidor");
26227 if (flags
& NDR_SET_VALUES
) {
26228 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26230 if (flags
& NDR_IN
) {
26231 ndr_print_struct(ndr
, "in", "spoolss_DeletePrintProvidor");
26235 if (flags
& NDR_OUT
) {
26236 ndr_print_struct(ndr
, "out", "spoolss_DeletePrintProvidor");
26238 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26244 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrintProcDataTypes(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrintProcDataTypes
*r
)
26246 if (flags
& NDR_IN
) {
26247 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
26248 if (r
->in
.servername
) {
26249 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
26250 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
26251 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
26252 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
26254 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.print_processor_name
));
26255 if (r
->in
.print_processor_name
) {
26256 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.print_processor_name
, CH_UTF16
)));
26257 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
26258 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.print_processor_name
, CH_UTF16
)));
26259 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
));
26261 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
26262 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
26263 if (r
->in
.buffer
) {
26264 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
26266 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
26268 if (flags
& NDR_OUT
) {
26269 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
26271 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->out
.info
));
26273 if (r
->out
.needed
== NULL
) {
26274 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26276 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
26277 if (r
->out
.count
== NULL
) {
26278 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26280 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
26281 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26283 return NDR_ERR_SUCCESS
;
26286 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrintProcDataTypes(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrintProcDataTypes
*r
)
26288 uint32_t _ptr_servername
;
26289 uint32_t _ptr_print_processor_name
;
26290 uint32_t _ptr_buffer
;
26291 uint32_t _ptr_info
;
26292 TALLOC_CTX
*_mem_save_servername_0
;
26293 TALLOC_CTX
*_mem_save_print_processor_name_0
;
26294 TALLOC_CTX
*_mem_save_buffer_0
;
26295 TALLOC_CTX
*_mem_save_info_0
;
26296 TALLOC_CTX
*_mem_save_needed_0
;
26297 TALLOC_CTX
*_mem_save_count_0
;
26298 if (flags
& NDR_IN
) {
26299 ZERO_STRUCT(r
->out
);
26301 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
26302 if (_ptr_servername
) {
26303 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
26305 r
->in
.servername
= NULL
;
26307 if (r
->in
.servername
) {
26308 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26309 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
26310 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
26311 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
26312 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
26313 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
));
26315 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
26316 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
26317 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
26319 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_print_processor_name
));
26320 if (_ptr_print_processor_name
) {
26321 NDR_PULL_ALLOC(ndr
, r
->in
.print_processor_name
);
26323 r
->in
.print_processor_name
= NULL
;
26325 if (r
->in
.print_processor_name
) {
26326 _mem_save_print_processor_name_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26327 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.print_processor_name
, 0);
26328 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.print_processor_name
));
26329 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.print_processor_name
));
26330 if (ndr_get_array_length(ndr
, &r
->in
.print_processor_name
) > ndr_get_array_size(ndr
, &r
->in
.print_processor_name
)) {
26331 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
));
26333 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.print_processor_name
), sizeof(uint16_t)));
26334 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
));
26335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_print_processor_name_0
, 0);
26337 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
26338 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
26340 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
26342 r
->in
.buffer
= NULL
;
26344 if (r
->in
.buffer
) {
26345 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26346 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
26347 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
26348 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
26350 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
26351 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26352 ZERO_STRUCTP(r
->out
.needed
);
26353 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
26354 ZERO_STRUCTP(r
->out
.count
);
26356 if (flags
& NDR_OUT
) {
26357 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
26359 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
26361 r
->out
.info
= NULL
;
26364 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26365 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
26366 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
26367 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
26369 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26370 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26372 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26373 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
26374 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
26375 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
26376 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26377 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
26379 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26380 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
26381 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
26382 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
26383 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26385 return NDR_ERR_SUCCESS
;
26388 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrintProcDataTypes(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrintProcDataTypes
*r
)
26390 uint32_t cntr_info_0
;
26391 if (flags
& NDR_IN
) {
26392 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
26393 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
26395 if (flags
& NDR_OUT
) {
26396 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
26397 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
26398 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
26400 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
26401 NDR_CHECK(ndr_push_spoolss_PrintProcDataTypesInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
26404 return NDR_ERR_SUCCESS
;
26407 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrintProcDataTypes(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrintProcDataTypes
*r
)
26409 uint32_t cntr_info_0
;
26410 TALLOC_CTX
*_mem_save_info_0
;
26411 if (flags
& NDR_IN
) {
26412 ZERO_STRUCT(r
->out
);
26414 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
26415 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
26417 if (flags
& NDR_OUT
) {
26418 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
26419 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26420 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
26421 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
26422 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->out
.info
[cntr_info_0
], r
->in
.level
));
26423 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
26425 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
26426 NDR_CHECK(ndr_pull_spoolss_PrintProcDataTypesInfo(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
26428 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
26430 return NDR_ERR_SUCCESS
;
26433 _PUBLIC_
void ndr_print_spoolss_EnumPrintProcDataTypes(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrintProcDataTypes
*r
)
26435 uint32_t cntr_info_2
;
26436 ndr_print_struct(ndr
, name
, "spoolss_EnumPrintProcDataTypes");
26438 if (flags
& NDR_SET_VALUES
) {
26439 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26441 if (flags
& NDR_IN
) {
26442 ndr_print_struct(ndr
, "in", "spoolss_EnumPrintProcDataTypes");
26444 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
26446 if (r
->in
.servername
) {
26447 ndr_print_string(ndr
, "servername", r
->in
.servername
);
26450 ndr_print_ptr(ndr
, "print_processor_name", r
->in
.print_processor_name
);
26452 if (r
->in
.print_processor_name
) {
26453 ndr_print_string(ndr
, "print_processor_name", r
->in
.print_processor_name
);
26456 ndr_print_uint32(ndr
, "level", r
->in
.level
);
26457 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
26459 if (r
->in
.buffer
) {
26460 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
26463 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
26466 if (flags
& NDR_OUT
) {
26467 ndr_print_struct(ndr
, "out", "spoolss_EnumPrintProcDataTypes");
26469 ndr_print_ptr(ndr
, "count", r
->out
.count
);
26471 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
26473 ndr_print_ptr(ndr
, "info", r
->out
.info
);
26475 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
26477 if (*r
->out
.info
) {
26478 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
26480 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
26482 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
26483 ndr_print_set_switch_value(ndr
, &(*r
->out
.info
)[cntr_info_2
], r
->in
.level
);
26484 ndr_print_spoolss_PrintProcDataTypesInfo(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
26492 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
26494 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
26496 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26502 static enum ndr_err_code
ndr_push_spoolss_ResetPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ResetPrinter
*r
)
26504 if (flags
& NDR_IN
) {
26505 if (r
->in
.handle
== NULL
) {
26506 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26508 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26509 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.data_type
));
26510 if (r
->in
.data_type
) {
26511 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.data_type
, CH_UTF16
)));
26512 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
26513 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.data_type
, CH_UTF16
)));
26514 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
));
26516 if (r
->in
.devmode_ctr
== NULL
) {
26517 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26519 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
26521 if (flags
& NDR_OUT
) {
26522 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26524 return NDR_ERR_SUCCESS
;
26527 static enum ndr_err_code
ndr_pull_spoolss_ResetPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ResetPrinter
*r
)
26529 uint32_t _ptr_data_type
;
26530 TALLOC_CTX
*_mem_save_handle_0
;
26531 TALLOC_CTX
*_mem_save_data_type_0
;
26532 TALLOC_CTX
*_mem_save_devmode_ctr_0
;
26533 if (flags
& NDR_IN
) {
26534 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26535 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26537 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26538 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26539 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26540 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
26541 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_data_type
));
26542 if (_ptr_data_type
) {
26543 NDR_PULL_ALLOC(ndr
, r
->in
.data_type
);
26545 r
->in
.data_type
= NULL
;
26547 if (r
->in
.data_type
) {
26548 _mem_save_data_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26549 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.data_type
, 0);
26550 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data_type
));
26551 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.data_type
));
26552 if (ndr_get_array_length(ndr
, &r
->in
.data_type
) > ndr_get_array_size(ndr
, &r
->in
.data_type
)) {
26553 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
));
26555 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.data_type
), sizeof(uint16_t)));
26556 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
));
26557 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_type_0
, 0);
26559 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26560 NDR_PULL_ALLOC(ndr
, r
->in
.devmode_ctr
);
26562 _mem_save_devmode_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26563 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.devmode_ctr
, LIBNDR_FLAG_REF_ALLOC
);
26564 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
26565 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
26567 if (flags
& NDR_OUT
) {
26568 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26570 return NDR_ERR_SUCCESS
;
26573 _PUBLIC_
void ndr_print_spoolss_ResetPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ResetPrinter
*r
)
26575 ndr_print_struct(ndr
, name
, "spoolss_ResetPrinter");
26577 if (flags
& NDR_SET_VALUES
) {
26578 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26580 if (flags
& NDR_IN
) {
26581 ndr_print_struct(ndr
, "in", "spoolss_ResetPrinter");
26583 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26585 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26587 ndr_print_ptr(ndr
, "data_type", r
->in
.data_type
);
26589 if (r
->in
.data_type
) {
26590 ndr_print_string(ndr
, "data_type", r
->in
.data_type
);
26593 ndr_print_ptr(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
26595 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
26599 if (flags
& NDR_OUT
) {
26600 ndr_print_struct(ndr
, "out", "spoolss_ResetPrinter");
26602 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26608 static enum ndr_err_code
ndr_push_spoolss_GetPrinterDriver2(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDriver2
*r
)
26610 if (flags
& NDR_IN
) {
26611 if (r
->in
.handle
== NULL
) {
26612 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26614 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26615 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.architecture
));
26616 if (r
->in
.architecture
) {
26617 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
26618 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
26619 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
26620 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
26622 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
26623 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
26624 if (r
->in
.buffer
) {
26625 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, *r
->in
.buffer
));
26627 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
26628 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_major_version
));
26629 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.client_minor_version
));
26631 if (flags
& NDR_OUT
) {
26632 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.info
));
26635 struct ndr_push
*_ndr_info
;
26636 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
26637 NDR_CHECK(ndr_push_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
26638 NDR_CHECK(ndr_push_spoolss_DriverInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
26639 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
26642 if (r
->out
.needed
== NULL
) {
26643 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26645 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
26646 if (r
->out
.server_major_version
== NULL
) {
26647 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26649 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.server_major_version
));
26650 if (r
->out
.server_minor_version
== NULL
) {
26651 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26653 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.server_minor_version
));
26654 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26656 return NDR_ERR_SUCCESS
;
26659 static enum ndr_err_code
ndr_pull_spoolss_GetPrinterDriver2(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDriver2
*r
)
26661 uint32_t _ptr_architecture
;
26662 uint32_t _ptr_buffer
;
26663 uint32_t _ptr_info
;
26664 TALLOC_CTX
*_mem_save_handle_0
;
26665 TALLOC_CTX
*_mem_save_architecture_0
;
26666 TALLOC_CTX
*_mem_save_buffer_0
;
26667 TALLOC_CTX
*_mem_save_info_0
;
26668 TALLOC_CTX
*_mem_save_needed_0
;
26669 TALLOC_CTX
*_mem_save_server_major_version_0
;
26670 TALLOC_CTX
*_mem_save_server_minor_version_0
;
26671 if (flags
& NDR_IN
) {
26672 ZERO_STRUCT(r
->out
);
26674 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26675 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26677 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26678 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26679 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26680 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
26681 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_architecture
));
26682 if (_ptr_architecture
) {
26683 NDR_PULL_ALLOC(ndr
, r
->in
.architecture
);
26685 r
->in
.architecture
= NULL
;
26687 if (r
->in
.architecture
) {
26688 _mem_save_architecture_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26689 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.architecture
, 0);
26690 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
26691 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
26692 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
26693 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
));
26695 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
26696 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
26697 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_architecture_0
, 0);
26699 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
26700 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
26702 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
26704 r
->in
.buffer
= NULL
;
26706 if (r
->in
.buffer
) {
26707 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26708 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
26709 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.buffer
));
26710 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
26712 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
26713 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_major_version
));
26714 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.client_minor_version
));
26715 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26716 ZERO_STRUCTP(r
->out
.needed
);
26717 NDR_PULL_ALLOC(ndr
, r
->out
.server_major_version
);
26718 ZERO_STRUCTP(r
->out
.server_major_version
);
26719 NDR_PULL_ALLOC(ndr
, r
->out
.server_minor_version
);
26720 ZERO_STRUCTP(r
->out
.server_minor_version
);
26722 if (flags
& NDR_OUT
) {
26723 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
26725 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
26727 r
->out
.info
= NULL
;
26730 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26731 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
26733 struct ndr_pull
*_ndr_info
;
26734 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_info
, 4, r
->in
.offered
));
26735 NDR_CHECK(ndr_pull_set_switch_value(_ndr_info
, r
->out
.info
, r
->in
.level
));
26736 NDR_CHECK(ndr_pull_spoolss_DriverInfo(_ndr_info
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.info
));
26737 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_info
, 4, r
->in
.offered
));
26739 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
26741 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26742 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
26744 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26745 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
26746 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
26747 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
26748 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26749 NDR_PULL_ALLOC(ndr
, r
->out
.server_major_version
);
26751 _mem_save_server_major_version_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26752 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.server_major_version
, LIBNDR_FLAG_REF_ALLOC
);
26753 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.server_major_version
));
26754 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_major_version_0
, LIBNDR_FLAG_REF_ALLOC
);
26755 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26756 NDR_PULL_ALLOC(ndr
, r
->out
.server_minor_version
);
26758 _mem_save_server_minor_version_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26759 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.server_minor_version
, LIBNDR_FLAG_REF_ALLOC
);
26760 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.server_minor_version
));
26761 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_minor_version_0
, LIBNDR_FLAG_REF_ALLOC
);
26762 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26764 return NDR_ERR_SUCCESS
;
26767 _PUBLIC_
void ndr_print_spoolss_GetPrinterDriver2(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDriver2
*r
)
26769 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDriver2");
26771 if (flags
& NDR_SET_VALUES
) {
26772 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26774 if (flags
& NDR_IN
) {
26775 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDriver2");
26777 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26779 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26781 ndr_print_ptr(ndr
, "architecture", r
->in
.architecture
);
26783 if (r
->in
.architecture
) {
26784 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
26787 ndr_print_uint32(ndr
, "level", r
->in
.level
);
26788 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
26790 if (r
->in
.buffer
) {
26791 ndr_print_DATA_BLOB(ndr
, "buffer", *r
->in
.buffer
);
26794 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
26795 ndr_print_uint32(ndr
, "client_major_version", r
->in
.client_major_version
);
26796 ndr_print_uint32(ndr
, "client_minor_version", r
->in
.client_minor_version
);
26799 if (flags
& NDR_OUT
) {
26800 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDriver2");
26802 ndr_print_ptr(ndr
, "info", r
->out
.info
);
26805 ndr_print_set_switch_value(ndr
, r
->out
.info
, r
->in
.level
);
26806 ndr_print_spoolss_DriverInfo(ndr
, "info", r
->out
.info
);
26809 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
26811 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
26813 ndr_print_ptr(ndr
, "server_major_version", r
->out
.server_major_version
);
26815 ndr_print_uint32(ndr
, "server_major_version", *r
->out
.server_major_version
);
26817 ndr_print_ptr(ndr
, "server_minor_version", r
->out
.server_minor_version
);
26819 ndr_print_uint32(ndr
, "server_minor_version", *r
->out
.server_minor_version
);
26821 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26827 static enum ndr_err_code
ndr_push_spoolss_FindFirstPrinterChangeNotification(struct ndr_push
*ndr
, int flags
, const struct spoolss_FindFirstPrinterChangeNotification
*r
)
26829 if (flags
& NDR_IN
) {
26831 if (flags
& NDR_OUT
) {
26832 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26834 return NDR_ERR_SUCCESS
;
26837 static enum ndr_err_code
ndr_pull_spoolss_FindFirstPrinterChangeNotification(struct ndr_pull
*ndr
, int flags
, struct spoolss_FindFirstPrinterChangeNotification
*r
)
26839 if (flags
& NDR_IN
) {
26841 if (flags
& NDR_OUT
) {
26842 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26844 return NDR_ERR_SUCCESS
;
26847 _PUBLIC_
void ndr_print_spoolss_FindFirstPrinterChangeNotification(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_FindFirstPrinterChangeNotification
*r
)
26849 ndr_print_struct(ndr
, name
, "spoolss_FindFirstPrinterChangeNotification");
26851 if (flags
& NDR_SET_VALUES
) {
26852 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26854 if (flags
& NDR_IN
) {
26855 ndr_print_struct(ndr
, "in", "spoolss_FindFirstPrinterChangeNotification");
26859 if (flags
& NDR_OUT
) {
26860 ndr_print_struct(ndr
, "out", "spoolss_FindFirstPrinterChangeNotification");
26862 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26868 static enum ndr_err_code
ndr_push_spoolss_FindNextPrinterChangeNotification(struct ndr_push
*ndr
, int flags
, const struct spoolss_FindNextPrinterChangeNotification
*r
)
26870 if (flags
& NDR_IN
) {
26872 if (flags
& NDR_OUT
) {
26873 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26875 return NDR_ERR_SUCCESS
;
26878 static enum ndr_err_code
ndr_pull_spoolss_FindNextPrinterChangeNotification(struct ndr_pull
*ndr
, int flags
, struct spoolss_FindNextPrinterChangeNotification
*r
)
26880 if (flags
& NDR_IN
) {
26882 if (flags
& NDR_OUT
) {
26883 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26885 return NDR_ERR_SUCCESS
;
26888 _PUBLIC_
void ndr_print_spoolss_FindNextPrinterChangeNotification(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_FindNextPrinterChangeNotification
*r
)
26890 ndr_print_struct(ndr
, name
, "spoolss_FindNextPrinterChangeNotification");
26892 if (flags
& NDR_SET_VALUES
) {
26893 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26895 if (flags
& NDR_IN
) {
26896 ndr_print_struct(ndr
, "in", "spoolss_FindNextPrinterChangeNotification");
26900 if (flags
& NDR_OUT
) {
26901 ndr_print_struct(ndr
, "out", "spoolss_FindNextPrinterChangeNotification");
26903 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26909 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_FindClosePrinterNotify(struct ndr_push
*ndr
, int flags
, const struct spoolss_FindClosePrinterNotify
*r
)
26911 if (flags
& NDR_IN
) {
26912 if (r
->in
.handle
== NULL
) {
26913 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
26915 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26917 if (flags
& NDR_OUT
) {
26918 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26920 return NDR_ERR_SUCCESS
;
26923 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_FindClosePrinterNotify(struct ndr_pull
*ndr
, int flags
, struct spoolss_FindClosePrinterNotify
*r
)
26925 TALLOC_CTX
*_mem_save_handle_0
;
26926 if (flags
& NDR_IN
) {
26927 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
26928 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
26930 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
26931 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
26932 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
26933 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
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_FindClosePrinterNotify(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_FindClosePrinterNotify
*r
)
26943 ndr_print_struct(ndr
, name
, "spoolss_FindClosePrinterNotify");
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_FindClosePrinterNotify");
26951 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
26953 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
26957 if (flags
& NDR_OUT
) {
26958 ndr_print_struct(ndr
, "out", "spoolss_FindClosePrinterNotify");
26960 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
26966 static enum ndr_err_code
ndr_push_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
)
26968 if (flags
& NDR_IN
) {
26970 if (flags
& NDR_OUT
) {
26971 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
26973 return NDR_ERR_SUCCESS
;
26976 static enum ndr_err_code
ndr_pull_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
)
26978 if (flags
& NDR_IN
) {
26980 if (flags
& NDR_OUT
) {
26981 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
26983 return NDR_ERR_SUCCESS
;
26986 _PUBLIC_
void ndr_print_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterFindFirstPrinterChangeNotificationOld
*r
)
26988 ndr_print_struct(ndr
, name
, "spoolss_RouterFindFirstPrinterChangeNotificationOld");
26990 if (flags
& NDR_SET_VALUES
) {
26991 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
26993 if (flags
& NDR_IN
) {
26994 ndr_print_struct(ndr
, "in", "spoolss_RouterFindFirstPrinterChangeNotificationOld");
26998 if (flags
& NDR_OUT
) {
26999 ndr_print_struct(ndr
, "out", "spoolss_RouterFindFirstPrinterChangeNotificationOld");
27001 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27007 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_ReplyOpenPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ReplyOpenPrinter
*r
)
27009 if (flags
& NDR_IN
) {
27010 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
27011 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
27012 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server_name
, CH_UTF16
)));
27013 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
));
27014 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.printer_local
));
27015 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
27016 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
27017 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
27018 if (r
->in
.buffer
) {
27019 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
27020 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, r
->in
.bufsize
));
27023 if (flags
& NDR_OUT
) {
27024 if (r
->out
.handle
== NULL
) {
27025 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27027 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
27028 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27030 return NDR_ERR_SUCCESS
;
27033 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_ReplyOpenPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ReplyOpenPrinter
*r
)
27035 uint32_t _ptr_buffer
;
27036 TALLOC_CTX
*_mem_save_buffer_0
;
27037 TALLOC_CTX
*_mem_save_handle_0
;
27038 if (flags
& NDR_IN
) {
27039 ZERO_STRUCT(r
->out
);
27041 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server_name
));
27042 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server_name
));
27043 if (ndr_get_array_length(ndr
, &r
->in
.server_name
) > ndr_get_array_size(ndr
, &r
->in
.server_name
)) {
27044 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
));
27046 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server_name
), sizeof(uint16_t)));
27047 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
));
27048 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.printer_local
));
27049 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->in
.type
));
27050 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
27051 if (r
->in
.bufsize
> 512) {
27052 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
27054 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
27056 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
27058 r
->in
.buffer
= NULL
;
27060 if (r
->in
.buffer
) {
27061 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27062 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
27063 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
27064 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
27065 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
)));
27066 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
27068 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
27069 ZERO_STRUCTP(r
->out
.handle
);
27070 if (r
->in
.buffer
) {
27071 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, r
->in
.bufsize
));
27074 if (flags
& NDR_OUT
) {
27075 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27076 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
27078 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27079 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27080 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
27081 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27082 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27084 return NDR_ERR_SUCCESS
;
27087 _PUBLIC_
void ndr_print_spoolss_ReplyOpenPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ReplyOpenPrinter
*r
)
27089 ndr_print_struct(ndr
, name
, "spoolss_ReplyOpenPrinter");
27091 if (flags
& NDR_SET_VALUES
) {
27092 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27094 if (flags
& NDR_IN
) {
27095 ndr_print_struct(ndr
, "in", "spoolss_ReplyOpenPrinter");
27097 ndr_print_string(ndr
, "server_name", r
->in
.server_name
);
27098 ndr_print_uint32(ndr
, "printer_local", r
->in
.printer_local
);
27099 ndr_print_winreg_Type(ndr
, "type", r
->in
.type
);
27100 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
27101 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
27103 if (r
->in
.buffer
) {
27104 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, r
->in
.bufsize
);
27109 if (flags
& NDR_OUT
) {
27110 ndr_print_struct(ndr
, "out", "spoolss_ReplyOpenPrinter");
27112 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
27114 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
27116 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27122 static enum ndr_err_code
ndr_push_spoolss_RouterReplyPrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterReplyPrinter
*r
)
27124 if (flags
& NDR_IN
) {
27125 if (r
->in
.handle
== NULL
) {
27126 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27128 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27129 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
27130 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
27131 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.buffer
));
27132 if (r
->in
.buffer
) {
27133 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.bufsize
));
27134 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, r
->in
.bufsize
));
27137 if (flags
& NDR_OUT
) {
27138 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27140 return NDR_ERR_SUCCESS
;
27143 static enum ndr_err_code
ndr_pull_spoolss_RouterReplyPrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterReplyPrinter
*r
)
27145 uint32_t _ptr_buffer
;
27146 TALLOC_CTX
*_mem_save_handle_0
;
27147 TALLOC_CTX
*_mem_save_buffer_0
;
27148 if (flags
& NDR_IN
) {
27149 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27150 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
27152 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27153 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27154 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27155 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27156 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
27157 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.bufsize
));
27158 if (r
->in
.bufsize
> 512) {
27159 return ndr_pull_error(ndr
, NDR_ERR_RANGE
, "value out of range");
27161 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_buffer
));
27163 NDR_PULL_ALLOC(ndr
, r
->in
.buffer
);
27165 r
->in
.buffer
= NULL
;
27167 if (r
->in
.buffer
) {
27168 _mem_save_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27169 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.buffer
, 0);
27170 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.buffer
));
27171 NDR_PULL_ALLOC_N(ndr
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
));
27172 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.buffer
, ndr_get_array_size(ndr
, &r
->in
.buffer
)));
27173 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_buffer_0
, 0);
27175 if (r
->in
.buffer
) {
27176 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.buffer
, r
->in
.bufsize
));
27179 if (flags
& NDR_OUT
) {
27180 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27182 return NDR_ERR_SUCCESS
;
27185 _PUBLIC_
void ndr_print_spoolss_RouterReplyPrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterReplyPrinter
*r
)
27187 ndr_print_struct(ndr
, name
, "spoolss_RouterReplyPrinter");
27189 if (flags
& NDR_SET_VALUES
) {
27190 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27192 if (flags
& NDR_IN
) {
27193 ndr_print_struct(ndr
, "in", "spoolss_RouterReplyPrinter");
27195 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
27197 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
27199 ndr_print_spoolss_PrinterChangeFlags(ndr
, "flags", r
->in
.flags
);
27200 ndr_print_uint32(ndr
, "bufsize", r
->in
.bufsize
);
27201 ndr_print_ptr(ndr
, "buffer", r
->in
.buffer
);
27203 if (r
->in
.buffer
) {
27204 ndr_print_array_uint8(ndr
, "buffer", r
->in
.buffer
, r
->in
.bufsize
);
27209 if (flags
& NDR_OUT
) {
27210 ndr_print_struct(ndr
, "out", "spoolss_RouterReplyPrinter");
27212 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27218 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_ReplyClosePrinter(struct ndr_push
*ndr
, int flags
, const struct spoolss_ReplyClosePrinter
*r
)
27220 if (flags
& NDR_IN
) {
27221 if (r
->in
.handle
== NULL
) {
27222 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27224 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27226 if (flags
& NDR_OUT
) {
27227 if (r
->out
.handle
== NULL
) {
27228 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27230 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
27231 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27233 return NDR_ERR_SUCCESS
;
27236 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_ReplyClosePrinter(struct ndr_pull
*ndr
, int flags
, struct spoolss_ReplyClosePrinter
*r
)
27238 TALLOC_CTX
*_mem_save_handle_0
;
27239 if (flags
& NDR_IN
) {
27240 ZERO_STRUCT(r
->out
);
27242 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27243 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
27245 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27246 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27247 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27248 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27249 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
27250 *r
->out
.handle
= *r
->in
.handle
;
27252 if (flags
& NDR_OUT
) {
27253 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27254 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
27256 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27257 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27258 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
27259 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27260 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27262 return NDR_ERR_SUCCESS
;
27265 _PUBLIC_
void ndr_print_spoolss_ReplyClosePrinter(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ReplyClosePrinter
*r
)
27267 ndr_print_struct(ndr
, name
, "spoolss_ReplyClosePrinter");
27269 if (flags
& NDR_SET_VALUES
) {
27270 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27272 if (flags
& NDR_IN
) {
27273 ndr_print_struct(ndr
, "in", "spoolss_ReplyClosePrinter");
27275 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
27277 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
27281 if (flags
& NDR_OUT
) {
27282 ndr_print_struct(ndr
, "out", "spoolss_ReplyClosePrinter");
27284 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
27286 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
27288 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27294 static enum ndr_err_code
ndr_push_spoolss_AddPortEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPortEx
*r
)
27296 if (flags
& NDR_IN
) {
27298 if (flags
& NDR_OUT
) {
27299 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27301 return NDR_ERR_SUCCESS
;
27304 static enum ndr_err_code
ndr_pull_spoolss_AddPortEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPortEx
*r
)
27306 if (flags
& NDR_IN
) {
27308 if (flags
& NDR_OUT
) {
27309 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27311 return NDR_ERR_SUCCESS
;
27314 _PUBLIC_
void ndr_print_spoolss_AddPortEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPortEx
*r
)
27316 ndr_print_struct(ndr
, name
, "spoolss_AddPortEx");
27318 if (flags
& NDR_SET_VALUES
) {
27319 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27321 if (flags
& NDR_IN
) {
27322 ndr_print_struct(ndr
, "in", "spoolss_AddPortEx");
27326 if (flags
& NDR_OUT
) {
27327 ndr_print_struct(ndr
, "out", "spoolss_AddPortEx");
27329 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27335 static enum ndr_err_code
ndr_push_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterFindFirstPrinterChangeNotification
*r
)
27337 if (flags
& NDR_IN
) {
27339 if (flags
& NDR_OUT
) {
27340 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27342 return NDR_ERR_SUCCESS
;
27345 static enum ndr_err_code
ndr_pull_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterFindFirstPrinterChangeNotification
*r
)
27347 if (flags
& NDR_IN
) {
27349 if (flags
& NDR_OUT
) {
27350 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27352 return NDR_ERR_SUCCESS
;
27355 _PUBLIC_
void ndr_print_spoolss_RouterFindFirstPrinterChangeNotification(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterFindFirstPrinterChangeNotification
*r
)
27357 ndr_print_struct(ndr
, name
, "spoolss_RouterFindFirstPrinterChangeNotification");
27359 if (flags
& NDR_SET_VALUES
) {
27360 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27362 if (flags
& NDR_IN
) {
27363 ndr_print_struct(ndr
, "in", "spoolss_RouterFindFirstPrinterChangeNotification");
27367 if (flags
& NDR_OUT
) {
27368 ndr_print_struct(ndr
, "out", "spoolss_RouterFindFirstPrinterChangeNotification");
27370 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27376 static enum ndr_err_code
ndr_push_spoolss_SpoolerInit(struct ndr_push
*ndr
, int flags
, const struct spoolss_SpoolerInit
*r
)
27378 if (flags
& NDR_IN
) {
27380 if (flags
& NDR_OUT
) {
27381 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27383 return NDR_ERR_SUCCESS
;
27386 static enum ndr_err_code
ndr_pull_spoolss_SpoolerInit(struct ndr_pull
*ndr
, int flags
, struct spoolss_SpoolerInit
*r
)
27388 if (flags
& NDR_IN
) {
27390 if (flags
& NDR_OUT
) {
27391 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27393 return NDR_ERR_SUCCESS
;
27396 _PUBLIC_
void ndr_print_spoolss_SpoolerInit(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SpoolerInit
*r
)
27398 ndr_print_struct(ndr
, name
, "spoolss_SpoolerInit");
27400 if (flags
& NDR_SET_VALUES
) {
27401 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27403 if (flags
& NDR_IN
) {
27404 ndr_print_struct(ndr
, "in", "spoolss_SpoolerInit");
27408 if (flags
& NDR_OUT
) {
27409 ndr_print_struct(ndr
, "out", "spoolss_SpoolerInit");
27411 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27417 static enum ndr_err_code
ndr_push_spoolss_ResetPrinterEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_ResetPrinterEx
*r
)
27419 if (flags
& NDR_IN
) {
27421 if (flags
& NDR_OUT
) {
27422 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27424 return NDR_ERR_SUCCESS
;
27427 static enum ndr_err_code
ndr_pull_spoolss_ResetPrinterEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_ResetPrinterEx
*r
)
27429 if (flags
& NDR_IN
) {
27431 if (flags
& NDR_OUT
) {
27432 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27434 return NDR_ERR_SUCCESS
;
27437 _PUBLIC_
void ndr_print_spoolss_ResetPrinterEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_ResetPrinterEx
*r
)
27439 ndr_print_struct(ndr
, name
, "spoolss_ResetPrinterEx");
27441 if (flags
& NDR_SET_VALUES
) {
27442 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27444 if (flags
& NDR_IN
) {
27445 ndr_print_struct(ndr
, "in", "spoolss_ResetPrinterEx");
27449 if (flags
& NDR_OUT
) {
27450 ndr_print_struct(ndr
, "out", "spoolss_ResetPrinterEx");
27452 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27458 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
)
27460 if (flags
& NDR_IN
) {
27461 if (r
->in
.handle
== NULL
) {
27462 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27464 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27465 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
27466 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.options
));
27467 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.local_machine
));
27468 if (r
->in
.local_machine
) {
27469 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.local_machine
, CH_UTF16
)));
27470 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
27471 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.local_machine
, CH_UTF16
)));
27472 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
));
27474 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.printer_local
));
27475 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.notify_options
));
27476 if (r
->in
.notify_options
) {
27477 NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.notify_options
));
27480 if (flags
& NDR_OUT
) {
27481 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27483 return NDR_ERR_SUCCESS
;
27486 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
)
27488 uint32_t _ptr_local_machine
;
27489 uint32_t _ptr_notify_options
;
27490 TALLOC_CTX
*_mem_save_handle_0
;
27491 TALLOC_CTX
*_mem_save_local_machine_0
;
27492 TALLOC_CTX
*_mem_save_notify_options_0
;
27493 if (flags
& NDR_IN
) {
27494 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27495 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
27497 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27498 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27499 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27500 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27501 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
27502 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.options
));
27503 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_local_machine
));
27504 if (_ptr_local_machine
) {
27505 NDR_PULL_ALLOC(ndr
, r
->in
.local_machine
);
27507 r
->in
.local_machine
= NULL
;
27509 if (r
->in
.local_machine
) {
27510 _mem_save_local_machine_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27511 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.local_machine
, 0);
27512 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.local_machine
));
27513 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.local_machine
));
27514 if (ndr_get_array_length(ndr
, &r
->in
.local_machine
) > ndr_get_array_size(ndr
, &r
->in
.local_machine
)) {
27515 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
));
27517 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.local_machine
), sizeof(uint16_t)));
27518 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
));
27519 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_local_machine_0
, 0);
27521 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.printer_local
));
27522 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_notify_options
));
27523 if (_ptr_notify_options
) {
27524 NDR_PULL_ALLOC(ndr
, r
->in
.notify_options
);
27526 r
->in
.notify_options
= NULL
;
27528 if (r
->in
.notify_options
) {
27529 _mem_save_notify_options_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27530 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.notify_options
, 0);
27531 NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.notify_options
));
27532 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_notify_options_0
, 0);
27535 if (flags
& NDR_OUT
) {
27536 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27538 return NDR_ERR_SUCCESS
;
27541 _PUBLIC_
void ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
*r
)
27543 ndr_print_struct(ndr
, name
, "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
27545 if (flags
& NDR_SET_VALUES
) {
27546 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27548 if (flags
& NDR_IN
) {
27549 ndr_print_struct(ndr
, "in", "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
27551 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
27553 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
27555 ndr_print_spoolss_PrinterChangeFlags(ndr
, "flags", r
->in
.flags
);
27556 ndr_print_uint32(ndr
, "options", r
->in
.options
);
27557 ndr_print_ptr(ndr
, "local_machine", r
->in
.local_machine
);
27559 if (r
->in
.local_machine
) {
27560 ndr_print_string(ndr
, "local_machine", r
->in
.local_machine
);
27563 ndr_print_uint32(ndr
, "printer_local", r
->in
.printer_local
);
27564 ndr_print_ptr(ndr
, "notify_options", r
->in
.notify_options
);
27566 if (r
->in
.notify_options
) {
27567 ndr_print_spoolss_NotifyOption(ndr
, "notify_options", r
->in
.notify_options
);
27572 if (flags
& NDR_OUT
) {
27573 ndr_print_struct(ndr
, "out", "spoolss_RemoteFindFirstPrinterChangeNotifyEx");
27575 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27581 static enum ndr_err_code
ndr_push_spoolss_RouterReplyPrinterEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterReplyPrinterEx
*r
)
27583 if (flags
& NDR_IN
) {
27584 if (r
->in
.handle
== NULL
) {
27585 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27587 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27588 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.color
));
27589 NDR_CHECK(ndr_push_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
27590 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.reply_type
));
27591 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.info
, r
->in
.reply_type
));
27592 NDR_CHECK(ndr_push_spoolss_ReplyPrinterInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
27594 if (flags
& NDR_OUT
) {
27595 if (r
->out
.reply_result
== NULL
) {
27596 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27598 NDR_CHECK(ndr_push_spoolss_PrinterNotifyFlags(ndr
, NDR_SCALARS
, *r
->out
.reply_result
));
27599 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27601 return NDR_ERR_SUCCESS
;
27604 static enum ndr_err_code
ndr_pull_spoolss_RouterReplyPrinterEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterReplyPrinterEx
*r
)
27606 TALLOC_CTX
*_mem_save_handle_0
;
27607 TALLOC_CTX
*_mem_save_reply_result_0
;
27608 if (flags
& NDR_IN
) {
27609 ZERO_STRUCT(r
->out
);
27611 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27612 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
27614 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27615 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27616 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27617 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27618 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.color
));
27619 NDR_CHECK(ndr_pull_spoolss_PrinterChangeFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
27620 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.reply_type
));
27621 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.info
, r
->in
.reply_type
));
27622 NDR_CHECK(ndr_pull_spoolss_ReplyPrinterInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.info
));
27623 NDR_PULL_ALLOC(ndr
, r
->out
.reply_result
);
27624 ZERO_STRUCTP(r
->out
.reply_result
);
27626 if (flags
& NDR_OUT
) {
27627 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27628 NDR_PULL_ALLOC(ndr
, r
->out
.reply_result
);
27630 _mem_save_reply_result_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27631 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.reply_result
, LIBNDR_FLAG_REF_ALLOC
);
27632 NDR_CHECK(ndr_pull_spoolss_PrinterNotifyFlags(ndr
, NDR_SCALARS
, r
->out
.reply_result
));
27633 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_reply_result_0
, LIBNDR_FLAG_REF_ALLOC
);
27634 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27636 return NDR_ERR_SUCCESS
;
27639 _PUBLIC_
void ndr_print_spoolss_RouterReplyPrinterEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterReplyPrinterEx
*r
)
27641 ndr_print_struct(ndr
, name
, "spoolss_RouterReplyPrinterEx");
27643 if (flags
& NDR_SET_VALUES
) {
27644 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27646 if (flags
& NDR_IN
) {
27647 ndr_print_struct(ndr
, "in", "spoolss_RouterReplyPrinterEx");
27649 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
27651 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
27653 ndr_print_uint32(ndr
, "color", r
->in
.color
);
27654 ndr_print_spoolss_PrinterChangeFlags(ndr
, "flags", r
->in
.flags
);
27655 ndr_print_uint32(ndr
, "reply_type", r
->in
.reply_type
);
27656 ndr_print_set_switch_value(ndr
, &r
->in
.info
, r
->in
.reply_type
);
27657 ndr_print_spoolss_ReplyPrinterInfo(ndr
, "info", &r
->in
.info
);
27660 if (flags
& NDR_OUT
) {
27661 ndr_print_struct(ndr
, "out", "spoolss_RouterReplyPrinterEx");
27663 ndr_print_ptr(ndr
, "reply_result", r
->out
.reply_result
);
27665 ndr_print_spoolss_PrinterNotifyFlags(ndr
, "reply_result", *r
->out
.reply_result
);
27667 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27673 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_push
*ndr
, int flags
, const struct spoolss_RouterRefreshPrinterChangeNotify
*r
)
27675 if (flags
& NDR_IN
) {
27676 if (r
->in
.handle
== NULL
) {
27677 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27679 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27680 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.change_low
));
27681 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.options
));
27682 if (r
->in
.options
) {
27683 NDR_CHECK(ndr_push_spoolss_NotifyOption(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.options
));
27686 if (flags
& NDR_OUT
) {
27687 if (r
->out
.info
== NULL
) {
27688 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27690 NDR_CHECK(ndr_push_unique_ptr(ndr
, *r
->out
.info
));
27691 if (*r
->out
.info
) {
27692 NDR_CHECK(ndr_push_spoolss_NotifyInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
27694 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27696 return NDR_ERR_SUCCESS
;
27699 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_pull
*ndr
, int flags
, struct spoolss_RouterRefreshPrinterChangeNotify
*r
)
27701 uint32_t _ptr_options
;
27702 uint32_t _ptr_info
;
27703 TALLOC_CTX
*_mem_save_handle_0
;
27704 TALLOC_CTX
*_mem_save_options_0
;
27705 TALLOC_CTX
*_mem_save_info_0
;
27706 TALLOC_CTX
*_mem_save_info_1
;
27707 if (flags
& NDR_IN
) {
27708 ZERO_STRUCT(r
->out
);
27710 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27711 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
27713 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27714 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27715 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
27716 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27717 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.change_low
));
27718 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_options
));
27719 if (_ptr_options
) {
27720 NDR_PULL_ALLOC(ndr
, r
->in
.options
);
27722 r
->in
.options
= NULL
;
27724 if (r
->in
.options
) {
27725 _mem_save_options_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27726 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.options
, 0);
27727 NDR_CHECK(ndr_pull_spoolss_NotifyOption(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.options
));
27728 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_options_0
, 0);
27730 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
27731 ZERO_STRUCTP(r
->out
.info
);
27733 if (flags
& NDR_OUT
) {
27734 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27735 NDR_PULL_ALLOC(ndr
, r
->out
.info
);
27737 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27738 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, LIBNDR_FLAG_REF_ALLOC
);
27739 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_info
));
27741 NDR_PULL_ALLOC(ndr
, *r
->out
.info
);
27743 *r
->out
.info
= NULL
;
27745 if (*r
->out
.info
) {
27746 _mem_save_info_1
= NDR_PULL_GET_MEM_CTX(ndr
);
27747 NDR_PULL_SET_MEM_CTX(ndr
, *r
->out
.info
, 0);
27748 NDR_CHECK(ndr_pull_spoolss_NotifyInfo(ndr
, NDR_SCALARS
|NDR_BUFFERS
, *r
->out
.info
));
27749 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_1
, 0);
27751 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, LIBNDR_FLAG_REF_ALLOC
);
27752 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27754 return NDR_ERR_SUCCESS
;
27757 _PUBLIC_
void ndr_print_spoolss_RouterRefreshPrinterChangeNotify(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_RouterRefreshPrinterChangeNotify
*r
)
27759 ndr_print_struct(ndr
, name
, "spoolss_RouterRefreshPrinterChangeNotify");
27761 if (flags
& NDR_SET_VALUES
) {
27762 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27764 if (flags
& NDR_IN
) {
27765 ndr_print_struct(ndr
, "in", "spoolss_RouterRefreshPrinterChangeNotify");
27767 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
27769 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
27771 ndr_print_uint32(ndr
, "change_low", r
->in
.change_low
);
27772 ndr_print_ptr(ndr
, "options", r
->in
.options
);
27774 if (r
->in
.options
) {
27775 ndr_print_spoolss_NotifyOption(ndr
, "options", r
->in
.options
);
27780 if (flags
& NDR_OUT
) {
27781 ndr_print_struct(ndr
, "out", "spoolss_RouterRefreshPrinterChangeNotify");
27783 ndr_print_ptr(ndr
, "info", r
->out
.info
);
27785 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
27787 if (*r
->out
.info
) {
27788 ndr_print_spoolss_NotifyInfo(ndr
, "info", *r
->out
.info
);
27792 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27798 static enum ndr_err_code
ndr_push_spoolss_44(struct ndr_push
*ndr
, int flags
, const struct spoolss_44
*r
)
27800 if (flags
& NDR_IN
) {
27802 if (flags
& NDR_OUT
) {
27803 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27805 return NDR_ERR_SUCCESS
;
27808 static enum ndr_err_code
ndr_pull_spoolss_44(struct ndr_pull
*ndr
, int flags
, struct spoolss_44
*r
)
27810 if (flags
& NDR_IN
) {
27812 if (flags
& NDR_OUT
) {
27813 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27815 return NDR_ERR_SUCCESS
;
27818 _PUBLIC_
void ndr_print_spoolss_44(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_44
*r
)
27820 ndr_print_struct(ndr
, name
, "spoolss_44");
27822 if (flags
& NDR_SET_VALUES
) {
27823 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27825 if (flags
& NDR_IN
) {
27826 ndr_print_struct(ndr
, "in", "spoolss_44");
27830 if (flags
& NDR_OUT
) {
27831 ndr_print_struct(ndr
, "out", "spoolss_44");
27833 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27839 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_OpenPrinterEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_OpenPrinterEx
*r
)
27841 if (flags
& NDR_IN
) {
27842 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.printername
));
27843 if (r
->in
.printername
) {
27844 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.printername
, CH_UTF16
)));
27845 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
27846 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.printername
, CH_UTF16
)));
27847 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.printername
, ndr_charset_length(r
->in
.printername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
27849 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.datatype
));
27850 if (r
->in
.datatype
) {
27851 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
)));
27852 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
27853 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
)));
27854 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.datatype
, ndr_charset_length(r
->in
.datatype
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
27856 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.devmode_ctr
));
27857 NDR_CHECK(ndr_push_spoolss_AccessRights(ndr
, NDR_SCALARS
, r
->in
.access_mask
));
27858 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.level
));
27859 NDR_CHECK(ndr_push_set_switch_value(ndr
, &r
->in
.userlevel
, r
->in
.level
));
27860 NDR_CHECK(ndr_push_spoolss_UserLevel(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.userlevel
));
27862 if (flags
& NDR_OUT
) {
27863 if (r
->out
.handle
== NULL
) {
27864 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27866 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
27867 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
27869 return NDR_ERR_SUCCESS
;
27872 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_OpenPrinterEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_OpenPrinterEx
*r
)
27874 uint32_t _ptr_printername
;
27875 uint32_t _ptr_datatype
;
27876 TALLOC_CTX
*_mem_save_printername_0
;
27877 TALLOC_CTX
*_mem_save_datatype_0
;
27878 TALLOC_CTX
*_mem_save_handle_0
;
27879 if (flags
& NDR_IN
) {
27880 ZERO_STRUCT(r
->out
);
27882 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_printername
));
27883 if (_ptr_printername
) {
27884 NDR_PULL_ALLOC(ndr
, r
->in
.printername
);
27886 r
->in
.printername
= NULL
;
27888 if (r
->in
.printername
) {
27889 _mem_save_printername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27890 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.printername
, 0);
27891 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.printername
));
27892 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.printername
));
27893 if (ndr_get_array_length(ndr
, &r
->in
.printername
) > ndr_get_array_size(ndr
, &r
->in
.printername
)) {
27894 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
));
27896 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.printername
), sizeof(uint16_t)));
27897 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.printername
, ndr_get_array_length(ndr
, &r
->in
.printername
), sizeof(uint16_t), CH_UTF16
));
27898 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_printername_0
, 0);
27900 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_datatype
));
27901 if (_ptr_datatype
) {
27902 NDR_PULL_ALLOC(ndr
, r
->in
.datatype
);
27904 r
->in
.datatype
= NULL
;
27906 if (r
->in
.datatype
) {
27907 _mem_save_datatype_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27908 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.datatype
, 0);
27909 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.datatype
));
27910 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.datatype
));
27911 if (ndr_get_array_length(ndr
, &r
->in
.datatype
) > ndr_get_array_size(ndr
, &r
->in
.datatype
)) {
27912 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
));
27914 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.datatype
), sizeof(uint16_t)));
27915 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.datatype
, ndr_get_array_length(ndr
, &r
->in
.datatype
), sizeof(uint16_t), CH_UTF16
));
27916 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_datatype_0
, 0);
27918 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.devmode_ctr
));
27919 NDR_CHECK(ndr_pull_spoolss_AccessRights(ndr
, NDR_SCALARS
, &r
->in
.access_mask
));
27920 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.level
));
27921 NDR_CHECK(ndr_pull_set_switch_value(ndr
, &r
->in
.userlevel
, r
->in
.level
));
27922 NDR_CHECK(ndr_pull_spoolss_UserLevel(ndr
, NDR_SCALARS
|NDR_BUFFERS
, &r
->in
.userlevel
));
27923 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
27924 ZERO_STRUCTP(r
->out
.handle
);
27926 if (flags
& NDR_OUT
) {
27927 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
27928 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
27930 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
27931 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
27932 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
27933 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
27934 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
27936 return NDR_ERR_SUCCESS
;
27939 _PUBLIC_
void ndr_print_spoolss_OpenPrinterEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_OpenPrinterEx
*r
)
27941 ndr_print_struct(ndr
, name
, "spoolss_OpenPrinterEx");
27943 if (flags
& NDR_SET_VALUES
) {
27944 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
27946 if (flags
& NDR_IN
) {
27947 ndr_print_struct(ndr
, "in", "spoolss_OpenPrinterEx");
27949 ndr_print_ptr(ndr
, "printername", r
->in
.printername
);
27951 if (r
->in
.printername
) {
27952 ndr_print_string(ndr
, "printername", r
->in
.printername
);
27955 ndr_print_ptr(ndr
, "datatype", r
->in
.datatype
);
27957 if (r
->in
.datatype
) {
27958 ndr_print_string(ndr
, "datatype", r
->in
.datatype
);
27961 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", &r
->in
.devmode_ctr
);
27962 ndr_print_spoolss_AccessRights(ndr
, "access_mask", r
->in
.access_mask
);
27963 ndr_print_uint32(ndr
, "level", r
->in
.level
);
27964 ndr_print_set_switch_value(ndr
, &r
->in
.userlevel
, r
->in
.level
);
27965 ndr_print_spoolss_UserLevel(ndr
, "userlevel", &r
->in
.userlevel
);
27968 if (flags
& NDR_OUT
) {
27969 ndr_print_struct(ndr
, "out", "spoolss_OpenPrinterEx");
27971 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
27973 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
27975 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
27981 static enum ndr_err_code
ndr_push_spoolss_AddPrinterEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinterEx
*r
)
27983 if (flags
& NDR_IN
) {
27984 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
27985 if (r
->in
.server
) {
27986 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
27987 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
27988 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
27989 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
27991 if (r
->in
.info_ctr
== NULL
) {
27992 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27994 NDR_CHECK(ndr_push_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
27995 if (r
->in
.devmode_ctr
== NULL
) {
27996 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
27998 NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
27999 if (r
->in
.secdesc_ctr
== NULL
) {
28000 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28002 NDR_CHECK(ndr_push_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
28003 if (r
->in
.userlevel_ctr
== NULL
) {
28004 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28006 NDR_CHECK(ndr_push_spoolss_UserLevelCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.userlevel_ctr
));
28008 if (flags
& NDR_OUT
) {
28009 if (r
->out
.handle
== NULL
) {
28010 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28012 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
28013 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28015 return NDR_ERR_SUCCESS
;
28018 static enum ndr_err_code
ndr_pull_spoolss_AddPrinterEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinterEx
*r
)
28020 uint32_t _ptr_server
;
28021 TALLOC_CTX
*_mem_save_server_0
;
28022 TALLOC_CTX
*_mem_save_info_ctr_0
;
28023 TALLOC_CTX
*_mem_save_devmode_ctr_0
;
28024 TALLOC_CTX
*_mem_save_secdesc_ctr_0
;
28025 TALLOC_CTX
*_mem_save_userlevel_ctr_0
;
28026 TALLOC_CTX
*_mem_save_handle_0
;
28027 if (flags
& NDR_IN
) {
28028 ZERO_STRUCT(r
->out
);
28030 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
28032 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
28034 r
->in
.server
= NULL
;
28036 if (r
->in
.server
) {
28037 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28038 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
28039 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
28040 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
28041 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
28042 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
));
28044 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
28045 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
28046 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
28048 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28049 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
28051 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28052 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
28053 NDR_CHECK(ndr_pull_spoolss_SetPrinterInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
28054 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
28055 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28056 NDR_PULL_ALLOC(ndr
, r
->in
.devmode_ctr
);
28058 _mem_save_devmode_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28059 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.devmode_ctr
, LIBNDR_FLAG_REF_ALLOC
);
28060 NDR_CHECK(ndr_pull_spoolss_DevmodeContainer(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.devmode_ctr
));
28061 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_devmode_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
28062 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28063 NDR_PULL_ALLOC(ndr
, r
->in
.secdesc_ctr
);
28065 _mem_save_secdesc_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28066 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.secdesc_ctr
, LIBNDR_FLAG_REF_ALLOC
);
28067 NDR_CHECK(ndr_pull_sec_desc_buf(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.secdesc_ctr
));
28068 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_secdesc_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
28069 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28070 NDR_PULL_ALLOC(ndr
, r
->in
.userlevel_ctr
);
28072 _mem_save_userlevel_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28073 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.userlevel_ctr
, LIBNDR_FLAG_REF_ALLOC
);
28074 NDR_CHECK(ndr_pull_spoolss_UserLevelCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.userlevel_ctr
));
28075 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_userlevel_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
28076 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
28077 ZERO_STRUCTP(r
->out
.handle
);
28079 if (flags
& NDR_OUT
) {
28080 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28081 NDR_PULL_ALLOC(ndr
, r
->out
.handle
);
28083 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28084 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.handle
, LIBNDR_FLAG_REF_ALLOC
);
28085 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->out
.handle
));
28086 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
28087 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28089 return NDR_ERR_SUCCESS
;
28092 _PUBLIC_
void ndr_print_spoolss_AddPrinterEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinterEx
*r
)
28094 ndr_print_struct(ndr
, name
, "spoolss_AddPrinterEx");
28096 if (flags
& NDR_SET_VALUES
) {
28097 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28099 if (flags
& NDR_IN
) {
28100 ndr_print_struct(ndr
, "in", "spoolss_AddPrinterEx");
28102 ndr_print_ptr(ndr
, "server", r
->in
.server
);
28104 if (r
->in
.server
) {
28105 ndr_print_string(ndr
, "server", r
->in
.server
);
28108 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
28110 ndr_print_spoolss_SetPrinterInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
28112 ndr_print_ptr(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
28114 ndr_print_spoolss_DevmodeContainer(ndr
, "devmode_ctr", r
->in
.devmode_ctr
);
28116 ndr_print_ptr(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
28118 ndr_print_sec_desc_buf(ndr
, "secdesc_ctr", r
->in
.secdesc_ctr
);
28120 ndr_print_ptr(ndr
, "userlevel_ctr", r
->in
.userlevel_ctr
);
28122 ndr_print_spoolss_UserLevelCtr(ndr
, "userlevel_ctr", r
->in
.userlevel_ctr
);
28126 if (flags
& NDR_OUT
) {
28127 ndr_print_struct(ndr
, "out", "spoolss_AddPrinterEx");
28129 ndr_print_ptr(ndr
, "handle", r
->out
.handle
);
28131 ndr_print_policy_handle(ndr
, "handle", r
->out
.handle
);
28133 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28139 static enum ndr_err_code
ndr_push_spoolss_47(struct ndr_push
*ndr
, int flags
, const struct spoolss_47
*r
)
28141 if (flags
& NDR_IN
) {
28143 if (flags
& NDR_OUT
) {
28144 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28146 return NDR_ERR_SUCCESS
;
28149 static enum ndr_err_code
ndr_pull_spoolss_47(struct ndr_pull
*ndr
, int flags
, struct spoolss_47
*r
)
28151 if (flags
& NDR_IN
) {
28153 if (flags
& NDR_OUT
) {
28154 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28156 return NDR_ERR_SUCCESS
;
28159 _PUBLIC_
void ndr_print_spoolss_47(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_47
*r
)
28161 ndr_print_struct(ndr
, name
, "spoolss_47");
28163 if (flags
& NDR_SET_VALUES
) {
28164 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28166 if (flags
& NDR_IN
) {
28167 ndr_print_struct(ndr
, "in", "spoolss_47");
28171 if (flags
& NDR_OUT
) {
28172 ndr_print_struct(ndr
, "out", "spoolss_47");
28174 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28180 static enum ndr_err_code
ndr_push_spoolss_EnumPrinterData(struct ndr_push
*ndr
, int flags
, const struct spoolss_EnumPrinterData
*r
)
28182 if (flags
& NDR_IN
) {
28183 if (r
->in
.handle
== NULL
) {
28184 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28186 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28187 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.enum_index
));
28188 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.value_offered
));
28189 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.data_offered
));
28191 if (flags
& NDR_OUT
) {
28192 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.value_offered
/ 2));
28193 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->out
.value_name
, r
->in
.value_offered
/ 2, sizeof(uint16_t), CH_UTF16
));
28194 if (r
->out
.value_needed
== NULL
) {
28195 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28197 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.value_needed
));
28198 if (r
->out
.type
== NULL
) {
28199 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28201 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->out
.type
));
28203 uint32_t _flags_save_uint8
= ndr
->flags
;
28204 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
28205 if (r
->out
.data
== NULL
) {
28206 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28208 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.data_offered
));
28209 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.data_offered
));
28210 ndr
->flags
= _flags_save_uint8
;
28212 if (r
->out
.data_needed
== NULL
) {
28213 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28215 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.data_needed
));
28216 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28218 return NDR_ERR_SUCCESS
;
28221 static enum ndr_err_code
ndr_pull_spoolss_EnumPrinterData(struct ndr_pull
*ndr
, int flags
, struct spoolss_EnumPrinterData
*r
)
28223 TALLOC_CTX
*_mem_save_handle_0
;
28224 TALLOC_CTX
*_mem_save_value_needed_0
;
28225 TALLOC_CTX
*_mem_save_type_0
;
28226 TALLOC_CTX
*_mem_save_data_needed_0
;
28227 if (flags
& NDR_IN
) {
28228 ZERO_STRUCT(r
->out
);
28230 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28231 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
28233 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28234 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
28235 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28236 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
28237 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.enum_index
));
28238 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.value_offered
));
28239 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.data_offered
));
28240 NDR_PULL_ALLOC(ndr
, r
->out
.value_needed
);
28241 ZERO_STRUCTP(r
->out
.value_needed
);
28242 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
28243 ZERO_STRUCTP(r
->out
.type
);
28244 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.data_offered
);
28245 memset(r
->out
.data
, 0, (r
->in
.data_offered
) * sizeof(*r
->out
.data
));
28246 NDR_PULL_ALLOC(ndr
, r
->out
.data_needed
);
28247 ZERO_STRUCTP(r
->out
.data_needed
);
28249 if (flags
& NDR_OUT
) {
28250 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.value_name
));
28251 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
));
28252 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28253 NDR_PULL_ALLOC(ndr
, r
->out
.value_needed
);
28255 _mem_save_value_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28256 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.value_needed
, LIBNDR_FLAG_REF_ALLOC
);
28257 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.value_needed
));
28258 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_value_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
28259 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28260 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
28262 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28263 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.type
, LIBNDR_FLAG_REF_ALLOC
);
28264 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->out
.type
));
28265 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, LIBNDR_FLAG_REF_ALLOC
);
28267 uint32_t _flags_save_uint8
= ndr
->flags
;
28268 ndr_set_flags(&ndr
->flags
, LIBNDR_PRINT_ARRAY_HEX
);
28269 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
28270 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28271 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
28273 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
)));
28274 ndr
->flags
= _flags_save_uint8
;
28276 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28277 NDR_PULL_ALLOC(ndr
, r
->out
.data_needed
);
28279 _mem_save_data_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28280 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.data_needed
, LIBNDR_FLAG_REF_ALLOC
);
28281 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.data_needed
));
28282 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_data_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
28283 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28284 if (r
->out
.value_name
) {
28285 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.value_name
, r
->in
.value_offered
/ 2));
28288 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.data_offered
));
28291 return NDR_ERR_SUCCESS
;
28294 _PUBLIC_
void ndr_print_spoolss_EnumPrinterData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinterData
*r
)
28296 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinterData");
28298 if (flags
& NDR_SET_VALUES
) {
28299 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28301 if (flags
& NDR_IN
) {
28302 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinterData");
28304 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
28306 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
28308 ndr_print_uint32(ndr
, "enum_index", r
->in
.enum_index
);
28309 ndr_print_uint32(ndr
, "value_offered", r
->in
.value_offered
);
28310 ndr_print_uint32(ndr
, "data_offered", r
->in
.data_offered
);
28313 if (flags
& NDR_OUT
) {
28314 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinterData");
28316 ndr_print_string(ndr
, "value_name", r
->out
.value_name
);
28317 ndr_print_ptr(ndr
, "value_needed", r
->out
.value_needed
);
28319 ndr_print_uint32(ndr
, "value_needed", *r
->out
.value_needed
);
28321 ndr_print_ptr(ndr
, "type", r
->out
.type
);
28323 ndr_print_winreg_Type(ndr
, "type", *r
->out
.type
);
28325 ndr_print_ptr(ndr
, "data", r
->out
.data
);
28327 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.data_offered
);
28329 ndr_print_ptr(ndr
, "data_needed", r
->out
.data_needed
);
28331 ndr_print_uint32(ndr
, "data_needed", *r
->out
.data_needed
);
28333 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28339 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterData(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterData
*r
)
28341 if (flags
& NDR_IN
) {
28342 if (r
->in
.handle
== NULL
) {
28343 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28345 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28346 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
28347 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
28348 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
28349 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
));
28351 if (flags
& NDR_OUT
) {
28352 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28354 return NDR_ERR_SUCCESS
;
28357 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterData(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterData
*r
)
28359 TALLOC_CTX
*_mem_save_handle_0
;
28360 if (flags
& NDR_IN
) {
28361 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28362 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
28364 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28365 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
28366 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28367 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
28368 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
28369 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
28370 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
28371 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
));
28373 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
28374 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
));
28376 if (flags
& NDR_OUT
) {
28377 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28379 return NDR_ERR_SUCCESS
;
28382 _PUBLIC_
void ndr_print_spoolss_DeletePrinterData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterData
*r
)
28384 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterData");
28386 if (flags
& NDR_SET_VALUES
) {
28387 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28389 if (flags
& NDR_IN
) {
28390 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterData");
28392 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
28394 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
28396 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
28399 if (flags
& NDR_OUT
) {
28400 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterData");
28402 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28408 static enum ndr_err_code
ndr_push_spoolss_4a(struct ndr_push
*ndr
, int flags
, const struct spoolss_4a
*r
)
28410 if (flags
& NDR_IN
) {
28412 if (flags
& NDR_OUT
) {
28413 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28415 return NDR_ERR_SUCCESS
;
28418 static enum ndr_err_code
ndr_pull_spoolss_4a(struct ndr_pull
*ndr
, int flags
, struct spoolss_4a
*r
)
28420 if (flags
& NDR_IN
) {
28422 if (flags
& NDR_OUT
) {
28423 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28425 return NDR_ERR_SUCCESS
;
28428 _PUBLIC_
void ndr_print_spoolss_4a(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_4a
*r
)
28430 ndr_print_struct(ndr
, name
, "spoolss_4a");
28432 if (flags
& NDR_SET_VALUES
) {
28433 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28435 if (flags
& NDR_IN
) {
28436 ndr_print_struct(ndr
, "in", "spoolss_4a");
28440 if (flags
& NDR_OUT
) {
28441 ndr_print_struct(ndr
, "out", "spoolss_4a");
28443 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28449 static enum ndr_err_code
ndr_push_spoolss_4b(struct ndr_push
*ndr
, int flags
, const struct spoolss_4b
*r
)
28451 if (flags
& NDR_IN
) {
28453 if (flags
& NDR_OUT
) {
28454 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28456 return NDR_ERR_SUCCESS
;
28459 static enum ndr_err_code
ndr_pull_spoolss_4b(struct ndr_pull
*ndr
, int flags
, struct spoolss_4b
*r
)
28461 if (flags
& NDR_IN
) {
28463 if (flags
& NDR_OUT
) {
28464 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28466 return NDR_ERR_SUCCESS
;
28469 _PUBLIC_
void ndr_print_spoolss_4b(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_4b
*r
)
28471 ndr_print_struct(ndr
, name
, "spoolss_4b");
28473 if (flags
& NDR_SET_VALUES
) {
28474 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28476 if (flags
& NDR_IN
) {
28477 ndr_print_struct(ndr
, "in", "spoolss_4b");
28481 if (flags
& NDR_OUT
) {
28482 ndr_print_struct(ndr
, "out", "spoolss_4b");
28484 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28490 static enum ndr_err_code
ndr_push_spoolss_4c(struct ndr_push
*ndr
, int flags
, const struct spoolss_4c
*r
)
28492 if (flags
& NDR_IN
) {
28494 if (flags
& NDR_OUT
) {
28495 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28497 return NDR_ERR_SUCCESS
;
28500 static enum ndr_err_code
ndr_pull_spoolss_4c(struct ndr_pull
*ndr
, int flags
, struct spoolss_4c
*r
)
28502 if (flags
& NDR_IN
) {
28504 if (flags
& NDR_OUT
) {
28505 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28507 return NDR_ERR_SUCCESS
;
28510 _PUBLIC_
void ndr_print_spoolss_4c(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_4c
*r
)
28512 ndr_print_struct(ndr
, name
, "spoolss_4c");
28514 if (flags
& NDR_SET_VALUES
) {
28515 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28517 if (flags
& NDR_IN
) {
28518 ndr_print_struct(ndr
, "in", "spoolss_4c");
28522 if (flags
& NDR_OUT
) {
28523 ndr_print_struct(ndr
, "out", "spoolss_4c");
28525 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28531 static enum ndr_err_code
ndr_push_spoolss_SetPrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_SetPrinterDataEx
*r
)
28533 if (flags
& NDR_IN
) {
28534 if (r
->in
.handle
== NULL
) {
28535 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28537 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28538 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
28539 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
28540 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
28541 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
));
28542 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
28543 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
28544 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
28545 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
));
28546 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, r
->in
.type
));
28547 if (r
->in
.data
== NULL
) {
28548 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28550 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
28551 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, r
->in
.offered
));
28552 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
28554 if (flags
& NDR_OUT
) {
28555 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28557 return NDR_ERR_SUCCESS
;
28560 static enum ndr_err_code
ndr_pull_spoolss_SetPrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_SetPrinterDataEx
*r
)
28562 TALLOC_CTX
*_mem_save_handle_0
;
28563 if (flags
& NDR_IN
) {
28564 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28565 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
28567 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28568 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
28569 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28570 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
28571 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
28572 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
28573 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
28574 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
));
28576 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
28577 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
));
28578 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
28579 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
28580 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
28581 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
));
28583 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
28584 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
));
28585 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, &r
->in
.type
));
28586 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.data
));
28587 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28588 NDR_PULL_ALLOC_N(ndr
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
));
28590 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->in
.data
, ndr_get_array_size(ndr
, &r
->in
.data
)));
28591 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
28593 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.data
, r
->in
.offered
));
28596 if (flags
& NDR_OUT
) {
28597 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28599 return NDR_ERR_SUCCESS
;
28602 _PUBLIC_
void ndr_print_spoolss_SetPrinterDataEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_SetPrinterDataEx
*r
)
28604 ndr_print_struct(ndr
, name
, "spoolss_SetPrinterDataEx");
28606 if (flags
& NDR_SET_VALUES
) {
28607 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28609 if (flags
& NDR_IN
) {
28610 ndr_print_struct(ndr
, "in", "spoolss_SetPrinterDataEx");
28612 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
28614 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
28616 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
28617 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
28618 ndr_print_winreg_Type(ndr
, "type", r
->in
.type
);
28619 ndr_print_ptr(ndr
, "data", r
->in
.data
);
28621 ndr_print_array_uint8(ndr
, "data", r
->in
.data
, r
->in
.offered
);
28623 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
28626 if (flags
& NDR_OUT
) {
28627 ndr_print_struct(ndr
, "out", "spoolss_SetPrinterDataEx");
28629 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28635 static enum ndr_err_code
ndr_push_spoolss_GetPrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDataEx
*r
)
28637 if (flags
& NDR_IN
) {
28638 if (r
->in
.handle
== NULL
) {
28639 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28641 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28642 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
28643 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
28644 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
28645 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
));
28646 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
28647 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
28648 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
28649 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
));
28650 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
28652 if (flags
& NDR_OUT
) {
28653 if (r
->out
.type
== NULL
) {
28654 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28656 NDR_CHECK(ndr_push_winreg_Type(ndr
, NDR_SCALARS
, *r
->out
.type
));
28657 if (r
->out
.data
== NULL
) {
28658 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28660 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.offered
));
28661 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, r
->in
.offered
));
28662 if (r
->out
.needed
== NULL
) {
28663 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28665 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
28666 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28668 return NDR_ERR_SUCCESS
;
28671 static enum ndr_err_code
ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDataEx
*r
)
28673 TALLOC_CTX
*_mem_save_handle_0
;
28674 TALLOC_CTX
*_mem_save_type_0
;
28675 TALLOC_CTX
*_mem_save_needed_0
;
28676 if (flags
& NDR_IN
) {
28677 ZERO_STRUCT(r
->out
);
28679 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28680 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
28682 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28683 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
28684 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28685 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
28686 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
28687 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
28688 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
28689 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
));
28691 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
28692 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
));
28693 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
28694 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
28695 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
28696 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
));
28698 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
28699 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
));
28700 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
28701 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
28702 ZERO_STRUCTP(r
->out
.type
);
28703 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, r
->in
.offered
);
28704 memset(r
->out
.data
, 0, (r
->in
.offered
) * sizeof(*r
->out
.data
));
28705 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
28706 ZERO_STRUCTP(r
->out
.needed
);
28708 if (flags
& NDR_OUT
) {
28709 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28710 NDR_PULL_ALLOC(ndr
, r
->out
.type
);
28712 _mem_save_type_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28713 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.type
, LIBNDR_FLAG_REF_ALLOC
);
28714 NDR_CHECK(ndr_pull_winreg_Type(ndr
, NDR_SCALARS
, r
->out
.type
));
28715 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_type_0
, LIBNDR_FLAG_REF_ALLOC
);
28716 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.data
));
28717 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28718 NDR_PULL_ALLOC_N(ndr
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
));
28720 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.data
, ndr_get_array_size(ndr
, &r
->out
.data
)));
28721 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28722 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
28724 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28725 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
28726 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
28727 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
28728 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28730 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.data
, r
->in
.offered
));
28733 return NDR_ERR_SUCCESS
;
28736 _PUBLIC_
void ndr_print_spoolss_GetPrinterDataEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDataEx
*r
)
28738 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDataEx");
28740 if (flags
& NDR_SET_VALUES
) {
28741 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28743 if (flags
& NDR_IN
) {
28744 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDataEx");
28746 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
28748 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
28750 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
28751 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
28752 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
28755 if (flags
& NDR_OUT
) {
28756 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDataEx");
28758 ndr_print_ptr(ndr
, "type", r
->out
.type
);
28760 ndr_print_winreg_Type(ndr
, "type", *r
->out
.type
);
28762 ndr_print_ptr(ndr
, "data", r
->out
.data
);
28764 ndr_print_array_uint8(ndr
, "data", r
->out
.data
, r
->in
.offered
);
28766 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
28768 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
28770 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28776 _PUBLIC_
enum ndr_err_code
ndr_push__spoolss_EnumPrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct _spoolss_EnumPrinterDataEx
*r
)
28778 if (flags
& NDR_IN
) {
28779 if (r
->in
.handle
== NULL
) {
28780 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28782 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28783 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
28784 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
28785 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
28786 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
));
28787 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
28789 if (flags
& NDR_OUT
) {
28790 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->out
.info
));
28791 if (r
->out
.needed
== NULL
) {
28792 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28794 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
28795 if (r
->out
.count
== NULL
) {
28796 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28798 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.count
));
28799 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28801 return NDR_ERR_SUCCESS
;
28804 _PUBLIC_
enum ndr_err_code
ndr_pull__spoolss_EnumPrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct _spoolss_EnumPrinterDataEx
*r
)
28806 TALLOC_CTX
*_mem_save_handle_0
;
28807 TALLOC_CTX
*_mem_save_needed_0
;
28808 TALLOC_CTX
*_mem_save_count_0
;
28809 if (flags
& NDR_IN
) {
28810 ZERO_STRUCT(r
->out
);
28812 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28813 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
28815 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28816 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
28817 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28818 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
28819 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
28820 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
28821 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
28822 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
));
28824 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
28825 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
));
28826 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
28827 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
28828 ZERO_STRUCTP(r
->out
.needed
);
28829 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
28830 ZERO_STRUCTP(r
->out
.count
);
28832 if (flags
& NDR_OUT
) {
28833 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->out
.info
));
28834 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28835 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
28837 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28838 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
28839 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
28840 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
28841 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28842 NDR_PULL_ALLOC(ndr
, r
->out
.count
);
28844 _mem_save_count_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28845 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.count
, LIBNDR_FLAG_REF_ALLOC
);
28846 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.count
));
28847 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_count_0
, LIBNDR_FLAG_REF_ALLOC
);
28848 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
28850 return NDR_ERR_SUCCESS
;
28853 _PUBLIC_
enum ndr_err_code
ndr_push___spoolss_EnumPrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct __spoolss_EnumPrinterDataEx
*r
)
28855 uint32_t cntr_info_0
;
28856 if (flags
& NDR_IN
) {
28857 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.count
));
28859 if (flags
& NDR_OUT
) {
28860 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
28861 NDR_CHECK(ndr_push_spoolss_PrinterEnumValues(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
28863 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
28864 NDR_CHECK(ndr_push_spoolss_PrinterEnumValues(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
28867 return NDR_ERR_SUCCESS
;
28870 _PUBLIC_
enum ndr_err_code
ndr_pull___spoolss_EnumPrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct __spoolss_EnumPrinterDataEx
*r
)
28872 uint32_t cntr_info_0
;
28873 TALLOC_CTX
*_mem_save_info_0
;
28874 if (flags
& NDR_IN
) {
28875 ZERO_STRUCT(r
->out
);
28877 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.count
));
28879 if (flags
& NDR_OUT
) {
28880 NDR_PULL_ALLOC_N(ndr
, r
->out
.info
, r
->in
.count
);
28881 _mem_save_info_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28882 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.info
, 0);
28883 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
28884 NDR_CHECK(ndr_pull_spoolss_PrinterEnumValues(ndr
, NDR_SCALARS
, &r
->out
.info
[cntr_info_0
]));
28886 for (cntr_info_0
= 0; cntr_info_0
< r
->in
.count
; cntr_info_0
++) {
28887 NDR_CHECK(ndr_pull_spoolss_PrinterEnumValues(ndr
, NDR_BUFFERS
, &r
->out
.info
[cntr_info_0
]));
28889 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_0
, 0);
28891 return NDR_ERR_SUCCESS
;
28894 _PUBLIC_
void ndr_print_spoolss_EnumPrinterDataEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinterDataEx
*r
)
28896 uint32_t cntr_info_2
;
28897 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinterDataEx");
28899 if (flags
& NDR_SET_VALUES
) {
28900 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
28902 if (flags
& NDR_IN
) {
28903 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinterDataEx");
28905 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
28907 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
28909 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
28910 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
28913 if (flags
& NDR_OUT
) {
28914 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinterDataEx");
28916 ndr_print_ptr(ndr
, "count", r
->out
.count
);
28918 ndr_print_uint32(ndr
, "count", *r
->out
.count
);
28920 ndr_print_ptr(ndr
, "info", r
->out
.info
);
28922 ndr_print_ptr(ndr
, "info", *r
->out
.info
);
28924 if (*r
->out
.info
) {
28925 ndr
->print(ndr
, "%s: ARRAY(%d)", "info", (int)*r
->out
.count
);
28927 for (cntr_info_2
=0;cntr_info_2
<*r
->out
.count
;cntr_info_2
++) {
28929 if (asprintf(&idx_2
, "[%d]", cntr_info_2
) != -1) {
28930 ndr_print_spoolss_PrinterEnumValues(ndr
, "info", &(*r
->out
.info
)[cntr_info_2
]);
28938 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
28940 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
28942 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
28948 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_EnumPrinterKey(struct ndr_push
*ndr
, int flags
, const struct spoolss_EnumPrinterKey
*r
)
28950 if (flags
& NDR_IN
) {
28951 if (r
->in
.handle
== NULL
) {
28952 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28954 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
28955 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
28956 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
28957 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
28958 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
));
28959 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.offered
));
28961 if (flags
& NDR_OUT
) {
28962 if (r
->out
._ndr_size
== NULL
) {
28963 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28965 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
._ndr_size
));
28966 if (r
->out
.key_buffer
== NULL
) {
28967 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28970 struct ndr_push
*_ndr_key_buffer
;
28971 NDR_CHECK(ndr_push_subcontext_start(ndr
, &_ndr_key_buffer
, 0, *r
->out
._ndr_size
* 2));
28972 NDR_CHECK(ndr_push_set_switch_value(_ndr_key_buffer
, r
->out
.key_buffer
, *r
->out
._ndr_size
));
28973 NDR_CHECK(ndr_push_spoolss_KeyNames(_ndr_key_buffer
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.key_buffer
));
28974 NDR_CHECK(ndr_push_subcontext_end(ndr
, _ndr_key_buffer
, 0, *r
->out
._ndr_size
* 2));
28976 if (r
->out
.needed
== NULL
) {
28977 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
28979 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
28980 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
28982 return NDR_ERR_SUCCESS
;
28985 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_EnumPrinterKey(struct ndr_pull
*ndr
, int flags
, struct spoolss_EnumPrinterKey
*r
)
28987 TALLOC_CTX
*_mem_save_handle_0
;
28988 TALLOC_CTX
*_mem_save__ndr_size_0
;
28989 TALLOC_CTX
*_mem_save_key_buffer_0
;
28990 TALLOC_CTX
*_mem_save_needed_0
;
28991 if (flags
& NDR_IN
) {
28992 ZERO_STRUCT(r
->out
);
28994 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
28995 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
28997 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
28998 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
28999 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
29000 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
29001 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
29002 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
29003 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
29004 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
));
29006 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
29007 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
));
29008 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.offered
));
29009 NDR_PULL_ALLOC(ndr
, r
->out
._ndr_size
);
29010 ZERO_STRUCTP(r
->out
._ndr_size
);
29011 NDR_PULL_ALLOC(ndr
, r
->out
.key_buffer
);
29012 ZERO_STRUCTP(r
->out
.key_buffer
);
29013 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
29014 ZERO_STRUCTP(r
->out
.needed
);
29016 if (flags
& NDR_OUT
) {
29017 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29018 NDR_PULL_ALLOC(ndr
, r
->out
._ndr_size
);
29020 _mem_save__ndr_size_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29021 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
._ndr_size
, LIBNDR_FLAG_REF_ALLOC
);
29022 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
._ndr_size
));
29023 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save__ndr_size_0
, LIBNDR_FLAG_REF_ALLOC
);
29024 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29025 NDR_PULL_ALLOC(ndr
, r
->out
.key_buffer
);
29027 _mem_save_key_buffer_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29028 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.key_buffer
, LIBNDR_FLAG_REF_ALLOC
);
29030 struct ndr_pull
*_ndr_key_buffer
;
29031 NDR_CHECK(ndr_pull_subcontext_start(ndr
, &_ndr_key_buffer
, 0, *r
->out
._ndr_size
* 2));
29032 NDR_CHECK(ndr_pull_set_switch_value(_ndr_key_buffer
, r
->out
.key_buffer
, *r
->out
._ndr_size
));
29033 NDR_CHECK(ndr_pull_spoolss_KeyNames(_ndr_key_buffer
, NDR_SCALARS
|NDR_BUFFERS
, r
->out
.key_buffer
));
29034 NDR_CHECK(ndr_pull_subcontext_end(ndr
, _ndr_key_buffer
, 0, *r
->out
._ndr_size
* 2));
29036 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_key_buffer_0
, LIBNDR_FLAG_REF_ALLOC
);
29037 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29038 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
29040 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29041 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
29042 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
29043 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
29044 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29046 return NDR_ERR_SUCCESS
;
29049 _PUBLIC_
void ndr_print_spoolss_EnumPrinterKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_EnumPrinterKey
*r
)
29051 ndr_print_struct(ndr
, name
, "spoolss_EnumPrinterKey");
29053 if (flags
& NDR_SET_VALUES
) {
29054 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29056 if (flags
& NDR_IN
) {
29057 ndr_print_struct(ndr
, "in", "spoolss_EnumPrinterKey");
29059 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
29061 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
29063 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
29064 ndr_print_uint32(ndr
, "offered", r
->in
.offered
);
29067 if (flags
& NDR_OUT
) {
29068 ndr_print_struct(ndr
, "out", "spoolss_EnumPrinterKey");
29070 ndr_print_ptr(ndr
, "_ndr_size", r
->out
._ndr_size
);
29072 ndr_print_uint32(ndr
, "_ndr_size", *r
->out
._ndr_size
);
29074 ndr_print_ptr(ndr
, "key_buffer", r
->out
.key_buffer
);
29076 ndr_print_set_switch_value(ndr
, r
->out
.key_buffer
, *r
->out
._ndr_size
);
29077 ndr_print_spoolss_KeyNames(ndr
, "key_buffer", r
->out
.key_buffer
);
29079 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
29081 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
29083 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29089 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterDataEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterDataEx
*r
)
29091 if (flags
& NDR_IN
) {
29092 if (r
->in
.handle
== NULL
) {
29093 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
29095 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
29096 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
29097 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
29098 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
29099 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
));
29100 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
29101 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
29102 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.value_name
, CH_UTF16
)));
29103 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
));
29105 if (flags
& NDR_OUT
) {
29106 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29108 return NDR_ERR_SUCCESS
;
29111 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterDataEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterDataEx
*r
)
29113 TALLOC_CTX
*_mem_save_handle_0
;
29114 if (flags
& NDR_IN
) {
29115 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29116 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
29118 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29119 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
29120 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
29121 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
29122 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
29123 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
29124 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
29125 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
));
29127 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
29128 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
));
29129 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.value_name
));
29130 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.value_name
));
29131 if (ndr_get_array_length(ndr
, &r
->in
.value_name
) > ndr_get_array_size(ndr
, &r
->in
.value_name
)) {
29132 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
));
29134 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.value_name
), sizeof(uint16_t)));
29135 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
));
29137 if (flags
& NDR_OUT
) {
29138 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29140 return NDR_ERR_SUCCESS
;
29143 _PUBLIC_
void ndr_print_spoolss_DeletePrinterDataEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterDataEx
*r
)
29145 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterDataEx");
29147 if (flags
& NDR_SET_VALUES
) {
29148 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29150 if (flags
& NDR_IN
) {
29151 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterDataEx");
29153 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
29155 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
29157 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
29158 ndr_print_string(ndr
, "value_name", r
->in
.value_name
);
29161 if (flags
& NDR_OUT
) {
29162 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterDataEx");
29164 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29170 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterKey(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterKey
*r
)
29172 if (flags
& NDR_IN
) {
29173 if (r
->in
.handle
== NULL
) {
29174 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
29176 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
29177 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
29178 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
29179 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.key_name
, CH_UTF16
)));
29180 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
));
29182 if (flags
& NDR_OUT
) {
29183 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29185 return NDR_ERR_SUCCESS
;
29188 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterKey(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterKey
*r
)
29190 TALLOC_CTX
*_mem_save_handle_0
;
29191 if (flags
& NDR_IN
) {
29192 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29193 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
29195 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29196 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
29197 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
29198 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
29199 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.key_name
));
29200 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.key_name
));
29201 if (ndr_get_array_length(ndr
, &r
->in
.key_name
) > ndr_get_array_size(ndr
, &r
->in
.key_name
)) {
29202 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
));
29204 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.key_name
), sizeof(uint16_t)));
29205 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
));
29207 if (flags
& NDR_OUT
) {
29208 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29210 return NDR_ERR_SUCCESS
;
29213 _PUBLIC_
void ndr_print_spoolss_DeletePrinterKey(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterKey
*r
)
29215 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterKey");
29217 if (flags
& NDR_SET_VALUES
) {
29218 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29220 if (flags
& NDR_IN
) {
29221 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterKey");
29223 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
29225 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
29227 ndr_print_string(ndr
, "key_name", r
->in
.key_name
);
29230 if (flags
& NDR_OUT
) {
29231 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterKey");
29233 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29239 static enum ndr_err_code
ndr_push_spoolss_53(struct ndr_push
*ndr
, int flags
, const struct spoolss_53
*r
)
29241 if (flags
& NDR_IN
) {
29243 if (flags
& NDR_OUT
) {
29244 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29246 return NDR_ERR_SUCCESS
;
29249 static enum ndr_err_code
ndr_pull_spoolss_53(struct ndr_pull
*ndr
, int flags
, struct spoolss_53
*r
)
29251 if (flags
& NDR_IN
) {
29253 if (flags
& NDR_OUT
) {
29254 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29256 return NDR_ERR_SUCCESS
;
29259 _PUBLIC_
void ndr_print_spoolss_53(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_53
*r
)
29261 ndr_print_struct(ndr
, name
, "spoolss_53");
29263 if (flags
& NDR_SET_VALUES
) {
29264 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29266 if (flags
& NDR_IN
) {
29267 ndr_print_struct(ndr
, "in", "spoolss_53");
29271 if (flags
& NDR_OUT
) {
29272 ndr_print_struct(ndr
, "out", "spoolss_53");
29274 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29280 static enum ndr_err_code
ndr_push_spoolss_DeletePrinterDriverEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_DeletePrinterDriverEx
*r
)
29282 if (flags
& NDR_IN
) {
29283 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.server
));
29284 if (r
->in
.server
) {
29285 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
29286 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
29287 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.server
, CH_UTF16
)));
29288 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.server
, ndr_charset_length(r
->in
.server
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
29290 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
29291 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
29292 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
29293 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
29294 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.driver
, CH_UTF16
)));
29295 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
29296 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.driver
, CH_UTF16
)));
29297 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.driver
, ndr_charset_length(r
->in
.driver
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
29298 NDR_CHECK(ndr_push_spoolss_DeleteDriverFlags(ndr
, NDR_SCALARS
, r
->in
.delete_flags
));
29299 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.version
));
29301 if (flags
& NDR_OUT
) {
29302 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29304 return NDR_ERR_SUCCESS
;
29307 static enum ndr_err_code
ndr_pull_spoolss_DeletePrinterDriverEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_DeletePrinterDriverEx
*r
)
29309 uint32_t _ptr_server
;
29310 TALLOC_CTX
*_mem_save_server_0
;
29311 if (flags
& NDR_IN
) {
29312 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_server
));
29314 NDR_PULL_ALLOC(ndr
, r
->in
.server
);
29316 r
->in
.server
= NULL
;
29318 if (r
->in
.server
) {
29319 _mem_save_server_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29320 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.server
, 0);
29321 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.server
));
29322 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.server
));
29323 if (ndr_get_array_length(ndr
, &r
->in
.server
) > ndr_get_array_size(ndr
, &r
->in
.server
)) {
29324 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
));
29326 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t)));
29327 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.server
, ndr_get_array_length(ndr
, &r
->in
.server
), sizeof(uint16_t), CH_UTF16
));
29328 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_server_0
, 0);
29330 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
29331 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
29332 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
29333 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
));
29335 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
29336 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
29337 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.driver
));
29338 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.driver
));
29339 if (ndr_get_array_length(ndr
, &r
->in
.driver
) > ndr_get_array_size(ndr
, &r
->in
.driver
)) {
29340 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
));
29342 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.driver
), sizeof(uint16_t)));
29343 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.driver
, ndr_get_array_length(ndr
, &r
->in
.driver
), sizeof(uint16_t), CH_UTF16
));
29344 NDR_CHECK(ndr_pull_spoolss_DeleteDriverFlags(ndr
, NDR_SCALARS
, &r
->in
.delete_flags
));
29345 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.version
));
29347 if (flags
& NDR_OUT
) {
29348 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29350 return NDR_ERR_SUCCESS
;
29353 _PUBLIC_
void ndr_print_spoolss_DeletePrinterDriverEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_DeletePrinterDriverEx
*r
)
29355 ndr_print_struct(ndr
, name
, "spoolss_DeletePrinterDriverEx");
29357 if (flags
& NDR_SET_VALUES
) {
29358 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29360 if (flags
& NDR_IN
) {
29361 ndr_print_struct(ndr
, "in", "spoolss_DeletePrinterDriverEx");
29363 ndr_print_ptr(ndr
, "server", r
->in
.server
);
29365 if (r
->in
.server
) {
29366 ndr_print_string(ndr
, "server", r
->in
.server
);
29369 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
29370 ndr_print_string(ndr
, "driver", r
->in
.driver
);
29371 ndr_print_spoolss_DeleteDriverFlags(ndr
, "delete_flags", r
->in
.delete_flags
);
29372 ndr_print_uint32(ndr
, "version", r
->in
.version
);
29375 if (flags
& NDR_OUT
) {
29376 ndr_print_struct(ndr
, "out", "spoolss_DeletePrinterDriverEx");
29378 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29384 static enum ndr_err_code
ndr_push_spoolss_55(struct ndr_push
*ndr
, int flags
, const struct spoolss_55
*r
)
29386 if (flags
& NDR_IN
) {
29388 if (flags
& NDR_OUT
) {
29389 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29391 return NDR_ERR_SUCCESS
;
29394 static enum ndr_err_code
ndr_pull_spoolss_55(struct ndr_pull
*ndr
, int flags
, struct spoolss_55
*r
)
29396 if (flags
& NDR_IN
) {
29398 if (flags
& NDR_OUT
) {
29399 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29401 return NDR_ERR_SUCCESS
;
29404 _PUBLIC_
void ndr_print_spoolss_55(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_55
*r
)
29406 ndr_print_struct(ndr
, name
, "spoolss_55");
29408 if (flags
& NDR_SET_VALUES
) {
29409 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29411 if (flags
& NDR_IN
) {
29412 ndr_print_struct(ndr
, "in", "spoolss_55");
29416 if (flags
& NDR_OUT
) {
29417 ndr_print_struct(ndr
, "out", "spoolss_55");
29419 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29425 static enum ndr_err_code
ndr_push_spoolss_56(struct ndr_push
*ndr
, int flags
, const struct spoolss_56
*r
)
29427 if (flags
& NDR_IN
) {
29429 if (flags
& NDR_OUT
) {
29430 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29432 return NDR_ERR_SUCCESS
;
29435 static enum ndr_err_code
ndr_pull_spoolss_56(struct ndr_pull
*ndr
, int flags
, struct spoolss_56
*r
)
29437 if (flags
& NDR_IN
) {
29439 if (flags
& NDR_OUT
) {
29440 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29442 return NDR_ERR_SUCCESS
;
29445 _PUBLIC_
void ndr_print_spoolss_56(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_56
*r
)
29447 ndr_print_struct(ndr
, name
, "spoolss_56");
29449 if (flags
& NDR_SET_VALUES
) {
29450 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29452 if (flags
& NDR_IN
) {
29453 ndr_print_struct(ndr
, "in", "spoolss_56");
29457 if (flags
& NDR_OUT
) {
29458 ndr_print_struct(ndr
, "out", "spoolss_56");
29460 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29466 static enum ndr_err_code
ndr_push_spoolss_57(struct ndr_push
*ndr
, int flags
, const struct spoolss_57
*r
)
29468 if (flags
& NDR_IN
) {
29470 if (flags
& NDR_OUT
) {
29471 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29473 return NDR_ERR_SUCCESS
;
29476 static enum ndr_err_code
ndr_pull_spoolss_57(struct ndr_pull
*ndr
, int flags
, struct spoolss_57
*r
)
29478 if (flags
& NDR_IN
) {
29480 if (flags
& NDR_OUT
) {
29481 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29483 return NDR_ERR_SUCCESS
;
29486 _PUBLIC_
void ndr_print_spoolss_57(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_57
*r
)
29488 ndr_print_struct(ndr
, name
, "spoolss_57");
29490 if (flags
& NDR_SET_VALUES
) {
29491 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29493 if (flags
& NDR_IN
) {
29494 ndr_print_struct(ndr
, "in", "spoolss_57");
29498 if (flags
& NDR_OUT
) {
29499 ndr_print_struct(ndr
, "out", "spoolss_57");
29501 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29507 static enum ndr_err_code
ndr_push_spoolss_XcvData(struct ndr_push
*ndr
, int flags
, const struct spoolss_XcvData
*r
)
29509 if (flags
& NDR_IN
) {
29510 if (r
->in
.handle
== NULL
) {
29511 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
29513 NDR_CHECK(ndr_push_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
29514 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.function_name
, CH_UTF16
)));
29515 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
29516 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.function_name
, CH_UTF16
)));
29517 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
));
29518 NDR_CHECK(ndr_push_DATA_BLOB(ndr
, NDR_SCALARS
, r
->in
.in_data
));
29519 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.in_data
.length
));
29520 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.out_data_size
));
29521 if (r
->in
.status_code
== NULL
) {
29522 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
29524 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->in
.status_code
));
29526 if (flags
& NDR_OUT
) {
29527 if (r
->out
.out_data
== NULL
) {
29528 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
29530 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.out_data_size
));
29531 NDR_CHECK(ndr_push_array_uint8(ndr
, NDR_SCALARS
, r
->out
.out_data
, r
->in
.out_data_size
));
29532 if (r
->out
.needed
== NULL
) {
29533 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
29535 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.needed
));
29536 if (r
->out
.status_code
== NULL
) {
29537 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
29539 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.status_code
));
29540 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29542 return NDR_ERR_SUCCESS
;
29545 static enum ndr_err_code
ndr_pull_spoolss_XcvData(struct ndr_pull
*ndr
, int flags
, struct spoolss_XcvData
*r
)
29547 TALLOC_CTX
*_mem_save_handle_0
;
29548 TALLOC_CTX
*_mem_save_needed_0
;
29549 TALLOC_CTX
*_mem_save_status_code_0
;
29550 if (flags
& NDR_IN
) {
29551 ZERO_STRUCT(r
->out
);
29553 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29554 NDR_PULL_ALLOC(ndr
, r
->in
.handle
);
29556 _mem_save_handle_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29557 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.handle
, LIBNDR_FLAG_REF_ALLOC
);
29558 NDR_CHECK(ndr_pull_policy_handle(ndr
, NDR_SCALARS
, r
->in
.handle
));
29559 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_handle_0
, LIBNDR_FLAG_REF_ALLOC
);
29560 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.function_name
));
29561 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.function_name
));
29562 if (ndr_get_array_length(ndr
, &r
->in
.function_name
) > ndr_get_array_size(ndr
, &r
->in
.function_name
)) {
29563 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
));
29565 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.function_name
), sizeof(uint16_t)));
29566 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
));
29567 NDR_CHECK(ndr_pull_DATA_BLOB(ndr
, NDR_SCALARS
, &r
->in
.in_data
));
29568 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
._in_data_length
));
29569 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.out_data_size
));
29570 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29571 NDR_PULL_ALLOC(ndr
, r
->in
.status_code
);
29573 _mem_save_status_code_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29574 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.status_code
, LIBNDR_FLAG_REF_ALLOC
);
29575 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->in
.status_code
));
29576 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_status_code_0
, LIBNDR_FLAG_REF_ALLOC
);
29577 NDR_PULL_ALLOC_N(ndr
, r
->out
.out_data
, r
->in
.out_data_size
);
29578 memset(r
->out
.out_data
, 0, (r
->in
.out_data_size
) * sizeof(*r
->out
.out_data
));
29579 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
29580 ZERO_STRUCTP(r
->out
.needed
);
29581 NDR_PULL_ALLOC(ndr
, r
->out
.status_code
);
29582 *r
->out
.status_code
= *r
->in
.status_code
;
29584 if (flags
& NDR_OUT
) {
29585 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.out_data
));
29586 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29587 NDR_PULL_ALLOC_N(ndr
, r
->out
.out_data
, ndr_get_array_size(ndr
, &r
->out
.out_data
));
29589 NDR_CHECK(ndr_pull_array_uint8(ndr
, NDR_SCALARS
, r
->out
.out_data
, ndr_get_array_size(ndr
, &r
->out
.out_data
)));
29590 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29591 NDR_PULL_ALLOC(ndr
, r
->out
.needed
);
29593 _mem_save_needed_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29594 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.needed
, LIBNDR_FLAG_REF_ALLOC
);
29595 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.needed
));
29596 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_needed_0
, LIBNDR_FLAG_REF_ALLOC
);
29597 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29598 NDR_PULL_ALLOC(ndr
, r
->out
.status_code
);
29600 _mem_save_status_code_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29601 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.status_code
, LIBNDR_FLAG_REF_ALLOC
);
29602 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.status_code
));
29603 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_status_code_0
, LIBNDR_FLAG_REF_ALLOC
);
29604 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29605 if (r
->out
.out_data
) {
29606 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.out_data
, r
->in
.out_data_size
));
29609 return NDR_ERR_SUCCESS
;
29612 _PUBLIC_
void ndr_print_spoolss_XcvData(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_XcvData
*r
)
29614 ndr_print_struct(ndr
, name
, "spoolss_XcvData");
29616 if (flags
& NDR_SET_VALUES
) {
29617 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29619 if (flags
& NDR_IN
) {
29620 ndr_print_struct(ndr
, "in", "spoolss_XcvData");
29622 ndr_print_ptr(ndr
, "handle", r
->in
.handle
);
29624 ndr_print_policy_handle(ndr
, "handle", r
->in
.handle
);
29626 ndr_print_string(ndr
, "function_name", r
->in
.function_name
);
29627 ndr_print_DATA_BLOB(ndr
, "in_data", r
->in
.in_data
);
29628 ndr_print_uint32(ndr
, "_in_data_length", (ndr
->flags
& LIBNDR_PRINT_SET_VALUES
)?r
->in
.in_data
.length
:r
->in
._in_data_length
);
29629 ndr_print_uint32(ndr
, "out_data_size", r
->in
.out_data_size
);
29630 ndr_print_ptr(ndr
, "status_code", r
->in
.status_code
);
29632 ndr_print_uint32(ndr
, "status_code", *r
->in
.status_code
);
29636 if (flags
& NDR_OUT
) {
29637 ndr_print_struct(ndr
, "out", "spoolss_XcvData");
29639 ndr_print_ptr(ndr
, "out_data", r
->out
.out_data
);
29641 ndr_print_array_uint8(ndr
, "out_data", r
->out
.out_data
, r
->in
.out_data_size
);
29643 ndr_print_ptr(ndr
, "needed", r
->out
.needed
);
29645 ndr_print_uint32(ndr
, "needed", *r
->out
.needed
);
29647 ndr_print_ptr(ndr
, "status_code", r
->out
.status_code
);
29649 ndr_print_uint32(ndr
, "status_code", *r
->out
.status_code
);
29651 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29657 _PUBLIC_
enum ndr_err_code
ndr_push_spoolss_AddPrinterDriverEx(struct ndr_push
*ndr
, int flags
, const struct spoolss_AddPrinterDriverEx
*r
)
29659 if (flags
& NDR_IN
) {
29660 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
29661 if (r
->in
.servername
) {
29662 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
29663 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
29664 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
29665 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
29667 if (r
->in
.info_ctr
== NULL
) {
29668 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
29670 NDR_CHECK(ndr_push_spoolss_AddDriverInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
29671 NDR_CHECK(ndr_push_spoolss_AddPrinterDriverExFlags(ndr
, NDR_SCALARS
, r
->in
.flags
));
29673 if (flags
& NDR_OUT
) {
29674 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29676 return NDR_ERR_SUCCESS
;
29679 _PUBLIC_
enum ndr_err_code
ndr_pull_spoolss_AddPrinterDriverEx(struct ndr_pull
*ndr
, int flags
, struct spoolss_AddPrinterDriverEx
*r
)
29681 uint32_t _ptr_servername
;
29682 TALLOC_CTX
*_mem_save_servername_0
;
29683 TALLOC_CTX
*_mem_save_info_ctr_0
;
29684 if (flags
& NDR_IN
) {
29685 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
29686 if (_ptr_servername
) {
29687 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
29689 r
->in
.servername
= NULL
;
29691 if (r
->in
.servername
) {
29692 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29693 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
29694 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
29695 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
29696 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
29697 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
));
29699 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
29700 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
29701 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
29703 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
29704 NDR_PULL_ALLOC(ndr
, r
->in
.info_ctr
);
29706 _mem_save_info_ctr_0
= NDR_PULL_GET_MEM_CTX(ndr
);
29707 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.info_ctr
, LIBNDR_FLAG_REF_ALLOC
);
29708 NDR_CHECK(ndr_pull_spoolss_AddDriverInfoCtr(ndr
, NDR_SCALARS
|NDR_BUFFERS
, r
->in
.info_ctr
));
29709 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_info_ctr_0
, LIBNDR_FLAG_REF_ALLOC
);
29710 NDR_CHECK(ndr_pull_spoolss_AddPrinterDriverExFlags(ndr
, NDR_SCALARS
, &r
->in
.flags
));
29712 if (flags
& NDR_OUT
) {
29713 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29715 return NDR_ERR_SUCCESS
;
29718 _PUBLIC_
void ndr_print_spoolss_AddPrinterDriverEx(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_AddPrinterDriverEx
*r
)
29720 ndr_print_struct(ndr
, name
, "spoolss_AddPrinterDriverEx");
29722 if (flags
& NDR_SET_VALUES
) {
29723 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29725 if (flags
& NDR_IN
) {
29726 ndr_print_struct(ndr
, "in", "spoolss_AddPrinterDriverEx");
29728 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
29730 if (r
->in
.servername
) {
29731 ndr_print_string(ndr
, "servername", r
->in
.servername
);
29734 ndr_print_ptr(ndr
, "info_ctr", r
->in
.info_ctr
);
29736 ndr_print_spoolss_AddDriverInfoCtr(ndr
, "info_ctr", r
->in
.info_ctr
);
29738 ndr_print_spoolss_AddPrinterDriverExFlags(ndr
, "flags", r
->in
.flags
);
29741 if (flags
& NDR_OUT
) {
29742 ndr_print_struct(ndr
, "out", "spoolss_AddPrinterDriverEx");
29744 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29750 static enum ndr_err_code
ndr_push_spoolss_5a(struct ndr_push
*ndr
, int flags
, const struct spoolss_5a
*r
)
29752 if (flags
& NDR_IN
) {
29754 if (flags
& NDR_OUT
) {
29755 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29757 return NDR_ERR_SUCCESS
;
29760 static enum ndr_err_code
ndr_pull_spoolss_5a(struct ndr_pull
*ndr
, int flags
, struct spoolss_5a
*r
)
29762 if (flags
& NDR_IN
) {
29764 if (flags
& NDR_OUT
) {
29765 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29767 return NDR_ERR_SUCCESS
;
29770 _PUBLIC_
void ndr_print_spoolss_5a(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5a
*r
)
29772 ndr_print_struct(ndr
, name
, "spoolss_5a");
29774 if (flags
& NDR_SET_VALUES
) {
29775 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29777 if (flags
& NDR_IN
) {
29778 ndr_print_struct(ndr
, "in", "spoolss_5a");
29782 if (flags
& NDR_OUT
) {
29783 ndr_print_struct(ndr
, "out", "spoolss_5a");
29785 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29791 static enum ndr_err_code
ndr_push_spoolss_5b(struct ndr_push
*ndr
, int flags
, const struct spoolss_5b
*r
)
29793 if (flags
& NDR_IN
) {
29795 if (flags
& NDR_OUT
) {
29796 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29798 return NDR_ERR_SUCCESS
;
29801 static enum ndr_err_code
ndr_pull_spoolss_5b(struct ndr_pull
*ndr
, int flags
, struct spoolss_5b
*r
)
29803 if (flags
& NDR_IN
) {
29805 if (flags
& NDR_OUT
) {
29806 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29808 return NDR_ERR_SUCCESS
;
29811 _PUBLIC_
void ndr_print_spoolss_5b(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5b
*r
)
29813 ndr_print_struct(ndr
, name
, "spoolss_5b");
29815 if (flags
& NDR_SET_VALUES
) {
29816 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29818 if (flags
& NDR_IN
) {
29819 ndr_print_struct(ndr
, "in", "spoolss_5b");
29823 if (flags
& NDR_OUT
) {
29824 ndr_print_struct(ndr
, "out", "spoolss_5b");
29826 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29832 static enum ndr_err_code
ndr_push_spoolss_5c(struct ndr_push
*ndr
, int flags
, const struct spoolss_5c
*r
)
29834 if (flags
& NDR_IN
) {
29836 if (flags
& NDR_OUT
) {
29837 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29839 return NDR_ERR_SUCCESS
;
29842 static enum ndr_err_code
ndr_pull_spoolss_5c(struct ndr_pull
*ndr
, int flags
, struct spoolss_5c
*r
)
29844 if (flags
& NDR_IN
) {
29846 if (flags
& NDR_OUT
) {
29847 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29849 return NDR_ERR_SUCCESS
;
29852 _PUBLIC_
void ndr_print_spoolss_5c(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5c
*r
)
29854 ndr_print_struct(ndr
, name
, "spoolss_5c");
29856 if (flags
& NDR_SET_VALUES
) {
29857 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29859 if (flags
& NDR_IN
) {
29860 ndr_print_struct(ndr
, "in", "spoolss_5c");
29864 if (flags
& NDR_OUT
) {
29865 ndr_print_struct(ndr
, "out", "spoolss_5c");
29867 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29873 static enum ndr_err_code
ndr_push_spoolss_5d(struct ndr_push
*ndr
, int flags
, const struct spoolss_5d
*r
)
29875 if (flags
& NDR_IN
) {
29877 if (flags
& NDR_OUT
) {
29878 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29880 return NDR_ERR_SUCCESS
;
29883 static enum ndr_err_code
ndr_pull_spoolss_5d(struct ndr_pull
*ndr
, int flags
, struct spoolss_5d
*r
)
29885 if (flags
& NDR_IN
) {
29887 if (flags
& NDR_OUT
) {
29888 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29890 return NDR_ERR_SUCCESS
;
29893 _PUBLIC_
void ndr_print_spoolss_5d(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5d
*r
)
29895 ndr_print_struct(ndr
, name
, "spoolss_5d");
29897 if (flags
& NDR_SET_VALUES
) {
29898 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29900 if (flags
& NDR_IN
) {
29901 ndr_print_struct(ndr
, "in", "spoolss_5d");
29905 if (flags
& NDR_OUT
) {
29906 ndr_print_struct(ndr
, "out", "spoolss_5d");
29908 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29914 static enum ndr_err_code
ndr_push_spoolss_5e(struct ndr_push
*ndr
, int flags
, const struct spoolss_5e
*r
)
29916 if (flags
& NDR_IN
) {
29918 if (flags
& NDR_OUT
) {
29919 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29921 return NDR_ERR_SUCCESS
;
29924 static enum ndr_err_code
ndr_pull_spoolss_5e(struct ndr_pull
*ndr
, int flags
, struct spoolss_5e
*r
)
29926 if (flags
& NDR_IN
) {
29928 if (flags
& NDR_OUT
) {
29929 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29931 return NDR_ERR_SUCCESS
;
29934 _PUBLIC_
void ndr_print_spoolss_5e(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5e
*r
)
29936 ndr_print_struct(ndr
, name
, "spoolss_5e");
29938 if (flags
& NDR_SET_VALUES
) {
29939 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29941 if (flags
& NDR_IN
) {
29942 ndr_print_struct(ndr
, "in", "spoolss_5e");
29946 if (flags
& NDR_OUT
) {
29947 ndr_print_struct(ndr
, "out", "spoolss_5e");
29949 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29955 static enum ndr_err_code
ndr_push_spoolss_5f(struct ndr_push
*ndr
, int flags
, const struct spoolss_5f
*r
)
29957 if (flags
& NDR_IN
) {
29959 if (flags
& NDR_OUT
) {
29960 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
29962 return NDR_ERR_SUCCESS
;
29965 static enum ndr_err_code
ndr_pull_spoolss_5f(struct ndr_pull
*ndr
, int flags
, struct spoolss_5f
*r
)
29967 if (flags
& NDR_IN
) {
29969 if (flags
& NDR_OUT
) {
29970 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
29972 return NDR_ERR_SUCCESS
;
29975 _PUBLIC_
void ndr_print_spoolss_5f(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_5f
*r
)
29977 ndr_print_struct(ndr
, name
, "spoolss_5f");
29979 if (flags
& NDR_SET_VALUES
) {
29980 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
29982 if (flags
& NDR_IN
) {
29983 ndr_print_struct(ndr
, "in", "spoolss_5f");
29987 if (flags
& NDR_OUT
) {
29988 ndr_print_struct(ndr
, "out", "spoolss_5f");
29990 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
29996 static enum ndr_err_code
ndr_push_spoolss_60(struct ndr_push
*ndr
, int flags
, const struct spoolss_60
*r
)
29998 if (flags
& NDR_IN
) {
30000 if (flags
& NDR_OUT
) {
30001 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30003 return NDR_ERR_SUCCESS
;
30006 static enum ndr_err_code
ndr_pull_spoolss_60(struct ndr_pull
*ndr
, int flags
, struct spoolss_60
*r
)
30008 if (flags
& NDR_IN
) {
30010 if (flags
& NDR_OUT
) {
30011 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30013 return NDR_ERR_SUCCESS
;
30016 _PUBLIC_
void ndr_print_spoolss_60(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_60
*r
)
30018 ndr_print_struct(ndr
, name
, "spoolss_60");
30020 if (flags
& NDR_SET_VALUES
) {
30021 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30023 if (flags
& NDR_IN
) {
30024 ndr_print_struct(ndr
, "in", "spoolss_60");
30028 if (flags
& NDR_OUT
) {
30029 ndr_print_struct(ndr
, "out", "spoolss_60");
30031 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30037 static enum ndr_err_code
ndr_push_spoolss_61(struct ndr_push
*ndr
, int flags
, const struct spoolss_61
*r
)
30039 if (flags
& NDR_IN
) {
30041 if (flags
& NDR_OUT
) {
30042 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30044 return NDR_ERR_SUCCESS
;
30047 static enum ndr_err_code
ndr_pull_spoolss_61(struct ndr_pull
*ndr
, int flags
, struct spoolss_61
*r
)
30049 if (flags
& NDR_IN
) {
30051 if (flags
& NDR_OUT
) {
30052 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30054 return NDR_ERR_SUCCESS
;
30057 _PUBLIC_
void ndr_print_spoolss_61(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_61
*r
)
30059 ndr_print_struct(ndr
, name
, "spoolss_61");
30061 if (flags
& NDR_SET_VALUES
) {
30062 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30064 if (flags
& NDR_IN
) {
30065 ndr_print_struct(ndr
, "in", "spoolss_61");
30069 if (flags
& NDR_OUT
) {
30070 ndr_print_struct(ndr
, "out", "spoolss_61");
30072 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30078 static enum ndr_err_code
ndr_push_spoolss_62(struct ndr_push
*ndr
, int flags
, const struct spoolss_62
*r
)
30080 if (flags
& NDR_IN
) {
30082 if (flags
& NDR_OUT
) {
30083 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30085 return NDR_ERR_SUCCESS
;
30088 static enum ndr_err_code
ndr_pull_spoolss_62(struct ndr_pull
*ndr
, int flags
, struct spoolss_62
*r
)
30090 if (flags
& NDR_IN
) {
30092 if (flags
& NDR_OUT
) {
30093 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30095 return NDR_ERR_SUCCESS
;
30098 _PUBLIC_
void ndr_print_spoolss_62(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_62
*r
)
30100 ndr_print_struct(ndr
, name
, "spoolss_62");
30102 if (flags
& NDR_SET_VALUES
) {
30103 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30105 if (flags
& NDR_IN
) {
30106 ndr_print_struct(ndr
, "in", "spoolss_62");
30110 if (flags
& NDR_OUT
) {
30111 ndr_print_struct(ndr
, "out", "spoolss_62");
30113 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30119 static enum ndr_err_code
ndr_push_spoolss_63(struct ndr_push
*ndr
, int flags
, const struct spoolss_63
*r
)
30121 if (flags
& NDR_IN
) {
30123 if (flags
& NDR_OUT
) {
30124 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30126 return NDR_ERR_SUCCESS
;
30129 static enum ndr_err_code
ndr_pull_spoolss_63(struct ndr_pull
*ndr
, int flags
, struct spoolss_63
*r
)
30131 if (flags
& NDR_IN
) {
30133 if (flags
& NDR_OUT
) {
30134 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30136 return NDR_ERR_SUCCESS
;
30139 _PUBLIC_
void ndr_print_spoolss_63(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_63
*r
)
30141 ndr_print_struct(ndr
, name
, "spoolss_63");
30143 if (flags
& NDR_SET_VALUES
) {
30144 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30146 if (flags
& NDR_IN
) {
30147 ndr_print_struct(ndr
, "in", "spoolss_63");
30151 if (flags
& NDR_OUT
) {
30152 ndr_print_struct(ndr
, "out", "spoolss_63");
30154 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30160 static enum ndr_err_code
ndr_push_spoolss_64(struct ndr_push
*ndr
, int flags
, const struct spoolss_64
*r
)
30162 if (flags
& NDR_IN
) {
30164 if (flags
& NDR_OUT
) {
30165 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30167 return NDR_ERR_SUCCESS
;
30170 static enum ndr_err_code
ndr_pull_spoolss_64(struct ndr_pull
*ndr
, int flags
, struct spoolss_64
*r
)
30172 if (flags
& NDR_IN
) {
30174 if (flags
& NDR_OUT
) {
30175 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30177 return NDR_ERR_SUCCESS
;
30180 _PUBLIC_
void ndr_print_spoolss_64(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_64
*r
)
30182 ndr_print_struct(ndr
, name
, "spoolss_64");
30184 if (flags
& NDR_SET_VALUES
) {
30185 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30187 if (flags
& NDR_IN
) {
30188 ndr_print_struct(ndr
, "in", "spoolss_64");
30192 if (flags
& NDR_OUT
) {
30193 ndr_print_struct(ndr
, "out", "spoolss_64");
30195 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30201 static enum ndr_err_code
ndr_push_spoolss_65(struct ndr_push
*ndr
, int flags
, const struct spoolss_65
*r
)
30203 if (flags
& NDR_IN
) {
30205 if (flags
& NDR_OUT
) {
30206 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30208 return NDR_ERR_SUCCESS
;
30211 static enum ndr_err_code
ndr_pull_spoolss_65(struct ndr_pull
*ndr
, int flags
, struct spoolss_65
*r
)
30213 if (flags
& NDR_IN
) {
30215 if (flags
& NDR_OUT
) {
30216 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30218 return NDR_ERR_SUCCESS
;
30221 _PUBLIC_
void ndr_print_spoolss_65(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_65
*r
)
30223 ndr_print_struct(ndr
, name
, "spoolss_65");
30225 if (flags
& NDR_SET_VALUES
) {
30226 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30228 if (flags
& NDR_IN
) {
30229 ndr_print_struct(ndr
, "in", "spoolss_65");
30233 if (flags
& NDR_OUT
) {
30234 ndr_print_struct(ndr
, "out", "spoolss_65");
30236 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30242 static enum ndr_err_code
ndr_push_spoolss_GetCorePrinterDrivers(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetCorePrinterDrivers
*r
)
30244 uint32_t cntr_core_printer_drivers_1
;
30245 if (flags
& NDR_IN
) {
30246 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
30247 if (r
->in
.servername
) {
30248 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
30249 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
30250 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
30251 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
30253 if (r
->in
.architecture
== NULL
) {
30254 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
30256 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
30257 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
30258 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
30259 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
30260 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.core_driver_size
));
30261 if (r
->in
.core_driver_dependencies
== NULL
) {
30262 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
30264 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.core_driver_size
));
30265 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.core_driver_dependencies
, r
->in
.core_driver_size
, sizeof(uint16_t), CH_UTF16
));
30266 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.core_printer_driver_count
));
30268 if (flags
& NDR_OUT
) {
30269 if (r
->out
.core_printer_drivers
== NULL
) {
30270 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
30272 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.core_printer_driver_count
));
30273 for (cntr_core_printer_drivers_1
= 0; cntr_core_printer_drivers_1
< r
->in
.core_printer_driver_count
; cntr_core_printer_drivers_1
++) {
30274 NDR_CHECK(ndr_push_spoolss_CorePrinterDriver(ndr
, NDR_SCALARS
, &r
->out
.core_printer_drivers
[cntr_core_printer_drivers_1
]));
30276 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30278 return NDR_ERR_SUCCESS
;
30281 static enum ndr_err_code
ndr_pull_spoolss_GetCorePrinterDrivers(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetCorePrinterDrivers
*r
)
30283 uint32_t _ptr_servername
;
30284 uint32_t cntr_core_printer_drivers_1
;
30285 TALLOC_CTX
*_mem_save_servername_0
;
30286 TALLOC_CTX
*_mem_save_core_printer_drivers_1
;
30287 if (flags
& NDR_IN
) {
30288 ZERO_STRUCT(r
->out
);
30290 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
30291 if (_ptr_servername
) {
30292 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
30294 r
->in
.servername
= NULL
;
30296 if (r
->in
.servername
) {
30297 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
30298 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
30299 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
30300 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
30301 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
30302 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
));
30304 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
30305 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
30306 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
30308 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
30309 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
30310 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
30311 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
));
30313 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
30314 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
30315 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.core_driver_size
));
30316 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.core_driver_dependencies
));
30317 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.core_driver_dependencies
, ndr_get_array_size(ndr
, &r
->in
.core_driver_dependencies
), sizeof(uint16_t), CH_UTF16
));
30318 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.core_printer_driver_count
));
30319 NDR_PULL_ALLOC_N(ndr
, r
->out
.core_printer_drivers
, r
->in
.core_printer_driver_count
);
30320 memset(r
->out
.core_printer_drivers
, 0, (r
->in
.core_printer_driver_count
) * sizeof(*r
->out
.core_printer_drivers
));
30321 if (r
->in
.core_driver_dependencies
) {
30322 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.core_driver_dependencies
, r
->in
.core_driver_size
));
30325 if (flags
& NDR_OUT
) {
30326 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.core_printer_drivers
));
30327 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
30328 NDR_PULL_ALLOC_N(ndr
, r
->out
.core_printer_drivers
, ndr_get_array_size(ndr
, &r
->out
.core_printer_drivers
));
30330 _mem_save_core_printer_drivers_1
= NDR_PULL_GET_MEM_CTX(ndr
);
30331 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.core_printer_drivers
, 0);
30332 for (cntr_core_printer_drivers_1
= 0; cntr_core_printer_drivers_1
< r
->in
.core_printer_driver_count
; cntr_core_printer_drivers_1
++) {
30333 NDR_CHECK(ndr_pull_spoolss_CorePrinterDriver(ndr
, NDR_SCALARS
, &r
->out
.core_printer_drivers
[cntr_core_printer_drivers_1
]));
30335 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_core_printer_drivers_1
, 0);
30336 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30337 if (r
->out
.core_printer_drivers
) {
30338 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.core_printer_drivers
, r
->in
.core_printer_driver_count
));
30341 return NDR_ERR_SUCCESS
;
30344 _PUBLIC_
void ndr_print_spoolss_GetCorePrinterDrivers(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetCorePrinterDrivers
*r
)
30346 uint32_t cntr_core_printer_drivers_1
;
30347 ndr_print_struct(ndr
, name
, "spoolss_GetCorePrinterDrivers");
30349 if (flags
& NDR_SET_VALUES
) {
30350 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30352 if (flags
& NDR_IN
) {
30353 ndr_print_struct(ndr
, "in", "spoolss_GetCorePrinterDrivers");
30355 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
30357 if (r
->in
.servername
) {
30358 ndr_print_string(ndr
, "servername", r
->in
.servername
);
30361 ndr_print_ptr(ndr
, "architecture", r
->in
.architecture
);
30363 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
30365 ndr_print_uint32(ndr
, "core_driver_size", r
->in
.core_driver_size
);
30366 ndr_print_ptr(ndr
, "core_driver_dependencies", r
->in
.core_driver_dependencies
);
30368 ndr_print_string(ndr
, "core_driver_dependencies", r
->in
.core_driver_dependencies
);
30370 ndr_print_uint32(ndr
, "core_printer_driver_count", r
->in
.core_printer_driver_count
);
30373 if (flags
& NDR_OUT
) {
30374 ndr_print_struct(ndr
, "out", "spoolss_GetCorePrinterDrivers");
30376 ndr_print_ptr(ndr
, "core_printer_drivers", r
->out
.core_printer_drivers
);
30378 ndr
->print(ndr
, "%s: ARRAY(%d)", "core_printer_drivers", (int)r
->in
.core_printer_driver_count
);
30380 for (cntr_core_printer_drivers_1
=0;cntr_core_printer_drivers_1
<r
->in
.core_printer_driver_count
;cntr_core_printer_drivers_1
++) {
30382 if (asprintf(&idx_1
, "[%d]", cntr_core_printer_drivers_1
) != -1) {
30383 ndr_print_spoolss_CorePrinterDriver(ndr
, "core_printer_drivers", &r
->out
.core_printer_drivers
[cntr_core_printer_drivers_1
]);
30389 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30395 static enum ndr_err_code
ndr_push_spoolss_67(struct ndr_push
*ndr
, int flags
, const struct spoolss_67
*r
)
30397 if (flags
& NDR_IN
) {
30399 if (flags
& NDR_OUT
) {
30400 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30402 return NDR_ERR_SUCCESS
;
30405 static enum ndr_err_code
ndr_pull_spoolss_67(struct ndr_pull
*ndr
, int flags
, struct spoolss_67
*r
)
30407 if (flags
& NDR_IN
) {
30409 if (flags
& NDR_OUT
) {
30410 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30412 return NDR_ERR_SUCCESS
;
30415 _PUBLIC_
void ndr_print_spoolss_67(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_67
*r
)
30417 ndr_print_struct(ndr
, name
, "spoolss_67");
30419 if (flags
& NDR_SET_VALUES
) {
30420 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30422 if (flags
& NDR_IN
) {
30423 ndr_print_struct(ndr
, "in", "spoolss_67");
30427 if (flags
& NDR_OUT
) {
30428 ndr_print_struct(ndr
, "out", "spoolss_67");
30430 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30436 static enum ndr_err_code
ndr_push_spoolss_GetPrinterDriverPackagePath(struct ndr_push
*ndr
, int flags
, const struct spoolss_GetPrinterDriverPackagePath
*r
)
30438 if (flags
& NDR_IN
) {
30439 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.servername
));
30440 if (r
->in
.servername
) {
30441 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
30442 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
30443 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.servername
, CH_UTF16
)));
30444 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.servername
, ndr_charset_length(r
->in
.servername
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
30446 if (r
->in
.architecture
== NULL
) {
30447 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
30449 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
30450 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
30451 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
)));
30452 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.architecture
, ndr_charset_length(r
->in
.architecture
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
30453 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.language
));
30454 if (r
->in
.language
) {
30455 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.language
, CH_UTF16
)));
30456 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
30457 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.language
, CH_UTF16
)));
30458 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.language
, ndr_charset_length(r
->in
.language
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
30460 if (r
->in
.package_id
== NULL
) {
30461 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
30463 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.package_id
, CH_UTF16
)));
30464 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, 0));
30465 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, ndr_charset_length(r
->in
.package_id
, CH_UTF16
)));
30466 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.package_id
, ndr_charset_length(r
->in
.package_id
, CH_UTF16
), sizeof(uint16_t), CH_UTF16
));
30467 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->in
.driver_package_cab
));
30468 if (r
->in
.driver_package_cab
) {
30469 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.driver_package_cab_size
));
30470 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->in
.driver_package_cab
, r
->in
.driver_package_cab_size
, sizeof(uint16_t), CH_UTF16
));
30472 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, r
->in
.driver_package_cab_size
));
30474 if (flags
& NDR_OUT
) {
30475 NDR_CHECK(ndr_push_unique_ptr(ndr
, r
->out
.driver_package_cab
));
30476 if (r
->out
.driver_package_cab
) {
30477 NDR_CHECK(ndr_push_uint3264(ndr
, NDR_SCALARS
, r
->in
.driver_package_cab_size
));
30478 NDR_CHECK(ndr_push_charset(ndr
, NDR_SCALARS
, r
->out
.driver_package_cab
, r
->in
.driver_package_cab_size
, sizeof(uint16_t), CH_UTF16
));
30480 if (r
->out
.required
== NULL
) {
30481 return ndr_push_error(ndr
, NDR_ERR_INVALID_POINTER
, "NULL [ref] pointer");
30483 NDR_CHECK(ndr_push_uint32(ndr
, NDR_SCALARS
, *r
->out
.required
));
30484 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30486 return NDR_ERR_SUCCESS
;
30489 static enum ndr_err_code
ndr_pull_spoolss_GetPrinterDriverPackagePath(struct ndr_pull
*ndr
, int flags
, struct spoolss_GetPrinterDriverPackagePath
*r
)
30491 uint32_t _ptr_servername
;
30492 uint32_t _ptr_language
;
30493 uint32_t _ptr_driver_package_cab
;
30494 TALLOC_CTX
*_mem_save_servername_0
;
30495 TALLOC_CTX
*_mem_save_language_0
;
30496 TALLOC_CTX
*_mem_save_driver_package_cab_0
;
30497 TALLOC_CTX
*_mem_save_required_0
;
30498 if (flags
& NDR_IN
) {
30499 ZERO_STRUCT(r
->out
);
30501 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_servername
));
30502 if (_ptr_servername
) {
30503 NDR_PULL_ALLOC(ndr
, r
->in
.servername
);
30505 r
->in
.servername
= NULL
;
30507 if (r
->in
.servername
) {
30508 _mem_save_servername_0
= NDR_PULL_GET_MEM_CTX(ndr
);
30509 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.servername
, 0);
30510 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.servername
));
30511 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.servername
));
30512 if (ndr_get_array_length(ndr
, &r
->in
.servername
) > ndr_get_array_size(ndr
, &r
->in
.servername
)) {
30513 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
));
30515 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t)));
30516 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.servername
, ndr_get_array_length(ndr
, &r
->in
.servername
), sizeof(uint16_t), CH_UTF16
));
30517 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_servername_0
, 0);
30519 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.architecture
));
30520 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.architecture
));
30521 if (ndr_get_array_length(ndr
, &r
->in
.architecture
) > ndr_get_array_size(ndr
, &r
->in
.architecture
)) {
30522 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
));
30524 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t)));
30525 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.architecture
, ndr_get_array_length(ndr
, &r
->in
.architecture
), sizeof(uint16_t), CH_UTF16
));
30526 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_language
));
30527 if (_ptr_language
) {
30528 NDR_PULL_ALLOC(ndr
, r
->in
.language
);
30530 r
->in
.language
= NULL
;
30532 if (r
->in
.language
) {
30533 _mem_save_language_0
= NDR_PULL_GET_MEM_CTX(ndr
);
30534 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.language
, 0);
30535 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.language
));
30536 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.language
));
30537 if (ndr_get_array_length(ndr
, &r
->in
.language
) > ndr_get_array_size(ndr
, &r
->in
.language
)) {
30538 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.language
), ndr_get_array_length(ndr
, &r
->in
.language
));
30540 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.language
), sizeof(uint16_t)));
30541 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.language
, ndr_get_array_length(ndr
, &r
->in
.language
), sizeof(uint16_t), CH_UTF16
));
30542 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_language_0
, 0);
30544 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.package_id
));
30545 NDR_CHECK(ndr_pull_array_length(ndr
, &r
->in
.package_id
));
30546 if (ndr_get_array_length(ndr
, &r
->in
.package_id
) > ndr_get_array_size(ndr
, &r
->in
.package_id
)) {
30547 return ndr_pull_error(ndr
, NDR_ERR_ARRAY_SIZE
, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr
, &r
->in
.package_id
), ndr_get_array_length(ndr
, &r
->in
.package_id
));
30549 NDR_CHECK(ndr_check_string_terminator(ndr
, ndr_get_array_length(ndr
, &r
->in
.package_id
), sizeof(uint16_t)));
30550 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.package_id
, ndr_get_array_length(ndr
, &r
->in
.package_id
), sizeof(uint16_t), CH_UTF16
));
30551 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_package_cab
));
30552 if (_ptr_driver_package_cab
) {
30553 NDR_PULL_ALLOC(ndr
, r
->in
.driver_package_cab
);
30555 r
->in
.driver_package_cab
= NULL
;
30557 if (r
->in
.driver_package_cab
) {
30558 _mem_save_driver_package_cab_0
= NDR_PULL_GET_MEM_CTX(ndr
);
30559 NDR_PULL_SET_MEM_CTX(ndr
, r
->in
.driver_package_cab
, 0);
30560 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->in
.driver_package_cab
));
30561 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->in
.driver_package_cab
, ndr_get_array_size(ndr
, &r
->in
.driver_package_cab
), sizeof(uint16_t), CH_UTF16
));
30562 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_package_cab_0
, 0);
30564 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, &r
->in
.driver_package_cab_size
));
30565 NDR_PULL_ALLOC(ndr
, r
->out
.required
);
30566 ZERO_STRUCTP(r
->out
.required
);
30567 if (r
->in
.driver_package_cab
) {
30568 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->in
.driver_package_cab
, r
->in
.driver_package_cab_size
));
30571 if (flags
& NDR_OUT
) {
30572 NDR_CHECK(ndr_pull_generic_ptr(ndr
, &_ptr_driver_package_cab
));
30573 if (_ptr_driver_package_cab
) {
30574 NDR_PULL_ALLOC(ndr
, r
->out
.driver_package_cab
);
30576 r
->out
.driver_package_cab
= NULL
;
30578 if (r
->out
.driver_package_cab
) {
30579 _mem_save_driver_package_cab_0
= NDR_PULL_GET_MEM_CTX(ndr
);
30580 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.driver_package_cab
, 0);
30581 NDR_CHECK(ndr_pull_array_size(ndr
, &r
->out
.driver_package_cab
));
30582 NDR_CHECK(ndr_pull_charset(ndr
, NDR_SCALARS
, &r
->out
.driver_package_cab
, ndr_get_array_size(ndr
, &r
->out
.driver_package_cab
), sizeof(uint16_t), CH_UTF16
));
30583 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_driver_package_cab_0
, 0);
30585 if (ndr
->flags
& LIBNDR_FLAG_REF_ALLOC
) {
30586 NDR_PULL_ALLOC(ndr
, r
->out
.required
);
30588 _mem_save_required_0
= NDR_PULL_GET_MEM_CTX(ndr
);
30589 NDR_PULL_SET_MEM_CTX(ndr
, r
->out
.required
, LIBNDR_FLAG_REF_ALLOC
);
30590 NDR_CHECK(ndr_pull_uint32(ndr
, NDR_SCALARS
, r
->out
.required
));
30591 NDR_PULL_SET_MEM_CTX(ndr
, _mem_save_required_0
, LIBNDR_FLAG_REF_ALLOC
);
30592 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30593 if (r
->out
.driver_package_cab
) {
30594 NDR_CHECK(ndr_check_array_size(ndr
, (void*)&r
->out
.driver_package_cab
, r
->in
.driver_package_cab_size
));
30597 return NDR_ERR_SUCCESS
;
30600 _PUBLIC_
void ndr_print_spoolss_GetPrinterDriverPackagePath(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_GetPrinterDriverPackagePath
*r
)
30602 ndr_print_struct(ndr
, name
, "spoolss_GetPrinterDriverPackagePath");
30604 if (flags
& NDR_SET_VALUES
) {
30605 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30607 if (flags
& NDR_IN
) {
30608 ndr_print_struct(ndr
, "in", "spoolss_GetPrinterDriverPackagePath");
30610 ndr_print_ptr(ndr
, "servername", r
->in
.servername
);
30612 if (r
->in
.servername
) {
30613 ndr_print_string(ndr
, "servername", r
->in
.servername
);
30616 ndr_print_ptr(ndr
, "architecture", r
->in
.architecture
);
30618 ndr_print_string(ndr
, "architecture", r
->in
.architecture
);
30620 ndr_print_ptr(ndr
, "language", r
->in
.language
);
30622 if (r
->in
.language
) {
30623 ndr_print_string(ndr
, "language", r
->in
.language
);
30626 ndr_print_ptr(ndr
, "package_id", r
->in
.package_id
);
30628 ndr_print_string(ndr
, "package_id", r
->in
.package_id
);
30630 ndr_print_ptr(ndr
, "driver_package_cab", r
->in
.driver_package_cab
);
30632 if (r
->in
.driver_package_cab
) {
30633 ndr_print_string(ndr
, "driver_package_cab", r
->in
.driver_package_cab
);
30636 ndr_print_uint32(ndr
, "driver_package_cab_size", r
->in
.driver_package_cab_size
);
30639 if (flags
& NDR_OUT
) {
30640 ndr_print_struct(ndr
, "out", "spoolss_GetPrinterDriverPackagePath");
30642 ndr_print_ptr(ndr
, "driver_package_cab", r
->out
.driver_package_cab
);
30644 if (r
->out
.driver_package_cab
) {
30645 ndr_print_string(ndr
, "driver_package_cab", r
->out
.driver_package_cab
);
30648 ndr_print_ptr(ndr
, "required", r
->out
.required
);
30650 ndr_print_uint32(ndr
, "required", *r
->out
.required
);
30652 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30658 static enum ndr_err_code
ndr_push_spoolss_69(struct ndr_push
*ndr
, int flags
, const struct spoolss_69
*r
)
30660 if (flags
& NDR_IN
) {
30662 if (flags
& NDR_OUT
) {
30663 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30665 return NDR_ERR_SUCCESS
;
30668 static enum ndr_err_code
ndr_pull_spoolss_69(struct ndr_pull
*ndr
, int flags
, struct spoolss_69
*r
)
30670 if (flags
& NDR_IN
) {
30672 if (flags
& NDR_OUT
) {
30673 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30675 return NDR_ERR_SUCCESS
;
30678 _PUBLIC_
void ndr_print_spoolss_69(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_69
*r
)
30680 ndr_print_struct(ndr
, name
, "spoolss_69");
30682 if (flags
& NDR_SET_VALUES
) {
30683 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30685 if (flags
& NDR_IN
) {
30686 ndr_print_struct(ndr
, "in", "spoolss_69");
30690 if (flags
& NDR_OUT
) {
30691 ndr_print_struct(ndr
, "out", "spoolss_69");
30693 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30699 static enum ndr_err_code
ndr_push_spoolss_6a(struct ndr_push
*ndr
, int flags
, const struct spoolss_6a
*r
)
30701 if (flags
& NDR_IN
) {
30703 if (flags
& NDR_OUT
) {
30704 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30706 return NDR_ERR_SUCCESS
;
30709 static enum ndr_err_code
ndr_pull_spoolss_6a(struct ndr_pull
*ndr
, int flags
, struct spoolss_6a
*r
)
30711 if (flags
& NDR_IN
) {
30713 if (flags
& NDR_OUT
) {
30714 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30716 return NDR_ERR_SUCCESS
;
30719 _PUBLIC_
void ndr_print_spoolss_6a(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_6a
*r
)
30721 ndr_print_struct(ndr
, name
, "spoolss_6a");
30723 if (flags
& NDR_SET_VALUES
) {
30724 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30726 if (flags
& NDR_IN
) {
30727 ndr_print_struct(ndr
, "in", "spoolss_6a");
30731 if (flags
& NDR_OUT
) {
30732 ndr_print_struct(ndr
, "out", "spoolss_6a");
30734 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30740 static enum ndr_err_code
ndr_push_spoolss_6b(struct ndr_push
*ndr
, int flags
, const struct spoolss_6b
*r
)
30742 if (flags
& NDR_IN
) {
30744 if (flags
& NDR_OUT
) {
30745 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30747 return NDR_ERR_SUCCESS
;
30750 static enum ndr_err_code
ndr_pull_spoolss_6b(struct ndr_pull
*ndr
, int flags
, struct spoolss_6b
*r
)
30752 if (flags
& NDR_IN
) {
30754 if (flags
& NDR_OUT
) {
30755 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30757 return NDR_ERR_SUCCESS
;
30760 _PUBLIC_
void ndr_print_spoolss_6b(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_6b
*r
)
30762 ndr_print_struct(ndr
, name
, "spoolss_6b");
30764 if (flags
& NDR_SET_VALUES
) {
30765 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30767 if (flags
& NDR_IN
) {
30768 ndr_print_struct(ndr
, "in", "spoolss_6b");
30772 if (flags
& NDR_OUT
) {
30773 ndr_print_struct(ndr
, "out", "spoolss_6b");
30775 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30781 static enum ndr_err_code
ndr_push_spoolss_6c(struct ndr_push
*ndr
, int flags
, const struct spoolss_6c
*r
)
30783 if (flags
& NDR_IN
) {
30785 if (flags
& NDR_OUT
) {
30786 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30788 return NDR_ERR_SUCCESS
;
30791 static enum ndr_err_code
ndr_pull_spoolss_6c(struct ndr_pull
*ndr
, int flags
, struct spoolss_6c
*r
)
30793 if (flags
& NDR_IN
) {
30795 if (flags
& NDR_OUT
) {
30796 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30798 return NDR_ERR_SUCCESS
;
30801 _PUBLIC_
void ndr_print_spoolss_6c(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_6c
*r
)
30803 ndr_print_struct(ndr
, name
, "spoolss_6c");
30805 if (flags
& NDR_SET_VALUES
) {
30806 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30808 if (flags
& NDR_IN
) {
30809 ndr_print_struct(ndr
, "in", "spoolss_6c");
30813 if (flags
& NDR_OUT
) {
30814 ndr_print_struct(ndr
, "out", "spoolss_6c");
30816 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30822 static enum ndr_err_code
ndr_push_spoolss_6d(struct ndr_push
*ndr
, int flags
, const struct spoolss_6d
*r
)
30824 if (flags
& NDR_IN
) {
30826 if (flags
& NDR_OUT
) {
30827 NDR_CHECK(ndr_push_WERROR(ndr
, NDR_SCALARS
, r
->out
.result
));
30829 return NDR_ERR_SUCCESS
;
30832 static enum ndr_err_code
ndr_pull_spoolss_6d(struct ndr_pull
*ndr
, int flags
, struct spoolss_6d
*r
)
30834 if (flags
& NDR_IN
) {
30836 if (flags
& NDR_OUT
) {
30837 NDR_CHECK(ndr_pull_WERROR(ndr
, NDR_SCALARS
, &r
->out
.result
));
30839 return NDR_ERR_SUCCESS
;
30842 _PUBLIC_
void ndr_print_spoolss_6d(struct ndr_print
*ndr
, const char *name
, int flags
, const struct spoolss_6d
*r
)
30844 ndr_print_struct(ndr
, name
, "spoolss_6d");
30846 if (flags
& NDR_SET_VALUES
) {
30847 ndr
->flags
|= LIBNDR_PRINT_SET_VALUES
;
30849 if (flags
& NDR_IN
) {
30850 ndr_print_struct(ndr
, "in", "spoolss_6d");
30854 if (flags
& NDR_OUT
) {
30855 ndr_print_struct(ndr
, "out", "spoolss_6d");
30857 ndr_print_WERROR(ndr
, "result", r
->out
.result
);
30863 static const struct ndr_interface_call spoolss_calls
[] = {
30865 "spoolss_EnumPrinters",
30866 sizeof(struct spoolss_EnumPrinters
),
30867 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinters
,
30868 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinters
,
30869 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinters
,
30873 "spoolss_OpenPrinter",
30874 sizeof(struct spoolss_OpenPrinter
),
30875 (ndr_push_flags_fn_t
) ndr_push_spoolss_OpenPrinter
,
30876 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_OpenPrinter
,
30877 (ndr_print_function_t
) ndr_print_spoolss_OpenPrinter
,
30882 sizeof(struct spoolss_SetJob
),
30883 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetJob
,
30884 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetJob
,
30885 (ndr_print_function_t
) ndr_print_spoolss_SetJob
,
30890 sizeof(struct spoolss_GetJob
),
30891 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetJob
,
30892 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetJob
,
30893 (ndr_print_function_t
) ndr_print_spoolss_GetJob
,
30897 "spoolss_EnumJobs",
30898 sizeof(struct spoolss_EnumJobs
),
30899 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumJobs
,
30900 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumJobs
,
30901 (ndr_print_function_t
) ndr_print_spoolss_EnumJobs
,
30905 "spoolss_AddPrinter",
30906 sizeof(struct spoolss_AddPrinter
),
30907 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinter
,
30908 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinter
,
30909 (ndr_print_function_t
) ndr_print_spoolss_AddPrinter
,
30913 "spoolss_DeletePrinter",
30914 sizeof(struct spoolss_DeletePrinter
),
30915 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinter
,
30916 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinter
,
30917 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinter
,
30921 "spoolss_SetPrinter",
30922 sizeof(struct spoolss_SetPrinter
),
30923 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetPrinter
,
30924 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetPrinter
,
30925 (ndr_print_function_t
) ndr_print_spoolss_SetPrinter
,
30929 "spoolss_GetPrinter",
30930 sizeof(struct spoolss_GetPrinter
),
30931 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinter
,
30932 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinter
,
30933 (ndr_print_function_t
) ndr_print_spoolss_GetPrinter
,
30937 "spoolss_AddPrinterDriver",
30938 sizeof(struct spoolss_AddPrinterDriver
),
30939 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinterDriver
,
30940 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinterDriver
,
30941 (ndr_print_function_t
) ndr_print_spoolss_AddPrinterDriver
,
30945 "spoolss_EnumPrinterDrivers",
30946 sizeof(struct spoolss_EnumPrinterDrivers
),
30947 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinterDrivers
,
30948 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinterDrivers
,
30949 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinterDrivers
,
30953 "spoolss_GetPrinterDriver",
30954 sizeof(struct spoolss_GetPrinterDriver
),
30955 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDriver
,
30956 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDriver
,
30957 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDriver
,
30961 "spoolss_GetPrinterDriverDirectory",
30962 sizeof(struct spoolss_GetPrinterDriverDirectory
),
30963 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDriverDirectory
,
30964 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDriverDirectory
,
30965 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDriverDirectory
,
30969 "spoolss_DeletePrinterDriver",
30970 sizeof(struct spoolss_DeletePrinterDriver
),
30971 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterDriver
,
30972 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterDriver
,
30973 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterDriver
,
30977 "spoolss_AddPrintProcessor",
30978 sizeof(struct spoolss_AddPrintProcessor
),
30979 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrintProcessor
,
30980 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrintProcessor
,
30981 (ndr_print_function_t
) ndr_print_spoolss_AddPrintProcessor
,
30985 "spoolss_EnumPrintProcessors",
30986 sizeof(struct spoolss_EnumPrintProcessors
),
30987 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrintProcessors
,
30988 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrintProcessors
,
30989 (ndr_print_function_t
) ndr_print_spoolss_EnumPrintProcessors
,
30993 "spoolss_GetPrintProcessorDirectory",
30994 sizeof(struct spoolss_GetPrintProcessorDirectory
),
30995 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrintProcessorDirectory
,
30996 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrintProcessorDirectory
,
30997 (ndr_print_function_t
) ndr_print_spoolss_GetPrintProcessorDirectory
,
31001 "spoolss_StartDocPrinter",
31002 sizeof(struct spoolss_StartDocPrinter
),
31003 (ndr_push_flags_fn_t
) ndr_push_spoolss_StartDocPrinter
,
31004 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_StartDocPrinter
,
31005 (ndr_print_function_t
) ndr_print_spoolss_StartDocPrinter
,
31009 "spoolss_StartPagePrinter",
31010 sizeof(struct spoolss_StartPagePrinter
),
31011 (ndr_push_flags_fn_t
) ndr_push_spoolss_StartPagePrinter
,
31012 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_StartPagePrinter
,
31013 (ndr_print_function_t
) ndr_print_spoolss_StartPagePrinter
,
31017 "spoolss_WritePrinter",
31018 sizeof(struct spoolss_WritePrinter
),
31019 (ndr_push_flags_fn_t
) ndr_push_spoolss_WritePrinter
,
31020 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_WritePrinter
,
31021 (ndr_print_function_t
) ndr_print_spoolss_WritePrinter
,
31025 "spoolss_EndPagePrinter",
31026 sizeof(struct spoolss_EndPagePrinter
),
31027 (ndr_push_flags_fn_t
) ndr_push_spoolss_EndPagePrinter
,
31028 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EndPagePrinter
,
31029 (ndr_print_function_t
) ndr_print_spoolss_EndPagePrinter
,
31033 "spoolss_AbortPrinter",
31034 sizeof(struct spoolss_AbortPrinter
),
31035 (ndr_push_flags_fn_t
) ndr_push_spoolss_AbortPrinter
,
31036 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AbortPrinter
,
31037 (ndr_print_function_t
) ndr_print_spoolss_AbortPrinter
,
31041 "spoolss_ReadPrinter",
31042 sizeof(struct spoolss_ReadPrinter
),
31043 (ndr_push_flags_fn_t
) ndr_push_spoolss_ReadPrinter
,
31044 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ReadPrinter
,
31045 (ndr_print_function_t
) ndr_print_spoolss_ReadPrinter
,
31049 "spoolss_EndDocPrinter",
31050 sizeof(struct spoolss_EndDocPrinter
),
31051 (ndr_push_flags_fn_t
) ndr_push_spoolss_EndDocPrinter
,
31052 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EndDocPrinter
,
31053 (ndr_print_function_t
) ndr_print_spoolss_EndDocPrinter
,
31058 sizeof(struct spoolss_AddJob
),
31059 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddJob
,
31060 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddJob
,
31061 (ndr_print_function_t
) ndr_print_spoolss_AddJob
,
31065 "spoolss_ScheduleJob",
31066 sizeof(struct spoolss_ScheduleJob
),
31067 (ndr_push_flags_fn_t
) ndr_push_spoolss_ScheduleJob
,
31068 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ScheduleJob
,
31069 (ndr_print_function_t
) ndr_print_spoolss_ScheduleJob
,
31073 "spoolss_GetPrinterData",
31074 sizeof(struct spoolss_GetPrinterData
),
31075 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterData
,
31076 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterData
,
31077 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterData
,
31081 "spoolss_SetPrinterData",
31082 sizeof(struct spoolss_SetPrinterData
),
31083 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetPrinterData
,
31084 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetPrinterData
,
31085 (ndr_print_function_t
) ndr_print_spoolss_SetPrinterData
,
31089 "spoolss_WaitForPrinterChange",
31090 sizeof(struct spoolss_WaitForPrinterChange
),
31091 (ndr_push_flags_fn_t
) ndr_push_spoolss_WaitForPrinterChange
,
31092 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_WaitForPrinterChange
,
31093 (ndr_print_function_t
) ndr_print_spoolss_WaitForPrinterChange
,
31097 "spoolss_ClosePrinter",
31098 sizeof(struct spoolss_ClosePrinter
),
31099 (ndr_push_flags_fn_t
) ndr_push_spoolss_ClosePrinter
,
31100 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ClosePrinter
,
31101 (ndr_print_function_t
) ndr_print_spoolss_ClosePrinter
,
31106 sizeof(struct spoolss_AddForm
),
31107 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddForm
,
31108 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddForm
,
31109 (ndr_print_function_t
) ndr_print_spoolss_AddForm
,
31113 "spoolss_DeleteForm",
31114 sizeof(struct spoolss_DeleteForm
),
31115 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeleteForm
,
31116 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeleteForm
,
31117 (ndr_print_function_t
) ndr_print_spoolss_DeleteForm
,
31122 sizeof(struct spoolss_GetForm
),
31123 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetForm
,
31124 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetForm
,
31125 (ndr_print_function_t
) ndr_print_spoolss_GetForm
,
31130 sizeof(struct spoolss_SetForm
),
31131 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetForm
,
31132 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetForm
,
31133 (ndr_print_function_t
) ndr_print_spoolss_SetForm
,
31137 "spoolss_EnumForms",
31138 sizeof(struct spoolss_EnumForms
),
31139 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumForms
,
31140 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumForms
,
31141 (ndr_print_function_t
) ndr_print_spoolss_EnumForms
,
31145 "spoolss_EnumPorts",
31146 sizeof(struct spoolss_EnumPorts
),
31147 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPorts
,
31148 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPorts
,
31149 (ndr_print_function_t
) ndr_print_spoolss_EnumPorts
,
31153 "spoolss_EnumMonitors",
31154 sizeof(struct spoolss_EnumMonitors
),
31155 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumMonitors
,
31156 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumMonitors
,
31157 (ndr_print_function_t
) ndr_print_spoolss_EnumMonitors
,
31162 sizeof(struct spoolss_AddPort
),
31163 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPort
,
31164 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPort
,
31165 (ndr_print_function_t
) ndr_print_spoolss_AddPort
,
31169 "spoolss_ConfigurePort",
31170 sizeof(struct spoolss_ConfigurePort
),
31171 (ndr_push_flags_fn_t
) ndr_push_spoolss_ConfigurePort
,
31172 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ConfigurePort
,
31173 (ndr_print_function_t
) ndr_print_spoolss_ConfigurePort
,
31177 "spoolss_DeletePort",
31178 sizeof(struct spoolss_DeletePort
),
31179 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePort
,
31180 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePort
,
31181 (ndr_print_function_t
) ndr_print_spoolss_DeletePort
,
31185 "spoolss_CreatePrinterIC",
31186 sizeof(struct spoolss_CreatePrinterIC
),
31187 (ndr_push_flags_fn_t
) ndr_push_spoolss_CreatePrinterIC
,
31188 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_CreatePrinterIC
,
31189 (ndr_print_function_t
) ndr_print_spoolss_CreatePrinterIC
,
31193 "spoolss_PlayGDIScriptOnPrinterIC",
31194 sizeof(struct spoolss_PlayGDIScriptOnPrinterIC
),
31195 (ndr_push_flags_fn_t
) ndr_push_spoolss_PlayGDIScriptOnPrinterIC
,
31196 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_PlayGDIScriptOnPrinterIC
,
31197 (ndr_print_function_t
) ndr_print_spoolss_PlayGDIScriptOnPrinterIC
,
31201 "spoolss_DeletePrinterIC",
31202 sizeof(struct spoolss_DeletePrinterIC
),
31203 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterIC
,
31204 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterIC
,
31205 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterIC
,
31209 "spoolss_AddPrinterConnection",
31210 sizeof(struct spoolss_AddPrinterConnection
),
31211 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinterConnection
,
31212 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinterConnection
,
31213 (ndr_print_function_t
) ndr_print_spoolss_AddPrinterConnection
,
31217 "spoolss_DeletePrinterConnection",
31218 sizeof(struct spoolss_DeletePrinterConnection
),
31219 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterConnection
,
31220 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterConnection
,
31221 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterConnection
,
31225 "spoolss_PrinterMessageBox",
31226 sizeof(struct spoolss_PrinterMessageBox
),
31227 (ndr_push_flags_fn_t
) ndr_push_spoolss_PrinterMessageBox
,
31228 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_PrinterMessageBox
,
31229 (ndr_print_function_t
) ndr_print_spoolss_PrinterMessageBox
,
31233 "spoolss_AddMonitor",
31234 sizeof(struct spoolss_AddMonitor
),
31235 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddMonitor
,
31236 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddMonitor
,
31237 (ndr_print_function_t
) ndr_print_spoolss_AddMonitor
,
31241 "spoolss_DeleteMonitor",
31242 sizeof(struct spoolss_DeleteMonitor
),
31243 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeleteMonitor
,
31244 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeleteMonitor
,
31245 (ndr_print_function_t
) ndr_print_spoolss_DeleteMonitor
,
31249 "spoolss_DeletePrintProcessor",
31250 sizeof(struct spoolss_DeletePrintProcessor
),
31251 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrintProcessor
,
31252 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrintProcessor
,
31253 (ndr_print_function_t
) ndr_print_spoolss_DeletePrintProcessor
,
31257 "spoolss_AddPrintProvidor",
31258 sizeof(struct spoolss_AddPrintProvidor
),
31259 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrintProvidor
,
31260 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrintProvidor
,
31261 (ndr_print_function_t
) ndr_print_spoolss_AddPrintProvidor
,
31265 "spoolss_DeletePrintProvidor",
31266 sizeof(struct spoolss_DeletePrintProvidor
),
31267 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrintProvidor
,
31268 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrintProvidor
,
31269 (ndr_print_function_t
) ndr_print_spoolss_DeletePrintProvidor
,
31273 "spoolss_EnumPrintProcDataTypes",
31274 sizeof(struct spoolss_EnumPrintProcDataTypes
),
31275 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrintProcDataTypes
,
31276 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrintProcDataTypes
,
31277 (ndr_print_function_t
) ndr_print_spoolss_EnumPrintProcDataTypes
,
31281 "spoolss_ResetPrinter",
31282 sizeof(struct spoolss_ResetPrinter
),
31283 (ndr_push_flags_fn_t
) ndr_push_spoolss_ResetPrinter
,
31284 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ResetPrinter
,
31285 (ndr_print_function_t
) ndr_print_spoolss_ResetPrinter
,
31289 "spoolss_GetPrinterDriver2",
31290 sizeof(struct spoolss_GetPrinterDriver2
),
31291 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDriver2
,
31292 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDriver2
,
31293 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDriver2
,
31297 "spoolss_FindFirstPrinterChangeNotification",
31298 sizeof(struct spoolss_FindFirstPrinterChangeNotification
),
31299 (ndr_push_flags_fn_t
) ndr_push_spoolss_FindFirstPrinterChangeNotification
,
31300 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_FindFirstPrinterChangeNotification
,
31301 (ndr_print_function_t
) ndr_print_spoolss_FindFirstPrinterChangeNotification
,
31305 "spoolss_FindNextPrinterChangeNotification",
31306 sizeof(struct spoolss_FindNextPrinterChangeNotification
),
31307 (ndr_push_flags_fn_t
) ndr_push_spoolss_FindNextPrinterChangeNotification
,
31308 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_FindNextPrinterChangeNotification
,
31309 (ndr_print_function_t
) ndr_print_spoolss_FindNextPrinterChangeNotification
,
31313 "spoolss_FindClosePrinterNotify",
31314 sizeof(struct spoolss_FindClosePrinterNotify
),
31315 (ndr_push_flags_fn_t
) ndr_push_spoolss_FindClosePrinterNotify
,
31316 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_FindClosePrinterNotify
,
31317 (ndr_print_function_t
) ndr_print_spoolss_FindClosePrinterNotify
,
31321 "spoolss_RouterFindFirstPrinterChangeNotificationOld",
31322 sizeof(struct spoolss_RouterFindFirstPrinterChangeNotificationOld
),
31323 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterFindFirstPrinterChangeNotificationOld
,
31324 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterFindFirstPrinterChangeNotificationOld
,
31325 (ndr_print_function_t
) ndr_print_spoolss_RouterFindFirstPrinterChangeNotificationOld
,
31329 "spoolss_ReplyOpenPrinter",
31330 sizeof(struct spoolss_ReplyOpenPrinter
),
31331 (ndr_push_flags_fn_t
) ndr_push_spoolss_ReplyOpenPrinter
,
31332 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ReplyOpenPrinter
,
31333 (ndr_print_function_t
) ndr_print_spoolss_ReplyOpenPrinter
,
31337 "spoolss_RouterReplyPrinter",
31338 sizeof(struct spoolss_RouterReplyPrinter
),
31339 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterReplyPrinter
,
31340 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterReplyPrinter
,
31341 (ndr_print_function_t
) ndr_print_spoolss_RouterReplyPrinter
,
31345 "spoolss_ReplyClosePrinter",
31346 sizeof(struct spoolss_ReplyClosePrinter
),
31347 (ndr_push_flags_fn_t
) ndr_push_spoolss_ReplyClosePrinter
,
31348 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ReplyClosePrinter
,
31349 (ndr_print_function_t
) ndr_print_spoolss_ReplyClosePrinter
,
31353 "spoolss_AddPortEx",
31354 sizeof(struct spoolss_AddPortEx
),
31355 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPortEx
,
31356 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPortEx
,
31357 (ndr_print_function_t
) ndr_print_spoolss_AddPortEx
,
31361 "spoolss_RouterFindFirstPrinterChangeNotification",
31362 sizeof(struct spoolss_RouterFindFirstPrinterChangeNotification
),
31363 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterFindFirstPrinterChangeNotification
,
31364 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterFindFirstPrinterChangeNotification
,
31365 (ndr_print_function_t
) ndr_print_spoolss_RouterFindFirstPrinterChangeNotification
,
31369 "spoolss_SpoolerInit",
31370 sizeof(struct spoolss_SpoolerInit
),
31371 (ndr_push_flags_fn_t
) ndr_push_spoolss_SpoolerInit
,
31372 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SpoolerInit
,
31373 (ndr_print_function_t
) ndr_print_spoolss_SpoolerInit
,
31377 "spoolss_ResetPrinterEx",
31378 sizeof(struct spoolss_ResetPrinterEx
),
31379 (ndr_push_flags_fn_t
) ndr_push_spoolss_ResetPrinterEx
,
31380 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_ResetPrinterEx
,
31381 (ndr_print_function_t
) ndr_print_spoolss_ResetPrinterEx
,
31385 "spoolss_RemoteFindFirstPrinterChangeNotifyEx",
31386 sizeof(struct spoolss_RemoteFindFirstPrinterChangeNotifyEx
),
31387 (ndr_push_flags_fn_t
) ndr_push_spoolss_RemoteFindFirstPrinterChangeNotifyEx
,
31388 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RemoteFindFirstPrinterChangeNotifyEx
,
31389 (ndr_print_function_t
) ndr_print_spoolss_RemoteFindFirstPrinterChangeNotifyEx
,
31393 "spoolss_RouterReplyPrinterEx",
31394 sizeof(struct spoolss_RouterReplyPrinterEx
),
31395 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterReplyPrinterEx
,
31396 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterReplyPrinterEx
,
31397 (ndr_print_function_t
) ndr_print_spoolss_RouterReplyPrinterEx
,
31401 "spoolss_RouterRefreshPrinterChangeNotify",
31402 sizeof(struct spoolss_RouterRefreshPrinterChangeNotify
),
31403 (ndr_push_flags_fn_t
) ndr_push_spoolss_RouterRefreshPrinterChangeNotify
,
31404 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_RouterRefreshPrinterChangeNotify
,
31405 (ndr_print_function_t
) ndr_print_spoolss_RouterRefreshPrinterChangeNotify
,
31410 sizeof(struct spoolss_44
),
31411 (ndr_push_flags_fn_t
) ndr_push_spoolss_44
,
31412 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_44
,
31413 (ndr_print_function_t
) ndr_print_spoolss_44
,
31417 "spoolss_OpenPrinterEx",
31418 sizeof(struct spoolss_OpenPrinterEx
),
31419 (ndr_push_flags_fn_t
) ndr_push_spoolss_OpenPrinterEx
,
31420 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_OpenPrinterEx
,
31421 (ndr_print_function_t
) ndr_print_spoolss_OpenPrinterEx
,
31425 "spoolss_AddPrinterEx",
31426 sizeof(struct spoolss_AddPrinterEx
),
31427 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinterEx
,
31428 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinterEx
,
31429 (ndr_print_function_t
) ndr_print_spoolss_AddPrinterEx
,
31434 sizeof(struct spoolss_47
),
31435 (ndr_push_flags_fn_t
) ndr_push_spoolss_47
,
31436 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_47
,
31437 (ndr_print_function_t
) ndr_print_spoolss_47
,
31441 "spoolss_EnumPrinterData",
31442 sizeof(struct spoolss_EnumPrinterData
),
31443 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinterData
,
31444 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinterData
,
31445 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinterData
,
31449 "spoolss_DeletePrinterData",
31450 sizeof(struct spoolss_DeletePrinterData
),
31451 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterData
,
31452 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterData
,
31453 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterData
,
31458 sizeof(struct spoolss_4a
),
31459 (ndr_push_flags_fn_t
) ndr_push_spoolss_4a
,
31460 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_4a
,
31461 (ndr_print_function_t
) ndr_print_spoolss_4a
,
31466 sizeof(struct spoolss_4b
),
31467 (ndr_push_flags_fn_t
) ndr_push_spoolss_4b
,
31468 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_4b
,
31469 (ndr_print_function_t
) ndr_print_spoolss_4b
,
31474 sizeof(struct spoolss_4c
),
31475 (ndr_push_flags_fn_t
) ndr_push_spoolss_4c
,
31476 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_4c
,
31477 (ndr_print_function_t
) ndr_print_spoolss_4c
,
31481 "spoolss_SetPrinterDataEx",
31482 sizeof(struct spoolss_SetPrinterDataEx
),
31483 (ndr_push_flags_fn_t
) ndr_push_spoolss_SetPrinterDataEx
,
31484 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_SetPrinterDataEx
,
31485 (ndr_print_function_t
) ndr_print_spoolss_SetPrinterDataEx
,
31489 "spoolss_GetPrinterDataEx",
31490 sizeof(struct spoolss_GetPrinterDataEx
),
31491 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDataEx
,
31492 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDataEx
,
31493 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDataEx
,
31497 "spoolss_EnumPrinterDataEx",
31498 sizeof(struct spoolss_EnumPrinterDataEx
),
31499 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinterDataEx
,
31500 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinterDataEx
,
31501 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinterDataEx
,
31505 "spoolss_EnumPrinterKey",
31506 sizeof(struct spoolss_EnumPrinterKey
),
31507 (ndr_push_flags_fn_t
) ndr_push_spoolss_EnumPrinterKey
,
31508 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_EnumPrinterKey
,
31509 (ndr_print_function_t
) ndr_print_spoolss_EnumPrinterKey
,
31513 "spoolss_DeletePrinterDataEx",
31514 sizeof(struct spoolss_DeletePrinterDataEx
),
31515 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterDataEx
,
31516 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterDataEx
,
31517 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterDataEx
,
31521 "spoolss_DeletePrinterKey",
31522 sizeof(struct spoolss_DeletePrinterKey
),
31523 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterKey
,
31524 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterKey
,
31525 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterKey
,
31530 sizeof(struct spoolss_53
),
31531 (ndr_push_flags_fn_t
) ndr_push_spoolss_53
,
31532 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_53
,
31533 (ndr_print_function_t
) ndr_print_spoolss_53
,
31537 "spoolss_DeletePrinterDriverEx",
31538 sizeof(struct spoolss_DeletePrinterDriverEx
),
31539 (ndr_push_flags_fn_t
) ndr_push_spoolss_DeletePrinterDriverEx
,
31540 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_DeletePrinterDriverEx
,
31541 (ndr_print_function_t
) ndr_print_spoolss_DeletePrinterDriverEx
,
31546 sizeof(struct spoolss_55
),
31547 (ndr_push_flags_fn_t
) ndr_push_spoolss_55
,
31548 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_55
,
31549 (ndr_print_function_t
) ndr_print_spoolss_55
,
31554 sizeof(struct spoolss_56
),
31555 (ndr_push_flags_fn_t
) ndr_push_spoolss_56
,
31556 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_56
,
31557 (ndr_print_function_t
) ndr_print_spoolss_56
,
31562 sizeof(struct spoolss_57
),
31563 (ndr_push_flags_fn_t
) ndr_push_spoolss_57
,
31564 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_57
,
31565 (ndr_print_function_t
) ndr_print_spoolss_57
,
31570 sizeof(struct spoolss_XcvData
),
31571 (ndr_push_flags_fn_t
) ndr_push_spoolss_XcvData
,
31572 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_XcvData
,
31573 (ndr_print_function_t
) ndr_print_spoolss_XcvData
,
31577 "spoolss_AddPrinterDriverEx",
31578 sizeof(struct spoolss_AddPrinterDriverEx
),
31579 (ndr_push_flags_fn_t
) ndr_push_spoolss_AddPrinterDriverEx
,
31580 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_AddPrinterDriverEx
,
31581 (ndr_print_function_t
) ndr_print_spoolss_AddPrinterDriverEx
,
31586 sizeof(struct spoolss_5a
),
31587 (ndr_push_flags_fn_t
) ndr_push_spoolss_5a
,
31588 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5a
,
31589 (ndr_print_function_t
) ndr_print_spoolss_5a
,
31594 sizeof(struct spoolss_5b
),
31595 (ndr_push_flags_fn_t
) ndr_push_spoolss_5b
,
31596 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5b
,
31597 (ndr_print_function_t
) ndr_print_spoolss_5b
,
31602 sizeof(struct spoolss_5c
),
31603 (ndr_push_flags_fn_t
) ndr_push_spoolss_5c
,
31604 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5c
,
31605 (ndr_print_function_t
) ndr_print_spoolss_5c
,
31610 sizeof(struct spoolss_5d
),
31611 (ndr_push_flags_fn_t
) ndr_push_spoolss_5d
,
31612 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5d
,
31613 (ndr_print_function_t
) ndr_print_spoolss_5d
,
31618 sizeof(struct spoolss_5e
),
31619 (ndr_push_flags_fn_t
) ndr_push_spoolss_5e
,
31620 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5e
,
31621 (ndr_print_function_t
) ndr_print_spoolss_5e
,
31626 sizeof(struct spoolss_5f
),
31627 (ndr_push_flags_fn_t
) ndr_push_spoolss_5f
,
31628 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_5f
,
31629 (ndr_print_function_t
) ndr_print_spoolss_5f
,
31634 sizeof(struct spoolss_60
),
31635 (ndr_push_flags_fn_t
) ndr_push_spoolss_60
,
31636 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_60
,
31637 (ndr_print_function_t
) ndr_print_spoolss_60
,
31642 sizeof(struct spoolss_61
),
31643 (ndr_push_flags_fn_t
) ndr_push_spoolss_61
,
31644 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_61
,
31645 (ndr_print_function_t
) ndr_print_spoolss_61
,
31650 sizeof(struct spoolss_62
),
31651 (ndr_push_flags_fn_t
) ndr_push_spoolss_62
,
31652 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_62
,
31653 (ndr_print_function_t
) ndr_print_spoolss_62
,
31658 sizeof(struct spoolss_63
),
31659 (ndr_push_flags_fn_t
) ndr_push_spoolss_63
,
31660 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_63
,
31661 (ndr_print_function_t
) ndr_print_spoolss_63
,
31666 sizeof(struct spoolss_64
),
31667 (ndr_push_flags_fn_t
) ndr_push_spoolss_64
,
31668 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_64
,
31669 (ndr_print_function_t
) ndr_print_spoolss_64
,
31674 sizeof(struct spoolss_65
),
31675 (ndr_push_flags_fn_t
) ndr_push_spoolss_65
,
31676 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_65
,
31677 (ndr_print_function_t
) ndr_print_spoolss_65
,
31681 "spoolss_GetCorePrinterDrivers",
31682 sizeof(struct spoolss_GetCorePrinterDrivers
),
31683 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetCorePrinterDrivers
,
31684 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetCorePrinterDrivers
,
31685 (ndr_print_function_t
) ndr_print_spoolss_GetCorePrinterDrivers
,
31690 sizeof(struct spoolss_67
),
31691 (ndr_push_flags_fn_t
) ndr_push_spoolss_67
,
31692 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_67
,
31693 (ndr_print_function_t
) ndr_print_spoolss_67
,
31697 "spoolss_GetPrinterDriverPackagePath",
31698 sizeof(struct spoolss_GetPrinterDriverPackagePath
),
31699 (ndr_push_flags_fn_t
) ndr_push_spoolss_GetPrinterDriverPackagePath
,
31700 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_GetPrinterDriverPackagePath
,
31701 (ndr_print_function_t
) ndr_print_spoolss_GetPrinterDriverPackagePath
,
31706 sizeof(struct spoolss_69
),
31707 (ndr_push_flags_fn_t
) ndr_push_spoolss_69
,
31708 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_69
,
31709 (ndr_print_function_t
) ndr_print_spoolss_69
,
31714 sizeof(struct spoolss_6a
),
31715 (ndr_push_flags_fn_t
) ndr_push_spoolss_6a
,
31716 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_6a
,
31717 (ndr_print_function_t
) ndr_print_spoolss_6a
,
31722 sizeof(struct spoolss_6b
),
31723 (ndr_push_flags_fn_t
) ndr_push_spoolss_6b
,
31724 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_6b
,
31725 (ndr_print_function_t
) ndr_print_spoolss_6b
,
31730 sizeof(struct spoolss_6c
),
31731 (ndr_push_flags_fn_t
) ndr_push_spoolss_6c
,
31732 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_6c
,
31733 (ndr_print_function_t
) ndr_print_spoolss_6c
,
31738 sizeof(struct spoolss_6d
),
31739 (ndr_push_flags_fn_t
) ndr_push_spoolss_6d
,
31740 (ndr_pull_flags_fn_t
) ndr_pull_spoolss_6d
,
31741 (ndr_print_function_t
) ndr_print_spoolss_6d
,
31744 { NULL
, 0, NULL
, NULL
, NULL
, false }
31747 static const char * const spoolss_endpoint_strings
[] = {
31748 "ncacn_np:[\\pipe\\spoolss]",
31751 static const struct ndr_interface_string_array spoolss_endpoints
= {
31753 .names
= spoolss_endpoint_strings
31756 static const char * const spoolss_authservice_strings
[] = {
31760 static const struct ndr_interface_string_array spoolss_authservices
= {
31762 .names
= spoolss_authservice_strings
31766 const struct ndr_interface_table ndr_table_spoolss
= {
31769 {0x12345678,0x1234,0xabcd,{0xef,0x00},{0x01,0x23,0x45,0x67,0x89,0xab}},
31770 NDR_SPOOLSS_VERSION
31772 .helpstring
= NDR_SPOOLSS_HELPSTRING
,
31774 .calls
= spoolss_calls
,
31775 .endpoints
= &spoolss_endpoints
,
31776 .authservices
= &spoolss_authservices