diff options
author | Michael Adam <obnox@samba.org> | 2008-03-20 12:28:41 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-03-21 02:25:56 +0100 |
commit | 2135f7dd61ea46b539fefc9af3d0212a9281edcd (patch) | |
tree | 37dff3507895acdfa4138991fc2822f5d1a164be /source3/lib/smbconf/smbconf_private.h | |
parent | f12b10566df44df3c86b59c0cff80b52534558b3 (diff) | |
download | samba-2135f7dd61ea46b539fefc9af3d0212a9281edcd.tar.gz samba-2135f7dd61ea46b539fefc9af3d0212a9281edcd.tar.bz2 samba-2135f7dd61ea46b539fefc9af3d0212a9281edcd.zip |
libsmbconf: introduce a smbconf_ops layer to allow interchangeable backends.
Michael
(This used to be commit a857f643d1558c0fdab4b647695d75223b730b96)
Diffstat (limited to 'source3/lib/smbconf/smbconf_private.h')
-rw-r--r-- | source3/lib/smbconf/smbconf_private.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source3/lib/smbconf/smbconf_private.h b/source3/lib/smbconf/smbconf_private.h index 1827645583..d9e0f1396a 100644 --- a/source3/lib/smbconf/smbconf_private.h +++ b/source3/lib/smbconf/smbconf_private.h @@ -20,8 +20,39 @@ #ifndef __LIBSMBCONF_PRIVATE_H__ #define __LIBSMBCONF_PRIVATE_H__ +struct smbconf_ops { + WERROR (*init)(struct smbconf_ctx *ctx); + void (*get_csn)(struct smbconf_ctx *ctx, struct smbconf_csn *csn, + const char *service, const char *param); + WERROR (*drop)(struct smbconf_ctx *ctx); + WERROR (*get_share_names)(struct smbconf_ctx *ctx, + TALLOC_CTX *mem_ctx, + uint32_t *num_shares, + char ***share_names); + bool (*share_exists)(struct smbconf_ctx *ctx, const char *service); + WERROR (*create_share)(struct smbconf_ctx *ctx, const char *service); + WERROR (*get_share)(struct smbconf_ctx *ctx, + TALLOC_CTX *mem_ctx, + const char *servicename, uint32_t *num_params, + char ***param_names, char ***param_values); + WERROR (*delete_share)(struct smbconf_ctx *ctx, + const char *servicename); + WERROR (*set_parameter)(struct smbconf_ctx *ctx, + const char *service, + const char *param, + const char *valstr); + WERROR (*get_parameter)(struct smbconf_ctx *ctx, + TALLOC_CTX *mem_ctx, + const char *service, + const char *param, + char **valstr); + WERROR (*delete_parameter)(struct smbconf_ctx *ctx, + const char *service, const char *param); +}; + struct smbconf_ctx { NT_USER_TOKEN *token; + struct smbconf_ops *ops; }; #endif |