From 4ec7597d1154c60f0f55feab93f2dc9c776d56f8 Mon Sep 17 00:00:00 2001 From: Jean-François Micouleau Date: Sat, 10 Jun 2000 22:35:52 +0000 Subject: parsing code for reply[open|close]printer in preparation of the event stuff. J.F. (This used to be commit 1871d4a3f64401f9a6f749ce26d1715e3bcdeac3) --- source3/rpc_parse/parse_spoolss.c | 87 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) (limited to 'source3/rpc_parse') diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index ea8aa42a45..9e7d7501bb 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -4989,3 +4989,90 @@ JOB_INFO_2 *add_job2_to_array(uint32 *len, JOB_INFO_2 ***array, (void***)array, (const void*)job, *fn, True); } +/******************************************************************* + Parse a SPOOL_Q_REPLYOPENPRINTER structure. +********************************************************************/ +BOOL spoolss_io_q_replyopenprinter(char *desc, SPOOL_Q_REPLYOPENPRINTER *q_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_q_replyopenprinter"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_unistr2("", &(q_u->string), True, ps, depth)) + return False; + + if(!prs_align(ps)) + return False; + + if(!prs_uint32("printer", ps, depth, &q_u->printer)) + return False; + if(!prs_uint32("type", ps, depth, &q_u->type)) + return False; + + if(!new_spoolss_io_buffer("", ps, depth, q_u->buffer)) + return False; + + return True; +} + +/******************************************************************* + Parse a SPOOL_R_REPLYOPENPRINTER structure. +********************************************************************/ +BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_r_replyopenprinter"); + depth++; + + if (!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth)) + return False; + + if (!prs_uint32("status", ps, depth, &r_u->status)) + return False; + + return True; +} + +/******************************************************************* + Parse a SPOOL_Q_REPLYCLOSEPRINTER structure. +********************************************************************/ +BOOL spoolss_io_q_replycloseprinter(char *desc, SPOOL_Q_REPLYCLOSEPRINTER *q_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_q_replycloseprinter"); + depth++; + + if(!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("printer handle",&(q_u->handle),ps,depth)) + return False; + + return True; +} + +/******************************************************************* + Parse a SPOOL_R_REPLYCLOSEPRINTER structure. +********************************************************************/ +BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, prs_struct *ps, int depth) +{ + prs_debug(ps, depth, desc, "spoolss_io_r_replycloseprinter"); + depth++; + + if (!prs_align(ps)) + return False; + + if(!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth)) + return False; + + if (!prs_uint32("status", ps, depth, &r_u->status)) + return False; + + return True; +} + + + -- cgit