- * This looks up a key in the database and returns it, or returns tdb_null
- * and sets tdb_error() if there's a problem (usually, TDB_ERR_NOEXIST).
- *
- * It is your responsibility to call free() on the returned structure's
- * dptr.
- */
-struct tdb_data tdb_fetch(struct tdb_context *tdb, struct tdb_data key);
-
-/**
- * enum TDB_ERROR - error codes for TDB
- *
- * See Also:
- * tdb_error(), tdb_errorstr()
- */
-enum TDB_ERROR {
- TDB_SUCCESS=0, /* No error. */
- TDB_ERR_CORRUPT, /* We read the db, and it was bogus. */
- TDB_ERR_IO, /* We couldn't read/write the db. */
- TDB_ERR_LOCK, /* Locking failed. */
- TDB_ERR_OOM, /* Out of Memory. */
- TDB_ERR_EXISTS, /* The key already exists. */
- TDB_ERR_NOEXIST, /* The key does not exist. */
- TDB_ERR_EINVAL, /* You're using it wrong. */
- TDB_ERR_RDONLY /* The database is read-only. */
-};
-
-/**
- * tdb_error - fetch the last error value from the tdb.
- * @tdb: the tdb context returned from tdb_open()