# HG changeset patch # User mas01cr # Date 1248191844 0 # Node ID 361f3bda6694ebcb9383de4b75cfa790f7c2418b # Parent 633614461994b97b00b85bfb40cc69e0785710fb Add retrieve.cpp, missing from previous commit. It's been a while since I've done that. diff -r 633614461994 -r 361f3bda6694 retrieve.cpp --- /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); +}