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_H__
21 #define __LIBSMBCONF_H__
25 /* the change sequence number */
31 * WARNING: this api is still subject to change.
35 * initialization functions for the available modules
36 * (a dispatcher might be added in the future)
38 WERROR
smbconf_init_reg(TALLOC_CTX
*mem_ctx
, struct smbconf_ctx
**conf_ctx
,
41 WERROR
smbconf_init_txt_simple(TALLOC_CTX
*mem_ctx
,
42 struct smbconf_ctx
**conf_ctx
,
47 * the smbconf API functions
49 void smbconf_shutdown(struct smbconf_ctx
*ctx
);
50 bool smbconf_changed(struct smbconf_ctx
*ctx
, struct smbconf_csn
*csn
,
51 const char *service
, const char *param
);
52 WERROR
smbconf_drop(struct smbconf_ctx
*ctx
);
53 WERROR
smbconf_get_config(struct smbconf_ctx
*ctx
,
56 char ***share_names
, uint32_t **num_params
,
57 char ****param_names
, char ****param_values
);
58 WERROR
smbconf_get_share_names(struct smbconf_ctx
*ctx
,
62 bool smbconf_share_exists(struct smbconf_ctx
*ctx
, const char *servicename
);
63 WERROR
smbconf_create_share(struct smbconf_ctx
*ctx
, const char *servicename
);
64 WERROR
smbconf_get_share(struct smbconf_ctx
*ctx
,
66 const char *servicename
, uint32_t *num_params
,
67 char ***param_names
, char ***param_values
);
68 WERROR
smbconf_delete_share(struct smbconf_ctx
*ctx
,
69 const char *servicename
);
70 WERROR
smbconf_set_parameter(struct smbconf_ctx
*ctx
,
74 WERROR
smbconf_set_global_parameter(struct smbconf_ctx
*ctx
,
75 const char *param
, const char *val
);
76 WERROR
smbconf_get_parameter(struct smbconf_ctx
*ctx
,
81 WERROR
smbconf_get_global_parameter(struct smbconf_ctx
*ctx
,
85 WERROR
smbconf_delete_parameter(struct smbconf_ctx
*ctx
,
86 const char *service
, const char *param
);
87 WERROR
smbconf_delete_global_parameter(struct smbconf_ctx
*ctx
,
90 #endif /* _LIBSMBCONF_H_ */