r20221: - move the dsdb_schema, dsdb_attribute, dsdb_class structs into
[kai/samba.git] / source4 / dsdb / schema / schema.h
1 /* 
2    Unix SMB/CIFS mplementation.
3    DSDB schema header
4    
5    Copyright (C) Stefan Metzmacher 2006
6     
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11    
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16    
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20    
21 */
22
23 #ifndef _DSDB_SCHEMA_H
24 #define _DSDB_SCHEMA_H
25
26 struct dsdb_attribute {
27         struct dsdb_attribute *prev, *next;
28
29         const char *cn;
30         const char *lDAPDisplayName;
31         const char *attributeID_oid;
32         uint32_t attributeID_id;
33         struct GUID schemaIDGUID;
34         uint32_t mAPIID;
35
36         struct GUID attributeSecurityGUID;
37
38         uint32_t searchFlags;
39         uint32_t systemFlags;
40         BOOL isMemberOfPartialAttributeSet;
41         uint32_t linkID;
42
43         const char *attributeSyntax_oid;
44         uint32_t attributeSyntax_id;
45         uint32_t oMSyntax;
46         struct ldb_val oMObjectClass;
47
48         BOOL isSingleValued;
49         uint32_t rangeLower;
50         uint32_t rangeUpper;
51         BOOL extendedCharsAllowed;
52
53         uint32_t schemaFlagsEx;
54         struct ldb_val msDs_Schema_Extensions;
55
56         BOOL showInAdvancedViewOnly;
57         const char *adminDisplayName;
58         const char *adminDescription;
59         const char *classDisplayName;
60         BOOL isEphemeral;
61         BOOL isDefunct;
62         BOOL systemOnly;
63 };
64
65 struct dsdb_class {
66         struct dsdb_class *prev, *next;
67
68         const char *cn;
69         const char *lDAPDisplayName;
70         const char *governsID_oid;
71         uint32_t governsID_id;
72         struct GUID schemaIDGUID;
73
74         uint32_t objectClassCategory;
75         const char *rDNAttID;
76         const char *defaultObjectCategory;
77
78         const char *subClassOf;
79
80         const char *systemAuxiliaryClass;
81         const char **systemPossSuperiors;
82         const char **systemMustContain;
83         const char **systemMayContain;
84
85         const char *auxiliaryClass;
86         const char **possSuperiors;
87         const char **mustContain;
88         const char **mayContain;
89
90         const char *defaultSecurityDescriptor;
91
92         uint32_t schemaFlagsEx;
93         struct ldb_val msDs_Schema_Extensions;
94
95         BOOL showInAdvancedViewOnly;
96         const char *adminDisplayName;
97         const char *adminDescription;
98         const char *classDisplayName;
99         BOOL defaultHidingValue;
100         BOOL isDefunct;
101         BOOL systemOnly;
102 };
103
104 struct dsdb_schema {
105         struct dsdb_attribute *attributes;
106         struct dsdb_class *classes;
107 };
108
109 #endif /* _DSDB_SCHEMA_H */