forked from Qihoo360/QConf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qconf_feedback.h
54 lines (44 loc) · 1.19 KB
/
qconf_feedback.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
#ifndef QCONF_FEEDBACK_H
#define QCONF_FEEDBACK_H
#include <string>
#include <vector>
#include <qconf_common.h>
/**
* struct for keeping tblval and feedback values
*/
typedef struct
{
std::string tblval;
std::string fb_chds;
} fb_val;
#ifdef QCONF_CURL_ENABLE
/**
* Init environment of feedback
*/
int qconf_init_feedback(const std::string &url);
/**
* Destroy environment of feedback
*/
void qconf_destroy_feedback();
/**
* Do feedback
*/
int feedback_process(const std::string &content);
/**
* Generate content will be send as feedback message
*/
int feedback_generate_content(const std::string &ip, char data_type, const std::string &idc, const std::string &path, const fb_val &fbval, std::string &content);
/**
* Generate ip by zhandle_t
*/
int get_feedback_ip(const zhandle_t *zh, std::string &ip_str);
/**
* Generate string containing all chdnodes together with their status
*/
void feedback_generate_chdval(const string_vector_t &chdnodes, const std::vector<char> &status, std::string &value);
/**
* Generate string containing all batch nodes
*/
void feedback_generate_batchval(const string_vector_t &batchnodes, std::string &value);
#endif
#endif // __QCONF_FEEDBACK_H__