mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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
This commit is contained in:
parent
52b77c928c
commit
9f3c67e80c
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -19,6 +19,8 @@
|
||||
|
||||
#include "includes.h"
|
||||
#include "smbconf_private.h"
|
||||
#include "smbconf_txt.h"
|
||||
#include "smbconf_reg.h"
|
||||
|
||||
/**
|
||||
* smbconf initialization dispatcher
|
||||
|
32
source3/lib/smbconf/smbconf_init.h
Normal file
32
source3/lib/smbconf/smbconf_init.h
Normal file
@ -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_ */
|
33
source3/lib/smbconf/smbconf_reg.h
Normal file
33
source3/lib/smbconf/smbconf_reg.h
Normal file
@ -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_ */
|
33
source3/lib/smbconf/smbconf_txt.h
Normal file
33
source3/lib/smbconf/smbconf_txt.h
Normal file
@ -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_ */
|
Loading…
Reference in New Issue
Block a user