-
Notifications
You must be signed in to change notification settings - Fork 0
/
handler-fcm-config.h
65 lines (55 loc) · 1.28 KB
/
handler-fcm-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
61
62
63
64
65
#ifndef HANDLER_FCM_CONFIG_H
#define HANDLER_FCM_CONFIG_H 1
#include <string>
#include <vector>
#include "pg-connect.h"
#define PROGRAM_NAME "handlerfcm"
#define PROGRAM_DESCRIPTION "FireBase Cloud messaging printer"
#define FCM_SEND "https://fcm.googleapis.com/fcm/send"
void ontokenbearer
(
void *env,
const std::string &value,
int status
);
/**
* @brief google-sheets-writer command line options
* @see google-sheets-writer.cpp
*/
class Config
{
private:
int lastError;
/**
* Parse command line
* Return 0- success
**/
int parseCmd
(
int argc,
char* argv[]
);
public:
Config(int argc, char* argv[]);
int error();
std::string fburl;
std::string message_url; ///< nano message URL
std::string imei_field_name; ///< field name contains IMEI, default "imei"
int retries; ///< default 1
int retry_delay; ///<
// proto
std::string connection; ///< proto files directory path
int buffer_size; ///< default 2048
bool daemonize;
int stop_request;
int verbosity; ///< default 0
int format_number; ///< default 0
char *path;
std::string proto_path;
std::vector <std::string> allowed_messages;
// FireBase server key
std::string server_key;
// PostgreSQL
PGConfig pgconnect;
};
#endif