parsing code for reply[open|close]printer in preparation of the event
authorJean-François Micouleau <jfm@samba.org>
Sat, 10 Jun 2000 22:35:52 +0000 (22:35 +0000)
committerJean-François Micouleau <jfm@samba.org>
Sat, 10 Jun 2000 22:35:52 +0000 (22:35 +0000)
stuff.

J.F.

source/include/proto.h
source/include/rpc_spoolss.h
source/rpc_parse/parse_spoolss.c

index 4d57740877318b415f63717cf45d201665a52b76..b6aeb19232449aa6b0dc7240c269b6c86e6558be 100644 (file)
@@ -2623,6 +2623,10 @@ void free_print1_array(uint32 num_entries, PRINTER_INFO_1 **entries);
 void free_job1_array(uint32 num_entries, JOB_INFO_1 **entries);
 void free_job_info_2(JOB_INFO_2 *job);
 void free_job2_array(uint32 num_entries, JOB_INFO_2 **entries);
+BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth);
+BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth);
+BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth);
+BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth);
 
 /*The following definitions come from  rpc_parse/parse_srv.c  */
 
@@ -3295,6 +3299,12 @@ BOOL init_oplocks(void);
 struct kernel_oplocks *irix_init_kernel_oplocks(void) ;
 #endif
 
+/*The following definitions come from  smbd/oplock_linux.c  */
+
+#if OLD_NTDOMAIN
+struct kernel_oplocks *linux_init_kernel_oplocks(void) ;
+#endif
+
 /*The following definitions come from  smbd/password.c  */
 
 #if OLD_NTDOMAIN
index 40851533cf2339ba5173173775b5021c44d5d584..de3f04ca3db4190a3f1b79a96ee0efcef7908a52 100755 (executable)
@@ -1680,10 +1680,38 @@ typedef struct spool_r_getjob
        NEW_BUFFER *buffer;
        uint32 needed;
        uint32 status;
-
 }
 SPOOL_R_GETJOB;
 
+typedef struct spool_q_replyopenprinter
+{
+       UNISTR2 string;
+       uint32 printer;
+       uint32 type;
+       NEW_BUFFER *buffer;
+}
+SPOOL_Q_REPLYOPENPRINTER;
+
+typedef struct spool_r_replyopenprinter
+{
+       POLICY_HND handle;
+       uint32 status;
+}
+SPOOL_R_REPLYOPENPRINTER;
+
+typedef struct spool_q_replycloseprinter
+{
+       POLICY_HND handle;
+}
+SPOOL_Q_REPLYCLOSEPRINTER;
+
+typedef struct spool_r_replycloseprinter
+{
+       POLICY_HND handle;
+       uint32 status;
+}
+SPOOL_R_REPLYCLOSEPRINTER;
+
 #define PRINTER_DRIVER_VERSION 2
 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
 
index ea8aa42a45b4cefbd46ba44a93c36bb6079a4d68..9e7d7501bbf56e9b2a48815682a209e77d9a79fd 100644 (file)
@@ -4989,3 +4989,90 @@ JOB_INFO_2 *add_job2_to_array(uint32 *len, JOB_INFO_2 ***array,
                           (void***)array, (const void*)job, *fn, True);
 }
 
+/*******************************************************************
+ Parse a SPOOL_Q_REPLYOPENPRINTER structure.
+********************************************************************/  
+BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth)
+{
+       prs_debug(ps, depth, desc, "spoolss_io_q_replyopenprinter");
+       depth++;
+
+       if(!prs_align(ps))
+               return False;
+
+       if(!smb_io_unistr2("", &(q_u->string), True, ps, depth))
+               return False;
+
+       if(!prs_align(ps))
+               return False;
+
+       if(!prs_uint32("printer", ps, depth, &q_u->printer))
+               return False;
+       if(!prs_uint32("type", ps, depth, &q_u->type))
+               return False;
+       
+       if(!new_spoolss_io_buffer("", ps, depth, q_u->buffer))
+               return False;
+
+       return True;
+}
+
+/*******************************************************************
+ Parse a SPOOL_R_REPLYOPENPRINTER structure.
+********************************************************************/  
+BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth)
+{              
+       prs_debug(ps, depth, desc, "spoolss_io_r_replyopenprinter");
+       depth++;
+
+       if (!prs_align(ps))
+               return False;
+
+       if(!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth))
+               return False;
+
+       if (!prs_uint32("status", ps, depth, &r_u->status))
+               return False;
+
+       return True;            
+}
+
+/*******************************************************************
+ Parse a SPOOL_Q_REPLYCLOSEPRINTER structure.
+********************************************************************/  
+BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth)
+{
+       prs_debug(ps, depth, desc, "spoolss_io_q_replycloseprinter");
+       depth++;
+
+       if(!prs_align(ps))
+               return False;
+
+       if(!smb_io_pol_hnd("printer handle",&(q_u->handle),ps,depth))
+               return False;
+
+       return True;
+}
+
+/*******************************************************************
+ Parse a SPOOL_R_REPLYCLOSEPRINTER structure.
+********************************************************************/  
+BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth)
+{              
+       prs_debug(ps, depth, desc, "spoolss_io_r_replycloseprinter");
+       depth++;
+
+       if (!prs_align(ps))
+               return False;
+
+       if(!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth))
+               return False;
+
+       if (!prs_uint32("status", ps, depth, &r_u->status))
+               return False;
+
+       return True;            
+}
+
+
+