The branch, master has been updated
       via  8f130d54799097f731fe39211dae2d2eb0f6df98 (commit)
       via  43040b316ce70849a90f059d1fb6f234088df14b (commit)
       via  bf72c59c1bb465d3e8b687ac19108fac4d7f044a (commit)
      from  b8cafc5ad21fa999ce52facf605b3c315edde322 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8f130d54799097f731fe39211dae2d2eb0f6df98
Author: Günther Deschner <g...@samba.org>
Date:   Mon Feb 9 12:32:09 2009 +0100

    s3-spoolss: remove SPOOLSS_DELETEPRINTERDRIVEREX flags now defined in IDL.
    
    Guenther

commit 43040b316ce70849a90f059d1fb6f234088df14b
Author: Günther Deschner <g...@samba.org>
Date:   Mon Feb 9 11:11:28 2009 +0100

    s3: re-run make samba3-idl.
    
    Guenther

commit bf72c59c1bb465d3e8b687ac19108fac4d7f044a
Author: Günther Deschner <g...@samba.org>
Date:   Mon Feb 9 11:11:01 2009 +0100

    spoolss: fill in spoolss_DeletePrinterDriverEx IDL.
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 librpc/gen_ndr/cli_spoolss.c  |   10 +++++
 librpc/gen_ndr/cli_spoolss.h  |    5 ++
 librpc/gen_ndr/ndr_spoolss.c  |   87 +++++++++++++++++++++++++++++++++++++++++
 librpc/gen_ndr/ndr_spoolss.h  |    3 +
 librpc/gen_ndr/spoolss.h      |   13 ++++++
 librpc/idl/spoolss.idl        |   13 ++++++-
 source3/include/rpc_spoolss.h |    6 ---
 7 files changed, 130 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c
index ec0b43a..63f8977 100644
--- a/librpc/gen_ndr/cli_spoolss.c
+++ b/librpc/gen_ndr/cli_spoolss.c
@@ -3924,12 +3924,22 @@ NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
 
 NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
                                              TALLOC_CTX *mem_ctx,
+                                             const char *server /* [in] 
[unique,charset(UTF16)] */,
+                                             const char *architecture /* [in] 
[charset(UTF16)] */,
+                                             const char *driver /* [in] 
[charset(UTF16)] */,
+                                             uint32_t delete_flags /* [in]  */,
+                                             uint32_t version /* [in]  */,
                                              WERROR *werror)
 {
        struct spoolss_DeletePrinterDriverEx r;
        NTSTATUS status;
 
        /* In parameters */
+       r.in.server = server;
+       r.in.architecture = architecture;
+       r.in.driver = driver;
+       r.in.delete_flags = delete_flags;
+       r.in.version = version;
 
        if (DEBUGLEVEL >= 10) {
                NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &r);
diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h
index f534eab..a77878b 100644
--- a/librpc/gen_ndr/cli_spoolss.h
+++ b/librpc/gen_ndr/cli_spoolss.h
@@ -478,6 +478,11 @@ NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli,
                           WERROR *werror);
 NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli,
                                              TALLOC_CTX *mem_ctx,
+                                             const char *server /* [in] 
[unique,charset(UTF16)] */,
+                                             const char *architecture /* [in] 
[charset(UTF16)] */,
+                                             const char *driver /* [in] 
[charset(UTF16)] */,
+                                             uint32_t delete_flags /* [in]  */,
+                                             uint32_t version /* [in]  */,
                                              WERROR *werror);
 NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli,
                           TALLOC_CTX *mem_ctx,
diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index df4a629..7f66abe 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -9006,6 +9006,30 @@ _PUBLIC_ void ndr_print_spoolss_UserLevel(struct 
ndr_print *ndr, const char *nam
        }
 }
 
+_PUBLIC_ enum ndr_err_code ndr_push_spoolss_DeleteDriverFlags(struct ndr_push 
*ndr, int ndr_flags, uint32_t r)
+{
+       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ enum ndr_err_code ndr_pull_spoolss_DeleteDriverFlags(struct ndr_pull 
*ndr, int ndr_flags, uint32_t *r)
+{
+       uint32_t v;
+       NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
+       *r = v;
+       return NDR_ERR_SUCCESS;
+}
+
+_PUBLIC_ void ndr_print_spoolss_DeleteDriverFlags(struct ndr_print *ndr, const 
char *name, uint32_t r)
+{
+       ndr_print_uint32(ndr, name, r);
+       ndr->depth++;
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DPD_DELETE_UNUSED_FILES", 
DPD_DELETE_UNUSED_FILES, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
"DPD_DELETE_SPECIFIC_VERSION", DPD_DELETE_SPECIFIC_VERSION, r);
+       ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DPD_DELETE_ALL_FILES", 
DPD_DELETE_ALL_FILES, r);
+       ndr->depth--;
+}
+
 _PUBLIC_ enum ndr_err_code ndr_push__spoolss_EnumPrinters(struct ndr_push 
*ndr, int flags, const struct _spoolss_EnumPrinters *r)
 {
        if (flags & NDR_IN) {
@@ -16079,6 +16103,23 @@ _PUBLIC_ void ndr_print_spoolss_53(struct ndr_print 
*ndr, const char *name, int
 static enum ndr_err_code ndr_push_spoolss_DeletePrinterDriverEx(struct 
ndr_push *ndr, int flags, const struct spoolss_DeletePrinterDriverEx *r)
 {
        if (flags & NDR_IN) {
+               NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
+               if (r->in.server) {
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
ndr_charset_length(r->in.server, CH_UTF16)));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+                       NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
ndr_charset_length(r->in.server, CH_UTF16)));
+                       NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, 
r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), 
CH_UTF16));
+               }
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
ndr_charset_length(r->in.architecture, CH_UTF16)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
ndr_charset_length(r->in.architecture, CH_UTF16)));
+               NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, 
r->in.architecture, ndr_charset_length(r->in.architecture, CH_UTF16), 
sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
ndr_charset_length(r->in.driver, CH_UTF16)));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 
ndr_charset_length(r->in.driver, CH_UTF16)));
+               NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.driver, 
ndr_charset_length(r->in.driver, CH_UTF16), sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_push_spoolss_DeleteDriverFlags(ndr, NDR_SCALARS, 
r->in.delete_flags));
+               NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.version));
        }
        if (flags & NDR_OUT) {
                NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
@@ -16088,7 +16129,43 @@ static enum ndr_err_code 
ndr_push_spoolss_DeletePrinterDriverEx(struct ndr_push
 
 static enum ndr_err_code ndr_pull_spoolss_DeletePrinterDriverEx(struct 
ndr_pull *ndr, int flags, struct spoolss_DeletePrinterDriverEx *r)
 {
+       uint32_t _ptr_server;
+       TALLOC_CTX *_mem_save_server_0;
        if (flags & NDR_IN) {
+               NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
+               if (_ptr_server) {
+                       NDR_PULL_ALLOC(ndr, r->in.server);
+               } else {
+                       r->in.server = NULL;
+               }
+               if (r->in.server) {
+                       _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
+                       NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
+                       NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
+                       NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
+                       if (ndr_get_array_length(ndr, &r->in.server) > 
ndr_get_array_size(ndr, &r->in.server)) {
+                               return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, 
"Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, 
&r->in.server), ndr_get_array_length(ndr, &r->in.server));
+                       }
+                       NDR_CHECK(ndr_check_string_terminator(ndr, 
ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
+                       NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, 
&r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), 
CH_UTF16));
+                       NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
+               }
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->in.architecture));
+               NDR_CHECK(ndr_pull_array_length(ndr, &r->in.architecture));
+               if (ndr_get_array_length(ndr, &r->in.architecture) > 
ndr_get_array_size(ndr, &r->in.architecture)) {
+                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad 
array size %u should exceed array length %u", ndr_get_array_size(ndr, 
&r->in.architecture), ndr_get_array_length(ndr, &r->in.architecture));
+               }
+               NDR_CHECK(ndr_check_string_terminator(ndr, 
ndr_get_array_length(ndr, &r->in.architecture), sizeof(uint16_t)));
+               NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, 
&r->in.architecture, ndr_get_array_length(ndr, &r->in.architecture), 
sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_pull_array_size(ndr, &r->in.driver));
+               NDR_CHECK(ndr_pull_array_length(ndr, &r->in.driver));
+               if (ndr_get_array_length(ndr, &r->in.driver) > 
ndr_get_array_size(ndr, &r->in.driver)) {
+                       return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad 
array size %u should exceed array length %u", ndr_get_array_size(ndr, 
&r->in.driver), ndr_get_array_length(ndr, &r->in.driver));
+               }
+               NDR_CHECK(ndr_check_string_terminator(ndr, 
ndr_get_array_length(ndr, &r->in.driver), sizeof(uint16_t)));
+               NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.driver, 
ndr_get_array_length(ndr, &r->in.driver), sizeof(uint16_t), CH_UTF16));
+               NDR_CHECK(ndr_pull_spoolss_DeleteDriverFlags(ndr, NDR_SCALARS, 
&r->in.delete_flags));
+               NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.version));
        }
        if (flags & NDR_OUT) {
                NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
@@ -16106,6 +16183,16 @@ _PUBLIC_ void 
ndr_print_spoolss_DeletePrinterDriverEx(struct ndr_print *ndr, con
        if (flags & NDR_IN) {
                ndr_print_struct(ndr, "in", "spoolss_DeletePrinterDriverEx");
                ndr->depth++;
+               ndr_print_ptr(ndr, "server", r->in.server);
+               ndr->depth++;
+               if (r->in.server) {
+                       ndr_print_string(ndr, "server", r->in.server);
+               }
+               ndr->depth--;
+               ndr_print_string(ndr, "architecture", r->in.architecture);
+               ndr_print_string(ndr, "driver", r->in.driver);
+               ndr_print_spoolss_DeleteDriverFlags(ndr, "delete_flags", 
r->in.delete_flags);
+               ndr_print_uint32(ndr, "version", r->in.version);
                ndr->depth--;
        }
        if (flags & NDR_OUT) {
diff --git a/librpc/gen_ndr/ndr_spoolss.h b/librpc/gen_ndr/ndr_spoolss.h
index d5b8ca9..1202799 100644
--- a/librpc/gen_ndr/ndr_spoolss.h
+++ b/librpc/gen_ndr/ndr_spoolss.h
@@ -305,6 +305,9 @@ void ndr_print_spoolss_Notify(struct ndr_print *ndr, const 
char *name, const str
 void ndr_print_spoolss_NotifyInfo(struct ndr_print *ndr, const char *name, 
const struct spoolss_NotifyInfo *r);
 void ndr_print_spoolss_UserLevel1(struct ndr_print *ndr, const char *name, 
const struct spoolss_UserLevel1 *r);
 void ndr_print_spoolss_UserLevel(struct ndr_print *ndr, const char *name, 
const union spoolss_UserLevel *r);
+enum ndr_err_code ndr_push_spoolss_DeleteDriverFlags(struct ndr_push *ndr, int 
ndr_flags, uint32_t r);
+enum ndr_err_code ndr_pull_spoolss_DeleteDriverFlags(struct ndr_pull *ndr, int 
ndr_flags, uint32_t *r);
+void ndr_print_spoolss_DeleteDriverFlags(struct ndr_print *ndr, const char 
*name, uint32_t r);
 enum ndr_err_code ndr_push__spoolss_EnumPrinters(struct ndr_push *ndr, int 
flags, const struct _spoolss_EnumPrinters *r);
 enum ndr_err_code ndr_pull__spoolss_EnumPrinters(struct ndr_pull *ndr, int 
flags, struct _spoolss_EnumPrinters *r);
 void ndr_print__spoolss_EnumPrinters(struct ndr_print *ndr, const char *name, 
int flags, const struct _spoolss_EnumPrinters *r);
diff --git a/librpc/gen_ndr/spoolss.h b/librpc/gen_ndr/spoolss.h
index 0d93ce4..cfb802f 100644
--- a/librpc/gen_ndr/spoolss.h
+++ b/librpc/gen_ndr/spoolss.h
@@ -748,6 +748,11 @@ union spoolss_UserLevel {
 #define PRINTER_ACCESS_USE ( 0x00000008 )
 #define JOB_ACCESS_ADMINISTER ( 0x00000010 )
 
+/* bitmap spoolss_DeleteDriverFlags */
+#define DPD_DELETE_UNUSED_FILES ( 0x00000001 )
+#define DPD_DELETE_SPECIFIC_VERSION ( 0x00000002 )
+#define DPD_DELETE_ALL_FILES ( 0x00000004 )
+
 
 struct _spoolss_EnumPrinters {
        struct {
@@ -2065,6 +2070,14 @@ struct spoolss_53 {
 
 struct spoolss_DeletePrinterDriverEx {
        struct {
+               const char *server;/* [unique,charset(UTF16)] */
+               const char *architecture;/* [charset(UTF16)] */
+               const char *driver;/* [charset(UTF16)] */
+               uint32_t delete_flags;
+               uint32_t version;
+       } in;
+
+       struct {
                WERROR result;
        } out;
 
diff --git a/librpc/idl/spoolss.idl b/librpc/idl/spoolss.idl
index 5299306..b5ac6cc 100644
--- a/librpc/idl/spoolss.idl
+++ b/librpc/idl/spoolss.idl
@@ -1504,7 +1504,18 @@ import "misc.idl", "security.idl", "winreg.idl";
 
        /******************/
        /* Function: 0x54 */
-       [todo] WERROR spoolss_DeletePrinterDriverEx(
+       typedef [public,bitmap32bit] bitmap {
+               DPD_DELETE_UNUSED_FILES         = 0x00000001,
+               DPD_DELETE_SPECIFIC_VERSION     = 0x00000002,
+               DPD_DELETE_ALL_FILES            = 0x00000004
+       } spoolss_DeleteDriverFlags;
+
+       WERROR spoolss_DeletePrinterDriverEx(
+               [in,unique] [string,charset(UTF16)] uint16 *server,
+               [in] [string,charset(UTF16)] uint16 architecture[],
+               [in] [string,charset(UTF16)] uint16 driver[],
+               [in] spoolss_DeleteDriverFlags delete_flags,
+               [in] uint32 version
        );
 
        /******************/
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index b1debb8..bc6bd1a 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -320,12 +320,6 @@ PRINTER_MESSAGE_INFO;
 #define PRINTER_ENUM_UNKNOWN_8         0x00000008
 #define PRINTER_ENUM_ICONMASK          0x00ff0000
 
-/* FLAGS for SPOOLSS_DELETEPRINTERDRIVEREX */
-
-#define DPD_DELETE_UNUSED_FILES                0x00000001
-#define DPD_DELETE_SPECIFIC_VERSION    0x00000002
-#define DPD_DELETE_ALL_FILES           0x00000004
-
 #define DRIVER_ANY_VERSION             0xffffffff
 #define DRIVER_MAX_VERSION             4
 


-- 
Samba Shared Repository

Reply via email to