diff options
Diffstat (limited to 'src/l2su.h')
| -rw-r--r-- | src/l2su.h | 25 |
1 files changed, 22 insertions, 3 deletions
@@ -4,14 +4,33 @@ #include "command.h" #include "instance.h" +#include <fcntl.h> + struct l2_user_paths { const char *config; const char *data; }; -struct { +struct tag_l2_state_t { struct l2_user_paths paths; - struct l2_instance *instances; -} l2_state; + + /* eventually instances and other stuff will be stored in a hash table or something, + * but for now a doubly-linked list accomplishes our goals */ + struct l2_instance *instance_head; + struct l2_instance *instance_tail; +}; + +extern struct tag_l2_state_t l2_state; + +/* homecooked string methods */ +char *l2_launcher_strapp(char *target, const char *src); + +/* launcher utilities */ +char *l2_launcher_find_config_path(void); +char *l2_launcher_find_data_path(void); + +int l2_launcher_open_config(const char *path, int flags, mode_t mode); + +int l2_launcher_mkdir_parents(const char *path); #endif /* include guard */ |
