summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-06-28 00:17:15 +0000
committerJeremy Allison <jra@samba.org>2002-06-28 00:17:15 +0000
commit452eb38df0553886313c9b19a945385d853e19ab (patch)
treed46f49dadc494afaf69456c2cc02860b0fc52721 /source3/include
parenta9093a1b5819d74e6dc21c413dc84f8fd3f181dc (diff)
downloadsamba-452eb38df0553886313c9b19a945385d853e19ab.tar.gz
samba-452eb38df0553886313c9b19a945385d853e19ab.tar.bz2
samba-452eb38df0553886313c9b19a945385d853e19ab.zip
Proper merge of all the working printing stuff from APPLIANCE_HEAD.
Now let's keep this in sync ! Jeremy. (This used to be commit 3603cd4947df2c10df604447dc542932cb9e5d5a)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/doserr.h1
-rw-r--r--source3/include/messages.h6
-rw-r--r--source3/include/nt_printing.h22
-rwxr-xr-xsource3/include/rpc_spoolss.h43
4 files changed, 48 insertions, 24 deletions
diff --git a/source3/include/doserr.h b/source3/include/doserr.h
index 813e54a6d0..135d799596 100644
--- a/source3/include/doserr.h
+++ b/source3/include/doserr.h
@@ -167,6 +167,7 @@
#define WERR_INVALID_OWNER W_ERROR(1307)
#define WERR_CAN_NOT_COMPLETE W_ERROR(1003)
#define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338)
+#define WERR_SERVER_UNAVAILABLE W_ERROR(1722)
#define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(1797)
#define WERR_INVALID_PRINTER_NAME W_ERROR(1801)
#define WERR_PRINTER_ALREADY_EXISTS W_ERROR(1802)
diff --git a/source3/include/messages.h b/source3/include/messages.h
index 3127fc8544..79a08a7546 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -47,10 +47,10 @@
#define MSG_FORCE_ELECTION 1001
#define MSG_WINS_NEW_ENTRY 1002
-/* rpc messages */
-#define MSG_PRINTER_NOTIFY 2001
+/* printing messages */
+/* #define MSG_PRINTER_NOTIFY 2001*/ /* Obsolete */
#define MSG_PRINTER_DRVUPGRADE 2002
-#define MSG_PRINTER_UPDATE 2003
+#define MSG_PRINTER_NOTIFY2 2003
/* smbd messages */
#define MSG_SMB_CONF_UPDATED 3001
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index 90ac45412d..57181c6659 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -1,5 +1,6 @@
/*
- Unix SMB/CIFS implementation.
+ Unix SMB/Netbios implementation.
+ Version 1.9.
SMB parameters and setup
Copyright (C) Andrew Tridgell 1992-2000,
Copyright (C) Jean Francois Micouleau 1998-2000.
@@ -331,4 +332,23 @@ typedef struct _form
#define VS_VERSION_INFO_SIZE (sizeof(VS_SIGNATURE)+4+VS_MINOR_OFFSET+4) /* not true size! */
#define VS_NE_BUF_SIZE 4096 /* Must be > 2*VS_VERSION_INFO_SIZE */
+/* Notify spoolss clients that something has changed. The
+ notification data is either stored in two uint32 values or a
+ variable length array. */
+
+#define SPOOLSS_NOTIFY_MSG_UNIX_JOBID 0x0001 /* Job id is unix */
+
+struct spoolss_notify_msg {
+ fstring printer; /* Name of printer notified */
+ uint32 type; /* Printer or job notify */
+ uint32 field; /* Notify field changed */
+ uint32 id; /* Job id */
+ uint32 len; /* Length of data, 0 for two uint32 value */
+ uint32 flags;
+ union {
+ uint32 value[2];
+ char *data;
+ } notify;
+};
+
#endif /* NT_PRINTING_H_ */
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index 1a0898245c..0b458dc9e0 100755
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -1,5 +1,6 @@
/*
- Unix SMB/CIFS implementation.
+ Unix SMB/Netbios implementation.
+ Version 1.9.
SMB parameters and setup
Copyright (C) Andrew Tridgell 1992-2000,
Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
@@ -117,6 +118,7 @@
#define PRINTER_CONTROL_PURGE 0x00000003
#define PRINTER_CONTROL_SET_STATUS 0x00000004
+#define PRINTER_STATUS_OK 0x00000000
#define PRINTER_STATUS_PAUSED 0x00000001
#define PRINTER_STATUS_ERROR 0x00000002
#define PRINTER_STATUS_PENDING_DELETION 0x00000004
@@ -157,17 +159,18 @@
/* JOB status codes. */
-#define JOB_STATUS_PAUSED 0x001
-#define JOB_STATUS_ERROR 0x002
-#define JOB_STATUS_DELETING 0x004
-#define JOB_STATUS_SPOOLING 0x008
-#define JOB_STATUS_PRINTING 0x010
-#define JOB_STATUS_OFFLINE 0x020
-#define JOB_STATUS_PAPEROUT 0x040
-#define JOB_STATUS_PRINTED 0x080
-#define JOB_STATUS_DELETED 0x100
-#define JOB_STATUS_BLOCKED 0x200
-#define JOB_STATUS_USER_INTERVENTION 0x400
+#define JOB_STATUS_QUEUED 0x0000
+#define JOB_STATUS_PAUSED 0x0001
+#define JOB_STATUS_ERROR 0x0002
+#define JOB_STATUS_DELETING 0x0004
+#define JOB_STATUS_SPOOLING 0x0008
+#define JOB_STATUS_PRINTING 0x0010
+#define JOB_STATUS_OFFLINE 0x0020
+#define JOB_STATUS_PAPEROUT 0x0040
+#define JOB_STATUS_PRINTED 0x0080
+#define JOB_STATUS_DELETED 0x0100
+#define JOB_STATUS_BLOCKED 0x0200
+#define JOB_STATUS_USER_INTERVENTION 0x0400
/* ACE masks for the various print permissions */
@@ -194,11 +197,12 @@
#define JOB_WRITE STANDARD_RIGHTS_WRITE_ACCESS|JOB_ACCESS_ADMINISTER
#define JOB_EXECUTE STANDARD_RIGHTS_EXECUTE_ACCESS|JOB_ACCESS_ADMINISTER
-/* Print notification constants */
+/* Notify field types */
-#define ONE_VALUE 1
-#define TWO_VALUE 2
-#define POINTER 3
+#define ONE_VALUE 1 /* Notify data is stored in value1 */
+#define TWO_VALUE 2 /* Notify data is stored in value2 */
+#define POINTER 3 /* Data is a pointer to a buffer */
+#define STRING 4 /* Data is a pointer to a buffer w/length */
#define PRINTER_NOTIFY_TYPE 0x00
#define JOB_NOTIFY_TYPE 0x01
@@ -315,8 +319,6 @@
#define PRINTER_NOTIFY_INFO_DISCARDED 0x1
-#define PRINTER_NOTIFY_VERSION 0x2
-
/*
* Set of macros for flagging what changed in the PRINTER_INFO_2 struct
* when sending messages to other smbd's
@@ -1203,8 +1205,8 @@ typedef struct job_info_ctr_info
{
union
{
- JOB_INFO_1 *job_info_1;
- JOB_INFO_2 *job_info_2;
+ JOB_INFO_1 **job_info_1;
+ JOB_INFO_2 **job_info_2;
void *info;
} job;
@@ -2118,3 +2120,4 @@ SPOOL_R_GETPRINTPROCESSORDIRECTORY;
#define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86"
#endif /* _RPC_SPOOLSS_H */
+