#ifndef _MP3FS_H_ #define _MP3FS_H_ struct fuse_args; #define DBNAME "/home/lulf/dev/mp3fs/music.db" int mp3_run(int, char **); int mp3_initscan(char *); /* * Functions traversing the underlying filesystem and do operations on the * files, for instance scanning the collection. */ typedef void traverse_fn_t(char *); void traverse_hierarchy(char *, traverse_fn_t); traverse_fn_t mp3_scan; /* * Data passed to mp3_lookup. */ struct filler_data { void *buf; fuse_fill_dir_t filler; }; #define LIST_DATATYPE_STRING 1 #define LIST_DATATYPE_INT 2 typedef void lookup_fn_t(void *, const char *); lookup_fn_t mp3_lookup_list; struct lookuphandle; 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