Treat file names in POSIX-like case-sensitive fashion by default
[Samba/bb.git] / source / libsmb / libsmb_setget.c
blobbca2a80d14bfe0ecbf25f8f15b48591d542db284
1 /*
2 Unix SMB/Netbios implementation.
3 SMB client library implementation
4 Copyright (C) Andrew Tridgell 1998
5 Copyright (C) Richard Sharpe 2000, 2002
6 Copyright (C) John Terpstra 2000
7 Copyright (C) Tom Jansen (Ninja ISD) 2002
8 Copyright (C) Derrell Lipman 2003-2008
9 Copyright (C) Jeremy Allison 2007, 2008
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #include "includes.h"
26 #define __LIBSMBCLIENT_INTERNAL__
27 #include "libsmbclient.h"
28 #include "libsmb_internal.h"
31 /** Get the netbios name used for making connections */
32 char *
33 smbc_getNetbiosName(SMBCCTX *c)
35 return c->netbios_name;
38 /** Set the netbios name used for making connections */
39 void
40 smbc_setNetbiosName(SMBCCTX *c, char * netbios_name)
42 c->netbios_name = netbios_name;
45 /** Get the workgroup used for making connections */
46 char *
47 smbc_getWorkgroup(SMBCCTX *c)
49 return c->workgroup;
52 /** Set the workgroup used for making connections */
53 void
54 smbc_setWorkgroup(SMBCCTX *c, char * workgroup)
56 c->workgroup = workgroup;
59 /** Get the username used for making connections */
60 char *
61 smbc_getUser(SMBCCTX *c)
63 return c->user;
66 /** Set the username used for making connections */
67 void
68 smbc_setUser(SMBCCTX *c, char * user)
70 c->user = user;
73 /** Get the debug level */
74 int
75 smbc_getDebug(SMBCCTX *c)
77 return c->debug;
80 /** Set the debug level */
81 void
82 smbc_setDebug(SMBCCTX *c, int debug)
84 c->debug = debug;
85 DEBUGLEVEL = debug;
88 /**
89 * Get the timeout used for waiting on connections and response data
90 * (in milliseconds)
92 int
93 smbc_getTimeout(SMBCCTX *c)
95 return c->timeout;
98 /**
99 * Set the timeout used for waiting on connections and response data
100 * (in milliseconds)
102 void
103 smbc_setTimeout(SMBCCTX *c, int timeout)
105 c->timeout = timeout;
108 /** Get whether to log to standard error instead of standard output */
109 smbc_bool
110 smbc_getOptionDebugToStderr(SMBCCTX *c)
112 return c->internal->debug_stderr;
115 /** Set whether to log to standard error instead of standard output */
116 void
117 smbc_setOptionDebugToStderr(SMBCCTX *c, smbc_bool b)
119 c->internal->debug_stderr = b;
123 * Get whether to use new-style time attribute names, e.g. WRITE_TIME rather
124 * than the old-style names such as M_TIME. This allows also setting/getting
125 * CREATE_TIME which was previously unimplemented. (Note that the old C_TIME
126 * was supposed to be CHANGE_TIME but was confused and sometimes referred to
127 * CREATE_TIME.)
129 smbc_bool
130 smbc_getOptionFullTimeNames(SMBCCTX *c)
132 return c->internal->full_time_names;
136 * Set whether to use new-style time attribute names, e.g. WRITE_TIME rather
137 * than the old-style names such as M_TIME. This allows also setting/getting
138 * CREATE_TIME which was previously unimplemented. (Note that the old C_TIME
139 * was supposed to be CHANGE_TIME but was confused and sometimes referred to
140 * CREATE_TIME.)
142 void
143 smbc_setOptionFullTimeNames(SMBCCTX *c, smbc_bool b)
145 c->internal->full_time_names = b;
149 * Get the share mode to use for files opened with SMBC_open_ctx(). The
150 * default is SMBC_SHAREMODE_DENY_NONE.
152 smbc_share_mode
153 smbc_getOptionOpenShareMode(SMBCCTX *c)
155 return c->internal->share_mode;
159 * Set the share mode to use for files opened with SMBC_open_ctx(). The
160 * default is SMBC_SHAREMODE_DENY_NONE.
162 void
163 smbc_setOptionOpenShareMode(SMBCCTX *c, smbc_share_mode share_mode)
165 c->internal->share_mode = share_mode;
168 /** Retrieve a previously set user data handle */
169 void *
170 smbc_getOptionUserData(SMBCCTX *c)
172 return c->internal->user_data;
175 /** Save a user data handle */
176 void
177 smbc_setOptionUserData(SMBCCTX *c, void *user_data)
179 c->internal->user_data = user_data;
182 /** Get the encoded value for encryption level. */
183 smbc_smb_encrypt_level
184 smbc_getOptionSmbEncryptionLevel(SMBCCTX *c)
186 return c->internal->smb_encryption_level;
189 /** Set the encoded value for encryption level. */
190 void
191 smbc_setOptionSmbEncryptionLevel(SMBCCTX *c, smbc_smb_encrypt_level level)
193 c->internal->smb_encryption_level = level;
196 /** Get whether to treat file names as case-sensitive. */
197 smbc_bool
198 smbc_getOptionCaseSensitive(SMBCCTX *c)
200 return c->internal->case_sensitive;
203 /** Set whether to treat file names as case-sensitive. */
204 void
205 smbc_setOptionCaseSensitive(SMBCCTX *c, smbc_bool b)
207 c->internal->case_sensitive = b;
211 * Get from how many local master browsers should the list of workgroups be
212 * retrieved. It can take up to 12 minutes or longer after a server becomes a
213 * local master browser, for it to have the entire browse list (the list of
214 * workgroups/domains) from an entire network. Since a client never knows
215 * which local master browser will be found first, the one which is found
216 * first and used to retrieve a browse list may have an incomplete or empty
217 * browse list. By requesting the browse list from multiple local master
218 * browsers, a more complete list can be generated. For small networks (few
219 * workgroups), it is recommended that this value be set to 0, causing the
220 * browse lists from all found local master browsers to be retrieved and
221 * merged. For networks with many workgroups, a suitable value for this
222 * variable is probably somewhere around 3. (Default: 3).
225 smbc_getOptionBrowseMaxLmbCount(SMBCCTX *c)
227 return c->options.browse_max_lmb_count;
231 * Set from how many local master browsers should the list of workgroups be
232 * retrieved. It can take up to 12 minutes or longer after a server becomes a
233 * local master browser, for it to have the entire browse list (the list of
234 * workgroups/domains) from an entire network. Since a client never knows
235 * which local master browser will be found first, the one which is found
236 * first and used to retrieve a browse list may have an incomplete or empty
237 * browse list. By requesting the browse list from multiple local master
238 * browsers, a more complete list can be generated. For small networks (few
239 * workgroups), it is recommended that this value be set to 0, causing the
240 * browse lists from all found local master browsers to be retrieved and
241 * merged. For networks with many workgroups, a suitable value for this
242 * variable is probably somewhere around 3. (Default: 3).
244 void
245 smbc_setOptionBrowseMaxLmbCount(SMBCCTX *c, int count)
247 c->options.browse_max_lmb_count = count;
251 * Get whether to url-encode readdir entries.
253 * There is a difference in the desired return strings from
254 * smbc_readdir() depending upon whether the filenames are to
255 * be displayed to the user, or whether they are to be
256 * appended to the path name passed to smbc_opendir() to call
257 * a further smbc_ function (e.g. open the file with
258 * smbc_open()). In the former case, the filename should be
259 * in "human readable" form. In the latter case, the smbc_
260 * functions expect a URL which must be url-encoded. Those
261 * functions decode the URL. If, for example, smbc_readdir()
262 * returned a file name of "abc%20def.txt", passing a path
263 * with this file name attached to smbc_open() would cause
264 * smbc_open to attempt to open the file "abc def.txt" since
265 * the %20 is decoded into a space.
267 * Set this option to True if the names returned by
268 * smbc_readdir() should be url-encoded such that they can be
269 * passed back to another smbc_ call. Set it to False if the
270 * names returned by smbc_readdir() are to be presented to the
271 * user.
273 * For backwards compatibility, this option defaults to False.
275 smbc_bool
276 smbc_getOptionUrlEncodeReaddirEntries(SMBCCTX *c)
278 return c->options.urlencode_readdir_entries;
282 * Set whether to url-encode readdir entries.
284 * There is a difference in the desired return strings from
285 * smbc_readdir() depending upon whether the filenames are to
286 * be displayed to the user, or whether they are to be
287 * appended to the path name passed to smbc_opendir() to call
288 * a further smbc_ function (e.g. open the file with
289 * smbc_open()). In the former case, the filename should be
290 * in "human readable" form. In the latter case, the smbc_
291 * functions expect a URL which must be url-encoded. Those
292 * functions decode the URL. If, for example, smbc_readdir()
293 * returned a file name of "abc%20def.txt", passing a path
294 * with this file name attached to smbc_open() would cause
295 * smbc_open to attempt to open the file "abc def.txt" since
296 * the %20 is decoded into a space.
298 * Set this option to True if the names returned by
299 * smbc_readdir() should be url-encoded such that they can be
300 * passed back to another smbc_ call. Set it to False if the
301 * names returned by smbc_readdir() are to be presented to the
302 * user.
304 * For backwards compatibility, this option defaults to False.
306 void
307 smbc_setOptionUrlEncodeReaddirEntries(SMBCCTX *c, smbc_bool b)
309 c->options.urlencode_readdir_entries = b;
313 * Get whether to use the same connection for all shares on a server.
315 * Some Windows versions appear to have a limit to the number
316 * of concurrent SESSIONs and/or TREE CONNECTions. In
317 * one-shot programs (i.e. the program runs and then quickly
318 * ends, thereby shutting down all connections), it is
319 * probably reasonable to establish a new connection for each
320 * share. In long-running applications, the limitation can be
321 * avoided by using only a single connection to each server,
322 * and issuing a new TREE CONNECT when the share is accessed.
324 smbc_bool
325 smbc_getOptionOneSharePerServer(SMBCCTX *c)
327 return c->options.one_share_per_server;
331 * Set whether to use the same connection for all shares on a server.
333 * Some Windows versions appear to have a limit to the number
334 * of concurrent SESSIONs and/or TREE CONNECTions. In
335 * one-shot programs (i.e. the program runs and then quickly
336 * ends, thereby shutting down all connections), it is
337 * probably reasonable to establish a new connection for each
338 * share. In long-running applications, the limitation can be
339 * avoided by using only a single connection to each server,
340 * and issuing a new TREE CONNECT when the share is accessed.
342 void
343 smbc_setOptionOneSharePerServer(SMBCCTX *c, smbc_bool b)
345 c->options.one_share_per_server = b;
348 /** Get whether to enable use of kerberos */
349 smbc_bool
350 smbc_getOptionUseKerberos(SMBCCTX *c)
352 return c->flags & SMB_CTX_FLAG_USE_KERBEROS ? True : False;
355 /** Set whether to enable use of kerberos */
356 void
357 smbc_setOptionUseKerberos(SMBCCTX *c, smbc_bool b)
359 if (b) {
360 c->flags |= SMB_CTX_FLAG_USE_KERBEROS;
361 } else {
362 c->flags &= ~SMB_CTX_FLAG_USE_KERBEROS;
366 /** Get whether to fallback after kerberos */
367 smbc_bool
368 smbc_getOptionFallbackAfterKerberos(SMBCCTX *c)
370 return c->flags & SMB_CTX_FLAG_FALLBACK_AFTER_KERBEROS ? True : False;
373 /** Set whether to fallback after kerberos */
374 void
375 smbc_setOptionFallbackAfterKerberos(SMBCCTX *c, smbc_bool b)
377 if (b) {
378 c->flags |= SMB_CTX_FLAG_FALLBACK_AFTER_KERBEROS;
379 } else {
380 c->flags &= ~SMB_CTX_FLAG_FALLBACK_AFTER_KERBEROS;
384 /** Get whether to automatically select anonymous login */
385 smbc_bool
386 smbc_getOptionNoAutoAnonymousLogin(SMBCCTX *c)
388 return c->flags & SMBCCTX_FLAG_NO_AUTO_ANONYMOUS_LOGON ? True : False;
391 /** Set whether to automatically select anonymous login */
392 void
393 smbc_setOptionNoAutoAnonymousLogin(SMBCCTX *c, smbc_bool b)
395 if (b) {
396 c->flags |= SMBCCTX_FLAG_NO_AUTO_ANONYMOUS_LOGON;
397 } else {
398 c->flags &= ~SMBCCTX_FLAG_NO_AUTO_ANONYMOUS_LOGON;
402 /** Get the function for obtaining authentication data */
403 smbc_get_auth_data_fn
404 smbc_getFunctionAuthData(SMBCCTX *c)
406 return c->callbacks.auth_fn;
409 /** Set the function for obtaining authentication data */
410 void
411 smbc_setFunctionAuthData(SMBCCTX *c, smbc_get_auth_data_fn fn)
413 c->internal->auth_fn_with_context = NULL;
414 c->callbacks.auth_fn = fn;
417 /** Get the new-style authentication function which includes the context. */
418 smbc_get_auth_data_with_context_fn
419 smbc_getFunctionAuthDataWithContext(SMBCCTX *c)
421 return c->internal->auth_fn_with_context;
424 /** Set the new-style authentication function which includes the context. */
425 void
426 smbc_setFunctionAuthDataWithContext(SMBCCTX *c,
427 smbc_get_auth_data_with_context_fn fn)
429 c->callbacks.auth_fn = NULL;
430 c->internal->auth_fn_with_context = fn;
433 /** Get the function for checking if a server is still good */
434 smbc_check_server_fn
435 smbc_getFunctionCheckServer(SMBCCTX *c)
437 return c->callbacks.check_server_fn;
440 /** Set the function for checking if a server is still good */
441 void
442 smbc_setFunctionCheckServer(SMBCCTX *c, smbc_check_server_fn fn)
444 c->callbacks.check_server_fn = fn;
447 /** Get the function for removing a server if unused */
448 smbc_remove_unused_server_fn
449 smbc_getFunctionRemoveUnusedServer(SMBCCTX *c)
451 return c->callbacks.remove_unused_server_fn;
454 /** Set the function for removing a server if unused */
455 void
456 smbc_setFunctionRemoveUnusedServer(SMBCCTX *c,
457 smbc_remove_unused_server_fn fn)
459 c->callbacks.remove_unused_server_fn = fn;
462 /** Get the function for adding a cached server */
463 smbc_add_cached_srv_fn
464 smbc_getFunctionAddCachedServer(SMBCCTX *c)
466 return c->callbacks.add_cached_srv_fn;
469 /** Set the function for adding a cached server */
470 void
471 smbc_setFunctionAddCachedServer(SMBCCTX *c, smbc_add_cached_srv_fn fn)
473 c->callbacks.add_cached_srv_fn = fn;
476 /** Get the function for server cache lookup */
477 smbc_get_cached_srv_fn
478 smbc_getFunctionGetCachedServer(SMBCCTX *c)
480 return c->callbacks.get_cached_srv_fn;
483 /** Set the function for server cache lookup */
484 void
485 smbc_setFunctionGetCachedServer(SMBCCTX *c, smbc_get_cached_srv_fn fn)
487 c->callbacks.get_cached_srv_fn = fn;
490 /** Get the function for server cache removal */
491 smbc_remove_cached_srv_fn
492 smbc_getFunctionRemoveCachedServer(SMBCCTX *c)
494 return c->callbacks.remove_cached_srv_fn;
497 /** Set the function for server cache removal */
498 void
499 smbc_setFunctionRemoveCachedServer(SMBCCTX *c,
500 smbc_remove_cached_srv_fn fn)
502 c->callbacks.remove_cached_srv_fn = fn;
506 * Get the function for server cache purging. This function tries to
507 * remove all cached servers (e.g. on disconnect)
509 smbc_purge_cached_fn
510 smbc_getFunctionPurgeCachedServers(SMBCCTX *c)
512 return c->callbacks.purge_cached_fn;
515 /** Set the function to store private data of the server cache */
516 void smbc_setServerCacheData(SMBCCTX *c, struct smbc_server_cache * cache)
518 c->internal->server_cache = cache;
521 /** Get the function to store private data of the server cache */
522 struct smbc_server_cache * smbc_getServerCacheData(SMBCCTX *c)
524 return c->internal->server_cache;
529 * Set the function for server cache purging. This function tries to
530 * remove all cached servers (e.g. on disconnect)
532 void
533 smbc_setFunctionPurgeCachedServers(SMBCCTX *c, smbc_purge_cached_fn fn)
535 c->callbacks.purge_cached_fn = fn;
539 * Callable functions for files.
542 smbc_open_fn
543 smbc_getFunctionOpen(SMBCCTX *c)
545 return c->open;
548 void
549 smbc_setFunctionOpen(SMBCCTX *c, smbc_open_fn fn)
551 c->open = fn;
554 smbc_creat_fn
555 smbc_getFunctionCreat(SMBCCTX *c)
557 return c->creat;
560 void
561 smbc_setFunctionCreat(SMBCCTX *c, smbc_creat_fn fn)
563 c->creat = fn;
566 smbc_read_fn
567 smbc_getFunctionRead(SMBCCTX *c)
569 return c->read;
572 void
573 smbc_setFunctionRead(SMBCCTX *c, smbc_read_fn fn)
575 c->read = fn;
578 smbc_write_fn
579 smbc_getFunctionWrite(SMBCCTX *c)
581 return c->write;
584 void
585 smbc_setFunctionWrite(SMBCCTX *c, smbc_write_fn fn)
587 c->write = fn;
590 smbc_unlink_fn
591 smbc_getFunctionUnlink(SMBCCTX *c)
593 return c->unlink;
596 void
597 smbc_setFunctionUnlink(SMBCCTX *c, smbc_unlink_fn fn)
599 c->unlink = fn;
602 smbc_rename_fn
603 smbc_getFunctionRename(SMBCCTX *c)
605 return c->rename;
608 void
609 smbc_setFunctionRename(SMBCCTX *c, smbc_rename_fn fn)
611 c->rename = fn;
614 smbc_lseek_fn
615 smbc_getFunctionLseek(SMBCCTX *c)
617 return c->lseek;
620 void
621 smbc_setFunctionLseek(SMBCCTX *c, smbc_lseek_fn fn)
623 c->lseek = fn;
626 smbc_stat_fn
627 smbc_getFunctionStat(SMBCCTX *c)
629 return c->stat;
632 void
633 smbc_setFunctionStat(SMBCCTX *c, smbc_stat_fn fn)
635 c->stat = fn;
638 smbc_fstat_fn
639 smbc_getFunctionFstat(SMBCCTX *c)
641 return c->fstat;
644 void
645 smbc_setFunctionFstat(SMBCCTX *c, smbc_fstat_fn fn)
647 c->fstat = fn;
650 smbc_ftruncate_fn
651 smbc_getFunctionFtruncate(SMBCCTX *c)
653 return c->internal->posix_emu.ftruncate_fn;
656 void
657 smbc_setFunctionFtruncate(SMBCCTX *c, smbc_ftruncate_fn fn)
659 c->internal->posix_emu.ftruncate_fn = fn;
662 smbc_close_fn
663 smbc_getFunctionClose(SMBCCTX *c)
665 return c->close_fn;
668 void
669 smbc_setFunctionClose(SMBCCTX *c, smbc_close_fn fn)
671 c->close_fn = fn;
676 * Callable functions for directories.
679 smbc_opendir_fn
680 smbc_getFunctionOpendir(SMBCCTX *c)
682 return c->opendir;
685 void
686 smbc_setFunctionOpendir(SMBCCTX *c, smbc_opendir_fn fn)
688 c->opendir = fn;
691 smbc_closedir_fn
692 smbc_getFunctionClosedir(SMBCCTX *c)
694 return c->closedir;
697 void
698 smbc_setFunctionClosedir(SMBCCTX *c, smbc_closedir_fn fn)
700 c->closedir = fn;
703 smbc_readdir_fn
704 smbc_getFunctionReaddir(SMBCCTX *c)
706 return c->readdir;
709 void
710 smbc_setFunctionReaddir(SMBCCTX *c, smbc_readdir_fn fn)
712 c->readdir = fn;
715 smbc_getdents_fn
716 smbc_getFunctionGetdents(SMBCCTX *c)
718 return c->getdents;
721 void
722 smbc_setFunctionGetdents(SMBCCTX *c, smbc_getdents_fn fn)
724 c->getdents = fn;
727 smbc_mkdir_fn
728 smbc_getFunctionMkdir(SMBCCTX *c)
730 return c->mkdir;
733 void
734 smbc_setFunctionMkdir(SMBCCTX *c, smbc_mkdir_fn fn)
736 c->mkdir = fn;
739 smbc_rmdir_fn
740 smbc_getFunctionRmdir(SMBCCTX *c)
742 return c->rmdir;
745 void
746 smbc_setFunctionRmdir(SMBCCTX *c, smbc_rmdir_fn fn)
748 c->rmdir = fn;
751 smbc_telldir_fn
752 smbc_getFunctionTelldir(SMBCCTX *c)
754 return c->telldir;
757 void
758 smbc_setFunctionTelldir(SMBCCTX *c, smbc_telldir_fn fn)
760 c->telldir = fn;
763 smbc_lseekdir_fn
764 smbc_getFunctionLseekdir(SMBCCTX *c)
766 return c->lseekdir;
769 void
770 smbc_setFunctionLseekdir(SMBCCTX *c, smbc_lseekdir_fn fn)
772 c->lseekdir = fn;
775 smbc_fstatdir_fn
776 smbc_getFunctionFstatdir(SMBCCTX *c)
778 return c->fstatdir;
781 void
782 smbc_setFunctionFstatdir(SMBCCTX *c, smbc_fstatdir_fn fn)
784 c->fstatdir = fn;
789 * Callable functions applicable to both files and directories.
792 smbc_chmod_fn
793 smbc_getFunctionChmod(SMBCCTX *c)
795 return c->chmod;
798 void
799 smbc_setFunctionChmod(SMBCCTX *c, smbc_chmod_fn fn)
801 c->chmod = fn;
804 smbc_utimes_fn
805 smbc_getFunctionUtimes(SMBCCTX *c)
807 return c->utimes;
810 void
811 smbc_setFunctionUtimes(SMBCCTX *c, smbc_utimes_fn fn)
813 c->utimes = fn;
816 smbc_setxattr_fn
817 smbc_getFunctionSetxattr(SMBCCTX *c)
819 return c->setxattr;
822 void
823 smbc_setFunctionSetxattr(SMBCCTX *c, smbc_setxattr_fn fn)
825 c->setxattr = fn;
828 smbc_getxattr_fn
829 smbc_getFunctionGetxattr(SMBCCTX *c)
831 return c->getxattr;
834 void
835 smbc_setFunctionGetxattr(SMBCCTX *c, smbc_getxattr_fn fn)
837 c->getxattr = fn;
840 smbc_removexattr_fn
841 smbc_getFunctionRemovexattr(SMBCCTX *c)
843 return c->removexattr;
846 void
847 smbc_setFunctionRemovexattr(SMBCCTX *c, smbc_removexattr_fn fn)
849 c->removexattr = fn;
852 smbc_listxattr_fn
853 smbc_getFunctionListxattr(SMBCCTX *c)
855 return c->listxattr;
858 void
859 smbc_setFunctionListxattr(SMBCCTX *c, smbc_listxattr_fn fn)
861 c->listxattr = fn;
866 * Callable functions related to printing
869 smbc_print_file_fn
870 smbc_getFunctionPrintFile(SMBCCTX *c)
872 return c->print_file;
875 void
876 smbc_setFunctionPrintFile(SMBCCTX *c, smbc_print_file_fn fn)
878 c->print_file = fn;
881 smbc_open_print_job_fn
882 smbc_getFunctionOpenPrintJob(SMBCCTX *c)
884 return c->open_print_job;
887 void
888 smbc_setFunctionOpenPrintJob(SMBCCTX *c,
889 smbc_open_print_job_fn fn)
891 c->open_print_job = fn;
894 smbc_list_print_jobs_fn
895 smbc_getFunctionListPrintJobs(SMBCCTX *c)
897 return c->list_print_jobs;
900 void
901 smbc_setFunctionListPrintJobs(SMBCCTX *c,
902 smbc_list_print_jobs_fn fn)
904 c->list_print_jobs = fn;
907 smbc_unlink_print_job_fn
908 smbc_getFunctionUnlinkPrintJob(SMBCCTX *c)
910 return c->unlink_print_job;
913 void
914 smbc_setFunctionUnlinkPrintJob(SMBCCTX *c,
915 smbc_unlink_print_job_fn fn)
917 c->unlink_print_job = fn;