summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include/ldb.h
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/ldb/include/ldb.h')
-rw-r--r--source4/lib/ldb/include/ldb.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 28c54f5a3c..6990397a74 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -46,18 +46,18 @@
#define _LDB_H_ 1
/*! \endcond */
+#include "ldb_includes.h"
+
/*
major restrictions as compared to normal LDAP:
- - no async calls.
- each record must have a unique key field
- the key must be representable as a NULL terminated C string and may not
contain a comma or braces
major restrictions as compared to tdb:
- - no explicit locking calls
- UPDATE: we have transactions now, better than locking --SSS.
+ - no explicit locking calls, but we have transactions when using ldb_tdb
*/
@@ -695,6 +695,9 @@ enum ldb_sequence_type {
LDB_SEQ_NEXT
};
+#define LDB_SEQ_GLOBAL_SEQUENCE 0x01
+#define LDB_SEQ_TIMESTAMP_SEQUENCE 0x02
+
struct ldb_seqnum_request {
enum ldb_sequence_type type;
};
@@ -1233,6 +1236,11 @@ int ldb_extended(struct ldb_context *ldb,
struct ldb_result **res);
/**
+ Obtain current/next database sequence number
+*/
+int ldb_sequence_number(struct ldb_context *ldb, enum ldb_sequence_type type, uint64_t *seq_num);
+
+/**
start a transaction
*/
int ldb_transaction_start(struct ldb_context *ldb);
@@ -1633,6 +1641,8 @@ int ldb_msg_add_fmt(struct ldb_message *msg,
*/
int ldb_msg_element_compare(struct ldb_message_element *el1,
struct ldb_message_element *el2);
+int ldb_msg_element_compare_name(struct ldb_message_element *el1,
+ struct ldb_message_element *el2);
/**
Find elements in a message.
@@ -1746,14 +1756,16 @@ const char **ldb_attr_list_copy(TALLOC_CTX *mem_ctx, const char * const *attrs);
const char **ldb_attr_list_copy_add(TALLOC_CTX *mem_ctx, const char * const *attrs, const char *new_attr);
int ldb_attr_in_list(const char * const *attrs, const char *attr);
+int ldb_msg_rename_attr(struct ldb_message *msg, const char *attr, const char *replace);
+int ldb_msg_copy_attr(struct ldb_message *msg, const char *attr, const char *replace);
+void ldb_msg_remove_attr(struct ldb_message *msg, const char *attr);
+void ldb_msg_remove_element(struct ldb_message *msg, struct ldb_message_element *el);
+
void ldb_parse_tree_attr_replace(struct ldb_parse_tree *tree,
const char *attr,
const char *replace);
-int ldb_msg_rename_attr(struct ldb_message *msg, const char *attr, const char *replace);
-int ldb_msg_copy_attr(struct ldb_message *msg, const char *attr, const char *replace);
-void ldb_msg_remove_attr(struct ldb_message *msg, const char *attr);
/**
Convert a time structure to a string