summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include/ldb_private.h
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-12-15 13:08:57 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:19 -0500
commitc69717755abeaf8bf93e76255d0912e3a24b7cb0 (patch)
tree979dfa0ee6680bd67b47661ae78965b52577a698 /source4/lib/ldb/include/ldb_private.h
parent1a1027b8244a2f41676b2bd5999015c769fb4fb4 (diff)
downloadsamba-c69717755abeaf8bf93e76255d0912e3a24b7cb0.tar.gz
samba-c69717755abeaf8bf93e76255d0912e3a24b7cb0.tar.bz2
samba-c69717755abeaf8bf93e76255d0912e3a24b7cb0.zip
r20184: change ldb_attrib_handler into ldb_schema_attribute, which has a pointer
to a ldb_schema_syntax struct. the default attribute handler is now registered dynamicly as "*" attribute, instead of having its own code path. ldb_schema_attribute's can be added to the ldb_schema given a ldb_schema_syntax struct or the syntax name we may also need to introduce a ldb_schema_matching_rule, and add a pointer to a default ldb_schema_matching_rule in the ldb_schema_syntax. metze (This used to be commit b97b8f5dcbce006f005e53ca79df3330e62f117b)
Diffstat (limited to 'source4/lib/ldb/include/ldb_private.h')
-rw-r--r--source4/lib/ldb/include/ldb_private.h23
1 files changed, 14 insertions, 9 deletions
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index 02fb370e16..81993efaef 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -79,8 +79,8 @@ typedef int (*ldb_connect_fn) (struct ldb_context *ldb, const char *url, unsigne
*/
struct ldb_schema {
/* attribute handling table */
- unsigned num_attrib_handlers;
- struct ldb_attrib_handler *attrib_handlers;
+ unsigned num_attributes;
+ struct ldb_schema_attribute *attributes;
/* objectclass information */
unsigned num_classes;
@@ -183,17 +183,22 @@ int ldb_match_msg(struct ldb_context *ldb,
struct ldb_dn *base,
enum ldb_scope scope);
-void ldb_remove_attrib_handler(struct ldb_context *ldb, const char *attrib);
const struct ldb_schema_syntax *ldb_standard_syntax_by_name(struct ldb_context *ldb,
const char *syntax);
-int ldb_set_attrib_handlers(struct ldb_context *ldb,
- const struct ldb_attrib_handler *handlers,
- unsigned num_handlers);
-int ldb_setup_wellknown_attributes(struct ldb_context *ldb);
-int ldb_set_attrib_handler_syntax(struct ldb_context *ldb,
- const char *attr, const char *syntax);
/* The following definitions come from lib/ldb/common/ldb_attributes.c */
+
+int ldb_schema_attribute_add_with_syntax(struct ldb_context *ldb,
+ const char *name,
+ unsigned flags,
+ const struct ldb_schema_syntax *syntax);
+int ldb_schema_attribute_add(struct ldb_context *ldb,
+ const char *name,
+ unsigned flags,
+ const char *syntax);
+void ldb_schema_attribute_remove(struct ldb_context *ldb, const char *name);
+int ldb_setup_wellknown_attributes(struct ldb_context *ldb);
+
const char **ldb_subclass_list(struct ldb_context *ldb, const char *classname);
void ldb_subclass_remove(struct ldb_context *ldb, const char *classname);
int ldb_subclass_add(struct ldb_context *ldb, const char *classname, const char *subclass);