summaryrefslogtreecommitdiff
path: root/file.h
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2024-01-23 09:22:00 +0100
committerVincent Douillet <vincent@vdouillet.fr>2024-02-08 09:27:54 +0100
commit42f538cc66546997a166dbe67e489c9afabbb908 (patch)
tree718bb6b7161892c4b964499c1818c6d7bf0bd6a6 /file.h
parent760031b4a74d70bdeaab4ce9aedfe772acd05bd3 (diff)
download files
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 */