agendafs
A filesystem for your calendar.
git clone git://mccd.space/agendafs| Log | Files | Refs | README | LICENSE | Mail | Website |
fuse_node_store.h (1424B)
1 #ifndef fuse_node_store_h_INCLUDED
2 #define fuse_node_store_h_INCLUDED
3 #include "agenda_entry.h"
4 #include "hashmap.h"
5 #include "util.h"
6 #include <stddef.h>
7 #include <stdlib.h>
8 #include <string.h>
9 extern char VDIR[256];
10
11 // A structure of the current root
12 extern struct tree_node *fuse_root;
13 // ics entries, keys are the filename as stored in ICS_DIR
14 // I.E. bcb4c14b-8f3f-4a53-ad33-1f4499071a9m-caldavfs.ics
15 extern struct hashmap *entries_vdir;
16
17 void
18 set_vdir(const char *expanded_path);
19
20 int
21 set_node_filename(struct tree_node *node, const char *filename);
22
23 struct tree_node *
24 get_fuse_node_from_vdir_name(const char *vdir_name);
25
26 const struct agenda_entry *
27 get_entry(const struct tree_node *node);
28
29 const char *
30 get_vdir_filepath(arena *ar, const struct tree_node *node);
31
32 bool
33 is_root_node(const struct tree_node *node);
34
35 const char *
36 get_node_filename(const struct tree_node *node);
37
38 int
39 set_node_filename(struct tree_node *node, const char *filename);
40
41 struct tree_node *
42 create_fuse_node(const struct agenda_entry *entry);
43
44 void
45 delete_fuse_node(struct tree_node *node);
46
47 struct tree_node *
48 upsert_fuse_node(const struct agenda_entry *entry);
49
50 size_t
51 add_fuse_child(struct tree_node *parent, struct tree_node *child);
52
53 size_t
54 move_fuse_node(struct tree_node *new_parent, struct tree_node *child);
55
56 const char *
57 get_default_file_extension();
58
59 int
60 set_file_extension(const char *);
61
62 #endif // fuse_node_store_h_INCLUDED