summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include/ldb_private.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-21 14:51:13 +0200
commit5209a846a9157e649fcdcb561f7eaf19c8c0e465 (patch)
treeb0a7e52b5646c8eec182dbc391e7934b6804488c /source4/lib/ldb/include/ldb_private.h
parent625359b2e266105022309df8985720108ecd6f67 (diff)
parent2ee8d29d22bcb1c350ab59d71b0aee548489bc9c (diff)
downloadsamba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.gz
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.tar.bz2
samba-5209a846a9157e649fcdcb561f7eaf19c8c0e465.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba into regsrv
Conflicts: source4/lib/registry/ldb.c source4/rpc_server/winreg/rpc_winreg.c
Diffstat (limited to 'source4/lib/ldb/include/ldb_private.h')
-rw-r--r--source4/lib/ldb/include/ldb_private.h106
1 files changed, 69 insertions, 37 deletions
diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h
index e1026ab781..8f7e010bee 100644
--- a/source4/lib/ldb/include/ldb_private.h
+++ b/source4/lib/ldb/include/ldb_private.h
@@ -43,6 +43,12 @@ struct ldb_module_ops;
struct ldb_backend_ops;
+struct ldb_handle {
+ int status;
+ enum ldb_state state;
+ struct ldb_context *ldb;
+};
+
/* basic module structure */
struct ldb_module {
struct ldb_module *prev, *next;
@@ -51,9 +57,8 @@ struct ldb_module {
const struct ldb_module_ops *ops;
};
-/*
- these function pointers define the operations that a ldb module must perform
- they correspond exactly to the ldb_*() interface
+/*
+ these function pointers define the operations that a ldb module can intercept
*/
struct ldb_module_ops {
const char *name;
@@ -68,22 +73,10 @@ struct ldb_module_ops {
int (*start_transaction)(struct ldb_module *);
int (*end_transaction)(struct ldb_module *);
int (*del_transaction)(struct ldb_module *);
- int (*wait)(struct ldb_handle *, enum ldb_wait_type);
int (*sequence_number)(struct ldb_module *, struct ldb_request *);
+ void *private_data;
};
-
-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);
-
/*
schema related information needed for matching rules
*/
@@ -145,27 +138,6 @@ int ldb_connect_backend(struct ldb_context *ldb, const char *url, const char *op
struct ldb_module **backend_module);
void ldb_set_default_dns(struct ldb_context *ldb);
-/* The following definitions come from lib/ldb/common/ldb_modules.c */
-
-const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *string);
-int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, struct ldb_module *backend, struct ldb_module **out);
-int ldb_load_modules(struct ldb_context *ldb, const char *options[]);
-int ldb_init_module_chain(struct ldb_context *ldb, struct ldb_module *module);
-int ldb_next_request(struct ldb_module *module, struct ldb_request *request);
-int ldb_next_start_trans(struct ldb_module *module);
-int ldb_next_end_trans(struct ldb_module *module);
-int ldb_next_del_trans(struct ldb_module *module);
-int ldb_next_init(struct ldb_module *module);
-
-void ldb_set_errstring(struct ldb_context *ldb, const char *err_string);
-void ldb_asprintf_errstring(struct ldb_context *ldb, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
-void ldb_reset_err_string(struct ldb_context *ldb);
-
-int ldb_register_module(const struct ldb_module_ops *);
-int ldb_register_backend(const char *url_prefix, ldb_connect_fn);
-void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
- const char *symbol);
-
/* The following definitions come from lib/ldb/common/ldb_debug.c */
void ldb_debug(struct ldb_context *ldb, enum ldb_debug_level level, const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);
void ldb_debug_set(struct ldb_context *ldb, enum ldb_debug_level level,
@@ -239,6 +211,10 @@ char *ldb_casefold_default(void *context, void *mem_ctx, const char *s, size_t n
void ldb_msg_remove_element(struct ldb_message *msg, struct ldb_message_element *el);
+int ldb_msg_element_compare_name(struct ldb_message_element *el1,
+ struct ldb_message_element *el2);
+void ldb_dump_results(struct ldb_context *ldb, struct ldb_result *result, FILE *f);
+
/**
Obtain current/next database sequence number
*/
@@ -248,4 +224,60 @@ int ldb_sequence_number(struct ldb_context *ldb, enum ldb_sequence_type type, ui
#define LDB_SEQ_TIMESTAMP_SEQUENCE 0x02
+/* MODULES specific headers -- SSS */
+
+/* The following definitions come from lib/ldb/common/ldb_modules.c */
+
+const char **ldb_modules_list_from_string(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, const char *string);
+int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, struct ldb_module *backend, struct ldb_module **out);
+int ldb_load_modules(struct ldb_context *ldb, const char *options[]);
+int ldb_init_module_chain(struct ldb_context *ldb, struct ldb_module *module);
+int ldb_next_request(struct ldb_module *module, struct ldb_request *request);
+int ldb_next_start_trans(struct ldb_module *module);
+int ldb_next_end_trans(struct ldb_module *module);
+int ldb_next_del_trans(struct ldb_module *module);
+int ldb_next_init(struct ldb_module *module);
+
+void ldb_set_errstring(struct ldb_context *ldb, const char *err_string);
+void ldb_asprintf_errstring(struct ldb_context *ldb, const char *format, ...) PRINTF_ATTRIBUTE(2,3);
+void ldb_reset_err_string(struct ldb_context *ldb);
+
+const char *ldb_default_modules_dir(void);
+
+int ldb_register_module(const struct ldb_module_ops *);
+
+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);
+
+int ldb_register_backend(const char *url_prefix, ldb_connect_fn);
+
+void *ldb_dso_load_symbol(struct ldb_context *ldb, const char *name,
+ const char *symbol);
+
+struct ldb_handle *ldb_handle_new(TALLOC_CTX *mem_ctx, struct ldb_context *ldb);
+
+int ldb_module_send_entry(struct ldb_request *req,
+ struct ldb_message *msg);
+
+int ldb_module_send_referral(struct ldb_request *req,
+ char *ref);
+
+int ldb_module_done(struct ldb_request *req,
+ struct ldb_control **ctrls,
+ struct ldb_extended *response,
+ int error);
+
+int ldb_mod_register_control(struct ldb_module *module, const char *oid);
+
+
+struct ldb_val ldb_binary_decode(void *mem_ctx, const char *str);
+
#endif