summaryrefslogtreecommitdiff
path: root/minecctl/server.h
blob: 47682a5b7f58605f57571027fd7ff35b93f5d6e8 (plain)
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
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef fooserverhfoo
#define fooserverhfoo

#include <stdbool.h>

#include "shared/config-parser.h"

struct server {
	bool file_read;
	struct server_config scfg;
	struct list_head list;
};

void server_load_all_known(struct cfg *cfg);

bool server_read_config(struct cfg *cfg, struct server *server,
			unsigned *lineno, const char **error);

bool server_read_all_configs(struct cfg *cfg, bool print_results);

struct server *server_get_default(struct cfg *cfg);

bool server_set_default(struct cfg *cfg, const char *name);

void server_free_all(struct cfg *cfg);

void server_free(struct server *server);

struct server *server_new();

#endif