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, 4 Mar 2009 09:49:31 +0000 (10:49 +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

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

index c5dfa244b1dccafcf4312618b53cdcb9c7a1badb..d140552ebdda2a52f40975938b849ca66ddc5128 100644 (file)
@@ -724,6 +724,9 @@ typedef char fstring[FSTRING_LEN];
 #include "async_smb.h"
 
 #include "lib/smbconf/smbconf.h"
+#include "lib/smbconf/smbconf_init.h"
+#include "lib/smbconf/smbconf_reg.h"
+#include "lib/smbconf/smbconf_txt.h"
 
 /* used in net.c */
 struct functable {
index 699a62dae360b1b10e682e40e465a8f4c51acda3..517302ac883acf5cb54a6ca4664159adefdfc8ed 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/source/lib/smbconf/smbconf_init.h b/source/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/source/lib/smbconf/smbconf_reg.h b/source/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/source/lib/smbconf/smbconf_txt.h b/source/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_  */