r25460: use common structure in param/generic.c
[kai/samba.git] / source4 / param / param.h
1 /* 
2    Unix SMB/CIFS implementation.
3    Generic parameter parsing interface
4    Copyright (C) Jelmer Vernooij                                          2005
5    
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.
10    
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.
15    
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/>.
18 */
19
20 #ifndef _PARAM_H /* _PARAM_H */
21 #define _PARAM_H 
22
23 struct param_opt {
24         struct param_opt *prev, *next;
25         char *key;
26         char *value;
27         int flags;
28 };
29
30 struct param_context {
31         struct param_section *sections;
32 };
33
34 struct param_section {
35         const char *name;
36         struct param_section *prev, *next;
37         struct param_opt *parameters;
38 };
39
40 struct param_context;
41 struct smbsrv_connection;
42
43 #define Auto (2)
44
45 typedef NTSTATUS (*init_module_fn) (void);
46
47 enum server_role {
48         ROLE_STANDALONE=0,
49         ROLE_DOMAIN_MEMBER=1,
50         ROLE_DOMAIN_CONTROLLER=2,
51 };
52
53 enum announce_as {/* Types of machine we can announce as. */
54         ANNOUNCE_AS_NT_SERVER=1,
55         ANNOUNCE_AS_WIN95=2,
56         ANNOUNCE_AS_WFW=3,
57         ANNOUNCE_AS_NT_WORKSTATION=4
58 };
59
60 struct loadparm_context;
61 struct loadparm_service;
62
63 #include "param/proto.h"
64
65 extern struct loadparm_context *global_loadparm;
66
67 #endif /* _PARAM_H */