diff options
Diffstat (limited to 'source4/lib/ldb/include')
-rw-r--r-- | source4/lib/ldb/include/ldb.h | 14 | ||||
-rw-r--r-- | source4/lib/ldb/include/ldb_private.h | 4 |
2 files changed, 15 insertions, 3 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); diff --git a/source4/lib/ldb/include/ldb_private.h b/source4/lib/ldb/include/ldb_private.h index 14f0403697..6d017d5cc1 100644 --- a/source4/lib/ldb/include/ldb_private.h +++ b/source4/lib/ldb/include/ldb_private.h @@ -67,9 +67,11 @@ struct ldb_module_ops { int (*end_transaction)(struct ldb_module *); int (*del_transaction)(struct ldb_module *); int (*async_wait)(struct ldb_async_handle *, enum ldb_async_wait_type); + 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[]); +typedef int (*ldb_connect_fn) (struct ldb_context *ldb, const char *url, unsigned int flags, const char *options[], + struct ldb_module **module); /* schema related information needed for matching rules |