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 3 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, see <http://www.gnu.org/licenses/>.
28*/
29
30/* the following are used by loadparm for option lists */
31typedef enum {
32	P_BOOL,P_INTEGER,P_OCTAL,P_BYTES,P_LIST,P_STRING,P_USTRING,P_ENUM
33} parm_type;
34
35typedef enum {
36	P_LOCAL,P_GLOBAL,P_NONE
37} parm_class;
38
39struct enum_list {
40	int value;
41	const char *name;
42};
43
44struct loadparm_context;
45
46struct parm_struct {
47	const char *label;
48	parm_type type;
49	parm_class pclass;
50	int offset;
51	bool (*special)(struct loadparm_context *, const char *, char **);
52	const struct enum_list *enum_list;
53	union {
54		int bvalue;
55		int ivalue;
56		char *svalue;
57		char cvalue;
58		const char **lvalue;
59	} def;
60};
61
62#define FLAG_DEFAULT    0x0001 /* this option was a default */
63#define FLAG_CMDLINE    0x0002 /* this option was set from the command line */
64
65#ifndef PRINTERS_NAME
66#define PRINTERS_NAME "printers"
67#endif
68
69#ifndef HOMES_NAME
70#define HOMES_NAME "homes"
71#endif
72
73/* This defines the section name in the configuration file that will contain */
74/* global parameters - that is, parameters relating to the whole server, not */
75/* just services. This name is then reserved, and may not be used as a       */
76/* a service name. It will default to "global" if not defined here.          */
77#ifndef GLOBAL_NAME
78#define GLOBAL_NAME "global"
79#define GLOBAL_NAME2 "globals"
80#endif
81
82/* The default workgroup - usually overridden in smb.conf */
83#ifndef DEFAULT_WORKGROUP
84#define DEFAULT_WORKGROUP "WORKGROUP"
85#endif
86
87/*
88 * Default passwd chat script.
89 */
90#ifndef DEFAULT_PASSWD_CHAT
91#define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
92#endif
93
94/* Max number of jobs per print queue. */
95#ifndef PRINT_MAX_JOBID
96#define PRINT_MAX_JOBID 10000
97#endif
98
99
100