r21745: indent
[Samba/ekacnet.git] / source4 / param / loadparm.h
blobd439a435e6b451694e41faf3600f2466fbcb1482
1 /*
2 Unix SMB/CIFS implementation.
4 type definitions for loadparm
6 Copyright (C) Karl Auer 1993-1998
8 Largely re-written by Andrew Tridgell, September 1994
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>
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.
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.
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.
31 /* the following are used by loadparm for option lists */
32 typedef enum {
33 P_BOOL,P_INTEGER,P_BYTES,P_LIST,P_STRING,P_USTRING,P_ENUM,P_SEP
34 } parm_type;
36 typedef enum {
37 P_LOCAL,P_GLOBAL,P_SEPARATOR,P_NONE
38 } parm_class;
40 struct enum_list {
41 int value;
42 const char *name;
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 unsigned int flags;
53 union {
54 int bvalue;
55 int ivalue;
56 char *svalue;
57 char cvalue;
58 const char **lvalue;
59 } def;
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 */
74 #ifndef PRINTERS_NAME
75 #define PRINTERS_NAME "printers"
76 #endif
78 #ifndef HOMES_NAME
79 #define HOMES_NAME "homes"
80 #endif