summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_spoolss.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-02-24 22:53:05 +0100
committerGünther Deschner <gd@samba.org>2009-02-24 23:57:52 +0100
commitb2e038ef8bd78e9ca847bbd0aaaf593cea059b18 (patch)
tree3ebc7986c752b402f69ddf20cb2a530f357db787 /source3/rpc_parse/parse_spoolss.c
parent3777978eb466bf0e5268851f2820f8f91ff1bf85 (diff)
downloadsamba-b2e038ef8bd78e9ca847bbd0aaaf593cea059b18.tar.gz
samba-b2e038ef8bd78e9ca847bbd0aaaf593cea059b18.tar.bz2
samba-b2e038ef8bd78e9ca847bbd0aaaf593cea059b18.zip
s3-spoolss: remove rpccli_spoolss_addprinterdriver.
Guenther
Diffstat (limited to 'source3/rpc_parse/parse_spoolss.c')
-rw-r--r--source3/rpc_parse/parse_spoolss.c103
1 files changed, 0 insertions, 103 deletions
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
@@ -3383,109 +3383,6 @@ bool spool_io_printer_driver_info_level(const char *desc, SPOOL_PRINTER_DRIVER_I
}
/*******************************************************************
- 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*
******************************************************************/