summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorlulf@carrot.studby.ntnu.no <lulf@carrot.studby.ntnu.no>2008-04-29 15:40:05 +0200
committerlulf@carrot.studby.ntnu.no <lulf@carrot.studby.ntnu.no>2008-04-29 15:40:05 +0200
commit5bdbe39c6e2af7b85482e0003ad52a4bc5a74212 (patch)
tree8344747258b40e7567265ecbc845a198fbd65362 /include
parent3a5ef70e5d22148a221d89b24df09d2c60f8d0f5 (diff)
- Implement query system to select data from data structures.
Diffstat (limited to 'include')
-rw-r--r--include/mnode.h7
-rw-r--r--include/mp3fs.h22
2 files changed, 21 insertions, 8 deletions
diff --git a/include/mnode.h b/include/mnode.h
index d84c0ad..891ad3d 100644
--- a/include/mnode.h
+++ b/include/mnode.h
@@ -6,6 +6,11 @@ struct mnode {
char *path;
TagLib_File *tag;
/* Entry in search structure. */
- LIST_ENTRY(mnode) next;
+ LIST_ENTRY(mnode) coll_next;
+ LIST_ENTRY(mnode) sel_next;
+};
+
+struct collection {
+ LIST_HEAD(, mnode) head;
};
#endif
diff --git a/include/mp3fs.h b/include/mp3fs.h
index 4313cd1..5d17726 100644
--- a/include/mp3fs.h
+++ b/include/mp3fs.h
@@ -1,10 +1,11 @@
#ifndef _MP3FS_H_
#define _MP3FS_H_
struct fuse_args;
-int mp3_run(int, char **);
-void mp3_initscan(void);
-
+struct collection;
+struct mnode;
+int mp3_run(int, char **);
+struct collection *mp3_initscan(void);
/*
* Data passed to traverse function pointers.'
*/
@@ -12,10 +13,17 @@ struct filler_data {
void *buf;
fuse_fill_dir_t filler;
};
-/* Traverse files used in mp3_subr.c */
-typedef void traverse_fn_t(char *, void *);
-void traverse_hierarchy(char *, traverse_fn_t, void *);
-traverse_fn_t mp3_artist;
+/*
+ * Functions traversing the underlying filesystem and do operations on the
+ * files, for instance scanning the collection.
+ */
+typedef void traverse_fn_t(char *, struct collection *);
+void traverse_hierarchy(char *, traverse_fn_t, struct collection *);
traverse_fn_t mp3_scan;
+
+/*
+ * Functions performing queries on the collection.
+ */
+struct collection *mp3_select(char *, char *, char *);
#endif