diff options
author | Tim Potter <tpot@samba.org> | 2007-09-09 06:41:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:05:48 -0500 |
commit | 90b692de7d695f8deb9cd615883dfbd1b19c857e (patch) | |
tree | 57510e132059b2e953868facc4c6b187586d4743 | |
parent | d2f33d43804f102066afaf7cd6097fc4e38808d8 (diff) | |
download | samba-90b692de7d695f8deb9cd615883dfbd1b19c857e.tar.gz samba-90b692de7d695f8deb9cd615883dfbd1b19c857e.tar.bz2 samba-90b692de7d695f8deb9cd615883dfbd1b19c857e.zip |
r25045: Add constants for enum TDB_ERROR.
Remove some functions that I don't think should be in at the moment -
tdb_open_ex(), tdb_reopen{,_all} and locking functions. Locking
functions may come back at a later stage along with transaction support.
(This used to be commit 89740efc6795c25f222e45a8aa76dd80f0f2ae4e)
-rw-r--r-- | source4/lib/tdb/swig/tdb.i | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/source4/lib/tdb/swig/tdb.i b/source4/lib/tdb/swig/tdb.i index b72d8436a1..892a4de63f 100644 --- a/source4/lib/tdb/swig/tdb.i +++ b/source4/lib/tdb/swig/tdb.i @@ -102,7 +102,21 @@ typedef int mode_t; #define TDB_CONVERT 16 /* convert endian (internal use) */ #define TDB_BIGENDIAN 32 /* header is big-endian (internal use) */ -/* Throw an IOError exception if tdb_open() or tdb_open_ex() returns NULL */ +enum TDB_ERROR { + TDB_SUCCESS=0, + TDB_ERR_CORRUPT, + TDB_ERR_IO, + TDB_ERR_LOCK, + TDB_ERR_OOM, + TDB_ERR_EXISTS, + TDB_ERR_NOLOCK, + TDB_ERR_LOCK_TIMEOUT, + TDB_ERR_NOEXIST, + TDB_ERR_EINVAL, + TDB_ERR_RDONLY +}; + +/* Throw an IOError exception from errno if tdb_open() returns NULL */ %exception { $action @@ -115,17 +129,8 @@ typedef int mode_t; TDB_CONTEXT *tdb_open(const char *name, int hash_size, int tdb_flags, int open_flags, mode_t mode); -TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags, - int open_flags, mode_t mode, - tdb_log_func log_fn, - tdb_hash_func hash_fn); - %exception; -int tdb_reopen(TDB_CONTEXT *tdb); - -int tdb_reopen_all(int parent_longlived); - enum TDB_ERROR tdb_error(TDB_CONTEXT *tdb); const char *tdb_errorstr(TDB_CONTEXT *tdb); @@ -147,13 +152,3 @@ TDB_DATA tdb_nextkey(TDB_CONTEXT *tdb, TDB_DATA key); int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *state); int tdb_exists(TDB_CONTEXT *tdb, TDB_DATA key); - -int tdb_lockall(TDB_CONTEXT *tdb); - -void tdb_unlockall(TDB_CONTEXT *tdb); - -/* Low level locking functions: use with care */ - -int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key); - -int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key); |