Tchatator413
TripEnArvor instant messaging protocol - JSON-based
Loading...
Searching...
No Matches
const.h
Go to the documentation of this file.
1
5
6#ifndef CONST_H
7#define CONST_H
8
9#include <sysexits.h>
10
12enum {
14 EX_NODB = EX__MAX + 1,
15};
16
18#define X_ACTIONS(X) \
19 X(login) \
20 X(logout) \
21 X(whois) \
22 X(send) \
23 X(motd) \
24 X(inbox) \
25 X(outbox) \
26 X(edit) \
27 X(rm) \
28 X(block) \
29 X(unblock) \
30 X(ban) \
31 X(unban)
32
34#define PROG "tct413"
35
37#define HELP PROG " - A Tchatator413 implementation\n\
38\n\
39SYNOPSIS\n\
40 " PROG " -[qv]... [-c FILE]\n\
41 " PROG " -[qv]... [-c FILE] -i [REQUEST]\n\
42 " PROG " --dump-config\n\
43 " PROG " --help\n\
44 " PROG " --version\n\
45\n\
46DESCRIPTION\n\
47 A Tchatator413-compliant server based on Unix sockets. Accepts JSON, responds with JSON.\n\
48\n\
49 Mandatory arguments to long options are mandatory for short options too.\n\
50\n\
51 -q, --quiet More quiet (can be repeated)\n\
52 -v, --verbose More verbose (can be repeated)\n\
53 -i, --interactive Run in interactive mode (read from STDIN or argument)\n\
54 -c, --config=FILE Configuration file\n\
55 --dump-config Dump current configuration\n\
56 --help Show this help\n\
57 --version Show version\n\
58\n\
59REQUIRED ENVIRONMENT VARIABLES\n\
60 DB_HOST DB host\n\
61 PGDB_PORT DB port\n\
62 DB_NAME DB name\n\
63 DB_USER DB username\n\
64 DB_ROOT_PASSWORD DB password\n\
65 ADMIN_API_KEY Administrator API key\n\
66 ADMIN_PASSWORD Administrator password"
67
69#define VERSION PROG " 1.0.1"
70
71#endif // CONST_H
@ EX_NODB
Exit code for when the database connection failed.
Definition const.h:14