summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorUlf Lilleengen <lulf@carrot.studby.ntnu.no>2008-08-09 16:14:53 +0200
committerUlf Lilleengen <lulf@carrot.studby.ntnu.no>2008-08-09 16:14:53 +0200
commit64e1a2a9e5cc03d234fa4cf1a3577dcf84e5e22e (patch)
tree914f4fd2e17571a65b66a999331ec2c9be288aa3 /include
parentcfa01e2eded5e91a9272d1578e48540199c8b2d8 (diff)
- 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.
Diffstat (limited to 'include')
-rw-r--r--include/mp3fs.h16
1 files changed, 15 insertions, 1 deletions
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 *);