summaryrefslogtreecommitdiff
path: root/src/config.h
blob: 2456c2baf7a30fb4601e53dd084f2ad67f499a29 (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
#ifndef __CONFIG_H
#define __CONFIG_H

#include <stdbool.h>

struct config {
    char *instance_url;
    char *client_id;
    char *client_secret;
    char *access_token;
};

extern const struct config *config;

bool is_logged_in();
const char* get_access_token();
const char* get_instance_url();
int read_local_credentials();
bool is_registered();
void config_load();
int config_save();
void config_set_client_id(const char *cid);
void config_set_client_secret(const char *cs);
void config_set_instance_url(const char *iu);
void config_set_access_token(const char *a);
void config_cleanup();

#endif