Mercurial > hg > audiodb
changeset 581:361f3bda6694
Add retrieve.cpp, missing from previous commit.
It's been a while since I've done that.
author | mas01cr |
---|---|
date | Tue, 21 Jul 2009 15:57:24 +0000 |
parents | 633614461994 |
children | 29f3289bb183 |
files | retrieve.cpp |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/retrieve.cpp Tue Jul 21 15:57:24 2009 +0000 @@ -0,0 +1,17 @@ +extern "C" { +#include "audioDB_API.h" +} +#include "audioDB-internals.h" + +int audiodb_retrieve_datum(adb_t *adb, const char *key, adb_datum_t *datum) { + uint32_t index = audiodb_key_index(adb, key); + if(index == (uint32_t) -1) { + return 1; + } else { + return audiodb_track_id_datum(adb, index, datum); + } +} + +int audiodb_free_datum(adb_t *adb, adb_datum_t *datum) { + return audiodb_really_free_datum(datum); +}