summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-03-03 18:22:57 +0100
committerGünther Deschner <gd@samba.org>2010-03-05 15:17:58 +0100
commit0528515be44c40603827bb153ff0e2bac7b0f041 (patch)
treef6bfee274c981072954cc5c14b3dd38dad7879c3
parentce296d2a53674668b9e4e6f18b88ff34f2dd2190 (diff)
downloadsamba-0528515be44c40603827bb153ff0e2bac7b0f041.tar.gz
samba-0528515be44c40603827bb153ff0e2bac7b0f041.tar.bz2
samba-0528515be44c40603827bb153ff0e2bac7b0f041.zip
spoolss: rollback SetPrinterData{Ex} IDL.
Guenther
-rw-r--r--librpc/idl/spoolss.idl35
-rw-r--r--librpc/ndr/ndr_spoolss_buf.c82
-rw-r--r--librpc/ndr/ndr_spoolss_buf.h2
3 files changed, 6 insertions, 113 deletions
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 530e09e248..6a53cb8c5c 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1948,23 +1948,12 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
/******************/
/* Function: 0x1b */
- [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterData(
+ WERROR spoolss_SetPrinterData(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 value_name[],
[in] winreg_Type type,
- [in] DATA_BLOB data,
- [in] uint32 _offered
- );
- [noopnum,nopull,noprint,public] void __spoolss_SetPrinterData(
- [in] winreg_Type type,
- [out,ref,switch_is(type)] spoolss_PrinterData *data
- );
- [nopush] WERROR spoolss_SetPrinterData(
- [in,ref] policy_handle *handle,
- [in] [string,charset(UTF16)] uint16 value_name[],
- [in] winreg_Type type,
- [in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
- [in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
+ [in,ref] [size_is(offered)] uint8 *data,
+ [in] uint32 offered
);
/******************/
@@ -2849,25 +2838,13 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
/******************/
/* Function: 0x4d */
- [noopnum,nopull,noprint,public] WERROR _spoolss_SetPrinterDataEx(
- [in,ref] policy_handle *handle,
- [in] [string,charset(UTF16)] uint16 key_name[],
- [in] [string,charset(UTF16)] uint16 value_name[],
- [in] winreg_Type type,
- [in] DATA_BLOB data,
- [in] uint32 _offered
- );
- [noopnum,nopull,noprint,public] void __spoolss_SetPrinterDataEx(
- [in] winreg_Type type,
- [out,ref,switch_is(type)] spoolss_PrinterData *data
- );
- [nopush] WERROR spoolss_SetPrinterDataEx(
+ WERROR spoolss_SetPrinterDataEx(
[in,ref] policy_handle *handle,
[in] [string,charset(UTF16)] uint16 key_name[],
[in] [string,charset(UTF16)] uint16 value_name[],
[in] winreg_Type type,
- [in,subcontext(4),switch_is(type)] spoolss_PrinterData data,
- [in,value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] uint32 _offered
+ [in,ref] [size_is(offered)] uint8 *data,
+ [in] uint32 offered
);
/******************/
diff --git a/librpc/ndr/ndr_spoolss_buf.c b/librpc/ndr/ndr_spoolss_buf.c
index a616aad0c2..b20c8de353 100644
--- a/librpc/ndr/ndr_spoolss_buf.c
+++ b/librpc/ndr/ndr_spoolss_buf.c
@@ -658,46 +658,6 @@ enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flag
}
/*
- spoolss_SetPrinterData
-*/
-enum ndr_err_code ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterData *r)
-{
- struct _spoolss_SetPrinterData _r;
- if (flags & NDR_IN) {
- struct ndr_push *_ndr_data;
- struct __spoolss_SetPrinterData __r;
- DATA_BLOB _data_blob_data;
-
- _ndr_data = ndr_push_init_ctx(ndr, ndr->iconv_convenience);
- NDR_ERR_HAVE_NO_MEMORY(_ndr_data);
- _ndr_data->flags= ndr->flags;
-
- __r.in.type = r->in.type;
- __r.out.data = discard_const_p(union spoolss_PrinterData, &r->in.data);
- NDR_CHECK(ndr_push___spoolss_SetPrinterData(_ndr_data, NDR_OUT, &__r));
- _data_blob_data = ndr_push_blob(_ndr_data);
-
- _r.in.handle = r->in.handle;
- _r.in.value_name= r->in.value_name;
- _r.in.type = r->in.type;
- _r.in.data = _data_blob_data;
- _r.in._offered = _data_blob_data.length;
- _r.out.result = r->out.result;
- NDR_CHECK(ndr_push__spoolss_SetPrinterData(ndr, flags, &_r));
- }
- if (flags & NDR_OUT) {
- _r.in.handle = r->in.handle;
- _r.in.value_name= r->in.value_name;
- _r.in.type = r->in.type;
- _r.in.data = data_blob(NULL,0),
- _r.in._offered = r->in._offered;
- _r.out.result = r->out.result;
- NDR_CHECK(ndr_push__spoolss_SetPrinterData(ndr, flags, &_r));
- }
- return NDR_ERR_SUCCESS;
-}
-
-/*
spoolss_GetPrinterDataEx
*/
enum ndr_err_code ndr_push_spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDataEx *r)
@@ -802,48 +762,6 @@ enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int fl
return NDR_ERR_SUCCESS;
}
-/*
- spoolss_SetPrinterDataEx
-*/
-enum ndr_err_code ndr_push_spoolss_SetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterDataEx *r)
-{
- struct _spoolss_SetPrinterDataEx _r;
- if (flags & NDR_IN) {
- struct ndr_push *_ndr_data;
- struct __spoolss_SetPrinterDataEx __r;
- DATA_BLOB _data_blob_data;
-
- _ndr_data = ndr_push_init_ctx(ndr, ndr->iconv_convenience);
- NDR_ERR_HAVE_NO_MEMORY(_ndr_data);
- _ndr_data->flags= ndr->flags;
-
- __r.in.type = r->in.type;
- __r.out.data = discard_const_p(union spoolss_PrinterData, &r->in.data);
- NDR_CHECK(ndr_push___spoolss_SetPrinterDataEx(_ndr_data, NDR_OUT, &__r));
- _data_blob_data = ndr_push_blob(_ndr_data);
-
- _r.in.handle = r->in.handle;
- _r.in.key_name = r->in.key_name;
- _r.in.value_name= r->in.value_name;
- _r.in.type = r->in.type;
- _r.in.data = _data_blob_data;
- _r.in._offered = _data_blob_data.length;
- _r.out.result = r->out.result;
- NDR_CHECK(ndr_push__spoolss_SetPrinterDataEx(ndr, flags, &_r));
- }
- if (flags & NDR_OUT) {
- _r.in.handle = r->in.handle;
- _r.in.key_name = r->in.key_name;
- _r.in.value_name= r->in.value_name;
- _r.in.type = r->in.type;
- _r.in.data = data_blob(NULL,0),
- _r.in._offered = r->in._offered;
- _r.out.result = r->out.result;
- NDR_CHECK(ndr_push__spoolss_SetPrinterDataEx(ndr, flags, &_r));
- }
- return NDR_ERR_SUCCESS;
-}
-
uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags)
{
if (!devmode) return 0;
diff --git a/librpc/ndr/ndr_spoolss_buf.h b/librpc/ndr/ndr_spoolss_buf.h
index 948e910edf..fa22cdfce7 100644
--- a/librpc/ndr/ndr_spoolss_buf.h
+++ b/librpc/ndr/ndr_spoolss_buf.h
@@ -44,10 +44,8 @@ uint32_t ndr_size_spoolss_EnumPrinterDataEx_info(TALLOC_CTX *mem_ctx, struct smb
uint32_t count, struct spoolss_PrinterEnumValues *info);
enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r);
enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterData *r);
-enum ndr_err_code ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterData *r);
enum ndr_err_code ndr_push_spoolss_GetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterDataEx *r);
enum ndr_err_code ndr_pull_spoolss_GetPrinterDataEx(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterDataEx *r);
-enum ndr_err_code ndr_push_spoolss_SetPrinterDataEx(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterDataEx *r);
uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, struct smb_iconv_convenience *ic, uint32_t flags);
size_t ndr_size_spoolss_StringArray(const struct spoolss_StringArray *r, struct smb_iconv_convenience *ic, int flags);
_PUBLIC_ enum ndr_err_code ndr_push_spoolss_DriverInfo101(struct ndr_push *ndr, int ndr_flags, const struct spoolss_DriverInfo101 *r);