diff options
author | Simo Sorce <idra@samba.org> | 2010-04-22 16:53:15 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-07-27 10:27:06 -0400 |
commit | 5604a78f0919f77fdf041989e3e2e0f61da80fd9 (patch) | |
tree | 93004948e32e70069cc2563436edc7c858b14da9 /source3/include | |
parent | 104c419345a42a9a02ae25df482f449dc41a6380 (diff) | |
download | samba-5604a78f0919f77fdf041989e3e2e0f61da80fd9.tar.gz samba-5604a78f0919f77fdf041989e3e2e0f61da80fd9.tar.bz2 samba-5604a78f0919f77fdf041989e3e2e0f61da80fd9.zip |
s3-spoolss: Migrated NT_DEVICEMODE to spoolss_DeviceMode.
Signed-off-by: Jim McDonough <jmcd@samba.org>
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/nt_printing.h | 49 | ||||
-rw-r--r-- | source3/include/printing.h | 2 | ||||
-rw-r--r-- | source3/include/proto.h | 15 |
3 files changed, 11 insertions, 55 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index 0241a54b79..5a1eb00489 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -36,47 +36,6 @@ typedef struct { NT_PRINTER_KEY *keys; } NT_PRINTER_DATA; -typedef struct ntdevicemode -{ - fstring devicename; - fstring formname; - - uint16 specversion; - uint16 driverversion; - uint16 size; - uint16 driverextra; - uint16 orientation; - uint16 papersize; - uint16 paperlength; - uint16 paperwidth; - uint16 scale; - uint16 copies; - uint16 defaultsource; - uint16 printquality; - uint16 color; - uint16 duplex; - uint16 yresolution; - uint16 ttoption; - uint16 collate; - uint16 logpixels; - - uint32 fields; - uint32 bitsperpel; - uint32 pelswidth; - uint32 pelsheight; - uint32 displayflags; - uint32 displayfrequency; - uint32 icmmethod; - uint32 icmintent; - uint32 mediatype; - uint32 dithertype; - uint32 reserved1; - uint32 reserved2; - uint32 panningwidth; - uint32 panningheight; - uint8 *nt_dev_private; -} NT_DEVICEMODE; - typedef struct nt_printer_info_level_2 { uint32 attributes; @@ -94,7 +53,7 @@ typedef struct nt_printer_info_level_2 fstring drivername; char comment[1024]; fstring location; - NT_DEVICEMODE *devmode; + struct spoolss_DeviceMode *devmode; fstring sepfile; fstring printprocessor; fstring datatype; @@ -230,10 +189,10 @@ typedef struct _Printer{ fstring machine; fstring user; } client; - + /* devmode sent in the OpenPrinter() call */ - NT_DEVICEMODE *nt_devmode; - + struct spoolss_DeviceMode *devmode; + /* cache the printer info */ NT_PRINTER_INFO_LEVEL *printer_info; diff --git a/source3/include/printing.h b/source3/include/printing.h index d91917b528..ac2ee05a93 100644 --- a/source3/include/printing.h +++ b/source3/include/printing.h @@ -40,7 +40,7 @@ struct printjob { fstring jobname; /* the job name given to us by the client */ fstring user; /* the user who started the job */ fstring queuename; /* service number of printer for this job */ - NT_DEVICEMODE *nt_devmode; + struct spoolss_DeviceMode *devmode; }; /* Information for print interfaces */ diff --git a/source3/include/proto.h b/source3/include/proto.h index 16110f2cde..0904c4a0dc 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -4739,11 +4739,11 @@ WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx, WERROR move_driver_to_download_area(struct pipes_struct *p, struct spoolss_AddDriverInfoCtr *r, WERROR *perr); -int pack_devicemode(NT_DEVICEMODE *nt_devmode, uint8 *buf, int buflen); +int pack_devicemode(struct spoolss_DeviceMode *devmode, uint8 *buf, int buflen); +int unpack_devicemode(TALLOC_CTX *mem_ctx, + const uint8 *buf, int buflen, + struct spoolss_DeviceMode **devmode); uint32 del_a_printer(const char *sharename); -NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename); -void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr); -int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen); WERROR spoolss_create_default_devmode(TALLOC_CTX *mem_ctx, const char *devicename, struct spoolss_DeviceMode **devmode); @@ -4831,7 +4831,7 @@ bool print_notify_deregister_pid(int snum); bool print_job_exists(const char* sharename, uint32 jobid); int print_job_fd(const char* sharename, uint32 jobid); char *print_job_fname(const char* sharename, uint32 jobid); -NT_DEVICEMODE *print_job_devmode(const char* sharename, uint32 jobid); +struct spoolss_DeviceMode *print_job_devmode(const char* sharename, uint32 jobid); bool print_job_set_name(const char *sharename, uint32 jobid, const char *name); bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name); bool print_job_delete(struct auth_serversupplied_info *server_info, int snum, @@ -4843,7 +4843,7 @@ bool print_job_resume(struct auth_serversupplied_info *server_info, int snum, ssize_t print_job_write(int snum, uint32 jobid, const char *buf, SMB_OFF_T pos, size_t size); int print_queue_length(int snum, print_status_struct *pstatus); uint32 print_job_start(struct auth_serversupplied_info *server_info, int snum, - const char *jobname, NT_DEVICEMODE *nt_devmode ); + const char *jobname, struct spoolss_DeviceMode *devmode ); void print_job_endpage(int snum, uint32 jobid); bool print_job_end(int snum, uint32 jobid, enum file_close_type close_type); int print_queue_status(int snum, @@ -5144,9 +5144,6 @@ void reset_all_printerdata(struct messaging_context *msg, uint32_t msg_type, struct server_id server_id, DATA_BLOB *data); -bool convert_devicemode(const char *printername, - const struct spoolss_DeviceMode *devmode, - NT_DEVICEMODE **pp_nt_devmode); WERROR set_printer_dataex(NT_PRINTER_INFO_LEVEL *printer, const char *key, const char *value, uint32_t type, uint8_t *data, int real_len); |