core-legacy/include/models/macro.h

47 lines
620 B
C
Raw Normal View History

#ifndef CORE_MACRO_H
#define CORE_MACRO_H
#include <uuid/uuid.h>
#include <cJSON.h>
#include <constants.h>
#include <models/period.h>
#include <models/macro_action.h>
typedef struct
{
int id;
uuid_t uid;
char name[MAX_NAME_LENGTH + 1];
} macro_t;
int
macro_save(macro_t *macro);
int
macro_remove(macro_t *macro);
void
macro_free(macro_t *macro);
void
macro_free_list(macro_t **macro);
cJSON*
macro_to_json(macro_t *macro);
void
macro_free_list(macro_t **macros_list);
macro_t*
macro_get_by_id(int id);
macro_t*
macro_get_by_uid(uuid_t uid);
macro_t**
macro_get_all();
#endif /* CORE_MACRO_H */