LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_spoolss.c (source / functions) Hit Total Coverage
Test: coverage report for abartlet/fix-coverage dd10fb34 Lines: 10393 27527 37.8 %
Date: 2021-09-23 10:06:22 Functions: 411 1054 39.0 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_spoolss.h"
       5             : 
       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        1018 : static enum ndr_err_code ndr_push_spoolss_Time(struct ndr_push *ndr, int ndr_flags, const struct spoolss_Time *r)
      10             : {
      11        1018 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      12        1018 :         if (ndr_flags & NDR_SCALARS) {
      13        1018 :                 NDR_CHECK(ndr_push_align(ndr, 2));
      14        1018 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->year));
      15        1018 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->month));
      16        1018 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day_of_week));
      17        1018 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->day));
      18        1018 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->hour));
      19        1018 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->minute));
      20        1018 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->second));
      21        1018 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->millisecond));
      22        1018 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
      23             :         }
      24        1018 :         if (ndr_flags & NDR_BUFFERS) {
      25             :         }
      26        1018 :         return NDR_ERR_SUCCESS;
      27             : }
      28             : 
      29         368 : static enum ndr_err_code ndr_pull_spoolss_Time(struct ndr_pull *ndr, int ndr_flags, struct spoolss_Time *r)
      30             : {
      31         368 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      32         368 :         if (ndr_flags & NDR_SCALARS) {
      33         368 :                 NDR_CHECK(ndr_pull_align(ndr, 2));
      34         368 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->year));
      35         368 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->month));
      36         368 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day_of_week));
      37         368 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->day));
      38         368 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->hour));
      39         368 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->minute));
      40         368 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->second));
      41         368 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->millisecond));
      42         368 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
      43             :         }
      44         364 :         if (ndr_flags & NDR_BUFFERS) {
      45             :         }
      46         368 :         return NDR_ERR_SUCCESS;
      47             : }
      48             : 
      49           0 : static size_t ndr_size_spoolss_Time(const struct spoolss_Time *r, int flags)
      50             : {
      51           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_Time);
      52             : }
      53             : 
      54           0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_TimeCtr(struct ndr_push *ndr, int ndr_flags, const struct spoolss_TimeCtr *r)
      55             : {
      56           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      57           0 :         if (ndr_flags & NDR_SCALARS) {
      58           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
      59           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_spoolss_Time(r->time, ndr->flags)));
      60           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->time));
      61           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
      62             :         }
      63           0 :         if (ndr_flags & NDR_BUFFERS) {
      64           0 :                 if (r->time) {
      65           0 :                         NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, r->time));
      66             :                 }
      67             :         }
      68           0 :         return NDR_ERR_SUCCESS;
      69             : }
      70             : 
      71           8 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_TimeCtr(struct ndr_pull *ndr, int ndr_flags, struct spoolss_TimeCtr *r)
      72             : {
      73             :         uint32_t _ptr_time;
      74           8 :         TALLOC_CTX *_mem_save_time_0 = NULL;
      75           8 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      76           8 :         if (ndr_flags & NDR_SCALARS) {
      77           4 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
      78           4 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
      79           4 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time));
      80           4 :                 if (_ptr_time) {
      81           4 :                         NDR_PULL_ALLOC(ndr, r->time);
      82             :                 } else {
      83           0 :                         r->time = NULL;
      84             :                 }
      85           4 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
      86             :         }
      87           8 :         if (ndr_flags & NDR_BUFFERS) {
      88           4 :                 if (r->time) {
      89           4 :                         _mem_save_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
      90           4 :                         NDR_PULL_SET_MEM_CTX(ndr, r->time, 0);
      91           4 :                         NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, r->time));
      92           4 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_0, 0);
      93             :                 }
      94             :         }
      95           0 :         return NDR_ERR_SUCCESS;
      96             : }
      97             : 
      98           0 : static void ndr_print_flags_spoolss_TimeCtr(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_TimeCtr *r)
      99             : {
     100           0 :         ndr_print_spoolss_TimeCtr(ndr, name, r);
     101           0 : }
     102             : 
     103           4 : _PUBLIC_ void ndr_print_spoolss_TimeCtr(struct ndr_print *ndr, const char *name, const struct spoolss_TimeCtr *r)
     104             : {
     105           4 :         ndr_print_struct(ndr, name, "spoolss_TimeCtr");
     106           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
     107           4 :         ndr->depth++;
     108           4 :         ndr_print_uint32(ndr, "size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_Time(r->time, ndr->flags):r->size);
     109           4 :         ndr_print_ptr(ndr, "time", r->time);
     110           4 :         ndr->depth++;
     111           4 :         if (r->time) {
     112           4 :                 ndr_print_spoolss_Time(ndr, "time", r->time);
     113             :         }
     114           4 :         ndr->depth--;
     115           4 :         ndr->depth--;
     116             : }
     117             : 
     118        1170 : static enum ndr_err_code ndr_push_spoolss_ProcessorArchitecture(struct ndr_push *ndr, int ndr_flags, enum spoolss_ProcessorArchitecture r)
     119             : {
     120        1170 :         NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
     121        1170 :         return NDR_ERR_SUCCESS;
     122             : }
     123             : 
     124         896 : static enum ndr_err_code ndr_pull_spoolss_ProcessorArchitecture(struct ndr_pull *ndr, int ndr_flags, enum spoolss_ProcessorArchitecture *r)
     125             : {
     126             :         uint16_t v;
     127         908 :         NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
     128         908 :         *r = v;
     129         896 :         return NDR_ERR_SUCCESS;
     130             : }
     131             : 
     132          12 : _PUBLIC_ void ndr_print_spoolss_ProcessorArchitecture(struct ndr_print *ndr, const char *name, enum spoolss_ProcessorArchitecture r)
     133             : {
     134          12 :         const char *val = NULL;
     135             : 
     136          12 :         switch (r) {
     137           8 :                 case PROCESSOR_ARCHITECTURE_INTEL: val = "PROCESSOR_ARCHITECTURE_INTEL"; break;
     138           0 :                 case PROCESSOR_ARCHITECTURE_MIPS: val = "PROCESSOR_ARCHITECTURE_MIPS"; break;
     139           0 :                 case PROCESSOR_ARCHITECTURE_ALPHA: val = "PROCESSOR_ARCHITECTURE_ALPHA"; break;
     140           0 :                 case PROCESSOR_ARCHITECTURE_PPC: val = "PROCESSOR_ARCHITECTURE_PPC"; break;
     141           0 :                 case PROCESSOR_ARCHITECTURE_SHX: val = "PROCESSOR_ARCHITECTURE_SHX"; break;
     142           0 :                 case PROCESSOR_ARCHITECTURE_ARM: val = "PROCESSOR_ARCHITECTURE_ARM"; break;
     143           0 :                 case PROCESSOR_ARCHITECTURE_IA64: val = "PROCESSOR_ARCHITECTURE_IA64"; break;
     144           0 :                 case PROCESSOR_ARCHITECTURE_ALPHA64: val = "PROCESSOR_ARCHITECTURE_ALPHA64"; break;
     145           0 :                 case PROCESSOR_ARCHITECTURE_MSIL: val = "PROCESSOR_ARCHITECTURE_MSIL"; break;
     146           4 :                 case PROCESSOR_ARCHITECTURE_AMD64: val = "PROCESSOR_ARCHITECTURE_AMD64"; break;
     147           0 :                 case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64: val = "PROCESSOR_ARCHITECTURE_IA32_ON_WIN64"; break;
     148           0 :                 case PROCESSOR_ARCHITECTURE_NEUTRAL: val = "PROCESSOR_ARCHITECTURE_NEUTRAL"; break;
     149           0 :                 case PROCESSOR_ARCHITECTURE_ARM64: val = "PROCESSOR_ARCHITECTURE_ARM64"; break;
     150           0 :                 case PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64: val = "PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64"; break;
     151           0 :                 case PROCESSOR_ARCHITECTURE_IA32_ON_ARM64: val = "PROCESSOR_ARCHITECTURE_IA32_ON_ARM64"; break;
     152           0 :                 case PROCESSOR_ARCHITECTURE_UNKNOWN: val = "PROCESSOR_ARCHITECTURE_UNKNOWN"; break;
     153             :         }
     154          12 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     155          12 : }
     156             : 
     157         410 : static enum ndr_err_code ndr_push_spoolss_ProcessorType(struct ndr_push *ndr, int ndr_flags, enum spoolss_ProcessorType r)
     158             : {
     159         410 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     160         410 :         return NDR_ERR_SUCCESS;
     161             : }
     162             : 
     163         140 : static enum ndr_err_code ndr_pull_spoolss_ProcessorType(struct ndr_pull *ndr, int ndr_flags, enum spoolss_ProcessorType *r)
     164             : {
     165             :         uint32_t v;
     166         140 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     167         140 :         *r = v;
     168         140 :         return NDR_ERR_SUCCESS;
     169             : }
     170             : 
     171           0 : _PUBLIC_ void ndr_print_spoolss_ProcessorType(struct ndr_print *ndr, const char *name, enum spoolss_ProcessorType r)
     172             : {
     173           0 :         const char *val = NULL;
     174             : 
     175           0 :         switch (r) {
     176           0 :                 case PROCESSOR_INTEL_386: val = "PROCESSOR_INTEL_386"; break;
     177           0 :                 case PROCESSOR_INTEL_486: val = "PROCESSOR_INTEL_486"; break;
     178           0 :                 case PROCESSOR_INTEL_PENTIUM: val = "PROCESSOR_INTEL_PENTIUM"; break;
     179           0 :                 case PROCESSOR_INTEL_860: val = "PROCESSOR_INTEL_860"; break;
     180           0 :                 case PROCESSOR_INTEL_IA64: val = "PROCESSOR_INTEL_IA64"; break;
     181           0 :                 case PROCESSOR_AMD_X8664: val = "PROCESSOR_AMD_X8664"; break;
     182           0 :                 case PROCESSOR_MIPS_R2000: val = "PROCESSOR_MIPS_R2000"; break;
     183           0 :                 case PROCESSOR_MIPS_R3000: val = "PROCESSOR_MIPS_R3000"; break;
     184           0 :                 case PROCESSOR_ALPHA_21064: val = "PROCESSOR_ALPHA_21064"; break;
     185           0 :                 case PROCESSOR_PPC_601: val = "PROCESSOR_PPC_601"; break;
     186           0 :                 case PROCESSOR_PPC_603: val = "PROCESSOR_PPC_603"; break;
     187           0 :                 case PROCESSOR_PPC_604: val = "PROCESSOR_PPC_604"; break;
     188           0 :                 case PROCESSOR_PPC_620: val = "PROCESSOR_PPC_620"; break;
     189           0 :                 case PROCESSOR_HITACHI_SH3: val = "PROCESSOR_HITACHI_SH3"; break;
     190           0 :                 case PROCESSOR_HITACHI_SH3E: val = "PROCESSOR_HITACHI_SH3E"; break;
     191           0 :                 case PROCESSOR_HITACHI_SH4: val = "PROCESSOR_HITACHI_SH4"; break;
     192           0 :                 case PROCESSOR_MOTOROLA_821: val = "PROCESSOR_MOTOROLA_821"; break;
     193           0 :                 case PROCESSOR_STRONGARM: val = "PROCESSOR_STRONGARM"; break;
     194           0 :                 case PROCESSOR_ARM720: val = "PROCESSOR_ARM720"; break;
     195           0 :                 case PROCESSOR_ARM820: val = "PROCESSOR_ARM820"; break;
     196           0 :                 case PROCESSOR_ARM920: val = "PROCESSOR_ARM920"; break;
     197           0 :                 case PROCESSOR_ARM_7TDMI: val = "PROCESSOR_ARM_7TDMI"; break;
     198           0 :                 case PROCESSOR_OPTIL: val = "PROCESSOR_OPTIL"; break;
     199             :         }
     200           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     201           0 : }
     202             : 
     203         760 : static enum ndr_err_code ndr_push_spoolss_MajorVersion(struct ndr_push *ndr, int ndr_flags, enum spoolss_MajorVersion r)
     204             : {
     205         760 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     206         760 :         return NDR_ERR_SUCCESS;
     207             : }
     208             : 
     209         756 : static enum ndr_err_code ndr_pull_spoolss_MajorVersion(struct ndr_pull *ndr, int ndr_flags, enum spoolss_MajorVersion *r)
     210             : {
     211             :         uint32_t v;
     212         768 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     213         768 :         *r = v;
     214         756 :         return NDR_ERR_SUCCESS;
     215             : }
     216             : 
     217          12 : _PUBLIC_ void ndr_print_spoolss_MajorVersion(struct ndr_print *ndr, const char *name, enum spoolss_MajorVersion r)
     218             : {
     219          12 :         const char *val = NULL;
     220             : 
     221          12 :         switch (r) {
     222           0 :                 case SPOOLSS_MAJOR_VERSION_NT4_95_98_ME: val = "SPOOLSS_MAJOR_VERSION_NT4_95_98_ME"; break;
     223           0 :                 case SPOOLSS_MAJOR_VERSION_2000_2003_XP: val = "SPOOLSS_MAJOR_VERSION_2000_2003_XP"; break;
     224           0 :                 case SPOOLSS_MAJOR_VERSION_2008_VISTA: val = "SPOOLSS_MAJOR_VERSION_2008_VISTA"; break;
     225             :         }
     226          12 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     227          12 : }
     228             : 
     229         760 : static enum ndr_err_code ndr_push_spoolss_MinorVersion(struct ndr_push *ndr, int ndr_flags, enum spoolss_MinorVersion r)
     230             : {
     231         760 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     232         760 :         return NDR_ERR_SUCCESS;
     233             : }
     234             : 
     235         756 : static enum ndr_err_code ndr_pull_spoolss_MinorVersion(struct ndr_pull *ndr, int ndr_flags, enum spoolss_MinorVersion *r)
     236             : {
     237             :         uint32_t v;
     238         768 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     239         768 :         *r = v;
     240         756 :         return NDR_ERR_SUCCESS;
     241             : }
     242             : 
     243          12 : _PUBLIC_ void ndr_print_spoolss_MinorVersion(struct ndr_print *ndr, const char *name, enum spoolss_MinorVersion r)
     244             : {
     245          12 :         const char *val = NULL;
     246             : 
     247          12 :         switch (r) {
     248          12 :                 case SPOOLSS_MINOR_VERSION_0: val = "SPOOLSS_MINOR_VERSION_0"; break;
     249           0 :                 case SPOOLSS_MINOR_VERSION_XP: val = "SPOOLSS_MINOR_VERSION_XP"; break;
     250           0 :                 case SPOOLSS_MINOR_VERSION_2003_XP64: val = "SPOOLSS_MINOR_VERSION_2003_XP64"; break;
     251           0 :                 case SPOOLSS_MINOR_VERSION_98: val = "SPOOLSS_MINOR_VERSION_98"; break;
     252           0 :                 case SPOOLSS_MINOR_VERSION_ME: val = "SPOOLSS_MINOR_VERSION_ME"; break;
     253             :         }
     254          12 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     255          12 : }
     256             : 
     257        2564 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterStatus(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     258             : {
     259        2564 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     260        2564 :         return NDR_ERR_SUCCESS;
     261             : }
     262             : 
     263         980 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterStatus(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     264             : {
     265             :         uint32_t v;
     266         980 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     267         980 :         *r = v;
     268         980 :         return NDR_ERR_SUCCESS;
     269             : }
     270             : 
     271           4 : _PUBLIC_ void ndr_print_spoolss_PrinterStatus(struct ndr_print *ndr, const char *name, uint32_t r)
     272             : {
     273           4 :         ndr_print_uint32(ndr, name, r);
     274           4 :         ndr->depth++;
     275           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAUSED", PRINTER_STATUS_PAUSED, r);
     276           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_ERROR", PRINTER_STATUS_ERROR, r);
     277           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PENDING_DELETION", PRINTER_STATUS_PENDING_DELETION, r);
     278           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_JAM", PRINTER_STATUS_PAPER_JAM, r);
     279           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_OUT", PRINTER_STATUS_PAPER_OUT, r);
     280           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_MANUAL_FEED", PRINTER_STATUS_MANUAL_FEED, r);
     281           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAPER_PROBLEM", PRINTER_STATUS_PAPER_PROBLEM, r);
     282           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OFFLINE", PRINTER_STATUS_OFFLINE, r);
     283           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_IO_ACTIVE", PRINTER_STATUS_IO_ACTIVE, r);
     284           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_BUSY", PRINTER_STATUS_BUSY, r);
     285           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PRINTING", PRINTER_STATUS_PRINTING, r);
     286           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OUTPUT_BIN_FULL", PRINTER_STATUS_OUTPUT_BIN_FULL, r);
     287           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_NOT_AVAILABLE", PRINTER_STATUS_NOT_AVAILABLE, r);
     288           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_WAITING", PRINTER_STATUS_WAITING, r);
     289           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PROCESSING", PRINTER_STATUS_PROCESSING, r);
     290           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_INITIALIZING", PRINTER_STATUS_INITIALIZING, r);
     291           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_WARMING_UP", PRINTER_STATUS_WARMING_UP, r);
     292           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_TONER_LOW", PRINTER_STATUS_TONER_LOW, r);
     293           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_NO_TONER", PRINTER_STATUS_NO_TONER, r);
     294           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_PAGE_PUNT", PRINTER_STATUS_PAGE_PUNT, r);
     295           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_USER_INTERVENTION", PRINTER_STATUS_USER_INTERVENTION, r);
     296           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_OUT_OF_MEMORY", PRINTER_STATUS_OUT_OF_MEMORY, r);
     297           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_DOOR_OPEN", PRINTER_STATUS_DOOR_OPEN, r);
     298           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_SERVER_UNKNOWN", PRINTER_STATUS_SERVER_UNKNOWN, r);
     299           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_STATUS_POWER_SAVE", PRINTER_STATUS_POWER_SAVE, r);
     300           4 :         ndr->depth--;
     301           4 : }
     302             : 
     303        1018 : static enum ndr_err_code ndr_push_spoolss_JobStatus(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     304             : {
     305        1018 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     306        1018 :         return NDR_ERR_SUCCESS;
     307             : }
     308             : 
     309         364 : static enum ndr_err_code ndr_pull_spoolss_JobStatus(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     310             : {
     311             :         uint32_t v;
     312         364 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     313         364 :         *r = v;
     314         364 :         return NDR_ERR_SUCCESS;
     315             : }
     316             : 
     317           0 : _PUBLIC_ void ndr_print_spoolss_JobStatus(struct ndr_print *ndr, const char *name, uint32_t r)
     318             : {
     319           0 :         ndr_print_uint32(ndr, name, r);
     320           0 :         ndr->depth++;
     321           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PAUSED", JOB_STATUS_PAUSED, r);
     322           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_ERROR", JOB_STATUS_ERROR, r);
     323           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_DELETING", JOB_STATUS_DELETING, r);
     324           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_SPOOLING", JOB_STATUS_SPOOLING, r);
     325           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PRINTING", JOB_STATUS_PRINTING, r);
     326           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_OFFLINE", JOB_STATUS_OFFLINE, r);
     327           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PAPEROUT", JOB_STATUS_PAPEROUT, r);
     328           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_PRINTED", JOB_STATUS_PRINTED, r);
     329           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_DELETED", JOB_STATUS_DELETED, r);
     330           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_BLOCKED_DEVQ", JOB_STATUS_BLOCKED_DEVQ, r);
     331           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_USER_INTERVENTION", JOB_STATUS_USER_INTERVENTION, r);
     332           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_RESTART", JOB_STATUS_RESTART, r);
     333           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "JOB_STATUS_COMPLETE", JOB_STATUS_COMPLETE, r);
     334           0 :         ndr->depth--;
     335           0 : }
     336             : 
     337         410 : static enum ndr_err_code ndr_push_spoolss_Build(struct ndr_push *ndr, int ndr_flags, enum spoolss_Build r)
     338             : {
     339         410 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     340         410 :         return NDR_ERR_SUCCESS;
     341             : }
     342             : 
     343         140 : static enum ndr_err_code ndr_pull_spoolss_Build(struct ndr_pull *ndr, int ndr_flags, enum spoolss_Build *r)
     344             : {
     345             :         uint32_t v;
     346         140 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     347         140 :         *r = v;
     348         140 :         return NDR_ERR_SUCCESS;
     349             : }
     350             : 
     351           0 : _PUBLIC_ void ndr_print_spoolss_Build(struct ndr_print *ndr, const char *name, enum spoolss_Build r)
     352             : {
     353           0 :         const char *val = NULL;
     354             : 
     355           0 :         switch (r) {
     356           0 :                 case SPOOLSS_DEBUGGING_BUILD: val = "SPOOLSS_DEBUGGING_BUILD"; break;
     357           0 :                 case SPOOLSS_RELEASE_BUILD: val = "SPOOLSS_RELEASE_BUILD"; break;
     358             :         }
     359           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     360           0 : }
     361             : 
     362         820 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo0(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo0 *r)
     363             : {
     364         820 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     365         820 :         if (ndr_flags & NDR_SCALARS) {
     366         410 :                 NDR_CHECK(ndr_push_align(ndr, 5));
     367             :                 {
     368         410 :                         uint32_t _flags_save_string = ndr->flags;
     369         410 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     370         410 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
     371         410 :                         ndr->flags = _flags_save_string;
     372             :                 }
     373             :                 {
     374         410 :                         uint32_t _flags_save_string = ndr->flags;
     375         410 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     376         410 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
     377         410 :                         ndr->flags = _flags_save_string;
     378             :                 }
     379         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
     380         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_jobs));
     381         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_bytes));
     382         410 :                 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->time));
     383         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->global_counter));
     384         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
     385         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
     386         410 :                 NDR_CHECK(ndr_push_spoolss_Build(ndr, NDR_SCALARS, r->free_build));
     387         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->spooling));
     388         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_spooling));
     389         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_counter));
     390         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_out_of_paper));
     391         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_not_ready));
     392         410 :                 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->job_error));
     393         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_of_processors));
     394         410 :                 NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr, NDR_SCALARS, r->processor_type));
     395         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high_part_total_bytes));
     396         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->change_id));
     397         410 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_error));
     398         410 :                 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
     399         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumerate_network_printers));
     400         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->c_setprinter));
     401         410 :                 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor_architecture));
     402         410 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->processor_level));
     403         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_ic));
     404         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
     405         410 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved3));
     406         410 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
     407             :         }
     408         820 :         if (ndr_flags & NDR_BUFFERS) {
     409             :                 {
     410         410 :                         uint32_t _flags_save_string = ndr->flags;
     411         410 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     412         410 :                         if (r->printername) {
     413         410 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printername));
     414         410 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
     415         410 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printername));
     416             :                         }
     417         410 :                         ndr->flags = _flags_save_string;
     418             :                 }
     419             :                 {
     420         410 :                         uint32_t _flags_save_string = ndr->flags;
     421         410 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     422         410 :                         if (r->servername) {
     423         206 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->servername));
     424         206 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
     425         206 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->servername));
     426             :                         }
     427         410 :                         ndr->flags = _flags_save_string;
     428             :                 }
     429             :         }
     430         820 :         return NDR_ERR_SUCCESS;
     431             : }
     432             : 
     433         280 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo0(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo0 *r)
     434             : {
     435             :         uint32_t _ptr_printername;
     436         280 :         TALLOC_CTX *_mem_save_printername_0 = NULL;
     437             :         uint32_t _ptr_servername;
     438         280 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
     439         280 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     440         280 :         if (ndr_flags & NDR_SCALARS) {
     441         140 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
     442             :                 {
     443         140 :                         uint32_t _flags_save_string = ndr->flags;
     444         140 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     445         140 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
     446         140 :                         if (_ptr_printername) {
     447         140 :                                 NDR_PULL_ALLOC(ndr, r->printername);
     448         140 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
     449             :                         } else {
     450           0 :                                 r->printername = NULL;
     451             :                         }
     452         140 :                         ndr->flags = _flags_save_string;
     453             :                 }
     454             :                 {
     455         140 :                         uint32_t _flags_save_string = ndr->flags;
     456         140 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     457         140 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
     458         140 :                         if (_ptr_servername) {
     459          72 :                                 NDR_PULL_ALLOC(ndr, r->servername);
     460          72 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
     461             :                         } else {
     462          68 :                                 r->servername = NULL;
     463             :                         }
     464         140 :                         ndr->flags = _flags_save_string;
     465             :                 }
     466         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
     467         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_jobs));
     468         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_bytes));
     469         140 :                 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->time));
     470         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->global_counter));
     471         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
     472         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
     473         140 :                 NDR_CHECK(ndr_pull_spoolss_Build(ndr, NDR_SCALARS, &r->free_build));
     474         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->spooling));
     475         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_spooling));
     476         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_counter));
     477         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_out_of_paper));
     478         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_not_ready));
     479         140 :                 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->job_error));
     480         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_of_processors));
     481         140 :                 NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr, NDR_SCALARS, &r->processor_type));
     482         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high_part_total_bytes));
     483         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->change_id));
     484         140 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_error));
     485         140 :                 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
     486         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumerate_network_printers));
     487         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->c_setprinter));
     488         140 :                 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor_architecture));
     489         140 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->processor_level));
     490         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_ic));
     491         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
     492         140 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
     493         140 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
     494             :         }
     495         280 :         if (ndr_flags & NDR_BUFFERS) {
     496             :                 {
     497         140 :                         uint32_t _flags_save_string = ndr->flags;
     498         140 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     499         140 :                         if (r->printername) {
     500             :                                 uint32_t _relative_save_offset;
     501         140 :                                 _relative_save_offset = ndr->offset;
     502         140 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
     503         140 :                                 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
     504         140 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
     505         140 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
     506         140 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
     507         140 :                                 if (ndr->offset > ndr->relative_highest_offset) {
     508         124 :                                         ndr->relative_highest_offset = ndr->offset;
     509             :                                 }
     510         140 :                                 ndr->offset = _relative_save_offset;
     511             :                         }
     512         140 :                         ndr->flags = _flags_save_string;
     513             :                 }
     514             :                 {
     515         140 :                         uint32_t _flags_save_string = ndr->flags;
     516         140 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     517         140 :                         if (r->servername) {
     518             :                                 uint32_t _relative_save_offset;
     519          72 :                                 _relative_save_offset = ndr->offset;
     520          72 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
     521          72 :                                 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
     522          72 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
     523          72 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
     524          72 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
     525          72 :                                 if (ndr->offset > ndr->relative_highest_offset) {
     526           0 :                                         ndr->relative_highest_offset = ndr->offset;
     527             :                                 }
     528          72 :                                 ndr->offset = _relative_save_offset;
     529             :                         }
     530         140 :                         ndr->flags = _flags_save_string;
     531             :                 }
     532             :         }
     533         280 :         return NDR_ERR_SUCCESS;
     534             : }
     535             : 
     536           0 : static void ndr_print_flags_spoolss_PrinterInfo0(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_PrinterInfo0 *r)
     537             : {
     538           0 :         ndr_print_spoolss_PrinterInfo0(ndr, name, r);
     539           0 : }
     540             : 
     541           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo0(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo0 *r)
     542             : {
     543           0 :         ndr_print_struct(ndr, name, "spoolss_PrinterInfo0");
     544           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     545           0 :         ndr->depth++;
     546             :         {
     547           0 :                 uint32_t _flags_save_string = ndr->flags;
     548           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     549           0 :                 ndr_print_ptr(ndr, "printername", r->printername);
     550           0 :                 ndr->depth++;
     551           0 :                 if (r->printername) {
     552           0 :                         ndr_print_string(ndr, "printername", r->printername);
     553             :                 }
     554           0 :                 ndr->depth--;
     555           0 :                 ndr->flags = _flags_save_string;
     556             :         }
     557             :         {
     558           0 :                 uint32_t _flags_save_string = ndr->flags;
     559           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     560           0 :                 ndr_print_ptr(ndr, "servername", r->servername);
     561           0 :                 ndr->depth++;
     562           0 :                 if (r->servername) {
     563           0 :                         ndr_print_string(ndr, "servername", r->servername);
     564             :                 }
     565           0 :                 ndr->depth--;
     566           0 :                 ndr->flags = _flags_save_string;
     567             :         }
     568           0 :         ndr_print_uint32(ndr, "cjobs", r->cjobs);
     569           0 :         ndr_print_uint32(ndr, "total_jobs", r->total_jobs);
     570           0 :         ndr_print_uint32(ndr, "total_bytes", r->total_bytes);
     571           0 :         ndr_print_spoolss_Time(ndr, "time", &r->time);
     572           0 :         ndr_print_uint32(ndr, "global_counter", r->global_counter);
     573           0 :         ndr_print_uint32(ndr, "total_pages", r->total_pages);
     574           0 :         ndr_print_uint32(ndr, "version", r->version);
     575           0 :         ndr_print_spoolss_Build(ndr, "free_build", r->free_build);
     576           0 :         ndr_print_uint32(ndr, "spooling", r->spooling);
     577           0 :         ndr_print_uint32(ndr, "max_spooling", r->max_spooling);
     578           0 :         ndr_print_uint32(ndr, "session_counter", r->session_counter);
     579           0 :         ndr_print_uint32(ndr, "num_error_out_of_paper", r->num_error_out_of_paper);
     580           0 :         ndr_print_uint32(ndr, "num_error_not_ready", r->num_error_not_ready);
     581           0 :         ndr_print_spoolss_JobStatus(ndr, "job_error", r->job_error);
     582           0 :         ndr_print_uint32(ndr, "number_of_processors", r->number_of_processors);
     583           0 :         ndr_print_spoolss_ProcessorType(ndr, "processor_type", r->processor_type);
     584           0 :         ndr_print_uint32(ndr, "high_part_total_bytes", r->high_part_total_bytes);
     585           0 :         ndr_print_uint32(ndr, "change_id", r->change_id);
     586           0 :         ndr_print_WERROR(ndr, "last_error", r->last_error);
     587           0 :         ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
     588           0 :         ndr_print_uint32(ndr, "enumerate_network_printers", r->enumerate_network_printers);
     589           0 :         ndr_print_uint32(ndr, "c_setprinter", r->c_setprinter);
     590           0 :         ndr_print_spoolss_ProcessorArchitecture(ndr, "processor_architecture", r->processor_architecture);
     591           0 :         ndr_print_uint16(ndr, "processor_level", r->processor_level);
     592           0 :         ndr_print_uint32(ndr, "ref_ic", r->ref_ic);
     593           0 :         ndr_print_uint32(ndr, "reserved2", r->reserved2);
     594           0 :         ndr_print_uint32(ndr, "reserved3", r->reserved3);
     595           0 :         ndr->depth--;
     596             : }
     597             : 
     598           0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo0(const struct spoolss_PrinterInfo0 *r, int flags)
     599             : {
     600           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo0);
     601             : }
     602             : 
     603           0 : static enum ndr_err_code ndr_push_spoolss_DM_Signature(struct ndr_push *ndr, int ndr_flags, enum spoolss_DM_Signature r)
     604             : {
     605           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     606           0 :         return NDR_ERR_SUCCESS;
     607             : }
     608             : 
     609           0 : static enum ndr_err_code ndr_pull_spoolss_DM_Signature(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DM_Signature *r)
     610             : {
     611             :         uint32_t v;
     612           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     613           0 :         *r = v;
     614           0 :         return NDR_ERR_SUCCESS;
     615             : }
     616             : 
     617           0 : _PUBLIC_ void ndr_print_spoolss_DM_Signature(struct ndr_print *ndr, const char *name, enum spoolss_DM_Signature r)
     618             : {
     619           0 :         const char *val = NULL;
     620             : 
     621           0 :         switch (r) {
     622           0 :                 case SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA: val = "SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA"; break;
     623           0 :                 case SPOOLSS_DM_SIGNATURE_JTEXP: val = "SPOOLSS_DM_SIGNATURE_JTEXP"; break;
     624           0 :                 case SPOOLSS_DM_SIGNATURE_PSEXTRA: val = "SPOOLSS_DM_SIGNATURE_PSEXTRA"; break;
     625             :         }
     626           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     627           0 : }
     628             : 
     629           0 : static enum ndr_err_code ndr_push_spoolss_DM_Layout(struct ndr_push *ndr, int ndr_flags, enum spoolss_DM_Layout r)
     630             : {
     631           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     632           0 :         return NDR_ERR_SUCCESS;
     633             : }
     634             : 
     635           0 : static enum ndr_err_code ndr_pull_spoolss_DM_Layout(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DM_Layout *r)
     636             : {
     637             :         uint32_t v;
     638           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     639           0 :         *r = v;
     640           0 :         return NDR_ERR_SUCCESS;
     641             : }
     642             : 
     643           0 : _PUBLIC_ void ndr_print_spoolss_DM_Layout(struct ndr_print *ndr, const char *name, enum spoolss_DM_Layout r)
     644             : {
     645           0 :         const char *val = NULL;
     646             : 
     647           0 :         switch (r) {
     648           0 :                 case SPOOLSS_DM_LAYOUT_NUP_DISABLED: val = "SPOOLSS_DM_LAYOUT_NUP_DISABLED"; break;
     649           0 :                 case SPOOLSS_DM_LAYOUT_NUP_2: val = "SPOOLSS_DM_LAYOUT_NUP_2"; break;
     650           0 :                 case SPOOLSS_DM_LAYOUT_NUP_4: val = "SPOOLSS_DM_LAYOUT_NUP_4"; break;
     651           0 :                 case SPOOLSS_DM_LAYOUT_NUP_6: val = "SPOOLSS_DM_LAYOUT_NUP_6"; break;
     652           0 :                 case SPOOLSS_DM_LAYOUT_NUP_9: val = "SPOOLSS_DM_LAYOUT_NUP_9"; break;
     653           0 :                 case SPOOLSS_DM_LAYOUT_NUP_16: val = "SPOOLSS_DM_LAYOUT_NUP_16"; break;
     654           0 :                 case SPOOLSS_DM_LAYOUT_BOOKLET: val = "SPOOLSS_DM_LAYOUT_BOOKLET"; break;
     655             :         }
     656           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     657           0 : }
     658             : 
     659           0 : static enum ndr_err_code ndr_push_spoolss_DM_NupDirection(struct ndr_push *ndr, int ndr_flags, enum spoolss_DM_NupDirection r)
     660             : {
     661           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     662           0 :         return NDR_ERR_SUCCESS;
     663             : }
     664             : 
     665           0 : static enum ndr_err_code ndr_pull_spoolss_DM_NupDirection(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DM_NupDirection *r)
     666             : {
     667             :         uint32_t v;
     668           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     669           0 :         *r = v;
     670           0 :         return NDR_ERR_SUCCESS;
     671             : }
     672             : 
     673           0 : _PUBLIC_ void ndr_print_spoolss_DM_NupDirection(struct ndr_print *ndr, const char *name, enum spoolss_DM_NupDirection r)
     674             : {
     675           0 :         const char *val = NULL;
     676             : 
     677           0 :         switch (r) {
     678           0 :                 case SPOOLSS_DM_NUP_DIRECTION_L2R_T2B: val = "SPOOLSS_DM_NUP_DIRECTION_L2R_T2B"; break;
     679           0 :                 case SPOOLSS_DM_NUP_DIRECTION_T2B_L2R: val = "SPOOLSS_DM_NUP_DIRECTION_T2B_L2R"; break;
     680           0 :                 case SPOOLSS_DM_NUP_DIRECTION_R2L_T2B: val = "SPOOLSS_DM_NUP_DIRECTION_R2L_T2B"; break;
     681           0 :                 case SPOOLSS_DM_NUP_DIRECTION_T2B_R2L: val = "SPOOLSS_DM_NUP_DIRECTION_T2B_R2L"; break;
     682             :         }
     683           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     684           0 : }
     685             : 
     686           0 : static enum ndr_err_code ndr_push_spoolss_DM_NupBorderFlags(struct ndr_push *ndr, int ndr_flags, enum spoolss_DM_NupBorderFlags r)
     687             : {
     688           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     689           0 :         return NDR_ERR_SUCCESS;
     690             : }
     691             : 
     692           0 : static enum ndr_err_code ndr_pull_spoolss_DM_NupBorderFlags(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DM_NupBorderFlags *r)
     693             : {
     694             :         uint32_t v;
     695           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     696           0 :         *r = v;
     697           0 :         return NDR_ERR_SUCCESS;
     698             : }
     699             : 
     700           0 : _PUBLIC_ void ndr_print_spoolss_DM_NupBorderFlags(struct ndr_print *ndr, const char *name, enum spoolss_DM_NupBorderFlags r)
     701             : {
     702           0 :         const char *val = NULL;
     703             : 
     704           0 :         switch (r) {
     705           0 :                 case SPOOLSS_DM_NUP_BORDER_PRINT: val = "SPOOLSS_DM_NUP_BORDER_PRINT"; break;
     706           0 :                 case SPOOLSS_DM_NUP_BORDER_NONE: val = "SPOOLSS_DM_NUP_BORDER_NONE"; break;
     707             :         }
     708           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     709           0 : }
     710             : 
     711           0 : static enum ndr_err_code ndr_push_spoolss_DM_BookletFlags(struct ndr_push *ndr, int ndr_flags, enum spoolss_DM_BookletFlags r)
     712             : {
     713           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     714           0 :         return NDR_ERR_SUCCESS;
     715             : }
     716             : 
     717           0 : static enum ndr_err_code ndr_pull_spoolss_DM_BookletFlags(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DM_BookletFlags *r)
     718             : {
     719             :         uint32_t v;
     720           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     721           0 :         *r = v;
     722           0 :         return NDR_ERR_SUCCESS;
     723             : }
     724             : 
     725           0 : _PUBLIC_ void ndr_print_spoolss_DM_BookletFlags(struct ndr_print *ndr, const char *name, enum spoolss_DM_BookletFlags r)
     726             : {
     727           0 :         const char *val = NULL;
     728             : 
     729           0 :         switch (r) {
     730           0 :                 case SPOOLSS_DM_BOOKLET_LEFT_FLIP: val = "SPOOLSS_DM_BOOKLET_LEFT_FLIP"; break;
     731           0 :                 case SPOOLSS_DM_BOOKLET_RIGHT_FLIP: val = "SPOOLSS_DM_BOOKLET_RIGHT_FLIP"; break;
     732             :         }
     733           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     734           0 : }
     735             : 
     736           0 : static enum ndr_err_code ndr_push_spoolss_DMUNI_Quality(struct ndr_push *ndr, int ndr_flags, enum spoolss_DMUNI_Quality r)
     737             : {
     738           0 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
     739           0 :         return NDR_ERR_SUCCESS;
     740             : }
     741             : 
     742           0 : static enum ndr_err_code ndr_pull_spoolss_DMUNI_Quality(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DMUNI_Quality *r)
     743             : {
     744             :         uint32_t v;
     745           0 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
     746           0 :         *r = v;
     747           0 :         return NDR_ERR_SUCCESS;
     748             : }
     749             : 
     750           0 : _PUBLIC_ void ndr_print_spoolss_DMUNI_Quality(struct ndr_print *ndr, const char *name, enum spoolss_DMUNI_Quality r)
     751             : {
     752           0 :         const char *val = NULL;
     753             : 
     754           0 :         switch (r) {
     755           0 :                 case SPOOLSS_DM_UNI_QUALITY_BEST: val = "SPOOLSS_DM_UNI_QUALITY_BEST"; break;
     756           0 :                 case SPOOLSS_DM_UNI_QUALITY_MEDIUM: val = "SPOOLSS_DM_UNI_QUALITY_MEDIUM"; break;
     757           0 :                 case SPOOLSS_DM_UNI_QUALITY_DRAFT: val = "SPOOLSS_DM_UNI_QUALITY_DRAFT"; break;
     758             :         }
     759           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     760           0 : }
     761             : 
     762           0 : static enum ndr_err_code ndr_push_spoolss_DMUNI_Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     763             : {
     764           0 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     765           0 :         return NDR_ERR_SUCCESS;
     766             : }
     767             : 
     768           0 : static enum ndr_err_code ndr_pull_spoolss_DMUNI_Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     769             : {
     770             :         uint32_t v;
     771           0 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     772           0 :         *r = v;
     773           0 :         return NDR_ERR_SUCCESS;
     774             : }
     775             : 
     776           0 : _PUBLIC_ void ndr_print_spoolss_DMUNI_Flags(struct ndr_print *ndr, const char *name, uint32_t r)
     777             : {
     778           0 :         ndr_print_uint32(ndr, name, r);
     779           0 :         ndr->depth++;
     780           0 :         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);
     781           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL", SPOOLSS_DM_UNI_FLAGS_AVOID_EMFSPOOL, r);
     782           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING", SPOOLSS_DM_UNI_FLAGS_CUSTOM_HALFTONING, r);
     783           0 :         ndr->depth--;
     784           0 : }
     785             : 
     786           0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_UNIDRVEXTRA(struct ndr_push *ndr, int ndr_flags, const struct spoolss_UNIDRVEXTRA *r)
     787             : {
     788             :         uint32_t cntr_wReserved_0;
     789             :         uint32_t cntr_aOptions_0;
     790           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     791           0 :         if (ndr_flags & NDR_SCALARS) {
     792           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     793           0 :                 NDR_CHECK(ndr_push_spoolss_DM_Signature(ndr, NDR_SCALARS, SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA));
     794           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, 0x0022));
     795           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wCoreJTExpSize));
     796           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, ndr_size_spoolss_UNIDRVEXTRA(r, ndr->flags) + r->wCoreJTExpSize));
     797           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wOEMExtra));
     798           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwChecksum32));
     799           0 :                 NDR_CHECK(ndr_push_spoolss_DMUNI_Flags(ndr, NDR_SCALARS, r->dwFlags));
     800           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bReversePrint));
     801           0 :                 NDR_CHECK(ndr_push_spoolss_DM_Layout(ndr, NDR_SCALARS, r->iLayout));
     802           0 :                 NDR_CHECK(ndr_push_spoolss_DMUNI_Quality(ndr, NDR_SCALARS, r->iQuality));
     803           0 :                 for (cntr_wReserved_0 = 0; cntr_wReserved_0 < (6); cntr_wReserved_0++) {
     804           0 :                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->wReserved[cntr_wReserved_0]));
     805             :                 }
     806           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwOptions));
     807           0 :                 for (cntr_aOptions_0 = 0; cntr_aOptions_0 < (128); cntr_aOptions_0++) {
     808           0 :                         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->aOptions[cntr_aOptions_0]));
     809             :                 }
     810           0 :                 NDR_CHECK(ndr_push_spoolss_DM_NupDirection(ndr, NDR_SCALARS, r->dwNupDirection));
     811           0 :                 NDR_CHECK(ndr_push_spoolss_DM_NupBorderFlags(ndr, NDR_SCALARS, r->dwNupBorderFlags));
     812           0 :                 NDR_CHECK(ndr_push_spoolss_DM_BookletFlags(ndr, NDR_SCALARS, r->dwBookletFlags));
     813           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     814             :         }
     815           0 :         if (ndr_flags & NDR_BUFFERS) {
     816             :         }
     817           0 :         return NDR_ERR_SUCCESS;
     818             : }
     819             : 
     820           0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_UNIDRVEXTRA(struct ndr_pull *ndr, int ndr_flags, struct spoolss_UNIDRVEXTRA *r)
     821             : {
     822           0 :         uint32_t size_wReserved_0 = 0;
     823             :         uint32_t cntr_wReserved_0;
     824           0 :         uint32_t size_aOptions_0 = 0;
     825             :         uint32_t cntr_aOptions_0;
     826           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     827           0 :         if (ndr_flags & NDR_SCALARS) {
     828           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     829           0 :                 NDR_CHECK(ndr_pull_spoolss_DM_Signature(ndr, NDR_SCALARS, &r->dwSignature));
     830           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wVer));
     831           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wCoreJTExpSize));
     832           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wCoreFullSize));
     833           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wOEMExtra));
     834           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwChecksum32));
     835           0 :                 NDR_CHECK(ndr_pull_spoolss_DMUNI_Flags(ndr, NDR_SCALARS, &r->dwFlags));
     836           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bReversePrint));
     837           0 :                 NDR_CHECK(ndr_pull_spoolss_DM_Layout(ndr, NDR_SCALARS, &r->iLayout));
     838           0 :                 NDR_CHECK(ndr_pull_spoolss_DMUNI_Quality(ndr, NDR_SCALARS, &r->iQuality));
     839           0 :                 size_wReserved_0 = 6;
     840           0 :                 for (cntr_wReserved_0 = 0; cntr_wReserved_0 < (size_wReserved_0); cntr_wReserved_0++) {
     841           0 :                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->wReserved[cntr_wReserved_0]));
     842             :                 }
     843           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwOptions));
     844           0 :                 size_aOptions_0 = 128;
     845           0 :                 for (cntr_aOptions_0 = 0; cntr_aOptions_0 < (size_aOptions_0); cntr_aOptions_0++) {
     846           0 :                         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->aOptions[cntr_aOptions_0]));
     847             :                 }
     848           0 :                 NDR_CHECK(ndr_pull_spoolss_DM_NupDirection(ndr, NDR_SCALARS, &r->dwNupDirection));
     849           0 :                 NDR_CHECK(ndr_pull_spoolss_DM_NupBorderFlags(ndr, NDR_SCALARS, &r->dwNupBorderFlags));
     850           0 :                 NDR_CHECK(ndr_pull_spoolss_DM_BookletFlags(ndr, NDR_SCALARS, &r->dwBookletFlags));
     851           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     852             :         }
     853           0 :         if (ndr_flags & NDR_BUFFERS) {
     854             :         }
     855           0 :         return NDR_ERR_SUCCESS;
     856             : }
     857             : 
     858           0 : static void ndr_print_flags_spoolss_UNIDRVEXTRA(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_UNIDRVEXTRA *r)
     859             : {
     860           0 :         ndr_print_spoolss_UNIDRVEXTRA(ndr, name, r);
     861           0 : }
     862             : 
     863           0 : _PUBLIC_ void ndr_print_spoolss_UNIDRVEXTRA(struct ndr_print *ndr, const char *name, const struct spoolss_UNIDRVEXTRA *r)
     864             : {
     865             :         uint32_t cntr_wReserved_0;
     866             :         uint32_t cntr_aOptions_0;
     867           0 :         ndr_print_struct(ndr, name, "spoolss_UNIDRVEXTRA");
     868           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     869           0 :         ndr->depth++;
     870           0 :         ndr_print_spoolss_DM_Signature(ndr, "dwSignature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?SPOOLSS_DM_SIGNATURE_UNIDRVEXTRA:r->dwSignature);
     871           0 :         ndr_print_uint16(ndr, "wVer", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x0022:r->wVer);
     872           0 :         ndr_print_uint16(ndr, "wCoreJTExpSize", r->wCoreJTExpSize);
     873           0 :         ndr_print_uint16(ndr, "wCoreFullSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_spoolss_UNIDRVEXTRA(r, ndr->flags) + r->wCoreJTExpSize:r->wCoreFullSize);
     874           0 :         ndr_print_uint16(ndr, "wOEMExtra", r->wOEMExtra);
     875           0 :         ndr_print_uint32(ndr, "dwChecksum32", r->dwChecksum32);
     876           0 :         ndr_print_spoolss_DMUNI_Flags(ndr, "dwFlags", r->dwFlags);
     877           0 :         ndr_print_uint32(ndr, "bReversePrint", r->bReversePrint);
     878           0 :         ndr_print_spoolss_DM_Layout(ndr, "iLayout", r->iLayout);
     879           0 :         ndr_print_spoolss_DMUNI_Quality(ndr, "iQuality", r->iQuality);
     880           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "wReserved", (int)6);
     881           0 :         ndr->depth++;
     882           0 :         for (cntr_wReserved_0 = 0; cntr_wReserved_0 < (6); cntr_wReserved_0++) {
     883           0 :                 ndr_print_uint16(ndr, "wReserved", r->wReserved[cntr_wReserved_0]);
     884             :         }
     885           0 :         ndr->depth--;
     886           0 :         ndr_print_uint32(ndr, "dwOptions", r->dwOptions);
     887           0 :         ndr->print(ndr, "%s: ARRAY(%d)", "aOptions", (int)128);
     888           0 :         ndr->depth++;
     889           0 :         for (cntr_aOptions_0 = 0; cntr_aOptions_0 < (128); cntr_aOptions_0++) {
     890           0 :                 ndr_print_uint32(ndr, "aOptions", r->aOptions[cntr_aOptions_0]);
     891             :         }
     892           0 :         ndr->depth--;
     893           0 :         ndr_print_spoolss_DM_NupDirection(ndr, "dwNupDirection", r->dwNupDirection);
     894           0 :         ndr_print_spoolss_DM_NupBorderFlags(ndr, "dwNupBorderFlags", r->dwNupBorderFlags);
     895           0 :         ndr_print_spoolss_DM_BookletFlags(ndr, "dwBookletFlags", r->dwBookletFlags);
     896           0 :         ndr->depth--;
     897             : }
     898             : 
     899           0 : _PUBLIC_ size_t ndr_size_spoolss_UNIDRVEXTRA(const struct spoolss_UNIDRVEXTRA *r, int flags)
     900             : {
     901           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_UNIDRVEXTRA);
     902             : }
     903             : 
     904       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeFields(struct ndr_push *ndr, int ndr_flags, uint32_t r)
     905             : {
     906       16001 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
     907       16001 :         return NDR_ERR_SUCCESS;
     908             : }
     909             : 
     910        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeFields(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
     911             : {
     912             :         uint32_t v;
     913        4676 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
     914        4676 :         *r = v;
     915        4672 :         return NDR_ERR_SUCCESS;
     916             : }
     917             : 
     918           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeFields(struct ndr_print *ndr, const char *name, uint32_t r)
     919             : {
     920           4 :         ndr_print_uint32(ndr, name, r);
     921           4 :         ndr->depth++;
     922           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ORIENTATION", DEVMODE_ORIENTATION, r);
     923           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERSIZE", DEVMODE_PAPERSIZE, r);
     924           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERLENGTH", DEVMODE_PAPERLENGTH, r);
     925           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PAPERWIDTH", DEVMODE_PAPERWIDTH, r);
     926           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_SCALE", DEVMODE_SCALE, r);
     927           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_POSITION", DEVMODE_POSITION, r);
     928           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_NUP", DEVMODE_NUP, r);
     929           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COPIES", DEVMODE_COPIES, r);
     930           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DEFAULTSOURCE", DEVMODE_DEFAULTSOURCE, r);
     931           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PRINTQUALITY", DEVMODE_PRINTQUALITY, r);
     932           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COLOR", DEVMODE_COLOR, r);
     933           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DUPLEX", DEVMODE_DUPLEX, r);
     934           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_YRESOLUTION", DEVMODE_YRESOLUTION, r);
     935           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_TTOPTION", DEVMODE_TTOPTION, r);
     936           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_COLLATE", DEVMODE_COLLATE, r);
     937           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_FORMNAME", DEVMODE_FORMNAME, r);
     938           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_LOGPIXELS", DEVMODE_LOGPIXELS, r);
     939           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_BITSPERPEL", DEVMODE_BITSPERPEL, r);
     940           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PELSWIDTH", DEVMODE_PELSWIDTH, r);
     941           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PELSHEIGHT", DEVMODE_PELSHEIGHT, r);
     942           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DISPLAYFLAGS", DEVMODE_DISPLAYFLAGS, r);
     943           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DISPLAYFREQUENCY", DEVMODE_DISPLAYFREQUENCY, r);
     944           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ICMMETHOD", DEVMODE_ICMMETHOD, r);
     945           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_ICMINTENT", DEVMODE_ICMINTENT, r);
     946           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_MEDIATYPE", DEVMODE_MEDIATYPE, r);
     947           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_DITHERTYPE", DEVMODE_DITHERTYPE, r);
     948           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PANNINGWIDTH", DEVMODE_PANNINGWIDTH, r);
     949           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DEVMODE_PANNINGHEIGHT", DEVMODE_PANNINGHEIGHT, r);
     950           4 :         ndr->depth--;
     951           4 : }
     952             : 
     953       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeSpecVersion(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeSpecVersion r)
     954             : {
     955       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
     956       16001 :         return NDR_ERR_SUCCESS;
     957             : }
     958             : 
     959        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeSpecVersion(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeSpecVersion *r)
     960             : {
     961             :         uint16_t v;
     962        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
     963        4676 :         *r = v;
     964        4672 :         return NDR_ERR_SUCCESS;
     965             : }
     966             : 
     967           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeSpecVersion(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeSpecVersion r)
     968             : {
     969           4 :         const char *val = NULL;
     970             : 
     971           4 :         switch (r) {
     972           0 :                 case DMSPEC_NT3: val = "DMSPEC_NT3"; break;
     973           0 :                 case DMSPEC_WIN95_98_ME: val = "DMSPEC_WIN95_98_ME"; break;
     974           4 :                 case DMSPEC_NT4_AND_ABOVE: val = "DMSPEC_NT4_AND_ABOVE"; break;
     975             :         }
     976           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
     977           4 : }
     978             : 
     979       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeOrientation(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeOrientation r)
     980             : {
     981       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
     982       16001 :         return NDR_ERR_SUCCESS;
     983             : }
     984             : 
     985        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeOrientation(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeOrientation *r)
     986             : {
     987             :         uint16_t v;
     988        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
     989        4676 :         *r = v;
     990        4672 :         return NDR_ERR_SUCCESS;
     991             : }
     992             : 
     993           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeOrientation(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeOrientation r)
     994             : {
     995           4 :         const char *val = NULL;
     996             : 
     997           4 :         switch (r) {
     998           4 :                 case DMORIENT_PORTRAIT: val = "DMORIENT_PORTRAIT"; break;
     999           0 :                 case DMORIENT_LANDSCAPE: val = "DMORIENT_LANDSCAPE"; break;
    1000             :         }
    1001           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1002           4 : }
    1003             : 
    1004       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModePaperSize(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModePaperSize r)
    1005             : {
    1006       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    1007       16001 :         return NDR_ERR_SUCCESS;
    1008             : }
    1009             : 
    1010        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModePaperSize(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModePaperSize *r)
    1011             : {
    1012             :         uint16_t v;
    1013        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    1014        4676 :         *r = v;
    1015        4672 :         return NDR_ERR_SUCCESS;
    1016             : }
    1017             : 
    1018           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModePaperSize(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModePaperSize r)
    1019             : {
    1020           4 :         const char *val = NULL;
    1021             : 
    1022           4 :         switch (r) {
    1023           4 :                 case DMPAPER_LETTER: val = "DMPAPER_LETTER"; break;
    1024           0 :                 case DMPAPER_LETTERSMALL: val = "DMPAPER_LETTERSMALL"; break;
    1025           0 :                 case DMPAPER_TABLOID: val = "DMPAPER_TABLOID"; break;
    1026           0 :                 case DMPAPER_LEDGER: val = "DMPAPER_LEDGER"; break;
    1027           0 :                 case DMPAPER_LEGAL: val = "DMPAPER_LEGAL"; break;
    1028           0 :                 case DMPAPER_STATEMENT: val = "DMPAPER_STATEMENT"; break;
    1029           0 :                 case DMPAPER_EXECUTIVE: val = "DMPAPER_EXECUTIVE"; break;
    1030           0 :                 case DMPAPER_A3: val = "DMPAPER_A3"; break;
    1031           0 :                 case DMPAPER_A4: val = "DMPAPER_A4"; break;
    1032           0 :                 case DMPAPER_A4SMALL: val = "DMPAPER_A4SMALL"; break;
    1033           0 :                 case DMPAPER_A5: val = "DMPAPER_A5"; break;
    1034           0 :                 case DMPAPER_B4: val = "DMPAPER_B4"; break;
    1035           0 :                 case DMPAPER_B5: val = "DMPAPER_B5"; break;
    1036           0 :                 case DMPAPER_FOLIO: val = "DMPAPER_FOLIO"; break;
    1037           0 :                 case DMPAPER_QUARTO: val = "DMPAPER_QUARTO"; break;
    1038           0 :                 case DMPAPER_10X14: val = "DMPAPER_10X14"; break;
    1039           0 :                 case DMPAPER_11X17: val = "DMPAPER_11X17"; break;
    1040           0 :                 case DMPAPER_NOTE: val = "DMPAPER_NOTE"; break;
    1041           0 :                 case DMPAPER_ENV_9: val = "DMPAPER_ENV_9"; break;
    1042           0 :                 case DMPAPER_ENV_10: val = "DMPAPER_ENV_10"; break;
    1043           0 :                 case DMPAPER_ENV_11: val = "DMPAPER_ENV_11"; break;
    1044           0 :                 case DMPAPER_ENV_12: val = "DMPAPER_ENV_12"; break;
    1045           0 :                 case DMPAPER_ENV_14: val = "DMPAPER_ENV_14"; break;
    1046           0 :                 case DMPAPER_CSHEET: val = "DMPAPER_CSHEET"; break;
    1047           0 :                 case DMPAPER_DSHEET: val = "DMPAPER_DSHEET"; break;
    1048           0 :                 case DMPAPER_ESHEET: val = "DMPAPER_ESHEET"; break;
    1049           0 :                 case DMPAPER_ENV_DL: val = "DMPAPER_ENV_DL"; break;
    1050           0 :                 case DMPAPER_ENV_C5: val = "DMPAPER_ENV_C5"; break;
    1051           0 :                 case DMPAPER_ENV_C3: val = "DMPAPER_ENV_C3"; break;
    1052           0 :                 case DMPAPER_ENV_C4: val = "DMPAPER_ENV_C4"; break;
    1053           0 :                 case DMPAPER_ENV_C6: val = "DMPAPER_ENV_C6"; break;
    1054           0 :                 case DMPAPER_ENV_C65: val = "DMPAPER_ENV_C65"; break;
    1055           0 :                 case DMPAPER_ENV_B4: val = "DMPAPER_ENV_B4"; break;
    1056           0 :                 case DMPAPER_ENV_B5: val = "DMPAPER_ENV_B5"; break;
    1057           0 :                 case DMPAPER_ENV_B6: val = "DMPAPER_ENV_B6"; break;
    1058           0 :                 case DMPAPER_ENV_ITALY: val = "DMPAPER_ENV_ITALY"; break;
    1059           0 :                 case DMPAPER_ENV_MONARCH: val = "DMPAPER_ENV_MONARCH"; break;
    1060           0 :                 case DMPAPER_ENV_PERSONAL: val = "DMPAPER_ENV_PERSONAL"; break;
    1061           0 :                 case DMPAPER_FANFOLD_US: val = "DMPAPER_FANFOLD_US"; break;
    1062           0 :                 case DMPAPER_FANFOLD_STD_GERMAN: val = "DMPAPER_FANFOLD_STD_GERMAN"; break;
    1063           0 :                 case DMPAPER_FANFOLD_LGL_GERMAN: val = "DMPAPER_FANFOLD_LGL_GERMAN"; break;
    1064           0 :                 case DMPAPER_DBL_JAPANESE_POSTCARD: val = "DMPAPER_DBL_JAPANESE_POSTCARD"; break;
    1065           0 :                 case DMPAPER_A6: val = "DMPAPER_A6"; break;
    1066           0 :                 case DMPAPER_JENV_KAKU2: val = "DMPAPER_JENV_KAKU2"; break;
    1067           0 :                 case DMPAPER_JENV_KAKU3: val = "DMPAPER_JENV_KAKU3"; break;
    1068           0 :                 case DMPAPER_JENV_CHOU3: val = "DMPAPER_JENV_CHOU3"; break;
    1069           0 :                 case DMPAPER_JENV_CHOU4: val = "DMPAPER_JENV_CHOU4"; break;
    1070           0 :                 case DMPAPER_LETTER_ROTATED: val = "DMPAPER_LETTER_ROTATED"; break;
    1071           0 :                 case DMPAPER_A3_ROTATED: val = "DMPAPER_A3_ROTATED"; break;
    1072           0 :                 case DMPAPER_A4_ROTATED: val = "DMPAPER_A4_ROTATED"; break;
    1073           0 :                 case DMPAPER_A5_ROTATED: val = "DMPAPER_A5_ROTATED"; break;
    1074           0 :                 case DMPAPER_B4_JIS_ROTATED: val = "DMPAPER_B4_JIS_ROTATED"; break;
    1075           0 :                 case DMPAPER_B5_JIS_ROTATED: val = "DMPAPER_B5_JIS_ROTATED"; break;
    1076           0 :                 case DMPAPER_JAPANESE_POSTCARD_ROTATED: val = "DMPAPER_JAPANESE_POSTCARD_ROTATED"; break;
    1077           0 :                 case DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED: val = "DMPAPER_DBL_JAPANESE_POSTCARD_ROTATED"; break;
    1078           0 :                 case DMPAPER_A6_ROTATED: val = "DMPAPER_A6_ROTATED"; break;
    1079           0 :                 case DMPAPER_JENV_KAKU2_ROTATED: val = "DMPAPER_JENV_KAKU2_ROTATED"; break;
    1080           0 :                 case DMPAPER_JENV_KAKU3_ROTATED: val = "DMPAPER_JENV_KAKU3_ROTATED"; break;
    1081           0 :                 case DMPAPER_JENV_CHOU3_ROTATED: val = "DMPAPER_JENV_CHOU3_ROTATED"; break;
    1082           0 :                 case DMPAPER_JENV_CHOU4_ROTATED: val = "DMPAPER_JENV_CHOU4_ROTATED"; break;
    1083           0 :                 case DMPAPER_B6_JIS: val = "DMPAPER_B6_JIS"; break;
    1084           0 :                 case DMPAPER_B6_JIS_ROTATED: val = "DMPAPER_B6_JIS_ROTATED"; break;
    1085           0 :                 case DMPAPER_12X11: val = "DMPAPER_12X11"; break;
    1086           0 :                 case DMPAPER_JENV_YOU4: val = "DMPAPER_JENV_YOU4"; break;
    1087           0 :                 case DMPAPER_JENV_YOU4_ROTATED: val = "DMPAPER_JENV_YOU4_ROTATED"; break;
    1088           0 :                 case DMPAPER_P16K: val = "DMPAPER_P16K"; break;
    1089           0 :                 case DMPAPER_P32K: val = "DMPAPER_P32K"; break;
    1090           0 :                 case DMPAPER_P32KBIG: val = "DMPAPER_P32KBIG"; break;
    1091           0 :                 case DMPAPER_PENV_1: val = "DMPAPER_PENV_1"; break;
    1092           0 :                 case DMPAPER_PENV_2: val = "DMPAPER_PENV_2"; break;
    1093           0 :                 case DMPAPER_PENV_3: val = "DMPAPER_PENV_3"; break;
    1094           0 :                 case DMPAPER_PENV_4: val = "DMPAPER_PENV_4"; break;
    1095           0 :                 case DMPAPER_PENV_5: val = "DMPAPER_PENV_5"; break;
    1096           0 :                 case DMPAPER_PENV_6: val = "DMPAPER_PENV_6"; break;
    1097           0 :                 case DMPAPER_PENV_7: val = "DMPAPER_PENV_7"; break;
    1098           0 :                 case DMPAPER_PENV_8: val = "DMPAPER_PENV_8"; break;
    1099           0 :                 case DMPAPER_PENV_9: val = "DMPAPER_PENV_9"; break;
    1100           0 :                 case DMPAPER_PENV_10: val = "DMPAPER_PENV_10"; break;
    1101           0 :                 case DMPAPER_P16K_ROTATED: val = "DMPAPER_P16K_ROTATED"; break;
    1102           0 :                 case DMPAPER_P32K_ROTATED: val = "DMPAPER_P32K_ROTATED"; break;
    1103           0 :                 case DMPAPER_P32KBIG_ROTATED: val = "DMPAPER_P32KBIG_ROTATED"; break;
    1104           0 :                 case DMPAPER_PENV_1_ROTATED: val = "DMPAPER_PENV_1_ROTATED"; break;
    1105           0 :                 case DMPAPER_PENV_2_ROTATED: val = "DMPAPER_PENV_2_ROTATED"; break;
    1106           0 :                 case DMPAPER_PENV_3_ROTATED: val = "DMPAPER_PENV_3_ROTATED"; break;
    1107           0 :                 case DMPAPER_PENV_4_ROTATED: val = "DMPAPER_PENV_4_ROTATED"; break;
    1108           0 :                 case DMPAPER_PENV_5_ROTATED: val = "DMPAPER_PENV_5_ROTATED"; break;
    1109           0 :                 case DMPAPER_PENV_6_ROTATED: val = "DMPAPER_PENV_6_ROTATED"; break;
    1110           0 :                 case DMPAPER_PENV_7_ROTATED: val = "DMPAPER_PENV_7_ROTATED"; break;
    1111           0 :                 case DMPAPER_PENV_8_ROTATED: val = "DMPAPER_PENV_8_ROTATED"; break;
    1112           0 :                 case DMPAPER_PENV_9_ROTATED: val = "DMPAPER_PENV_9_ROTATED"; break;
    1113           0 :                 case DMPAPER_PENV_10_ROTATED: val = "DMPAPER_PENV_10_ROTATED"; break;
    1114             :         }
    1115           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1116           4 : }
    1117             : 
    1118       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeDefaultSource(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeDefaultSource r)
    1119             : {
    1120       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    1121       16001 :         return NDR_ERR_SUCCESS;
    1122             : }
    1123             : 
    1124        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeDefaultSource(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeDefaultSource *r)
    1125             : {
    1126             :         uint16_t v;
    1127        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    1128        4676 :         *r = v;
    1129        4672 :         return NDR_ERR_SUCCESS;
    1130             : }
    1131             : 
    1132           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeDefaultSource(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDefaultSource r)
    1133             : {
    1134           4 :         const char *val = NULL;
    1135             : 
    1136           4 :         switch (r) {
    1137           0 :                 case DMBIN_UPPER: val = "DMBIN_UPPER"; break;
    1138           0 :                 case DMBIN_LOWER: val = "DMBIN_LOWER"; break;
    1139           0 :                 case DMBIN_MIDDLE: val = "DMBIN_MIDDLE"; break;
    1140           0 :                 case DMBIN_MANUAL: val = "DMBIN_MANUAL"; break;
    1141           0 :                 case DMBIN_ENVELOPE: val = "DMBIN_ENVELOPE"; break;
    1142           0 :                 case DMBIN_ENVMANUAL: val = "DMBIN_ENVMANUAL"; break;
    1143           0 :                 case DMBIN_AUTO: val = "DMBIN_AUTO"; break;
    1144           0 :                 case DMBIN_TRACTOR: val = "DMBIN_TRACTOR"; break;
    1145           0 :                 case DMBIN_SMALLFMT: val = "DMBIN_SMALLFMT"; break;
    1146           0 :                 case DMBIN_LARGEFMT: val = "DMBIN_LARGEFMT"; break;
    1147           0 :                 case DMBIN_LARGECAPACITY: val = "DMBIN_LARGECAPACITY"; break;
    1148           0 :                 case DMBIN_CASSETTE: val = "DMBIN_CASSETTE"; break;
    1149           4 :                 case DMBIN_FORMSOURCE: val = "DMBIN_FORMSOURCE"; break;
    1150             :         }
    1151           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1152           4 : }
    1153             : 
    1154       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModePrintQuality(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModePrintQuality r)
    1155             : {
    1156       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    1157       16001 :         return NDR_ERR_SUCCESS;
    1158             : }
    1159             : 
    1160        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModePrintQuality(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModePrintQuality *r)
    1161             : {
    1162             :         uint16_t v;
    1163        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    1164        4676 :         *r = v;
    1165        4672 :         return NDR_ERR_SUCCESS;
    1166             : }
    1167             : 
    1168           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModePrintQuality(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModePrintQuality r)
    1169             : {
    1170           4 :         const char *val = NULL;
    1171             : 
    1172           4 :         switch (r) {
    1173           0 :                 case DMRES_HIGH: val = "DMRES_HIGH"; break;
    1174           0 :                 case DMRES_MEDIUM: val = "DMRES_MEDIUM"; break;
    1175           0 :                 case DMRES_LOW: val = "DMRES_LOW"; break;
    1176           0 :                 case DMRES_DRAFT: val = "DMRES_DRAFT"; break;
    1177             :         }
    1178           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1179           4 : }
    1180             : 
    1181       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeColor(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeColor r)
    1182             : {
    1183       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    1184       16001 :         return NDR_ERR_SUCCESS;
    1185             : }
    1186             : 
    1187        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeColor(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeColor *r)
    1188             : {
    1189             :         uint16_t v;
    1190        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    1191        4676 :         *r = v;
    1192        4672 :         return NDR_ERR_SUCCESS;
    1193             : }
    1194             : 
    1195           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeColor(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeColor r)
    1196             : {
    1197           4 :         const char *val = NULL;
    1198             : 
    1199           4 :         switch (r) {
    1200           4 :                 case DMRES_MONOCHROME: val = "DMRES_MONOCHROME"; break;
    1201           0 :                 case DMRES_COLOR: val = "DMRES_COLOR"; break;
    1202             :         }
    1203           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1204           4 : }
    1205             : 
    1206       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeDuplex(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeDuplex r)
    1207             : {
    1208       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    1209       16001 :         return NDR_ERR_SUCCESS;
    1210             : }
    1211             : 
    1212        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeDuplex(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeDuplex *r)
    1213             : {
    1214             :         uint16_t v;
    1215        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    1216        4676 :         *r = v;
    1217        4672 :         return NDR_ERR_SUCCESS;
    1218             : }
    1219             : 
    1220           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeDuplex(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDuplex r)
    1221             : {
    1222           4 :         const char *val = NULL;
    1223             : 
    1224           4 :         switch (r) {
    1225           4 :                 case DMDUP_SIMPLEX: val = "DMDUP_SIMPLEX"; break;
    1226           0 :                 case DMDUP_VERTICAL: val = "DMDUP_VERTICAL"; break;
    1227           0 :                 case DMDUP_HORIZONTAL: val = "DMDUP_HORIZONTAL"; break;
    1228             :         }
    1229           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1230           4 : }
    1231             : 
    1232       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeTTOption(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeTTOption r)
    1233             : {
    1234       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    1235       16001 :         return NDR_ERR_SUCCESS;
    1236             : }
    1237             : 
    1238        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeTTOption(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeTTOption *r)
    1239             : {
    1240             :         uint16_t v;
    1241        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    1242        4676 :         *r = v;
    1243        4672 :         return NDR_ERR_SUCCESS;
    1244             : }
    1245             : 
    1246           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeTTOption(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeTTOption r)
    1247             : {
    1248           4 :         const char *val = NULL;
    1249             : 
    1250           4 :         switch (r) {
    1251           0 :                 case DMTT_BITMAP: val = "DMTT_BITMAP"; break;
    1252           0 :                 case DMTT_DOWNLOAD: val = "DMTT_DOWNLOAD"; break;
    1253           4 :                 case DMTT_SUBDEV: val = "DMTT_SUBDEV"; break;
    1254           0 :                 case DMTT_DOWNLOAD_OUTLINE: val = "DMTT_DOWNLOAD_OUTLINE"; break;
    1255             :         }
    1256           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1257           4 : }
    1258             : 
    1259       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeCollate(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeCollate r)
    1260             : {
    1261       16001 :         NDR_CHECK(ndr_push_enum_uint16(ndr, NDR_SCALARS, r));
    1262       16001 :         return NDR_ERR_SUCCESS;
    1263             : }
    1264             : 
    1265        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeCollate(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeCollate *r)
    1266             : {
    1267             :         uint16_t v;
    1268        4676 :         NDR_CHECK(ndr_pull_enum_uint16(ndr, NDR_SCALARS, &v));
    1269        4676 :         *r = v;
    1270        4672 :         return NDR_ERR_SUCCESS;
    1271             : }
    1272             : 
    1273           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeCollate(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeCollate r)
    1274             : {
    1275           4 :         const char *val = NULL;
    1276             : 
    1277           4 :         switch (r) {
    1278           0 :                 case DMCOLLATE_FALSE: val = "DMCOLLATE_FALSE"; break;
    1279           4 :                 case DMCOLLATE_TRUE: val = "DMCOLLATE_TRUE"; break;
    1280             :         }
    1281           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1282           4 : }
    1283             : 
    1284       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeNUp(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeNUp r)
    1285             : {
    1286       16001 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1287       16001 :         return NDR_ERR_SUCCESS;
    1288             : }
    1289             : 
    1290        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeNUp(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeNUp *r)
    1291             : {
    1292             :         uint32_t v;
    1293        4676 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1294        4676 :         *r = v;
    1295        4672 :         return NDR_ERR_SUCCESS;
    1296             : }
    1297             : 
    1298           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeNUp(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeNUp r)
    1299             : {
    1300           4 :         const char *val = NULL;
    1301             : 
    1302           4 :         switch (r) {
    1303           4 :                 case DMNUP_SYSTEM: val = "DMNUP_SYSTEM"; break;
    1304           0 :                 case DMNUP_ONEUP: val = "DMNUP_ONEUP"; break;
    1305             :         }
    1306           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1307           4 : }
    1308             : 
    1309       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeICMMethod(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeICMMethod r)
    1310             : {
    1311       16001 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1312       16001 :         return NDR_ERR_SUCCESS;
    1313             : }
    1314             : 
    1315        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeICMMethod(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeICMMethod *r)
    1316             : {
    1317             :         uint32_t v;
    1318        4676 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1319        4676 :         *r = v;
    1320        4672 :         return NDR_ERR_SUCCESS;
    1321             : }
    1322             : 
    1323           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeICMMethod(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeICMMethod r)
    1324             : {
    1325           4 :         const char *val = NULL;
    1326             : 
    1327           4 :         switch (r) {
    1328           4 :                 case DMICMMETHOD_NONE: val = "DMICMMETHOD_NONE"; break;
    1329           0 :                 case DMICMMETHOD_SYSTEM: val = "DMICMMETHOD_SYSTEM"; break;
    1330           0 :                 case DMICMMETHOD_DRIVER: val = "DMICMMETHOD_DRIVER"; break;
    1331           0 :                 case DMICMMETHOD_DEVICE: val = "DMICMMETHOD_DEVICE"; break;
    1332             :         }
    1333           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1334           4 : }
    1335             : 
    1336       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeICMIntent(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeICMIntent r)
    1337             : {
    1338       16001 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1339       16001 :         return NDR_ERR_SUCCESS;
    1340             : }
    1341             : 
    1342        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeICMIntent(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeICMIntent *r)
    1343             : {
    1344             :         uint32_t v;
    1345        4676 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1346        4676 :         *r = v;
    1347        4672 :         return NDR_ERR_SUCCESS;
    1348             : }
    1349             : 
    1350           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeICMIntent(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeICMIntent r)
    1351             : {
    1352           4 :         const char *val = NULL;
    1353             : 
    1354           4 :         switch (r) {
    1355           0 :                 case DMICM_SATURATE: val = "DMICM_SATURATE"; break;
    1356           4 :                 case DMICM_CONTRAST: val = "DMICM_CONTRAST"; break;
    1357           0 :                 case DMICM_COLORIMETRIC: val = "DMICM_COLORIMETRIC"; break;
    1358           0 :                 case DMICM_ABS_COLORIMETRIC: val = "DMICM_ABS_COLORIMETRIC"; break;
    1359             :         }
    1360           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1361           4 : }
    1362             : 
    1363       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeMediaType(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeMediaType r)
    1364             : {
    1365       16001 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1366       16001 :         return NDR_ERR_SUCCESS;
    1367             : }
    1368             : 
    1369        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeMediaType(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeMediaType *r)
    1370             : {
    1371             :         uint32_t v;
    1372        4676 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1373        4676 :         *r = v;
    1374        4672 :         return NDR_ERR_SUCCESS;
    1375             : }
    1376             : 
    1377           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeMediaType(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeMediaType r)
    1378             : {
    1379           4 :         const char *val = NULL;
    1380             : 
    1381           4 :         switch (r) {
    1382           0 :                 case DMMEDIA_STANDARD: val = "DMMEDIA_STANDARD"; break;
    1383           0 :                 case DMMEDIA_TRANSPARENCY: val = "DMMEDIA_TRANSPARENCY"; break;
    1384           0 :                 case DMMEDIA_GLOSSY: val = "DMMEDIA_GLOSSY"; break;
    1385             :         }
    1386           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1387           4 : }
    1388             : 
    1389       16001 : static enum ndr_err_code ndr_push_spoolss_DeviceModeDitherType(struct ndr_push *ndr, int ndr_flags, enum spoolss_DeviceModeDitherType r)
    1390             : {
    1391       16001 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    1392       16001 :         return NDR_ERR_SUCCESS;
    1393             : }
    1394             : 
    1395        4672 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeDitherType(struct ndr_pull *ndr, int ndr_flags, enum spoolss_DeviceModeDitherType *r)
    1396             : {
    1397             :         uint32_t v;
    1398        4676 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    1399        4676 :         *r = v;
    1400        4672 :         return NDR_ERR_SUCCESS;
    1401             : }
    1402             : 
    1403           4 : _PUBLIC_ void ndr_print_spoolss_DeviceModeDitherType(struct ndr_print *ndr, const char *name, enum spoolss_DeviceModeDitherType r)
    1404             : {
    1405           4 :         const char *val = NULL;
    1406             : 
    1407           4 :         switch (r) {
    1408           0 :                 case DMDITHER_NONE: val = "DMDITHER_NONE"; break;
    1409           0 :                 case DMDITHER_COARSE: val = "DMDITHER_COARSE"; break;
    1410           0 :                 case DMDITHER_FINE: val = "DMDITHER_FINE"; break;
    1411           0 :                 case DMDITHER_LINEART: val = "DMDITHER_LINEART"; break;
    1412           0 :                 case DMDITHER_ERRORDIFFUSION: val = "DMDITHER_ERRORDIFFUSION"; break;
    1413           0 :                 case DMDITHER_RESERVED6: val = "DMDITHER_RESERVED6"; break;
    1414           0 :                 case DMDITHER_RESERVED7: val = "DMDITHER_RESERVED7"; break;
    1415           0 :                 case DMDITHER_RESERVED8: val = "DMDITHER_RESERVED8"; break;
    1416           0 :                 case DMDITHER_RESERVED9: val = "DMDITHER_RESERVED9"; break;
    1417           0 :                 case DMDITHER_GRAYSCALE: val = "DMDITHER_GRAYSCALE"; break;
    1418             :         }
    1419           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    1420           4 : }
    1421             : 
    1422       16001 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DeviceMode(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DeviceMode *r)
    1423             : {
    1424       16001 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1425       16001 :         if (ndr_flags & NDR_SCALARS) {
    1426       16001 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    1427       16001 :                 NDR_CHECK(ndr_push_charset_to_null(ndr, NDR_SCALARS, r->devicename, MAXDEVICENAME, sizeof(uint16_t), CH_UTF16));
    1428       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeSpecVersion(ndr, NDR_SCALARS, r->specversion));
    1429       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->driverversion));
    1430       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
    1431       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->driverextra_data.length));
    1432       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeFields(ndr, NDR_SCALARS, r->fields));
    1433       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeOrientation(ndr, NDR_SCALARS, r->orientation));
    1434       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModePaperSize(ndr, NDR_SCALARS, r->papersize));
    1435       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->paperlength));
    1436       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->paperwidth));
    1437       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->scale));
    1438       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->copies));
    1439       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeDefaultSource(ndr, NDR_SCALARS, r->defaultsource));
    1440       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModePrintQuality(ndr, NDR_SCALARS, r->printquality));
    1441       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeColor(ndr, NDR_SCALARS, r->color));
    1442       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeDuplex(ndr, NDR_SCALARS, r->duplex));
    1443       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->yresolution));
    1444       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeTTOption(ndr, NDR_SCALARS, r->ttoption));
    1445       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeCollate(ndr, NDR_SCALARS, r->collate));
    1446       16001 :                 NDR_CHECK(ndr_push_charset_to_null(ndr, NDR_SCALARS, r->formname, MAXDEVICENAME, sizeof(uint16_t), CH_UTF16));
    1447       16001 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->logpixels));
    1448       16001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bitsperpel));
    1449       16001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pelswidth));
    1450       16001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pelsheight));
    1451       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeNUp(ndr, NDR_SCALARS, r->displayflags));
    1452       16001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->displayfrequency));
    1453       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeICMMethod(ndr, NDR_SCALARS, r->icmmethod));
    1454       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeICMIntent(ndr, NDR_SCALARS, r->icmintent));
    1455       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeMediaType(ndr, NDR_SCALARS, r->mediatype));
    1456       16001 :                 NDR_CHECK(ndr_push_spoolss_DeviceModeDitherType(ndr, NDR_SCALARS, r->dithertype));
    1457       16001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved1));
    1458       16001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
    1459       16001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->panningwidth));
    1460       16001 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->panningheight));
    1461             :                 {
    1462       16001 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    1463       16001 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1464             :                         {
    1465             :                                 struct ndr_push *_ndr_driverextra_data;
    1466       16001 :                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_driverextra_data, 0, r->driverextra_data.length));
    1467       16001 :                                 NDR_CHECK(ndr_push_DATA_BLOB(_ndr_driverextra_data, NDR_SCALARS, r->driverextra_data));
    1468       16001 :                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_driverextra_data, 0, r->driverextra_data.length));
    1469             :                         }
    1470       16001 :                         ndr->flags = _flags_save_DATA_BLOB;
    1471             :                 }
    1472       16001 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    1473             :         }
    1474       16001 :         if (ndr_flags & NDR_BUFFERS) {
    1475             :         }
    1476       16001 :         return NDR_ERR_SUCCESS;
    1477             : }
    1478             : 
    1479        4676 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DeviceMode(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DeviceMode *r)
    1480             : {
    1481        4676 :         uint32_t size_devicename_0 = 0;
    1482        4676 :         uint32_t size_formname_0 = 0;
    1483        4676 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1484        4676 :         if (ndr_flags & NDR_SCALARS) {
    1485        4676 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    1486        4676 :                 size_devicename_0 = MAXDEVICENAME;
    1487        4676 :                 NDR_CHECK(ndr_pull_charset_to_null(ndr, NDR_SCALARS, &r->devicename, size_devicename_0, sizeof(uint16_t), CH_UTF16));
    1488        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeSpecVersion(ndr, NDR_SCALARS, &r->specversion));
    1489        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->driverversion));
    1490        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
    1491        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->__driverextra_length));
    1492        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeFields(ndr, NDR_SCALARS, &r->fields));
    1493        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeOrientation(ndr, NDR_SCALARS, &r->orientation));
    1494        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModePaperSize(ndr, NDR_SCALARS, &r->papersize));
    1495        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->paperlength));
    1496        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->paperwidth));
    1497        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->scale));
    1498        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->copies));
    1499        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeDefaultSource(ndr, NDR_SCALARS, &r->defaultsource));
    1500        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModePrintQuality(ndr, NDR_SCALARS, &r->printquality));
    1501        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeColor(ndr, NDR_SCALARS, &r->color));
    1502        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeDuplex(ndr, NDR_SCALARS, &r->duplex));
    1503        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->yresolution));
    1504        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeTTOption(ndr, NDR_SCALARS, &r->ttoption));
    1505        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeCollate(ndr, NDR_SCALARS, &r->collate));
    1506        4676 :                 size_formname_0 = MAXDEVICENAME;
    1507        4676 :                 NDR_CHECK(ndr_pull_charset_to_null(ndr, NDR_SCALARS, &r->formname, size_formname_0, sizeof(uint16_t), CH_UTF16));
    1508        4676 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->logpixels));
    1509        4676 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bitsperpel));
    1510        4676 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pelswidth));
    1511        4676 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pelsheight));
    1512        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeNUp(ndr, NDR_SCALARS, &r->displayflags));
    1513        4676 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->displayfrequency));
    1514        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeICMMethod(ndr, NDR_SCALARS, &r->icmmethod));
    1515        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeICMIntent(ndr, NDR_SCALARS, &r->icmintent));
    1516        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeMediaType(ndr, NDR_SCALARS, &r->mediatype));
    1517        4680 :                 NDR_CHECK(ndr_pull_spoolss_DeviceModeDitherType(ndr, NDR_SCALARS, &r->dithertype));
    1518        4676 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved1));
    1519        4676 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
    1520        4676 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->panningwidth));
    1521        4676 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->panningheight));
    1522             :                 {
    1523        4676 :                         uint32_t _flags_save_DATA_BLOB = ndr->flags;
    1524        4676 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1525             :                         {
    1526             :                                 struct ndr_pull *_ndr_driverextra_data;
    1527        4676 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_driverextra_data, 0, r->__driverextra_length));
    1528        4676 :                                 NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_driverextra_data, NDR_SCALARS, &r->driverextra_data));
    1529        4676 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_driverextra_data, 0, r->__driverextra_length));
    1530             :                         }
    1531        4676 :                         ndr->flags = _flags_save_DATA_BLOB;
    1532             :                 }
    1533        4676 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    1534             :         }
    1535        4672 :         if (ndr_flags & NDR_BUFFERS) {
    1536             :         }
    1537        4676 :         return NDR_ERR_SUCCESS;
    1538             : }
    1539             : 
    1540           0 : static void ndr_print_flags_spoolss_DeviceMode(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_DeviceMode *r)
    1541             : {
    1542           0 :         ndr_print_spoolss_DeviceMode(ndr, name, r);
    1543           0 : }
    1544             : 
    1545           4 : _PUBLIC_ void ndr_print_spoolss_DeviceMode(struct ndr_print *ndr, const char *name, const struct spoolss_DeviceMode *r)
    1546             : {
    1547           4 :         ndr_print_struct(ndr, name, "spoolss_DeviceMode");
    1548           4 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1549           4 :         ndr->depth++;
    1550           4 :         ndr_print_string(ndr, "devicename", r->devicename);
    1551           4 :         ndr_print_spoolss_DeviceModeSpecVersion(ndr, "specversion", r->specversion);
    1552           4 :         ndr_print_uint16(ndr, "driverversion", r->driverversion);
    1553           4 :         ndr_print_uint16(ndr, "size", r->size);
    1554           4 :         ndr_print_uint16(ndr, "__driverextra_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->driverextra_data.length:r->__driverextra_length);
    1555           4 :         ndr_print_spoolss_DeviceModeFields(ndr, "fields", r->fields);
    1556           4 :         ndr_print_spoolss_DeviceModeOrientation(ndr, "orientation", r->orientation);
    1557           4 :         ndr_print_spoolss_DeviceModePaperSize(ndr, "papersize", r->papersize);
    1558           4 :         ndr_print_uint16(ndr, "paperlength", r->paperlength);
    1559           4 :         ndr_print_uint16(ndr, "paperwidth", r->paperwidth);
    1560           4 :         ndr_print_uint16(ndr, "scale", r->scale);
    1561           4 :         ndr_print_uint16(ndr, "copies", r->copies);
    1562           4 :         ndr_print_spoolss_DeviceModeDefaultSource(ndr, "defaultsource", r->defaultsource);
    1563           4 :         ndr_print_spoolss_DeviceModePrintQuality(ndr, "printquality", r->printquality);
    1564           4 :         ndr_print_spoolss_DeviceModeColor(ndr, "color", r->color);
    1565           4 :         ndr_print_spoolss_DeviceModeDuplex(ndr, "duplex", r->duplex);
    1566           4 :         ndr_print_uint16(ndr, "yresolution", r->yresolution);
    1567           4 :         ndr_print_spoolss_DeviceModeTTOption(ndr, "ttoption", r->ttoption);
    1568           4 :         ndr_print_spoolss_DeviceModeCollate(ndr, "collate", r->collate);
    1569           4 :         ndr_print_string(ndr, "formname", r->formname);
    1570           4 :         ndr_print_uint16(ndr, "logpixels", r->logpixels);
    1571           4 :         ndr_print_uint32(ndr, "bitsperpel", r->bitsperpel);
    1572           4 :         ndr_print_uint32(ndr, "pelswidth", r->pelswidth);
    1573           4 :         ndr_print_uint32(ndr, "pelsheight", r->pelsheight);
    1574           4 :         ndr_print_spoolss_DeviceModeNUp(ndr, "displayflags", r->displayflags);
    1575           4 :         ndr_print_uint32(ndr, "displayfrequency", r->displayfrequency);
    1576           4 :         ndr_print_spoolss_DeviceModeICMMethod(ndr, "icmmethod", r->icmmethod);
    1577           4 :         ndr_print_spoolss_DeviceModeICMIntent(ndr, "icmintent", r->icmintent);
    1578           4 :         ndr_print_spoolss_DeviceModeMediaType(ndr, "mediatype", r->mediatype);
    1579           4 :         ndr_print_spoolss_DeviceModeDitherType(ndr, "dithertype", r->dithertype);
    1580           4 :         ndr_print_uint32(ndr, "reserved1", r->reserved1);
    1581           4 :         ndr_print_uint32(ndr, "reserved2", r->reserved2);
    1582           4 :         ndr_print_uint32(ndr, "panningwidth", r->panningwidth);
    1583           4 :         ndr_print_uint32(ndr, "panningheight", r->panningheight);
    1584             :         {
    1585           4 :                 uint32_t _flags_save_DATA_BLOB = ndr->flags;
    1586           4 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
    1587           4 :                 ndr_print_DATA_BLOB(ndr, "driverextra_data", r->driverextra_data);
    1588           4 :                 ndr->flags = _flags_save_DATA_BLOB;
    1589             :         }
    1590           4 :         ndr->depth--;
    1591             : }
    1592             : 
    1593       11109 : _PUBLIC_ size_t ndr_size_spoolss_DeviceMode(const struct spoolss_DeviceMode *r, int flags)
    1594             : {
    1595       11109 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_DeviceMode);
    1596             : }
    1597             : 
    1598         838 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_EnumPrinterFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    1599             : {
    1600         838 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    1601         838 :         return NDR_ERR_SUCCESS;
    1602             : }
    1603             : 
    1604         423 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_EnumPrinterFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    1605             : {
    1606             :         uint32_t v;
    1607         423 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    1608         423 :         *r = v;
    1609         423 :         return NDR_ERR_SUCCESS;
    1610             : }
    1611             : 
    1612           0 : _PUBLIC_ void ndr_print_spoolss_EnumPrinterFlags(struct ndr_print *ndr, const char *name, uint32_t r)
    1613             : {
    1614           0 :         ndr_print_uint32(ndr, name, r);
    1615           0 :         ndr->depth++;
    1616           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_DEFAULT", PRINTER_ENUM_DEFAULT, r);
    1617           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL, r);
    1618           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_CONNECTIONS", PRINTER_ENUM_CONNECTIONS, r);
    1619           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_FAVORITE", PRINTER_ENUM_FAVORITE, r);
    1620           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_NAME", PRINTER_ENUM_NAME, r);
    1621           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_REMOTE", PRINTER_ENUM_REMOTE, r);
    1622           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_SHARED", PRINTER_ENUM_SHARED, r);
    1623           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_NETWORK", PRINTER_ENUM_NETWORK, r);
    1624           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_EXPAND", PRINTER_ENUM_EXPAND, r);
    1625           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_CONTAINER", PRINTER_ENUM_CONTAINER, r);
    1626           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON1", PRINTER_ENUM_ICON1, r);
    1627           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON2", PRINTER_ENUM_ICON2, r);
    1628           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON3", PRINTER_ENUM_ICON3, r);
    1629           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON4", PRINTER_ENUM_ICON4, r);
    1630           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON5", PRINTER_ENUM_ICON5, r);
    1631           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON6", PRINTER_ENUM_ICON6, r);
    1632           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON7", PRINTER_ENUM_ICON7, r);
    1633           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_ICON8", PRINTER_ENUM_ICON8, r);
    1634           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ENUM_HIDE", PRINTER_ENUM_HIDE, r);
    1635           0 :         ndr->depth--;
    1636           0 : }
    1637             : 
    1638        2520 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterAttributes(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    1639             : {
    1640        2520 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    1641        2520 :         return NDR_ERR_SUCCESS;
    1642             : }
    1643             : 
    1644         964 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterAttributes(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    1645             : {
    1646             :         uint32_t v;
    1647         964 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    1648         964 :         *r = v;
    1649         964 :         return NDR_ERR_SUCCESS;
    1650             : }
    1651             : 
    1652           4 : _PUBLIC_ void ndr_print_spoolss_PrinterAttributes(struct ndr_print *ndr, const char *name, uint32_t r)
    1653             : {
    1654           4 :         ndr_print_uint32(ndr, name, r);
    1655           4 :         ndr->depth++;
    1656           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_QUEUED", PRINTER_ATTRIBUTE_QUEUED, r);
    1657           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DIRECT", PRINTER_ATTRIBUTE_DIRECT, r);
    1658           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DEFAULT", PRINTER_ATTRIBUTE_DEFAULT, r);
    1659           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_SHARED", PRINTER_ATTRIBUTE_SHARED, r);
    1660           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_NETWORK", PRINTER_ATTRIBUTE_NETWORK, r);
    1661           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_HIDDEN", PRINTER_ATTRIBUTE_HIDDEN, r);
    1662           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_LOCAL", PRINTER_ATTRIBUTE_LOCAL, r);
    1663           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_DEVQ", PRINTER_ATTRIBUTE_ENABLE_DEVQ, r);
    1664           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS", PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS, r);
    1665           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST", PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST, r);
    1666           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_WORK_OFFLINE", PRINTER_ATTRIBUTE_WORK_OFFLINE, r);
    1667           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_ENABLE_BIDI", PRINTER_ATTRIBUTE_ENABLE_BIDI, r);
    1668           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_RAW_ONLY", PRINTER_ATTRIBUTE_RAW_ONLY, r);
    1669           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_PUBLISHED", PRINTER_ATTRIBUTE_PUBLISHED, r);
    1670           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_FAX", PRINTER_ATTRIBUTE_FAX, r);
    1671           4 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "PRINTER_ATTRIBUTE_TS", PRINTER_ATTRIBUTE_TS, r);
    1672           4 :         ndr->depth--;
    1673           4 : }
    1674             : 
    1675        1316 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo1 *r)
    1676             : {
    1677        1316 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    1678        1316 :         if (ndr_flags & NDR_SCALARS) {
    1679         658 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    1680         658 :                 NDR_CHECK(ndr_push_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, r->flags));
    1681             :                 {
    1682         658 :                         uint32_t _flags_save_string = ndr->flags;
    1683         658 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1684         658 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
    1685         658 :                         ndr->flags = _flags_save_string;
    1686             :                 }
    1687             :                 {
    1688         658 :                         uint32_t _flags_save_string = ndr->flags;
    1689         658 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1690         658 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->name));
    1691         658 :                         ndr->flags = _flags_save_string;
    1692             :                 }
    1693             :                 {
    1694         658 :                         uint32_t _flags_save_string = ndr->flags;
    1695         658 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1696         658 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->comment));
    1697         658 :                         ndr->flags = _flags_save_string;
    1698             :                 }
    1699         658 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    1700             :         }
    1701        1316 :         if (ndr_flags & NDR_BUFFERS) {
    1702             :                 {
    1703         658 :                         uint32_t _flags_save_string = ndr->flags;
    1704         658 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1705         658 :                         if (r->description) {
    1706         658 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->description));
    1707         658 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
    1708         658 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->description));
    1709             :                         }
    1710         658 :                         ndr->flags = _flags_save_string;
    1711             :                 }
    1712             :                 {
    1713         658 :                         uint32_t _flags_save_string = ndr->flags;
    1714         658 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1715         658 :                         if (r->name) {
    1716         658 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->name));
    1717         658 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->name));
    1718         658 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->name));
    1719             :                         }
    1720         658 :                         ndr->flags = _flags_save_string;
    1721             :                 }
    1722             :                 {
    1723         658 :                         uint32_t _flags_save_string = ndr->flags;
    1724         658 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1725         658 :                         if (r->comment) {
    1726         658 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->comment));
    1727         658 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->comment));
    1728         658 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->comment));
    1729             :                         }
    1730         658 :                         ndr->flags = _flags_save_string;
    1731             :                 }
    1732             :         }
    1733        1316 :         return NDR_ERR_SUCCESS;
    1734             : }
    1735             : 
    1736         518 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo1 *r)
    1737             : {
    1738             :         uint32_t _ptr_description;
    1739         518 :         TALLOC_CTX *_mem_save_description_0 = NULL;
    1740             :         uint32_t _ptr_name;
    1741         518 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    1742             :         uint32_t _ptr_comment;
    1743         518 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    1744         518 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1745         518 :         if (ndr_flags & NDR_SCALARS) {
    1746         259 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1747         259 :                 NDR_CHECK(ndr_pull_spoolss_EnumPrinterFlags(ndr, NDR_SCALARS, &r->flags));
    1748             :                 {
    1749         259 :                         uint32_t _flags_save_string = ndr->flags;
    1750         259 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1751         259 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
    1752         259 :                         if (_ptr_description) {
    1753         259 :                                 NDR_PULL_ALLOC(ndr, r->description);
    1754         259 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
    1755             :                         } else {
    1756           0 :                                 r->description = NULL;
    1757             :                         }
    1758         259 :                         ndr->flags = _flags_save_string;
    1759             :                 }
    1760             :                 {
    1761         259 :                         uint32_t _flags_save_string = ndr->flags;
    1762         259 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1763         259 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    1764         259 :                         if (_ptr_name) {
    1765         259 :                                 NDR_PULL_ALLOC(ndr, r->name);
    1766         259 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->name, _ptr_name));
    1767             :                         } else {
    1768           0 :                                 r->name = NULL;
    1769             :                         }
    1770         259 :                         ndr->flags = _flags_save_string;
    1771             :                 }
    1772             :                 {
    1773         259 :                         uint32_t _flags_save_string = ndr->flags;
    1774         259 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1775         259 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    1776         259 :                         if (_ptr_comment) {
    1777         259 :                                 NDR_PULL_ALLOC(ndr, r->comment);
    1778         259 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->comment, _ptr_comment));
    1779             :                         } else {
    1780           0 :                                 r->comment = NULL;
    1781             :                         }
    1782         259 :                         ndr->flags = _flags_save_string;
    1783             :                 }
    1784         259 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    1785             :         }
    1786         518 :         if (ndr_flags & NDR_BUFFERS) {
    1787             :                 {
    1788         259 :                         uint32_t _flags_save_string = ndr->flags;
    1789         259 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1790         259 :                         if (r->description) {
    1791             :                                 uint32_t _relative_save_offset;
    1792         259 :                                 _relative_save_offset = ndr->offset;
    1793         259 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
    1794         259 :                                 _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1795         259 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
    1796         259 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
    1797         259 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
    1798         259 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    1799          80 :                                         ndr->relative_highest_offset = ndr->offset;
    1800             :                                 }
    1801         259 :                                 ndr->offset = _relative_save_offset;
    1802             :                         }
    1803         259 :                         ndr->flags = _flags_save_string;
    1804             :                 }
    1805             :                 {
    1806         259 :                         uint32_t _flags_save_string = ndr->flags;
    1807         259 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1808         259 :                         if (r->name) {
    1809             :                                 uint32_t _relative_save_offset;
    1810         259 :                                 _relative_save_offset = ndr->offset;
    1811         259 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->name));
    1812         259 :                                 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1813         259 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    1814         259 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->name));
    1815         259 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    1816         259 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    1817           0 :                                         ndr->relative_highest_offset = ndr->offset;
    1818             :                                 }
    1819         259 :                                 ndr->offset = _relative_save_offset;
    1820             :                         }
    1821         259 :                         ndr->flags = _flags_save_string;
    1822             :                 }
    1823             :                 {
    1824         259 :                         uint32_t _flags_save_string = ndr->flags;
    1825         259 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1826         259 :                         if (r->comment) {
    1827             :                                 uint32_t _relative_save_offset;
    1828         259 :                                 _relative_save_offset = ndr->offset;
    1829         259 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->comment));
    1830         259 :                                 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    1831         259 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    1832         259 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->comment));
    1833         259 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    1834         259 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    1835           0 :                                         ndr->relative_highest_offset = ndr->offset;
    1836             :                                 }
    1837         259 :                                 ndr->offset = _relative_save_offset;
    1838             :                         }
    1839         259 :                         ndr->flags = _flags_save_string;
    1840             :                 }
    1841             :         }
    1842         518 :         return NDR_ERR_SUCCESS;
    1843             : }
    1844             : 
    1845           0 : static void ndr_print_flags_spoolss_PrinterInfo1(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_PrinterInfo1 *r)
    1846             : {
    1847           0 :         ndr_print_spoolss_PrinterInfo1(ndr, name, r);
    1848           0 : }
    1849             : 
    1850           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo1 *r)
    1851             : {
    1852           0 :         ndr_print_struct(ndr, name, "spoolss_PrinterInfo1");
    1853           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    1854           0 :         ndr->depth++;
    1855           0 :         ndr_print_spoolss_EnumPrinterFlags(ndr, "flags", r->flags);
    1856             :         {
    1857           0 :                 uint32_t _flags_save_string = ndr->flags;
    1858           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1859           0 :                 ndr_print_ptr(ndr, "description", r->description);
    1860           0 :                 ndr->depth++;
    1861           0 :                 if (r->description) {
    1862           0 :                         ndr_print_string(ndr, "description", r->description);
    1863             :                 }
    1864           0 :                 ndr->depth--;
    1865           0 :                 ndr->flags = _flags_save_string;
    1866             :         }
    1867             :         {
    1868           0 :                 uint32_t _flags_save_string = ndr->flags;
    1869           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1870           0 :                 ndr_print_ptr(ndr, "name", r->name);
    1871           0 :                 ndr->depth++;
    1872           0 :                 if (r->name) {
    1873           0 :                         ndr_print_string(ndr, "name", r->name);
    1874             :                 }
    1875           0 :                 ndr->depth--;
    1876           0 :                 ndr->flags = _flags_save_string;
    1877             :         }
    1878             :         {
    1879           0 :                 uint32_t _flags_save_string = ndr->flags;
    1880           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1881           0 :                 ndr_print_ptr(ndr, "comment", r->comment);
    1882           0 :                 ndr->depth++;
    1883           0 :                 if (r->comment) {
    1884           0 :                         ndr_print_string(ndr, "comment", r->comment);
    1885             :                 }
    1886           0 :                 ndr->depth--;
    1887           0 :                 ndr->flags = _flags_save_string;
    1888             :         }
    1889           0 :         ndr->depth--;
    1890             : }
    1891             : 
    1892           0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo1(const struct spoolss_PrinterInfo1 *r, int flags)
    1893             : {
    1894           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo1);
    1895             : }
    1896             : 
    1897        1224 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo2 *r)
    1898             : {
    1899             :         uint32_t _ptr_servername;
    1900        1224 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
    1901             :         uint32_t _ptr_printername;
    1902        1224 :         TALLOC_CTX *_mem_save_printername_0 = NULL;
    1903             :         uint32_t _ptr_sharename;
    1904        1224 :         TALLOC_CTX *_mem_save_sharename_0 = NULL;
    1905             :         uint32_t _ptr_portname;
    1906        1224 :         TALLOC_CTX *_mem_save_portname_0 = NULL;
    1907             :         uint32_t _ptr_drivername;
    1908        1224 :         TALLOC_CTX *_mem_save_drivername_0 = NULL;
    1909             :         uint32_t _ptr_comment;
    1910        1224 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    1911             :         uint32_t _ptr_location;
    1912        1224 :         TALLOC_CTX *_mem_save_location_0 = NULL;
    1913             :         uint32_t _ptr_devmode;
    1914        1224 :         TALLOC_CTX *_mem_save_devmode_0 = NULL;
    1915             :         uint32_t _ptr_sepfile;
    1916        1224 :         TALLOC_CTX *_mem_save_sepfile_0 = NULL;
    1917             :         uint32_t _ptr_printprocessor;
    1918        1224 :         TALLOC_CTX *_mem_save_printprocessor_0 = NULL;
    1919             :         uint32_t _ptr_datatype;
    1920        1224 :         TALLOC_CTX *_mem_save_datatype_0 = NULL;
    1921             :         uint32_t _ptr_parameters;
    1922        1224 :         TALLOC_CTX *_mem_save_parameters_0 = NULL;
    1923             :         uint32_t _ptr_secdesc;
    1924        1224 :         TALLOC_CTX *_mem_save_secdesc_0 = NULL;
    1925        1224 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    1926        1224 :         if (ndr_flags & NDR_SCALARS) {
    1927         612 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    1928             :                 {
    1929         612 :                         uint32_t _flags_save_string = ndr->flags;
    1930         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1931         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
    1932         612 :                         if (_ptr_servername) {
    1933         292 :                                 NDR_PULL_ALLOC(ndr, r->servername);
    1934         292 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
    1935             :                         } else {
    1936         320 :                                 r->servername = NULL;
    1937             :                         }
    1938         612 :                         ndr->flags = _flags_save_string;
    1939             :                 }
    1940             :                 {
    1941         612 :                         uint32_t _flags_save_string = ndr->flags;
    1942         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1943         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
    1944         612 :                         if (_ptr_printername) {
    1945         612 :                                 NDR_PULL_ALLOC(ndr, r->printername);
    1946         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
    1947             :                         } else {
    1948           0 :                                 r->printername = NULL;
    1949             :                         }
    1950         612 :                         ndr->flags = _flags_save_string;
    1951             :                 }
    1952             :                 {
    1953         612 :                         uint32_t _flags_save_string = ndr->flags;
    1954         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1955         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
    1956         612 :                         if (_ptr_sharename) {
    1957         612 :                                 NDR_PULL_ALLOC(ndr, r->sharename);
    1958         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sharename, _ptr_sharename));
    1959             :                         } else {
    1960           0 :                                 r->sharename = NULL;
    1961             :                         }
    1962         612 :                         ndr->flags = _flags_save_string;
    1963             :                 }
    1964             :                 {
    1965         612 :                         uint32_t _flags_save_string = ndr->flags;
    1966         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1967         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
    1968         612 :                         if (_ptr_portname) {
    1969         612 :                                 NDR_PULL_ALLOC(ndr, r->portname);
    1970         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->portname, _ptr_portname));
    1971             :                         } else {
    1972           0 :                                 r->portname = NULL;
    1973             :                         }
    1974         612 :                         ndr->flags = _flags_save_string;
    1975             :                 }
    1976             :                 {
    1977         612 :                         uint32_t _flags_save_string = ndr->flags;
    1978         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1979         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_drivername));
    1980         612 :                         if (_ptr_drivername) {
    1981         612 :                                 NDR_PULL_ALLOC(ndr, r->drivername);
    1982         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->drivername, _ptr_drivername));
    1983             :                         } else {
    1984           0 :                                 r->drivername = NULL;
    1985             :                         }
    1986         612 :                         ndr->flags = _flags_save_string;
    1987             :                 }
    1988             :                 {
    1989         612 :                         uint32_t _flags_save_string = ndr->flags;
    1990         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    1991         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    1992         612 :                         if (_ptr_comment) {
    1993         612 :                                 NDR_PULL_ALLOC(ndr, r->comment);
    1994         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->comment, _ptr_comment));
    1995             :                         } else {
    1996           0 :                                 r->comment = NULL;
    1997             :                         }
    1998         612 :                         ndr->flags = _flags_save_string;
    1999             :                 }
    2000             :                 {
    2001         612 :                         uint32_t _flags_save_string = ndr->flags;
    2002         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2003         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_location));
    2004         612 :                         if (_ptr_location) {
    2005         612 :                                 NDR_PULL_ALLOC(ndr, r->location);
    2006         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->location, _ptr_location));
    2007             :                         } else {
    2008           0 :                                 r->location = NULL;
    2009             :                         }
    2010         612 :                         ndr->flags = _flags_save_string;
    2011             :                 }
    2012             :                 {
    2013         612 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    2014         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2015         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
    2016         612 :                         if (_ptr_devmode) {
    2017         572 :                                 NDR_PULL_ALLOC(ndr, r->devmode);
    2018         572 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
    2019             :                         } else {
    2020          40 :                                 r->devmode = NULL;
    2021             :                         }
    2022         612 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    2023             :                 }
    2024             :                 {
    2025         612 :                         uint32_t _flags_save_string = ndr->flags;
    2026         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2027         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sepfile));
    2028         612 :                         if (_ptr_sepfile) {
    2029         612 :                                 NDR_PULL_ALLOC(ndr, r->sepfile);
    2030         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->sepfile, _ptr_sepfile));
    2031             :                         } else {
    2032           0 :                                 r->sepfile = NULL;
    2033             :                         }
    2034         612 :                         ndr->flags = _flags_save_string;
    2035             :                 }
    2036             :                 {
    2037         612 :                         uint32_t _flags_save_string = ndr->flags;
    2038         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2039         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printprocessor));
    2040         612 :                         if (_ptr_printprocessor) {
    2041         612 :                                 NDR_PULL_ALLOC(ndr, r->printprocessor);
    2042         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printprocessor, _ptr_printprocessor));
    2043             :                         } else {
    2044           0 :                                 r->printprocessor = NULL;
    2045             :                         }
    2046         612 :                         ndr->flags = _flags_save_string;
    2047             :                 }
    2048             :                 {
    2049         612 :                         uint32_t _flags_save_string = ndr->flags;
    2050         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2051         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_datatype));
    2052         612 :                         if (_ptr_datatype) {
    2053         612 :                                 NDR_PULL_ALLOC(ndr, r->datatype);
    2054         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->datatype, _ptr_datatype));
    2055             :                         } else {
    2056           0 :                                 r->datatype = NULL;
    2057             :                         }
    2058         612 :                         ndr->flags = _flags_save_string;
    2059             :                 }
    2060             :                 {
    2061         612 :                         uint32_t _flags_save_string = ndr->flags;
    2062         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2063         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
    2064         612 :                         if (_ptr_parameters) {
    2065         612 :                                 NDR_PULL_ALLOC(ndr, r->parameters);
    2066         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
    2067             :                         } else {
    2068           0 :                                 r->parameters = NULL;
    2069             :                         }
    2070         612 :                         ndr->flags = _flags_save_string;
    2071             :                 }
    2072             :                 {
    2073         612 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    2074         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2075         612 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
    2076         612 :                         if (_ptr_secdesc) {
    2077         612 :                                 NDR_PULL_ALLOC(ndr, r->secdesc);
    2078         612 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
    2079             :                         } else {
    2080           0 :                                 r->secdesc = NULL;
    2081             :                         }
    2082         612 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    2083             :                 }
    2084         612 :                 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
    2085         612 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
    2086         612 :                 if (r->priority > 99) {
    2087           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    2088             :                 }
    2089         612 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->defaultpriority));
    2090         612 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->starttime));
    2091         612 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->untiltime));
    2092         612 :                 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
    2093         612 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
    2094         612 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->averageppm));
    2095         612 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2096             :         }
    2097        1224 :         if (ndr_flags & NDR_BUFFERS) {
    2098             :                 {
    2099         612 :                         uint32_t _flags_save_string = ndr->flags;
    2100         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2101         612 :                         if (r->servername) {
    2102             :                                 uint32_t _relative_save_offset;
    2103         292 :                                 _relative_save_offset = ndr->offset;
    2104         292 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
    2105         292 :                                 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2106         292 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
    2107         292 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
    2108         292 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
    2109         292 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2110         228 :                                         ndr->relative_highest_offset = ndr->offset;
    2111             :                                 }
    2112         292 :                                 ndr->offset = _relative_save_offset;
    2113             :                         }
    2114         612 :                         ndr->flags = _flags_save_string;
    2115             :                 }
    2116             :                 {
    2117         612 :                         uint32_t _flags_save_string = ndr->flags;
    2118         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2119         612 :                         if (r->printername) {
    2120             :                                 uint32_t _relative_save_offset;
    2121         612 :                                 _relative_save_offset = ndr->offset;
    2122         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
    2123         612 :                                 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2124         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
    2125         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
    2126         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
    2127         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2128         272 :                                         ndr->relative_highest_offset = ndr->offset;
    2129             :                                 }
    2130         612 :                                 ndr->offset = _relative_save_offset;
    2131             :                         }
    2132         612 :                         ndr->flags = _flags_save_string;
    2133             :                 }
    2134             :                 {
    2135         612 :                         uint32_t _flags_save_string = ndr->flags;
    2136         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2137         612 :                         if (r->sharename) {
    2138             :                                 uint32_t _relative_save_offset;
    2139         612 :                                 _relative_save_offset = ndr->offset;
    2140         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sharename));
    2141         612 :                                 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2142         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->sharename, 0);
    2143         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sharename));
    2144         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
    2145         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2146           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2147             :                                 }
    2148         612 :                                 ndr->offset = _relative_save_offset;
    2149             :                         }
    2150         612 :                         ndr->flags = _flags_save_string;
    2151             :                 }
    2152             :                 {
    2153         612 :                         uint32_t _flags_save_string = ndr->flags;
    2154         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2155         612 :                         if (r->portname) {
    2156             :                                 uint32_t _relative_save_offset;
    2157         612 :                                 _relative_save_offset = ndr->offset;
    2158         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->portname));
    2159         612 :                                 _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2160         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
    2161         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->portname));
    2162         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
    2163         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2164           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2165             :                                 }
    2166         612 :                                 ndr->offset = _relative_save_offset;
    2167             :                         }
    2168         612 :                         ndr->flags = _flags_save_string;
    2169             :                 }
    2170             :                 {
    2171         612 :                         uint32_t _flags_save_string = ndr->flags;
    2172         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2173         612 :                         if (r->drivername) {
    2174             :                                 uint32_t _relative_save_offset;
    2175         612 :                                 _relative_save_offset = ndr->offset;
    2176         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->drivername));
    2177         612 :                                 _mem_save_drivername_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2178         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->drivername, 0);
    2179         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->drivername));
    2180         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_drivername_0, 0);
    2181         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2182           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2183             :                                 }
    2184         612 :                                 ndr->offset = _relative_save_offset;
    2185             :                         }
    2186         612 :                         ndr->flags = _flags_save_string;
    2187             :                 }
    2188             :                 {
    2189         612 :                         uint32_t _flags_save_string = ndr->flags;
    2190         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2191         612 :                         if (r->comment) {
    2192             :                                 uint32_t _relative_save_offset;
    2193         612 :                                 _relative_save_offset = ndr->offset;
    2194         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->comment));
    2195         612 :                                 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2196         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    2197         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->comment));
    2198         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    2199         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2200           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2201             :                                 }
    2202         612 :                                 ndr->offset = _relative_save_offset;
    2203             :                         }
    2204         612 :                         ndr->flags = _flags_save_string;
    2205             :                 }
    2206             :                 {
    2207         612 :                         uint32_t _flags_save_string = ndr->flags;
    2208         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2209         612 :                         if (r->location) {
    2210             :                                 uint32_t _relative_save_offset;
    2211         612 :                                 _relative_save_offset = ndr->offset;
    2212         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->location));
    2213         612 :                                 _mem_save_location_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2214         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->location, 0);
    2215         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->location));
    2216         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_location_0, 0);
    2217         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2218           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2219             :                                 }
    2220         612 :                                 ndr->offset = _relative_save_offset;
    2221             :                         }
    2222         612 :                         ndr->flags = _flags_save_string;
    2223             :                 }
    2224             :                 {
    2225         612 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    2226         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2227         612 :                         if (r->devmode) {
    2228             :                                 uint32_t _relative_save_offset;
    2229         572 :                                 _relative_save_offset = ndr->offset;
    2230         572 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
    2231         572 :                                 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2232         572 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
    2233             :                                 {
    2234             :                                         struct ndr_pull *_ndr_devmode;
    2235         572 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
    2236         572 :                                         NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    2237         572 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
    2238             :                                 }
    2239         572 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
    2240         572 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2241           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2242             :                                 }
    2243         572 :                                 ndr->offset = _relative_save_offset;
    2244             :                         }
    2245         612 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    2246             :                 }
    2247             :                 {
    2248         612 :                         uint32_t _flags_save_string = ndr->flags;
    2249         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2250         612 :                         if (r->sepfile) {
    2251             :                                 uint32_t _relative_save_offset;
    2252         612 :                                 _relative_save_offset = ndr->offset;
    2253         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->sepfile));
    2254         612 :                                 _mem_save_sepfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2255         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->sepfile, 0);
    2256         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->sepfile));
    2257         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sepfile_0, 0);
    2258         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2259           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2260             :                                 }
    2261         612 :                                 ndr->offset = _relative_save_offset;
    2262             :                         }
    2263         612 :                         ndr->flags = _flags_save_string;
    2264             :                 }
    2265             :                 {
    2266         612 :                         uint32_t _flags_save_string = ndr->flags;
    2267         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2268         612 :                         if (r->printprocessor) {
    2269             :                                 uint32_t _relative_save_offset;
    2270         612 :                                 _relative_save_offset = ndr->offset;
    2271         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printprocessor));
    2272         612 :                                 _mem_save_printprocessor_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2273         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->printprocessor, 0);
    2274         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printprocessor));
    2275         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printprocessor_0, 0);
    2276         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2277           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2278             :                                 }
    2279         612 :                                 ndr->offset = _relative_save_offset;
    2280             :                         }
    2281         612 :                         ndr->flags = _flags_save_string;
    2282             :                 }
    2283             :                 {
    2284         612 :                         uint32_t _flags_save_string = ndr->flags;
    2285         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2286         612 :                         if (r->datatype) {
    2287             :                                 uint32_t _relative_save_offset;
    2288         612 :                                 _relative_save_offset = ndr->offset;
    2289         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->datatype));
    2290         612 :                                 _mem_save_datatype_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2291         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->datatype, 0);
    2292         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->datatype));
    2293         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_datatype_0, 0);
    2294         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2295           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2296             :                                 }
    2297         612 :                                 ndr->offset = _relative_save_offset;
    2298             :                         }
    2299         612 :                         ndr->flags = _flags_save_string;
    2300             :                 }
    2301             :                 {
    2302         612 :                         uint32_t _flags_save_string = ndr->flags;
    2303         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2304         612 :                         if (r->parameters) {
    2305             :                                 uint32_t _relative_save_offset;
    2306         612 :                                 _relative_save_offset = ndr->offset;
    2307         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
    2308         612 :                                 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2309         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
    2310         612 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
    2311         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
    2312         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2313           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2314             :                                 }
    2315         612 :                                 ndr->offset = _relative_save_offset;
    2316             :                         }
    2317         612 :                         ndr->flags = _flags_save_string;
    2318             :                 }
    2319             :                 {
    2320         612 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    2321         612 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2322         612 :                         if (r->secdesc) {
    2323             :                                 uint32_t _relative_save_offset;
    2324         612 :                                 _relative_save_offset = ndr->offset;
    2325         612 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
    2326         612 :                                 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2327         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
    2328             :                                 {
    2329             :                                         struct ndr_pull *_ndr_secdesc;
    2330         612 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
    2331         612 :                                         NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
    2332         612 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
    2333             :                                 }
    2334         612 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
    2335         612 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2336           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2337             :                                 }
    2338         612 :                                 ndr->offset = _relative_save_offset;
    2339             :                         }
    2340         612 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    2341             :                 }
    2342             :         }
    2343        1224 :         return NDR_ERR_SUCCESS;
    2344             : }
    2345             : 
    2346           0 : static void ndr_print_flags_spoolss_PrinterInfo2(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_PrinterInfo2 *r)
    2347             : {
    2348           0 :         ndr_print_spoolss_PrinterInfo2(ndr, name, r);
    2349           0 : }
    2350             : 
    2351           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo2 *r)
    2352             : {
    2353           0 :         ndr_print_struct(ndr, name, "spoolss_PrinterInfo2");
    2354           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2355           0 :         ndr->depth++;
    2356             :         {
    2357           0 :                 uint32_t _flags_save_string = ndr->flags;
    2358           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2359           0 :                 ndr_print_ptr(ndr, "servername", r->servername);
    2360           0 :                 ndr->depth++;
    2361           0 :                 if (r->servername) {
    2362           0 :                         ndr_print_string(ndr, "servername", r->servername);
    2363             :                 }
    2364           0 :                 ndr->depth--;
    2365           0 :                 ndr->flags = _flags_save_string;
    2366             :         }
    2367             :         {
    2368           0 :                 uint32_t _flags_save_string = ndr->flags;
    2369           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2370           0 :                 ndr_print_ptr(ndr, "printername", r->printername);
    2371           0 :                 ndr->depth++;
    2372           0 :                 if (r->printername) {
    2373           0 :                         ndr_print_string(ndr, "printername", r->printername);
    2374             :                 }
    2375           0 :                 ndr->depth--;
    2376           0 :                 ndr->flags = _flags_save_string;
    2377             :         }
    2378             :         {
    2379           0 :                 uint32_t _flags_save_string = ndr->flags;
    2380           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2381           0 :                 ndr_print_ptr(ndr, "sharename", r->sharename);
    2382           0 :                 ndr->depth++;
    2383           0 :                 if (r->sharename) {
    2384           0 :                         ndr_print_string(ndr, "sharename", r->sharename);
    2385             :                 }
    2386           0 :                 ndr->depth--;
    2387           0 :                 ndr->flags = _flags_save_string;
    2388             :         }
    2389             :         {
    2390           0 :                 uint32_t _flags_save_string = ndr->flags;
    2391           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2392           0 :                 ndr_print_ptr(ndr, "portname", r->portname);
    2393           0 :                 ndr->depth++;
    2394           0 :                 if (r->portname) {
    2395           0 :                         ndr_print_string(ndr, "portname", r->portname);
    2396             :                 }
    2397           0 :                 ndr->depth--;
    2398           0 :                 ndr->flags = _flags_save_string;
    2399             :         }
    2400             :         {
    2401           0 :                 uint32_t _flags_save_string = ndr->flags;
    2402           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2403           0 :                 ndr_print_ptr(ndr, "drivername", r->drivername);
    2404           0 :                 ndr->depth++;
    2405           0 :                 if (r->drivername) {
    2406           0 :                         ndr_print_string(ndr, "drivername", r->drivername);
    2407             :                 }
    2408           0 :                 ndr->depth--;
    2409           0 :                 ndr->flags = _flags_save_string;
    2410             :         }
    2411             :         {
    2412           0 :                 uint32_t _flags_save_string = ndr->flags;
    2413           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2414           0 :                 ndr_print_ptr(ndr, "comment", r->comment);
    2415           0 :                 ndr->depth++;
    2416           0 :                 if (r->comment) {
    2417           0 :                         ndr_print_string(ndr, "comment", r->comment);
    2418             :                 }
    2419           0 :                 ndr->depth--;
    2420           0 :                 ndr->flags = _flags_save_string;
    2421             :         }
    2422             :         {
    2423           0 :                 uint32_t _flags_save_string = ndr->flags;
    2424           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2425           0 :                 ndr_print_ptr(ndr, "location", r->location);
    2426           0 :                 ndr->depth++;
    2427           0 :                 if (r->location) {
    2428           0 :                         ndr_print_string(ndr, "location", r->location);
    2429             :                 }
    2430           0 :                 ndr->depth--;
    2431           0 :                 ndr->flags = _flags_save_string;
    2432             :         }
    2433             :         {
    2434           0 :                 uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    2435           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2436           0 :                 ndr_print_ptr(ndr, "devmode", r->devmode);
    2437           0 :                 ndr->depth++;
    2438           0 :                 if (r->devmode) {
    2439           0 :                         ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
    2440             :                 }
    2441           0 :                 ndr->depth--;
    2442           0 :                 ndr->flags = _flags_save_spoolss_DeviceMode;
    2443             :         }
    2444             :         {
    2445           0 :                 uint32_t _flags_save_string = ndr->flags;
    2446           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2447           0 :                 ndr_print_ptr(ndr, "sepfile", r->sepfile);
    2448           0 :                 ndr->depth++;
    2449           0 :                 if (r->sepfile) {
    2450           0 :                         ndr_print_string(ndr, "sepfile", r->sepfile);
    2451             :                 }
    2452           0 :                 ndr->depth--;
    2453           0 :                 ndr->flags = _flags_save_string;
    2454             :         }
    2455             :         {
    2456           0 :                 uint32_t _flags_save_string = ndr->flags;
    2457           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2458           0 :                 ndr_print_ptr(ndr, "printprocessor", r->printprocessor);
    2459           0 :                 ndr->depth++;
    2460           0 :                 if (r->printprocessor) {
    2461           0 :                         ndr_print_string(ndr, "printprocessor", r->printprocessor);
    2462             :                 }
    2463           0 :                 ndr->depth--;
    2464           0 :                 ndr->flags = _flags_save_string;
    2465             :         }
    2466             :         {
    2467           0 :                 uint32_t _flags_save_string = ndr->flags;
    2468           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2469           0 :                 ndr_print_ptr(ndr, "datatype", r->datatype);
    2470           0 :                 ndr->depth++;
    2471           0 :                 if (r->datatype) {
    2472           0 :                         ndr_print_string(ndr, "datatype", r->datatype);
    2473             :                 }
    2474           0 :                 ndr->depth--;
    2475           0 :                 ndr->flags = _flags_save_string;
    2476             :         }
    2477             :         {
    2478           0 :                 uint32_t _flags_save_string = ndr->flags;
    2479           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2480           0 :                 ndr_print_ptr(ndr, "parameters", r->parameters);
    2481           0 :                 ndr->depth++;
    2482           0 :                 if (r->parameters) {
    2483           0 :                         ndr_print_string(ndr, "parameters", r->parameters);
    2484             :                 }
    2485           0 :                 ndr->depth--;
    2486           0 :                 ndr->flags = _flags_save_string;
    2487             :         }
    2488             :         {
    2489           0 :                 uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    2490           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2491           0 :                 ndr_print_ptr(ndr, "secdesc", r->secdesc);
    2492           0 :                 ndr->depth++;
    2493           0 :                 if (r->secdesc) {
    2494           0 :                         ndr_print_spoolss_security_descriptor(ndr, "secdesc", r->secdesc);
    2495             :                 }
    2496           0 :                 ndr->depth--;
    2497           0 :                 ndr->flags = _flags_save_spoolss_security_descriptor;
    2498             :         }
    2499           0 :         ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
    2500           0 :         ndr_print_uint32(ndr, "priority", r->priority);
    2501           0 :         ndr_print_uint32(ndr, "defaultpriority", r->defaultpriority);
    2502           0 :         ndr_print_uint32(ndr, "starttime", r->starttime);
    2503           0 :         ndr_print_uint32(ndr, "untiltime", r->untiltime);
    2504           0 :         ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
    2505           0 :         ndr_print_uint32(ndr, "cjobs", r->cjobs);
    2506           0 :         ndr_print_uint32(ndr, "averageppm", r->averageppm);
    2507           0 :         ndr->depth--;
    2508             : }
    2509             : 
    2510           0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo2(const struct spoolss_PrinterInfo2 *r, int flags)
    2511             : {
    2512           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo2);
    2513             : }
    2514             : 
    2515         540 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo3 *r)
    2516             : {
    2517         540 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2518         540 :         if (ndr_flags & NDR_SCALARS) {
    2519         270 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2520             :                 {
    2521         270 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    2522         270 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2523         270 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
    2524         270 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    2525             :                 }
    2526         270 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2527             :         }
    2528         540 :         if (ndr_flags & NDR_BUFFERS) {
    2529             :                 {
    2530         270 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    2531         270 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2532         270 :                         if (r->secdesc) {
    2533         270 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->secdesc));
    2534             :                                 {
    2535             :                                         struct ndr_push *_ndr_secdesc;
    2536         270 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
    2537         270 :                                         NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
    2538         270 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
    2539             :                                 }
    2540         270 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->secdesc));
    2541             :                         }
    2542         270 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    2543             :                 }
    2544             :         }
    2545         540 :         return NDR_ERR_SUCCESS;
    2546             : }
    2547             : 
    2548         184 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo3 *r)
    2549             : {
    2550             :         uint32_t _ptr_secdesc;
    2551         184 :         TALLOC_CTX *_mem_save_secdesc_0 = NULL;
    2552         184 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2553         184 :         if (ndr_flags & NDR_SCALARS) {
    2554          92 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2555             :                 {
    2556          92 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    2557          92 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2558          92 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
    2559          92 :                         if (_ptr_secdesc) {
    2560          92 :                                 NDR_PULL_ALLOC(ndr, r->secdesc);
    2561          92 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
    2562             :                         } else {
    2563           0 :                                 r->secdesc = NULL;
    2564             :                         }
    2565          92 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    2566             :                 }
    2567          92 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2568             :         }
    2569         184 :         if (ndr_flags & NDR_BUFFERS) {
    2570             :                 {
    2571          92 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    2572          92 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2573          92 :                         if (r->secdesc) {
    2574             :                                 uint32_t _relative_save_offset;
    2575          92 :                                 _relative_save_offset = ndr->offset;
    2576          92 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
    2577          92 :                                 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2578          92 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
    2579             :                                 {
    2580             :                                         struct ndr_pull *_ndr_secdesc;
    2581          92 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
    2582          92 :                                         NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
    2583          92 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
    2584             :                                 }
    2585          92 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
    2586          92 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2587          92 :                                         ndr->relative_highest_offset = ndr->offset;
    2588             :                                 }
    2589          92 :                                 ndr->offset = _relative_save_offset;
    2590             :                         }
    2591          92 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    2592             :                 }
    2593             :         }
    2594         184 :         return NDR_ERR_SUCCESS;
    2595             : }
    2596             : 
    2597           0 : static void ndr_print_flags_spoolss_PrinterInfo3(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_PrinterInfo3 *r)
    2598             : {
    2599           0 :         ndr_print_spoolss_PrinterInfo3(ndr, name, r);
    2600           0 : }
    2601             : 
    2602           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo3 *r)
    2603             : {
    2604           0 :         ndr_print_struct(ndr, name, "spoolss_PrinterInfo3");
    2605           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2606           0 :         ndr->depth++;
    2607             :         {
    2608           0 :                 uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    2609           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    2610           0 :                 ndr_print_ptr(ndr, "secdesc", r->secdesc);
    2611           0 :                 ndr->depth++;
    2612           0 :                 if (r->secdesc) {
    2613           0 :                         ndr_print_spoolss_security_descriptor(ndr, "secdesc", r->secdesc);
    2614             :                 }
    2615           0 :                 ndr->depth--;
    2616           0 :                 ndr->flags = _flags_save_spoolss_security_descriptor;
    2617             :         }
    2618           0 :         ndr->depth--;
    2619             : }
    2620             : 
    2621           0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo3(const struct spoolss_PrinterInfo3 *r, int flags)
    2622             : {
    2623           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo3);
    2624             : }
    2625             : 
    2626         492 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo4 *r)
    2627             : {
    2628         492 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2629         492 :         if (ndr_flags & NDR_SCALARS) {
    2630         246 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2631             :                 {
    2632         246 :                         uint32_t _flags_save_string = ndr->flags;
    2633         246 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2634         246 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
    2635         246 :                         ndr->flags = _flags_save_string;
    2636             :                 }
    2637             :                 {
    2638         246 :                         uint32_t _flags_save_string = ndr->flags;
    2639         246 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2640         246 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->servername));
    2641         246 :                         ndr->flags = _flags_save_string;
    2642             :                 }
    2643         246 :                 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
    2644         246 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2645             :         }
    2646         492 :         if (ndr_flags & NDR_BUFFERS) {
    2647             :                 {
    2648         246 :                         uint32_t _flags_save_string = ndr->flags;
    2649         246 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2650         246 :                         if (r->printername) {
    2651         246 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printername));
    2652         246 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
    2653         246 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printername));
    2654             :                         }
    2655         246 :                         ndr->flags = _flags_save_string;
    2656             :                 }
    2657             :                 {
    2658         246 :                         uint32_t _flags_save_string = ndr->flags;
    2659         246 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2660         246 :                         if (r->servername) {
    2661           6 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->servername));
    2662           6 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->servername));
    2663           6 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->servername));
    2664             :                         }
    2665         246 :                         ndr->flags = _flags_save_string;
    2666             :                 }
    2667             :         }
    2668         492 :         return NDR_ERR_SUCCESS;
    2669             : }
    2670             : 
    2671         168 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo4 *r)
    2672             : {
    2673             :         uint32_t _ptr_printername;
    2674         168 :         TALLOC_CTX *_mem_save_printername_0 = NULL;
    2675             :         uint32_t _ptr_servername;
    2676         168 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
    2677         168 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2678         168 :         if (ndr_flags & NDR_SCALARS) {
    2679          84 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2680             :                 {
    2681          84 :                         uint32_t _flags_save_string = ndr->flags;
    2682          84 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2683          84 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
    2684          84 :                         if (_ptr_printername) {
    2685          84 :                                 NDR_PULL_ALLOC(ndr, r->printername);
    2686          84 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
    2687             :                         } else {
    2688           0 :                                 r->printername = NULL;
    2689             :                         }
    2690          84 :                         ndr->flags = _flags_save_string;
    2691             :                 }
    2692             :                 {
    2693          84 :                         uint32_t _flags_save_string = ndr->flags;
    2694          84 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2695          84 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
    2696          84 :                         if (_ptr_servername) {
    2697           4 :                                 NDR_PULL_ALLOC(ndr, r->servername);
    2698           4 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->servername, _ptr_servername));
    2699             :                         } else {
    2700          80 :                                 r->servername = NULL;
    2701             :                         }
    2702          84 :                         ndr->flags = _flags_save_string;
    2703             :                 }
    2704          84 :                 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
    2705          84 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2706             :         }
    2707         168 :         if (ndr_flags & NDR_BUFFERS) {
    2708             :                 {
    2709          84 :                         uint32_t _flags_save_string = ndr->flags;
    2710          84 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2711          84 :                         if (r->printername) {
    2712             :                                 uint32_t _relative_save_offset;
    2713          84 :                                 _relative_save_offset = ndr->offset;
    2714          84 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
    2715          84 :                                 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2716          84 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
    2717          84 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
    2718          84 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
    2719          84 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2720          52 :                                         ndr->relative_highest_offset = ndr->offset;
    2721             :                                 }
    2722          84 :                                 ndr->offset = _relative_save_offset;
    2723             :                         }
    2724          84 :                         ndr->flags = _flags_save_string;
    2725             :                 }
    2726             :                 {
    2727          84 :                         uint32_t _flags_save_string = ndr->flags;
    2728          84 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2729          84 :                         if (r->servername) {
    2730             :                                 uint32_t _relative_save_offset;
    2731           4 :                                 _relative_save_offset = ndr->offset;
    2732           4 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->servername));
    2733           4 :                                 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2734           4 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
    2735           4 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->servername));
    2736           4 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
    2737           4 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2738           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2739             :                                 }
    2740           4 :                                 ndr->offset = _relative_save_offset;
    2741             :                         }
    2742          84 :                         ndr->flags = _flags_save_string;
    2743             :                 }
    2744             :         }
    2745         168 :         return NDR_ERR_SUCCESS;
    2746             : }
    2747             : 
    2748           0 : static void ndr_print_flags_spoolss_PrinterInfo4(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_PrinterInfo4 *r)
    2749             : {
    2750           0 :         ndr_print_spoolss_PrinterInfo4(ndr, name, r);
    2751           0 : }
    2752             : 
    2753           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo4 *r)
    2754             : {
    2755           0 :         ndr_print_struct(ndr, name, "spoolss_PrinterInfo4");
    2756           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2757           0 :         ndr->depth++;
    2758             :         {
    2759           0 :                 uint32_t _flags_save_string = ndr->flags;
    2760           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2761           0 :                 ndr_print_ptr(ndr, "printername", r->printername);
    2762           0 :                 ndr->depth++;
    2763           0 :                 if (r->printername) {
    2764           0 :                         ndr_print_string(ndr, "printername", r->printername);
    2765             :                 }
    2766           0 :                 ndr->depth--;
    2767           0 :                 ndr->flags = _flags_save_string;
    2768             :         }
    2769             :         {
    2770           0 :                 uint32_t _flags_save_string = ndr->flags;
    2771           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2772           0 :                 ndr_print_ptr(ndr, "servername", r->servername);
    2773           0 :                 ndr->depth++;
    2774           0 :                 if (r->servername) {
    2775           0 :                         ndr_print_string(ndr, "servername", r->servername);
    2776             :                 }
    2777           0 :                 ndr->depth--;
    2778           0 :                 ndr->flags = _flags_save_string;
    2779             :         }
    2780           0 :         ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
    2781           0 :         ndr->depth--;
    2782             : }
    2783             : 
    2784           0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo4(const struct spoolss_PrinterInfo4 *r, int flags)
    2785             : {
    2786           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo4);
    2787             : }
    2788             : 
    2789         492 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo5(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo5 *r)
    2790             : {
    2791         492 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2792         492 :         if (ndr_flags & NDR_SCALARS) {
    2793         246 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    2794             :                 {
    2795         246 :                         uint32_t _flags_save_string = ndr->flags;
    2796         246 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2797         246 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printername));
    2798         246 :                         ndr->flags = _flags_save_string;
    2799             :                 }
    2800             :                 {
    2801         246 :                         uint32_t _flags_save_string = ndr->flags;
    2802         246 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2803         246 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->portname));
    2804         246 :                         ndr->flags = _flags_save_string;
    2805             :                 }
    2806         246 :                 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
    2807         246 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->device_not_selected_timeout));
    2808         246 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->transmission_retry_timeout));
    2809         246 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    2810             :         }
    2811         492 :         if (ndr_flags & NDR_BUFFERS) {
    2812             :                 {
    2813         246 :                         uint32_t _flags_save_string = ndr->flags;
    2814         246 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2815         246 :                         if (r->printername) {
    2816         246 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printername));
    2817         246 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printername));
    2818         246 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printername));
    2819             :                         }
    2820         246 :                         ndr->flags = _flags_save_string;
    2821             :                 }
    2822             :                 {
    2823         246 :                         uint32_t _flags_save_string = ndr->flags;
    2824         246 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2825         246 :                         if (r->portname) {
    2826         246 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->portname));
    2827         246 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->portname));
    2828         246 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->portname));
    2829             :                         }
    2830         246 :                         ndr->flags = _flags_save_string;
    2831             :                 }
    2832             :         }
    2833         492 :         return NDR_ERR_SUCCESS;
    2834             : }
    2835             : 
    2836         168 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo5(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo5 *r)
    2837             : {
    2838             :         uint32_t _ptr_printername;
    2839         168 :         TALLOC_CTX *_mem_save_printername_0 = NULL;
    2840             :         uint32_t _ptr_portname;
    2841         168 :         TALLOC_CTX *_mem_save_portname_0 = NULL;
    2842         168 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2843         168 :         if (ndr_flags & NDR_SCALARS) {
    2844          84 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    2845             :                 {
    2846          84 :                         uint32_t _flags_save_string = ndr->flags;
    2847          84 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2848          84 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
    2849          84 :                         if (_ptr_printername) {
    2850          84 :                                 NDR_PULL_ALLOC(ndr, r->printername);
    2851          84 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printername, _ptr_printername));
    2852             :                         } else {
    2853           0 :                                 r->printername = NULL;
    2854             :                         }
    2855          84 :                         ndr->flags = _flags_save_string;
    2856             :                 }
    2857             :                 {
    2858          84 :                         uint32_t _flags_save_string = ndr->flags;
    2859          84 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2860          84 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_portname));
    2861          84 :                         if (_ptr_portname) {
    2862          84 :                                 NDR_PULL_ALLOC(ndr, r->portname);
    2863          84 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->portname, _ptr_portname));
    2864             :                         } else {
    2865           0 :                                 r->portname = NULL;
    2866             :                         }
    2867          84 :                         ndr->flags = _flags_save_string;
    2868             :                 }
    2869          84 :                 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->attributes));
    2870          84 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->device_not_selected_timeout));
    2871          84 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->transmission_retry_timeout));
    2872          84 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    2873             :         }
    2874         168 :         if (ndr_flags & NDR_BUFFERS) {
    2875             :                 {
    2876          84 :                         uint32_t _flags_save_string = ndr->flags;
    2877          84 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2878          84 :                         if (r->printername) {
    2879             :                                 uint32_t _relative_save_offset;
    2880          84 :                                 _relative_save_offset = ndr->offset;
    2881          84 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printername));
    2882          84 :                                 _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2883          84 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
    2884          84 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printername));
    2885          84 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
    2886          84 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2887          52 :                                         ndr->relative_highest_offset = ndr->offset;
    2888             :                                 }
    2889          84 :                                 ndr->offset = _relative_save_offset;
    2890             :                         }
    2891          84 :                         ndr->flags = _flags_save_string;
    2892             :                 }
    2893             :                 {
    2894          84 :                         uint32_t _flags_save_string = ndr->flags;
    2895          84 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2896          84 :                         if (r->portname) {
    2897             :                                 uint32_t _relative_save_offset;
    2898          84 :                                 _relative_save_offset = ndr->offset;
    2899          84 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->portname));
    2900          84 :                                 _mem_save_portname_0 = NDR_PULL_GET_MEM_CTX(ndr);
    2901          84 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->portname, 0);
    2902          84 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->portname));
    2903          84 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_portname_0, 0);
    2904          84 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    2905           0 :                                         ndr->relative_highest_offset = ndr->offset;
    2906             :                                 }
    2907          84 :                                 ndr->offset = _relative_save_offset;
    2908             :                         }
    2909          84 :                         ndr->flags = _flags_save_string;
    2910             :                 }
    2911             :         }
    2912         168 :         return NDR_ERR_SUCCESS;
    2913             : }
    2914             : 
    2915           0 : static void ndr_print_flags_spoolss_PrinterInfo5(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_PrinterInfo5 *r)
    2916             : {
    2917           0 :         ndr_print_spoolss_PrinterInfo5(ndr, name, r);
    2918           0 : }
    2919             : 
    2920           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo5(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo5 *r)
    2921             : {
    2922           0 :         ndr_print_struct(ndr, name, "spoolss_PrinterInfo5");
    2923           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2924           0 :         ndr->depth++;
    2925             :         {
    2926           0 :                 uint32_t _flags_save_string = ndr->flags;
    2927           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2928           0 :                 ndr_print_ptr(ndr, "printername", r->printername);
    2929           0 :                 ndr->depth++;
    2930           0 :                 if (r->printername) {
    2931           0 :                         ndr_print_string(ndr, "printername", r->printername);
    2932             :                 }
    2933           0 :                 ndr->depth--;
    2934           0 :                 ndr->flags = _flags_save_string;
    2935             :         }
    2936             :         {
    2937           0 :                 uint32_t _flags_save_string = ndr->flags;
    2938           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    2939           0 :                 ndr_print_ptr(ndr, "portname", r->portname);
    2940           0 :                 ndr->depth++;
    2941           0 :                 if (r->portname) {
    2942           0 :                         ndr_print_string(ndr, "portname", r->portname);
    2943             :                 }
    2944           0 :                 ndr->depth--;
    2945           0 :                 ndr->flags = _flags_save_string;
    2946             :         }
    2947           0 :         ndr_print_spoolss_PrinterAttributes(ndr, "attributes", r->attributes);
    2948           0 :         ndr_print_uint32(ndr, "device_not_selected_timeout", r->device_not_selected_timeout);
    2949           0 :         ndr_print_uint32(ndr, "transmission_retry_timeout", r->transmission_retry_timeout);
    2950           0 :         ndr->depth--;
    2951             : }
    2952             : 
    2953           0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo5(const struct spoolss_PrinterInfo5 *r, int flags)
    2954             : {
    2955           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo5);
    2956             : }
    2957             : 
    2958         126 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo6(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo6 *r)
    2959             : {
    2960         126 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    2961         126 :         if (ndr_flags & NDR_SCALARS) {
    2962         126 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    2963         126 :                 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
    2964         126 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    2965             :         }
    2966         126 :         if (ndr_flags & NDR_BUFFERS) {
    2967             :         }
    2968         126 :         return NDR_ERR_SUCCESS;
    2969             : }
    2970             : 
    2971          44 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo6(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo6 *r)
    2972             : {
    2973          44 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    2974          44 :         if (ndr_flags & NDR_SCALARS) {
    2975          44 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    2976          44 :                 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
    2977          44 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    2978             :         }
    2979          44 :         if (ndr_flags & NDR_BUFFERS) {
    2980             :         }
    2981          44 :         return NDR_ERR_SUCCESS;
    2982             : }
    2983             : 
    2984           0 : static void ndr_print_flags_spoolss_PrinterInfo6(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_PrinterInfo6 *r)
    2985             : {
    2986           0 :         ndr_print_spoolss_PrinterInfo6(ndr, name, r);
    2987           0 : }
    2988             : 
    2989           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo6(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo6 *r)
    2990             : {
    2991           0 :         ndr_print_struct(ndr, name, "spoolss_PrinterInfo6");
    2992           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    2993           0 :         ndr->depth++;
    2994           0 :         ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
    2995           0 :         ndr->depth--;
    2996             : }
    2997             : 
    2998           0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo6(const struct spoolss_PrinterInfo6 *r, int flags)
    2999             : {
    3000           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo6);
    3001             : }
    3002             : 
    3003         170 : static enum ndr_err_code ndr_push_spoolss_DsPrintAction(struct ndr_push *ndr, int ndr_flags, uint32_t r)
    3004             : {
    3005         170 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
    3006         170 :         return NDR_ERR_SUCCESS;
    3007             : }
    3008             : 
    3009          64 : static enum ndr_err_code ndr_pull_spoolss_DsPrintAction(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
    3010             : {
    3011             :         uint32_t v;
    3012          64 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
    3013          64 :         *r = v;
    3014          64 :         return NDR_ERR_SUCCESS;
    3015             : }
    3016             : 
    3017           0 : _PUBLIC_ void ndr_print_spoolss_DsPrintAction(struct ndr_print *ndr, const char *name, uint32_t r)
    3018             : {
    3019           0 :         ndr_print_uint32(ndr, name, r);
    3020           0 :         ndr->depth++;
    3021           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_PUBLISH", DSPRINT_PUBLISH, r);
    3022           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_UPDATE", DSPRINT_UPDATE, r);
    3023           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_UNPUBLISH", DSPRINT_UNPUBLISH, r);
    3024           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_REPUBLISH", DSPRINT_REPUBLISH, r);
    3025           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DSPRINT_PENDING", DSPRINT_PENDING, r);
    3026           0 :         ndr->depth--;
    3027           0 : }
    3028             : 
    3029         324 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo7(struct ndr_push *ndr, int ndr_flags, const struct spoolss_PrinterInfo7 *r)
    3030             : {
    3031         324 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3032         324 :         if (ndr_flags & NDR_SCALARS) {
    3033         162 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3034             :                 {
    3035         162 :                         uint32_t _flags_save_string = ndr->flags;
    3036         162 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3037         162 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->guid));
    3038         162 :                         ndr->flags = _flags_save_string;
    3039             :                 }
    3040         162 :                 NDR_CHECK(ndr_push_spoolss_DsPrintAction(ndr, NDR_SCALARS, r->action));
    3041         162 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3042             :         }
    3043         324 :         if (ndr_flags & NDR_BUFFERS) {
    3044             :                 {
    3045         162 :                         uint32_t _flags_save_string = ndr->flags;
    3046         162 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3047         162 :                         if (r->guid) {
    3048         162 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->guid));
    3049         162 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->guid));
    3050         162 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->guid));
    3051             :                         }
    3052         162 :                         ndr->flags = _flags_save_string;
    3053             :                 }
    3054             :         }
    3055         324 :         return NDR_ERR_SUCCESS;
    3056             : }
    3057             : 
    3058         112 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo7(struct ndr_pull *ndr, int ndr_flags, struct spoolss_PrinterInfo7 *r)
    3059             : {
    3060             :         uint32_t _ptr_guid;
    3061         112 :         TALLOC_CTX *_mem_save_guid_0 = NULL;
    3062         112 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3063         112 :         if (ndr_flags & NDR_SCALARS) {
    3064          56 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3065             :                 {
    3066          56 :                         uint32_t _flags_save_string = ndr->flags;
    3067          56 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3068          56 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guid));
    3069          56 :                         if (_ptr_guid) {
    3070          56 :                                 NDR_PULL_ALLOC(ndr, r->guid);
    3071          56 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->guid, _ptr_guid));
    3072             :                         } else {
    3073           0 :                                 r->guid = NULL;
    3074             :                         }
    3075          56 :                         ndr->flags = _flags_save_string;
    3076             :                 }
    3077          56 :                 NDR_CHECK(ndr_pull_spoolss_DsPrintAction(ndr, NDR_SCALARS, &r->action));
    3078          56 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3079             :         }
    3080         112 :         if (ndr_flags & NDR_BUFFERS) {
    3081             :                 {
    3082          56 :                         uint32_t _flags_save_string = ndr->flags;
    3083          56 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3084          56 :                         if (r->guid) {
    3085             :                                 uint32_t _relative_save_offset;
    3086          56 :                                 _relative_save_offset = ndr->offset;
    3087          56 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->guid));
    3088          56 :                                 _mem_save_guid_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3089          56 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->guid, 0);
    3090          56 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->guid));
    3091          56 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guid_0, 0);
    3092          56 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    3093          56 :                                         ndr->relative_highest_offset = ndr->offset;
    3094             :                                 }
    3095          56 :                                 ndr->offset = _relative_save_offset;
    3096             :                         }
    3097          56 :                         ndr->flags = _flags_save_string;
    3098             :                 }
    3099             :         }
    3100         112 :         return NDR_ERR_SUCCESS;
    3101             : }
    3102             : 
    3103           0 : static void ndr_print_flags_spoolss_PrinterInfo7(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_PrinterInfo7 *r)
    3104             : {
    3105           0 :         ndr_print_spoolss_PrinterInfo7(ndr, name, r);
    3106           0 : }
    3107             : 
    3108           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo7(struct ndr_print *ndr, const char *name, const struct spoolss_PrinterInfo7 *r)
    3109             : {
    3110           0 :         ndr_print_struct(ndr, name, "spoolss_PrinterInfo7");
    3111           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3112           0 :         ndr->depth++;
    3113             :         {
    3114           0 :                 uint32_t _flags_save_string = ndr->flags;
    3115           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3116           0 :                 ndr_print_ptr(ndr, "guid", r->guid);
    3117           0 :                 ndr->depth++;
    3118           0 :                 if (r->guid) {
    3119           0 :                         ndr_print_string(ndr, "guid", r->guid);
    3120             :                 }
    3121           0 :                 ndr->depth--;
    3122           0 :                 ndr->flags = _flags_save_string;
    3123             :         }
    3124           0 :         ndr_print_spoolss_DsPrintAction(ndr, "action", r->action);
    3125           0 :         ndr->depth--;
    3126             : }
    3127             : 
    3128           0 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo7(const struct spoolss_PrinterInfo7 *r, int flags)
    3129             : {
    3130           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo7);
    3131             : }
    3132             : 
    3133        4992 : static enum ndr_err_code ndr_push_spoolss_DeviceModeInfo(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DeviceModeInfo *r)
    3134             : {
    3135        4992 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3136        4992 :         if (ndr_flags & NDR_SCALARS) {
    3137        2496 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3138             :                 {
    3139        2496 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    3140        2496 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    3141        2496 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
    3142        2496 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    3143             :                 }
    3144        2496 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3145             :         }
    3146        4992 :         if (ndr_flags & NDR_BUFFERS) {
    3147             :                 {
    3148        2496 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    3149        2496 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    3150        2496 :                         if (r->devmode) {
    3151        2484 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->devmode));
    3152             :                                 {
    3153             :                                         struct ndr_push *_ndr_devmode;
    3154        2484 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
    3155        2484 :                                         NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    3156        2484 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
    3157             :                                 }
    3158        2484 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->devmode));
    3159             :                         }
    3160        2496 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    3161             :                 }
    3162             :         }
    3163        4992 :         return NDR_ERR_SUCCESS;
    3164             : }
    3165             : 
    3166        1664 : static enum ndr_err_code ndr_pull_spoolss_DeviceModeInfo(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DeviceModeInfo *r)
    3167             : {
    3168             :         uint32_t _ptr_devmode;
    3169        1664 :         TALLOC_CTX *_mem_save_devmode_0 = NULL;
    3170        1664 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3171        1664 :         if (ndr_flags & NDR_SCALARS) {
    3172         832 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3173             :                 {
    3174         832 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    3175         832 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    3176         832 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
    3177         832 :                         if (_ptr_devmode) {
    3178         828 :                                 NDR_PULL_ALLOC(ndr, r->devmode);
    3179         828 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
    3180             :                         } else {
    3181           4 :                                 r->devmode = NULL;
    3182             :                         }
    3183         832 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    3184             :                 }
    3185         832 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3186             :         }
    3187        1664 :         if (ndr_flags & NDR_BUFFERS) {
    3188             :                 {
    3189         832 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    3190         832 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    3191         832 :                         if (r->devmode) {
    3192             :                                 uint32_t _relative_save_offset;
    3193         828 :                                 _relative_save_offset = ndr->offset;
    3194         828 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
    3195         828 :                                 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3196         828 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
    3197             :                                 {
    3198             :                                         struct ndr_pull *_ndr_devmode;
    3199         828 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
    3200         828 :                                         NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    3201         828 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
    3202             :                                 }
    3203         828 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
    3204         828 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    3205         828 :                                         ndr->relative_highest_offset = ndr->offset;
    3206             :                                 }
    3207         828 :                                 ndr->offset = _relative_save_offset;
    3208             :                         }
    3209         832 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    3210             :                 }
    3211             :         }
    3212        1664 :         return NDR_ERR_SUCCESS;
    3213             : }
    3214             : 
    3215           0 : _PUBLIC_ void ndr_print_spoolss_DeviceModeInfo(struct ndr_print *ndr, const char *name, const struct spoolss_DeviceModeInfo *r)
    3216             : {
    3217           0 :         ndr_print_struct(ndr, name, "spoolss_DeviceModeInfo");
    3218           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3219           0 :         ndr->depth++;
    3220             :         {
    3221           0 :                 uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    3222           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    3223           0 :                 ndr_print_ptr(ndr, "devmode", r->devmode);
    3224           0 :                 ndr->depth++;
    3225           0 :                 if (r->devmode) {
    3226           0 :                         ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
    3227             :                 }
    3228           0 :                 ndr->depth--;
    3229           0 :                 ndr->flags = _flags_save_spoolss_DeviceMode;
    3230             :         }
    3231           0 :         ndr->depth--;
    3232             : }
    3233             : 
    3234        7744 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_PrinterInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_PrinterInfo *r)
    3235             : {
    3236        7744 :         uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
    3237             :         uint32_t level;
    3238             :         {
    3239        7744 :                 uint32_t _flags_save_UNION = ndr->flags;
    3240        7744 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
    3241        7744 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3242        7744 :                 if (ndr_flags & NDR_SCALARS) {
    3243             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3244        6462 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3245        6462 :                         NDR_CHECK(ndr_push_union_align(ndr, 5));
    3246        6462 :                         switch (level) {
    3247         410 :                                 case 0: {
    3248         410 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3249         410 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3250         410 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr, NDR_SCALARS, &r->info0));
    3251         410 :                                 break; }
    3252             : 
    3253         658 :                                 case 1: {
    3254         658 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3255         658 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3256         658 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1));
    3257         658 :                                 break; }
    3258             : 
    3259        1848 :                                 case 2: {
    3260        1848 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3261        1848 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3262        1848 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2));
    3263        1848 :                                 break; }
    3264             : 
    3265         270 :                                 case 3: {
    3266         270 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3267         270 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3268         270 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3));
    3269         270 :                                 break; }
    3270             : 
    3271         246 :                                 case 4: {
    3272         246 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3273         246 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3274         246 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4));
    3275         246 :                                 break; }
    3276             : 
    3277         246 :                                 case 5: {
    3278         246 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3279         246 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3280         246 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5));
    3281         246 :                                 break; }
    3282             : 
    3283         126 :                                 case 6: {
    3284         126 :                                         NDR_CHECK(ndr_push_align(ndr, 4));
    3285         126 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3286         126 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6));
    3287         126 :                                 break; }
    3288             : 
    3289         162 :                                 case 7: {
    3290         162 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3291         162 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3292         162 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7));
    3293         162 :                                 break; }
    3294             : 
    3295        2496 :                                 case 8: {
    3296        2496 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3297        2496 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3298        2496 :                                         NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info8));
    3299        2496 :                                 break; }
    3300             : 
    3301           0 :                                 case 9: {
    3302           0 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    3303           0 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    3304           0 :                                         NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info9));
    3305           0 :                                 break; }
    3306             : 
    3307           0 :                                 default: {
    3308           0 :                                 break; }
    3309             : 
    3310             :                         }
    3311         928 :                 }
    3312        7744 :                 if (ndr_flags & NDR_BUFFERS) {
    3313        6462 :                         if (!(ndr_flags & NDR_SCALARS)) {
    3314             :                                 /* We didn't get it above, and the token is not needed after this. */
    3315        1282 :                                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    3316             :                         }
    3317        6462 :                         NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
    3318        6462 :                         switch (level) {
    3319         410 :                                 case 0:
    3320         410 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo0(ndr, NDR_BUFFERS, &r->info0));
    3321         410 :                                 break;
    3322             : 
    3323         658 :                                 case 1:
    3324         658 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1));
    3325         658 :                                 break;
    3326             : 
    3327        1848 :                                 case 2:
    3328        1848 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2));
    3329        1848 :                                 break;
    3330             : 
    3331         270 :                                 case 3:
    3332         270 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3));
    3333         270 :                                 break;
    3334             : 
    3335         246 :                                 case 4:
    3336         246 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4));
    3337         246 :                                 break;
    3338             : 
    3339         246 :                                 case 5:
    3340         246 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5));
    3341         246 :                                 break;
    3342             : 
    3343         126 :                                 case 6:
    3344         126 :                                 break;
    3345             : 
    3346         162 :                                 case 7:
    3347         162 :                                         NDR_CHECK(ndr_push_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7));
    3348         162 :                                 break;
    3349             : 
    3350        2496 :                                 case 8:
    3351        2496 :                                         NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info8));
    3352        2496 :                                 break;
    3353             : 
    3354           0 :                                 case 9:
    3355           0 :                                         NDR_CHECK(ndr_push_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info9));
    3356           0 :                                 break;
    3357             : 
    3358           0 :                                 default:
    3359           0 :                                 break;
    3360             : 
    3361             :                         }
    3362         928 :                 }
    3363        7744 :                 ndr->flags = _flags_save_UNION;
    3364             :         }
    3365        7744 :         ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
    3366        7744 :         return NDR_ERR_SUCCESS;
    3367             : }
    3368             : 
    3369        2658 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_PrinterInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_PrinterInfo *r)
    3370             : {
    3371        2658 :         uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
    3372             :         uint32_t level;
    3373             :         {
    3374        2658 :                 uint32_t _flags_save_UNION = ndr->flags;
    3375        2658 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
    3376        2658 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3377        2658 :                 if (ndr_flags & NDR_SCALARS) {
    3378             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    3379        2203 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3380        2203 :                         NDR_CHECK(ndr_pull_union_align(ndr, 5));
    3381        2203 :                         switch (level) {
    3382         140 :                                 case 0: {
    3383         140 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3384         140 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3385         140 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr, NDR_SCALARS, &r->info0));
    3386         140 :                                 break; }
    3387             : 
    3388         259 :                                 case 1: {
    3389         259 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3390         259 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3391         259 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_SCALARS, &r->info1));
    3392         259 :                                 break; }
    3393             : 
    3394         612 :                                 case 2: {
    3395         612 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3396         612 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3397         612 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_SCALARS, &r->info2));
    3398         612 :                                 break; }
    3399             : 
    3400          92 :                                 case 3: {
    3401          92 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3402          92 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3403          92 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_SCALARS, &r->info3));
    3404          92 :                                 break; }
    3405             : 
    3406          84 :                                 case 4: {
    3407          84 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3408          84 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3409          84 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_SCALARS, &r->info4));
    3410          84 :                                 break; }
    3411             : 
    3412          84 :                                 case 5: {
    3413          84 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3414          84 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3415          84 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr, NDR_SCALARS, &r->info5));
    3416          84 :                                 break; }
    3417             : 
    3418          44 :                                 case 6: {
    3419          44 :                                         NDR_CHECK(ndr_pull_align(ndr, 4));
    3420          44 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3421          44 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo6(ndr, NDR_SCALARS, &r->info6));
    3422          44 :                                 break; }
    3423             : 
    3424          56 :                                 case 7: {
    3425          56 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3426          56 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3427          56 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr, NDR_SCALARS, &r->info7));
    3428          56 :                                 break; }
    3429             : 
    3430         832 :                                 case 8: {
    3431         832 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3432         832 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3433         832 :                                         NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info8));
    3434         832 :                                 break; }
    3435             : 
    3436           0 :                                 case 9: {
    3437           0 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    3438           0 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    3439           0 :                                         NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_SCALARS, &r->info9));
    3440           0 :                                 break; }
    3441             : 
    3442           0 :                                 default: {
    3443           0 :                                 break; }
    3444             : 
    3445             :                         }
    3446         342 :                 }
    3447        2658 :                 if (ndr_flags & NDR_BUFFERS) {
    3448        2203 :                         if (!(ndr_flags & NDR_SCALARS)) {
    3449             :                                 /* We didn't get it above, and the token is not needed after this. */
    3450         455 :                                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    3451             :                         }
    3452        2203 :                         switch (level) {
    3453         140 :                                 case 0:
    3454         140 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3455         140 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo0(ndr, NDR_BUFFERS, &r->info0));
    3456         140 :                                 break;
    3457             : 
    3458         259 :                                 case 1:
    3459         259 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3460         259 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo1(ndr, NDR_BUFFERS, &r->info1));
    3461         259 :                                 break;
    3462             : 
    3463         612 :                                 case 2:
    3464         612 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3465         612 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo2(ndr, NDR_BUFFERS, &r->info2));
    3466         612 :                                 break;
    3467             : 
    3468          92 :                                 case 3:
    3469          92 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3470          92 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo3(ndr, NDR_BUFFERS, &r->info3));
    3471          92 :                                 break;
    3472             : 
    3473          84 :                                 case 4:
    3474          84 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3475          84 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo4(ndr, NDR_BUFFERS, &r->info4));
    3476          84 :                                 break;
    3477             : 
    3478          84 :                                 case 5:
    3479          84 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3480          84 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo5(ndr, NDR_BUFFERS, &r->info5));
    3481          84 :                                 break;
    3482             : 
    3483          44 :                                 case 6:
    3484          44 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3485          44 :                                 break;
    3486             : 
    3487          56 :                                 case 7:
    3488          56 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3489          56 :                                         NDR_CHECK(ndr_pull_spoolss_PrinterInfo7(ndr, NDR_BUFFERS, &r->info7));
    3490          56 :                                 break;
    3491             : 
    3492         832 :                                 case 8:
    3493         832 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3494         832 :                                         NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info8));
    3495         832 :                                 break;
    3496             : 
    3497           0 :                                 case 9:
    3498           0 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    3499           0 :                                         NDR_CHECK(ndr_pull_spoolss_DeviceModeInfo(ndr, NDR_BUFFERS, &r->info9));
    3500           0 :                                 break;
    3501             : 
    3502           0 :                                 default:
    3503           0 :                                 break;
    3504             : 
    3505             :                         }
    3506         342 :                 }
    3507        2658 :                 ndr->flags = _flags_save_UNION;
    3508             :         }
    3509        2658 :         ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
    3510        2658 :         return NDR_ERR_SUCCESS;
    3511             : }
    3512             : 
    3513           0 : _PUBLIC_ void ndr_print_spoolss_PrinterInfo(struct ndr_print *ndr, const char *name, const union spoolss_PrinterInfo *r)
    3514             : {
    3515             :         uint32_t level;
    3516             :         {
    3517           0 :                 uint32_t _flags_save_UNION = ndr->flags;
    3518           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
    3519           0 :                 level = ndr_print_steal_switch_value(ndr, r);
    3520           0 :                 ndr_print_union(ndr, name, level, "spoolss_PrinterInfo");
    3521           0 :                 switch (level) {
    3522           0 :                         case 0:
    3523           0 :                                 ndr_print_spoolss_PrinterInfo0(ndr, "info0", &r->info0);
    3524           0 :                         break;
    3525             : 
    3526           0 :                         case 1:
    3527           0 :                                 ndr_print_spoolss_PrinterInfo1(ndr, "info1", &r->info1);
    3528           0 :                         break;
    3529             : 
    3530           0 :                         case 2:
    3531           0 :                                 ndr_print_spoolss_PrinterInfo2(ndr, "info2", &r->info2);
    3532           0 :                         break;
    3533             : 
    3534           0 :                         case 3:
    3535           0 :                                 ndr_print_spoolss_PrinterInfo3(ndr, "info3", &r->info3);
    3536           0 :                         break;
    3537             : 
    3538           0 :                         case 4:
    3539           0 :                                 ndr_print_spoolss_PrinterInfo4(ndr, "info4", &r->info4);
    3540           0 :                         break;
    3541             : 
    3542           0 :                         case 5:
    3543           0 :                                 ndr_print_spoolss_PrinterInfo5(ndr, "info5", &r->info5);
    3544           0 :                         break;
    3545             : 
    3546           0 :                         case 6:
    3547           0 :                                 ndr_print_spoolss_PrinterInfo6(ndr, "info6", &r->info6);
    3548           0 :                         break;
    3549             : 
    3550           0 :                         case 7:
    3551           0 :                                 ndr_print_spoolss_PrinterInfo7(ndr, "info7", &r->info7);
    3552           0 :                         break;
    3553             : 
    3554           0 :                         case 8:
    3555           0 :                                 ndr_print_spoolss_DeviceModeInfo(ndr, "info8", &r->info8);
    3556           0 :                         break;
    3557             : 
    3558           0 :                         case 9:
    3559           0 :                                 ndr_print_spoolss_DeviceModeInfo(ndr, "info9", &r->info9);
    3560           0 :                         break;
    3561             : 
    3562           0 :                         default:
    3563           0 :                         break;
    3564             : 
    3565             :                 }
    3566           0 :                 ndr->flags = _flags_save_UNION;
    3567             :         }
    3568           0 : }
    3569             : 
    3570        3448 : _PUBLIC_ size_t ndr_size_spoolss_PrinterInfo(const union spoolss_PrinterInfo *r, uint32_t level, int flags)
    3571             : {
    3572        3448 :         flags |= LIBNDR_FLAG_RELATIVE_REVERSE;
    3573        3448 :         return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_PrinterInfo);
    3574             : }
    3575             : 
    3576        1662 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_DevmodeContainer(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DevmodeContainer *r)
    3577             : {
    3578        1662 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3579        1662 :         if (ndr_flags & NDR_SCALARS) {
    3580        1662 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3581        1662 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->flags)));
    3582        1662 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devmode));
    3583        1662 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3584             :         }
    3585        1662 :         if (ndr_flags & NDR_BUFFERS) {
    3586        1662 :                 if (r->devmode) {
    3587             :                         {
    3588             :                                 struct ndr_push *_ndr_devmode;
    3589         312 :                                 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 4, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->flags)));
    3590         312 :                                 NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    3591         312 :                                 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 4, _ndr_size_spoolss_DeviceMode(r->devmode, ndr->flags)));
    3592             :                         }
    3593             :                 }
    3594             :         }
    3595        1662 :         return NDR_ERR_SUCCESS;
    3596             : }
    3597             : 
    3598        1650 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DevmodeContainer(struct ndr_pull *ndr, int ndr_flags, struct spoolss_DevmodeContainer *r)
    3599             : {
    3600             :         uint32_t _ptr_devmode;
    3601        1650 :         TALLOC_CTX *_mem_save_devmode_0 = NULL;
    3602        1650 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3603        1650 :         if (ndr_flags & NDR_SCALARS) {
    3604        1650 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3605        1650 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->_ndr_size));
    3606        1650 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
    3607        1650 :                 if (_ptr_devmode) {
    3608         316 :                         NDR_PULL_ALLOC(ndr, r->devmode);
    3609             :                 } else {
    3610        1334 :                         r->devmode = NULL;
    3611             :                 }
    3612        1650 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3613             :         }
    3614        1650 :         if (ndr_flags & NDR_BUFFERS) {
    3615        1650 :                 if (r->devmode) {
    3616         316 :                         _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3617         316 :                         NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
    3618             :                         {
    3619             :                                 struct ndr_pull *_ndr_devmode;
    3620         316 :                                 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 4, r->_ndr_size));
    3621         316 :                                 NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    3622         316 :                                 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 4, r->_ndr_size));
    3623             :                         }
    3624         316 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
    3625             :                 }
    3626             :         }
    3627        1630 :         return NDR_ERR_SUCCESS;
    3628             : }
    3629             : 
    3630           0 : static void ndr_print_flags_spoolss_DevmodeContainer(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_DevmodeContainer *r)
    3631             : {
    3632           0 :         ndr_print_spoolss_DevmodeContainer(ndr, name, r);
    3633           0 : }
    3634             : 
    3635          20 : _PUBLIC_ void ndr_print_spoolss_DevmodeContainer(struct ndr_print *ndr, const char *name, const struct spoolss_DevmodeContainer *r)
    3636             : {
    3637          20 :         ndr_print_struct(ndr, name, "spoolss_DevmodeContainer");
    3638          20 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3639          20 :         ndr->depth++;
    3640          20 :         ndr_print_uint32(ndr, "_ndr_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?_ndr_size_spoolss_DeviceMode(r->devmode, ndr->flags):r->_ndr_size);
    3641          20 :         ndr_print_ptr(ndr, "devmode", r->devmode);
    3642          20 :         ndr->depth++;
    3643          20 :         if (r->devmode) {
    3644           4 :                 ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
    3645             :         }
    3646          20 :         ndr->depth--;
    3647          20 :         ndr->depth--;
    3648             : }
    3649             : 
    3650         960 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfo1 *r)
    3651             : {
    3652         960 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    3653         960 :         if (ndr_flags & NDR_SCALARS) {
    3654         480 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    3655         480 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
    3656             :                 {
    3657         480 :                         uint32_t _flags_save_string = ndr->flags;
    3658         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3659         480 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
    3660         480 :                         ndr->flags = _flags_save_string;
    3661             :                 }
    3662             :                 {
    3663         480 :                         uint32_t _flags_save_string = ndr->flags;
    3664         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3665         480 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
    3666         480 :                         ndr->flags = _flags_save_string;
    3667             :                 }
    3668             :                 {
    3669         480 :                         uint32_t _flags_save_string = ndr->flags;
    3670         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3671         480 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
    3672         480 :                         ndr->flags = _flags_save_string;
    3673             :                 }
    3674             :                 {
    3675         480 :                         uint32_t _flags_save_string = ndr->flags;
    3676         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3677         480 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
    3678         480 :                         ndr->flags = _flags_save_string;
    3679             :                 }
    3680             :                 {
    3681         480 :                         uint32_t _flags_save_string = ndr->flags;
    3682         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3683         480 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
    3684         480 :                         ndr->flags = _flags_save_string;
    3685             :                 }
    3686             :                 {
    3687         480 :                         uint32_t _flags_save_string = ndr->flags;
    3688         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3689         480 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
    3690         480 :                         ndr->flags = _flags_save_string;
    3691             :                 }
    3692         480 :                 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
    3693         480 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
    3694         480 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
    3695         480 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
    3696         480 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
    3697         480 :                 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    3698         480 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    3699             :         }
    3700         960 :         if (ndr_flags & NDR_BUFFERS) {
    3701             :                 {
    3702         480 :                         uint32_t _flags_save_string = ndr->flags;
    3703         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3704         480 :                         if (r->printer_name) {
    3705         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printer_name));
    3706         480 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
    3707         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printer_name));
    3708             :                         }
    3709         480 :                         ndr->flags = _flags_save_string;
    3710             :                 }
    3711             :                 {
    3712         480 :                         uint32_t _flags_save_string = ndr->flags;
    3713         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3714         480 :                         if (r->server_name) {
    3715         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->server_name));
    3716         480 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
    3717         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->server_name));
    3718             :                         }
    3719         480 :                         ndr->flags = _flags_save_string;
    3720             :                 }
    3721             :                 {
    3722         480 :                         uint32_t _flags_save_string = ndr->flags;
    3723         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3724         480 :                         if (r->user_name) {
    3725         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->user_name));
    3726         480 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
    3727         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->user_name));
    3728             :                         }
    3729         480 :                         ndr->flags = _flags_save_string;
    3730             :                 }
    3731             :                 {
    3732         480 :                         uint32_t _flags_save_string = ndr->flags;
    3733         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3734         480 :                         if (r->document_name) {
    3735         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->document_name));
    3736         480 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
    3737         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->document_name));
    3738             :                         }
    3739         480 :                         ndr->flags = _flags_save_string;
    3740             :                 }
    3741             :                 {
    3742         480 :                         uint32_t _flags_save_string = ndr->flags;
    3743         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3744         480 :                         if (r->data_type) {
    3745         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_type));
    3746         480 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
    3747         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_type));
    3748             :                         }
    3749         480 :                         ndr->flags = _flags_save_string;
    3750             :                 }
    3751             :                 {
    3752         480 :                         uint32_t _flags_save_string = ndr->flags;
    3753         480 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3754         480 :                         if (r->text_status) {
    3755         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->text_status));
    3756         480 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
    3757         480 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->text_status));
    3758             :                         }
    3759         480 :                         ndr->flags = _flags_save_string;
    3760             :                 }
    3761             :         }
    3762         960 :         return NDR_ERR_SUCCESS;
    3763             : }
    3764             : 
    3765         320 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfo1 *r)
    3766             : {
    3767             :         uint32_t _ptr_printer_name;
    3768         320 :         TALLOC_CTX *_mem_save_printer_name_0 = NULL;
    3769             :         uint32_t _ptr_server_name;
    3770         320 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    3771             :         uint32_t _ptr_user_name;
    3772         320 :         TALLOC_CTX *_mem_save_user_name_0 = NULL;
    3773             :         uint32_t _ptr_document_name;
    3774         320 :         TALLOC_CTX *_mem_save_document_name_0 = NULL;
    3775             :         uint32_t _ptr_data_type;
    3776         320 :         TALLOC_CTX *_mem_save_data_type_0 = NULL;
    3777             :         uint32_t _ptr_text_status;
    3778         320 :         TALLOC_CTX *_mem_save_text_status_0 = NULL;
    3779         320 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    3780         320 :         if (ndr_flags & NDR_SCALARS) {
    3781         160 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    3782         160 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
    3783             :                 {
    3784         160 :                         uint32_t _flags_save_string = ndr->flags;
    3785         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3786         160 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
    3787         160 :                         if (_ptr_printer_name) {
    3788         160 :                                 NDR_PULL_ALLOC(ndr, r->printer_name);
    3789         160 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
    3790             :                         } else {
    3791           0 :                                 r->printer_name = NULL;
    3792             :                         }
    3793         160 :                         ndr->flags = _flags_save_string;
    3794             :                 }
    3795             :                 {
    3796         160 :                         uint32_t _flags_save_string = ndr->flags;
    3797         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3798         160 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    3799         160 :                         if (_ptr_server_name) {
    3800         160 :                                 NDR_PULL_ALLOC(ndr, r->server_name);
    3801         160 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
    3802             :                         } else {
    3803           0 :                                 r->server_name = NULL;
    3804             :                         }
    3805         160 :                         ndr->flags = _flags_save_string;
    3806             :                 }
    3807             :                 {
    3808         160 :                         uint32_t _flags_save_string = ndr->flags;
    3809         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3810         160 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
    3811         160 :                         if (_ptr_user_name) {
    3812         160 :                                 NDR_PULL_ALLOC(ndr, r->user_name);
    3813         160 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
    3814             :                         } else {
    3815           0 :                                 r->user_name = NULL;
    3816             :                         }
    3817         160 :                         ndr->flags = _flags_save_string;
    3818             :                 }
    3819             :                 {
    3820         160 :                         uint32_t _flags_save_string = ndr->flags;
    3821         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3822         160 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
    3823         160 :                         if (_ptr_document_name) {
    3824         160 :                                 NDR_PULL_ALLOC(ndr, r->document_name);
    3825         160 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
    3826             :                         } else {
    3827           0 :                                 r->document_name = NULL;
    3828             :                         }
    3829         160 :                         ndr->flags = _flags_save_string;
    3830             :                 }
    3831             :                 {
    3832         160 :                         uint32_t _flags_save_string = ndr->flags;
    3833         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3834         160 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
    3835         160 :                         if (_ptr_data_type) {
    3836         160 :                                 NDR_PULL_ALLOC(ndr, r->data_type);
    3837         160 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
    3838             :                         } else {
    3839           0 :                                 r->data_type = NULL;
    3840             :                         }
    3841         160 :                         ndr->flags = _flags_save_string;
    3842             :                 }
    3843             :                 {
    3844         160 :                         uint32_t _flags_save_string = ndr->flags;
    3845         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3846         160 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
    3847         160 :                         if (_ptr_text_status) {
    3848         160 :                                 NDR_PULL_ALLOC(ndr, r->text_status);
    3849         160 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
    3850             :                         } else {
    3851           0 :                                 r->text_status = NULL;
    3852             :                         }
    3853         160 :                         ndr->flags = _flags_save_string;
    3854             :                 }
    3855         160 :                 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
    3856         160 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
    3857         160 :                 if (r->priority > 99) {
    3858           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    3859             :                 }
    3860         160 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
    3861         160 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
    3862         160 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
    3863         160 :                 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    3864         160 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    3865             :         }
    3866         320 :         if (ndr_flags & NDR_BUFFERS) {
    3867             :                 {
    3868         160 :                         uint32_t _flags_save_string = ndr->flags;
    3869         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3870         160 :                         if (r->printer_name) {
    3871             :                                 uint32_t _relative_save_offset;
    3872         160 :                                 _relative_save_offset = ndr->offset;
    3873         160 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
    3874         160 :                                 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3875         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
    3876         160 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
    3877         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
    3878         160 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    3879          76 :                                         ndr->relative_highest_offset = ndr->offset;
    3880             :                                 }
    3881         160 :                                 ndr->offset = _relative_save_offset;
    3882             :                         }
    3883         160 :                         ndr->flags = _flags_save_string;
    3884             :                 }
    3885             :                 {
    3886         160 :                         uint32_t _flags_save_string = ndr->flags;
    3887         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3888         160 :                         if (r->server_name) {
    3889             :                                 uint32_t _relative_save_offset;
    3890         160 :                                 _relative_save_offset = ndr->offset;
    3891         160 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
    3892         160 :                                 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3893         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    3894         160 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
    3895         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    3896         160 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    3897           0 :                                         ndr->relative_highest_offset = ndr->offset;
    3898             :                                 }
    3899         160 :                                 ndr->offset = _relative_save_offset;
    3900             :                         }
    3901         160 :                         ndr->flags = _flags_save_string;
    3902             :                 }
    3903             :                 {
    3904         160 :                         uint32_t _flags_save_string = ndr->flags;
    3905         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3906         160 :                         if (r->user_name) {
    3907             :                                 uint32_t _relative_save_offset;
    3908         160 :                                 _relative_save_offset = ndr->offset;
    3909         160 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
    3910         160 :                                 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3911         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
    3912         160 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
    3913         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
    3914         160 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    3915           0 :                                         ndr->relative_highest_offset = ndr->offset;
    3916             :                                 }
    3917         160 :                                 ndr->offset = _relative_save_offset;
    3918             :                         }
    3919         160 :                         ndr->flags = _flags_save_string;
    3920             :                 }
    3921             :                 {
    3922         160 :                         uint32_t _flags_save_string = ndr->flags;
    3923         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3924         160 :                         if (r->document_name) {
    3925             :                                 uint32_t _relative_save_offset;
    3926         160 :                                 _relative_save_offset = ndr->offset;
    3927         160 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
    3928         160 :                                 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3929         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
    3930         160 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
    3931         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
    3932         160 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    3933           0 :                                         ndr->relative_highest_offset = ndr->offset;
    3934             :                                 }
    3935         160 :                                 ndr->offset = _relative_save_offset;
    3936             :                         }
    3937         160 :                         ndr->flags = _flags_save_string;
    3938             :                 }
    3939             :                 {
    3940         160 :                         uint32_t _flags_save_string = ndr->flags;
    3941         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3942         160 :                         if (r->data_type) {
    3943             :                                 uint32_t _relative_save_offset;
    3944         160 :                                 _relative_save_offset = ndr->offset;
    3945         160 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
    3946         160 :                                 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3947         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
    3948         160 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
    3949         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
    3950         160 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    3951           0 :                                         ndr->relative_highest_offset = ndr->offset;
    3952             :                                 }
    3953         160 :                                 ndr->offset = _relative_save_offset;
    3954             :                         }
    3955         160 :                         ndr->flags = _flags_save_string;
    3956             :                 }
    3957             :                 {
    3958         160 :                         uint32_t _flags_save_string = ndr->flags;
    3959         160 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3960         160 :                         if (r->text_status) {
    3961             :                                 uint32_t _relative_save_offset;
    3962         160 :                                 _relative_save_offset = ndr->offset;
    3963         160 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
    3964         160 :                                 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
    3965         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
    3966         160 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
    3967         160 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
    3968         160 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    3969           0 :                                         ndr->relative_highest_offset = ndr->offset;
    3970             :                                 }
    3971         160 :                                 ndr->offset = _relative_save_offset;
    3972             :                         }
    3973         160 :                         ndr->flags = _flags_save_string;
    3974             :                 }
    3975             :         }
    3976         320 :         return NDR_ERR_SUCCESS;
    3977             : }
    3978             : 
    3979           0 : static void ndr_print_flags_spoolss_JobInfo1(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_JobInfo1 *r)
    3980             : {
    3981           0 :         ndr_print_spoolss_JobInfo1(ndr, name, r);
    3982           0 : }
    3983             : 
    3984           0 : _PUBLIC_ void ndr_print_spoolss_JobInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo1 *r)
    3985             : {
    3986           0 :         ndr_print_struct(ndr, name, "spoolss_JobInfo1");
    3987           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    3988           0 :         ndr->depth++;
    3989           0 :         ndr_print_uint32(ndr, "job_id", r->job_id);
    3990             :         {
    3991           0 :                 uint32_t _flags_save_string = ndr->flags;
    3992           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    3993           0 :                 ndr_print_ptr(ndr, "printer_name", r->printer_name);
    3994           0 :                 ndr->depth++;
    3995           0 :                 if (r->printer_name) {
    3996           0 :                         ndr_print_string(ndr, "printer_name", r->printer_name);
    3997             :                 }
    3998           0 :                 ndr->depth--;
    3999           0 :                 ndr->flags = _flags_save_string;
    4000             :         }
    4001             :         {
    4002           0 :                 uint32_t _flags_save_string = ndr->flags;
    4003           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4004           0 :                 ndr_print_ptr(ndr, "server_name", r->server_name);
    4005           0 :                 ndr->depth++;
    4006           0 :                 if (r->server_name) {
    4007           0 :                         ndr_print_string(ndr, "server_name", r->server_name);
    4008             :                 }
    4009           0 :                 ndr->depth--;
    4010           0 :                 ndr->flags = _flags_save_string;
    4011             :         }
    4012             :         {
    4013           0 :                 uint32_t _flags_save_string = ndr->flags;
    4014           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4015           0 :                 ndr_print_ptr(ndr, "user_name", r->user_name);
    4016           0 :                 ndr->depth++;
    4017           0 :                 if (r->user_name) {
    4018           0 :                         ndr_print_string(ndr, "user_name", r->user_name);
    4019             :                 }
    4020           0 :                 ndr->depth--;
    4021           0 :                 ndr->flags = _flags_save_string;
    4022             :         }
    4023             :         {
    4024           0 :                 uint32_t _flags_save_string = ndr->flags;
    4025           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4026           0 :                 ndr_print_ptr(ndr, "document_name", r->document_name);
    4027           0 :                 ndr->depth++;
    4028           0 :                 if (r->document_name) {
    4029           0 :                         ndr_print_string(ndr, "document_name", r->document_name);
    4030             :                 }
    4031           0 :                 ndr->depth--;
    4032           0 :                 ndr->flags = _flags_save_string;
    4033             :         }
    4034             :         {
    4035           0 :                 uint32_t _flags_save_string = ndr->flags;
    4036           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4037           0 :                 ndr_print_ptr(ndr, "data_type", r->data_type);
    4038           0 :                 ndr->depth++;
    4039           0 :                 if (r->data_type) {
    4040           0 :                         ndr_print_string(ndr, "data_type", r->data_type);
    4041             :                 }
    4042           0 :                 ndr->depth--;
    4043           0 :                 ndr->flags = _flags_save_string;
    4044             :         }
    4045             :         {
    4046           0 :                 uint32_t _flags_save_string = ndr->flags;
    4047           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4048           0 :                 ndr_print_ptr(ndr, "text_status", r->text_status);
    4049           0 :                 ndr->depth++;
    4050           0 :                 if (r->text_status) {
    4051           0 :                         ndr_print_string(ndr, "text_status", r->text_status);
    4052             :                 }
    4053           0 :                 ndr->depth--;
    4054           0 :                 ndr->flags = _flags_save_string;
    4055             :         }
    4056           0 :         ndr_print_spoolss_JobStatus(ndr, "status", r->status);
    4057           0 :         ndr_print_uint32(ndr, "priority", r->priority);
    4058           0 :         ndr_print_uint32(ndr, "position", r->position);
    4059           0 :         ndr_print_uint32(ndr, "total_pages", r->total_pages);
    4060           0 :         ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
    4061           0 :         ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
    4062           0 :         ndr->depth--;
    4063             : }
    4064             : 
    4065           0 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo1(const struct spoolss_JobInfo1 *r, int flags)
    4066             : {
    4067           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo1);
    4068             : }
    4069             : 
    4070         192 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfo2 *r)
    4071             : {
    4072         192 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4073         192 :         if (ndr_flags & NDR_SCALARS) {
    4074          96 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4075          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
    4076             :                 {
    4077          96 :                         uint32_t _flags_save_string = ndr->flags;
    4078          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4079          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
    4080          96 :                         ndr->flags = _flags_save_string;
    4081             :                 }
    4082             :                 {
    4083          96 :                         uint32_t _flags_save_string = ndr->flags;
    4084          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4085          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
    4086          96 :                         ndr->flags = _flags_save_string;
    4087             :                 }
    4088             :                 {
    4089          96 :                         uint32_t _flags_save_string = ndr->flags;
    4090          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4091          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
    4092          96 :                         ndr->flags = _flags_save_string;
    4093             :                 }
    4094             :                 {
    4095          96 :                         uint32_t _flags_save_string = ndr->flags;
    4096          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4097          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
    4098          96 :                         ndr->flags = _flags_save_string;
    4099             :                 }
    4100             :                 {
    4101          96 :                         uint32_t _flags_save_string = ndr->flags;
    4102          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4103          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->notify_name));
    4104          96 :                         ndr->flags = _flags_save_string;
    4105             :                 }
    4106             :                 {
    4107          96 :                         uint32_t _flags_save_string = ndr->flags;
    4108          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4109          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
    4110          96 :                         ndr->flags = _flags_save_string;
    4111             :                 }
    4112             :                 {
    4113          96 :                         uint32_t _flags_save_string = ndr->flags;
    4114          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4115          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor));
    4116          96 :                         ndr->flags = _flags_save_string;
    4117             :                 }
    4118             :                 {
    4119          96 :                         uint32_t _flags_save_string = ndr->flags;
    4120          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4121          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters));
    4122          96 :                         ndr->flags = _flags_save_string;
    4123             :                 }
    4124             :                 {
    4125          96 :                         uint32_t _flags_save_string = ndr->flags;
    4126          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4127          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
    4128          96 :                         ndr->flags = _flags_save_string;
    4129             :                 }
    4130             :                 {
    4131          96 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    4132          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4133          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
    4134          96 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    4135             :                 }
    4136             :                 {
    4137          96 :                         uint32_t _flags_save_string = ndr->flags;
    4138          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4139          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
    4140          96 :                         ndr->flags = _flags_save_string;
    4141             :                 }
    4142             :                 {
    4143          96 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    4144          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4145          96 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
    4146          96 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    4147             :                 }
    4148          96 :                 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
    4149          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
    4150          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
    4151          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
    4152          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
    4153          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
    4154          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
    4155          96 :                 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    4156          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
    4157          96 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
    4158          96 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    4159             :         }
    4160         192 :         if (ndr_flags & NDR_BUFFERS) {
    4161             :                 {
    4162          96 :                         uint32_t _flags_save_string = ndr->flags;
    4163          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4164          96 :                         if (r->printer_name) {
    4165          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printer_name));
    4166          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
    4167          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printer_name));
    4168             :                         }
    4169          96 :                         ndr->flags = _flags_save_string;
    4170             :                 }
    4171             :                 {
    4172          96 :                         uint32_t _flags_save_string = ndr->flags;
    4173          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4174          96 :                         if (r->server_name) {
    4175          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->server_name));
    4176          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
    4177          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->server_name));
    4178             :                         }
    4179          96 :                         ndr->flags = _flags_save_string;
    4180             :                 }
    4181             :                 {
    4182          96 :                         uint32_t _flags_save_string = ndr->flags;
    4183          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4184          96 :                         if (r->user_name) {
    4185          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->user_name));
    4186          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
    4187          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->user_name));
    4188             :                         }
    4189          96 :                         ndr->flags = _flags_save_string;
    4190             :                 }
    4191             :                 {
    4192          96 :                         uint32_t _flags_save_string = ndr->flags;
    4193          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4194          96 :                         if (r->document_name) {
    4195          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->document_name));
    4196          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
    4197          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->document_name));
    4198             :                         }
    4199          96 :                         ndr->flags = _flags_save_string;
    4200             :                 }
    4201             :                 {
    4202          96 :                         uint32_t _flags_save_string = ndr->flags;
    4203          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4204          96 :                         if (r->notify_name) {
    4205          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->notify_name));
    4206          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->notify_name));
    4207          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->notify_name));
    4208             :                         }
    4209          96 :                         ndr->flags = _flags_save_string;
    4210             :                 }
    4211             :                 {
    4212          96 :                         uint32_t _flags_save_string = ndr->flags;
    4213          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4214          96 :                         if (r->data_type) {
    4215          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_type));
    4216          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
    4217          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_type));
    4218             :                         }
    4219          96 :                         ndr->flags = _flags_save_string;
    4220             :                 }
    4221             :                 {
    4222          96 :                         uint32_t _flags_save_string = ndr->flags;
    4223          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4224          96 :                         if (r->print_processor) {
    4225          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->print_processor));
    4226          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor));
    4227          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->print_processor));
    4228             :                         }
    4229          96 :                         ndr->flags = _flags_save_string;
    4230             :                 }
    4231             :                 {
    4232          96 :                         uint32_t _flags_save_string = ndr->flags;
    4233          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4234          96 :                         if (r->parameters) {
    4235          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->parameters));
    4236          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters));
    4237          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->parameters));
    4238             :                         }
    4239          96 :                         ndr->flags = _flags_save_string;
    4240             :                 }
    4241             :                 {
    4242          96 :                         uint32_t _flags_save_string = ndr->flags;
    4243          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4244          96 :                         if (r->driver_name) {
    4245          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
    4246          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
    4247          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
    4248             :                         }
    4249          96 :                         ndr->flags = _flags_save_string;
    4250             :                 }
    4251             :                 {
    4252          96 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    4253          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4254          96 :                         if (r->devmode) {
    4255          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->devmode));
    4256             :                                 {
    4257             :                                         struct ndr_push *_ndr_devmode;
    4258          96 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
    4259          96 :                                         NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    4260          96 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
    4261             :                                 }
    4262          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->devmode));
    4263             :                         }
    4264          96 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    4265             :                 }
    4266             :                 {
    4267          96 :                         uint32_t _flags_save_string = ndr->flags;
    4268          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4269          96 :                         if (r->text_status) {
    4270          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->text_status));
    4271          96 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
    4272          96 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->text_status));
    4273             :                         }
    4274          96 :                         ndr->flags = _flags_save_string;
    4275             :                 }
    4276             :                 {
    4277          96 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    4278          96 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4279          96 :                         if (r->secdesc) {
    4280           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->secdesc));
    4281             :                                 {
    4282             :                                         struct ndr_push *_ndr_secdesc;
    4283           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
    4284           0 :                                         NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
    4285           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
    4286             :                                 }
    4287           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->secdesc));
    4288             :                         }
    4289          96 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    4290             :                 }
    4291             :         }
    4292         192 :         return NDR_ERR_SUCCESS;
    4293             : }
    4294             : 
    4295          64 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfo2 *r)
    4296             : {
    4297             :         uint32_t _ptr_printer_name;
    4298          64 :         TALLOC_CTX *_mem_save_printer_name_0 = NULL;
    4299             :         uint32_t _ptr_server_name;
    4300          64 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    4301             :         uint32_t _ptr_user_name;
    4302          64 :         TALLOC_CTX *_mem_save_user_name_0 = NULL;
    4303             :         uint32_t _ptr_document_name;
    4304          64 :         TALLOC_CTX *_mem_save_document_name_0 = NULL;
    4305             :         uint32_t _ptr_notify_name;
    4306          64 :         TALLOC_CTX *_mem_save_notify_name_0 = NULL;
    4307             :         uint32_t _ptr_data_type;
    4308          64 :         TALLOC_CTX *_mem_save_data_type_0 = NULL;
    4309             :         uint32_t _ptr_print_processor;
    4310          64 :         TALLOC_CTX *_mem_save_print_processor_0 = NULL;
    4311             :         uint32_t _ptr_parameters;
    4312          64 :         TALLOC_CTX *_mem_save_parameters_0 = NULL;
    4313             :         uint32_t _ptr_driver_name;
    4314          64 :         TALLOC_CTX *_mem_save_driver_name_0 = NULL;
    4315             :         uint32_t _ptr_devmode;
    4316          64 :         TALLOC_CTX *_mem_save_devmode_0 = NULL;
    4317             :         uint32_t _ptr_text_status;
    4318          64 :         TALLOC_CTX *_mem_save_text_status_0 = NULL;
    4319             :         uint32_t _ptr_secdesc;
    4320          64 :         TALLOC_CTX *_mem_save_secdesc_0 = NULL;
    4321          64 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4322          64 :         if (ndr_flags & NDR_SCALARS) {
    4323          32 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    4324          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
    4325             :                 {
    4326          32 :                         uint32_t _flags_save_string = ndr->flags;
    4327          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4328          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
    4329          32 :                         if (_ptr_printer_name) {
    4330          32 :                                 NDR_PULL_ALLOC(ndr, r->printer_name);
    4331          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
    4332             :                         } else {
    4333           0 :                                 r->printer_name = NULL;
    4334             :                         }
    4335          32 :                         ndr->flags = _flags_save_string;
    4336             :                 }
    4337             :                 {
    4338          32 :                         uint32_t _flags_save_string = ndr->flags;
    4339          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4340          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    4341          32 :                         if (_ptr_server_name) {
    4342          32 :                                 NDR_PULL_ALLOC(ndr, r->server_name);
    4343          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
    4344             :                         } else {
    4345           0 :                                 r->server_name = NULL;
    4346             :                         }
    4347          32 :                         ndr->flags = _flags_save_string;
    4348             :                 }
    4349             :                 {
    4350          32 :                         uint32_t _flags_save_string = ndr->flags;
    4351          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4352          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
    4353          32 :                         if (_ptr_user_name) {
    4354          32 :                                 NDR_PULL_ALLOC(ndr, r->user_name);
    4355          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
    4356             :                         } else {
    4357           0 :                                 r->user_name = NULL;
    4358             :                         }
    4359          32 :                         ndr->flags = _flags_save_string;
    4360             :                 }
    4361             :                 {
    4362          32 :                         uint32_t _flags_save_string = ndr->flags;
    4363          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4364          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
    4365          32 :                         if (_ptr_document_name) {
    4366          32 :                                 NDR_PULL_ALLOC(ndr, r->document_name);
    4367          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
    4368             :                         } else {
    4369           0 :                                 r->document_name = NULL;
    4370             :                         }
    4371          32 :                         ndr->flags = _flags_save_string;
    4372             :                 }
    4373             :                 {
    4374          32 :                         uint32_t _flags_save_string = ndr->flags;
    4375          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4376          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
    4377          32 :                         if (_ptr_notify_name) {
    4378          32 :                                 NDR_PULL_ALLOC(ndr, r->notify_name);
    4379          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->notify_name, _ptr_notify_name));
    4380             :                         } else {
    4381           0 :                                 r->notify_name = NULL;
    4382             :                         }
    4383          32 :                         ndr->flags = _flags_save_string;
    4384             :                 }
    4385             :                 {
    4386          32 :                         uint32_t _flags_save_string = ndr->flags;
    4387          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4388          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
    4389          32 :                         if (_ptr_data_type) {
    4390          32 :                                 NDR_PULL_ALLOC(ndr, r->data_type);
    4391          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
    4392             :                         } else {
    4393           0 :                                 r->data_type = NULL;
    4394             :                         }
    4395          32 :                         ndr->flags = _flags_save_string;
    4396             :                 }
    4397             :                 {
    4398          32 :                         uint32_t _flags_save_string = ndr->flags;
    4399          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4400          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
    4401          32 :                         if (_ptr_print_processor) {
    4402          32 :                                 NDR_PULL_ALLOC(ndr, r->print_processor);
    4403          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor, _ptr_print_processor));
    4404             :                         } else {
    4405           0 :                                 r->print_processor = NULL;
    4406             :                         }
    4407          32 :                         ndr->flags = _flags_save_string;
    4408             :                 }
    4409             :                 {
    4410          32 :                         uint32_t _flags_save_string = ndr->flags;
    4411          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4412          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
    4413          32 :                         if (_ptr_parameters) {
    4414          32 :                                 NDR_PULL_ALLOC(ndr, r->parameters);
    4415          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
    4416             :                         } else {
    4417           0 :                                 r->parameters = NULL;
    4418             :                         }
    4419          32 :                         ndr->flags = _flags_save_string;
    4420             :                 }
    4421             :                 {
    4422          32 :                         uint32_t _flags_save_string = ndr->flags;
    4423          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4424          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
    4425          32 :                         if (_ptr_driver_name) {
    4426          32 :                                 NDR_PULL_ALLOC(ndr, r->driver_name);
    4427          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
    4428             :                         } else {
    4429           0 :                                 r->driver_name = NULL;
    4430             :                         }
    4431          32 :                         ndr->flags = _flags_save_string;
    4432             :                 }
    4433             :                 {
    4434          32 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    4435          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4436          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
    4437          32 :                         if (_ptr_devmode) {
    4438          32 :                                 NDR_PULL_ALLOC(ndr, r->devmode);
    4439          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
    4440             :                         } else {
    4441           0 :                                 r->devmode = NULL;
    4442             :                         }
    4443          32 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    4444             :                 }
    4445             :                 {
    4446          32 :                         uint32_t _flags_save_string = ndr->flags;
    4447          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4448          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
    4449          32 :                         if (_ptr_text_status) {
    4450          32 :                                 NDR_PULL_ALLOC(ndr, r->text_status);
    4451          32 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
    4452             :                         } else {
    4453           0 :                                 r->text_status = NULL;
    4454             :                         }
    4455          32 :                         ndr->flags = _flags_save_string;
    4456             :                 }
    4457             :                 {
    4458          32 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    4459          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4460          32 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
    4461          32 :                         if (_ptr_secdesc) {
    4462           0 :                                 NDR_PULL_ALLOC(ndr, r->secdesc);
    4463           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
    4464             :                         } else {
    4465          32 :                                 r->secdesc = NULL;
    4466             :                         }
    4467          32 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    4468             :                 }
    4469          32 :                 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
    4470          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
    4471          32 :                 if (r->priority > 99) {
    4472           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    4473             :                 }
    4474          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
    4475          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
    4476          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
    4477          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
    4478          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
    4479          32 :                 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    4480          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
    4481          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
    4482          32 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    4483             :         }
    4484          64 :         if (ndr_flags & NDR_BUFFERS) {
    4485             :                 {
    4486          32 :                         uint32_t _flags_save_string = ndr->flags;
    4487          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4488          32 :                         if (r->printer_name) {
    4489             :                                 uint32_t _relative_save_offset;
    4490          32 :                                 _relative_save_offset = ndr->offset;
    4491          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
    4492          32 :                                 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4493          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
    4494          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
    4495          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
    4496          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4497           4 :                                         ndr->relative_highest_offset = ndr->offset;
    4498             :                                 }
    4499          32 :                                 ndr->offset = _relative_save_offset;
    4500             :                         }
    4501          32 :                         ndr->flags = _flags_save_string;
    4502             :                 }
    4503             :                 {
    4504          32 :                         uint32_t _flags_save_string = ndr->flags;
    4505          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4506          32 :                         if (r->server_name) {
    4507             :                                 uint32_t _relative_save_offset;
    4508          32 :                                 _relative_save_offset = ndr->offset;
    4509          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
    4510          32 :                                 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4511          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    4512          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
    4513          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    4514          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4515           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4516             :                                 }
    4517          32 :                                 ndr->offset = _relative_save_offset;
    4518             :                         }
    4519          32 :                         ndr->flags = _flags_save_string;
    4520             :                 }
    4521             :                 {
    4522          32 :                         uint32_t _flags_save_string = ndr->flags;
    4523          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4524          32 :                         if (r->user_name) {
    4525             :                                 uint32_t _relative_save_offset;
    4526          32 :                                 _relative_save_offset = ndr->offset;
    4527          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
    4528          32 :                                 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4529          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
    4530          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
    4531          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
    4532          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4533           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4534             :                                 }
    4535          32 :                                 ndr->offset = _relative_save_offset;
    4536             :                         }
    4537          32 :                         ndr->flags = _flags_save_string;
    4538             :                 }
    4539             :                 {
    4540          32 :                         uint32_t _flags_save_string = ndr->flags;
    4541          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4542          32 :                         if (r->document_name) {
    4543             :                                 uint32_t _relative_save_offset;
    4544          32 :                                 _relative_save_offset = ndr->offset;
    4545          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
    4546          32 :                                 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4547          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
    4548          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
    4549          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
    4550          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4551           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4552             :                                 }
    4553          32 :                                 ndr->offset = _relative_save_offset;
    4554             :                         }
    4555          32 :                         ndr->flags = _flags_save_string;
    4556             :                 }
    4557             :                 {
    4558          32 :                         uint32_t _flags_save_string = ndr->flags;
    4559          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4560          32 :                         if (r->notify_name) {
    4561             :                                 uint32_t _relative_save_offset;
    4562          32 :                                 _relative_save_offset = ndr->offset;
    4563          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->notify_name));
    4564          32 :                                 _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4565          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
    4566          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->notify_name));
    4567          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
    4568          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4569           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4570             :                                 }
    4571          32 :                                 ndr->offset = _relative_save_offset;
    4572             :                         }
    4573          32 :                         ndr->flags = _flags_save_string;
    4574             :                 }
    4575             :                 {
    4576          32 :                         uint32_t _flags_save_string = ndr->flags;
    4577          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4578          32 :                         if (r->data_type) {
    4579             :                                 uint32_t _relative_save_offset;
    4580          32 :                                 _relative_save_offset = ndr->offset;
    4581          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
    4582          32 :                                 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4583          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
    4584          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
    4585          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
    4586          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4587           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4588             :                                 }
    4589          32 :                                 ndr->offset = _relative_save_offset;
    4590             :                         }
    4591          32 :                         ndr->flags = _flags_save_string;
    4592             :                 }
    4593             :                 {
    4594          32 :                         uint32_t _flags_save_string = ndr->flags;
    4595          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4596          32 :                         if (r->print_processor) {
    4597             :                                 uint32_t _relative_save_offset;
    4598          32 :                                 _relative_save_offset = ndr->offset;
    4599          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor));
    4600          32 :                                 _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4601          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
    4602          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor));
    4603          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
    4604          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4605           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4606             :                                 }
    4607          32 :                                 ndr->offset = _relative_save_offset;
    4608             :                         }
    4609          32 :                         ndr->flags = _flags_save_string;
    4610             :                 }
    4611             :                 {
    4612          32 :                         uint32_t _flags_save_string = ndr->flags;
    4613          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4614          32 :                         if (r->parameters) {
    4615             :                                 uint32_t _relative_save_offset;
    4616          32 :                                 _relative_save_offset = ndr->offset;
    4617          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
    4618          32 :                                 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4619          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
    4620          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
    4621          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
    4622          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4623           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4624             :                                 }
    4625          32 :                                 ndr->offset = _relative_save_offset;
    4626             :                         }
    4627          32 :                         ndr->flags = _flags_save_string;
    4628             :                 }
    4629             :                 {
    4630          32 :                         uint32_t _flags_save_string = ndr->flags;
    4631          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4632          32 :                         if (r->driver_name) {
    4633             :                                 uint32_t _relative_save_offset;
    4634          32 :                                 _relative_save_offset = ndr->offset;
    4635          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
    4636          32 :                                 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4637          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
    4638          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
    4639          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
    4640          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4641           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4642             :                                 }
    4643          32 :                                 ndr->offset = _relative_save_offset;
    4644             :                         }
    4645          32 :                         ndr->flags = _flags_save_string;
    4646             :                 }
    4647             :                 {
    4648          32 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    4649          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4650          32 :                         if (r->devmode) {
    4651             :                                 uint32_t _relative_save_offset;
    4652          32 :                                 _relative_save_offset = ndr->offset;
    4653          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
    4654          32 :                                 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4655          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
    4656             :                                 {
    4657             :                                         struct ndr_pull *_ndr_devmode;
    4658          32 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
    4659          32 :                                         NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    4660          32 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
    4661             :                                 }
    4662          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
    4663          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4664           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4665             :                                 }
    4666          32 :                                 ndr->offset = _relative_save_offset;
    4667             :                         }
    4668          32 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    4669             :                 }
    4670             :                 {
    4671          32 :                         uint32_t _flags_save_string = ndr->flags;
    4672          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4673          32 :                         if (r->text_status) {
    4674             :                                 uint32_t _relative_save_offset;
    4675          32 :                                 _relative_save_offset = ndr->offset;
    4676          32 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
    4677          32 :                                 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4678          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
    4679          32 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
    4680          32 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
    4681          32 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4682           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4683             :                                 }
    4684          32 :                                 ndr->offset = _relative_save_offset;
    4685             :                         }
    4686          32 :                         ndr->flags = _flags_save_string;
    4687             :                 }
    4688             :                 {
    4689          32 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    4690          32 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4691          32 :                         if (r->secdesc) {
    4692             :                                 uint32_t _relative_save_offset;
    4693           0 :                                 _relative_save_offset = ndr->offset;
    4694           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
    4695           0 :                                 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
    4696           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
    4697             :                                 {
    4698             :                                         struct ndr_pull *_ndr_secdesc;
    4699           0 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
    4700           0 :                                         NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
    4701           0 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
    4702             :                                 }
    4703           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
    4704           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    4705           0 :                                         ndr->relative_highest_offset = ndr->offset;
    4706             :                                 }
    4707           0 :                                 ndr->offset = _relative_save_offset;
    4708             :                         }
    4709          32 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    4710             :                 }
    4711             :         }
    4712          64 :         return NDR_ERR_SUCCESS;
    4713             : }
    4714             : 
    4715           0 : static void ndr_print_flags_spoolss_JobInfo2(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_JobInfo2 *r)
    4716             : {
    4717           0 :         ndr_print_spoolss_JobInfo2(ndr, name, r);
    4718           0 : }
    4719             : 
    4720           0 : _PUBLIC_ void ndr_print_spoolss_JobInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo2 *r)
    4721             : {
    4722           0 :         ndr_print_struct(ndr, name, "spoolss_JobInfo2");
    4723           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4724           0 :         ndr->depth++;
    4725           0 :         ndr_print_uint32(ndr, "job_id", r->job_id);
    4726             :         {
    4727           0 :                 uint32_t _flags_save_string = ndr->flags;
    4728           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4729           0 :                 ndr_print_ptr(ndr, "printer_name", r->printer_name);
    4730           0 :                 ndr->depth++;
    4731           0 :                 if (r->printer_name) {
    4732           0 :                         ndr_print_string(ndr, "printer_name", r->printer_name);
    4733             :                 }
    4734           0 :                 ndr->depth--;
    4735           0 :                 ndr->flags = _flags_save_string;
    4736             :         }
    4737             :         {
    4738           0 :                 uint32_t _flags_save_string = ndr->flags;
    4739           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4740           0 :                 ndr_print_ptr(ndr, "server_name", r->server_name);
    4741           0 :                 ndr->depth++;
    4742           0 :                 if (r->server_name) {
    4743           0 :                         ndr_print_string(ndr, "server_name", r->server_name);
    4744             :                 }
    4745           0 :                 ndr->depth--;
    4746           0 :                 ndr->flags = _flags_save_string;
    4747             :         }
    4748             :         {
    4749           0 :                 uint32_t _flags_save_string = ndr->flags;
    4750           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4751           0 :                 ndr_print_ptr(ndr, "user_name", r->user_name);
    4752           0 :                 ndr->depth++;
    4753           0 :                 if (r->user_name) {
    4754           0 :                         ndr_print_string(ndr, "user_name", r->user_name);
    4755             :                 }
    4756           0 :                 ndr->depth--;
    4757           0 :                 ndr->flags = _flags_save_string;
    4758             :         }
    4759             :         {
    4760           0 :                 uint32_t _flags_save_string = ndr->flags;
    4761           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4762           0 :                 ndr_print_ptr(ndr, "document_name", r->document_name);
    4763           0 :                 ndr->depth++;
    4764           0 :                 if (r->document_name) {
    4765           0 :                         ndr_print_string(ndr, "document_name", r->document_name);
    4766             :                 }
    4767           0 :                 ndr->depth--;
    4768           0 :                 ndr->flags = _flags_save_string;
    4769             :         }
    4770             :         {
    4771           0 :                 uint32_t _flags_save_string = ndr->flags;
    4772           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4773           0 :                 ndr_print_ptr(ndr, "notify_name", r->notify_name);
    4774           0 :                 ndr->depth++;
    4775           0 :                 if (r->notify_name) {
    4776           0 :                         ndr_print_string(ndr, "notify_name", r->notify_name);
    4777             :                 }
    4778           0 :                 ndr->depth--;
    4779           0 :                 ndr->flags = _flags_save_string;
    4780             :         }
    4781             :         {
    4782           0 :                 uint32_t _flags_save_string = ndr->flags;
    4783           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4784           0 :                 ndr_print_ptr(ndr, "data_type", r->data_type);
    4785           0 :                 ndr->depth++;
    4786           0 :                 if (r->data_type) {
    4787           0 :                         ndr_print_string(ndr, "data_type", r->data_type);
    4788             :                 }
    4789           0 :                 ndr->depth--;
    4790           0 :                 ndr->flags = _flags_save_string;
    4791             :         }
    4792             :         {
    4793           0 :                 uint32_t _flags_save_string = ndr->flags;
    4794           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4795           0 :                 ndr_print_ptr(ndr, "print_processor", r->print_processor);
    4796           0 :                 ndr->depth++;
    4797           0 :                 if (r->print_processor) {
    4798           0 :                         ndr_print_string(ndr, "print_processor", r->print_processor);
    4799             :                 }
    4800           0 :                 ndr->depth--;
    4801           0 :                 ndr->flags = _flags_save_string;
    4802             :         }
    4803             :         {
    4804           0 :                 uint32_t _flags_save_string = ndr->flags;
    4805           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4806           0 :                 ndr_print_ptr(ndr, "parameters", r->parameters);
    4807           0 :                 ndr->depth++;
    4808           0 :                 if (r->parameters) {
    4809           0 :                         ndr_print_string(ndr, "parameters", r->parameters);
    4810             :                 }
    4811           0 :                 ndr->depth--;
    4812           0 :                 ndr->flags = _flags_save_string;
    4813             :         }
    4814             :         {
    4815           0 :                 uint32_t _flags_save_string = ndr->flags;
    4816           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4817           0 :                 ndr_print_ptr(ndr, "driver_name", r->driver_name);
    4818           0 :                 ndr->depth++;
    4819           0 :                 if (r->driver_name) {
    4820           0 :                         ndr_print_string(ndr, "driver_name", r->driver_name);
    4821             :                 }
    4822           0 :                 ndr->depth--;
    4823           0 :                 ndr->flags = _flags_save_string;
    4824             :         }
    4825             :         {
    4826           0 :                 uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    4827           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4828           0 :                 ndr_print_ptr(ndr, "devmode", r->devmode);
    4829           0 :                 ndr->depth++;
    4830           0 :                 if (r->devmode) {
    4831           0 :                         ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
    4832             :                 }
    4833           0 :                 ndr->depth--;
    4834           0 :                 ndr->flags = _flags_save_spoolss_DeviceMode;
    4835             :         }
    4836             :         {
    4837           0 :                 uint32_t _flags_save_string = ndr->flags;
    4838           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4839           0 :                 ndr_print_ptr(ndr, "text_status", r->text_status);
    4840           0 :                 ndr->depth++;
    4841           0 :                 if (r->text_status) {
    4842           0 :                         ndr_print_string(ndr, "text_status", r->text_status);
    4843             :                 }
    4844           0 :                 ndr->depth--;
    4845           0 :                 ndr->flags = _flags_save_string;
    4846             :         }
    4847             :         {
    4848           0 :                 uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    4849           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4850           0 :                 ndr_print_ptr(ndr, "secdesc", r->secdesc);
    4851           0 :                 ndr->depth++;
    4852           0 :                 if (r->secdesc) {
    4853           0 :                         ndr_print_spoolss_security_descriptor(ndr, "secdesc", r->secdesc);
    4854             :                 }
    4855           0 :                 ndr->depth--;
    4856           0 :                 ndr->flags = _flags_save_spoolss_security_descriptor;
    4857             :         }
    4858           0 :         ndr_print_spoolss_JobStatus(ndr, "status", r->status);
    4859           0 :         ndr_print_uint32(ndr, "priority", r->priority);
    4860           0 :         ndr_print_uint32(ndr, "position", r->position);
    4861           0 :         ndr_print_uint32(ndr, "start_time", r->start_time);
    4862           0 :         ndr_print_uint32(ndr, "until_time", r->until_time);
    4863           0 :         ndr_print_uint32(ndr, "total_pages", r->total_pages);
    4864           0 :         ndr_print_uint32(ndr, "size", r->size);
    4865           0 :         ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
    4866           0 :         ndr_print_uint32(ndr, "time", r->time);
    4867           0 :         ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
    4868           0 :         ndr->depth--;
    4869             : }
    4870             : 
    4871           0 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo2(const struct spoolss_JobInfo2 *r, int flags)
    4872             : {
    4873           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo2);
    4874             : }
    4875             : 
    4876           0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo3(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfo3 *r)
    4877             : {
    4878           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4879           0 :         if (ndr_flags & NDR_SCALARS) {
    4880           0 :                 NDR_CHECK(ndr_push_align(ndr, 4));
    4881           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
    4882           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->next_job_id));
    4883           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
    4884           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
    4885             :         }
    4886           0 :         if (ndr_flags & NDR_BUFFERS) {
    4887             :         }
    4888           0 :         return NDR_ERR_SUCCESS;
    4889             : }
    4890             : 
    4891           0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo3(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfo3 *r)
    4892             : {
    4893           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    4894           0 :         if (ndr_flags & NDR_SCALARS) {
    4895           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
    4896           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
    4897           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->next_job_id));
    4898           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
    4899           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
    4900             :         }
    4901           0 :         if (ndr_flags & NDR_BUFFERS) {
    4902             :         }
    4903           0 :         return NDR_ERR_SUCCESS;
    4904             : }
    4905             : 
    4906           0 : static void ndr_print_flags_spoolss_JobInfo3(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_JobInfo3 *r)
    4907             : {
    4908           0 :         ndr_print_spoolss_JobInfo3(ndr, name, r);
    4909           0 : }
    4910             : 
    4911           0 : _PUBLIC_ void ndr_print_spoolss_JobInfo3(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo3 *r)
    4912             : {
    4913           0 :         ndr_print_struct(ndr, name, "spoolss_JobInfo3");
    4914           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    4915           0 :         ndr->depth++;
    4916           0 :         ndr_print_uint32(ndr, "job_id", r->job_id);
    4917           0 :         ndr_print_uint32(ndr, "next_job_id", r->next_job_id);
    4918           0 :         ndr_print_uint32(ndr, "reserved", r->reserved);
    4919           0 :         ndr->depth--;
    4920             : }
    4921             : 
    4922           0 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo3(const struct spoolss_JobInfo3 *r, int flags)
    4923             : {
    4924           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo3);
    4925             : }
    4926             : 
    4927           0 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfo4 *r)
    4928             : {
    4929           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    4930           0 :         if (ndr_flags & NDR_SCALARS) {
    4931           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    4932           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
    4933             :                 {
    4934           0 :                         uint32_t _flags_save_string = ndr->flags;
    4935           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4936           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->printer_name));
    4937           0 :                         ndr->flags = _flags_save_string;
    4938             :                 }
    4939             :                 {
    4940           0 :                         uint32_t _flags_save_string = ndr->flags;
    4941           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4942           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->server_name));
    4943           0 :                         ndr->flags = _flags_save_string;
    4944             :                 }
    4945             :                 {
    4946           0 :                         uint32_t _flags_save_string = ndr->flags;
    4947           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4948           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->user_name));
    4949           0 :                         ndr->flags = _flags_save_string;
    4950             :                 }
    4951             :                 {
    4952           0 :                         uint32_t _flags_save_string = ndr->flags;
    4953           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4954           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->document_name));
    4955           0 :                         ndr->flags = _flags_save_string;
    4956             :                 }
    4957             :                 {
    4958           0 :                         uint32_t _flags_save_string = ndr->flags;
    4959           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4960           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->notify_name));
    4961           0 :                         ndr->flags = _flags_save_string;
    4962             :                 }
    4963             :                 {
    4964           0 :                         uint32_t _flags_save_string = ndr->flags;
    4965           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4966           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->data_type));
    4967           0 :                         ndr->flags = _flags_save_string;
    4968             :                 }
    4969             :                 {
    4970           0 :                         uint32_t _flags_save_string = ndr->flags;
    4971           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4972           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->print_processor));
    4973           0 :                         ndr->flags = _flags_save_string;
    4974             :                 }
    4975             :                 {
    4976           0 :                         uint32_t _flags_save_string = ndr->flags;
    4977           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4978           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->parameters));
    4979           0 :                         ndr->flags = _flags_save_string;
    4980             :                 }
    4981             :                 {
    4982           0 :                         uint32_t _flags_save_string = ndr->flags;
    4983           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4984           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->driver_name));
    4985           0 :                         ndr->flags = _flags_save_string;
    4986             :                 }
    4987             :                 {
    4988           0 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    4989           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    4990           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->devmode));
    4991           0 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    4992             :                 }
    4993             :                 {
    4994           0 :                         uint32_t _flags_save_string = ndr->flags;
    4995           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    4996           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->text_status));
    4997           0 :                         ndr->flags = _flags_save_string;
    4998             :                 }
    4999             :                 {
    5000           0 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    5001           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5002           0 :                         NDR_CHECK(ndr_push_relative_ptr1(ndr, r->secdesc));
    5003           0 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    5004             :                 }
    5005           0 :                 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
    5006           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
    5007           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
    5008           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
    5009           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
    5010           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
    5011           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
    5012           0 :                 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    5013           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
    5014           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
    5015           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_high));
    5016           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5017             :         }
    5018           0 :         if (ndr_flags & NDR_BUFFERS) {
    5019             :                 {
    5020           0 :                         uint32_t _flags_save_string = ndr->flags;
    5021           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5022           0 :                         if (r->printer_name) {
    5023           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->printer_name));
    5024           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->printer_name));
    5025           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->printer_name));
    5026             :                         }
    5027           0 :                         ndr->flags = _flags_save_string;
    5028             :                 }
    5029             :                 {
    5030           0 :                         uint32_t _flags_save_string = ndr->flags;
    5031           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5032           0 :                         if (r->server_name) {
    5033           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->server_name));
    5034           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->server_name));
    5035           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->server_name));
    5036             :                         }
    5037           0 :                         ndr->flags = _flags_save_string;
    5038             :                 }
    5039             :                 {
    5040           0 :                         uint32_t _flags_save_string = ndr->flags;
    5041           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5042           0 :                         if (r->user_name) {
    5043           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->user_name));
    5044           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->user_name));
    5045           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->user_name));
    5046             :                         }
    5047           0 :                         ndr->flags = _flags_save_string;
    5048             :                 }
    5049             :                 {
    5050           0 :                         uint32_t _flags_save_string = ndr->flags;
    5051           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5052           0 :                         if (r->document_name) {
    5053           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->document_name));
    5054           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->document_name));
    5055           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->document_name));
    5056             :                         }
    5057           0 :                         ndr->flags = _flags_save_string;
    5058             :                 }
    5059             :                 {
    5060           0 :                         uint32_t _flags_save_string = ndr->flags;
    5061           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5062           0 :                         if (r->notify_name) {
    5063           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->notify_name));
    5064           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->notify_name));
    5065           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->notify_name));
    5066             :                         }
    5067           0 :                         ndr->flags = _flags_save_string;
    5068             :                 }
    5069             :                 {
    5070           0 :                         uint32_t _flags_save_string = ndr->flags;
    5071           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5072           0 :                         if (r->data_type) {
    5073           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->data_type));
    5074           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->data_type));
    5075           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->data_type));
    5076             :                         }
    5077           0 :                         ndr->flags = _flags_save_string;
    5078             :                 }
    5079             :                 {
    5080           0 :                         uint32_t _flags_save_string = ndr->flags;
    5081           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5082           0 :                         if (r->print_processor) {
    5083           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->print_processor));
    5084           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->print_processor));
    5085           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->print_processor));
    5086             :                         }
    5087           0 :                         ndr->flags = _flags_save_string;
    5088             :                 }
    5089             :                 {
    5090           0 :                         uint32_t _flags_save_string = ndr->flags;
    5091           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5092           0 :                         if (r->parameters) {
    5093           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->parameters));
    5094           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->parameters));
    5095           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->parameters));
    5096             :                         }
    5097           0 :                         ndr->flags = _flags_save_string;
    5098             :                 }
    5099             :                 {
    5100           0 :                         uint32_t _flags_save_string = ndr->flags;
    5101           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5102           0 :                         if (r->driver_name) {
    5103           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->driver_name));
    5104           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->driver_name));
    5105           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->driver_name));
    5106             :                         }
    5107           0 :                         ndr->flags = _flags_save_string;
    5108             :                 }
    5109             :                 {
    5110           0 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    5111           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5112           0 :                         if (r->devmode) {
    5113           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->devmode));
    5114             :                                 {
    5115             :                                         struct ndr_push *_ndr_devmode;
    5116           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_devmode, 0, -1));
    5117           0 :                                         NDR_CHECK(ndr_push_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    5118           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_devmode, 0, -1));
    5119             :                                 }
    5120           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->devmode));
    5121             :                         }
    5122           0 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    5123             :                 }
    5124             :                 {
    5125           0 :                         uint32_t _flags_save_string = ndr->flags;
    5126           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5127           0 :                         if (r->text_status) {
    5128           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->text_status));
    5129           0 :                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->text_status));
    5130           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->text_status));
    5131             :                         }
    5132           0 :                         ndr->flags = _flags_save_string;
    5133             :                 }
    5134             :                 {
    5135           0 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    5136           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5137           0 :                         if (r->secdesc) {
    5138           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->secdesc));
    5139             :                                 {
    5140             :                                         struct ndr_push *_ndr_secdesc;
    5141           0 :                                         NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
    5142           0 :                                         NDR_CHECK(ndr_push_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
    5143           0 :                                         NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secdesc, 0, -1));
    5144             :                                 }
    5145           0 :                                 NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->secdesc));
    5146             :                         }
    5147           0 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    5148             :                 }
    5149             :         }
    5150           0 :         return NDR_ERR_SUCCESS;
    5151             : }
    5152             : 
    5153           0 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfo4 *r)
    5154             : {
    5155             :         uint32_t _ptr_printer_name;
    5156           0 :         TALLOC_CTX *_mem_save_printer_name_0 = NULL;
    5157             :         uint32_t _ptr_server_name;
    5158           0 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    5159             :         uint32_t _ptr_user_name;
    5160           0 :         TALLOC_CTX *_mem_save_user_name_0 = NULL;
    5161             :         uint32_t _ptr_document_name;
    5162           0 :         TALLOC_CTX *_mem_save_document_name_0 = NULL;
    5163             :         uint32_t _ptr_notify_name;
    5164           0 :         TALLOC_CTX *_mem_save_notify_name_0 = NULL;
    5165             :         uint32_t _ptr_data_type;
    5166           0 :         TALLOC_CTX *_mem_save_data_type_0 = NULL;
    5167             :         uint32_t _ptr_print_processor;
    5168           0 :         TALLOC_CTX *_mem_save_print_processor_0 = NULL;
    5169             :         uint32_t _ptr_parameters;
    5170           0 :         TALLOC_CTX *_mem_save_parameters_0 = NULL;
    5171             :         uint32_t _ptr_driver_name;
    5172           0 :         TALLOC_CTX *_mem_save_driver_name_0 = NULL;
    5173             :         uint32_t _ptr_devmode;
    5174           0 :         TALLOC_CTX *_mem_save_devmode_0 = NULL;
    5175             :         uint32_t _ptr_text_status;
    5176           0 :         TALLOC_CTX *_mem_save_text_status_0 = NULL;
    5177             :         uint32_t _ptr_secdesc;
    5178           0 :         TALLOC_CTX *_mem_save_secdesc_0 = NULL;
    5179           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5180           0 :         if (ndr_flags & NDR_SCALARS) {
    5181           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    5182           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
    5183             :                 {
    5184           0 :                         uint32_t _flags_save_string = ndr->flags;
    5185           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5186           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
    5187           0 :                         if (_ptr_printer_name) {
    5188           0 :                                 NDR_PULL_ALLOC(ndr, r->printer_name);
    5189           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->printer_name, _ptr_printer_name));
    5190             :                         } else {
    5191           0 :                                 r->printer_name = NULL;
    5192             :                         }
    5193           0 :                         ndr->flags = _flags_save_string;
    5194             :                 }
    5195             :                 {
    5196           0 :                         uint32_t _flags_save_string = ndr->flags;
    5197           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5198           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    5199           0 :                         if (_ptr_server_name) {
    5200           0 :                                 NDR_PULL_ALLOC(ndr, r->server_name);
    5201           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->server_name, _ptr_server_name));
    5202             :                         } else {
    5203           0 :                                 r->server_name = NULL;
    5204             :                         }
    5205           0 :                         ndr->flags = _flags_save_string;
    5206             :                 }
    5207             :                 {
    5208           0 :                         uint32_t _flags_save_string = ndr->flags;
    5209           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5210           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
    5211           0 :                         if (_ptr_user_name) {
    5212           0 :                                 NDR_PULL_ALLOC(ndr, r->user_name);
    5213           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->user_name, _ptr_user_name));
    5214             :                         } else {
    5215           0 :                                 r->user_name = NULL;
    5216             :                         }
    5217           0 :                         ndr->flags = _flags_save_string;
    5218             :                 }
    5219             :                 {
    5220           0 :                         uint32_t _flags_save_string = ndr->flags;
    5221           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5222           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
    5223           0 :                         if (_ptr_document_name) {
    5224           0 :                                 NDR_PULL_ALLOC(ndr, r->document_name);
    5225           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->document_name, _ptr_document_name));
    5226             :                         } else {
    5227           0 :                                 r->document_name = NULL;
    5228             :                         }
    5229           0 :                         ndr->flags = _flags_save_string;
    5230             :                 }
    5231             :                 {
    5232           0 :                         uint32_t _flags_save_string = ndr->flags;
    5233           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5234           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
    5235           0 :                         if (_ptr_notify_name) {
    5236           0 :                                 NDR_PULL_ALLOC(ndr, r->notify_name);
    5237           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->notify_name, _ptr_notify_name));
    5238             :                         } else {
    5239           0 :                                 r->notify_name = NULL;
    5240             :                         }
    5241           0 :                         ndr->flags = _flags_save_string;
    5242             :                 }
    5243             :                 {
    5244           0 :                         uint32_t _flags_save_string = ndr->flags;
    5245           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5246           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
    5247           0 :                         if (_ptr_data_type) {
    5248           0 :                                 NDR_PULL_ALLOC(ndr, r->data_type);
    5249           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->data_type, _ptr_data_type));
    5250             :                         } else {
    5251           0 :                                 r->data_type = NULL;
    5252             :                         }
    5253           0 :                         ndr->flags = _flags_save_string;
    5254             :                 }
    5255             :                 {
    5256           0 :                         uint32_t _flags_save_string = ndr->flags;
    5257           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5258           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
    5259           0 :                         if (_ptr_print_processor) {
    5260           0 :                                 NDR_PULL_ALLOC(ndr, r->print_processor);
    5261           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->print_processor, _ptr_print_processor));
    5262             :                         } else {
    5263           0 :                                 r->print_processor = NULL;
    5264             :                         }
    5265           0 :                         ndr->flags = _flags_save_string;
    5266             :                 }
    5267             :                 {
    5268           0 :                         uint32_t _flags_save_string = ndr->flags;
    5269           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5270           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
    5271           0 :                         if (_ptr_parameters) {
    5272           0 :                                 NDR_PULL_ALLOC(ndr, r->parameters);
    5273           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->parameters, _ptr_parameters));
    5274             :                         } else {
    5275           0 :                                 r->parameters = NULL;
    5276             :                         }
    5277           0 :                         ndr->flags = _flags_save_string;
    5278             :                 }
    5279             :                 {
    5280           0 :                         uint32_t _flags_save_string = ndr->flags;
    5281           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5282           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
    5283           0 :                         if (_ptr_driver_name) {
    5284           0 :                                 NDR_PULL_ALLOC(ndr, r->driver_name);
    5285           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->driver_name, _ptr_driver_name));
    5286             :                         } else {
    5287           0 :                                 r->driver_name = NULL;
    5288             :                         }
    5289           0 :                         ndr->flags = _flags_save_string;
    5290             :                 }
    5291             :                 {
    5292           0 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    5293           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5294           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devmode));
    5295           0 :                         if (_ptr_devmode) {
    5296           0 :                                 NDR_PULL_ALLOC(ndr, r->devmode);
    5297           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->devmode, _ptr_devmode));
    5298             :                         } else {
    5299           0 :                                 r->devmode = NULL;
    5300             :                         }
    5301           0 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    5302             :                 }
    5303             :                 {
    5304           0 :                         uint32_t _flags_save_string = ndr->flags;
    5305           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5306           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
    5307           0 :                         if (_ptr_text_status) {
    5308           0 :                                 NDR_PULL_ALLOC(ndr, r->text_status);
    5309           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->text_status, _ptr_text_status));
    5310             :                         } else {
    5311           0 :                                 r->text_status = NULL;
    5312             :                         }
    5313           0 :                         ndr->flags = _flags_save_string;
    5314             :                 }
    5315             :                 {
    5316           0 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    5317           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5318           0 :                         NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
    5319           0 :                         if (_ptr_secdesc) {
    5320           0 :                                 NDR_PULL_ALLOC(ndr, r->secdesc);
    5321           0 :                                 NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->secdesc, _ptr_secdesc));
    5322             :                         } else {
    5323           0 :                                 r->secdesc = NULL;
    5324             :                         }
    5325           0 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    5326             :                 }
    5327           0 :                 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
    5328           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
    5329           0 :                 if (r->priority > 99) {
    5330           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    5331             :                 }
    5332           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
    5333           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
    5334           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
    5335           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
    5336           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
    5337           0 :                 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    5338           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
    5339           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
    5340           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_high));
    5341           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    5342             :         }
    5343           0 :         if (ndr_flags & NDR_BUFFERS) {
    5344             :                 {
    5345           0 :                         uint32_t _flags_save_string = ndr->flags;
    5346           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5347           0 :                         if (r->printer_name) {
    5348             :                                 uint32_t _relative_save_offset;
    5349           0 :                                 _relative_save_offset = ndr->offset;
    5350           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->printer_name));
    5351           0 :                                 _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5352           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
    5353           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->printer_name));
    5354           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
    5355           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5356           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5357             :                                 }
    5358           0 :                                 ndr->offset = _relative_save_offset;
    5359             :                         }
    5360           0 :                         ndr->flags = _flags_save_string;
    5361             :                 }
    5362             :                 {
    5363           0 :                         uint32_t _flags_save_string = ndr->flags;
    5364           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5365           0 :                         if (r->server_name) {
    5366             :                                 uint32_t _relative_save_offset;
    5367           0 :                                 _relative_save_offset = ndr->offset;
    5368           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->server_name));
    5369           0 :                                 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5370           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    5371           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->server_name));
    5372           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    5373           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5374           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5375             :                                 }
    5376           0 :                                 ndr->offset = _relative_save_offset;
    5377             :                         }
    5378           0 :                         ndr->flags = _flags_save_string;
    5379             :                 }
    5380             :                 {
    5381           0 :                         uint32_t _flags_save_string = ndr->flags;
    5382           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5383           0 :                         if (r->user_name) {
    5384             :                                 uint32_t _relative_save_offset;
    5385           0 :                                 _relative_save_offset = ndr->offset;
    5386           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->user_name));
    5387           0 :                                 _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5388           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
    5389           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->user_name));
    5390           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
    5391           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5392           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5393             :                                 }
    5394           0 :                                 ndr->offset = _relative_save_offset;
    5395             :                         }
    5396           0 :                         ndr->flags = _flags_save_string;
    5397             :                 }
    5398             :                 {
    5399           0 :                         uint32_t _flags_save_string = ndr->flags;
    5400           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5401           0 :                         if (r->document_name) {
    5402             :                                 uint32_t _relative_save_offset;
    5403           0 :                                 _relative_save_offset = ndr->offset;
    5404           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->document_name));
    5405           0 :                                 _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5406           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
    5407           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->document_name));
    5408           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
    5409           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5410           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5411             :                                 }
    5412           0 :                                 ndr->offset = _relative_save_offset;
    5413             :                         }
    5414           0 :                         ndr->flags = _flags_save_string;
    5415             :                 }
    5416             :                 {
    5417           0 :                         uint32_t _flags_save_string = ndr->flags;
    5418           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5419           0 :                         if (r->notify_name) {
    5420             :                                 uint32_t _relative_save_offset;
    5421           0 :                                 _relative_save_offset = ndr->offset;
    5422           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->notify_name));
    5423           0 :                                 _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5424           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
    5425           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->notify_name));
    5426           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
    5427           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5428           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5429             :                                 }
    5430           0 :                                 ndr->offset = _relative_save_offset;
    5431             :                         }
    5432           0 :                         ndr->flags = _flags_save_string;
    5433             :                 }
    5434             :                 {
    5435           0 :                         uint32_t _flags_save_string = ndr->flags;
    5436           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5437           0 :                         if (r->data_type) {
    5438             :                                 uint32_t _relative_save_offset;
    5439           0 :                                 _relative_save_offset = ndr->offset;
    5440           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->data_type));
    5441           0 :                                 _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5442           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
    5443           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->data_type));
    5444           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
    5445           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5446           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5447             :                                 }
    5448           0 :                                 ndr->offset = _relative_save_offset;
    5449             :                         }
    5450           0 :                         ndr->flags = _flags_save_string;
    5451             :                 }
    5452             :                 {
    5453           0 :                         uint32_t _flags_save_string = ndr->flags;
    5454           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5455           0 :                         if (r->print_processor) {
    5456             :                                 uint32_t _relative_save_offset;
    5457           0 :                                 _relative_save_offset = ndr->offset;
    5458           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->print_processor));
    5459           0 :                                 _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5460           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
    5461           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->print_processor));
    5462           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
    5463           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5464           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5465             :                                 }
    5466           0 :                                 ndr->offset = _relative_save_offset;
    5467             :                         }
    5468           0 :                         ndr->flags = _flags_save_string;
    5469             :                 }
    5470             :                 {
    5471           0 :                         uint32_t _flags_save_string = ndr->flags;
    5472           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5473           0 :                         if (r->parameters) {
    5474             :                                 uint32_t _relative_save_offset;
    5475           0 :                                 _relative_save_offset = ndr->offset;
    5476           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->parameters));
    5477           0 :                                 _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5478           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
    5479           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->parameters));
    5480           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
    5481           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5482           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5483             :                                 }
    5484           0 :                                 ndr->offset = _relative_save_offset;
    5485             :                         }
    5486           0 :                         ndr->flags = _flags_save_string;
    5487             :                 }
    5488             :                 {
    5489           0 :                         uint32_t _flags_save_string = ndr->flags;
    5490           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5491           0 :                         if (r->driver_name) {
    5492             :                                 uint32_t _relative_save_offset;
    5493           0 :                                 _relative_save_offset = ndr->offset;
    5494           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->driver_name));
    5495           0 :                                 _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5496           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
    5497           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->driver_name));
    5498           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
    5499           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5500           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5501             :                                 }
    5502           0 :                                 ndr->offset = _relative_save_offset;
    5503             :                         }
    5504           0 :                         ndr->flags = _flags_save_string;
    5505             :                 }
    5506             :                 {
    5507           0 :                         uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    5508           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5509           0 :                         if (r->devmode) {
    5510             :                                 uint32_t _relative_save_offset;
    5511           0 :                                 _relative_save_offset = ndr->offset;
    5512           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->devmode));
    5513           0 :                                 _mem_save_devmode_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5514           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->devmode, 0);
    5515             :                                 {
    5516             :                                         struct ndr_pull *_ndr_devmode;
    5517           0 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_devmode, 0, -1));
    5518           0 :                                         NDR_CHECK(ndr_pull_spoolss_DeviceMode(_ndr_devmode, NDR_SCALARS, r->devmode));
    5519           0 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_devmode, 0, -1));
    5520             :                                 }
    5521           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devmode_0, 0);
    5522           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5523           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5524             :                                 }
    5525           0 :                                 ndr->offset = _relative_save_offset;
    5526             :                         }
    5527           0 :                         ndr->flags = _flags_save_spoolss_DeviceMode;
    5528             :                 }
    5529             :                 {
    5530           0 :                         uint32_t _flags_save_string = ndr->flags;
    5531           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5532           0 :                         if (r->text_status) {
    5533             :                                 uint32_t _relative_save_offset;
    5534           0 :                                 _relative_save_offset = ndr->offset;
    5535           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->text_status));
    5536           0 :                                 _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5537           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
    5538           0 :                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->text_status));
    5539           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
    5540           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5541           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5542             :                                 }
    5543           0 :                                 ndr->offset = _relative_save_offset;
    5544             :                         }
    5545           0 :                         ndr->flags = _flags_save_string;
    5546             :                 }
    5547             :                 {
    5548           0 :                         uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    5549           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5550           0 :                         if (r->secdesc) {
    5551             :                                 uint32_t _relative_save_offset;
    5552           0 :                                 _relative_save_offset = ndr->offset;
    5553           0 :                                 NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->secdesc));
    5554           0 :                                 _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
    5555           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, r->secdesc, 0);
    5556             :                                 {
    5557             :                                         struct ndr_pull *_ndr_secdesc;
    5558           0 :                                         NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secdesc, 0, -1));
    5559           0 :                                         NDR_CHECK(ndr_pull_spoolss_security_descriptor(_ndr_secdesc, NDR_SCALARS|NDR_BUFFERS, r->secdesc));
    5560           0 :                                         NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secdesc, 0, -1));
    5561             :                                 }
    5562           0 :                                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
    5563           0 :                                 if (ndr->offset > ndr->relative_highest_offset) {
    5564           0 :                                         ndr->relative_highest_offset = ndr->offset;
    5565             :                                 }
    5566           0 :                                 ndr->offset = _relative_save_offset;
    5567             :                         }
    5568           0 :                         ndr->flags = _flags_save_spoolss_security_descriptor;
    5569             :                 }
    5570             :         }
    5571           0 :         return NDR_ERR_SUCCESS;
    5572             : }
    5573             : 
    5574           0 : static void ndr_print_flags_spoolss_JobInfo4(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_JobInfo4 *r)
    5575             : {
    5576           0 :         ndr_print_spoolss_JobInfo4(ndr, name, r);
    5577           0 : }
    5578             : 
    5579           0 : _PUBLIC_ void ndr_print_spoolss_JobInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfo4 *r)
    5580             : {
    5581           0 :         ndr_print_struct(ndr, name, "spoolss_JobInfo4");
    5582           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    5583           0 :         ndr->depth++;
    5584           0 :         ndr_print_uint32(ndr, "job_id", r->job_id);
    5585             :         {
    5586           0 :                 uint32_t _flags_save_string = ndr->flags;
    5587           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5588           0 :                 ndr_print_ptr(ndr, "printer_name", r->printer_name);
    5589           0 :                 ndr->depth++;
    5590           0 :                 if (r->printer_name) {
    5591           0 :                         ndr_print_string(ndr, "printer_name", r->printer_name);
    5592             :                 }
    5593           0 :                 ndr->depth--;
    5594           0 :                 ndr->flags = _flags_save_string;
    5595             :         }
    5596             :         {
    5597           0 :                 uint32_t _flags_save_string = ndr->flags;
    5598           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5599           0 :                 ndr_print_ptr(ndr, "server_name", r->server_name);
    5600           0 :                 ndr->depth++;
    5601           0 :                 if (r->server_name) {
    5602           0 :                         ndr_print_string(ndr, "server_name", r->server_name);
    5603             :                 }
    5604           0 :                 ndr->depth--;
    5605           0 :                 ndr->flags = _flags_save_string;
    5606             :         }
    5607             :         {
    5608           0 :                 uint32_t _flags_save_string = ndr->flags;
    5609           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5610           0 :                 ndr_print_ptr(ndr, "user_name", r->user_name);
    5611           0 :                 ndr->depth++;
    5612           0 :                 if (r->user_name) {
    5613           0 :                         ndr_print_string(ndr, "user_name", r->user_name);
    5614             :                 }
    5615           0 :                 ndr->depth--;
    5616           0 :                 ndr->flags = _flags_save_string;
    5617             :         }
    5618             :         {
    5619           0 :                 uint32_t _flags_save_string = ndr->flags;
    5620           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5621           0 :                 ndr_print_ptr(ndr, "document_name", r->document_name);
    5622           0 :                 ndr->depth++;
    5623           0 :                 if (r->document_name) {
    5624           0 :                         ndr_print_string(ndr, "document_name", r->document_name);
    5625             :                 }
    5626           0 :                 ndr->depth--;
    5627           0 :                 ndr->flags = _flags_save_string;
    5628             :         }
    5629             :         {
    5630           0 :                 uint32_t _flags_save_string = ndr->flags;
    5631           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5632           0 :                 ndr_print_ptr(ndr, "notify_name", r->notify_name);
    5633           0 :                 ndr->depth++;
    5634           0 :                 if (r->notify_name) {
    5635           0 :                         ndr_print_string(ndr, "notify_name", r->notify_name);
    5636             :                 }
    5637           0 :                 ndr->depth--;
    5638           0 :                 ndr->flags = _flags_save_string;
    5639             :         }
    5640             :         {
    5641           0 :                 uint32_t _flags_save_string = ndr->flags;
    5642           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5643           0 :                 ndr_print_ptr(ndr, "data_type", r->data_type);
    5644           0 :                 ndr->depth++;
    5645           0 :                 if (r->data_type) {
    5646           0 :                         ndr_print_string(ndr, "data_type", r->data_type);
    5647             :                 }
    5648           0 :                 ndr->depth--;
    5649           0 :                 ndr->flags = _flags_save_string;
    5650             :         }
    5651             :         {
    5652           0 :                 uint32_t _flags_save_string = ndr->flags;
    5653           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5654           0 :                 ndr_print_ptr(ndr, "print_processor", r->print_processor);
    5655           0 :                 ndr->depth++;
    5656           0 :                 if (r->print_processor) {
    5657           0 :                         ndr_print_string(ndr, "print_processor", r->print_processor);
    5658             :                 }
    5659           0 :                 ndr->depth--;
    5660           0 :                 ndr->flags = _flags_save_string;
    5661             :         }
    5662             :         {
    5663           0 :                 uint32_t _flags_save_string = ndr->flags;
    5664           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5665           0 :                 ndr_print_ptr(ndr, "parameters", r->parameters);
    5666           0 :                 ndr->depth++;
    5667           0 :                 if (r->parameters) {
    5668           0 :                         ndr_print_string(ndr, "parameters", r->parameters);
    5669             :                 }
    5670           0 :                 ndr->depth--;
    5671           0 :                 ndr->flags = _flags_save_string;
    5672             :         }
    5673             :         {
    5674           0 :                 uint32_t _flags_save_string = ndr->flags;
    5675           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5676           0 :                 ndr_print_ptr(ndr, "driver_name", r->driver_name);
    5677           0 :                 ndr->depth++;
    5678           0 :                 if (r->driver_name) {
    5679           0 :                         ndr_print_string(ndr, "driver_name", r->driver_name);
    5680             :                 }
    5681           0 :                 ndr->depth--;
    5682           0 :                 ndr->flags = _flags_save_string;
    5683             :         }
    5684             :         {
    5685           0 :                 uint32_t _flags_save_spoolss_DeviceMode = ndr->flags;
    5686           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5687           0 :                 ndr_print_ptr(ndr, "devmode", r->devmode);
    5688           0 :                 ndr->depth++;
    5689           0 :                 if (r->devmode) {
    5690           0 :                         ndr_print_spoolss_DeviceMode(ndr, "devmode", r->devmode);
    5691             :                 }
    5692           0 :                 ndr->depth--;
    5693           0 :                 ndr->flags = _flags_save_spoolss_DeviceMode;
    5694             :         }
    5695             :         {
    5696           0 :                 uint32_t _flags_save_string = ndr->flags;
    5697           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
    5698           0 :                 ndr_print_ptr(ndr, "text_status", r->text_status);
    5699           0 :                 ndr->depth++;
    5700           0 :                 if (r->text_status) {
    5701           0 :                         ndr_print_string(ndr, "text_status", r->text_status);
    5702             :                 }
    5703           0 :                 ndr->depth--;
    5704           0 :                 ndr->flags = _flags_save_string;
    5705             :         }
    5706             :         {
    5707           0 :                 uint32_t _flags_save_spoolss_security_descriptor = ndr->flags;
    5708           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
    5709           0 :                 ndr_print_ptr(ndr, "secdesc", r->secdesc);
    5710           0 :                 ndr->depth++;
    5711           0 :                 if (r->secdesc) {
    5712           0 :                         ndr_print_spoolss_security_descriptor(ndr, "secdesc", r->secdesc);
    5713             :                 }
    5714           0 :                 ndr->depth--;
    5715           0 :                 ndr->flags = _flags_save_spoolss_security_descriptor;
    5716             :         }
    5717           0 :         ndr_print_spoolss_JobStatus(ndr, "status", r->status);
    5718           0 :         ndr_print_uint32(ndr, "priority", r->priority);
    5719           0 :         ndr_print_uint32(ndr, "position", r->position);
    5720           0 :         ndr_print_uint32(ndr, "start_time", r->start_time);
    5721           0 :         ndr_print_uint32(ndr, "until_time", r->until_time);
    5722           0 :         ndr_print_uint32(ndr, "total_pages", r->total_pages);
    5723           0 :         ndr_print_uint32(ndr, "size", r->size);
    5724           0 :         ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
    5725           0 :         ndr_print_uint32(ndr, "time", r->time);
    5726           0 :         ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
    5727           0 :         ndr_print_uint32(ndr, "size_high", r->size_high);
    5728           0 :         ndr->depth--;
    5729             : }
    5730             : 
    5731           0 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo4(const struct spoolss_JobInfo4 *r, int flags)
    5732             : {
    5733           0 :         return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo4);
    5734             : }
    5735             : 
    5736         960 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_JobInfo *r)
    5737             : {
    5738         960 :         uint32_t _save_relative_base_offset = ndr_push_get_relative_base_offset(ndr);
    5739             :         uint32_t level;
    5740             :         {
    5741         960 :                 uint32_t _flags_save_UNION = ndr->flags;
    5742         960 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
    5743         960 :                 NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5744         960 :                 if (ndr_flags & NDR_SCALARS) {
    5745             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5746         576 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5747         576 :                         NDR_CHECK(ndr_push_union_align(ndr, 5));
    5748         576 :                         switch (level) {
    5749         480 :                                 case 1: {
    5750         480 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    5751         480 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    5752         480 :                                         NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr, NDR_SCALARS, &r->info1));
    5753         480 :                                 break; }
    5754             : 
    5755          96 :                                 case 2: {
    5756          96 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    5757          96 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    5758          96 :                                         NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr, NDR_SCALARS, &r->info2));
    5759          96 :                                 break; }
    5760             : 
    5761           0 :                                 case 3: {
    5762           0 :                                         NDR_CHECK(ndr_push_align(ndr, 4));
    5763           0 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    5764           0 :                                         NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr, NDR_SCALARS, &r->info3));
    5765           0 :                                 break; }
    5766             : 
    5767           0 :                                 case 4: {
    5768           0 :                                         NDR_CHECK(ndr_push_align(ndr, 5));
    5769           0 :                                         NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr->offset));
    5770           0 :                                         NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr, NDR_SCALARS, &r->info4));
    5771           0 :                                 break; }
    5772             : 
    5773           0 :                                 default: {
    5774           0 :                                 break; }
    5775             : 
    5776             :                         }
    5777         192 :                 }
    5778         960 :                 if (ndr_flags & NDR_BUFFERS) {
    5779         576 :                         if (!(ndr_flags & NDR_SCALARS)) {
    5780             :                                 /* We didn't get it above, and the token is not needed after this. */
    5781         384 :                                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    5782             :                         }
    5783         576 :                         NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));
    5784         576 :                         switch (level) {
    5785         480 :                                 case 1:
    5786         480 :                                         NDR_CHECK(ndr_push_spoolss_JobInfo1(ndr, NDR_BUFFERS, &r->info1));
    5787         480 :                                 break;
    5788             : 
    5789          96 :                                 case 2:
    5790          96 :                                         NDR_CHECK(ndr_push_spoolss_JobInfo2(ndr, NDR_BUFFERS, &r->info2));
    5791          96 :                                 break;
    5792             : 
    5793           0 :                                 case 3:
    5794           0 :                                 break;
    5795             : 
    5796           0 :                                 case 4:
    5797           0 :                                         NDR_CHECK(ndr_push_spoolss_JobInfo4(ndr, NDR_BUFFERS, &r->info4));
    5798           0 :                                 break;
    5799             : 
    5800           0 :                                 default:
    5801           0 :                                 break;
    5802             : 
    5803             :                         }
    5804         192 :                 }
    5805         960 :                 ndr->flags = _flags_save_UNION;
    5806             :         }
    5807         960 :         ndr_push_restore_relative_base_offset(ndr, _save_relative_base_offset);
    5808         960 :         return NDR_ERR_SUCCESS;
    5809             : }
    5810             : 
    5811         320 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_JobInfo *r)
    5812             : {
    5813         320 :         uint32_t _save_relative_base_offset = ndr_pull_get_relative_base_offset(ndr);
    5814             :         uint32_t level;
    5815             :         {
    5816         320 :                 uint32_t _flags_save_UNION = ndr->flags;
    5817         320 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
    5818         320 :                 NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    5819         320 :                 if (ndr_flags & NDR_SCALARS) {
    5820             :                         /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    5821         192 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5822         192 :                         NDR_CHECK(ndr_pull_union_align(ndr, 5));
    5823         192 :                         switch (level) {
    5824         160 :                                 case 1: {
    5825         160 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    5826         160 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    5827         160 :                                         NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr, NDR_SCALARS, &r->info1));
    5828         160 :                                 break; }
    5829             : 
    5830          32 :                                 case 2: {
    5831          32 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    5832          32 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    5833          32 :                                         NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr, NDR_SCALARS, &r->info2));
    5834          32 :                                 break; }
    5835             : 
    5836           0 :                                 case 3: {
    5837           0 :                                         NDR_CHECK(ndr_pull_align(ndr, 4));
    5838           0 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    5839           0 :                                         NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr, NDR_SCALARS, &r->info3));
    5840           0 :                                 break; }
    5841             : 
    5842           0 :                                 case 4: {
    5843           0 :                                         NDR_CHECK(ndr_pull_align(ndr, 5));
    5844           0 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset1(ndr, r, ndr->offset));
    5845           0 :                                         NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr, NDR_SCALARS, &r->info4));
    5846           0 :                                 break; }
    5847             : 
    5848           0 :                                 default: {
    5849           0 :                                 break; }
    5850             : 
    5851             :                         }
    5852          64 :                 }
    5853         320 :                 if (ndr_flags & NDR_BUFFERS) {
    5854         192 :                         if (!(ndr_flags & NDR_SCALARS)) {
    5855             :                                 /* We didn't get it above, and the token is not needed after this. */
    5856         128 :                                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    5857             :                         }
    5858         192 :                         switch (level) {
    5859         160 :                                 case 1:
    5860         160 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    5861         160 :                                         NDR_CHECK(ndr_pull_spoolss_JobInfo1(ndr, NDR_BUFFERS, &r->info1));
    5862         160 :                                 break;
    5863             : 
    5864          32 :                                 case 2:
    5865          32 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    5866          32 :                                         NDR_CHECK(ndr_pull_spoolss_JobInfo2(ndr, NDR_BUFFERS, &r->info2));
    5867          32 :                                 break;
    5868             : 
    5869           0 :                                 case 3:
    5870           0 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    5871           0 :                                 break;
    5872             : 
    5873           0 :                                 case 4:
    5874           0 :                                         NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));
    5875           0 :                                         NDR_CHECK(ndr_pull_spoolss_JobInfo4(ndr, NDR_BUFFERS, &r->info4));
    5876           0 :                                 break;
    5877             : 
    5878           0 :                                 default:
    5879           0 :                                 break;
    5880             : 
    5881             :                         }
    5882          64 :                 }
    5883         320 :                 ndr->flags = _flags_save_UNION;
    5884             :         }
    5885         320 :         ndr_pull_restore_relative_base_offset(ndr, _save_relative_base_offset);
    5886         320 :         return NDR_ERR_SUCCESS;
    5887             : }
    5888             : 
    5889           0 : _PUBLIC_ void ndr_print_spoolss_JobInfo(struct ndr_print *ndr, const char *name, const union spoolss_JobInfo *r)
    5890             : {
    5891             :         uint32_t level;
    5892             :         {
    5893           0 :                 uint32_t _flags_save_UNION = ndr->flags;
    5894           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_RELATIVE_REVERSE);
    5895           0 :                 level = ndr_print_steal_switch_value(ndr, r);
    5896           0 :                 ndr_print_union(ndr, name, level, "spoolss_JobInfo");
    5897           0 :                 switch (level) {
    5898           0 :                         case 1:
    5899           0 :                                 ndr_print_spoolss_JobInfo1(ndr, "info1", &r->info1);
    5900           0 :                         break;
    5901             : 
    5902           0 :                         case 2:
    5903           0 :                                 ndr_print_spoolss_JobInfo2(ndr, "info2", &r->info2);
    5904           0 :                         break;
    5905             : 
    5906           0 :                         case 3:
    5907           0 :                                 ndr_print_spoolss_JobInfo3(ndr, "info3", &r->info3);
    5908           0 :                         break;
    5909             : 
    5910           0 :                         case 4:
    5911           0 :                                 ndr_print_spoolss_JobInfo4(ndr, "info4", &r->info4);
    5912           0 :                         break;
    5913             : 
    5914           0 :                         default:
    5915           0 :                         break;
    5916             : 
    5917             :                 }
    5918           0 :                 ndr->flags = _flags_save_UNION;
    5919             :         }
    5920           0 : }
    5921             : 
    5922         128 : _PUBLIC_ size_t ndr_size_spoolss_JobInfo(const union spoolss_JobInfo *r, uint32_t level, int flags)
    5923             : {
    5924         128 :         flags |= LIBNDR_FLAG_RELATIVE_REVERSE;
    5925         128 :         return ndr_size_union(r, flags, level, (ndr_push_flags_fn_t)ndr_push_spoolss_JobInfo);
    5926             : }
    5927             : 
    5928          32 : static enum ndr_err_code ndr_push_spoolss_SetJobInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetJobInfo1 *r)
    5929             : {
    5930          32 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    5931          32 :         if (ndr_flags & NDR_SCALARS) {
    5932          32 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    5933          32 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
    5934          32 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
    5935          32 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
    5936          32 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
    5937          32 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
    5938          32 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
    5939          32 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
    5940          32 :                 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
    5941          32 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
    5942          32 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
    5943          32 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
    5944          32 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
    5945          32 :                 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    5946          32 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    5947             :         }
    5948          32 :         if (ndr_flags & NDR_BUFFERS) {
    5949          32 :                 if (r->printer_name) {
    5950          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
    5951          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5952          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
    5953          32 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5954             :                 }
    5955          32 :                 if (r->server_name) {
    5956          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    5957          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5958          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    5959          32 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5960             :                 }
    5961          32 :                 if (r->user_name) {
    5962          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
    5963          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5964          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
    5965          32 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5966             :                 }
    5967          32 :                 if (r->document_name) {
    5968          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
    5969          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5970          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
    5971          32 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5972             :                 }
    5973          32 :                 if (r->data_type) {
    5974          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
    5975          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5976          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
    5977          32 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5978             :                 }
    5979          32 :                 if (r->text_status) {
    5980          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
    5981          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    5982          32 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
    5983          32 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    5984             :                 }
    5985             :         }
    5986          32 :         return NDR_ERR_SUCCESS;
    5987             : }
    5988             : 
    5989          32 : static enum ndr_err_code ndr_pull_spoolss_SetJobInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetJobInfo1 *r)
    5990             : {
    5991             :         uint32_t _ptr_printer_name;
    5992          32 :         uint32_t size_printer_name_1 = 0;
    5993          32 :         uint32_t length_printer_name_1 = 0;
    5994          32 :         TALLOC_CTX *_mem_save_printer_name_0 = NULL;
    5995             :         uint32_t _ptr_server_name;
    5996          32 :         uint32_t size_server_name_1 = 0;
    5997          32 :         uint32_t length_server_name_1 = 0;
    5998          32 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    5999             :         uint32_t _ptr_user_name;
    6000          32 :         uint32_t size_user_name_1 = 0;
    6001          32 :         uint32_t length_user_name_1 = 0;
    6002          32 :         TALLOC_CTX *_mem_save_user_name_0 = NULL;
    6003             :         uint32_t _ptr_document_name;
    6004          32 :         uint32_t size_document_name_1 = 0;
    6005          32 :         uint32_t length_document_name_1 = 0;
    6006          32 :         TALLOC_CTX *_mem_save_document_name_0 = NULL;
    6007             :         uint32_t _ptr_data_type;
    6008          32 :         uint32_t size_data_type_1 = 0;
    6009          32 :         uint32_t length_data_type_1 = 0;
    6010          32 :         TALLOC_CTX *_mem_save_data_type_0 = NULL;
    6011             :         uint32_t _ptr_text_status;
    6012          32 :         uint32_t size_text_status_1 = 0;
    6013          32 :         uint32_t length_text_status_1 = 0;
    6014          32 :         TALLOC_CTX *_mem_save_text_status_0 = NULL;
    6015          32 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6016          32 :         if (ndr_flags & NDR_SCALARS) {
    6017          32 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6018          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
    6019          32 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
    6020          32 :                 if (_ptr_printer_name) {
    6021          32 :                         NDR_PULL_ALLOC(ndr, r->printer_name);
    6022             :                 } else {
    6023           0 :                         r->printer_name = NULL;
    6024             :                 }
    6025          32 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    6026          32 :                 if (_ptr_server_name) {
    6027          32 :                         NDR_PULL_ALLOC(ndr, r->server_name);
    6028             :                 } else {
    6029           0 :                         r->server_name = NULL;
    6030             :                 }
    6031          32 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
    6032          32 :                 if (_ptr_user_name) {
    6033          32 :                         NDR_PULL_ALLOC(ndr, r->user_name);
    6034             :                 } else {
    6035           0 :                         r->user_name = NULL;
    6036             :                 }
    6037          32 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
    6038          32 :                 if (_ptr_document_name) {
    6039          32 :                         NDR_PULL_ALLOC(ndr, r->document_name);
    6040             :                 } else {
    6041           0 :                         r->document_name = NULL;
    6042             :                 }
    6043          32 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
    6044          32 :                 if (_ptr_data_type) {
    6045          32 :                         NDR_PULL_ALLOC(ndr, r->data_type);
    6046             :                 } else {
    6047           0 :                         r->data_type = NULL;
    6048             :                 }
    6049          32 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
    6050          32 :                 if (_ptr_text_status) {
    6051          32 :                         NDR_PULL_ALLOC(ndr, r->text_status);
    6052             :                 } else {
    6053           0 :                         r->text_status = NULL;
    6054             :                 }
    6055          32 :                 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
    6056          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
    6057          32 :                 if (r->priority > 99) {
    6058           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    6059             :                 }
    6060          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
    6061          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
    6062          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
    6063          32 :                 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    6064          32 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6065             :         }
    6066          32 :         if (ndr_flags & NDR_BUFFERS) {
    6067          32 :                 if (r->printer_name) {
    6068          32 :                         _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6069          32 :                         NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
    6070          32 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
    6071          32 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
    6072          32 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printer_name, &size_printer_name_1));
    6073          32 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printer_name, &length_printer_name_1));
    6074          32 :                         if (length_printer_name_1 > size_printer_name_1) {
    6075           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_printer_name_1, length_printer_name_1);
    6076             :                         }
    6077          32 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_printer_name_1, sizeof(uint16_t)));
    6078          32 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, length_printer_name_1, sizeof(uint16_t), CH_UTF16));
    6079          32 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
    6080             :                 }
    6081          32 :                 if (r->server_name) {
    6082          32 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6083          32 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    6084          32 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
    6085          32 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
    6086          32 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
    6087          32 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
    6088          32 :                         if (length_server_name_1 > size_server_name_1) {
    6089           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
    6090             :                         }
    6091          32 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
    6092          32 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
    6093          32 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    6094             :                 }
    6095          32 :                 if (r->user_name) {
    6096          32 :                         _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6097          32 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
    6098          32 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
    6099          32 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
    6100          32 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
    6101          32 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
    6102          32 :                         if (length_user_name_1 > size_user_name_1) {
    6103           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_name_1, length_user_name_1);
    6104             :                         }
    6105          32 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
    6106          32 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
    6107          32 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
    6108             :                 }
    6109          32 :                 if (r->document_name) {
    6110          32 :                         _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6111          32 :                         NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
    6112          32 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
    6113          32 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
    6114          32 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->document_name, &size_document_name_1));
    6115          32 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->document_name, &length_document_name_1));
    6116          32 :                         if (length_document_name_1 > size_document_name_1) {
    6117           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_document_name_1, length_document_name_1);
    6118             :                         }
    6119          32 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_document_name_1, sizeof(uint16_t)));
    6120          32 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, length_document_name_1, sizeof(uint16_t), CH_UTF16));
    6121          32 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
    6122             :                 }
    6123          32 :                 if (r->data_type) {
    6124          32 :                         _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6125          32 :                         NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
    6126          32 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
    6127          32 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
    6128          32 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_type, &size_data_type_1));
    6129          32 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_type, &length_data_type_1));
    6130          32 :                         if (length_data_type_1 > size_data_type_1) {
    6131           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_data_type_1, length_data_type_1);
    6132             :                         }
    6133          32 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_data_type_1, sizeof(uint16_t)));
    6134          32 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, length_data_type_1, sizeof(uint16_t), CH_UTF16));
    6135          32 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
    6136             :                 }
    6137          32 :                 if (r->text_status) {
    6138          32 :                         _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6139          32 :                         NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
    6140          32 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
    6141          32 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
    6142          32 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->text_status, &size_text_status_1));
    6143          32 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->text_status, &length_text_status_1));
    6144          32 :                         if (length_text_status_1 > size_text_status_1) {
    6145           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_text_status_1, length_text_status_1);
    6146             :                         }
    6147          32 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_text_status_1, sizeof(uint16_t)));
    6148          32 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, length_text_status_1, sizeof(uint16_t), CH_UTF16));
    6149          32 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
    6150             :                 }
    6151             :         }
    6152          32 :         return NDR_ERR_SUCCESS;
    6153             : }
    6154             : 
    6155           0 : _PUBLIC_ void ndr_print_spoolss_SetJobInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo1 *r)
    6156             : {
    6157           0 :         ndr_print_struct(ndr, name, "spoolss_SetJobInfo1");
    6158           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6159           0 :         ndr->depth++;
    6160           0 :         ndr_print_uint32(ndr, "job_id", r->job_id);
    6161           0 :         ndr_print_ptr(ndr, "printer_name", r->printer_name);
    6162           0 :         ndr->depth++;
    6163           0 :         if (r->printer_name) {
    6164           0 :                 ndr_print_string(ndr, "printer_name", r->printer_name);
    6165             :         }
    6166           0 :         ndr->depth--;
    6167           0 :         ndr_print_ptr(ndr, "server_name", r->server_name);
    6168           0 :         ndr->depth++;
    6169           0 :         if (r->server_name) {
    6170           0 :                 ndr_print_string(ndr, "server_name", r->server_name);
    6171             :         }
    6172           0 :         ndr->depth--;
    6173           0 :         ndr_print_ptr(ndr, "user_name", r->user_name);
    6174           0 :         ndr->depth++;
    6175           0 :         if (r->user_name) {
    6176           0 :                 ndr_print_string(ndr, "user_name", r->user_name);
    6177             :         }
    6178           0 :         ndr->depth--;
    6179           0 :         ndr_print_ptr(ndr, "document_name", r->document_name);
    6180           0 :         ndr->depth++;
    6181           0 :         if (r->document_name) {
    6182           0 :                 ndr_print_string(ndr, "document_name", r->document_name);
    6183             :         }
    6184           0 :         ndr->depth--;
    6185           0 :         ndr_print_ptr(ndr, "data_type", r->data_type);
    6186           0 :         ndr->depth++;
    6187           0 :         if (r->data_type) {
    6188           0 :                 ndr_print_string(ndr, "data_type", r->data_type);
    6189             :         }
    6190           0 :         ndr->depth--;
    6191           0 :         ndr_print_ptr(ndr, "text_status", r->text_status);
    6192           0 :         ndr->depth++;
    6193           0 :         if (r->text_status) {
    6194           0 :                 ndr_print_string(ndr, "text_status", r->text_status);
    6195             :         }
    6196           0 :         ndr->depth--;
    6197           0 :         ndr_print_spoolss_JobStatus(ndr, "status", r->status);
    6198           0 :         ndr_print_uint32(ndr, "priority", r->priority);
    6199           0 :         ndr_print_uint32(ndr, "position", r->position);
    6200           0 :         ndr_print_uint32(ndr, "total_pages", r->total_pages);
    6201           0 :         ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
    6202           0 :         ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
    6203           0 :         ndr->depth--;
    6204             : }
    6205             : 
    6206           0 : static enum ndr_err_code ndr_push_spoolss_SetJobInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetJobInfo2 *r)
    6207             : {
    6208           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6209           0 :         if (ndr_flags & NDR_SCALARS) {
    6210           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6211           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
    6212           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
    6213           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
    6214           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
    6215           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
    6216           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->notify_name));
    6217           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
    6218           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->print_processor));
    6219           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
    6220           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
    6221           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->_devmode_ptr));
    6222           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
    6223           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->_secdesc_ptr));
    6224           0 :                 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
    6225           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
    6226           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
    6227           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
    6228           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
    6229           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
    6230           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
    6231           0 :                 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    6232           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
    6233           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
    6234           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6235             :         }
    6236           0 :         if (ndr_flags & NDR_BUFFERS) {
    6237           0 :                 if (r->printer_name) {
    6238           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
    6239           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6240           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
    6241           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6242             :                 }
    6243           0 :                 if (r->server_name) {
    6244           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    6245           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6246           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    6247           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6248             :                 }
    6249           0 :                 if (r->user_name) {
    6250           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
    6251           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6252           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
    6253           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6254             :                 }
    6255           0 :                 if (r->document_name) {
    6256           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
    6257           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6258           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
    6259           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6260             :                 }
    6261           0 :                 if (r->notify_name) {
    6262           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
    6263           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6264           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
    6265           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->notify_name, ndr_charset_length(r->notify_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6266             :                 }
    6267           0 :                 if (r->data_type) {
    6268           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
    6269           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6270           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
    6271           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6272             :                 }
    6273           0 :                 if (r->print_processor) {
    6274           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
    6275           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6276           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
    6277           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->print_processor, ndr_charset_length(r->print_processor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6278             :                 }
    6279           0 :                 if (r->parameters) {
    6280           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
    6281           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6282           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
    6283           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6284             :                 }
    6285           0 :                 if (r->driver_name) {
    6286           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
    6287           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6288           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
    6289           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6290             :                 }
    6291           0 :                 if (r->text_status) {
    6292           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
    6293           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6294           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
    6295           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6296             :                 }
    6297             :         }
    6298           0 :         return NDR_ERR_SUCCESS;
    6299             : }
    6300             : 
    6301           0 : static enum ndr_err_code ndr_pull_spoolss_SetJobInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetJobInfo2 *r)
    6302             : {
    6303             :         uint32_t _ptr_printer_name;
    6304           0 :         uint32_t size_printer_name_1 = 0;
    6305           0 :         uint32_t length_printer_name_1 = 0;
    6306           0 :         TALLOC_CTX *_mem_save_printer_name_0 = NULL;
    6307             :         uint32_t _ptr_server_name;
    6308           0 :         uint32_t size_server_name_1 = 0;
    6309           0 :         uint32_t length_server_name_1 = 0;
    6310           0 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    6311             :         uint32_t _ptr_user_name;
    6312           0 :         uint32_t size_user_name_1 = 0;
    6313           0 :         uint32_t length_user_name_1 = 0;
    6314           0 :         TALLOC_CTX *_mem_save_user_name_0 = NULL;
    6315             :         uint32_t _ptr_document_name;
    6316           0 :         uint32_t size_document_name_1 = 0;
    6317           0 :         uint32_t length_document_name_1 = 0;
    6318           0 :         TALLOC_CTX *_mem_save_document_name_0 = NULL;
    6319             :         uint32_t _ptr_notify_name;
    6320           0 :         uint32_t size_notify_name_1 = 0;
    6321           0 :         uint32_t length_notify_name_1 = 0;
    6322           0 :         TALLOC_CTX *_mem_save_notify_name_0 = NULL;
    6323             :         uint32_t _ptr_data_type;
    6324           0 :         uint32_t size_data_type_1 = 0;
    6325           0 :         uint32_t length_data_type_1 = 0;
    6326           0 :         TALLOC_CTX *_mem_save_data_type_0 = NULL;
    6327             :         uint32_t _ptr_print_processor;
    6328           0 :         uint32_t size_print_processor_1 = 0;
    6329           0 :         uint32_t length_print_processor_1 = 0;
    6330           0 :         TALLOC_CTX *_mem_save_print_processor_0 = NULL;
    6331             :         uint32_t _ptr_parameters;
    6332           0 :         uint32_t size_parameters_1 = 0;
    6333           0 :         uint32_t length_parameters_1 = 0;
    6334           0 :         TALLOC_CTX *_mem_save_parameters_0 = NULL;
    6335             :         uint32_t _ptr_driver_name;
    6336           0 :         uint32_t size_driver_name_1 = 0;
    6337           0 :         uint32_t length_driver_name_1 = 0;
    6338           0 :         TALLOC_CTX *_mem_save_driver_name_0 = NULL;
    6339             :         uint32_t _ptr_text_status;
    6340           0 :         uint32_t size_text_status_1 = 0;
    6341           0 :         uint32_t length_text_status_1 = 0;
    6342           0 :         TALLOC_CTX *_mem_save_text_status_0 = NULL;
    6343           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6344           0 :         if (ndr_flags & NDR_SCALARS) {
    6345           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6346           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
    6347           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
    6348           0 :                 if (_ptr_printer_name) {
    6349           0 :                         NDR_PULL_ALLOC(ndr, r->printer_name);
    6350             :                 } else {
    6351           0 :                         r->printer_name = NULL;
    6352             :                 }
    6353           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    6354           0 :                 if (_ptr_server_name) {
    6355           0 :                         NDR_PULL_ALLOC(ndr, r->server_name);
    6356             :                 } else {
    6357           0 :                         r->server_name = NULL;
    6358             :                 }
    6359           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
    6360           0 :                 if (_ptr_user_name) {
    6361           0 :                         NDR_PULL_ALLOC(ndr, r->user_name);
    6362             :                 } else {
    6363           0 :                         r->user_name = NULL;
    6364             :                 }
    6365           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
    6366           0 :                 if (_ptr_document_name) {
    6367           0 :                         NDR_PULL_ALLOC(ndr, r->document_name);
    6368             :                 } else {
    6369           0 :                         r->document_name = NULL;
    6370             :                 }
    6371           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
    6372           0 :                 if (_ptr_notify_name) {
    6373           0 :                         NDR_PULL_ALLOC(ndr, r->notify_name);
    6374             :                 } else {
    6375           0 :                         r->notify_name = NULL;
    6376             :                 }
    6377           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
    6378           0 :                 if (_ptr_data_type) {
    6379           0 :                         NDR_PULL_ALLOC(ndr, r->data_type);
    6380             :                 } else {
    6381           0 :                         r->data_type = NULL;
    6382             :                 }
    6383           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
    6384           0 :                 if (_ptr_print_processor) {
    6385           0 :                         NDR_PULL_ALLOC(ndr, r->print_processor);
    6386             :                 } else {
    6387           0 :                         r->print_processor = NULL;
    6388             :                 }
    6389           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
    6390           0 :                 if (_ptr_parameters) {
    6391           0 :                         NDR_PULL_ALLOC(ndr, r->parameters);
    6392             :                 } else {
    6393           0 :                         r->parameters = NULL;
    6394             :                 }
    6395           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
    6396           0 :                 if (_ptr_driver_name) {
    6397           0 :                         NDR_PULL_ALLOC(ndr, r->driver_name);
    6398             :                 } else {
    6399           0 :                         r->driver_name = NULL;
    6400             :                 }
    6401           0 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->_devmode_ptr));
    6402           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
    6403           0 :                 if (_ptr_text_status) {
    6404           0 :                         NDR_PULL_ALLOC(ndr, r->text_status);
    6405             :                 } else {
    6406           0 :                         r->text_status = NULL;
    6407             :                 }
    6408           0 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->_secdesc_ptr));
    6409           0 :                 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
    6410           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
    6411           0 :                 if (r->priority > 99) {
    6412           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    6413             :                 }
    6414           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
    6415           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
    6416           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
    6417           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
    6418           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
    6419           0 :                 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    6420           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
    6421           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
    6422           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6423             :         }
    6424           0 :         if (ndr_flags & NDR_BUFFERS) {
    6425           0 :                 if (r->printer_name) {
    6426           0 :                         _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6427           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
    6428           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
    6429           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
    6430           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printer_name, &size_printer_name_1));
    6431           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printer_name, &length_printer_name_1));
    6432           0 :                         if (length_printer_name_1 > size_printer_name_1) {
    6433           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_printer_name_1, length_printer_name_1);
    6434             :                         }
    6435           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_printer_name_1, sizeof(uint16_t)));
    6436           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, length_printer_name_1, sizeof(uint16_t), CH_UTF16));
    6437           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
    6438             :                 }
    6439           0 :                 if (r->server_name) {
    6440           0 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6441           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    6442           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
    6443           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
    6444           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
    6445           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
    6446           0 :                         if (length_server_name_1 > size_server_name_1) {
    6447           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
    6448             :                         }
    6449           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
    6450           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
    6451           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    6452             :                 }
    6453           0 :                 if (r->user_name) {
    6454           0 :                         _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6455           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
    6456           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
    6457           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
    6458           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
    6459           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
    6460           0 :                         if (length_user_name_1 > size_user_name_1) {
    6461           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_name_1, length_user_name_1);
    6462             :                         }
    6463           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
    6464           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
    6465           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
    6466             :                 }
    6467           0 :                 if (r->document_name) {
    6468           0 :                         _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6469           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
    6470           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
    6471           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
    6472           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->document_name, &size_document_name_1));
    6473           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->document_name, &length_document_name_1));
    6474           0 :                         if (length_document_name_1 > size_document_name_1) {
    6475           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_document_name_1, length_document_name_1);
    6476             :                         }
    6477           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_document_name_1, sizeof(uint16_t)));
    6478           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, length_document_name_1, sizeof(uint16_t), CH_UTF16));
    6479           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
    6480             :                 }
    6481           0 :                 if (r->notify_name) {
    6482           0 :                         _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6483           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
    6484           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->notify_name));
    6485           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->notify_name));
    6486           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->notify_name, &size_notify_name_1));
    6487           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->notify_name, &length_notify_name_1));
    6488           0 :                         if (length_notify_name_1 > size_notify_name_1) {
    6489           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_notify_name_1, length_notify_name_1);
    6490             :                         }
    6491           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_notify_name_1, sizeof(uint16_t)));
    6492           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->notify_name, length_notify_name_1, sizeof(uint16_t), CH_UTF16));
    6493           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
    6494             :                 }
    6495           0 :                 if (r->data_type) {
    6496           0 :                         _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6497           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
    6498           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
    6499           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
    6500           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_type, &size_data_type_1));
    6501           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_type, &length_data_type_1));
    6502           0 :                         if (length_data_type_1 > size_data_type_1) {
    6503           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_data_type_1, length_data_type_1);
    6504             :                         }
    6505           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_data_type_1, sizeof(uint16_t)));
    6506           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, length_data_type_1, sizeof(uint16_t), CH_UTF16));
    6507           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
    6508             :                 }
    6509           0 :                 if (r->print_processor) {
    6510           0 :                         _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6511           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
    6512           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->print_processor));
    6513           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->print_processor));
    6514           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->print_processor, &size_print_processor_1));
    6515           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->print_processor, &length_print_processor_1));
    6516           0 :                         if (length_print_processor_1 > size_print_processor_1) {
    6517           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_print_processor_1, length_print_processor_1);
    6518             :                         }
    6519           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_print_processor_1, sizeof(uint16_t)));
    6520           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->print_processor, length_print_processor_1, sizeof(uint16_t), CH_UTF16));
    6521           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
    6522             :                 }
    6523           0 :                 if (r->parameters) {
    6524           0 :                         _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6525           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
    6526           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->parameters));
    6527           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->parameters));
    6528           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->parameters, &size_parameters_1));
    6529           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->parameters, &length_parameters_1));
    6530           0 :                         if (length_parameters_1 > size_parameters_1) {
    6531           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_parameters_1, length_parameters_1);
    6532             :                         }
    6533           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_parameters_1, sizeof(uint16_t)));
    6534           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->parameters, length_parameters_1, sizeof(uint16_t), CH_UTF16));
    6535           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
    6536             :                 }
    6537           0 :                 if (r->driver_name) {
    6538           0 :                         _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6539           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
    6540           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
    6541           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
    6542           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
    6543           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
    6544           0 :                         if (length_driver_name_1 > size_driver_name_1) {
    6545           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_driver_name_1, length_driver_name_1);
    6546             :                         }
    6547           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
    6548           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
    6549           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
    6550             :                 }
    6551           0 :                 if (r->text_status) {
    6552           0 :                         _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6553           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
    6554           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
    6555           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
    6556           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->text_status, &size_text_status_1));
    6557           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->text_status, &length_text_status_1));
    6558           0 :                         if (length_text_status_1 > size_text_status_1) {
    6559           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_text_status_1, length_text_status_1);
    6560             :                         }
    6561           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_text_status_1, sizeof(uint16_t)));
    6562           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, length_text_status_1, sizeof(uint16_t), CH_UTF16));
    6563           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
    6564             :                 }
    6565             :         }
    6566           0 :         return NDR_ERR_SUCCESS;
    6567             : }
    6568             : 
    6569           0 : _PUBLIC_ void ndr_print_spoolss_SetJobInfo2(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo2 *r)
    6570             : {
    6571           0 :         ndr_print_struct(ndr, name, "spoolss_SetJobInfo2");
    6572           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    6573           0 :         ndr->depth++;
    6574           0 :         ndr_print_uint32(ndr, "job_id", r->job_id);
    6575           0 :         ndr_print_ptr(ndr, "printer_name", r->printer_name);
    6576           0 :         ndr->depth++;
    6577           0 :         if (r->printer_name) {
    6578           0 :                 ndr_print_string(ndr, "printer_name", r->printer_name);
    6579             :         }
    6580           0 :         ndr->depth--;
    6581           0 :         ndr_print_ptr(ndr, "server_name", r->server_name);
    6582           0 :         ndr->depth++;
    6583           0 :         if (r->server_name) {
    6584           0 :                 ndr_print_string(ndr, "server_name", r->server_name);
    6585             :         }
    6586           0 :         ndr->depth--;
    6587           0 :         ndr_print_ptr(ndr, "user_name", r->user_name);
    6588           0 :         ndr->depth++;
    6589           0 :         if (r->user_name) {
    6590           0 :                 ndr_print_string(ndr, "user_name", r->user_name);
    6591             :         }
    6592           0 :         ndr->depth--;
    6593           0 :         ndr_print_ptr(ndr, "document_name", r->document_name);
    6594           0 :         ndr->depth++;
    6595           0 :         if (r->document_name) {
    6596           0 :                 ndr_print_string(ndr, "document_name", r->document_name);
    6597             :         }
    6598           0 :         ndr->depth--;
    6599           0 :         ndr_print_ptr(ndr, "notify_name", r->notify_name);
    6600           0 :         ndr->depth++;
    6601           0 :         if (r->notify_name) {
    6602           0 :                 ndr_print_string(ndr, "notify_name", r->notify_name);
    6603             :         }
    6604           0 :         ndr->depth--;
    6605           0 :         ndr_print_ptr(ndr, "data_type", r->data_type);
    6606           0 :         ndr->depth++;
    6607           0 :         if (r->data_type) {
    6608           0 :                 ndr_print_string(ndr, "data_type", r->data_type);
    6609             :         }
    6610           0 :         ndr->depth--;
    6611           0 :         ndr_print_ptr(ndr, "print_processor", r->print_processor);
    6612           0 :         ndr->depth++;
    6613           0 :         if (r->print_processor) {
    6614           0 :                 ndr_print_string(ndr, "print_processor", r->print_processor);
    6615             :         }
    6616           0 :         ndr->depth--;
    6617           0 :         ndr_print_ptr(ndr, "parameters", r->parameters);
    6618           0 :         ndr->depth++;
    6619           0 :         if (r->parameters) {
    6620           0 :                 ndr_print_string(ndr, "parameters", r->parameters);
    6621             :         }
    6622           0 :         ndr->depth--;
    6623           0 :         ndr_print_ptr(ndr, "driver_name", r->driver_name);
    6624           0 :         ndr->depth++;
    6625           0 :         if (r->driver_name) {
    6626           0 :                 ndr_print_string(ndr, "driver_name", r->driver_name);
    6627             :         }
    6628           0 :         ndr->depth--;
    6629           0 :         ndr_print_uint3264(ndr, "_devmode_ptr", r->_devmode_ptr);
    6630           0 :         ndr_print_ptr(ndr, "text_status", r->text_status);
    6631           0 :         ndr->depth++;
    6632           0 :         if (r->text_status) {
    6633           0 :                 ndr_print_string(ndr, "text_status", r->text_status);
    6634             :         }
    6635           0 :         ndr->depth--;
    6636           0 :         ndr_print_uint3264(ndr, "_secdesc_ptr", r->_secdesc_ptr);
    6637           0 :         ndr_print_spoolss_JobStatus(ndr, "status", r->status);
    6638           0 :         ndr_print_uint32(ndr, "priority", r->priority);
    6639           0 :         ndr_print_uint32(ndr, "position", r->position);
    6640           0 :         ndr_print_uint32(ndr, "start_time", r->start_time);
    6641           0 :         ndr_print_uint32(ndr, "until_time", r->until_time);
    6642           0 :         ndr_print_uint32(ndr, "total_pages", r->total_pages);
    6643           0 :         ndr_print_uint32(ndr, "size", r->size);
    6644           0 :         ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
    6645           0 :         ndr_print_uint32(ndr, "time", r->time);
    6646           0 :         ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
    6647           0 :         ndr->depth--;
    6648             : }
    6649             : 
    6650           0 : static enum ndr_err_code ndr_push_spoolss_SetJobInfo4(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetJobInfo4 *r)
    6651             : {
    6652           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    6653           0 :         if (ndr_flags & NDR_SCALARS) {
    6654           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    6655           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->job_id));
    6656           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printer_name));
    6657           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
    6658           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user_name));
    6659           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->document_name));
    6660           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->notify_name));
    6661           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->data_type));
    6662           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->print_processor));
    6663           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
    6664           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->driver_name));
    6665           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->_devmode_ptr));
    6666           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->text_status));
    6667           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->_secdesc_ptr));
    6668           0 :                 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->status));
    6669           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
    6670           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->position));
    6671           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start_time));
    6672           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->until_time));
    6673           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
    6674           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
    6675           0 :                 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    6676           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
    6677           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pages_printed));
    6678           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size_high));
    6679           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    6680             :         }
    6681           0 :         if (ndr_flags & NDR_BUFFERS) {
    6682           0 :                 if (r->printer_name) {
    6683           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
    6684           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6685           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printer_name, CH_UTF16)));
    6686           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printer_name, ndr_charset_length(r->printer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6687             :                 }
    6688           0 :                 if (r->server_name) {
    6689           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    6690           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6691           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
    6692           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6693             :                 }
    6694           0 :                 if (r->user_name) {
    6695           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
    6696           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6697           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user_name, CH_UTF16)));
    6698           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user_name, ndr_charset_length(r->user_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6699             :                 }
    6700           0 :                 if (r->document_name) {
    6701           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
    6702           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6703           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->document_name, CH_UTF16)));
    6704           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->document_name, ndr_charset_length(r->document_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6705             :                 }
    6706           0 :                 if (r->notify_name) {
    6707           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
    6708           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6709           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->notify_name, CH_UTF16)));
    6710           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->notify_name, ndr_charset_length(r->notify_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6711             :                 }
    6712           0 :                 if (r->data_type) {
    6713           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
    6714           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6715           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->data_type, CH_UTF16)));
    6716           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->data_type, ndr_charset_length(r->data_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6717             :                 }
    6718           0 :                 if (r->print_processor) {
    6719           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
    6720           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6721           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->print_processor, CH_UTF16)));
    6722           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->print_processor, ndr_charset_length(r->print_processor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6723             :                 }
    6724           0 :                 if (r->parameters) {
    6725           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
    6726           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6727           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
    6728           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6729             :                 }
    6730           0 :                 if (r->driver_name) {
    6731           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
    6732           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6733           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->driver_name, CH_UTF16)));
    6734           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->driver_name, ndr_charset_length(r->driver_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6735             :                 }
    6736           0 :                 if (r->text_status) {
    6737           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
    6738           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    6739           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->text_status, CH_UTF16)));
    6740           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->text_status, ndr_charset_length(r->text_status, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    6741             :                 }
    6742             :         }
    6743           0 :         return NDR_ERR_SUCCESS;
    6744             : }
    6745             : 
    6746           0 : static enum ndr_err_code ndr_pull_spoolss_SetJobInfo4(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetJobInfo4 *r)
    6747             : {
    6748             :         uint32_t _ptr_printer_name;
    6749           0 :         uint32_t size_printer_name_1 = 0;
    6750           0 :         uint32_t length_printer_name_1 = 0;
    6751           0 :         TALLOC_CTX *_mem_save_printer_name_0 = NULL;
    6752             :         uint32_t _ptr_server_name;
    6753           0 :         uint32_t size_server_name_1 = 0;
    6754           0 :         uint32_t length_server_name_1 = 0;
    6755           0 :         TALLOC_CTX *_mem_save_server_name_0 = NULL;
    6756             :         uint32_t _ptr_user_name;
    6757           0 :         uint32_t size_user_name_1 = 0;
    6758           0 :         uint32_t length_user_name_1 = 0;
    6759           0 :         TALLOC_CTX *_mem_save_user_name_0 = NULL;
    6760             :         uint32_t _ptr_document_name;
    6761           0 :         uint32_t size_document_name_1 = 0;
    6762           0 :         uint32_t length_document_name_1 = 0;
    6763           0 :         TALLOC_CTX *_mem_save_document_name_0 = NULL;
    6764             :         uint32_t _ptr_notify_name;
    6765           0 :         uint32_t size_notify_name_1 = 0;
    6766           0 :         uint32_t length_notify_name_1 = 0;
    6767           0 :         TALLOC_CTX *_mem_save_notify_name_0 = NULL;
    6768             :         uint32_t _ptr_data_type;
    6769           0 :         uint32_t size_data_type_1 = 0;
    6770           0 :         uint32_t length_data_type_1 = 0;
    6771           0 :         TALLOC_CTX *_mem_save_data_type_0 = NULL;
    6772             :         uint32_t _ptr_print_processor;
    6773           0 :         uint32_t size_print_processor_1 = 0;
    6774           0 :         uint32_t length_print_processor_1 = 0;
    6775           0 :         TALLOC_CTX *_mem_save_print_processor_0 = NULL;
    6776             :         uint32_t _ptr_parameters;
    6777           0 :         uint32_t size_parameters_1 = 0;
    6778           0 :         uint32_t length_parameters_1 = 0;
    6779           0 :         TALLOC_CTX *_mem_save_parameters_0 = NULL;
    6780             :         uint32_t _ptr_driver_name;
    6781           0 :         uint32_t size_driver_name_1 = 0;
    6782           0 :         uint32_t length_driver_name_1 = 0;
    6783           0 :         TALLOC_CTX *_mem_save_driver_name_0 = NULL;
    6784             :         uint32_t _ptr_text_status;
    6785           0 :         uint32_t size_text_status_1 = 0;
    6786           0 :         uint32_t length_text_status_1 = 0;
    6787           0 :         TALLOC_CTX *_mem_save_text_status_0 = NULL;
    6788           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    6789           0 :         if (ndr_flags & NDR_SCALARS) {
    6790           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    6791           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->job_id));
    6792           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printer_name));
    6793           0 :                 if (_ptr_printer_name) {
    6794           0 :                         NDR_PULL_ALLOC(ndr, r->printer_name);
    6795             :                 } else {
    6796           0 :                         r->printer_name = NULL;
    6797             :                 }
    6798           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
    6799           0 :                 if (_ptr_server_name) {
    6800           0 :                         NDR_PULL_ALLOC(ndr, r->server_name);
    6801             :                 } else {
    6802           0 :                         r->server_name = NULL;
    6803             :                 }
    6804           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_name));
    6805           0 :                 if (_ptr_user_name) {
    6806           0 :                         NDR_PULL_ALLOC(ndr, r->user_name);
    6807             :                 } else {
    6808           0 :                         r->user_name = NULL;
    6809             :                 }
    6810           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_document_name));
    6811           0 :                 if (_ptr_document_name) {
    6812           0 :                         NDR_PULL_ALLOC(ndr, r->document_name);
    6813             :                 } else {
    6814           0 :                         r->document_name = NULL;
    6815             :                 }
    6816           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_notify_name));
    6817           0 :                 if (_ptr_notify_name) {
    6818           0 :                         NDR_PULL_ALLOC(ndr, r->notify_name);
    6819             :                 } else {
    6820           0 :                         r->notify_name = NULL;
    6821             :                 }
    6822           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_type));
    6823           0 :                 if (_ptr_data_type) {
    6824           0 :                         NDR_PULL_ALLOC(ndr, r->data_type);
    6825             :                 } else {
    6826           0 :                         r->data_type = NULL;
    6827             :                 }
    6828           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_print_processor));
    6829           0 :                 if (_ptr_print_processor) {
    6830           0 :                         NDR_PULL_ALLOC(ndr, r->print_processor);
    6831             :                 } else {
    6832           0 :                         r->print_processor = NULL;
    6833             :                 }
    6834           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parameters));
    6835           0 :                 if (_ptr_parameters) {
    6836           0 :                         NDR_PULL_ALLOC(ndr, r->parameters);
    6837             :                 } else {
    6838           0 :                         r->parameters = NULL;
    6839             :                 }
    6840           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_driver_name));
    6841           0 :                 if (_ptr_driver_name) {
    6842           0 :                         NDR_PULL_ALLOC(ndr, r->driver_name);
    6843             :                 } else {
    6844           0 :                         r->driver_name = NULL;
    6845             :                 }
    6846           0 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->_devmode_ptr));
    6847           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_text_status));
    6848           0 :                 if (_ptr_text_status) {
    6849           0 :                         NDR_PULL_ALLOC(ndr, r->text_status);
    6850             :                 } else {
    6851           0 :                         r->text_status = NULL;
    6852             :                 }
    6853           0 :                 NDR_CHECK(ndr_pull_uint3264(ndr, NDR_SCALARS, &r->_secdesc_ptr));
    6854           0 :                 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->status));
    6855           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
    6856           0 :                 if (r->priority > 99) {
    6857           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
    6858             :                 }
    6859           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->position));
    6860           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start_time));
    6861           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->until_time));
    6862           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
    6863           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
    6864           0 :                 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->submitted));
    6865           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
    6866           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pages_printed));
    6867           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size_high));
    6868           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    6869             :         }
    6870           0 :         if (ndr_flags & NDR_BUFFERS) {
    6871           0 :                 if (r->printer_name) {
    6872           0 :                         _mem_save_printer_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6873           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->printer_name, 0);
    6874           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->printer_name));
    6875           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->printer_name));
    6876           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printer_name, &size_printer_name_1));
    6877           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printer_name, &length_printer_name_1));
    6878           0 :                         if (length_printer_name_1 > size_printer_name_1) {
    6879           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_printer_name_1, length_printer_name_1);
    6880             :                         }
    6881           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_printer_name_1, sizeof(uint16_t)));
    6882           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printer_name, length_printer_name_1, sizeof(uint16_t), CH_UTF16));
    6883           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printer_name_0, 0);
    6884             :                 }
    6885           0 :                 if (r->server_name) {
    6886           0 :                         _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6887           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
    6888           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
    6889           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
    6890           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->server_name, &size_server_name_1));
    6891           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->server_name, &length_server_name_1));
    6892           0 :                         if (length_server_name_1 > size_server_name_1) {
    6893           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
    6894             :                         }
    6895           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
    6896           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
    6897           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
    6898             :                 }
    6899           0 :                 if (r->user_name) {
    6900           0 :                         _mem_save_user_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6901           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->user_name, 0);
    6902           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->user_name));
    6903           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->user_name));
    6904           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->user_name, &size_user_name_1));
    6905           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->user_name, &length_user_name_1));
    6906           0 :                         if (length_user_name_1 > size_user_name_1) {
    6907           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_name_1, length_user_name_1);
    6908             :                         }
    6909           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_user_name_1, sizeof(uint16_t)));
    6910           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user_name, length_user_name_1, sizeof(uint16_t), CH_UTF16));
    6911           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_name_0, 0);
    6912             :                 }
    6913           0 :                 if (r->document_name) {
    6914           0 :                         _mem_save_document_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6915           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->document_name, 0);
    6916           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->document_name));
    6917           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->document_name));
    6918           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->document_name, &size_document_name_1));
    6919           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->document_name, &length_document_name_1));
    6920           0 :                         if (length_document_name_1 > size_document_name_1) {
    6921           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_document_name_1, length_document_name_1);
    6922             :                         }
    6923           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_document_name_1, sizeof(uint16_t)));
    6924           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->document_name, length_document_name_1, sizeof(uint16_t), CH_UTF16));
    6925           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_document_name_0, 0);
    6926             :                 }
    6927           0 :                 if (r->notify_name) {
    6928           0 :                         _mem_save_notify_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6929           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->notify_name, 0);
    6930           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->notify_name));
    6931           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->notify_name));
    6932           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->notify_name, &size_notify_name_1));
    6933           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->notify_name, &length_notify_name_1));
    6934           0 :                         if (length_notify_name_1 > size_notify_name_1) {
    6935           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_notify_name_1, length_notify_name_1);
    6936             :                         }
    6937           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_notify_name_1, sizeof(uint16_t)));
    6938           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->notify_name, length_notify_name_1, sizeof(uint16_t), CH_UTF16));
    6939           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_notify_name_0, 0);
    6940             :                 }
    6941           0 :                 if (r->data_type) {
    6942           0 :                         _mem_save_data_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6943           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->data_type, 0);
    6944           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->data_type));
    6945           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->data_type));
    6946           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->data_type, &size_data_type_1));
    6947           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->data_type, &length_data_type_1));
    6948           0 :                         if (length_data_type_1 > size_data_type_1) {
    6949           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_data_type_1, length_data_type_1);
    6950             :                         }
    6951           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_data_type_1, sizeof(uint16_t)));
    6952           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->data_type, length_data_type_1, sizeof(uint16_t), CH_UTF16));
    6953           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_type_0, 0);
    6954             :                 }
    6955           0 :                 if (r->print_processor) {
    6956           0 :                         _mem_save_print_processor_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6957           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->print_processor, 0);
    6958           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->print_processor));
    6959           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->print_processor));
    6960           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->print_processor, &size_print_processor_1));
    6961           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->print_processor, &length_print_processor_1));
    6962           0 :                         if (length_print_processor_1 > size_print_processor_1) {
    6963           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_print_processor_1, length_print_processor_1);
    6964             :                         }
    6965           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_print_processor_1, sizeof(uint16_t)));
    6966           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->print_processor, length_print_processor_1, sizeof(uint16_t), CH_UTF16));
    6967           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_print_processor_0, 0);
    6968             :                 }
    6969           0 :                 if (r->parameters) {
    6970           0 :                         _mem_save_parameters_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6971           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->parameters, 0);
    6972           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->parameters));
    6973           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->parameters));
    6974           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->parameters, &size_parameters_1));
    6975           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->parameters, &length_parameters_1));
    6976           0 :                         if (length_parameters_1 > size_parameters_1) {
    6977           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_parameters_1, length_parameters_1);
    6978             :                         }
    6979           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_parameters_1, sizeof(uint16_t)));
    6980           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->parameters, length_parameters_1, sizeof(uint16_t), CH_UTF16));
    6981           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parameters_0, 0);
    6982             :                 }
    6983           0 :                 if (r->driver_name) {
    6984           0 :                         _mem_save_driver_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6985           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->driver_name, 0);
    6986           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->driver_name));
    6987           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->driver_name));
    6988           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->driver_name, &size_driver_name_1));
    6989           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->driver_name, &length_driver_name_1));
    6990           0 :                         if (length_driver_name_1 > size_driver_name_1) {
    6991           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_driver_name_1, length_driver_name_1);
    6992             :                         }
    6993           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_driver_name_1, sizeof(uint16_t)));
    6994           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->driver_name, length_driver_name_1, sizeof(uint16_t), CH_UTF16));
    6995           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_driver_name_0, 0);
    6996             :                 }
    6997           0 :                 if (r->text_status) {
    6998           0 :                         _mem_save_text_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
    6999           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->text_status, 0);
    7000           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->text_status));
    7001           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->text_status));
    7002           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->text_status, &size_text_status_1));
    7003           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->text_status, &length_text_status_1));
    7004           0 :                         if (length_text_status_1 > size_text_status_1) {
    7005           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_text_status_1, length_text_status_1);
    7006             :                         }
    7007           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_text_status_1, sizeof(uint16_t)));
    7008           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->text_status, length_text_status_1, sizeof(uint16_t), CH_UTF16));
    7009           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_text_status_0, 0);
    7010             :                 }
    7011             :         }
    7012           0 :         return NDR_ERR_SUCCESS;
    7013             : }
    7014             : 
    7015           0 : _PUBLIC_ void ndr_print_spoolss_SetJobInfo4(struct ndr_print *ndr, const char *name, const struct spoolss_SetJobInfo4 *r)
    7016             : {
    7017           0 :         ndr_print_struct(ndr, name, "spoolss_SetJobInfo4");
    7018           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7019           0 :         ndr->depth++;
    7020           0 :         ndr_print_uint32(ndr, "job_id", r->job_id);
    7021           0 :         ndr_print_ptr(ndr, "printer_name", r->printer_name);
    7022           0 :         ndr->depth++;
    7023           0 :         if (r->printer_name) {
    7024           0 :                 ndr_print_string(ndr, "printer_name", r->printer_name);
    7025             :         }
    7026           0 :         ndr->depth--;
    7027           0 :         ndr_print_ptr(ndr, "server_name", r->server_name);
    7028           0 :         ndr->depth++;
    7029           0 :         if (r->server_name) {
    7030           0 :                 ndr_print_string(ndr, "server_name", r->server_name);
    7031             :         }
    7032           0 :         ndr->depth--;
    7033           0 :         ndr_print_ptr(ndr, "user_name", r->user_name);
    7034           0 :         ndr->depth++;
    7035           0 :         if (r->user_name) {
    7036           0 :                 ndr_print_string(ndr, "user_name", r->user_name);
    7037             :         }
    7038           0 :         ndr->depth--;
    7039           0 :         ndr_print_ptr(ndr, "document_name", r->document_name);
    7040           0 :         ndr->depth++;
    7041           0 :         if (r->document_name) {
    7042           0 :                 ndr_print_string(ndr, "document_name", r->document_name);
    7043             :         }
    7044           0 :         ndr->depth--;
    7045           0 :         ndr_print_ptr(ndr, "notify_name", r->notify_name);
    7046           0 :         ndr->depth++;
    7047           0 :         if (r->notify_name) {
    7048           0 :                 ndr_print_string(ndr, "notify_name", r->notify_name);
    7049             :         }
    7050           0 :         ndr->depth--;
    7051           0 :         ndr_print_ptr(ndr, "data_type", r->data_type);
    7052           0 :         ndr->depth++;
    7053           0 :         if (r->data_type) {
    7054           0 :                 ndr_print_string(ndr, "data_type", r->data_type);
    7055             :         }
    7056           0 :         ndr->depth--;
    7057           0 :         ndr_print_ptr(ndr, "print_processor", r->print_processor);
    7058           0 :         ndr->depth++;
    7059           0 :         if (r->print_processor) {
    7060           0 :                 ndr_print_string(ndr, "print_processor", r->print_processor);
    7061             :         }
    7062           0 :         ndr->depth--;
    7063           0 :         ndr_print_ptr(ndr, "parameters", r->parameters);
    7064           0 :         ndr->depth++;
    7065           0 :         if (r->parameters) {
    7066           0 :                 ndr_print_string(ndr, "parameters", r->parameters);
    7067             :         }
    7068           0 :         ndr->depth--;
    7069           0 :         ndr_print_ptr(ndr, "driver_name", r->driver_name);
    7070           0 :         ndr->depth++;
    7071           0 :         if (r->driver_name) {
    7072           0 :                 ndr_print_string(ndr, "driver_name", r->driver_name);
    7073             :         }
    7074           0 :         ndr->depth--;
    7075           0 :         ndr_print_uint3264(ndr, "_devmode_ptr", r->_devmode_ptr);
    7076           0 :         ndr_print_ptr(ndr, "text_status", r->text_status);
    7077           0 :         ndr->depth++;
    7078           0 :         if (r->text_status) {
    7079           0 :                 ndr_print_string(ndr, "text_status", r->text_status);
    7080             :         }
    7081           0 :         ndr->depth--;
    7082           0 :         ndr_print_uint3264(ndr, "_secdesc_ptr", r->_secdesc_ptr);
    7083           0 :         ndr_print_spoolss_JobStatus(ndr, "status", r->status);
    7084           0 :         ndr_print_uint32(ndr, "priority", r->priority);
    7085           0 :         ndr_print_uint32(ndr, "position", r->position);
    7086           0 :         ndr_print_uint32(ndr, "start_time", r->start_time);
    7087           0 :         ndr_print_uint32(ndr, "until_time", r->until_time);
    7088           0 :         ndr_print_uint32(ndr, "total_pages", r->total_pages);
    7089           0 :         ndr_print_uint32(ndr, "size", r->size);
    7090           0 :         ndr_print_spoolss_Time(ndr, "submitted", &r->submitted);
    7091           0 :         ndr_print_uint32(ndr, "time", r->time);
    7092           0 :         ndr_print_uint32(ndr, "pages_printed", r->pages_printed);
    7093           0 :         ndr_print_uint32(ndr, "size_high", r->size_high);
    7094           0 :         ndr->depth--;
    7095             : }
    7096             : 
    7097          64 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_SetJobInfo(struct ndr_push *ndr, int ndr_flags, const union spoolss_SetJobInfo *r)
    7098             : {
    7099             :         uint32_t level;
    7100          64 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7101          64 :         if (ndr_flags & NDR_SCALARS) {
    7102             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7103          32 :                 NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7104          32 :                 NDR_CHECK(ndr_push_union_align(ndr, 5));
    7105          32 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
    7106             :                 /* ms_union is always aligned to the largest union arm*/
    7107          32 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7108          32 :                 switch (level) {
    7109          32 :                         case 1: {
    7110          32 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
    7111          32 :                         break; }
    7112             : 
    7113           0 :                         case 2: {
    7114           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
    7115           0 :                         break; }
    7116             : 
    7117           0 :                         case 3: {
    7118           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
    7119           0 :                         break; }
    7120             : 
    7121           0 :                         case 4: {
    7122           0 :                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
    7123           0 :                         break; }
    7124             : 
    7125           0 :                         default: {
    7126           0 :                         break; }
    7127             : 
    7128             :                 }
    7129          16 :         }
    7130          64 :         if (ndr_flags & NDR_BUFFERS) {
    7131          32 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7132             :                         /* We didn't get it above, and the token is not needed after this. */
    7133          32 :                         NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
    7134             :                 }
    7135          32 :                 switch (level) {
    7136          32 :                         case 1:
    7137          32 :                                 if (r->info1) {
    7138          32 :                                         NDR_CHECK(ndr_push_spoolss_SetJobInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
    7139             :                                 }
    7140          32 :                         break;
    7141             : 
    7142           0 :                         case 2:
    7143           0 :                                 if (r->info2) {
    7144           0 :                                         NDR_CHECK(ndr_push_spoolss_SetJobInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
    7145             :                                 }
    7146           0 :                         break;
    7147             : 
    7148           0 :                         case 3:
    7149           0 :                                 if (r->info3) {
    7150           0 :                                         NDR_CHECK(ndr_push_spoolss_JobInfo3(ndr, NDR_SCALARS, r->info3));
    7151             :                                 }
    7152           0 :                         break;
    7153             : 
    7154           0 :                         case 4:
    7155           0 :                                 if (r->info4) {
    7156           0 :                                         NDR_CHECK(ndr_push_spoolss_SetJobInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
    7157             :                                 }
    7158           0 :                         break;
    7159             : 
    7160           0 :                         default:
    7161           0 :                         break;
    7162             : 
    7163             :                 }
    7164          16 :         }
    7165          64 :         return NDR_ERR_SUCCESS;
    7166             : }
    7167             : 
    7168          64 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_SetJobInfo(struct ndr_pull *ndr, int ndr_flags, union spoolss_SetJobInfo *r)
    7169             : {
    7170             :         uint32_t level;
    7171             :         uint32_t _level;
    7172          64 :         TALLOC_CTX *_mem_save_info1_0 = NULL;
    7173             :         uint32_t _ptr_info1;
    7174          64 :         TALLOC_CTX *_mem_save_info2_0 = NULL;
    7175             :         uint32_t _ptr_info2;
    7176          64 :         TALLOC_CTX *_mem_save_info3_0 = NULL;
    7177             :         uint32_t _ptr_info3;
    7178          64 :         TALLOC_CTX *_mem_save_info4_0 = NULL;
    7179             :         uint32_t _ptr_info4;
    7180          64 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7181          64 :         if (ndr_flags & NDR_SCALARS) {
    7182             :                 /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
    7183          32 :                 NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7184          32 :                 NDR_CHECK(ndr_pull_union_align(ndr, 5));
    7185          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
    7186          32 :                 if (_level != level) {
    7187           0 :                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
    7188             :                 }
    7189             :                 /* ms_union is always aligned to the largest union arm*/
    7190          32 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7191          32 :                 switch (level) {
    7192          32 :                         case 1: {
    7193          32 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
    7194          32 :                                 if (_ptr_info1) {
    7195          32 :                                         NDR_PULL_ALLOC(ndr, r->info1);
    7196             :                                 } else {
    7197           0 :                                         r->info1 = NULL;
    7198             :                                 }
    7199          32 :                         break; }
    7200             : 
    7201           0 :                         case 2: {
    7202           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
    7203           0 :                                 if (_ptr_info2) {
    7204           0 :                                         NDR_PULL_ALLOC(ndr, r->info2);
    7205             :                                 } else {
    7206           0 :                                         r->info2 = NULL;
    7207             :                                 }
    7208           0 :                         break; }
    7209             : 
    7210           0 :                         case 3: {
    7211           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
    7212           0 :                                 if (_ptr_info3) {
    7213           0 :                                         NDR_PULL_ALLOC(ndr, r->info3);
    7214             :                                 } else {
    7215           0 :                                         r->info3 = NULL;
    7216             :                                 }
    7217           0 :                         break; }
    7218             : 
    7219           0 :                         case 4: {
    7220           0 :                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
    7221           0 :                                 if (_ptr_info4) {
    7222           0 :                                         NDR_PULL_ALLOC(ndr, r->info4);
    7223             :                                 } else {
    7224           0 :                                         r->info4 = NULL;
    7225             :                                 }
    7226           0 :                         break; }
    7227             : 
    7228           0 :                         default: {
    7229           0 :                         break; }
    7230             : 
    7231             :                 }
    7232          16 :         }
    7233          64 :         if (ndr_flags & NDR_BUFFERS) {
    7234          32 :                 if (!(ndr_flags & NDR_SCALARS)) {
    7235             :                         /* We didn't get it above, and the token is not needed after this. */
    7236          32 :                         NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
    7237             :                 }
    7238          32 :                 switch (level) {
    7239          32 :                         case 1:
    7240          32 :                                 if (r->info1) {
    7241          32 :                                         _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7242          32 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
    7243          32 :                                         NDR_CHECK(ndr_pull_spoolss_SetJobInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
    7244          32 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
    7245             :                                 }
    7246          32 :                         break;
    7247             : 
    7248           0 :                         case 2:
    7249           0 :                                 if (r->info2) {
    7250           0 :                                         _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7251           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
    7252           0 :                                         NDR_CHECK(ndr_pull_spoolss_SetJobInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
    7253           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
    7254             :                                 }
    7255           0 :                         break;
    7256             : 
    7257           0 :                         case 3:
    7258           0 :                                 if (r->info3) {
    7259           0 :                                         _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7260           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
    7261           0 :                                         NDR_CHECK(ndr_pull_spoolss_JobInfo3(ndr, NDR_SCALARS, r->info3));
    7262           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
    7263             :                                 }
    7264           0 :                         break;
    7265             : 
    7266           0 :                         case 4:
    7267           0 :                                 if (r->info4) {
    7268           0 :                                         _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7269           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
    7270           0 :                                         NDR_CHECK(ndr_pull_spoolss_SetJobInfo4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
    7271           0 :                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
    7272             :                                 }
    7273           0 :                         break;
    7274             : 
    7275           0 :                         default:
    7276           0 :                         break;
    7277             : 
    7278             :                 }
    7279          16 :         }
    7280          64 :         return NDR_ERR_SUCCESS;
    7281             : }
    7282             : 
    7283           0 : _PUBLIC_ void ndr_print_spoolss_SetJobInfo(struct ndr_print *ndr, const char *name, const union spoolss_SetJobInfo *r)
    7284             : {
    7285             :         uint32_t level;
    7286           0 :         level = ndr_print_steal_switch_value(ndr, r);
    7287           0 :         ndr_print_union(ndr, name, level, "spoolss_SetJobInfo");
    7288           0 :         switch (level) {
    7289           0 :                 case 1:
    7290           0 :                         ndr_print_ptr(ndr, "info1", r->info1);
    7291           0 :                         ndr->depth++;
    7292           0 :                         if (r->info1) {
    7293           0 :                                 ndr_print_spoolss_SetJobInfo1(ndr, "info1", r->info1);
    7294             :                         }
    7295           0 :                         ndr->depth--;
    7296           0 :                 break;
    7297             : 
    7298           0 :                 case 2:
    7299           0 :                         ndr_print_ptr(ndr, "info2", r->info2);
    7300           0 :                         ndr->depth++;
    7301           0 :                         if (r->info2) {
    7302           0 :                                 ndr_print_spoolss_SetJobInfo2(ndr, "info2", r->info2);
    7303             :                         }
    7304           0 :                         ndr->depth--;
    7305           0 :                 break;
    7306             : 
    7307           0 :                 case 3:
    7308           0 :                         ndr_print_ptr(ndr, "info3", r->info3);
    7309           0 :                         ndr->depth++;
    7310           0 :                         if (r->info3) {
    7311           0 :                                 ndr_print_spoolss_JobInfo3(ndr, "info3", r->info3);
    7312             :                         }
    7313           0 :                         ndr->depth--;
    7314           0 :                 break;
    7315             : 
    7316           0 :                 case 4:
    7317           0 :                         ndr_print_ptr(ndr, "info4", r->info4);
    7318           0 :                         ndr->depth++;
    7319           0 :                         if (r->info4) {
    7320           0 :                                 ndr_print_spoolss_SetJobInfo4(ndr, "info4", r->info4);
    7321             :                         }
    7322           0 :                         ndr->depth--;
    7323           0 :                 break;
    7324             : 
    7325           0 :                 default:
    7326           0 :                 break;
    7327             : 
    7328             :         }
    7329           0 : }
    7330             : 
    7331          32 : _PUBLIC_ enum ndr_err_code ndr_push_spoolss_JobInfoContainer(struct ndr_push *ndr, int ndr_flags, const struct spoolss_JobInfoContainer *r)
    7332             : {
    7333          32 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7334          32 :         if (ndr_flags & NDR_SCALARS) {
    7335          32 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7336          32 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
    7337          32 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
    7338          32 :                 NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr, NDR_SCALARS, &r->info));
    7339          32 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7340             :         }
    7341          32 :         if (ndr_flags & NDR_BUFFERS) {
    7342          32 :                 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->info, r->level));
    7343          32 :                 NDR_CHECK(ndr_push_spoolss_SetJobInfo(ndr, NDR_BUFFERS, &r->info));
    7344             :         }
    7345          32 :         return NDR_ERR_SUCCESS;
    7346             : }
    7347             : 
    7348          32 : _PUBLIC_ enum ndr_err_code ndr_pull_spoolss_JobInfoContainer(struct ndr_pull *ndr, int ndr_flags, struct spoolss_JobInfoContainer *r)
    7349             : {
    7350          32 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7351          32 :         if (ndr_flags & NDR_SCALARS) {
    7352          32 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7353          32 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
    7354          32 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
    7355          32 :                 NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr, NDR_SCALARS, &r->info));
    7356          32 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7357             :         }
    7358          32 :         if (ndr_flags & NDR_BUFFERS) {
    7359          32 :                 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->info, r->level));
    7360          32 :                 NDR_CHECK(ndr_pull_spoolss_SetJobInfo(ndr, NDR_BUFFERS, &r->info));
    7361             :         }
    7362          32 :         return NDR_ERR_SUCCESS;
    7363             : }
    7364             : 
    7365           0 : static void ndr_print_flags_spoolss_JobInfoContainer(struct ndr_print *ndr, const char *name, int unused, const struct spoolss_JobInfoContainer *r)
    7366             : {
    7367           0 :         ndr_print_spoolss_JobInfoContainer(ndr, name, r);
    7368           0 : }
    7369             : 
    7370           0 : _PUBLIC_ void ndr_print_spoolss_JobInfoContainer(struct ndr_print *ndr, const char *name, const struct spoolss_JobInfoContainer *r)
    7371             : {
    7372           0 :         ndr_print_struct(ndr, name, "spoolss_JobInfoContainer");
    7373           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7374           0 :         ndr->depth++;
    7375           0 :         ndr_print_uint32(ndr, "level", r->level);
    7376           0 :         ndr_print_set_switch_value(ndr, &r->info, r->level);
    7377           0 :         ndr_print_spoolss_SetJobInfo(ndr, "info", &r->info);
    7378           0 :         ndr->depth--;
    7379             : }
    7380             : 
    7381         640 : static enum ndr_err_code ndr_push_spoolss_JobControl(struct ndr_push *ndr, int ndr_flags, enum spoolss_JobControl r)
    7382             : {
    7383         640 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    7384         640 :         return NDR_ERR_SUCCESS;
    7385             : }
    7386             : 
    7387         640 : static enum ndr_err_code ndr_pull_spoolss_JobControl(struct ndr_pull *ndr, int ndr_flags, enum spoolss_JobControl *r)
    7388             : {
    7389             :         uint32_t v;
    7390         640 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    7391         640 :         *r = v;
    7392         640 :         return NDR_ERR_SUCCESS;
    7393             : }
    7394             : 
    7395           0 : _PUBLIC_ void ndr_print_spoolss_JobControl(struct ndr_print *ndr, const char *name, enum spoolss_JobControl r)
    7396             : {
    7397           0 :         const char *val = NULL;
    7398             : 
    7399           0 :         switch (r) {
    7400           0 :                 case SPOOLSS_JOB_CONTROL_NOOP: val = "SPOOLSS_JOB_CONTROL_NOOP"; break;
    7401           0 :                 case SPOOLSS_JOB_CONTROL_PAUSE: val = "SPOOLSS_JOB_CONTROL_PAUSE"; break;
    7402           0 :                 case SPOOLSS_JOB_CONTROL_RESUME: val = "SPOOLSS_JOB_CONTROL_RESUME"; break;
    7403           0 :                 case SPOOLSS_JOB_CONTROL_CANCEL: val = "SPOOLSS_JOB_CONTROL_CANCEL"; break;
    7404           0 :                 case SPOOLSS_JOB_CONTROL_RESTART: val = "SPOOLSS_JOB_CONTROL_RESTART"; break;
    7405           0 :                 case SPOOLSS_JOB_CONTROL_DELETE: val = "SPOOLSS_JOB_CONTROL_DELETE"; break;
    7406           0 :                 case SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER: val = "SPOOLSS_JOB_CONTROL_SEND_TO_PRINTER"; break;
    7407           0 :                 case SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED: val = "SPOOLSS_JOB_CONTROL_LAST_PAGE_EJECTED"; break;
    7408           0 :                 case SPOOLSS_JOB_CONTROL_RETAIN: val = "SPOOLSS_JOB_CONTROL_RETAIN"; break;
    7409           0 :                 case SPOOLSS_JOB_CONTROL_RELEASE: val = "SPOOLSS_JOB_CONTROL_RELEASE"; break;
    7410             :         }
    7411           0 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    7412           0 : }
    7413             : 
    7414         584 : static enum ndr_err_code ndr_push_spoolss_PrinterControl(struct ndr_push *ndr, int ndr_flags, enum spoolss_PrinterControl r)
    7415             : {
    7416         584 :         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
    7417         584 :         return NDR_ERR_SUCCESS;
    7418             : }
    7419             : 
    7420         584 : static enum ndr_err_code ndr_pull_spoolss_PrinterControl(struct ndr_pull *ndr, int ndr_flags, enum spoolss_PrinterControl *r)
    7421             : {
    7422             :         uint32_t v;
    7423         588 :         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
    7424         588 :         *r = v;
    7425         584 :         return NDR_ERR_SUCCESS;
    7426             : }
    7427             : 
    7428           4 : _PUBLIC_ void ndr_print_spoolss_PrinterControl(struct ndr_print *ndr, const char *name, enum spoolss_PrinterControl r)
    7429             : {
    7430           4 :         const char *val = NULL;
    7431             : 
    7432           4 :         switch (r) {
    7433           4 :                 case SPOOLSS_PRINTER_CONTROL_UNPAUSE: val = "SPOOLSS_PRINTER_CONTROL_UNPAUSE"; break;
    7434           0 :                 case SPOOLSS_PRINTER_CONTROL_PAUSE: val = "SPOOLSS_PRINTER_CONTROL_PAUSE"; break;
    7435           0 :                 case SPOOLSS_PRINTER_CONTROL_RESUME: val = "SPOOLSS_PRINTER_CONTROL_RESUME"; break;
    7436           0 :                 case SPOOLSS_PRINTER_CONTROL_PURGE: val = "SPOOLSS_PRINTER_CONTROL_PURGE"; break;
    7437           0 :                 case SPOOLSS_PRINTER_CONTROL_SET_STATUS: val = "SPOOLSS_PRINTER_CONTROL_SET_STATUS"; break;
    7438             :         }
    7439           4 :         ndr_print_enum(ndr, name, "ENUM", val, r);
    7440           4 : }
    7441             : 
    7442           0 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo0(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo0 *r)
    7443             : {
    7444           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7445           0 :         if (ndr_flags & NDR_SCALARS) {
    7446           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7447           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername));
    7448           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
    7449           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
    7450           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_jobs));
    7451           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_bytes));
    7452           0 :                 NDR_CHECK(ndr_push_spoolss_Time(ndr, NDR_SCALARS, &r->time));
    7453           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->global_counter));
    7454           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->total_pages));
    7455           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
    7456           0 :                 NDR_CHECK(ndr_push_spoolss_Build(ndr, NDR_SCALARS, r->free_build));
    7457           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->spooling));
    7458           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_spooling));
    7459           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->session_counter));
    7460           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_out_of_paper));
    7461           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_error_not_ready));
    7462           0 :                 NDR_CHECK(ndr_push_spoolss_JobStatus(ndr, NDR_SCALARS, r->job_error));
    7463           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->number_of_processors));
    7464           0 :                 NDR_CHECK(ndr_push_spoolss_ProcessorType(ndr, NDR_SCALARS, r->processor_type));
    7465           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->high_part_total_bytes));
    7466           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->change_id));
    7467           0 :                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->last_error));
    7468           0 :                 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
    7469           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enumerate_network_printers));
    7470           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->c_setprinter));
    7471           0 :                 NDR_CHECK(ndr_push_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, r->processor_architecture));
    7472           0 :                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->processor_level));
    7473           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ref_ic));
    7474           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved2));
    7475           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved3));
    7476           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7477             :         }
    7478           0 :         if (ndr_flags & NDR_BUFFERS) {
    7479           0 :                 if (r->servername) {
    7480           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
    7481           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7482           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
    7483           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servername, ndr_charset_length(r->servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7484             :                 }
    7485           0 :                 if (r->printername) {
    7486           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
    7487           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7488           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
    7489           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7490             :                 }
    7491             :         }
    7492           0 :         return NDR_ERR_SUCCESS;
    7493             : }
    7494             : 
    7495           0 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo0(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo0 *r)
    7496             : {
    7497             :         uint32_t _ptr_servername;
    7498           0 :         uint32_t size_servername_1 = 0;
    7499           0 :         uint32_t length_servername_1 = 0;
    7500           0 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
    7501             :         uint32_t _ptr_printername;
    7502           0 :         uint32_t size_printername_1 = 0;
    7503           0 :         uint32_t length_printername_1 = 0;
    7504           0 :         TALLOC_CTX *_mem_save_printername_0 = NULL;
    7505           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7506           0 :         if (ndr_flags & NDR_SCALARS) {
    7507           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7508           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
    7509           0 :                 if (_ptr_servername) {
    7510           0 :                         NDR_PULL_ALLOC(ndr, r->servername);
    7511             :                 } else {
    7512           0 :                         r->servername = NULL;
    7513             :                 }
    7514           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_printername));
    7515           0 :                 if (_ptr_printername) {
    7516           0 :                         NDR_PULL_ALLOC(ndr, r->printername);
    7517             :                 } else {
    7518           0 :                         r->printername = NULL;
    7519             :                 }
    7520           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cjobs));
    7521           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_jobs));
    7522           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_bytes));
    7523           0 :                 NDR_CHECK(ndr_pull_spoolss_Time(ndr, NDR_SCALARS, &r->time));
    7524           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->global_counter));
    7525           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->total_pages));
    7526           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
    7527           0 :                 NDR_CHECK(ndr_pull_spoolss_Build(ndr, NDR_SCALARS, &r->free_build));
    7528           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->spooling));
    7529           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_spooling));
    7530           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->session_counter));
    7531           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_out_of_paper));
    7532           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_error_not_ready));
    7533           0 :                 NDR_CHECK(ndr_pull_spoolss_JobStatus(ndr, NDR_SCALARS, &r->job_error));
    7534           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->number_of_processors));
    7535           0 :                 NDR_CHECK(ndr_pull_spoolss_ProcessorType(ndr, NDR_SCALARS, &r->processor_type));
    7536           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->high_part_total_bytes));
    7537           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->change_id));
    7538           0 :                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->last_error));
    7539           0 :                 NDR_CHECK(ndr_pull_spoolss_PrinterStatus(ndr, NDR_SCALARS, &r->status));
    7540           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enumerate_network_printers));
    7541           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->c_setprinter));
    7542           0 :                 NDR_CHECK(ndr_pull_spoolss_ProcessorArchitecture(ndr, NDR_SCALARS, &r->processor_architecture));
    7543           0 :                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->processor_level));
    7544           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ref_ic));
    7545           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved2));
    7546           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved3));
    7547           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7548             :         }
    7549           0 :         if (ndr_flags & NDR_BUFFERS) {
    7550           0 :                 if (r->servername) {
    7551           0 :                         _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7552           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->servername, 0);
    7553           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->servername));
    7554           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->servername));
    7555           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->servername, &size_servername_1));
    7556           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->servername, &length_servername_1));
    7557           0 :                         if (length_servername_1 > size_servername_1) {
    7558           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
    7559             :                         }
    7560           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
    7561           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
    7562           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
    7563             :                 }
    7564           0 :                 if (r->printername) {
    7565           0 :                         _mem_save_printername_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7566           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->printername, 0);
    7567           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->printername));
    7568           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->printername));
    7569           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->printername, &size_printername_1));
    7570           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->printername, &length_printername_1));
    7571           0 :                         if (length_printername_1 > size_printername_1) {
    7572           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_printername_1, length_printername_1);
    7573             :                         }
    7574           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_printername_1, sizeof(uint16_t)));
    7575           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->printername, length_printername_1, sizeof(uint16_t), CH_UTF16));
    7576           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_printername_0, 0);
    7577             :                 }
    7578             :         }
    7579           0 :         return NDR_ERR_SUCCESS;
    7580             : }
    7581             : 
    7582           0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo0(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo0 *r)
    7583             : {
    7584           0 :         ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo0");
    7585           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7586           0 :         ndr->depth++;
    7587           0 :         ndr_print_ptr(ndr, "servername", r->servername);
    7588           0 :         ndr->depth++;
    7589           0 :         if (r->servername) {
    7590           0 :                 ndr_print_string(ndr, "servername", r->servername);
    7591             :         }
    7592           0 :         ndr->depth--;
    7593           0 :         ndr_print_ptr(ndr, "printername", r->printername);
    7594           0 :         ndr->depth++;
    7595           0 :         if (r->printername) {
    7596           0 :                 ndr_print_string(ndr, "printername", r->printername);
    7597             :         }
    7598           0 :         ndr->depth--;
    7599           0 :         ndr_print_uint32(ndr, "cjobs", r->cjobs);
    7600           0 :         ndr_print_uint32(ndr, "total_jobs", r->total_jobs);
    7601           0 :         ndr_print_uint32(ndr, "total_bytes", r->total_bytes);
    7602           0 :         ndr_print_spoolss_Time(ndr, "time", &r->time);
    7603           0 :         ndr_print_uint32(ndr, "global_counter", r->global_counter);
    7604           0 :         ndr_print_uint32(ndr, "total_pages", r->total_pages);
    7605           0 :         ndr_print_uint32(ndr, "version", r->version);
    7606           0 :         ndr_print_spoolss_Build(ndr, "free_build", r->free_build);
    7607           0 :         ndr_print_uint32(ndr, "spooling", r->spooling);
    7608           0 :         ndr_print_uint32(ndr, "max_spooling", r->max_spooling);
    7609           0 :         ndr_print_uint32(ndr, "session_counter", r->session_counter);
    7610           0 :         ndr_print_uint32(ndr, "num_error_out_of_paper", r->num_error_out_of_paper);
    7611           0 :         ndr_print_uint32(ndr, "num_error_not_ready", r->num_error_not_ready);
    7612           0 :         ndr_print_spoolss_JobStatus(ndr, "job_error", r->job_error);
    7613           0 :         ndr_print_uint32(ndr, "number_of_processors", r->number_of_processors);
    7614           0 :         ndr_print_spoolss_ProcessorType(ndr, "processor_type", r->processor_type);
    7615           0 :         ndr_print_uint32(ndr, "high_part_total_bytes", r->high_part_total_bytes);
    7616           0 :         ndr_print_uint32(ndr, "change_id", r->change_id);
    7617           0 :         ndr_print_WERROR(ndr, "last_error", r->last_error);
    7618           0 :         ndr_print_spoolss_PrinterStatus(ndr, "status", r->status);
    7619           0 :         ndr_print_uint32(ndr, "enumerate_network_printers", r->enumerate_network_printers);
    7620           0 :         ndr_print_uint32(ndr, "c_setprinter", r->c_setprinter);
    7621           0 :         ndr_print_spoolss_ProcessorArchitecture(ndr, "processor_architecture", r->processor_architecture);
    7622           0 :         ndr_print_uint16(ndr, "processor_level", r->processor_level);
    7623           0 :         ndr_print_uint32(ndr, "ref_ic", r->ref_ic);
    7624           0 :         ndr_print_uint32(ndr, "reserved2", r->reserved2);
    7625           0 :         ndr_print_uint32(ndr, "reserved3", r->reserved3);
    7626           0 :         ndr->depth--;
    7627             : }
    7628             : 
    7629           0 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo1(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo1 *r)
    7630             : {
    7631           0 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7632           0 :         if (ndr_flags & NDR_SCALARS) {
    7633           0 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7634           0 :                 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->flags));
    7635           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->description));
    7636           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
    7637           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    7638           0 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7639             :         }
    7640           0 :         if (ndr_flags & NDR_BUFFERS) {
    7641           0 :                 if (r->description) {
    7642           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->description, CH_UTF16)));
    7643           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7644           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->description, CH_UTF16)));
    7645           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->description, ndr_charset_length(r->description, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7646             :                 }
    7647           0 :                 if (r->name) {
    7648           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    7649           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7650           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
    7651           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7652             :                 }
    7653           0 :                 if (r->comment) {
    7654           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    7655           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7656           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    7657           0 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7658             :                 }
    7659             :         }
    7660           0 :         return NDR_ERR_SUCCESS;
    7661             : }
    7662             : 
    7663           0 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo1(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo1 *r)
    7664             : {
    7665             :         uint32_t _ptr_description;
    7666           0 :         uint32_t size_description_1 = 0;
    7667           0 :         uint32_t length_description_1 = 0;
    7668           0 :         TALLOC_CTX *_mem_save_description_0 = NULL;
    7669             :         uint32_t _ptr_name;
    7670           0 :         uint32_t size_name_1 = 0;
    7671           0 :         uint32_t length_name_1 = 0;
    7672           0 :         TALLOC_CTX *_mem_save_name_0 = NULL;
    7673             :         uint32_t _ptr_comment;
    7674           0 :         uint32_t size_comment_1 = 0;
    7675           0 :         uint32_t length_comment_1 = 0;
    7676           0 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    7677           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
    7678           0 :         if (ndr_flags & NDR_SCALARS) {
    7679           0 :                 NDR_CHECK(ndr_pull_align(ndr, 5));
    7680           0 :                 NDR_CHECK(ndr_pull_spoolss_PrinterAttributes(ndr, NDR_SCALARS, &r->flags));
    7681           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
    7682           0 :                 if (_ptr_description) {
    7683           0 :                         NDR_PULL_ALLOC(ndr, r->description);
    7684             :                 } else {
    7685           0 :                         r->description = NULL;
    7686             :                 }
    7687           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
    7688           0 :                 if (_ptr_name) {
    7689           0 :                         NDR_PULL_ALLOC(ndr, r->name);
    7690             :                 } else {
    7691           0 :                         r->name = NULL;
    7692             :                 }
    7693           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
    7694           0 :                 if (_ptr_comment) {
    7695           0 :                         NDR_PULL_ALLOC(ndr, r->comment);
    7696             :                 } else {
    7697           0 :                         r->comment = NULL;
    7698             :                 }
    7699           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
    7700             :         }
    7701           0 :         if (ndr_flags & NDR_BUFFERS) {
    7702           0 :                 if (r->description) {
    7703           0 :                         _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7704           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
    7705           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->description));
    7706           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->description));
    7707           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->description, &size_description_1));
    7708           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->description, &length_description_1));
    7709           0 :                         if (length_description_1 > size_description_1) {
    7710           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_description_1, length_description_1);
    7711             :                         }
    7712           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_description_1, sizeof(uint16_t)));
    7713           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->description, length_description_1, sizeof(uint16_t), CH_UTF16));
    7714           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
    7715             :                 }
    7716           0 :                 if (r->name) {
    7717           0 :                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7718           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
    7719           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
    7720           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
    7721           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
    7722           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
    7723           0 :                         if (length_name_1 > size_name_1) {
    7724           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
    7725             :                         }
    7726           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
    7727           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
    7728           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
    7729             :                 }
    7730           0 :                 if (r->comment) {
    7731           0 :                         _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
    7732           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
    7733           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
    7734           0 :                         NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
    7735           0 :                         NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->comment, &size_comment_1));
    7736           0 :                         NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->comment, &length_comment_1));
    7737           0 :                         if (length_comment_1 > size_comment_1) {
    7738           0 :                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
    7739             :                         }
    7740           0 :                         NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
    7741           0 :                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
    7742           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
    7743             :                 }
    7744             :         }
    7745           0 :         return NDR_ERR_SUCCESS;
    7746             : }
    7747             : 
    7748           0 : _PUBLIC_ void ndr_print_spoolss_SetPrinterInfo1(struct ndr_print *ndr, const char *name, const struct spoolss_SetPrinterInfo1 *r)
    7749             : {
    7750           0 :         ndr_print_struct(ndr, name, "spoolss_SetPrinterInfo1");
    7751           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
    7752           0 :         ndr->depth++;
    7753           0 :         ndr_print_spoolss_PrinterAttributes(ndr, "flags", r->flags);
    7754           0 :         ndr_print_ptr(ndr, "description", r->description);
    7755           0 :         ndr->depth++;
    7756           0 :         if (r->description) {
    7757           0 :                 ndr_print_string(ndr, "description", r->description);
    7758             :         }
    7759           0 :         ndr->depth--;
    7760           0 :         ndr_print_ptr(ndr, "name", r->name);
    7761           0 :         ndr->depth++;
    7762           0 :         if (r->name) {
    7763           0 :                 ndr_print_string(ndr, "name", r->name);
    7764             :         }
    7765           0 :         ndr->depth--;
    7766           0 :         ndr_print_ptr(ndr, "comment", r->comment);
    7767           0 :         ndr->depth++;
    7768           0 :         if (r->comment) {
    7769           0 :                 ndr_print_string(ndr, "comment", r->comment);
    7770             :         }
    7771           0 :         ndr->depth--;
    7772           0 :         ndr->depth--;
    7773             : }
    7774             : 
    7775         180 : static enum ndr_err_code ndr_push_spoolss_SetPrinterInfo2(struct ndr_push *ndr, int ndr_flags, const struct spoolss_SetPrinterInfo2 *r)
    7776             : {
    7777         180 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
    7778         180 :         if (ndr_flags & NDR_SCALARS) {
    7779         180 :                 NDR_CHECK(ndr_push_align(ndr, 5));
    7780         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->servername));
    7781         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printername));
    7782         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sharename));
    7783         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->portname));
    7784         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->drivername));
    7785         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
    7786         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->location));
    7787         180 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->devmode_ptr));
    7788         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sepfile));
    7789         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->printprocessor));
    7790         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->datatype));
    7791         180 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->parameters));
    7792         180 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->secdesc_ptr));
    7793         180 :                 NDR_CHECK(ndr_push_spoolss_PrinterAttributes(ndr, NDR_SCALARS, r->attributes));
    7794         180 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
    7795         180 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->defaultpriority));
    7796         180 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->starttime));
    7797         180 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->untiltime));
    7798         180 :                 NDR_CHECK(ndr_push_spoolss_PrinterStatus(ndr, NDR_SCALARS, r->status));
    7799         180 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cjobs));
    7800         180 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->averageppm));
    7801         180 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
    7802             :         }
    7803         180 :         if (ndr_flags & NDR_BUFFERS) {
    7804         180 :                 if (r->servername) {
    7805          64 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
    7806          64 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7807          64 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->servername, CH_UTF16)));
    7808          64 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->servername, ndr_charset_length(r->servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7809             :                 }
    7810         180 :                 if (r->printername) {
    7811         164 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
    7812         164 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7813         164 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printername, CH_UTF16)));
    7814         164 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printername, ndr_charset_length(r->printername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7815             :                 }
    7816         180 :                 if (r->sharename) {
    7817          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sharename, CH_UTF16)));
    7818          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7819          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sharename, CH_UTF16)));
    7820          84 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sharename, ndr_charset_length(r->sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7821             :                 }
    7822         180 :                 if (r->portname) {
    7823         148 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
    7824         148 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7825         148 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->portname, CH_UTF16)));
    7826         148 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->portname, ndr_charset_length(r->portname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7827             :                 }
    7828         180 :                 if (r->drivername) {
    7829         132 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->drivername, CH_UTF16)));
    7830         132 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7831         132 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->drivername, CH_UTF16)));
    7832         132 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->drivername, ndr_charset_length(r->drivername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7833             :                 }
    7834         180 :                 if (r->comment) {
    7835          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    7836          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7837          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
    7838          84 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7839             :                 }
    7840         180 :                 if (r->location) {
    7841          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->location, CH_UTF16)));
    7842          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7843          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->location, CH_UTF16)));
    7844          84 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->location, ndr_charset_length(r->location, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7845             :                 }
    7846         180 :                 if (r->sepfile) {
    7847          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sepfile, CH_UTF16)));
    7848          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7849          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->sepfile, CH_UTF16)));
    7850          84 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->sepfile, ndr_charset_length(r->sepfile, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7851             :                 }
    7852         180 :                 if (r->printprocessor) {
    7853         116 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printprocessor, CH_UTF16)));
    7854         116 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7855         116 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->printprocessor, CH_UTF16)));
    7856         116 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->printprocessor, ndr_charset_length(r->printprocessor, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7857             :                 }
    7858         180 :                 if (r->datatype) {
    7859          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
    7860          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7861          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->datatype, CH_UTF16)));
    7862          84 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->datatype, ndr_charset_length(r->datatype, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7863             :                 }
    7864         180 :                 if (r->parameters) {
    7865          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
    7866          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
    7867          84 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->parameters, CH_UTF16)));
    7868          84 :                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->parameters, ndr_charset_length(r->parameters, CH_UTF16), sizeof(uint16_t), CH_UTF16));
    7869             :                 }
    7870             :         }
    7871         180 :         return NDR_ERR_SUCCESS;
    7872             : }
    7873             : 
    7874         184 : static enum ndr_err_code ndr_pull_spoolss_SetPrinterInfo2(struct ndr_pull *ndr, int ndr_flags, struct spoolss_SetPrinterInfo2 *r)
    7875             : {
    7876             :         uint32_t _ptr_servername;
    7877         184 :         uint32_t size_servername_1 = 0;
    7878         184 :         uint32_t length_servername_1 = 0;
    7879         184 :         TALLOC_CTX *_mem_save_servername_0 = NULL;
    7880             :         uint32_t _ptr_printername;
    7881         184 :         uint32_t size_printername_1 = 0;
    7882         184 :         uint32_t length_printername_1 = 0;
    7883         184 :         TALLOC_CTX *_mem_save_printername_0 = NULL;
    7884             :         uint32_t _ptr_sharename;
    7885         184 :         uint32_t size_sharename_1 = 0;
    7886         184 :         uint32_t length_sharename_1 = 0;
    7887         184 :         TALLOC_CTX *_mem_save_sharename_0 = NULL;
    7888             :         uint32_t _ptr_portname;
    7889         184 :         uint32_t size_portname_1 = 0;
    7890         184 :         uint32_t length_portname_1 = 0;
    7891         184 :         TALLOC_CTX *_mem_save_portname_0 = NULL;
    7892             :         uint32_t _ptr_drivername;
    7893         184 :         uint32_t size_drivername_1 = 0;
    7894         184 :         uint32_t length_drivername_1 = 0;
    7895         184 :         TALLOC_CTX *_mem_save_drivername_0 = NULL;
    7896             :         uint32_t _ptr_comment;
    7897         184 :         uint32_t size_comment_1 = 0;
    7898         184 :         uint32_t length_comment_1 = 0;
    7899         184 :         TALLOC_CTX *_mem_save_comment_0 = NULL;
    7900             :         uint32_t _ptr_location;
    7901         184 :         uint32_t size_location_1 = 0;
    7902         184 :         uint32_t length_location_1 = 0;
    7903         184 :         TALLOC_CTX *_mem_save_location_0 = NULL;
    7904             :         uint32_t _ptr_sepfile;
    7905         184 :         uint32_t size_sepfile_1 = 0;
    7906         184 :         uint32_t length_sepfile_1 = 0;
    7907