s3:libsmbconf: remove the init headers from smbconf.h
authorMichael Adam <obnox@samba.org>
Wed, 21 Jan 2009 15:59:09 +0000 (16:59 +0100)
committerMichael Adam <obnox@samba.org>
Wed, 21 Jan 2009 17:40:54 +0000 (18:40 +0100)
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

source3/include/includes.h
source3/lib/smbconf/smbconf.h
source3/lib/smbconf/smbconf_init.c
source3/lib/smbconf/smbconf_init.h [new file with mode: 0644]
source3/lib/smbconf/smbconf_reg.h [new file with mode: 0644]
source3/lib/smbconf/smbconf_txt.h [new file with mode: 0644]

index 63b567d419d6e25f5aa2056f38d4b5d38153dd7f..9c7f15b9cbe4d076025fdaecfceb43c89cbf4573 100644 (file)
@@ -654,6 +654,9 @@ struct smb_iconv_convenience *lp_iconv_convenience(void *lp_ctx);
 #include "eventlog.h"
 
 #include "lib/smbconf/smbconf.h"
+#include "lib/smbconf/smbconf_init.h"
+#include "lib/smbconf/smbconf_reg.h"
+#include "lib/smbconf/smbconf_txt.h"
 
 /* Defines for wisXXX functions. */
 #define UNI_UPPER    0x1
index 9ff9a83fad281539b821f25c78d034c4852afd86..106fae6431d7f7ab65f4a0edd741888dc2a1e13f 100644 (file)
@@ -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
  */
index a362a663afd600ca4f7193c0ed6af7b4a850d43d..f9352e8962e79d7461e477283a1f5bd4fb998772 100644 (file)
@@ -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 (file)
index 0000000..abd62df
--- /dev/null
@@ -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 (file)
index 0000000..7f54b6e
--- /dev/null
@@ -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 (file)
index 0000000..688bbc9
--- /dev/null
@@ -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_  */