summaryrefslogtreecommitdiff
path: root/file.h
diff options
context:
space:
mode:
Diffstat (limited to 'file.h')
-rw-r--r--file.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/file.h b/file.h
index 27b8a19..f6dd5f7 100644
--- a/file.h
+++ b/file.h
@@ -35,23 +35,19 @@
#include <stdbool.h>
-enum file_type {
- AUDIO,
- VIDEO,
- TEXT,
- OTHER
-};
+#include "mime.h"
/*
* a file
*/
struct file {
- char *path; /* relative to DATA_DIR */
- char *name;
- char *action_url; /* action URL for HTML page */
- bool is_dir;
- enum file_type type;
SLIST_ENTRY(file) files;
+ size_t size;
+ enum mime mime;
+ char *path; /* relative to DATA_DIR */
+ char *name;
+ char *action_url; /* action URL for HTML page */
+ bool is_dir;
};
/*
@@ -65,6 +61,6 @@ file_free(struct file *);
* Build a new file
*/
struct file *
-file_new(char *dir, size_t dir_len, char *name, size_t name_len);
+file_new(char *, size_t, char *, size_t);
#endif /* FILE_H */