/* parser auto-generated by pidl */ #include "includes.h" NTSTATUS ndr_push_spoolss_DeviceMode(struct ndr_push *ndr, int ndr_flags, struct spoolss_DeviceMode *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_struct_start(ndr)); NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_nstring(ndr, NDR_SCALARS, &r->devicename)); NDR_CHECK(ndr_push_uint16(ndr, r->specversion)); NDR_CHECK(ndr_push_uint16(ndr, r->driverversion)); NDR_CHECK(ndr_push_uint16(ndr, r->size)); NDR_CHECK(ndr_push_uint16(ndr, r->driverextra)); NDR_CHECK(ndr_push_uint32(ndr, r->fields)); NDR_CHECK(ndr_push_uint16(ndr, r->orientation)); NDR_CHECK(ndr_push_uint16(ndr, r->papersize)); NDR_CHECK(ndr_push_uint16(ndr, r->paperlength)); NDR_CHECK(ndr_push_uint16(ndr, r->paperwidth)); NDR_CHECK(ndr_push_uint16(ndr, r->scale)); NDR_CHECK(ndr_push_uint16(ndr, r->copies)); NDR_CHECK(ndr_push_uint16(ndr, r->defaultsource)); NDR_CHECK(ndr_push_uint16(ndr, r->printquality)); NDR_CHECK(ndr_push_uint16(ndr, r->color)); NDR_CHECK(ndr_push_uint16(ndr, r->duplex)); NDR_CHECK(ndr_push_uint16(ndr, r->yresolution)); NDR_CHECK(ndr_push_uint16(ndr, r->ttoption)); NDR_CHECK(ndr_push_uint16(ndr, r->collate)); NDR_CHECK(ndr_push_nstring(ndr, NDR_SCALARS, &r->formname)); NDR_CHECK(ndr_push_uint16(ndr, r->logpixels)); NDR_CHECK(ndr_push_uint32(ndr, r->bitsperpel)); NDR_CHECK(ndr_push_uint32(ndr, r->pelswidth)); NDR_CHECK(ndr_push_uint32(ndr, r->pelsheight)); NDR_CHECK(ndr_push_uint32(ndr, r->displayflags)); NDR_CHECK(ndr_push_uint32(ndr, r->displayfrequency)); NDR_CHECK(ndr_push_uint32(ndr, r->icmmethod)); NDR_CHECK(ndr_push_uint32(ndr, r->icmintent)); NDR_CHECK(ndr_push_uint32(ndr, r->mediatype)); NDR_CHECK(ndr_push_uint32(ndr, r->dithertype)); NDR_CHECK(ndr_push_uint32(ndr, r->reserved1)); NDR_CHECK(ndr_push_uint32(ndr, r->reserved2)); NDR_CHECK(ndr_push_uint32(ndr, r->panningwidth)); NDR_CHECK(ndr_push_uint32(ndr, r->panningheight)); ndr_push_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_push_nstring(ndr, NDR_BUFFERS, &r->devicename)); NDR_CHECK(ndr_push_nstring(ndr, NDR_BUFFERS, &r->formname)); done: return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_PrinterEnum1(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterEnum1 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_struct_start(ndr)); NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, r->flags)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->name, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->description, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->comment, (ndr_push_const_fn_t) ndr_push_nstring)); ndr_push_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->name, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->description, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->comment, (ndr_push_const_fn_t) ndr_push_nstring)); done: return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_PrinterEnum2(struct ndr_push *ndr, int ndr_flags, struct spoolss_PrinterEnum2 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_struct_start(ndr)); NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->servername, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->printername, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->sharename, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->portname, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->drivername, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->comment, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->location, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->devmode, (ndr_push_const_fn_t) ndr_push_spoolss_DeviceMode)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->sepfile, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->printprocessor, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->datatype, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->parameters, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_SCALARS, r->secdesc, (ndr_push_const_fn_t) ndr_push_security_descriptor)); NDR_CHECK(ndr_push_uint32(ndr, r->attributes)); NDR_CHECK(ndr_push_uint32(ndr, r->priority)); NDR_CHECK(ndr_push_uint32(ndr, r->defaultpriority)); NDR_CHECK(ndr_push_uint32(ndr, r->starttime)); NDR_CHECK(ndr_push_uint32(ndr, r->untiltime)); NDR_CHECK(ndr_push_uint32(ndr, r->status)); NDR_CHECK(ndr_push_uint32(ndr, r->cjobs)); NDR_CHECK(ndr_push_uint32(ndr, r->averageppm)); ndr_push_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->servername, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->printername, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->sharename, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->portname, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->drivername, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->comment, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->location, (ndr_push_const_fn_t) ndr_push_nstring)); if (r->devmode) { NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, r->devmode, (ndr_push_const_fn_t) ndr_push_spoolss_DeviceMode)); } NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->sepfile, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->printprocessor, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->datatype, (ndr_push_const_fn_t) ndr_push_nstring)); NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, &r->parameters, (ndr_push_const_fn_t) ndr_push_nstring)); if (r->secdesc) { NDR_CHECK(ndr_push_relative(ndr, NDR_BUFFERS, r->secdesc, (ndr_push_const_fn_t) ndr_push_security_descriptor)); } done: return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_PrinterEnum(struct ndr_push *ndr, int ndr_flags, uint16 level, union spoolss_PrinterEnum *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_struct_start(ndr)); switch (level) { case 1: NDR_CHECK(ndr_push_spoolss_PrinterEnum1(ndr, NDR_SCALARS, &r->info1)); break; case 2: NDR_CHECK(ndr_push_spoolss_PrinterEnum2(ndr, NDR_SCALARS, &r->info2)); break; default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } ndr_push_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; switch (level) { case 1: NDR_CHECK(ndr_push_spoolss_PrinterEnum1(ndr, ndr_flags, &r->info1)); break; case 2: NDR_CHECK(ndr_push_spoolss_PrinterEnum2(ndr, ndr_flags, &r->info2)); break; default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } done: return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_EnumPrinters(struct ndr_push *ndr, struct spoolss_EnumPrinters *r) { NDR_CHECK(ndr_push_uint32(ndr, r->in.flags)); NDR_CHECK(ndr_push_ptr(ndr, r->in.server)); if (r->in.server) { NDR_CHECK(ndr_push_unistr(ndr, r->in.server)); } NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer)); if (r->in.buffer) { NDR_CHECK(ndr_push_DATA_BLOB(ndr, *r->in.buffer)); } NDR_CHECK(ndr_push_uint32(ndr, *r->in.buf_size)); return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_01(struct ndr_push *ndr, struct spoolss_01 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_02(struct ndr_push *ndr, struct spoolss_02 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_03(struct ndr_push *ndr, struct spoolss_03 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_EnumJobs(struct ndr_push *ndr, struct spoolss_EnumJobs *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.firstjob)); NDR_CHECK(ndr_push_uint32(ndr, r->in.numjobs)); NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer)); if (r->in.buffer) { NDR_CHECK(ndr_push_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.buffer)); } NDR_CHECK(ndr_push_uint32(ndr, r->in.offered)); return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_05(struct ndr_push *ndr, struct spoolss_05 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_06(struct ndr_push *ndr, struct spoolss_06 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_07(struct ndr_push *ndr, struct spoolss_07 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_GetPrinter(struct ndr_push *ndr, struct spoolss_GetPrinter *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); NDR_CHECK(ndr_push_ptr(ndr, r->in.buffer)); if (r->in.buffer) { NDR_CHECK(ndr_push_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.buffer)); } NDR_CHECK(ndr_push_uint32(ndr, r->in.offered)); return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_09(struct ndr_push *ndr, struct spoolss_09 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_0a(struct ndr_push *ndr, struct spoolss_0a *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_0b(struct ndr_push *ndr, struct spoolss_0b *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_0c(struct ndr_push *ndr, struct spoolss_0c *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_0d(struct ndr_push *ndr, struct spoolss_0d *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_0e(struct ndr_push *ndr, struct spoolss_0e *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_0f(struct ndr_push *ndr, struct spoolss_0f *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_10(struct ndr_push *ndr, struct spoolss_10 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_11(struct ndr_push *ndr, struct spoolss_11 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_StartPagePrinter(struct ndr_push *ndr, struct spoolss_StartPagePrinter *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_13(struct ndr_push *ndr, struct spoolss_13 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_EndPagePrinter(struct ndr_push *ndr, struct spoolss_EndPagePrinter *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_15(struct ndr_push *ndr, struct spoolss_15 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_16(struct ndr_push *ndr, struct spoolss_16 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_EndDocPrinter(struct ndr_push *ndr, struct spoolss_EndDocPrinter *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_18(struct ndr_push *ndr, struct spoolss_18 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_19(struct ndr_push *ndr, struct spoolss_19 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_1a(struct ndr_push *ndr, struct spoolss_1a *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_1b(struct ndr_push *ndr, struct spoolss_1b *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_1c(struct ndr_push *ndr, struct spoolss_1c *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_ClosePrinter(struct ndr_push *ndr, struct spoolss_ClosePrinter *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_1e(struct ndr_push *ndr, struct spoolss_1e *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_1f(struct ndr_push *ndr, struct spoolss_1f *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_20(struct ndr_push *ndr, struct spoolss_20 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_21(struct ndr_push *ndr, struct spoolss_21 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_22(struct ndr_push *ndr, struct spoolss_22 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_23(struct ndr_push *ndr, struct spoolss_23 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_24(struct ndr_push *ndr, struct spoolss_24 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_25(struct ndr_push *ndr, struct spoolss_25 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_26(struct ndr_push *ndr, struct spoolss_26 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_27(struct ndr_push *ndr, struct spoolss_27 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_28(struct ndr_push *ndr, struct spoolss_28 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_29(struct ndr_push *ndr, struct spoolss_29 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_2a(struct ndr_push *ndr, struct spoolss_2a *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_2b(struct ndr_push *ndr, struct spoolss_2b *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_2c(struct ndr_push *ndr, struct spoolss_2c *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_2d(struct ndr_push *ndr, struct spoolss_2d *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_2e(struct ndr_push *ndr, struct spoolss_2e *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_2f(struct ndr_push *ndr, struct spoolss_2f *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_30(struct ndr_push *ndr, struct spoolss_30 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_31(struct ndr_push *ndr, struct spoolss_31 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_32(struct ndr_push *ndr, struct spoolss_32 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_33(struct ndr_push *ndr, struct spoolss_33 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_34(struct ndr_push *ndr, struct spoolss_34 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_35(struct ndr_push *ndr, struct spoolss_35 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_36(struct ndr_push *ndr, struct spoolss_36 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_37(struct ndr_push *ndr, struct spoolss_37 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_38(struct ndr_push *ndr, struct spoolss_38 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_39(struct ndr_push *ndr, struct spoolss_39 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_3a(struct ndr_push *ndr, struct spoolss_3a *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_3b(struct ndr_push *ndr, struct spoolss_3b *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_3c(struct ndr_push *ndr, struct spoolss_3c *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_3d(struct ndr_push *ndr, struct spoolss_3d *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_3e(struct ndr_push *ndr, struct spoolss_3e *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_3f(struct ndr_push *ndr, struct spoolss_3f *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_40(struct ndr_push *ndr, struct spoolss_40 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_41(struct ndr_push *ndr, struct spoolss_41 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_42(struct ndr_push *ndr, struct spoolss_42 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_43(struct ndr_push *ndr, struct spoolss_43 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_44(struct ndr_push *ndr, struct spoolss_44 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_Devmode(struct ndr_push *ndr, int ndr_flags, struct spoolss_Devmode *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_struct_start(ndr)); NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, r->foo)); ndr_push_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_DevmodeContainer(struct ndr_push *ndr, int ndr_flags, struct spoolss_DevmodeContainer *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_struct_start(ndr)); NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, r->size)); NDR_CHECK(ndr_push_ptr(ndr, r->devmode)); ndr_push_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; if (r->devmode) { NDR_CHECK(ndr_push_spoolss_Devmode(ndr, NDR_SCALARS|NDR_BUFFERS, r->devmode)); } done: return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_UserLevel1(struct ndr_push *ndr, int ndr_flags, struct spoolss_UserLevel1 *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_struct_start(ndr)); NDR_CHECK(ndr_push_align(ndr, 4)); NDR_CHECK(ndr_push_uint32(ndr, r->size)); NDR_CHECK(ndr_push_ptr(ndr, r->client)); NDR_CHECK(ndr_push_ptr(ndr, r->user)); NDR_CHECK(ndr_push_uint32(ndr, r->build)); NDR_CHECK(ndr_push_uint32(ndr, r->major)); NDR_CHECK(ndr_push_uint32(ndr, r->minor)); NDR_CHECK(ndr_push_uint32(ndr, r->processor)); ndr_push_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; if (r->client) { NDR_CHECK(ndr_push_unistr(ndr, r->client)); } if (r->user) { NDR_CHECK(ndr_push_unistr(ndr, r->user)); } done: return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_UserLevel(struct ndr_push *ndr, int ndr_flags, uint16 level, union spoolss_UserLevel *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_push_struct_start(ndr)); NDR_CHECK(ndr_push_uint16(ndr, level)); switch (level) { case 1: NDR_CHECK(ndr_push_ptr(ndr, r->level1)); break; default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } ndr_push_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; switch (level) { case 1: if (r->level1) { NDR_CHECK(ndr_push_spoolss_UserLevel1(ndr, NDR_SCALARS|NDR_BUFFERS, r->level1)); } break; default: return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level); } done: return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_OpenPrinterEx(struct ndr_push *ndr, struct spoolss_OpenPrinterEx *r) { NDR_CHECK(ndr_push_ptr(ndr, r->in.printername)); if (r->in.printername) { NDR_CHECK(ndr_push_unistr(ndr, r->in.printername)); } NDR_CHECK(ndr_push_ptr(ndr, r->in.datatype)); if (r->in.datatype) { NDR_CHECK(ndr_push_unistr(ndr, r->in.datatype)); } NDR_CHECK(ndr_push_spoolss_DevmodeContainer(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.devmode_ctr)); NDR_CHECK(ndr_push_uint32(ndr, r->in.access_required)); NDR_CHECK(ndr_push_uint32(ndr, r->in.level)); NDR_CHECK(ndr_push_spoolss_UserLevel(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.level, &r->in.userlevel)); return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_46(struct ndr_push *ndr, struct spoolss_46 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_47(struct ndr_push *ndr, struct spoolss_47 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_EnumPrinterData(struct ndr_push *ndr, struct spoolss_EnumPrinterData *r) { NDR_CHECK(ndr_push_policy_handle(ndr, r->in.handle)); NDR_CHECK(ndr_push_uint32(ndr, r->in.enum_index)); NDR_CHECK(ndr_push_uint32(ndr, r->in.value_offered)); NDR_CHECK(ndr_push_uint32(ndr, r->in.data_offered)); return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_49(struct ndr_push *ndr, struct spoolss_49 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_4a(struct ndr_push *ndr, struct spoolss_4a *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_4b(struct ndr_push *ndr, struct spoolss_4b *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_4c(struct ndr_push *ndr, struct spoolss_4c *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_4d(struct ndr_push *ndr, struct spoolss_4d *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_4e(struct ndr_push *ndr, struct spoolss_4e *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_4f(struct ndr_push *ndr, struct spoolss_4f *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_50(struct ndr_push *ndr, struct spoolss_50 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_51(struct ndr_push *ndr, struct spoolss_51 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_52(struct ndr_push *ndr, struct spoolss_52 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_53(struct ndr_push *ndr, struct spoolss_53 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_54(struct ndr_push *ndr, struct spoolss_54 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_55(struct ndr_push *ndr, struct spoolss_55 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_56(struct ndr_push *ndr, struct spoolss_56 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_57(struct ndr_push *ndr, struct spoolss_57 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_58(struct ndr_push *ndr, struct spoolss_58 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_59(struct ndr_push *ndr, struct spoolss_59 *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_5a(struct ndr_push *ndr, struct spoolss_5a *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_5b(struct ndr_push *ndr, struct spoolss_5b *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_5c(struct ndr_push *ndr, struct spoolss_5c *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_5d(struct ndr_push *ndr, struct spoolss_5d *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_5e(struct ndr_push *ndr, struct spoolss_5e *r) { return NT_STATUS_OK; } NTSTATUS ndr_push_spoolss_5f(struct ndr_push *ndr, struct spoolss_5f *r) { return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_DeviceMode(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DeviceMode *r) { NDR_CHECK(ndr_pull_struct_start(ndr)); if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_nstring(ndr, NDR_SCALARS, &r->devicename)); NDR_CHECK(ndr_pull_uint16(ndr, &r->specversion)); NDR_CHECK(ndr_pull_uint16(ndr, &r->driverversion)); NDR_CHECK(ndr_pull_uint16(ndr, &r->size)); NDR_CHECK(ndr_pull_uint16(ndr, &r->driverextra)); NDR_CHECK(ndr_pull_uint32(ndr, &r->fields)); NDR_CHECK(ndr_pull_uint16(ndr, &r->orientation)); NDR_CHECK(ndr_pull_uint16(ndr, &r->papersize)); NDR_CHECK(ndr_pull_uint16(ndr, &r->paperlength)); NDR_CHECK(ndr_pull_uint16(ndr, &r->paperwidth)); NDR_CHECK(ndr_pull_uint16(ndr, &r->scale)); NDR_CHECK(ndr_pull_uint16(ndr, &r->copies)); NDR_CHECK(ndr_pull_uint16(ndr, &r->defaultsource)); NDR_CHECK(ndr_pull_uint16(ndr, &r->printquality)); NDR_CHECK(ndr_pull_uint16(ndr, &r->color)); NDR_CHECK(ndr_pull_uint16(ndr, &r->duplex)); NDR_CHECK(ndr_pull_uint16(ndr, &r->yresolution)); NDR_CHECK(ndr_pull_uint16(ndr, &r->ttoption)); NDR_CHECK(ndr_pull_uint16(ndr, &r->collate)); NDR_CHECK(ndr_pull_nstring(ndr, NDR_SCALARS, &r->formname)); NDR_CHECK(ndr_pull_uint16(ndr, &r->logpixels)); NDR_CHECK(ndr_pull_uint32(ndr, &r->bitsperpel)); NDR_CHECK(ndr_pull_uint32(ndr, &r->pelswidth)); NDR_CHECK(ndr_pull_uint32(ndr, &r->pelsheight)); NDR_CHECK(ndr_pull_uint32(ndr, &r->displayflags)); NDR_CHECK(ndr_pull_uint32(ndr, &r->displayfrequency)); NDR_CHECK(ndr_pull_uint32(ndr, &r->icmmethod)); NDR_CHECK(ndr_pull_uint32(ndr, &r->icmintent)); NDR_CHECK(ndr_pull_uint32(ndr, &r->mediatype)); NDR_CHECK(ndr_pull_uint32(ndr, &r->dithertype)); NDR_CHECK(ndr_pull_uint32(ndr, &r->reserved1)); NDR_CHECK(ndr_pull_uint32(ndr, &r->reserved2)); NDR_CHECK(ndr_pull_uint32(ndr, &r->panningwidth)); NDR_CHECK(ndr_pull_uint32(ndr, &r->panningheight)); ndr_pull_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; NDR_CHECK(ndr_pull_nstring(ndr, NDR_BUFFERS, &r->devicename)); NDR_CHECK(ndr_pull_nstring(ndr, NDR_BUFFERS, &r->formname)); done: return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_PrinterEnum1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterEnum1 *r) { NDR_CHECK(ndr_pull_struct_start(ndr)); if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint32(ndr, &r->flags)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->name, sizeof(*r->name), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->description, sizeof(*r->description), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->comment, sizeof(*r->comment), (ndr_pull_flags_fn_t)ndr_pull_nstring)); ndr_pull_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_PrinterEnum2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterEnum2 *r) { uint32 _ptr_devmode; uint32 _ptr_secdesc; NDR_CHECK(ndr_pull_struct_start(ndr)); if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->servername, sizeof(*r->servername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->printername, sizeof(*r->printername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->sharename, sizeof(*r->sharename), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->portname, sizeof(*r->portname), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->drivername, sizeof(*r->drivername), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->comment, sizeof(*r->comment), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->location, sizeof(*r->location), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->devmode, sizeof(*r->devmode), (ndr_pull_flags_fn_t)ndr_pull_spoolss_DeviceMode)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->sepfile, sizeof(*r->sepfile), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->printprocessor, sizeof(*r->printprocessor), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->datatype, sizeof(*r->datatype), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->parameters, sizeof(*r->parameters), (ndr_pull_flags_fn_t)ndr_pull_nstring)); NDR_CHECK(ndr_pull_relative(ndr, (const void **)&r->secdesc, sizeof(*r->secdesc), (ndr_pull_flags_fn_t)ndr_pull_security_descriptor)); NDR_CHECK(ndr_pull_uint32(ndr, &r->attributes)); NDR_CHECK(ndr_pull_uint32(ndr, &r->priority)); NDR_CHECK(ndr_pull_uint32(ndr, &r->defaultpriority)); NDR_CHECK(ndr_pull_uint32(ndr, &r->starttime)); NDR_CHECK(ndr_pull_uint32(ndr, &r->untiltime)); NDR_CHECK(ndr_pull_uint32(ndr, &r->status)); NDR_CHECK(ndr_pull_uint32(ndr, &r->cjobs)); NDR_CHECK(ndr_pull_uint32(ndr, &r->averageppm)); ndr_pull_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; done: return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_PrinterEnum(struct ndr_pull *ndr, int ndr_flags, uint16 *level, union spoolss_PrinterEnum *r) { if (!(ndr_flags & NDR_SCALARS)) goto buffers; NDR_CHECK(ndr_pull_struct_start(ndr)); switch (*level) { case 1: { NDR_CHECK(ndr_pull_spoolss_PrinterEnum1(ndr, NDR_SCALARS, &r->info1)); break; } case 2: { NDR_CHECK(ndr_pull_spoolss_PrinterEnum2(ndr, NDR_SCALARS, &r->info2)); break; } default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } ndr_pull_struct_end(ndr); buffers: if (!(ndr_flags & NDR_BUFFERS)) goto done; switch (*level) { case 1: NDR_CHECK(ndr_pull_spoolss_PrinterEnum1(ndr, NDR_BUFFERS, &r->info1)); break; case 2: NDR_CHECK(ndr_pull_spoolss_PrinterEnum2(ndr, NDR_BUFFERS, &r->info2)); break; default: return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", *level); } done: return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, struct spoolss_EnumPrinters *r) { uint32 _ptr_buffer; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer)); if (_ptr_buffer) { NDR_ALLOC(ndr, r->out.buffer); } else { r->out.buffer = NULL; } if (r->out.buffer) { NDR_CHECK(ndr_pull_DATA_BLOB(ndr, r->out.buffer)); } NDR_CHECK(ndr_pull_uint32(ndr, r->out.buf_size)); NDR_CHECK(ndr_pull_uint32(ndr, &r->out.count)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_01(struct ndr_pull *ndr, struct spoolss_01 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_02(struct ndr_pull *ndr, struct spoolss_02 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_03(struct ndr_pull *ndr, struct spoolss_03 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_EnumJobs(struct ndr_pull *ndr, struct spoolss_EnumJobs *r) { uint32 _ptr_buffer; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer)); if (_ptr_buffer) { NDR_ALLOC(ndr, r->out.buffer); } else { r->out.buffer = NULL; } if (r->out.buffer) { NDR_CHECK(ndr_pull_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.buffer)); } NDR_CHECK(ndr_pull_uint32(ndr, &r->out.needed)); NDR_CHECK(ndr_pull_uint32(ndr, &r->out.numjobs)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_05(struct ndr_pull *ndr, struct spoolss_05 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_06(struct ndr_pull *ndr, struct spoolss_06 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_07(struct ndr_pull *ndr, struct spoolss_07 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_GetPrinter(struct ndr_pull *ndr, struct spoolss_GetPrinter *r) { uint32 _ptr_buffer; NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_buffer)); if (_ptr_buffer) { NDR_ALLOC(ndr, r->out.buffer); } else { r->out.buffer = NULL; } if (r->out.buffer) { NDR_CHECK(ndr_pull_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.buffer)); } NDR_CHECK(ndr_pull_uint32(ndr, &r->out.needed)); NDR_CHECK(ndr_pull_uint32(ndr, &r->out.returned)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_09(struct ndr_pull *ndr, struct spoolss_09 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_0a(struct ndr_pull *ndr, struct spoolss_0a *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_0b(struct ndr_pull *ndr, struct spoolss_0b *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_0c(struct ndr_pull *ndr, struct spoolss_0c *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_0d(struct ndr_pull *ndr, struct spoolss_0d *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_0e(struct ndr_pull *ndr, struct spoolss_0e *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_0f(struct ndr_pull *ndr, struct spoolss_0f *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_10(struct ndr_pull *ndr, struct spoolss_10 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_11(struct ndr_pull *ndr, struct spoolss_11 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_StartPagePrinter(struct ndr_pull *ndr, struct spoolss_StartPagePrinter *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_13(struct ndr_pull *ndr, struct spoolss_13 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_EndPagePrinter(struct ndr_pull *ndr, struct spoolss_EndPagePrinter *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_15(struct ndr_pull *ndr, struct spoolss_15 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_16(struct ndr_pull *ndr, struct spoolss_16 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_EndDocPrinter(struct ndr_pull *ndr, struct spoolss_EndDocPrinter *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_18(struct ndr_pull *ndr, struct spoolss_18 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_19(struct ndr_pull *ndr, struct spoolss_19 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_1a(struct ndr_pull *ndr, struct spoolss_1a *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_1b(struct ndr_pull *ndr, struct spoolss_1b *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_1c(struct ndr_pull *ndr, struct spoolss_1c *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_ClosePrinter(struct ndr_pull *ndr, struct spoolss_ClosePrinter *r) { NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_1e(struct ndr_pull *ndr, struct spoolss_1e *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_1f(struct ndr_pull *ndr, struct spoolss_1f *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_20(struct ndr_pull *ndr, struct spoolss_20 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_21(struct ndr_pull *ndr, struct spoolss_21 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_22(struct ndr_pull *ndr, struct spoolss_22 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_23(struct ndr_pull *ndr, struct spoolss_23 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_24(struct ndr_pull *ndr, struct spoolss_24 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_25(struct ndr_pull *ndr, struct spoolss_25 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_26(struct ndr_pull *ndr, struct spoolss_26 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_27(struct ndr_pull *ndr, struct spoolss_27 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_28(struct ndr_pull *ndr, struct spoolss_28 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_29(struct ndr_pull *ndr, struct spoolss_29 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_2a(struct ndr_pull *ndr, struct spoolss_2a *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_2b(struct ndr_pull *ndr, struct spoolss_2b *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_2c(struct ndr_pull *ndr, struct spoolss_2c *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_2d(struct ndr_pull *ndr, struct spoolss_2d *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_2e(struct ndr_pull *ndr, struct spoolss_2e *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_2f(struct ndr_pull *ndr, struct spoolss_2f *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_30(struct ndr_pull *ndr, struct spoolss_30 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_31(struct ndr_pull *ndr, struct spoolss_31 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_32(struct ndr_pull *ndr, struct spoolss_32 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_33(struct ndr_pull *ndr, struct spoolss_33 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_34(struct ndr_pull *ndr, struct spoolss_34 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_35(struct ndr_pull *ndr, struct spoolss_35 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_36(struct ndr_pull *ndr, struct spoolss_36 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_37(struct ndr_pull *ndr, struct spoolss_37 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_38(struct ndr_pull *ndr, struct spoolss_38 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_39(struct ndr_pull *ndr, struct spoolss_39 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_3a(struct ndr_pull *ndr, struct spoolss_3a *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_3b(struct ndr_pull *ndr, struct spoolss_3b *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_3c(struct ndr_pull *ndr, struct spoolss_3c *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_3d(struct ndr_pull *ndr, struct spoolss_3d *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_3e(struct ndr_pull *ndr, struct spoolss_3e *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_3f(struct ndr_pull *ndr, struct spoolss_3f *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_40(struct ndr_pull *ndr, struct spoolss_40 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_41(struct ndr_pull *ndr, struct spoolss_41 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_42(struct ndr_pull *ndr, struct spoolss_42 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_43(struct ndr_pull *ndr, struct spoolss_43 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_44(struct ndr_pull *ndr, struct spoolss_44 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_OpenPrinterEx(struct ndr_pull *ndr, struct spoolss_OpenPrinterEx *r) { NDR_CHECK(ndr_pull_policy_handle(ndr, r->out.handle)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_46(struct ndr_pull *ndr, struct spoolss_46 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_47(struct ndr_pull *ndr, struct spoolss_47 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_EnumPrinterData(struct ndr_pull *ndr, struct spoolss_EnumPrinterData *r) { uint32 _ptr_value_name; NDR_CHECK(ndr_pull_uint32(ndr, &r->out.value_len)); NDR_CHECK(ndr_pull_uint32(ndr, &_ptr_value_name)); if (_ptr_value_name) { NDR_ALLOC(ndr, r->out.value_name); } else { r->out.value_name = NULL; } if (r->out.value_name) { NDR_CHECK(ndr_pull_unistr(ndr, &r->out.value_name)); } NDR_CHECK(ndr_pull_uint32(ndr, &r->out.value_needed)); NDR_CHECK(ndr_pull_uint32(ndr, &r->out.printerdata_type)); NDR_CHECK(ndr_pull_uint8_buf(ndr, NDR_SCALARS|NDR_BUFFERS, &r->out.printerdata)); NDR_CHECK(ndr_pull_uint32(ndr, &r->out.data_needed)); NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_49(struct ndr_pull *ndr, struct spoolss_49 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_4a(struct ndr_pull *ndr, struct spoolss_4a *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_4b(struct ndr_pull *ndr, struct spoolss_4b *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_4c(struct ndr_pull *ndr, struct spoolss_4c *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_4d(struct ndr_pull *ndr, struct spoolss_4d *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_4e(struct ndr_pull *ndr, struct spoolss_4e *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_4f(struct ndr_pull *ndr, struct spoolss_4f *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_50(struct ndr_pull *ndr, struct spoolss_50 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_51(struct ndr_pull *ndr, struct spoolss_51 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_52(struct ndr_pull *ndr, struct spoolss_52 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_53(struct ndr_pull *ndr, struct spoolss_53 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_54(struct ndr_pull *ndr, struct spoolss_54 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_55(struct ndr_pull *ndr, struct spoolss_55 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_56(struct ndr_pull *ndr, struct spoolss_56 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_57(struct ndr_pull *ndr, struct spoolss_57 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_58(struct ndr_pull *ndr, struct spoolss_58 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_59(struct ndr_pull *ndr, struct spoolss_59 *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_5a(struct ndr_pull *ndr, struct spoolss_5a *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_5b(struct ndr_pull *ndr, struct spoolss_5b *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_5c(struct ndr_pull *ndr, struct spoolss_5c *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_5d(struct ndr_pull *ndr, struct spoolss_5d *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_5e(struct ndr_pull *ndr, struct spoolss_5e *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } NTSTATUS ndr_pull_spoolss_5f(struct ndr_pull *ndr, struct spoolss_5f *r) { NDR_CHECK(ndr_pull_NTSTATUS(ndr, &r->out.result)); return NT_STATUS_OK; } void ndr_print_spoolss_DeviceMode(struct ndr_print *ndr, const char *name, struct spoolss_DeviceMode *r) { ndr_print_struct(ndr, name, "spoolss_DeviceMode"); ndr->depth++; ndr_print_nstring(ndr, "devicename", &r->devicename); ndr_print_uint16(ndr, "specversion", r->specversion); ndr_print_uint16(ndr, "driverversion", r->driverversion); ndr_print_uint16(ndr, "size", r->size); ndr_print_uint16(ndr, "driverextra", r->driverextra); ndr_print_uint32(ndr, "fields", r->fields); ndr_print_uint16(ndr, "orientation", r->orientation); ndr_print_uint16(ndr, "papersize", r->papersize); ndr_print_uint16(ndr, "paperlength", r->paperlength); ndr_print_uint16(ndr, "paperwidth", r->paperwidth); ndr_print_uint16(ndr, "scale", r->scale); ndr_print_uint16(ndr, "copies", r->copies); ndr_print_uint16(ndr, "defaultsource", r->defaultsource); ndr_print_uint16(ndr, "printquality", r->printquality); ndr_print_uint16(ndr, "color", r->color); ndr_print_uint16(ndr, "duplex", r->duplex); ndr_print_uint16(ndr, "yresolution", r->yresolution); ndr_print_uint16(ndr, "ttoption", r->ttoption); ndr_print_uint16(ndr, "collate", r->collate); ndr_print_nstring(ndr, "formname", &r->formname); ndr_print_uint16(ndr, "logpixels", r->logpixels); ndr_print_uint32(ndr, "bitsperpel", r->bitsperpel); ndr_print_uint32(ndr, "pelswidth", r->pelswidth); ndr_print_uint32(ndr, "pelsheight", r->pelsheight); ndr_print_uint32(ndr, "displayflags", r->displayflags); ndr_print_uint32(ndr, "displayfrequency", r->displayfrequency); ndr_print_uint32(ndr, "icmmethod", r->icmmethod); ndr_print_uint32(ndr, "icmintent", r->icmintent); ndr_print_uint32(ndr, "mediatype", r->mediatype); ndr_print_uint32(ndr, "dithertype", r->dithertype); ndr_print_uint32(ndr, "reserved1", r->reserved1); ndr_print_uint32(ndr, "reserved2", r->reserved2); ndr_print_uint32(ndr, "panningwidth", r->panningwidth); ndr_print_uint32(ndr, "panningheight", r->panningheight); ndr->depth--; } void ndr_print_spoolss_PrinterEnum1(struct ndr_print *ndr, const char *name, struct spoolss_PrinterEnum1 *r) { ndr_print_struct(ndr, name, "spoolss_PrinterEnum1"); ndr->depth++; ndr_print_uint32(ndr, "flags", r->flags); ndr_print_nstring(ndr, "name", &r->name); ndr_print_nstring(ndr, "description", &r->description); ndr_print_nstring(ndr, "comment", &r->comment); ndr->depth--; } void ndr_print_spoolss_PrinterEnum2(struct ndr_print *ndr, const char *name, struct spoolss_PrinterEnum2 *r) { ndr_print_struct(ndr, name, "spoolss_PrinterEnum2"); ndr->depth++; ndr_print_nstring(ndr, "servername", &r->servername); ndr_print_nstring(ndr, "printername", &r->printername); ndr_print_nstring(ndr, "sharename", &r->sharename); ndr_print_nstring(ndr, "portname", &r->portname); ndr_print_nstring(ndr, "drivername", &r->drivername); ndr_print_nstring(ndr, "comment", &r->comment); ndr_print_nstring(ndr, "location", &r->location); ndr_print_ptr(ndr, "devmode", r->devmode); ndr->depth++; if (r->devmode) { ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode); } ndr->depth--; ndr_print_nstring(ndr, "sepfile", &r->sepfile); ndr_print_nstring(ndr, "printprocessor", &r->printprocessor); ndr_print_nstring(ndr, "datatype", &r->datatype); ndr_print_nstring(ndr, "parameters", &r->parameters); ndr_print_ptr(ndr, "secdesc", r->secdesc); ndr->depth++; if (r->secdesc) { ndr_print_security_descriptor(ndr, "secdesc", r->secdesc); } ndr->depth--; ndr_print_uint32(ndr, "attributes", r->attributes); ndr_print_uint32(ndr, "priority", r->priority); ndr_print_uint32(ndr, "defaultpriority", r->defaultpriority); ndr_print_uint32(ndr, "starttime", r->starttime); ndr_print_uint32(ndr, "untiltime", r->untiltime); ndr_print_uint32(ndr, "status", r->status); ndr_print_uint32(ndr, "cjobs", r->cjobs); ndr_print_uint32(ndr, "averageppm", r->averageppm); ndr->depth--; } void ndr_print_spoolss_PrinterEnum(struct ndr_print *ndr, const char *name, uint16 level, union spoolss_PrinterEnum *r) { ndr_print_union(ndr, name, level, "spoolss_PrinterEnum"); switch (level) { case 1: ndr_print_spoolss_PrinterEnum1(ndr, "info1", &r->info1); break; case 2: ndr_print_spoolss_PrinterEnum2(ndr, "info2", &r->info2); break; default: ndr_print_bad_level(ndr, name, level); } } void ndr_print_spoolss_Devmode(struct ndr_print *ndr, const char *name, struct spoolss_Devmode *r) { ndr_print_struct(ndr, name, "spoolss_Devmode"); ndr->depth++; ndr_print_uint32(ndr, "foo", r->foo); ndr->depth--; } void ndr_print_spoolss_DevmodeContainer(struct ndr_print *ndr, const char *name, struct spoolss_DevmodeContainer *r) { ndr_print_struct(ndr, name, "spoolss_DevmodeContainer"); ndr->depth++; ndr_print_uint32(ndr, "size", r->size); ndr_print_ptr(ndr, "devmode", r->devmode); ndr->depth++; if (r->devmode) { ndr_print_spoolss_Devmode(ndr, "devmode", r->devmode); } ndr->depth--; ndr->depth--; } void ndr_print_spoolss_UserLevel1(struct ndr_print *ndr, const char *name, struct spoolss_UserLevel1 *r) { ndr_print_struct(ndr, name, "spoolss_UserLevel1"); ndr->depth++; ndr_print_uint32(ndr, "size", r->size); ndr_print_ptr(ndr, "client", r->client); ndr->depth++; if (r->client) { ndr_print_unistr(ndr, "client", r->client); } ndr->depth--; ndr_print_ptr(ndr, "user", r->user); ndr->depth++; if (r->user) { ndr_print_unistr(ndr, "user", r->user); } ndr->depth--; ndr_print_uint32(ndr, "build", r->build); ndr_print_uint32(ndr, "major", r->major); ndr_print_uint32(ndr, "minor", r->minor); ndr_print_uint32(ndr, "processor", r->processor); ndr->depth--; } void ndr_print_spoolss_UserLevel(struct ndr_print *ndr, const char *name, uint16 level, union spoolss_UserLevel *r) { ndr_print_union(ndr, name, level, "spoolss_UserLevel"); switch (level) { case 1: ndr_print_ptr(ndr, "level1", r->level1); ndr->depth++; if (r->level1) { ndr_print_spoolss_UserLevel1(ndr, "level1", r->level1); } ndr->depth--; break; default: ndr_print_bad_level(ndr, name, level); } }