AppDynamics IoT C++ SDK
AppDynamics IoT C++ library contains code that facilitates capturing availability, usage, network performance and errors of an IoT Application.
config.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018 AppDynamics, Inc., and its affiliates
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef _CONFIG_HPP_
18 #define _CONFIG_HPP_
19 
20 #include <string>
21 #include "appd_iot_interface.h"
22 
23 typedef struct
24 {
25  std::string appkey; /* Application License Key */
26  std::string eum_collector_url; /* URL where the beacons will be sent to */
27  std::string eum_appkey_enabled_url; /* URL to check if application is enabled */
28  appd_iot_log_write_cb_t log_write_cb; /* Callback function to write log messages */
29  appd_iot_sdk_state_change_cb_t sdk_state_change_cb; /* Callback function to indicate sdk is disabled */
30  appd_iot_log_level_t log_level; /* Set Log Level */
31  bool initialized; /* Indicates if config is valid and initialized */
32  appd_iot_http_cb_t http_cb; /* Callback function pointers used to send http req */
34 
40 
46 
51 void appd_iot_disable_sdk(int http_resp_code);
52 
58 
59 
64 const char* appd_iot_get_eum_collector_url(void);
65 
66 
72 
73 
79 
80 
86 
87 
88 #endif // _CONFIG_HPP_
appd_iot_sdk_state_t
Enums for SDK State.
Definition: appd_iot_def.h:59
appd_iot_http_resp_done_cb_t appd_iot_get_http_resp_done_cb(void)
Get http response done callback function pointer.
Definition: config.cpp:165
appd_iot_http_req_send_cb_t appd_iot_get_http_req_send_cb(void)
Get http request send callback function pointer.
Definition: config.cpp:156
const char * appd_iot_get_eum_collector_url(void)
Get Configured EUM Collector URL.
Definition: config.cpp:193
Definition: config.hpp:23
void(* appd_iot_sdk_state_change_cb_t)(appd_iot_sdk_state_t sdk_state)
This Callback function gets triggered whenever sdk state changes. SDK states are given in appd_iot_sd...
Definition: appd_iot_def.h:137
std::string eum_collector_url
Definition: config.hpp:26
appd_iot_log_write_cb_t log_write_cb
Definition: config.hpp:28
appd_iot_log_level_t
Log Level Enums returned for all API calls.
Definition: appd_iot_def.h:94
appd_iot_http_cb_t http_cb
Definition: config.hpp:32
void appd_iot_disable_sdk(int http_resp_code)
Set SDK state to disabled state based on the HTTP Response Code.
Definition: config.cpp:245
appd_iot_log_write_cb_t appd_iot_get_log_write_cb(void)
Get Log Write Callback Function Pointer.
Definition: config.cpp:184
bool initialized
Definition: config.hpp:31
void appd_iot_set_sdk_state(appd_iot_sdk_state_t new_state)
Set SDK State.
Definition: config.cpp:213
appd_iot_log_level_t appd_iot_get_log_level(void)
Get configured Log Level as part of SDK Initialization.
Definition: config.cpp:174
appd_iot_log_level_t log_level
Definition: config.hpp:30
appd_iot_sdk_state_t appd_iot_get_sdk_state(void)
Get Current SDK State.
Definition: config.cpp:236
void(* appd_iot_http_resp_done_cb_t)(appd_iot_http_resp_t *http_resp)
Http Response Done Callback is triggered after http send callback returns and http response is proc...
Definition: appd_iot_def.h:407
void(* appd_iot_log_write_cb_t)(const char *logmsg, size_t logmsg_len)
Log Write Callback implements the functionality to process log messages The callback implementation...
Definition: appd_iot_def.h:124
appd_iot_http_resp_t *(* appd_iot_http_req_send_cb_t)(const appd_iot_http_req_t *http_req)
Http Request Send Callback implements the functionality to send HTTP Request The callback implement...
Definition: appd_iot_def.h:395
std::string eum_appkey_enabled_url
Definition: config.hpp:27
appd_iot_sdk_state_change_cb_t sdk_state_change_cb
Definition: config.hpp:29
AppDynamics HTTP Callback list Mandatory: http_req_send_cb and http_resp_done_cb fields...
Definition: appd_iot_def.h:414
std::string appkey
Definition: config.hpp:25