diff options
author | Michael Adam <obnox@samba.org> | 2009-01-21 16:59:09 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-01-21 18:40:54 +0100 |
commit | 9f3c67e80c8b791cbfef9d58b5aa7a9ecdf909f3 (patch) | |
tree | 24d10589498d140fe9f5e49a77f715d9d87464ce /source3/lib/smbconf | |
parent | 52b77c928c14c9742293bcd0b0f82f56696fb5b3 (diff) | |
download | samba-9f3c67e80c8b791cbfef9d58b5aa7a9ecdf909f3.tar.gz samba-9f3c67e80c8b791cbfef9d58b5aa7a9ecdf909f3.tar.bz2 samba-9f3c67e80c8b791cbfef9d58b5aa7a9ecdf909f3.zip |
s3:libsmbconf: remove the init headers from smbconf.h
give the smbconf_init() dispatcher and the backends
(smbconf_reg and smbconf_txt) a header of their own each.
This allows to use the basic infrastructure and
single backends individually.
Michael
Diffstat (limited to 'source3/lib/smbconf')
-rw-r--r-- | source3/lib/smbconf/smbconf.h | 19 | ||||
-rw-r--r-- | source3/lib/smbconf/smbconf_init.c | 2 | ||||
-rw-r--r-- | source3/lib/smbconf/smbconf_init.h | 32 | ||||
-rw-r--r-- | source3/lib/smbconf/smbconf_reg.h | 33 | ||||
-rw-r--r-- | source3/lib/smbconf/smbconf_txt.h | 33 |
5 files changed, 100 insertions, 19 deletions
diff --git a/source3/lib/smbconf/smbconf.h b/source3/lib/smbconf/smbconf.h index 9ff9a83fad..106fae6431 100644 --- a/source3/lib/smbconf/smbconf.h +++ b/source3/lib/smbconf/smbconf.h @@ -34,25 +34,6 @@ struct smbconf_service { char **param_values; }; - -/** - * intialization dispatcher function. - * takes source string in the form of "backend:path" - */ -WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, - const char *source); - -/** - * initialization functions for the available modules - */ - -WERROR smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, - const char *path); - -WERROR smbconf_init_txt(TALLOC_CTX *mem_ctx, - struct smbconf_ctx **conf_ctx, - const char *path); - /* * the smbconf API functions */ diff --git a/source3/lib/smbconf/smbconf_init.c b/source3/lib/smbconf/smbconf_init.c index a362a663af..f9352e8962 100644 --- a/source3/lib/smbconf/smbconf_init.c +++ b/source3/lib/smbconf/smbconf_init.c @@ -19,6 +19,8 @@ #include "includes.h" #include "smbconf_private.h" +#include "smbconf_txt.h" +#include "smbconf_reg.h" /** * smbconf initialization dispatcher diff --git a/source3/lib/smbconf/smbconf_init.h b/source3/lib/smbconf/smbconf_init.h new file mode 100644 index 0000000000..abd62df204 --- /dev/null +++ b/source3/lib/smbconf/smbconf_init.h @@ -0,0 +1,32 @@ +/* + * Unix SMB/CIFS implementation. + * libsmbconf - Samba configuration library + * Copyright (C) Michael Adam 2009 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __LIBSMBCONF_INIT_H__ +#define __LIBSMBCONF_INIT_H__ + +struct smbconf_ctx; + +/** + * intialization dispatcher function. + * takes source string in the form of "backend:path" + */ +WERROR smbconf_init(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, + const char *source); + +#endif /* _LIBSMBCONF_INIT_H_ */ diff --git a/source3/lib/smbconf/smbconf_reg.h b/source3/lib/smbconf/smbconf_reg.h new file mode 100644 index 0000000000..7f54b6e32d --- /dev/null +++ b/source3/lib/smbconf/smbconf_reg.h @@ -0,0 +1,33 @@ +/* + * Unix SMB/CIFS implementation. + * libsmbconf - Samba configuration library + * Copyright (C) Michael Adam 2009 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __LIBSMBCONF_REG_H__ +#define __LIBSMBCONF_REG_H__ + +struct smbconf_ctx; + +/** + * initialization functions for the registry backend modules + */ + +WERROR smbconf_init_reg(TALLOC_CTX *mem_ctx, struct smbconf_ctx **conf_ctx, + const char *path); + + +#endif /* _LIBSMBCONF_REG_H_ */ diff --git a/source3/lib/smbconf/smbconf_txt.h b/source3/lib/smbconf/smbconf_txt.h new file mode 100644 index 0000000000..688bbc9d48 --- /dev/null +++ b/source3/lib/smbconf/smbconf_txt.h @@ -0,0 +1,33 @@ +/* + * Unix SMB/CIFS implementation. + * libsmbconf - Samba configuration library + * Copyright (C) Michael Adam 2009 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef __LIBSMBCONF_TXT_H__ +#define __LIBSMBCONF_TXT_H__ + +struct smbconf_ctx; + +/** + * initialization functions for the text/file backend modules + */ + +WERROR smbconf_init_txt(TALLOC_CTX *mem_ctx, + struct smbconf_ctx **conf_ctx, + const char *path); + +#endif /* _LIBSMBCONF_TXT_H_ */ |