diff audioDB_API.h @ 441:1a1ea05a94ce api-inversion

clarify audiodb_insert() write audiodb_insert() (essentially to support the command-line client audioDB::insert operation) in terms of audiodb_insert_datum() and a new audiodb_insert_reference() function. These two functions each do exactly one thing and return failure if they're working on the wrong kind of database.
author mas01cr
date Wed, 24 Dec 2008 10:56:25 +0000
parents 53c487885b2c
children 16a903968d18
line wrap: on
line diff
--- a/audioDB_API.h	Wed Dec 24 10:56:22 2008 +0000
+++ b/audioDB_API.h	Wed Dec 24 10:56:25 2008 +0000
@@ -42,7 +42,7 @@
   const char *key;
   const char *times;
 };
-typedef struct adbinsert adb_insert_t, *adb_insert_ptr;
+typedef struct adbinsert adb_insert_t, adb_reference_t, *adb_insert_ptr;
 
 /* struct for returning status results */
 struct adbstatus {
@@ -175,6 +175,7 @@
 
 /* insert functions */
 int audiodb_insert_datum(adb_t *, adb_datum_t *);
+int audiodb_insert_reference(adb_t *, adb_reference_t *);
 int audiodb_insert(adb_ptr mydb, adb_insert_ptr ins);
 int audiodb_batchinsert(adb_ptr mydb, adb_insert_ptr ins, unsigned int size);