core-legacy/include/models/macro_action.h

37 lines
719 B
C
Raw Permalink Normal View History

#ifndef CORE_MODELS_MACRO_ACTION_H
#define CORE_MODELS_MACRO_ACTION_H
typedef struct
{
int macro_id;
int relay_id;
int schedule_id;
uint8_t weekday;
} macro_action_t;
int
macro_action_insert(macro_action_t *macro_action);
int
macro_action_delete_for_macro(int macro_id);
macro_action_t**
macro_action_get_for_macro(int macro_id);
macro_action_t**
macro_action_get_for_macro_and_weekday(int macro_id, int weekday);
2020-09-06 11:12:33 +00:00
int
macro_action_execute(macro_action_t *macro_action);
void
macro_action_free_list(macro_action_t **macro_actions);
int*
macro_action_get_macro_ids_with_schedule(int schedule_id);
int*
macro_action_get_macro_ids_with_relay(int relay_id);
#endif /* CORE_MODELS_MACRO_ACTION_H */