From 64e1a2a9e5cc03d234fa4cf1a3577dcf84e5e22e Mon Sep 17 00:00:00 2001 From: Ulf Lilleengen Date: Sat, 9 Aug 2008 16:14:53 +0200 Subject: - Add support for reading a file in /Tracks directory. - Make use of the generic lookup framework to create functions which open and stat files. - Make getattr a bit generic and use the lookup stuff. --- include/mp3fs.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mp3fs.h b/include/mp3fs.h index aac7435..4966aee 100644 --- a/include/mp3fs.h +++ b/include/mp3fs.h @@ -17,18 +17,32 @@ void traverse_hierarchy(char *, traverse_fn_t); traverse_fn_t mp3_scan; /* - * Data passed to mp3_lookup. + * Data passed to mp3_lookup_list */ struct filler_data { void *buf; fuse_fill_dir_t filler; }; +/* + * Data passed to mp3_lookup_open + */ +struct file_data { + int fd; + int found; +}; + #define LIST_DATATYPE_STRING 1 #define LIST_DATATYPE_INT 2 typedef void lookup_fn_t(void *, const char *); +/* Lookup function listing each row. */ lookup_fn_t mp3_lookup_list; +/* Lookup function opening the first file match. */ +lookup_fn_t mp3_lookup_open; +/* Lookup function stat'ing a file. */ +lookup_fn_t mp3_lookup_stat; + struct lookuphandle; struct lookuphandle *mp3_lookup_start(int, void *, lookup_fn_t *, const char *); -- cgit v1.2.3