diff options
author | Ulf Lilleengen <lulf@carrot.studby.ntnu.no> | 2008-08-09 14:41:29 +0200 |
---|---|---|
committer | Ulf Lilleengen <lulf@carrot.studby.ntnu.no> | 2008-08-09 14:41:29 +0200 |
commit | cfa01e2eded5e91a9272d1578e48540199c8b2d8 (patch) | |
tree | 5e6b63b4feb7f8e3604fcdf90d3d35b2ce33d712 /include/mp3fs.h | |
parent | e8793de12358e0f6f9239cd93cdf4e6f54a40702 (diff) |
- Rename list to lookup, and change it, so a generic lookup callback that
will be called with the retrieved data can be specified.
- Add filepath to the database schema.
Diffstat (limited to 'include/mp3fs.h')
-rw-r--r-- | include/mp3fs.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/mp3fs.h b/include/mp3fs.h index 46d4deb..aac7435 100644 --- a/include/mp3fs.h +++ b/include/mp3fs.h @@ -17,7 +17,7 @@ void traverse_hierarchy(char *, traverse_fn_t); traverse_fn_t mp3_scan; /* - * Data passed to mp3_list. + * Data passed to mp3_lookup. */ struct filler_data { void *buf; @@ -27,13 +27,17 @@ struct filler_data { #define LIST_DATATYPE_STRING 1 #define LIST_DATATYPE_INT 2 -struct listhandle; -struct listhandle *mp3_list_start(int, struct filler_data *, const char *); -void mp3_list_insert(struct listhandle *, void *, int); -void mp3_list_finish(struct listhandle *); +typedef void lookup_fn_t(void *, const char *); +lookup_fn_t mp3_lookup_list; +struct lookuphandle; -void mp3_list_artist(const char *, struct filler_data *); -void mp3_list_genre(const char *, struct filler_data *); +struct lookuphandle *mp3_lookup_start(int, void *, lookup_fn_t *, const char *); +void mp3_lookup_insert(struct lookuphandle *, void *, int); +void mp3_lookup_finish(struct lookuphandle *); + +void mp3_lookup_artist(const char *, struct filler_data *); +void mp3_lookup_genre(const char *, struct filler_data *); char *mp3_gettoken(const char *, int); int mp3_numtoken(const char *); + #endif |