/* * task.h: declares functions for manipulation with tasks */ #ifndef TASK_H #define TASK_H #include #include #include #include enum task_check { // whether to check formula in signal handler or when variable changes SIGNAL, VARCHG }; struct task { // Time info struct itimerspec times; timer_t timerid; // Command to run char **argv; //NULL terminated list of NUL terminated strings // Formula to be checked when running char *formula; // in RPN, NUL terminated enum task_check when; bool run; // dynamic programming // Disabling/enabling bool enabled; }; bool task_add(struct task t); bool task_disable(uint64_t id); bool task_enable(uint64_t id); bool task_delete(uint64_t id); struct grow *task_list(void); struct task task_details(uint64_t id); void task_recalc(uint64_t id); bool task_load(void); bool task_save(void); void task_flush(void); #endif