40 lines
752 B
C
Executable File
40 lines
752 B
C
Executable File
#ifndef AUTH_H
|
|
#define AUTH_H
|
|
|
|
#include <stdbool.h>
|
|
#include <freertos/FreeRTOS.h>
|
|
#include <freertos/queue.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define AUTH_TAG_MAX_LEN 20
|
|
|
|
typedef struct {
|
|
char tag[AUTH_TAG_MAX_LEN];
|
|
bool authorized;
|
|
} auth_event_t;
|
|
|
|
// Inicializa autenticação (ex: tabela de tags)
|
|
void auth_init(void);
|
|
|
|
// Ativa ou desativa o sistema de autenticação
|
|
void auth_set_enabled(bool value);
|
|
bool auth_is_enabled(void);
|
|
|
|
// Gerenciamento de tags
|
|
bool auth_add_tag(const char *tag);
|
|
bool auth_remove_tag(const char *tag);
|
|
bool auth_tag_exists(const char *tag);
|
|
void auth_list_tags(void);
|
|
|
|
// Integração com fila de eventos
|
|
void auth_set_event_queue(QueueHandle_t queue);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // AUTH_H
|