From d407579b94ee2647d1e51c536534024e5c4c51ad Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 30 Aug 2000 00:45:59 +0000 Subject: Implemented AbortPrinter() from Gerald's Win32 test code. Just purge all possible printjobs from that printer (I think this is correct). Added error code returns for print_queue_XXX() functions. Jeremy. (This used to be commit 6d081a9017f87f59b7189ba507e211db01c40af5) --- source3/include/proto.h | 9 ++++++--- source3/include/rpc_spoolss.h | 14 +++++++++++++- 2 files changed, 19 insertions(+), 4 deletions(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index 9b948bb8b9..22788e6581 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1755,9 +1755,9 @@ int print_queue_status(int snum, print_queue_struct **queue, print_status_struct *status); int print_queue_snum(char *qname); -BOOL print_queue_pause(struct current_user *user, int snum); -BOOL print_queue_resume(struct current_user *user, int snum); -BOOL print_queue_purge(struct current_user *user, int snum); +BOOL print_queue_pause(struct current_user *user, int snum, int *errcode); +BOOL print_queue_resume(struct current_user *user, int snum, int *errcode); +BOOL print_queue_purge(struct current_user *user, int snum, int *errcode); #endif /*The following definitions come from profile/profile.c */ @@ -2723,6 +2723,8 @@ BOOL make_spoolss_q_getprinterdata(SPOOL_Q_GETPRINTERDATA *q_u, BOOL spoolss_io_q_getprinterdata(char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_getprinterdata(char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth); BOOL make_spoolss_q_closeprinter(SPOOL_Q_CLOSEPRINTER *q_u, POLICY_HND *hnd); +BOOL spoolss_io_q_abortprinter(char *desc, SPOOL_Q_ABORTPRINTER *q_u, prs_struct *ps, int depth); +BOOL spoolss_io_r_abortprinter(char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_deleteprinter(char *desc, SPOOL_Q_DELETEPRINTER *q_u, prs_struct *ps, int depth); BOOL spoolss_io_r_deleteprinter(char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_struct *ps, int depth); BOOL spoolss_io_q_closeprinter(char *desc, SPOOL_Q_CLOSEPRINTER *q_u, prs_struct *ps, int depth); @@ -3093,6 +3095,7 @@ uint32 _spoolss_open_printer_ex( const UNISTR2 *printername, uint32 user_switch, SPOOL_USER_CTR user_ctr, POLICY_HND *handle); uint32 _spoolss_closeprinter(POLICY_HND *handle); +uint32 _spoolss_abortprinter(POLICY_HND *handle, pipes_struct *p); uint32 _spoolss_deleteprinter(POLICY_HND *handle); uint32 _spoolss_getprinterdata(POLICY_HND *handle, UNISTR2 *valuename, uint32 in_size, diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h index 64047a1afc..7b3ee354ed 100755 --- a/source3/include/rpc_spoolss.h +++ b/source3/include/rpc_spoolss.h @@ -33,7 +33,6 @@ #define SPOOLSS_DELETEPRINTERDRIVER 0x0d #define SPOOLSS_ADDPRINTPROCESSOR 0x0e #define SPOOLSS_GETPRINTPROCESSORDIRECTORY 0x10 -#define SPOOLSS_ABORTPRINTER 0x15 #define SPOOLSS_READPRINTER 0x16 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c #define SPOOLSS_DELETEFORM 0x1f @@ -84,6 +83,7 @@ #define SPOOLSS_STARTPAGEPRINTER 0x12 #define SPOOLSS_WRITEPRINTER 0x13 #define SPOOLSS_ENDPAGEPRINTER 0x14 +#define SPOOLSS_ABORTPRINTER 0x15 #define SPOOLSS_ENDDOCPRINTER 0x17 #define SPOOLSS_ADDJOB 0x18 #define SPOOLSS_SCHEDULEJOB 0x19 @@ -1425,6 +1425,18 @@ typedef struct spool_r_deleteprinter } SPOOL_R_DELETEPRINTER; +typedef struct spool_q_abortprinter +{ + POLICY_HND handle; +} +SPOOL_Q_ABORTPRINTER; + +typedef struct spool_r_abortprinter +{ + uint32 status; +} +SPOOL_R_ABORTPRINTER; + typedef struct spool_q_addprinterex { -- cgit