-
Notifications
You must be signed in to change notification settings - Fork 1
/
configs.h
27 lines (23 loc) · 1.07 KB
/
configs.h
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
#ifndef CONFIGS_H
#define CONFIGS_H
struct server_info;
struct ssh_session;
enum config_type
{
CONFIG_LIVE, // Live version (which will be uploaded)
CONFIG_NEW, // New version (generated; before moving to live)
CONFIG_REMOTE, // Remote version (downloaded to check for changes)
CONFIG_TEMP, // Temporary version (while generating new config)
CONFIG_NUM_TYPES
};
const char *config_filename(struct server_info *server, enum config_type type);
void config_rename(const char *old, const char *new);
void config_delete(struct server_info *server);
int config_download(struct server_info *server, struct ssh_session *session);
int config_upload(struct server_info *server, struct ssh_session *session, enum config_type type);
void config_generate(const char *server);
int config_check_remote_server(struct server_info *server, enum config_type local_conf, int silent, int keep_remote, struct ssh_session *session);
void config_check_remote(const char *server);
void config_check_local(const char *server, int check_remote, int auto_update, int auto_rehash);
void config_get_missing();
#endif