#include <protocomm_security.h>
#include <esp_err.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @brief Function prototype for protocomm endpoint handler
*/
* - ESP_ERR_INVALID_ARG : Null instance/name arguments
*/
esp_err_t protocomm_unset_version(protocomm_t *pc, const char *ep_name);
+
+#ifdef __cplusplus
+}
+#endif
#include <esp_err.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @brief Proof Of Possession for authenticating a secure session
*/
const uint8_t *inbuf, ssize_t inlen,
uint8_t *outbuf, ssize_t *outlen);
} protocomm_security_t;
+
+#ifdef __cplusplus
+}
+#endif
#include <protocomm_security.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @brief Protocomm security version 0 implementation
*
* security is required for the protocomm instance
*/
extern const protocomm_security_t protocomm_security0;
+
+#ifdef __cplusplus
+}
+#endif
#include <protocomm_security.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @brief Protocomm security version 1 implementation
*
* Curve25519 key exchange and AES-256-CTR encryption
*/
extern const protocomm_security_t protocomm_security1;
+
+#ifdef __cplusplus
+}
+#endif
#include <protocomm.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* BLE device name cannot be larger than this value
*/
/**
* Name of the handler, which is passed to protocomm layer
*/
- char *name;
+ const char *name;
/**
* UUID to be assigned to the BLE characteristic which is
* - ESP_ERR_INVALID_ARG : Null / incorrect protocomm instance
*/
esp_err_t protocomm_ble_stop(protocomm_t *pc);
+
+#ifdef __cplusplus
+}
+#endif
#include <protocomm.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define PROTOCOMM_CONSOLE_DEFAULT_CONFIG() { \
.stack_size = 4096, \
.task_priority = tskIDLE_PRIORITY + 3, \
* - ESP_ERR_INVALID_ARG : Null / incorrect protocomm instance pointer
*/
esp_err_t protocomm_console_stop(protocomm_t *pc);
+
+#ifdef __cplusplus
+}
+#endif
.task_priority = tskIDLE_PRIORITY + 5, \
}
+#ifdef __cplusplus
+extern "C" {
+#endif
-
-/** Protocomm HTTP Server Configuration */
+/**
+ * @brief Config parameters for protocomm HTTP server
+ */
typedef struct {
uint16_t port; /*!< Port on which the http server will listen */
* - ESP_ERR_INVALID_ARG : Null / incorrect protocomm instance pointer
*/
esp_err_t protocomm_httpd_stop(protocomm_t *pc);
+
+#ifdef __cplusplus
+}
+#endif
if (protoble_internal->g_nu_lookup) {
for (unsigned i = 0; i < protoble_internal->g_nu_lookup_count; i++) {
if (protoble_internal->g_nu_lookup[i].name) {
- free(protoble_internal->g_nu_lookup[i].name);
+ free((void *)protoble_internal->g_nu_lookup[i].name);
}
}
free(protoble_internal->g_nu_lookup);
#include <lwip/inet.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @brief WiFi STA status for conveying back to the provisioning master
*/
esp_err_t wifi_prov_config_data_handler(uint32_t session_id, const uint8_t *inbuf, ssize_t inlen,
uint8_t **outbuf, ssize_t *outlen, void *priv_data);
+#ifdef __cplusplus
+}
+#endif
+
#endif