Tchatator413
TripEnArvor instant messaging protocol - JSON-based
Loading...
Searching...
No Matches
Macros | Enumerations
const.h File Reference

General constants - Standalone header. More...

#include <sysexits.h>

Go to the source code of this file.

Macros

#define X_ACTIONS(X)
 X-macro that expands to the list of actions.
 
#define PROG   "tct413"
 The name of the program.
 
#define HELP   PROG " - A Tchatator413 implementation\n\\n\SYNOPSIS\n\ " PROG " -[qv]... [-c FILE]\n\ " PROG " -[qv]... [-c FILE] -i [REQUEST]\n\ " PROG " --dump-config\n\ " PROG " --help\n\ " PROG " --version\n\\n\DESCRIPTION\n\ A Tchatator413-compliant server based on Unix sockets. Accepts JSON, responds with JSON.\n\\n\ Mandatory arguments to long options are mandatory for short options too.\n\\n\ -q, --quiet More quiet (can be repeated)\n\ -v, --verbose More verbose (can be repeated)\n\ -i, --interactive Run in interactive mode (read from STDIN or argument)\n\ -c, --config=FILE Configuration file\n\ --dump-config Dump current configuration\n\ --help Show this help\n\ --version Show version\n\\n\REQUIRED ENVIRONMENT VARIABLES\n\ DB_HOST DB host\n\ PGDB_PORT DB port\n\ DB_NAME DB name\n\ DB_USER DB username\n\ DB_ROOT_PASSWORD DB password\n\ ADMIN_API_KEY Administrator API key\n\ ADMIN_PASSWORD Administrator password"
 The program's helpstring.
 
#define VERSION   PROG " 1.0.1"
 The program's versionstring.
 

Enumerations

enum  { EX_NODB = EX__MAX + 1 }
 Additional sysexits codes. More...
 

Detailed Description

General constants - Standalone header.

Author
Raphaƫl
Date
23/01/2025

Definition in file const.h.

Macro Definition Documentation

◆ HELP

#define HELP   PROG " - A Tchatator413 implementation\n\\n\SYNOPSIS\n\ " PROG " -[qv]... [-c FILE]\n\ " PROG " -[qv]... [-c FILE] -i [REQUEST]\n\ " PROG " --dump-config\n\ " PROG " --help\n\ " PROG " --version\n\\n\DESCRIPTION\n\ A Tchatator413-compliant server based on Unix sockets. Accepts JSON, responds with JSON.\n\\n\ Mandatory arguments to long options are mandatory for short options too.\n\\n\ -q, --quiet More quiet (can be repeated)\n\ -v, --verbose More verbose (can be repeated)\n\ -i, --interactive Run in interactive mode (read from STDIN or argument)\n\ -c, --config=FILE Configuration file\n\ --dump-config Dump current configuration\n\ --help Show this help\n\ --version Show version\n\\n\REQUIRED ENVIRONMENT VARIABLES\n\ DB_HOST DB host\n\ PGDB_PORT DB port\n\ DB_NAME DB name\n\ DB_USER DB username\n\ DB_ROOT_PASSWORD DB password\n\ ADMIN_API_KEY Administrator API key\n\ ADMIN_PASSWORD Administrator password"

The program's helpstring.

Definition at line 37 of file const.h.

◆ PROG

#define PROG   "tct413"

The name of the program.

Definition at line 34 of file const.h.

◆ VERSION

#define VERSION   PROG " 1.0.1"

The program's versionstring.

Definition at line 69 of file const.h.

◆ X_ACTIONS

#define X_ACTIONS (   X)
Value:
X(login) \
X(logout) \
X(whois) \
X(send) \
X(motd) \
X(inbox) \
X(outbox) \
X(edit) \
X(rm) \
X(block) \
X(unblock) \
X(ban) \
X(unban)

X-macro that expands to the list of actions.

Definition at line 18 of file const.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Additional sysexits codes.

Enumerator
EX_NODB 

Exit code for when the database connection failed.

Definition at line 12 of file const.h.

12 {
14 EX_NODB = EX__MAX + 1,
15};
@ EX_NODB
Exit code for when the database connection failed.
Definition const.h:14