-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathcountly_configuration.hpp
More file actions
92 lines (73 loc) · 1.95 KB
/
countly_configuration.hpp
File metadata and controls
92 lines (73 loc) · 1.95 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#ifndef COUNTLY_CONFIGURATION_HPP_
#define COUNTLY_CONFIGURATION_HPP_
#include "countly/constants.hpp"
#include <string>
namespace cly {
struct CountlyConfiguration {
/**
* URL of the Countly server to submit data to.
* Mandatory field.
*/
std::string serverUrl;
/**
* App key for the application being tracked.
* Mandatory field.
*/
std::string appKey;
/**
* Unique ID for the device the app is running on.
*/
std::string deviceId;
/**
* Set to prevent parameter tampering.
*/
std::string salt;
/**
* Path to the database.
*/
#ifdef COUNTLY_USE_SQLITE
std::string databasePath;
#endif
/**
* Sets the interval for the automatic update calls
*/
unsigned int sessionDuration = 60;
/**
* Set threshold value for the number of events that can be stored locally.
*/
int eventQueueThreshold = 100;
/**
* Set limit for the number of requests that can be stored locally.
*/
unsigned int requestQueueThreshold = 1000;
/**
* Set limit for the number of requests that can be processed at a time.
*/
unsigned int maxProcessingBatchSize = 100;
/**
* Set the maximum amount of breadcrumbs.
*/
unsigned int breadcrumbsThreshold = 100;
/**
* Set to send all requests made to the Countly server using HTTP POST.
*/
bool forcePost = false;
unsigned int port = 443;
SHA256Function sha256_function = nullptr;
bool manualSessionControl = false;
bool autoEventsOnUserProperties = true;
/**
* Enable immediate stop notification using a condition variable.
* When enabled, the update loop wakes immediately on stop instead of
* waiting for the current sleep interval to expire.
*/
bool immediateRequestOnStop = false;
HTTPClientFunction http_client_function = nullptr;
nlohmann::json metrics;
CountlyConfiguration(const std::string appKey, std::string serverUrl) {
this->appKey = appKey;
this->serverUrl = serverUrl;
}
};
} // namespace cly
#endif