EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
subscriber_events.h
Go to the documentation of this file.
1 
11 #ifndef SUBSCRIBER_EVENTS_H
12 #define SUBSCRIBER_EVENTS_H
13 
14 #include <stdbool.h>
15 #include <inttypes.h>
16 #include <sys/un.h>
17 
18 #include "supervisor_config.h"
19 
20 #include "../utils/sockctl.h"
21 
26 };
27 
28 #define EVENT_IP_TEXT "IP"
29 #define EVENT_AP_TEXT "AP"
30 
38 int add_events_subscriber(struct supervisor_context *context,
39  const struct client_address *addr);
40 
50 PRINTF_FORMAT(3, 4)
51 int send_events_subscriber(struct supervisor_context *context,
52  enum SUBSCRIBER_EVENT type, const char *format, ...);
53 #endif
#define PRINTF_FORMAT(a, b)
Definition: log.h:50
Client address structure definition.
Definition: sockctl.h:28
Supervisor structure definition.
Definition: supervisor_config.h:45
int send_events_subscriber(struct supervisor_context *context, enum SUBSCRIBER_EVENT type, const char *format,...)
Send an event to the subscribers array.
Definition: subscriber_events.c:102
int add_events_subscriber(struct supervisor_context *context, const struct client_address *addr)
Add a subscriber to the subscriber events array.
Definition: subscriber_events.c:54
SUBSCRIBER_EVENT
Definition: subscriber_events.h:22
@ SUBSCRIBER_EVENT_NONE
Definition: subscriber_events.h:23
@ SUBSCRIBER_EVENT_AP
Definition: subscriber_events.h:25
@ SUBSCRIBER_EVENT_IP
Definition: subscriber_events.h:24
File containing the definition of the supervisor service structure.