mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-28 17:11:23 +02:00
Add background jobs.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -154,6 +154,15 @@ typedef struct {
|
||||
rest_session_role_t role; // Minimum required role to access this route (only relevant if REST_ROUTE_REQUIRE_AUTH flag is set)
|
||||
} rest_route_t;
|
||||
|
||||
typedef struct {
|
||||
rest_route_handler_t handler;
|
||||
} rest_background_job_t;
|
||||
|
||||
#define REST_MAX_BACKGROUND_JOBS 4
|
||||
|
||||
extern int rest_background_job_push(rest_route_handler_t handler);
|
||||
extern rest_route_handler_t rest_background_job_pop(void);
|
||||
|
||||
extern int rest_execute_route_handler(const rest_request_t *request, rest_route_handler_t handler, rest_response_t *response);
|
||||
extern int rest_response_set_error(rest_response_t *response, int status_code, const char *message);
|
||||
const char *rest_status_text_from_code(uint16_t code);
|
||||
|
||||
Reference in New Issue
Block a user