diff options
author | Jean-François Micouleau <jfm@samba.org> | 1999-06-22 18:42:10 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 1999-06-22 18:42:10 +0000 |
commit | 0c927f2b1b7ff547954a7a68fd44c7ce8ad65299 (patch) | |
tree | d83255af191d037eee308337068d635a96131b52 /source3/include | |
parent | 76f2829428427231352a106b234c330f78d2975b (diff) | |
download | samba-0c927f2b1b7ff547954a7a68fd44c7ce8ad65299.tar.gz samba-0c927f2b1b7ff547954a7a68fd44c7ce8ad65299.tar.bz2 samba-0c927f2b1b7ff547954a7a68fd44c7ce8ad65299.zip |
Fixed most memory leak and big-endian bug in the spoolss code.
Also added addform/setform rpc api calls. Now I can add/change forms from
the server property dialog box.
Jean Francois
(This used to be commit 8d73f83b6c112327a51c0df2e96a1866deb13c3a)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/proto.h | 8 | ||||
-rwxr-xr-x | source3/include/rpc_spoolss.h | 48 |
2 files changed, 52 insertions, 4 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 41a68296d2..5ddcc0e650 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1581,6 +1581,9 @@ struct passgrp_ops *unix_initialise_password_grp(void); /*The following definitions come from printing/nt_printing.c */ int get_ntforms(nt_forms_struct **list); +int write_ntforms(nt_forms_struct **list, int number); +void add_a_form(nt_forms_struct **list, FORM form, int count); +void update_a_form(nt_forms_struct **list, FORM form, int count); int get_ntdrivers(connection_struct *conn, fstring **list, char *architecture); void get_short_archi(char *short_archi, char *long_archi); void dump_a_param(NT_PRINTER_PARAM *param); @@ -2748,6 +2751,7 @@ void spoolss_io_q_rfnpcnex(char *desc, SPOOL_Q_RFNPCNEX *q_u, void spoolss_io_r_rfnpcnex(char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, int depth); +void spoolss_io_free_buffer(BUFFER *buffer); void spoolss_io_q_getprinterdriver2(char *desc, SPOOL_Q_GETPRINTERDRIVER2 *q_u, prs_struct *ps, int depth); @@ -2814,6 +2818,10 @@ void spoolss_io_q_enumprinterdata(char *desc, SPOOL_Q_ENUMPRINTERDATA *q_u, prs_ void spoolss_io_q_setprinterdata(char *desc, SPOOL_Q_SETPRINTERDATA *q_u, prs_struct *ps, int depth); void spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_struct *ps, int depth); void convert_specific_param(NT_PRINTER_PARAM **param, UNISTR2 value , uint32 type, uint8 *data, uint32 len); +void spoolss_io_q_addform(char *desc, SPOOL_Q_ADDFORM *q_u, prs_struct *ps, int depth); +void spoolss_io_r_addform(char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int depth); +void spoolss_io_q_setform(char *desc, SPOOL_Q_SETFORM *q_u, prs_struct *ps, int depth); +void spoolss_io_r_setform(char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int depth); /*The following definitions come from rpc_parse/parse_srv.c */ diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h index f8e7efe81b..8476ad7691 100755 --- a/source3/include/rpc_spoolss.h +++ b/source3/include/rpc_spoolss.h @@ -38,10 +38,8 @@ #define SPOOLSS_ABORTPRINTER 0x15 #define SPOOLSS_READPRINTER 0x16 #define SPOOLSS_WAITFORPRINTERCHANGE 0x1c -#define SPOOLSS_ADDFORM 0x1e #define SPOOLSS_DELETEFORM 0x1f #define SPOOLSS_GETFORM 0x20 -#define SPOOLSS_SETFORM 0x21 #define SPOOLSS_ENUMMONITORS 0x24 #define SPOOLSS_ADDPORT 0x25 #define SPOOLSS_CONFIGUREPORT 0x26 @@ -93,6 +91,8 @@ #define SPOOLSS_GETPRINTERDATA 0x1a #define SPOOLSS_SETPRINTERDATA 0x1b #define SPOOLSS_CLOSEPRINTER 0x1d +#define SPOOLSS_ADDFORM 0x1e +#define SPOOLSS_SETFORM 0x21 #define SPOOLSS_ENUMFORMS 0x22 #define SPOOLSS_ENUMPORTS 0x23 #define SPOOLSS_ENUMPRINTPROCESSORDATATYPES 0x33 @@ -1398,12 +1398,52 @@ typedef struct spool_q_setprinterdata uint8 *data; uint32 real_len; uint32 numeric_data; -}SPOOL_Q_SETPRINTERDATA; +} SPOOL_Q_SETPRINTERDATA; typedef struct spool_r_setprinterdata { uint32 status; -}SPOOL_R_SETPRINTERDATA; +} SPOOL_R_SETPRINTERDATA; + +typedef struct _form +{ + uint32 flags; + uint32 name_ptr; + uint32 size_x; + uint32 size_y; + uint32 left; + uint32 top; + uint32 right; + uint32 bottom; + UNISTR2 name; +} FORM; + +typedef struct spool_q_addform +{ + PRINTER_HND handle; + uint32 level; + uint32 level2; + FORM form; +} SPOOL_Q_ADDFORM; + +typedef struct spool_r_addform +{ + uint32 status; +} SPOOL_R_ADDFORM; + +typedef struct spool_q_setform +{ + PRINTER_HND handle; + UNISTR2 name; + uint32 level; + uint32 level2; + FORM form; +} SPOOL_Q_SETFORM; + +typedef struct spool_r_setform +{ + uint32 status; +} SPOOL_R_SETFORM; #define PRINTER_DRIVER_VERSION 2 #define PRINTER_DRIVER_ARCHITECTURE "Windows NT x86" |