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, Ispirata Srl, info@ispirata.com.
3  *
4  * SPDX-License-Identifier: LGPL-2.1+ 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 };
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
43  const struct astarte_pairing_config *config, char *out, size_t length);
44 
53 
65  const struct astarte_pairing_config *config, const char *csr, char *out, size_t length);
66 
77  const struct astarte_pairing_config *config, char *out, size_t length);
78 
79 #ifdef __cplusplus
80 }
81 #endif
82 
83 #endif
Astarte types and defines.
astarte_err_t
Astarte return codes.
Definition: astarte.h:28
astarte_err_t astarte_pairing_get_credentials_secret(const struct astarte_pairing_config *config, char *out, size_t length)
get the credentials secret.
astarte_err_t astarte_pairing_get_mqtt_v1_broker_url(const struct astarte_pairing_config *config, char *out, size_t length)
get the Astarte MQTT v1 broker URL.
astarte_err_t astarte_pairing_register_device(const struct astarte_pairing_config *config)
register a device.
astarte_err_t astarte_pairing_get_mqtt_v1_credentials(const struct astarte_pairing_config *config, const char *csr, char *out, size_t length)
obtain a new Astarte MQTT v1 certificate.
Definition: astarte_pairing.h:20