r13903: Don't generate prototypes for modules and binaries in include/proto.h by
[jelmer/samba4-debian.git] / source / param / loadparm.h
1 /* 
2    Unix SMB/CIFS implementation.
3    
4    type definitions for loadparm
5
6    Copyright (C) Karl Auer 1993-1998
7
8    Largely re-written by Andrew Tridgell, September 1994
9
10    Copyright (C) Simo Sorce 2001
11    Copyright (C) Alexander Bokovoy 2002
12    Copyright (C) Stefan (metze) Metzmacher 2002
13    Copyright (C) Jim McDonough (jmcd@us.ibm.com)  2003.
14    Copyright (C) James Myers 2003 <myersjj@samba.org>
15    
16    This program is free software; you can redistribute it and/or modify
17    it under the terms of the GNU General Public License as published by
18    the Free Software Foundation; either version 2 of the License, or
19    (at your option) any later version.
20    
21    This program is distributed in the hope that it will be useful,
22    but WITHOUT ANY WARRANTY; without even the implied warranty of
23    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24    GNU General Public License for more details.
25    
26    You should have received a copy of the GNU General Public License
27    along with this program; if not, write to the Free Software
28    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 */
30
31 /* the following are used by loadparm for option lists */
32 typedef enum {
33         P_BOOL,P_INTEGER,P_LIST,P_STRING,P_USTRING,P_ENUM,P_SEP
34 } parm_type;
35
36 typedef enum {
37         P_LOCAL,P_GLOBAL,P_SEPARATOR,P_NONE
38 } parm_class;
39
40 struct enum_list {
41         int value;
42         const char *name;
43 };
44
45 struct parm_struct {
46         const char *label;
47         parm_type type;
48         parm_class class;
49         void *ptr;
50         BOOL (*special)(const char *, char **);
51         const struct enum_list *enum_list;
52         uint_t flags;
53         union {
54                 BOOL bvalue;
55                 int ivalue;
56                 char *svalue;
57                 char cvalue;
58                 const char **lvalue;
59         } def;
60 };
61
62 #define FLAG_BASIC      0x0001 /* fundamental options */
63 #define FLAG_SHARE      0x0002 /* file sharing options */
64 #define FLAG_PRINT      0x0004 /* printing options */
65 #define FLAG_GLOBAL     0x0008 /* local options that should be globally settable in SWAT */
66 #define FLAG_WIZARD     0x0010 /* Parameters that the wizard will operate on */
67 #define FLAG_ADVANCED   0x0020 /* Parameters that the wizard will operate on */
68 #define FLAG_DEVELOPER  0x0040 /* Parameters that the wizard will operate on */
69 #define FLAG_DEPRECATED 0x1000 /* options that should no longer be used */
70 #define FLAG_HIDE       0x2000 /* options that should be hidden in SWAT */
71 #define FLAG_DEFAULT    0x4000 /* this option was a default */
72 #define FLAG_CMDLINE    0x8000 /* this option was set from the command line */
73
74 #ifndef PRINTERS_NAME
75 #define PRINTERS_NAME "printers"
76 #endif
77
78 #ifndef HOMES_NAME
79 #define HOMES_NAME "homes"
80 #endif
81