summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-02-20 02:57:07 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-02-20 02:57:07 +0100
commit995788536e5ba7b3a0e67e377a9769b279d0b8ae (patch)
tree06fb578a17c9bc81e7a0c53215853f1a4c81bde4 /source4/lib/ldb/include
parente3661a6181a7fbeffb02745adda509c01779d5ca (diff)
downloadsamba-995788536e5ba7b3a0e67e377a9769b279d0b8ae.tar.gz
samba-995788536e5ba7b3a0e67e377a9769b279d0b8ae.tar.bz2
samba-995788536e5ba7b3a0e67e377a9769b279d0b8ae.zip
Remove more function-based inits.
(This used to be commit b1a7810f3e70f9a831d9b8e85d531e448072adaf)
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r--source4/lib/ldb/include/ldb_private.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index d9f2defdc9..d2dcc675a5 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -41,6 +41,8 @@ struct ldb_context;
struct ldb_module_ops;
+struct ldb_backend_ops;
+
/* basic module structure */
struct ldb_module {
struct ldb_module *prev, *next;
@@ -70,9 +72,16 @@ struct ldb_module_ops {
int (*sequence_number)(struct ldb_module *, struct ldb_request *);
};
+
typedef int (*ldb_connect_fn) (struct ldb_context *ldb, const char *url, unsigned int flags, const char *options[],
struct ldb_module **module);
+
+struct ldb_backend_ops {
+ const char *name;
+ ldb_connect_fn connect_fn;
+};
+
const char *ldb_default_modules_dir(void);
/*
@@ -170,17 +179,23 @@ void ldb_debug_set(struct ldb_context *ldb, enum ldb_debug_level level,
/* The following definitions come from lib/ldb/common/ldb_ldif.c */
int ldb_should_b64_encode(const struct ldb_val *val);
-int ldb_objectclass_init(void);
-int ldb_operational_init(void);
-int ldb_paged_results_init(void);
-int ldb_rdn_name_init(void);
-int ldb_schema_init(void);
-int ldb_asq_init(void);
-int ldb_sort_init(void);
-int ldb_ldap_init(void);
-int ldb_ildap_init(void);
-int ldb_tdb_init(void);
-int ldb_sqlite3_init(void);
+extern const struct ldb_module_ops ldb_objectclass_module_ops;
+extern const struct ldb_module_ops ldb_operational_module_ops;
+extern const struct ldb_module_ops ldb_paged_results_module_ops;
+extern const struct ldb_module_ops ldb_rdn_name_module_ops;
+extern const struct ldb_module_ops ldb_schema_module_ops;
+extern const struct ldb_module_ops ldb_asq_module_ops;
+extern const struct ldb_module_ops ldb_sort_module_ops;
+extern const struct ldb_module_ops ldb_ldap_module_ops;
+extern const struct ldb_module_ops ldb_ildap_module_ops;
+extern const struct ldb_module_ops ldb_tdb_module_ops;
+extern const struct ldb_module_ops ldb_sqlite3_module_ops;
+
+extern const struct ldb_backend_ops ldb_tdb_backend_ops;
+extern const struct ldb_backend_ops ldb_sqlite3_backend_ops;
+extern const struct ldb_backend_ops ldb_ldap_backend_ops;
+extern const struct ldb_backend_ops ldb_ildap_backend_ops;
+extern const struct ldb_backend_ops ldb_ldaps_backend_ops;
int ldb_match_msg(struct ldb_context *ldb,
const struct ldb_message *msg,