summaryrefslogtreecommitdiffstats
path: root/source/include
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-25 12:54:14 +0100
committerMichael Adam <obnox@samba.org>2008-03-25 15:55:34 +0100
commitedf4dbed27a3c63c04e8110e75cdb76e31627eb6 (patch)
treeb61bb4e4fdaffebe18cc52d3b8015444a99f9b06 /source/include
parentc967b62dd3c924419fa4a72aa2143d6bef959d18 (diff)
downloadsamba-edf4dbed27a3c63c04e8110e75cdb76e31627eb6.tar.gz
samba-edf4dbed27a3c63c04e8110e75cdb76e31627eb6.tar.xz
samba-edf4dbed27a3c63c04e8110e75cdb76e31627eb6.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
Diffstat (limited to 'source/include')
-rw-r--r--source/include/dbwrap.h21
-rw-r--r--source/include/util_tdb.h17
2 files changed, 38 insertions, 0 deletions
diff --git a/source/include/dbwrap.h b/source/include/dbwrap.h
index 5c824750d10..095719a01d3 100644
--- a/source/include/dbwrap.h
+++ b/source/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/source/include/util_tdb.h b/source/include/util_tdb.h
index a9708061669..81211aee08c 100644
--- a/source/include/util_tdb.h
+++ b/source/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__ */