SolarEnergy/esp32_device/main/secure_api.h

46 lines
844 B
C
Raw Normal View History

2024-08-18 18:13:03 +00:00
/**
* Secure API functions
*/
#pragma once
#ifdef __cplusplus
extern "C"
{
#endif
/**
* Device enrollment status
*/
enum DevEnrollmentStatus
{
/** An error occurred while retrieving device status */
2024-08-18 18:33:26 +00:00
DevEnrollError = 0,
2024-08-18 18:13:03 +00:00
/** Device is unknown by the backend */
2024-08-18 18:33:26 +00:00
DevEnrollUnknown = 1,
2024-08-18 18:13:03 +00:00
/** Device hasn't been validated yet */
2024-08-18 18:33:26 +00:00
DevEnrollPending = 2,
2024-08-18 18:13:03 +00:00
/** Device has been validated by the backend */
2024-08-18 18:33:26 +00:00
DevEnrollValidated = 3,
2024-08-18 18:13:03 +00:00
};
/**
* Get current device enrollment status
*/
enum DevEnrollmentStatus
secure_api_get_device_enrollment_status();
2024-08-23 19:00:18 +00:00
/**
* Enroll device
*/
int secure_api_enroll_device();
2024-08-28 22:09:47 +00:00
/**
* Get device certificate
*/
char *secure_api_get_dev_certificate();
2024-08-18 18:13:03 +00:00
#ifdef __cplusplus
}
#endif