aboutsummaryrefslogtreecommitdiffstats
path: root/src/l2su.h
diff options
context:
space:
mode:
authorLibravatar bigfoot547 <[email protected]>2023-12-25 06:05:40 -0600
committerLibravatar bigfoot547 <[email protected]>2023-12-25 06:05:40 -0600
commit6d1d4d0a5506dce90c833ef8dd141058fea3c33a (patch)
tree12a95579dbf04c4310e5b42ad8cae399d81f1189 /src/l2su.h
parentinitial commit (diff)
[WIP] Add instances
still need to do the following: - check if the folder exists - try and find some way to canonicalize the path name
Diffstat (limited to 'src/l2su.h')
-rw-r--r--src/l2su.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/src/l2su.h b/src/l2su.h
index 13df852..1746a53 100644
--- a/src/l2su.h
+++ b/src/l2su.h
@@ -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 */