From b2e038ef8bd78e9ca847bbd0aaaf593cea059b18 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 24 Feb 2009 22:53:05 +0100 Subject: s3-spoolss: remove rpccli_spoolss_addprinterdriver. Guenther --- source3/rpc_parse/parse_spoolss.c | 103 -------------------------------------- 1 file changed, 103 deletions(-) (limited to 'source3/rpc_parse/parse_spoolss.c') diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index 4ffa121e1c..9c69dd2659 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -3382,109 +3382,6 @@ bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_I return True; } -/******************************************************************* - init a SPOOL_Q_ADDPRINTERDRIVER struct - ******************************************************************/ - -bool make_spoolss_q_addprinterdriver(TALLOC_CTX *mem_ctx, - SPOOL_Q_ADDPRINTERDRIVER *q_u, const char* srv_name, - uint32 level, PRINTER_DRIVER_CTR *info) -{ - DEBUG(5,("make_spoolss_q_addprinterdriver\n")); - - if (!srv_name || !info) { - return False; - } - - q_u->server_name_ptr = 1; /* srv_name is != NULL, see above */ - init_unistr2(&q_u->server_name, srv_name, UNI_STR_TERMINATE); - - q_u->level = level; - - q_u->info.level = level; - q_u->info.ptr = 1; /* Info is != NULL, see above */ - switch (level) - { - /* info level 3 is supported by Windows 95/98, WinNT and Win2k */ - case 3 : - make_spoolss_driver_info_3(mem_ctx, &q_u->info.info_3, info->info3); - break; - - default: - DEBUG(0,("make_spoolss_q_addprinterdriver: Unknown info level [%d]\n", level)); - break; - } - - return True; -} - -bool make_spoolss_driver_info_3(TALLOC_CTX *mem_ctx, - SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 **spool_drv_info, - DRIVER_INFO_3 *info3) -{ - uint32 len = 0; - SPOOL_PRINTER_DRIVER_INFO_LEVEL_3 *inf; - - if (!(inf=TALLOC_ZERO_P(mem_ctx, SPOOL_PRINTER_DRIVER_INFO_LEVEL_3))) - return False; - - inf->cversion = info3->version; - inf->name_ptr = (info3->name.buffer!=NULL)?1:0; - inf->environment_ptr = (info3->architecture.buffer!=NULL)?1:0; - inf->driverpath_ptr = (info3->driverpath.buffer!=NULL)?1:0; - inf->datafile_ptr = (info3->datafile.buffer!=NULL)?1:0; - inf->configfile_ptr = (info3->configfile.buffer!=NULL)?1:0; - inf->helpfile_ptr = (info3->helpfile.buffer!=NULL)?1:0; - inf->monitorname_ptr = (info3->monitorname.buffer!=NULL)?1:0; - inf->defaultdatatype_ptr = (info3->defaultdatatype.buffer!=NULL)?1:0; - - init_unistr2_from_unistr(inf, &inf->name, &info3->name); - init_unistr2_from_unistr(inf, &inf->environment, &info3->architecture); - init_unistr2_from_unistr(inf, &inf->driverpath, &info3->driverpath); - init_unistr2_from_unistr(inf, &inf->datafile, &info3->datafile); - init_unistr2_from_unistr(inf, &inf->configfile, &info3->configfile); - init_unistr2_from_unistr(inf, &inf->helpfile, &info3->helpfile); - init_unistr2_from_unistr(inf, &inf->monitorname, &info3->monitorname); - init_unistr2_from_unistr(inf, &inf->defaultdatatype, &info3->defaultdatatype); - - if (info3->dependentfiles) { - bool done = False; - bool null_char = False; - uint16 *ptr = info3->dependentfiles; - - while (!done) { - switch (*ptr) { - case 0: - /* the null_char bool is used to help locate - two '\0's back to back */ - if (null_char) { - done = True; - } else { - null_char = True; - } - break; - - default: - null_char = False; - break; - } - len++; - ptr++; - } - } - - inf->dependentfiles_ptr = (info3->dependentfiles != NULL) ? 1 : 0; - inf->dependentfilessize = (info3->dependentfiles != NULL) ? len : 0; - if(!make_spoolss_buffer5(mem_ctx, &inf->dependentfiles, len, info3->dependentfiles)) { - SAFE_FREE(inf); - return False; - } - - *spool_drv_info = inf; - - return True; -} - /******************************************************************* make a BUFFER5 struct from a uint16* ******************************************************************/ -- cgit