summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-09 23:31:35 +0100
committerGünther Deschner <gd@samba.org>2009-02-10 11:26:26 +0100
commit2ede56f3c023ad1a8b7d3d8947b93fa5bedb21a1 (patch)
treea0a2d284534ef80ab2aa9477ea73238d3666c47d /source3
parent0a34c140cc096c222fb697c746d0045990ed3080 (diff)
downloadsamba-2ede56f3c023ad1a8b7d3d8947b93fa5bedb21a1.tar.gz
samba-2ede56f3c023ad1a8b7d3d8947b93fa5bedb21a1.tar.bz2
samba-2ede56f3c023ad1a8b7d3d8947b93fa5bedb21a1.zip
s3-spoolss: remove old spoolss_StartDocPrinter.
Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h11
-rw-r--r--source3/include/rpc_spoolss.h39
-rw-r--r--source3/rpc_client/cli_spoolss.c31
-rw-r--r--source3/rpc_parse/parse_spoolss.c184
4 files changed, 0 insertions, 265 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index db277ffa42..b4add3070d 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5481,10 +5481,6 @@ WERROR rpccli_spoolss_setjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, uint32 jobid, uint32 level,
JOB_INFO_CTR *ctr);
-WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, char *docname,
- char *outputfile, char *datatype,
- uint32 *jobid);
WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *valuename,
REGISTRY_VALUE *value);
@@ -5834,8 +5830,6 @@ bool make_spoolss_q_getprinterdataex(SPOOL_Q_GETPRINTERDATAEX *q_u,
const char *valuename, uint32 size);
bool spoolss_io_q_getprinterdata(const char *desc, SPOOL_Q_GETPRINTERDATA *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_struct *ps, int depth);
-bool spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth);
-bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_rffpcnex(const char *desc, SPOOL_Q_RFFPCNEX *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_rffpcnex(const char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, int depth);
bool spoolss_io_q_rfnpcnex(const char *desc, SPOOL_Q_RFNPCNEX *q_u, prs_struct *ps, int depth);
@@ -6048,10 +6042,6 @@ bool make_spoolss_q_setjob(SPOOL_Q_SETJOB *q_u, POLICY_HND *handle,
bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle,
uint32 jobid, uint32 level, RPC_BUFFER *buffer,
uint32 offered);
-bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u,
- POLICY_HND *handle, uint32 level,
- char *docname, char *outputfile,
- char *datatype);
bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
uint32 flags, uint32 options, const char *localmachine,
uint32 printerlocal, SPOOL_NOTIFY_OPTION *option);
@@ -6258,7 +6248,6 @@ DEVICEMODE *construct_dev_mode(const char *servicename);
WERROR _spoolss_enumprinters( pipes_struct *p, SPOOL_Q_ENUMPRINTERS *q_u, SPOOL_R_ENUMPRINTERS *r_u);
WERROR _spoolss_getprinter(pipes_struct *p, SPOOL_Q_GETPRINTER *q_u, SPOOL_R_GETPRINTER *r_u);
WERROR _spoolss_getprinterdriver2(pipes_struct *p, SPOOL_Q_GETPRINTERDRIVER2 *q_u, SPOOL_R_GETPRINTERDRIVER2 *r_u);
-WERROR _spoolss_startdocprinter(pipes_struct *p, SPOOL_Q_STARTDOCPRINTER *q_u, SPOOL_R_STARTDOCPRINTER *r_u);
WERROR add_port_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, const char *portname, const char *uri );
bool add_printer_hook(TALLOC_CTX *ctx, NT_USER_TOKEN *token, NT_PRINTER_INFO_LEVEL *printer);
WERROR _spoolss_setprinter(pipes_struct *p, SPOOL_Q_SETPRINTER *q_u, SPOOL_R_SETPRINTER *r_u);
diff --git a/source3/include/rpc_spoolss.h b/source3/include/rpc_spoolss.h
index 63bc5ee796..b257d3dbcc 100644
--- a/source3/include/rpc_spoolss.h
+++ b/source3/include/rpc_spoolss.h
@@ -473,45 +473,6 @@ typedef struct spool_r_getprinterdata
}
SPOOL_R_GETPRINTERDATA;
-typedef struct spool_doc_info_1
-{
- uint32 p_docname;
- uint32 p_outputfile;
- uint32 p_datatype;
- UNISTR2 docname;
- UNISTR2 outputfile;
- UNISTR2 datatype;
-}
-DOC_INFO_1;
-
-typedef struct spool_doc_info
-{
- uint32 switch_value;
- DOC_INFO_1 doc_info_1;
-}
-DOC_INFO;
-
-typedef struct spool_doc_info_container
-{
- uint32 level;
- DOC_INFO docinfo;
-}
-DOC_INFO_CONTAINER;
-
-typedef struct spool_q_startdocprinter
-{
- POLICY_HND handle;
- DOC_INFO_CONTAINER doc_info_container;
-}
-SPOOL_Q_STARTDOCPRINTER;
-
-typedef struct spool_r_startdocprinter
-{
- uint32 jobid;
- WERROR status;
-}
-SPOOL_R_STARTDOCPRINTER;
-
typedef struct spool_notify_option
{
uint32 version;
diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c
index 780043aaab..1340f97113 100644
--- a/source3/rpc_client/cli_spoolss.c
+++ b/source3/rpc_client/cli_spoolss.c
@@ -1366,37 +1366,6 @@ WERROR rpccli_spoolss_getjob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
/**********************************************************************
**********************************************************************/
-WERROR rpccli_spoolss_startdocprinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, char *docname,
- char *outputfile, char *datatype,
- uint32 *jobid)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_STARTDOCPRINTER in;
- SPOOL_R_STARTDOCPRINTER out;
- uint32 level = 1;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_startdocprinter( &in, hnd, level, docname,
- outputfile, datatype );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_STARTDOCPRINTER,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_startdocprinter,
- spoolss_io_r_startdocprinter,
- WERR_GENERAL_FAILURE );
-
- *jobid = out.jobid;
-
- return out.status;
-}
-
-/**********************************************************************
-**********************************************************************/
-
WERROR rpccli_spoolss_getprinterdata(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
POLICY_HND *hnd, const char *valuename,
REGISTRY_VALUE *value)
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index 5876171ce3..0e3bd5753c 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -71,109 +71,6 @@ bool make_systemtime(SYSTEMTIME *systime, struct tm *unixtime)
}
/*******************************************************************
-reads or writes an DOC_INFO structure.
-********************************************************************/
-
-static bool smb_io_doc_info_1(const char *desc, DOC_INFO_1 *info_1, prs_struct *ps, int depth)
-{
- if (info_1 == NULL) return False;
-
- prs_debug(ps, depth, desc, "smb_io_doc_info_1");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("p_docname", ps, depth, &info_1->p_docname))
- return False;
- if(!prs_uint32("p_outputfile", ps, depth, &info_1->p_outputfile))
- return False;
- if(!prs_uint32("p_datatype", ps, depth, &info_1->p_datatype))
- return False;
-
- if(!smb_io_unistr2("", &info_1->docname, info_1->p_docname, ps, depth))
- return False;
- if(!smb_io_unistr2("", &info_1->outputfile, info_1->p_outputfile, ps, depth))
- return False;
- if(!smb_io_unistr2("", &info_1->datatype, info_1->p_datatype, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
-reads or writes an DOC_INFO structure.
-********************************************************************/
-
-static bool smb_io_doc_info(const char *desc, DOC_INFO *info, prs_struct *ps, int depth)
-{
- uint32 useless_ptr=0;
-
- if (info == NULL) return False;
-
- prs_debug(ps, depth, desc, "smb_io_doc_info");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("switch_value", ps, depth, &info->switch_value))
- return False;
-
- if(!prs_uint32("doc_info_X ptr", ps, depth, &useless_ptr))
- return False;
-
- switch (info->switch_value)
- {
- case 1:
- if(!smb_io_doc_info_1("",&info->doc_info_1, ps, depth))
- return False;
- break;
- case 2:
- /*
- this is just a placeholder
-
- MSDN July 1998 says doc_info_2 is only on
- Windows 95, and as Win95 doesn't do RPC to print
- this case is nearly impossible
-
- Maybe one day with Windows for dishwasher 2037 ...
-
- */
- /* smb_io_doc_info_2("",&info->doc_info_2, ps, depth); */
- break;
- default:
- DEBUG(0,("Something is obviously wrong somewhere !\n"));
- break;
- }
-
- return True;
-}
-
-/*******************************************************************
-reads or writes an DOC_INFO_CONTAINER structure.
-********************************************************************/
-
-static bool smb_io_doc_info_container(const char *desc, DOC_INFO_CONTAINER *cont, prs_struct *ps, int depth)
-{
- if (cont == NULL) return False;
-
- prs_debug(ps, depth, desc, "smb_io_doc_info_container");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!prs_uint32("level", ps, depth, &cont->level))
- return False;
-
- if(!smb_io_doc_info("",&cont->docinfo, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
reads or writes an NOTIFY OPTION TYPE structure.
********************************************************************/
@@ -1342,47 +1239,6 @@ bool spoolss_io_r_getprinterdata(const char *desc, SPOOL_R_GETPRINTERDATA *r_u,
/*******************************************************************
* read a structure.
- * called from spoolss_q_startdocprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_q_startdocprinter(const char *desc, SPOOL_Q_STARTDOCPRINTER *q_u, prs_struct *ps, int depth)
-{
- if (q_u == NULL) return False;
-
- prs_debug(ps, depth, desc, "spoolss_io_q_startdocprinter");
- depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_pol_hnd("printer handle",&q_u->handle,ps,depth))
- return False;
-
- if(!smb_io_doc_info_container("",&q_u->doc_info_container, ps, depth))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * write a structure.
- * called from spoolss_r_startdocprinter (srv_spoolss.c)
- ********************************************************************/
-
-bool spoolss_io_r_startdocprinter(const char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_struct *ps, int depth)
-{
- prs_debug(ps, depth, desc, "spoolss_io_r_startdocprinter");
- depth++;
- if(!prs_uint32("jobid", ps, depth, &r_u->jobid))
- return False;
- if(!prs_werror("status", ps, depth, &r_u->status))
- return False;
-
- return True;
-}
-
-/*******************************************************************
- * read a structure.
* called from spoolss_q_rffpcnex (srv_spoolss.c)
********************************************************************/
@@ -6230,46 +6086,6 @@ bool make_spoolss_q_getjob(SPOOL_Q_GETJOB *q_u, POLICY_HND *handle,
* init a structure.
********************************************************************/
-bool make_spoolss_q_startdocprinter(SPOOL_Q_STARTDOCPRINTER *q_u,
- POLICY_HND *handle, uint32 level,
- char *docname, char *outputfile,
- char *datatype)
-{
- DOC_INFO_CONTAINER *ctr = &q_u->doc_info_container;
-
- memcpy(&q_u->handle, handle, sizeof(POLICY_HND));
-
- ctr->level = level;
-
- switch (level) {
- case 1:
- ctr->docinfo.switch_value = level;
-
- ctr->docinfo.doc_info_1.p_docname = docname ? 1 : 0;
- ctr->docinfo.doc_info_1.p_outputfile = outputfile ? 1 : 0;
- ctr->docinfo.doc_info_1.p_datatype = datatype ? 1 : 0;
-
- init_unistr2(&ctr->docinfo.doc_info_1.docname, docname, UNI_STR_TERMINATE);
- init_unistr2(&ctr->docinfo.doc_info_1.outputfile, outputfile, UNI_STR_TERMINATE);
- init_unistr2(&ctr->docinfo.doc_info_1.datatype, datatype, UNI_STR_TERMINATE);
-
- break;
- case 2:
- /* DOC_INFO_2 is only used by Windows 9x and since it
- doesn't do printing over RPC we don't have to worry
- about it. */
- default:
- DEBUG(3, ("unsupported info level %d\n", level));
- return False;
- }
-
- return True;
-}
-
-/*******************************************************************
- * init a structure.
- ********************************************************************/
-
bool make_spoolss_q_rffpcnex(SPOOL_Q_RFFPCNEX *q_u, POLICY_HND *handle,
uint32 flags, uint32 options, const char *localmachine,
uint32 printerlocal, SPOOL_NOTIFY_OPTION *option)