X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=door_daemon%2Fcommand_queue.h;h=d03602fe525f1db028794427d23204ba006f9772;hb=5cdaab19f6a0c16cbce882a16c987c5c33f4190d;hp=61af577d83ba717d9549e98163c852b4ced4c082;hpb=9903e31e3908087384637a11d3a297b878b4ba65;p=svn42.git diff --git a/door_daemon/command_queue.h b/door_daemon/command_queue.h index 61af577..d03602f 100644 --- a/door_daemon/command_queue.h +++ b/door_daemon/command_queue.h @@ -21,6 +21,8 @@ #ifndef _COMMAND_QUEUE_H_ #define _COMMAND_QUEUE_H_ +#include + enum cmd_id_enum { OPEN, CLOSE, TOGGLE, RESET, STATUS, LOG }; typedef enum cmd_id_enum cmd_id_t; @@ -29,11 +31,13 @@ struct cmd_struct { cmd_id_t cmd; char* param; int sent; + struct timeval tv_start; struct cmd_struct* next; }; typedef struct cmd_struct cmd_t; int cmd_push(cmd_t** first, int fd, cmd_id_t cmd, const char* param); +int cmd_has_expired(const cmd_t cmd); void cmd_pop(cmd_t** first); void cmd_clear(cmd_t** first);