aboutsummaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
new file mode 100644
index 0000000..3045878
--- /dev/null
+++ b/include/config.h
@@ -0,0 +1,39 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include <stdbool.h>
5
6#define RSSMAIL_CONFIGURE_SUCCESS 0
7#define RSSMAIL_CONFIGURE_FAILURE -1
8
9typedef struct smtp_config_t {
10 int recipient_count;
11 int port;
12 char* from;
13 char* to;
14 char* subject;
15 char* username;
16 char* password;
17 char* host;
18 char* cert_path;
19 char** recipients;
20} smtp_config_t;
21
22typedef struct rss_config_t {
23 int max_age;
24 int uri_count;
25 char** uris;
26 char* useragent;
27} rss_config_t;
28
29int read_config_file(const char* path, smtp_config_t* s, rss_config_t* r);
30
31void init_config(smtp_config_t* s, rss_config_t* r);
32
33void generate_config_file(void);
34
35void free_smtp_config(smtp_config_t* smtp);
36
37void free_rss_config(rss_config_t* rss);
38
39#endif