diff options
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/gen_ndr/ndr_rap.c | 286 | ||||
-rw-r--r-- | librpc/gen_ndr/ndr_rap.h | 8 | ||||
-rw-r--r-- | librpc/gen_ndr/rap.h | 177 | ||||
-rw-r--r-- | librpc/idl/rap.idl | 154 |
4 files changed, 395 insertions, 230 deletions
diff --git a/librpc/gen_ndr/ndr_rap.c b/librpc/gen_ndr/ndr_rap.c index aece68b165..c6a51954f2 100644 --- a/librpc/gen_ndr/ndr_rap.c +++ b/librpc/gen_ndr/ndr_rap.c @@ -529,6 +529,213 @@ _PUBLIC_ void ndr_print_rap_server_info(struct ndr_print *ndr, const char *name, } } +_PUBLIC_ enum ndr_err_code ndr_push_rap_PrintJStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintJStatusCode r) +{ + NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ enum ndr_err_code ndr_pull_rap_PrintJStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintJStatusCode *r) +{ + uint16_t v; + NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); + *r = v; + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_rap_PrintJStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintJStatusCode r) +{ + const char *val = NULL; + + switch (r) { + case PRJ_QS_QUEUED: val = "PRJ_QS_QUEUED"; break; + case PRJ_QS_PAUSED: val = "PRJ_QS_PAUSED"; break; + case PRJ_QS_SPOOLING: val = "PRJ_QS_SPOOLING"; break; + case PRJ_QS_PRINTING: val = "PRJ_QS_PRINTING"; break; + case PRJ_QS_ERROR: val = "PRJ_QS_ERROR"; break; + } + ndr_print_enum(ndr, name, "ENUM", val, r); +} + +static enum ndr_err_code ndr_push_rap_PrintJobInfo1(struct ndr_push *ndr, int ndr_flags, const struct rap_PrintJobInfo1 *r) +{ + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_push_align(ndr, 5)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->JobID)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->UserName, 21)); + NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->Pad)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->NotifyName, 16)); + NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->DataType, 10)); + NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->PrintParameterString)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->PrintParameterStringHigh)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->JobPosition)); + NDR_CHECK(ndr_push_rap_PrintJStatusCode(ndr, NDR_SCALARS, r->JobStatus)); + NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->JobStatusString)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->JobStatusStringHigh)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->TimeSubmitted)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->JobSize)); + NDR_CHECK(ndr_push_short_relative_ptr1(ndr, r->JobCommentString)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->JobCommentStringHigh)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->PrintParameterString) { + NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->PrintParameterString)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintParameterString, CH_DOS))); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->PrintParameterString, CH_DOS))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->PrintParameterString, ndr_charset_length(r->PrintParameterString, CH_DOS), sizeof(uint8_t), CH_DOS)); + } + if (r->JobStatusString) { + NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->JobStatusString)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->JobStatusString, CH_DOS))); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->JobStatusString, CH_DOS))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->JobStatusString, ndr_charset_length(r->JobStatusString, CH_DOS), sizeof(uint8_t), CH_DOS)); + } + if (r->JobCommentString) { + NDR_CHECK(ndr_push_short_relative_ptr2(ndr, r->JobCommentString)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->JobCommentString, CH_DOS))); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0)); + NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->JobCommentString, CH_DOS))); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->JobCommentString, ndr_charset_length(r->JobCommentString, CH_DOS), sizeof(uint8_t), CH_DOS)); + } + } + return NDR_ERR_SUCCESS; +} + +static enum ndr_err_code ndr_pull_rap_PrintJobInfo1(struct ndr_pull *ndr, int ndr_flags, struct rap_PrintJobInfo1 *r) +{ + uint16_t _ptr_PrintParameterString; + TALLOC_CTX *_mem_save_PrintParameterString_0; + uint16_t _ptr_JobStatusString; + TALLOC_CTX *_mem_save_JobStatusString_0; + uint16_t _ptr_JobCommentString; + TALLOC_CTX *_mem_save_JobCommentString_0; + if (ndr_flags & NDR_SCALARS) { + NDR_CHECK(ndr_pull_align(ndr, 5)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobID)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->UserName, 21)); + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->Pad)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->NotifyName, 16)); + NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->DataType, 10)); + NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_PrintParameterString)); + if (_ptr_PrintParameterString) { + NDR_PULL_ALLOC(ndr, r->PrintParameterString); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->PrintParameterString, _ptr_PrintParameterString)); + } else { + r->PrintParameterString = NULL; + } + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->PrintParameterStringHigh)); + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobPosition)); + NDR_CHECK(ndr_pull_rap_PrintJStatusCode(ndr, NDR_SCALARS, &r->JobStatus)); + NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_JobStatusString)); + if (_ptr_JobStatusString) { + NDR_PULL_ALLOC(ndr, r->JobStatusString); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->JobStatusString, _ptr_JobStatusString)); + } else { + r->JobStatusString = NULL; + } + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobStatusStringHigh)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->TimeSubmitted)); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->JobSize)); + NDR_CHECK(ndr_pull_relative_ptr_short(ndr, &_ptr_JobCommentString)); + if (_ptr_JobCommentString) { + NDR_PULL_ALLOC(ndr, r->JobCommentString); + NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->JobCommentString, _ptr_JobCommentString)); + } else { + r->JobCommentString = NULL; + } + NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->JobCommentStringHigh)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); + } + if (ndr_flags & NDR_BUFFERS) { + if (r->PrintParameterString) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->PrintParameterString)); + _mem_save_PrintParameterString_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->PrintParameterString, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->PrintParameterString)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->PrintParameterString)); + if (ndr_get_array_length(ndr, &r->PrintParameterString) > ndr_get_array_size(ndr, &r->PrintParameterString)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->PrintParameterString), ndr_get_array_length(ndr, &r->PrintParameterString)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->PrintParameterString), sizeof(uint8_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->PrintParameterString, ndr_get_array_length(ndr, &r->PrintParameterString), sizeof(uint8_t), CH_DOS)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_PrintParameterString_0, 0); + } + if (r->JobStatusString) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->JobStatusString)); + _mem_save_JobStatusString_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->JobStatusString, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->JobStatusString)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->JobStatusString)); + if (ndr_get_array_length(ndr, &r->JobStatusString) > ndr_get_array_size(ndr, &r->JobStatusString)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->JobStatusString), ndr_get_array_length(ndr, &r->JobStatusString)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->JobStatusString), sizeof(uint8_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->JobStatusString, ndr_get_array_length(ndr, &r->JobStatusString), sizeof(uint8_t), CH_DOS)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_JobStatusString_0, 0); + } + if (r->JobCommentString) { + uint32_t _relative_save_offset; + _relative_save_offset = ndr->offset; + NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->JobCommentString)); + _mem_save_JobCommentString_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->JobCommentString, 0); + NDR_CHECK(ndr_pull_array_size(ndr, &r->JobCommentString)); + NDR_CHECK(ndr_pull_array_length(ndr, &r->JobCommentString)); + if (ndr_get_array_length(ndr, &r->JobCommentString) > ndr_get_array_size(ndr, &r->JobCommentString)) { + return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->JobCommentString), ndr_get_array_length(ndr, &r->JobCommentString)); + } + NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->JobCommentString), sizeof(uint8_t))); + NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->JobCommentString, ndr_get_array_length(ndr, &r->JobCommentString), sizeof(uint8_t), CH_DOS)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_JobCommentString_0, 0); + } + } + return NDR_ERR_SUCCESS; +} + +_PUBLIC_ void ndr_print_rap_PrintJobInfo1(struct ndr_print *ndr, const char *name, const struct rap_PrintJobInfo1 *r) +{ + ndr_print_struct(ndr, name, "rap_PrintJobInfo1"); + ndr->depth++; + ndr_print_uint16(ndr, "JobID", r->JobID); + ndr_print_array_uint8(ndr, "UserName", r->UserName, 21); + ndr_print_uint8(ndr, "Pad", r->Pad); + ndr_print_array_uint8(ndr, "NotifyName", r->NotifyName, 16); + ndr_print_array_uint8(ndr, "DataType", r->DataType, 10); + ndr_print_ptr(ndr, "PrintParameterString", r->PrintParameterString); + ndr->depth++; + if (r->PrintParameterString) { + ndr_print_string(ndr, "PrintParameterString", r->PrintParameterString); + } + ndr->depth--; + ndr_print_uint16(ndr, "PrintParameterStringHigh", r->PrintParameterStringHigh); + ndr_print_uint16(ndr, "JobPosition", r->JobPosition); + ndr_print_rap_PrintJStatusCode(ndr, "JobStatus", r->JobStatus); + ndr_print_ptr(ndr, "JobStatusString", r->JobStatusString); + ndr->depth++; + if (r->JobStatusString) { + ndr_print_string(ndr, "JobStatusString", r->JobStatusString); + } + ndr->depth--; + ndr_print_uint16(ndr, "JobStatusStringHigh", r->JobStatusStringHigh); + ndr_print_uint32(ndr, "TimeSubmitted", r->TimeSubmitted); + ndr_print_uint32(ndr, "JobSize", r->JobSize); + ndr_print_ptr(ndr, "JobCommentString", r->JobCommentString); + ndr->depth++; + if (r->JobCommentString) { + ndr_print_string(ndr, "JobCommentString", r->JobCommentString); + } + ndr->depth--; + ndr_print_uint16(ndr, "JobCommentStringHigh", r->JobCommentStringHigh); + ndr->depth--; +} + _PUBLIC_ enum ndr_err_code ndr_push_rap_PrintQStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintQStatusCode r) { NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); @@ -846,10 +1053,14 @@ _PUBLIC_ void ndr_print_rap_PrintQueue1(struct ndr_print *ndr, const char *name, static enum ndr_err_code ndr_push_rap_PrintQueue2(struct ndr_push *ndr, int ndr_flags, const struct rap_PrintQueue2 *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_push_align(ndr, 1)); - NDR_CHECK(ndr_push_trailer_align(ndr, 1)); + NDR_CHECK(ndr_push_align(ndr, 5)); + NDR_CHECK(ndr_push_rap_PrintQueue1(ndr, NDR_SCALARS, &r->queue)); + NDR_CHECK(ndr_push_rap_PrintJobInfo1(ndr, NDR_SCALARS, &r->job)); + NDR_CHECK(ndr_push_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_push_rap_PrintQueue1(ndr, NDR_BUFFERS, &r->queue)); + NDR_CHECK(ndr_push_rap_PrintJobInfo1(ndr, NDR_BUFFERS, &r->job)); } return NDR_ERR_SUCCESS; } @@ -857,10 +1068,14 @@ static enum ndr_err_code ndr_push_rap_PrintQueue2(struct ndr_push *ndr, int ndr_ static enum ndr_err_code ndr_pull_rap_PrintQueue2(struct ndr_pull *ndr, int ndr_flags, struct rap_PrintQueue2 *r) { if (ndr_flags & NDR_SCALARS) { - NDR_CHECK(ndr_pull_align(ndr, 1)); - NDR_CHECK(ndr_pull_trailer_align(ndr, 1)); + NDR_CHECK(ndr_pull_align(ndr, 5)); + NDR_CHECK(ndr_pull_rap_PrintQueue1(ndr, NDR_SCALARS, &r->queue)); + NDR_CHECK(ndr_pull_rap_PrintJobInfo1(ndr, NDR_SCALARS, &r->job)); + NDR_CHECK(ndr_pull_trailer_align(ndr, 5)); } if (ndr_flags & NDR_BUFFERS) { + NDR_CHECK(ndr_pull_rap_PrintQueue1(ndr, NDR_BUFFERS, &r->queue)); + NDR_CHECK(ndr_pull_rap_PrintJobInfo1(ndr, NDR_BUFFERS, &r->job)); } return NDR_ERR_SUCCESS; } @@ -869,6 +1084,8 @@ _PUBLIC_ void ndr_print_rap_PrintQueue2(struct ndr_print *ndr, const char *name, { ndr_print_struct(ndr, name, "rap_PrintQueue2"); ndr->depth++; + ndr_print_rap_PrintQueue1(ndr, "queue", &r->queue); + ndr_print_rap_PrintJobInfo1(ndr, "job", &r->job); ndr->depth--; } @@ -1391,6 +1608,7 @@ static enum ndr_err_code ndr_push_rap_printq_info(struct ndr_push *ndr, int ndr_ break; case 2: + NDR_CHECK(ndr_push_rap_PrintQueue2(ndr, NDR_BUFFERS, &r->info2)); break; case 3: @@ -1456,6 +1674,7 @@ static enum ndr_err_code ndr_pull_rap_printq_info(struct ndr_pull *ndr, int ndr_ break; case 2: + NDR_CHECK(ndr_pull_rap_PrintQueue2(ndr, NDR_BUFFERS, &r->info2)); break; case 3: @@ -1511,34 +1730,6 @@ _PUBLIC_ void ndr_print_rap_printq_info(struct ndr_print *ndr, const char *name, } } -_PUBLIC_ enum ndr_err_code ndr_push_rap_PrintJStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintJStatusCode r) -{ - NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r)); - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ enum ndr_err_code ndr_pull_rap_PrintJStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintJStatusCode *r) -{ - uint16_t v; - NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v)); - *r = v; - return NDR_ERR_SUCCESS; -} - -_PUBLIC_ void ndr_print_rap_PrintJStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintJStatusCode r) -{ - const char *val = NULL; - - switch (r) { - case PRJ_QS_QUEUED: val = "PRJ_QS_QUEUED"; break; - case PRJ_QS_PAUSED: val = "PRJ_QS_PAUSED"; break; - case PRJ_QS_SPOOLING: val = "PRJ_QS_SPOOLING"; break; - case PRJ_QS_PRINTING: val = "PRJ_QS_PRINTING"; break; - case PRJ_QS_ERROR: val = "PRJ_QS_ERROR"; break; - } - ndr_print_enum(ndr, name, "ENUM", val, r); -} - _PUBLIC_ enum ndr_err_code ndr_push_rap_NetShareEnum(struct ndr_push *ndr, int flags, const struct rap_NetShareEnum *r) { if (flags & NDR_IN) { @@ -1827,34 +2018,3 @@ _PUBLIC_ enum ndr_err_code ndr_pull_rap_NetPrintQEnum(struct ndr_pull *ndr, int return NDR_ERR_SUCCESS; } -_PUBLIC_ void ndr_print_rap_NetPrintQEnum(struct ndr_print *ndr, const char *name, int flags, const struct rap_NetPrintQEnum *r) -{ - ndr_print_struct(ndr, name, "rap_NetPrintQEnum"); - ndr->depth++; - if (flags & NDR_SET_VALUES) { - ndr->flags |= LIBNDR_PRINT_SET_VALUES; - } - if (flags & NDR_IN) { - ndr_print_struct(ndr, "in", "rap_NetPrintQEnum"); - ndr->depth++; - ndr_print_uint16(ndr, "level", r->in.level); - ndr_print_uint16(ndr, "bufsize", r->in.bufsize); - ndr->depth--; - } - if (flags & NDR_OUT) { - ndr_print_struct(ndr, "out", "rap_NetPrintQEnum"); - ndr->depth++; - ndr_print_uint16(ndr, "status", r->out.status); - ndr_print_uint16(ndr, "convert", r->out.convert); - ndr_print_uint16(ndr, "count", r->out.count); - ndr_print_uint16(ndr, "available", r->out.available); - ndr_print_ptr(ndr, "info", r->out.info); - ndr->depth++; - ndr_print_set_switch_value(ndr, r->out.info, r->in.level); - ndr_print_rap_printq_info(ndr, "info", r->out.info); - ndr->depth--; - ndr->depth--; - } - ndr->depth--; -} - diff --git a/librpc/gen_ndr/ndr_rap.h b/librpc/gen_ndr/ndr_rap.h index dc2293d4b3..f940d0e0d7 100644 --- a/librpc/gen_ndr/ndr_rap.h +++ b/librpc/gen_ndr/ndr_rap.h @@ -6,6 +6,7 @@ #ifndef _HEADER_NDR_rap #define _HEADER_NDR_rap +#include "../librpc/ndr/ndr_rap.h" #define NDR_RAP_NETSHAREENUM (0x00) #define NDR_RAP_NETSERVERENUM2 (0x01) @@ -22,6 +23,10 @@ void ndr_print_rap_share_info(struct ndr_print *ndr, const char *name, const uni void ndr_print_rap_server_info_0(struct ndr_print *ndr, const char *name, const struct rap_server_info_0 *r); void ndr_print_rap_server_info_1(struct ndr_print *ndr, const char *name, const struct rap_server_info_1 *r); void ndr_print_rap_server_info(struct ndr_print *ndr, const char *name, const union rap_server_info *r); +enum ndr_err_code ndr_push_rap_PrintJStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintJStatusCode r); +enum ndr_err_code ndr_pull_rap_PrintJStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintJStatusCode *r); +void ndr_print_rap_PrintJStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintJStatusCode r); +void ndr_print_rap_PrintJobInfo1(struct ndr_print *ndr, const char *name, const struct rap_PrintJobInfo1 *r); enum ndr_err_code ndr_push_rap_PrintQStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintQStatusCode r); enum ndr_err_code ndr_pull_rap_PrintQStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintQStatusCode *r); void ndr_print_rap_PrintQStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintQStatusCode r); @@ -32,9 +37,6 @@ void ndr_print_rap_PrintQueue3(struct ndr_print *ndr, const char *name, const st void ndr_print_rap_PrintQueue4(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue4 *r); void ndr_print_rap_PrintQueue5(struct ndr_print *ndr, const char *name, const struct rap_PrintQueue5 *r); void ndr_print_rap_printq_info(struct ndr_print *ndr, const char *name, const union rap_printq_info *r); -enum ndr_err_code ndr_push_rap_PrintJStatusCode(struct ndr_push *ndr, int ndr_flags, enum rap_PrintJStatusCode r); -enum ndr_err_code ndr_pull_rap_PrintJStatusCode(struct ndr_pull *ndr, int ndr_flags, enum rap_PrintJStatusCode *r); -void ndr_print_rap_PrintJStatusCode(struct ndr_print *ndr, const char *name, enum rap_PrintJStatusCode r); enum ndr_err_code ndr_push_rap_NetShareEnum(struct ndr_push *ndr, int flags, const struct rap_NetShareEnum *r); enum ndr_err_code ndr_pull_rap_NetShareEnum(struct ndr_pull *ndr, int flags, struct rap_NetShareEnum *r); void ndr_print_rap_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct rap_NetShareEnum *r); diff --git a/librpc/gen_ndr/rap.h b/librpc/gen_ndr/rap.h index e4a02ba729..68a12738e7 100644 --- a/librpc/gen_ndr/rap.h +++ b/librpc/gen_ndr/rap.h @@ -411,94 +411,6 @@ union rap_server_info { struct rap_server_info_1 info1;/* [case] */ }/* [nodiscriminant] */; -enum rap_PrintQStatusCode -#ifndef USE_UINT_ENUMS - { - PRQ_ACTIVE=(int)(0x0000), - PRQ_PAUSE=(int)(0x0001), - PRQ_ERROR=(int)(0x0002), - PRQ_PENDING=(int)(0x0003) -} -#else - { __donnot_use_enum_rap_PrintQStatusCode=0x7FFFFFFF} -#define PRQ_ACTIVE ( 0x0000 ) -#define PRQ_PAUSE ( 0x0001 ) -#define PRQ_ERROR ( 0x0002 ) -#define PRQ_PENDING ( 0x0003 ) -#endif -; - -struct rap_PrintQueue0 { - uint8_t PrintQName[13]; -}; - -struct rap_PrintQueue1 { - uint8_t PrintQName[13]; - uint8_t Pad1; - uint16_t Priority; - uint16_t StartTime; - uint16_t UntilTime; - const char *SeparatorPageFilename;/* [charset(DOS),relative_short] */ - uint16_t SeparatorPageFilenameHigh; - const char *PrintProcessorDllName;/* [charset(DOS),relative_short] */ - uint16_t PrintProcessorDllNameHigh; - const char *PrintDestinationsName;/* [charset(DOS),relative_short] */ - uint16_t PrintDestinationsNameHigh; - const char *PrintParameterString;/* [charset(DOS),relative_short] */ - uint16_t PrintParameterStringHigh; - const char *CommentString;/* [charset(DOS),relative_short] */ - uint16_t CommentStringHigh; - enum rap_PrintQStatusCode PrintQStatus; - uint16_t PrintJobCount; -}; - -struct rap_PrintQueue2 { - char _empty_; -}; - -struct rap_PrintQueue3 { - const char *PrintQueueName;/* [charset(DOS),relative_short] */ - uint16_t PrintQueueNameHigh; - uint16_t Priority; - uint16_t StartTime; - uint16_t UntilTime; - uint16_t Pad; - const char *SeparatorPageFilename;/* [charset(DOS),relative_short] */ - uint16_t SeparatorPageFilenameHigh; - const char *PrintProcessorDllName;/* [charset(DOS),relative_short] */ - uint16_t PrintProcessorDllNameHigh; - const char *PrintParameterString;/* [charset(DOS),relative_short] */ - uint16_t PrintParameterStringHigh; - const char *CommentString;/* [charset(DOS),relative_short] */ - uint16_t CommentStringHigh; - enum rap_PrintQStatusCode PrintQStatus; - uint16_t PrintJobCount; - const char *Printers;/* [charset(DOS),relative_short] */ - uint16_t PrintersHigh; - const char *DriverName;/* [charset(DOS),relative_short] */ - uint16_t DriverNameHigh; - const char *PrintDriverData;/* [charset(DOS),relative_short] */ - uint16_t PrintDriverDataHigh; -}; - -struct rap_PrintQueue4 { - char _empty_; -}; - -struct rap_PrintQueue5 { - const char *PrintQueueName;/* [charset(DOS),relative_short] */ - uint16_t PrintQueueNameHigh; -}; - -union rap_printq_info { - struct rap_PrintQueue0 info0;/* [case(0)] */ - struct rap_PrintQueue1 info1;/* [case] */ - struct rap_PrintQueue2 info2;/* [case(2)] */ - struct rap_PrintQueue3 info3;/* [case(3)] */ - struct rap_PrintQueue4 info4;/* [case(4)] */ - struct rap_PrintQueue5 info5;/* [case(5)] */ -}/* [nodiscriminant] */; - enum rap_PrintJStatusCode #ifndef USE_UINT_ENUMS { @@ -590,6 +502,95 @@ struct rap_PrintJobInfo3 { uint16_t PrinterNameOffsetHigh; }; +enum rap_PrintQStatusCode +#ifndef USE_UINT_ENUMS + { + PRQ_ACTIVE=(int)(0x0000), + PRQ_PAUSE=(int)(0x0001), + PRQ_ERROR=(int)(0x0002), + PRQ_PENDING=(int)(0x0003) +} +#else + { __donnot_use_enum_rap_PrintQStatusCode=0x7FFFFFFF} +#define PRQ_ACTIVE ( 0x0000 ) +#define PRQ_PAUSE ( 0x0001 ) +#define PRQ_ERROR ( 0x0002 ) +#define PRQ_PENDING ( 0x0003 ) +#endif +; + +struct rap_PrintQueue0 { + uint8_t PrintQName[13]; +}; + +struct rap_PrintQueue1 { + uint8_t PrintQName[13]; + uint8_t Pad1; + uint16_t Priority; + uint16_t StartTime; + uint16_t UntilTime; + const char *SeparatorPageFilename;/* [charset(DOS),relative_short] */ + uint16_t SeparatorPageFilenameHigh; + const char *PrintProcessorDllName;/* [charset(DOS),relative_short] */ + uint16_t PrintProcessorDllNameHigh; + const char *PrintDestinationsName;/* [charset(DOS),relative_short] */ + uint16_t PrintDestinationsNameHigh; + const char *PrintParameterString;/* [charset(DOS),relative_short] */ + uint16_t PrintParameterStringHigh; + const char *CommentString;/* [charset(DOS),relative_short] */ + uint16_t CommentStringHigh; + enum rap_PrintQStatusCode PrintQStatus; + uint16_t PrintJobCount; +}; + +struct rap_PrintQueue2 { + struct rap_PrintQueue1 queue; + struct rap_PrintJobInfo1 job; +}; + +struct rap_PrintQueue3 { + const char *PrintQueueName;/* [charset(DOS),relative_short] */ + uint16_t PrintQueueNameHigh; + uint16_t Priority; + uint16_t StartTime; + uint16_t UntilTime; + uint16_t Pad; + const char *SeparatorPageFilename;/* [charset(DOS),relative_short] */ + uint16_t SeparatorPageFilenameHigh; + const char *PrintProcessorDllName;/* [charset(DOS),relative_short] */ + uint16_t PrintProcessorDllNameHigh; + const char *PrintParameterString;/* [charset(DOS),relative_short] */ + uint16_t PrintParameterStringHigh; + const char *CommentString;/* [charset(DOS),relative_short] */ + uint16_t CommentStringHigh; + enum rap_PrintQStatusCode PrintQStatus; + uint16_t PrintJobCount; + const char *Printers;/* [charset(DOS),relative_short] */ + uint16_t PrintersHigh; + const char *DriverName;/* [charset(DOS),relative_short] */ + uint16_t DriverNameHigh; + const char *PrintDriverData;/* [charset(DOS),relative_short] */ + uint16_t PrintDriverDataHigh; +}; + +struct rap_PrintQueue4 { + char _empty_; +}; + +struct rap_PrintQueue5 { + const char *PrintQueueName;/* [charset(DOS),relative_short] */ + uint16_t PrintQueueNameHigh; +}; + +union rap_printq_info { + struct rap_PrintQueue0 info0;/* [case(0)] */ + struct rap_PrintQueue1 info1;/* [case] */ + struct rap_PrintQueue2 info2;/* [case(2)] */ + struct rap_PrintQueue3 info3;/* [case(3)] */ + struct rap_PrintQueue4 info4;/* [case(4)] */ + struct rap_PrintQueue5 info5;/* [case(5)] */ +}/* [nodiscriminant] */; + struct rap_NetShareEnum { struct { diff --git a/librpc/idl/rap.idl b/librpc/idl/rap.idl index 4ddb1a6f8d..c35dcd754e 100644 --- a/librpc/idl/rap.idl +++ b/librpc/idl/rap.idl @@ -387,82 +387,6 @@ interface rap ); typedef [public] enum { - PRQ_ACTIVE = 0x0000, - PRQ_PAUSE = 0x0001, - PRQ_ERROR = 0x0002, - PRQ_PENDING = 0x0003 - } rap_PrintQStatusCode; - - typedef struct { - uint8 PrintQName[13]; - } rap_PrintQueue0; - - typedef struct { - uint8 PrintQName[13]; - uint8 Pad1; - uint16 Priority; - uint16 StartTime; - uint16 UntilTime; - [relative_short] [string,charset(DOS)] uint8 *SeparatorPageFilename; - uint16 SeparatorPageFilenameHigh; - [relative_short] [string,charset(DOS)] uint8 *PrintProcessorDllName; - uint16 PrintProcessorDllNameHigh; - [relative_short] [string,charset(DOS)] uint8 *PrintDestinationsName; - uint16 PrintDestinationsNameHigh; - [relative_short] [string,charset(DOS)] uint8 *PrintParameterString; - uint16 PrintParameterStringHigh; - [relative_short] [string,charset(DOS)] uint8 *CommentString; - uint16 CommentStringHigh; - rap_PrintQStatusCode PrintQStatus; - uint16 PrintJobCount; - } rap_PrintQueue1; - - typedef struct { - } rap_PrintQueue2; - - typedef struct { - [relative_short] [string,charset(DOS)] uint8 *PrintQueueName; - uint16 PrintQueueNameHigh; - uint16 Priority; - uint16 StartTime; - uint16 UntilTime; - uint16 Pad; - [relative_short] [string,charset(DOS)] uint8 *SeparatorPageFilename; - uint16 SeparatorPageFilenameHigh; - [relative_short] [string,charset(DOS)] uint8 *PrintProcessorDllName; - uint16 PrintProcessorDllNameHigh; - [relative_short] [string,charset(DOS)] uint8 *PrintParameterString; - uint16 PrintParameterStringHigh; - [relative_short] [string,charset(DOS)] uint8 *CommentString; - uint16 CommentStringHigh; - rap_PrintQStatusCode PrintQStatus; - uint16 PrintJobCount; - [relative_short] [string,charset(DOS)] uint8 *Printers; - uint16 PrintersHigh; - [relative_short] [string,charset(DOS)] uint8 *DriverName; - uint16 DriverNameHigh; - [relative_short] [string,charset(DOS)] uint8 *PrintDriverData; - uint16 PrintDriverDataHigh; - } rap_PrintQueue3; - - typedef struct { - } rap_PrintQueue4; - - typedef struct { - [relative_short] [string,charset(DOS)] uint8 *PrintQueueName; - uint16 PrintQueueNameHigh; - } rap_PrintQueue5; - - typedef [nodiscriminant] union { - [case(0)] rap_PrintQueue0 info0; - [case(1)] rap_PrintQueue1 info1; - [case(2)] rap_PrintQueue2 info2; - [case(3)] rap_PrintQueue3 info3; - [case(4)] rap_PrintQueue4 info4; - [case(5)] rap_PrintQueue5 info5; - } rap_printq_info; - - typedef [public] enum { PRJ_QS_QUEUED = 0x0000, PRJ_QS_PAUSED = 0x0001, PRJ_QS_SPOOLING = 0x0002, @@ -542,6 +466,84 @@ interface rap uint16 PrinterNameOffsetHigh; } rap_PrintJobInfo3; + typedef [public] enum { + PRQ_ACTIVE = 0x0000, + PRQ_PAUSE = 0x0001, + PRQ_ERROR = 0x0002, + PRQ_PENDING = 0x0003 + } rap_PrintQStatusCode; + + typedef struct { + uint8 PrintQName[13]; + } rap_PrintQueue0; + + typedef struct { + uint8 PrintQName[13]; + uint8 Pad1; + uint16 Priority; + uint16 StartTime; + uint16 UntilTime; + [relative_short] [string,charset(DOS)] uint8 *SeparatorPageFilename; + uint16 SeparatorPageFilenameHigh; + [relative_short] [string,charset(DOS)] uint8 *PrintProcessorDllName; + uint16 PrintProcessorDllNameHigh; + [relative_short] [string,charset(DOS)] uint8 *PrintDestinationsName; + uint16 PrintDestinationsNameHigh; + [relative_short] [string,charset(DOS)] uint8 *PrintParameterString; + uint16 PrintParameterStringHigh; + [relative_short] [string,charset(DOS)] uint8 *CommentString; + uint16 CommentStringHigh; + rap_PrintQStatusCode PrintQStatus; + uint16 PrintJobCount; + } rap_PrintQueue1; + + typedef struct { + rap_PrintQueue1 queue; + rap_PrintJobInfo1 job; + } rap_PrintQueue2; + + typedef struct { + [relative_short] [string,charset(DOS)] uint8 *PrintQueueName; + uint16 PrintQueueNameHigh; + uint16 Priority; + uint16 StartTime; + uint16 UntilTime; + uint16 Pad; + [relative_short] [string,charset(DOS)] uint8 *SeparatorPageFilename; + uint16 SeparatorPageFilenameHigh; + [relative_short] [string,charset(DOS)] uint8 *PrintProcessorDllName; + uint16 PrintProcessorDllNameHigh; + [relative_short] [string,charset(DOS)] uint8 *PrintParameterString; + uint16 PrintParameterStringHigh; + [relative_short] [string,charset(DOS)] uint8 *CommentString; + uint16 CommentStringHigh; + rap_PrintQStatusCode PrintQStatus; + uint16 PrintJobCount; + [relative_short] [string,charset(DOS)] uint8 *Printers; + uint16 PrintersHigh; + [relative_short] [string,charset(DOS)] uint8 *DriverName; + uint16 DriverNameHigh; + [relative_short] [string,charset(DOS)] uint8 *PrintDriverData; + uint16 PrintDriverDataHigh; + } rap_PrintQueue3; + + typedef struct { + } rap_PrintQueue4; + + typedef struct { + [relative_short] [string,charset(DOS)] uint8 *PrintQueueName; + uint16 PrintQueueNameHigh; + } rap_PrintQueue5; + + typedef [nodiscriminant] union { + [case(0)] rap_PrintQueue0 info0; + [case(1)] rap_PrintQueue1 info1; + [case(2)] rap_PrintQueue2 info2; + [case(3)] rap_PrintQueue3 info3; + [case(4)] rap_PrintQueue4 info4; + [case(5)] rap_PrintQueue5 info5; + } rap_printq_info; + [public,noprint] void rap_NetPrintQEnum( [in] uint16 level, [in] uint16 bufsize, |