summaryrefslogtreecommitdiff
path: root/source3/include/libsmb_internal.h
diff options
context:
space:
mode:
authorDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-02-29 13:34:35 -0500
committerDerrell Lipman <derrell.lipman@unwireduniverse.com>2008-03-01 20:47:22 -0500
commit4ba42cbe0f6bbd25848786e1a87c06aca79b98ea (patch)
treefa2417599eca2565d0a3f8ace8ef005909fcd6ab /source3/include/libsmb_internal.h
parent257b7b09298f7cb983b2f31b87fc5e46e0f62f0c (diff)
downloadsamba-4ba42cbe0f6bbd25848786e1a87c06aca79b98ea.tar.gz
samba-4ba42cbe0f6bbd25848786e1a87c06aca79b98ea.tar.bz2
samba-4ba42cbe0f6bbd25848786e1a87c06aca79b98ea.zip
Modified revamp of the libsmbclient interface.
Given the tacit (if that) approval by some people, and clear disapproval by others for my proposed clean-up and reorganization of libsmbclient, I've come up with a slightly different approach. This commit changes back to the original libsmbclient.h SMBCCTX structure which will maintain ABI compatibility. I retain, here, the setter and getter functions which all new code should use. Older programs already compiled should continue to work fine. Older programs being recompiled will encounter compile-time errors (intentionally!) so that the code can be corrected to use the setter/getter interfaces. Although this doesn't clean up the interface in the way I had wanted, the code reorganization and requirement for new programs to use the setters and getters allows future progress to be made on libsmbclient without further muddying up the interface, while retaining the ABI compatibility that was the big issue causing disapproval. I hope that this compromise is adequate. Derrell (This used to be commit 56429a3d60b2a48963342f6340b3c01469a892c6)
Diffstat (limited to 'source3/include/libsmb_internal.h')
-rw-r--r--source3/include/libsmb_internal.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/include/libsmb_internal.h b/source3/include/libsmb_internal.h
index 353575dce8..555b6ac138 100644
--- a/source3/include/libsmb_internal.h
+++ b/source3/include/libsmb_internal.h
@@ -108,11 +108,12 @@ struct _SMBCFILE {
/*
* Context structure
*/
-struct _SMBCCTX {
+struct SMBC_internal_data {
/* True when this handle is initialized */
bool initialized;
+#if 0 /* Left in libsmbclient.h for backward compatibility */
/* Netbios name used for making connections */
char * netbios_name;
@@ -127,6 +128,7 @@ struct _SMBCCTX {
/* Connection timeout value */
int timeout;
+#endif
/* dirent pointer location
*
@@ -240,6 +242,7 @@ struct _SMBCCTX {
*/
bool one_share_per_server;
+#if 0 /* Left in libsmbclient.h (flags) for backward compatibility */
/* Kerberos-related flags */
bool use_kerberos;
bool fallback_after_kerberos;
@@ -264,10 +267,12 @@ struct _SMBCCTX {
smbc_remove_cached_srv_fn remove_cached_server_fn;
smbc_purge_cached_srv_fn purge_cached_server_fn;
} cache;
+#endif
/* POSIX emulation functions */
struct
{
+#if 0 /* Left in libsmbclient.h for backward compatibility */
smbc_open_fn open_fn;
smbc_creat_fn creat_fn;
smbc_read_fn read_fn;
@@ -275,9 +280,11 @@ struct _SMBCCTX {
smbc_unlink_fn unlink_fn;
smbc_rename_fn rename_fn;
smbc_lseek_fn lseek_fn;
- smbc_ftruncate_fn ftruncate_fn;
smbc_stat_fn stat_fn;
smbc_fstat_fn fstat_fn;
+#endif
+ smbc_ftruncate_fn ftruncate_fn;
+#if 0 /* Left in libsmbclient.h for backward compatibility */
smbc_close_fn close_fn;
smbc_opendir_fn opendir_fn;
smbc_closedir_fn closedir_fn;
@@ -294,8 +301,10 @@ struct _SMBCCTX {
smbc_getxattr_fn getxattr_fn;
smbc_removexattr_fn removexattr_fn;
smbc_listxattr_fn listxattr_fn;
+#endif
} posix_emu;
+#if 0 /* Left in libsmbclient.h for backward compatibility */
/* Printing-related functions */
struct
{
@@ -304,8 +313,9 @@ struct _SMBCCTX {
smbc_list_print_jobs_fn list_print_jobs_fn;
smbc_unlink_print_job_fn unlink_print_job_fn;
} printing;
+#endif
-#if 0 /* not yet */
+#if 0 /* None available yet */
/* SMB high-level functions */
struct
{