summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/include/ldb.h
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-06-07 21:03:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:57 -0500
commit247af0d569594512a24e83156e257b8d4d356883 (patch)
tree01cc382ba950b92059d8dd3686016333caf043b1 /source4/lib/ldb/include/ldb.h
parent2ab5bafd7296e4c2a415a4fcbe8a2ba7b4373699 (diff)
downloadsamba-247af0d569594512a24e83156e257b8d4d356883.tar.gz
samba-247af0d569594512a24e83156e257b8d4d356883.tar.bz2
samba-247af0d569594512a24e83156e257b8d4d356883.zip
r16083: Make it possible to initialise a backend module, without it setting up
the whole ldb structure. Because the sequence number was a fn pointer on the main ldb context, turn it into a full request (currently sync). Andrew Bartlett (This used to be commit fbe7d0ca9031e292b2d2fae263233c973982980a)
Diffstat (limited to 'source4/lib/ldb/include/ldb.h')
-rw-r--r--source4/lib/ldb/include/ldb.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index 644f74385f..033a9c1f39 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -567,8 +567,8 @@ enum ldb_request_type {
LDB_MODIFY,
LDB_DELETE,
LDB_RENAME,
-
- LDB_REQ_REGISTER
+ LDB_REQ_REGISTER,
+ LDB_SEQUENCE_NUMBER
};
enum ldb_reply_type {
@@ -638,6 +638,10 @@ struct ldb_register_control {
const char *oid;
};
+struct ldb_sequence_number {
+ uint64_t seq_num;
+};
+
struct ldb_request {
enum ldb_request_type operation;
@@ -649,6 +653,7 @@ struct ldb_request {
struct ldb_delete del;
struct ldb_rename rename;
struct ldb_register_control reg;
+ struct ldb_sequence_number seq_num;
} op;
struct ldb_control **controls;
@@ -811,6 +816,11 @@ int ldb_rename(struct ldb_context *ldb, const struct ldb_dn *olddn, const struct
int ldb_delete(struct ldb_context *ldb, const struct ldb_dn *dn);
/**
+ Obtain current database sequence number
+*/
+int ldb_sequence_number(struct ldb_context *ldb, uint64_t *seq_num);
+
+/**
start a transaction
*/
int ldb_transaction_start(struct ldb_context *ldb);