1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

s3:dbwrap: add get-functions for db_record key, value and private_data

This commit is contained in:
Michael Adam 2011-08-19 10:50:20 +02:00
parent 3ed2fb4a87
commit bfed62c169
2 changed files with 19 additions and 0 deletions

View File

@ -98,6 +98,21 @@ int dbwrap_fallback_wipe(struct db_context *db)
* Wrapper functions for the backend methods
*/
TDB_DATA dbwrap_record_get_key(const struct db_record *rec)
{
return rec->key;
}
TDB_DATA dbwrap_record_get_value(const struct db_record *rec)
{
return rec->value;
}
void *dbwrap_record_get_private_data(const struct db_record *rec)
{
return rec->private_data;
}
TDB_DATA dbwrap_fetch(struct db_context *db, TALLOC_CTX *mem_ctx,
TDB_DATA key)
{

View File

@ -60,6 +60,10 @@ struct db_context {
/* The following definitions come from lib/dbwrap.c */
TDB_DATA dbwrap_record_get_key(const struct db_record *rec);
TDB_DATA dbwrap_record_get_value(const struct db_record *rec);
void *dbwrap_record_get_private_data(const struct db_record *rec);
NTSTATUS dbwrap_delete(struct db_context *db, TDB_DATA key);
NTSTATUS dbwrap_store(struct db_context *db, TDB_DATA key,
TDB_DATA data, int flags);