libsmbconf: add shutdown handler to smbconf_ops.
[Samba.git] / source / lib / smbconf / smbconf_private.h
blobb64da6ca73d3661f4e7128693458bb9480c0f175
1 /*
2 * Unix SMB/CIFS implementation.
3 * libsmbconf - Samba configuration library
4 * Copyright (C) Michael Adam 2008
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef __LIBSMBCONF_PRIVATE_H__
21 #define __LIBSMBCONF_PRIVATE_H__
23 struct smbconf_ops {
24 WERROR (*init)(struct smbconf_ctx *ctx);
25 int (*shutdown)(struct smbconf_ctx *ctx);
26 WERROR (*open_conf)(struct smbconf_ctx *ctx);
27 int (*close_conf)(struct smbconf_ctx *ctx);
28 void (*get_csn)(struct smbconf_ctx *ctx, struct smbconf_csn *csn,
29 const char *service, const char *param);
30 WERROR (*drop)(struct smbconf_ctx *ctx);
31 WERROR (*get_share_names)(struct smbconf_ctx *ctx,
32 TALLOC_CTX *mem_ctx,
33 uint32_t *num_shares,
34 char ***share_names);
35 bool (*share_exists)(struct smbconf_ctx *ctx, const char *service);
36 WERROR (*create_share)(struct smbconf_ctx *ctx, const char *service);
37 WERROR (*get_share)(struct smbconf_ctx *ctx,
38 TALLOC_CTX *mem_ctx,
39 const char *servicename, uint32_t *num_params,
40 char ***param_names, char ***param_values);
41 WERROR (*delete_share)(struct smbconf_ctx *ctx,
42 const char *servicename);
43 WERROR (*set_parameter)(struct smbconf_ctx *ctx,
44 const char *service,
45 const char *param,
46 const char *valstr);
47 WERROR (*get_parameter)(struct smbconf_ctx *ctx,
48 TALLOC_CTX *mem_ctx,
49 const char *service,
50 const char *param,
51 char **valstr);
52 WERROR (*delete_parameter)(struct smbconf_ctx *ctx,
53 const char *service, const char *param);
56 struct smbconf_ctx {
57 NT_USER_TOKEN *token;
58 struct smbconf_ops *ops;
61 #endif