add: tests
add: schedule endpoints
This commit is contained in:
parent
6d828fcffc
commit
b5a8523ae0
14 changed files with 468 additions and 42 deletions
include
|
@ -28,4 +28,6 @@
|
|||
|
||||
#define PIFACE_GPIO_BASE 200
|
||||
|
||||
#define STANDARD_HEADERS "Access-Control-Allow-Origin: *"
|
||||
|
||||
#endif /* CORE_CONTANTS_H */
|
||||
|
|
|
@ -12,4 +12,10 @@ api_v1_schedules_GET(struct mg_connection *c, endpoint_args_t *args, struct http
|
|||
void
|
||||
api_v1_schedules_STR_GET(struct mg_connection *c, endpoint_args_t *args, struct http_message *hm);
|
||||
|
||||
void
|
||||
api_v1_schedules_STR_PUT(struct mg_connection *c, endpoint_args_t *args, struct http_message *hm);
|
||||
|
||||
void
|
||||
api_v1_schedules_STR_DELETE(struct mg_connection *c, endpoint_args_t *args, struct http_message *hm);
|
||||
|
||||
#endif /* CORE_ENDPOINTS_API_V1_SCHEDULES_H */
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
|
||||
#include <colors.h>
|
||||
#include <config.h>
|
||||
#include <macros.h>
|
||||
|
||||
#ifndef SOURCE_PATH_SIZE
|
||||
#define SOURCE_PATH_SIZE 0
|
||||
#endif
|
||||
|
||||
#define __FILENAME__ (__FILE__ + SOURCE_PATH_SIZE)
|
||||
|
||||
void
|
||||
logger_log(FILE *stream, log_level_t level, const char *filename, int line, const char *func, const char *msg, ...);
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#ifndef CORE_MACROS_H
|
||||
#define CORE_MACROS_H
|
||||
|
||||
#include <colors.h>
|
||||
#include <logger.h>
|
||||
|
||||
#ifndef SOURCE_PATH_SIZE
|
||||
#define SOURCE_PATH_SIZE 0
|
||||
#endif
|
||||
|
||||
#define __FILENAME__ (__FILE__ + SOURCE_PATH_SIZE)
|
||||
|
||||
#endif //CORE_MACROS_H
|
|
@ -22,6 +22,9 @@ schedule_save(schedule_t *schedule);
|
|||
int
|
||||
schedule_remove(schedule_t *schedule);
|
||||
|
||||
int
|
||||
schedule_is_protected(schedule_t *schedule);
|
||||
|
||||
void
|
||||
schedule_free(schedule_t *schedule);
|
||||
|
||||
|
@ -46,6 +49,9 @@ schedule_get_by_id_or_off(int id);
|
|||
schedule_t*
|
||||
schedule_get_by_id(int id);
|
||||
|
||||
schedule_t*
|
||||
schedule_get_by_uid(uuid_t uid);
|
||||
|
||||
schedule_t**
|
||||
schedule_get_all();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue