diff options
author | Michael Adam <obnox@samba.org> | 2008-03-25 12:54:14 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-03-25 15:55:34 +0100 |
commit | 32691a702217d3849c60453730387e3dd0f0ca2b (patch) | |
tree | fef18bb51427ec5a47875b8c435296cf55dbc9ad /source3/include | |
parent | dec89a93229b14563b1c768097271169616eeae2 (diff) | |
download | samba-32691a702217d3849c60453730387e3dd0f0ca2b.tar.gz samba-32691a702217d3849c60453730387e3dd0f0ca2b.tar.bz2 samba-32691a702217d3849c60453730387e3dd0f0ca2b.zip |
build: don't autogenerate prototypes for util_tdb and dbwrap anymore.
Stick to hand-written headers (that are there anyways).
Add some missing prototypes to util_tdb.h and dbwrap.h.
I did not bother to add a header for each single dbwrap backend
open function but put the prototypes for the open functions into
the central dbwrap.h.
Michael
(This used to be commit edf4dbed27a3c63c04e8110e75cdb76e31627eb6)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/dbwrap.h | 21 | ||||
-rw-r--r-- | source3/include/util_tdb.h | 17 |
2 files changed, 38 insertions, 0 deletions
diff --git a/source3/include/dbwrap.h b/source3/include/dbwrap.h index 5c824750d1..095719a01d 100644 --- a/source3/include/dbwrap.h +++ b/source3/include/dbwrap.h @@ -54,6 +54,27 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx, int hash_size, int tdb_flags, int open_flags, mode_t mode); +struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx); + +struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx, + const char *name, + int hash_size, int tdb_flags, + int open_flags, mode_t mode); + +#ifdef CLUSTER_SUPPORT +struct db_context *db_open_ctdb(TALLOC_CTX *mem_ctx, + const char *name, + int hash_size, int tdb_flags, + int open_flags, mode_t mode); +#endif + +struct db_context *db_open_file(TALLOC_CTX *mem_ctx, + struct messaging_context *msg_ctx, + const char *name, + int hash_size, int tdb_flags, + int open_flags, mode_t mode); + + NTSTATUS dbwrap_delete_bystring(struct db_context *db, const char *key); NTSTATUS dbwrap_store_bystring(struct db_context *db, const char *key, TDB_DATA data, int flags); diff --git a/source3/include/util_tdb.h b/source3/include/util_tdb.h index a970806166..81211aee08 100644 --- a/source3/include/util_tdb.h +++ b/source3/include/util_tdb.h @@ -22,6 +22,9 @@ #include "tdb.h" +#include "talloc.h" /* for tdb_wrap_open() */ +#include "nt_status.h" /* for map_nt_error_from_tdb() */ + /* single node of a list returned by tdb_search_keys */ typedef struct keys_node { @@ -62,6 +65,8 @@ bool tdb_fetch_uint32(struct tdb_context *tdb, const char *keystr, uint32 *value int tdb_traverse_delete_fn(struct tdb_context *the_tdb, TDB_DATA key, TDB_DATA dbuf, void *state); int tdb_store_bystring(struct tdb_context *tdb, const char *keystr, TDB_DATA data, int flags); +int tdb_trans_store_bystring(TDB_CONTEXT *tdb, const char *keystr, + TDB_DATA data, int flags); TDB_DATA tdb_fetch_bystring(struct tdb_context *tdb, const char *keystr); int tdb_delete_bystring(struct tdb_context *tdb, const char *keystr); struct tdb_context *tdb_open_log(const char *name, int hash_size, @@ -73,9 +78,21 @@ TDB_DATA string_tdb_data(const char *string); TDB_DATA string_term_tdb_data(const char *string); int tdb_trans_store(struct tdb_context *tdb, TDB_DATA key, TDB_DATA dbuf, int flag); +int tdb_trans_delete(struct tdb_context *tdb, TDB_DATA key); bool tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32 *oldval, uint32 change_val); int tdb_chainlock_with_timeout( TDB_CONTEXT *tdb, TDB_DATA key, unsigned int timeout); +struct tdb_wrap *tdb_wrap_open(TALLOC_CTX *mem_ctx, + const char *name, int hash_size, int tdb_flags, + int open_flags, mode_t mode); +NTSTATUS map_nt_error_from_tdb(enum TDB_ERROR err); + +int tdb_validate(struct tdb_context *tdb, tdb_validate_data_func validate_fn); +int tdb_validate_open(const char *tdb_path, tdb_validate_data_func validate_fn); +int tdb_validate_and_backup(const char *tdb_path, + tdb_validate_data_func validate_fn); + + #endif /* __TDBUTIL_H__ */ |