Astarte Device SDK ESP32
ESP32 device SDK for the Astarte platform
astarte_pairing.h
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2018-2023, SECO Mind Srl
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later OR Apache-2.0
5  */
6 
12 #ifndef _ASTARTE_PAIRING_H_
13 #define _ASTARTE_PAIRING_H_
14 
15 #include "astarte.h"
16 
17 #include <string.h>
18 
20 {
21  const char *base_url;
22  const char *jwt;
23  const char *realm;
24  const char *hw_id;
25  const char *credentials_secret;
26 } __attribute__((deprecated("Please use astarte_pairing_config_t")));
27 
28 #pragma GCC diagnostic push
29 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
30 typedef struct astarte_pairing_config astarte_pairing_config_t;
31 #pragma GCC diagnostic pop
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
49  const astarte_pairing_config_t *config, char *out, size_t length);
50 
59 astarte_err_t astarte_pairing_register_device(const astarte_pairing_config_t *config);
60 
73  const astarte_pairing_config_t *config, const char *csr, char *out, size_t length);
74 
86  const astarte_pairing_config_t *config, char *out, size_t length);
87 
88 #ifdef __cplusplus
89 }
90 #endif
91 
92 #endif
Astarte types and defines.
astarte_err_t
Astarte return codes.
Definition: astarte.h:28
astarte_err_t astarte_pairing_register_device(const astarte_pairing_config_t *config)
register a device.
astarte_err_t astarte_pairing_get_credentials_secret(const astarte_pairing_config_t *config, char *out, size_t length)
get the credentials secret.
astarte_err_t astarte_pairing_get_mqtt_v1_broker_url(const astarte_pairing_config_t *config, char *out, size_t length)
get the Astarte MQTT v1 broker URL.
astarte_err_t astarte_pairing_get_mqtt_v1_credentials(const astarte_pairing_config_t *config, const char *csr, char *out, size_t length)
obtain a new Astarte MQTT v1 certificate.
Definition: astarte_pairing.h:20