diff options
author | Michael Adam <obnox@samba.org> | 2011-08-24 14:53:42 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2011-10-11 14:17:58 +0200 |
commit | 8750e3f22c9b62840fd7e90eb99b95204542a592 (patch) | |
tree | 7711f48872662f87e56bd6558130a306fd36e939 /source3/lib/dbwrap/dbwrap.h | |
parent | 6fb5c47f21a4b0d5998de37d13b3cab61afd5bac (diff) | |
download | samba-8750e3f22c9b62840fd7e90eb99b95204542a592.tar.gz samba-8750e3f22c9b62840fd7e90eb99b95204542a592.tar.bz2 samba-8750e3f22c9b62840fd7e90eb99b95204542a592.zip |
s3:dbwrap: move definitions of db_record and db_contect structs to dbwrap_private.h
The API and callers now only need the forward declarations.
Diffstat (limited to 'source3/lib/dbwrap/dbwrap.h')
-rw-r--r-- | source3/lib/dbwrap/dbwrap.h | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/source3/lib/dbwrap/dbwrap.h b/source3/lib/dbwrap/dbwrap.h index b5fc018158..13565f8b33 100644 --- a/source3/lib/dbwrap/dbwrap.h +++ b/source3/lib/dbwrap/dbwrap.h @@ -22,41 +22,8 @@ #include "tdb_compat.h" -struct db_record { - TDB_DATA key, value; - NTSTATUS (*store)(struct db_record *rec, TDB_DATA data, int flag); - NTSTATUS (*delete_rec)(struct db_record *rec); - void *private_data; -}; - -struct db_context { - struct db_record *(*fetch_locked)(struct db_context *db, - TALLOC_CTX *mem_ctx, - TDB_DATA key); - int (*fetch)(struct db_context *db, TALLOC_CTX *mem_ctx, - TDB_DATA key, TDB_DATA *data); - int (*traverse)(struct db_context *db, - int (*f)(struct db_record *rec, - void *private_data), - void *private_data); - int (*traverse_read)(struct db_context *db, - int (*f)(struct db_record *rec, - void *private_data), - void *private_data); - int (*get_seqnum)(struct db_context *db); - int (*get_flags)(struct db_context *db); - int (*transaction_start)(struct db_context *db); - int (*transaction_commit)(struct db_context *db); - int (*transaction_cancel)(struct db_context *db); - int (*parse_record)(struct db_context *db, TDB_DATA key, - int (*parser)(TDB_DATA key, TDB_DATA data, - void *private_data), - void *private_data); - int (*exists)(struct db_context *db,TDB_DATA key); - int (*wipe)(struct db_context *db); - void *private_data; - bool persistent; -}; +struct db_record; +struct db_context; /* The following definitions come from lib/dbwrap.c */ |