blob: 1746a531d39c40e8012cb00ce1eee5556a818545 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#ifndef L2SU_MAIN_H_INCLUDED
#define L2SU_MAIN_H_INCLUDED
#include "command.h"
#include "instance.h"
#include <fcntl.h>
struct l2_user_paths {
const char *config;
const char *data;
};
struct tag_l2_state_t {
struct l2_user_paths paths;
/* 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 */
|