s3-spoolss: use more idl types in spoolss server.
authorGünther Deschner <gd@samba.org>
Fri, 13 Feb 2009 11:47:32 +0000 (12:47 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 23 Feb 2009 15:17:36 +0000 (16:17 +0100)
Guenther

source3/include/proto.h
source3/rpc_server/srv_spoolss_nt.c

index fed1dd35fecb5e1c5f63ec71cbfa3cb1b5f7654a..93b4ca8c7d114a4d567d53e78ad2f7019d6bb6eb 100644 (file)
@@ -6206,8 +6206,11 @@ void spoolss_notify_cjobs(int snum,
                                 print_queue_struct *queue,
                                 NT_PRINTER_INFO_LEVEL *printer,
                                 TALLOC_CTX *mem_ctx);
-void construct_info_data(struct spoolss_Notify *info_data, uint16 type, uint16 field, int id);
 WERROR _spoolss_rfnpcnex( pipes_struct *p, SPOOL_Q_RFNPCNEX *q_u, SPOOL_R_RFNPCNEX *r_u);
+void construct_info_data(struct spoolss_Notify *info_data,
+                        enum spoolss_NotifyType type,
+                        enum spoolss_Field field,
+                        int id);
 DEVICEMODE *construct_dev_mode(const char *servicename);
 WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u);
 WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u);
index a3daa7f372819bbe3ebdbcad25f59975f8d40ed9..33f139676cc2ac0501f77bf41e19fbebc6a2102a 100644 (file)
@@ -3511,7 +3511,9 @@ static uint32_t variable_type_of_notify_info_data(enum spoolss_NotifyType type,
 /****************************************************************************
 ****************************************************************************/
 
-static bool search_notify(uint16 type, uint16 field, int *value)
+static bool search_notify(enum spoolss_NotifyType type,
+                         enum spoolss_Field field,
+                         int *value)
 {
        int i;
 
@@ -3530,7 +3532,10 @@ static bool search_notify(uint16 type, uint16 field, int *value)
 /****************************************************************************
 ****************************************************************************/
 
-void construct_info_data(struct spoolss_Notify *info_data, uint16 type, uint16 field, int id)
+void construct_info_data(struct spoolss_Notify *info_data,
+                        enum spoolss_NotifyType type,
+                        enum spoolss_Field field,
+                        int id)
 {
        info_data->type                 = type;
        info_data->field                = field;
@@ -3550,17 +3555,17 @@ static bool construct_notify_printer_info(Printer_entry *print_hnd, struct spool
                                          TALLOC_CTX *mem_ctx)
 {
        int field_num,j;
-       uint16 type;
-       uint16 field;
+       enum spoolss_NotifyType type;
+       enum spoolss_Field field;
 
        struct spoolss_Notify *current_data;
        NT_PRINTER_INFO_LEVEL *printer = NULL;
        print_queue_struct *queue=NULL;
 
-       type=option_type->type;
+       type = option_type->type;
 
        DEBUG(4,("construct_notify_printer_info: Notify type: [%s], number of notify info: [%d] on printer: [%s]\n",
-               (option_type->type==PRINTER_NOTIFY_TYPE?"PRINTER_NOTIFY_TYPE":"JOB_NOTIFY_TYPE"),
+               (type == PRINTER_NOTIFY_TYPE ? "PRINTER_NOTIFY_TYPE" : "JOB_NOTIFY_TYPE"),
                option_type->count, lp_servicename(snum)));
 
        if (!W_ERROR_IS_OK(get_a_printer(print_hnd, &printer, 2, lp_const_servicename(snum))))
@@ -3614,9 +3619,8 @@ static bool construct_notify_jobs_info(print_queue_struct *queue,
                                       TALLOC_CTX *mem_ctx)
 {
        int field_num,j;
-       uint16 type;
-       uint16 field;
-
+       enum spoolss_NotifyType type;
+       enum spoolss_Field field;
        struct spoolss_Notify *current_data;
 
        DEBUG(4,("construct_notify_jobs_info\n"));
@@ -3624,7 +3628,7 @@ static bool construct_notify_jobs_info(print_queue_struct *queue,
        type = option_type->type;
 
        DEBUGADD(4,("Notify type: [%s], number of notify info: [%d]\n",
-               (option_type->type==PRINTER_NOTIFY_TYPE?"PRINTER_NOTIFY_TYPE":"JOB_NOTIFY_TYPE"),
+               (type == PRINTER_NOTIFY_TYPE ? "PRINTER_NOTIFY_TYPE" : "JOB_NOTIFY_TYPE"),
                option_type->count));
 
        for(field_num=0; field_num<option_type->count; field_num++) {