summaryrefslogtreecommitdiffstats
path: root/source3/include
diff options
context:
space:
mode:
authorJean-François Micouleau <jfm@samba.org>2000-09-25 21:05:18 +0000
committerJean-François Micouleau <jfm@samba.org>2000-09-25 21:05:18 +0000
commit233bc000209cf5759e0e49ad83da70b280d51dae (patch)
treeb86d40660677f230e89d385efe397472c8f2c5c7 /source3/include
parentd31a72f7390339ec2bb0f3af5da014d635ce09dd (diff)
printer notify code.
It only sends notifies to one client. The broadcasting notify code will code soon. J.F. (This used to be commit 4c63c9185887c64e57d901e82a4a16a83522c898)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h18
-rwxr-xr-xsource3/include/rpc_spoolss.h28
2 files changed, 43 insertions, 3 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 0d163be3ba..f1183789f7 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1977,6 +1977,15 @@ uint32 spoolss_getprinterdriverdir(fstring srv_name, fstring env_name, uint32 le
uint32 *needed);
uint32 spoolss_addprinterdriver(const char *srv_name, uint32 level, PRINTER_DRIVER_CTR *info);
+/*The following definitions come from rpc_client/cli_spoolss_notify.c */
+
+BOOL spoolss_disconnect_from_client( struct cli_state *cli);
+BOOL spoolss_connect_to_client( struct cli_state *cli, char *remote_machine);
+BOOL cli_spoolss_reply_open_printer(struct cli_state *cli, char *printer, uint32 localprinter, uint32 type, uint32 *status, POLICY_HND *handle);
+BOOL cli_spoolss_reply_rrpcn(struct cli_state *cli, POLICY_HND *handle,
+ uint32 change_low, uint32 change_high, uint32 *status);
+BOOL cli_spoolss_reply_close_printer(struct cli_state *cli, POLICY_HND *handle, uint32 *status);
+
/*The following definitions come from rpc_client/cli_srvsvc.c */
BOOL do_srv_net_srv_conn_enum(struct cli_state *cli,
@@ -2935,10 +2944,17 @@ 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 make_spoolss_q_replyopenprinter(SPOOL_Q_REPLYOPENPRINTER *q_u,
+ const fstring string, uint32 printer, uint32 type);
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 make_spoolss_q_reply_closeprinter(SPOOL_Q_REPLYCLOSEPRINTER *q_u, POLICY_HND *hnd);
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);
+BOOL make_spoolss_q_reply_rrpcn(SPOOL_Q_REPLY_RRPCN *q_u, POLICY_HND *hnd,
+ uint32 change_low, uint32 change_high);
+BOOL spoolss_io_q_reply_rrpcn(char *desc, SPOOL_Q_REPLY_RRPCN *q_u, prs_struct *ps, int depth);
+BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct *ps, int depth);
/*The following definitions come from rpc_parse/parse_srv.c */
@@ -3173,7 +3189,7 @@ uint32 _spoolss_schedulejob( POLICY_HND *handle, uint32 jobid);
uint32 _spoolss_setjob( POLICY_HND *handle,
uint32 jobid,
uint32 level,
- pipes_struct *p,
+ pipes_struct *p,
JOB_INFO *ctr,
uint32 command);
uint32 _spoolss_enumprinterdrivers( UNISTR2 *name, UNISTR2 *environment, uint32 level,
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index 61b20c36c8..94cfb45dfe 100755
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -54,7 +54,6 @@
#define SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION 0x37
#define SPOOLSS_ROUTERFINDFIRSTPRINTERNOTIFICATIONOLD 0x39
#define SPOOLSS_ROUTERREPLYPRINTER 0x3b
-#define SPOOLSS_REPLYCLOSEPRINTER 0x3c
#define SPOOLSS_ADDPORTEX 0x3d
#define SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFICATION0x3e
#define SPOOLSS_SPOOLERINIT 0x3f
@@ -99,8 +98,11 @@
/* find close printer notification */
#define SPOOLSS_FCPN 0x38
#define SPOOLSS_REPLYOPENPRINTER 0x3a
+#define SPOOLSS_REPLYCLOSEPRINTER 0x3c
/* remote find first printer change notifyEx */
#define SPOOLSS_RFFPCNEX 0x41
+/*SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFICATION */
+#define SPOOLSS_RRPCN 0x42
/* remote find next printer change notifyEx */
#define SPOOLSS_RFNPCNEX 0x43
#define SPOOLSS_OPENPRINTEREX 0x45
@@ -299,6 +301,8 @@
PRINTER_CHANGE_PRINT_PROCESSOR | \
PRINTER_CHANGE_PRINTER_DRIVER )
+#define PRINTER_NOTIFY_INFO_DISCARDED 0x1
+
/*
* The printer attributes.
* I #defined all of them (grabbed form MSDN)
@@ -1773,7 +1777,8 @@ typedef struct spool_q_replyopenprinter
UNISTR2 string;
uint32 printer;
uint32 type;
- NEW_BUFFER *buffer;
+ uint32 unknown0;
+ uint32 unknown1;
}
SPOOL_Q_REPLYOPENPRINTER;
@@ -1797,6 +1802,25 @@ typedef struct spool_r_replycloseprinter
}
SPOOL_R_REPLYCLOSEPRINTER;
+typedef struct spool_q_rrpcn
+{
+ POLICY_HND handle;
+ uint32 change_low;
+ uint32 change_high;
+ uint32 unknown0;
+ uint32 unknown1;
+ uint32 info_ptr;
+ SPOOL_NOTIFY_INFO info;
+}
+SPOOL_Q_REPLY_RRPCN;
+
+typedef struct spool_r_rrpcn
+{
+ uint32 unknown0;
+ uint32 status;
+}
+SPOOL_R_REPLY_RRPCN;
+
#define PRINTER_DRIVER_VERSION 2
#define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"