summaryrefslogtreecommitdiff
path: root/src/global.h
blob: fe8f5c2e065afa9164a49a98b9e442f569fd311d (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef __GLOBAL_H
#define __GLOBAL_H

#include "config.h"
#include <termios.h>
#include "utils.h"
#include "log.h"

#ifdef __MAIN_FILE_C
#define GLOBAL_EXTERN
#else
#define GLOBAL_EXTERN extern
#endif

struct global_user {
	char *name;
	char *email;
};

struct global_core {
	speed_t baud_rate;
	int read_timeout;
	int sms_init;
	char *device;
	int verbose;
	int interactive;

	char *msg_store_read;
	char *msg_store_send;
	char *msg_store_new;
	char *pb_store;

	char *editor;
	char *edit_file;
};

struct global_smtp {
	char *server;
	int port;
	char *user;
	char *passwd;
	char *encryption;
};

struct global_send_email {
	char *domain;
};

struct global_config {
	struct global_user user;
	struct global_core core;
	struct global_smtp smtp;
	struct global_send_email send_email;
};

GLOBAL_EXTERN struct global_config Global;

#endif /* ~__GLOBAL_H */