-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathclitox-config.h
60 lines (55 loc) · 1.28 KB
/
clitox-config.h
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
59
60
/**
* clitox options
* @file clitox-config.h
**/
#ifndef CLITOX_CONFIG_H
#define CLITOX_CONFIG_H
#include <string>
#include <vector>
#include <tox/tox.h>
#define CMD_RW 0
#define CMD_PRINT_TOX_ID 1
/**
* Command line interface (CLI) tool configuration structure
*/
class ClitoxConfig
{
private:
/**
* Parse command line into ClitoxConfig class
* Return 0- success
* 1- show help and exit, or command syntax error
* 2- output file does not exists or can not open to write
**/
int parseCmd
(
int argc,
char* argv[]
);
int errorcode;
std::string proxy_host;
struct Tox_Options toxoptions;
public:
int cmd;
std::string file_name; ///< Tox file
std::string nick_name; ///< nick name
std::string status_message; ///< initial status message
std::vector<std::string> ids_to; ///< TOX identifier (in hex)
std::vector<std::string> nodes_json; ///< bootstrap nodes list json file
bool friend_norequest;
std::string message_friend_request;
std::string message_online;
std::string message_away;
std::string message_busy;
bool message_type_action;
ClitoxConfig();
ClitoxConfig
(
int argc,
char* argv[]
);
int error();
static void defaultToxOptions(struct Tox_Options *retval);
void getToxOptions(struct Tox_Options *retval);
};
#endif