Fix spellings and file names
[Samba.git] / source4 / dsdb / samdb / ldb_modules / schema_syntax.h
blob37f7584d41722774912930b54a2bcdae89dd0054
1 /*
2 ldb database library
4 Copyright (C) Simo Sorce 2004-2006
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.
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.
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/>.
21 * Name: ldb
23 * Component: ldb schema module
25 * Description: add schema syntax functionality
27 * Author: Simo Sorce
31 /* Syntax-Table
33 see ldap_server/devdocs/AD-syntaxes.txt
36 enum schema_internal_syntax {
37 SCHEMA_AS_BOOLEAN = 1,
38 SCHEMA_AS_INTEGER = 2,
39 SCHEMA_AS_OCTET_STRING = 3,
40 SCHEMA_AS_SID = 4,
41 SCHEMA_AS_OID = 5,
42 SCHEMA_AS_ENUMERATION = 6,
43 SCHEMA_AS_NUMERIC_STRING = 7,
44 SCHEMA_AS_PRINTABLE_STRING = 8,
45 SCHEMA_AS_CASE_IGNORE_STRING = 9,
46 SCHEMA_AS_IA5_STRING = 10,
47 SCHEMA_AS_UTC_TIME = 11,
48 SCHEMA_AS_GENERALIZED_TIME = 12,
49 SCHEMA_AS_CASE_SENSITIVE_STRING = 13,
50 SCHEMA_AS_DIRECTORY_STRING = 14,
51 SCHEMA_AS_LARGE_INTEGER = 15,
52 SCHEMA_AS_OBJECT_SECURITY_DESCRIPTOR = 16,
53 SCHEMA_AS_DN = 17,
54 SCHEMA_AS_DN_BINARY = 18,
55 SCHEMA_AS_OR_NAME = 19,
56 SCHEMA_AS_REPLICA_LINK = 20,
57 SCHEMA_AS_PRESENTATION_ADDRESS = 21,
58 SCHEMA_AS_ACCESS_POINT = 22,
59 SCHEMA_AS_DN_STRING = 23
62 int map_schema_syntax(uint32_t om_syntax,
63 const char *attr_syntax,
64 const struct ldb_val *om_class,
65 enum schema_internal_syntax *syntax);
67 int schema_validate(struct ldb_context *ldb,
68 struct ldb_message_element *el,
69 enum schema_internal_syntax type,
70 bool single, int min, int max);