src/server/daemon/event.h

changeset 415
d938228c382e
parent 256
19259b6c5cf7
equal deleted inserted replaced
414:99a34860c105 415:d938228c382e
28 28
29 #ifndef EVENT_H 29 #ifndef EVENT_H
30 #define EVENT_H 30 #define EVENT_H
31 31
32 #include "../public/nsapi.h" 32 #include "../public/nsapi.h"
33 #include <ucx/string.h> 33 #include <cx/string.h>
34 34
35 #ifdef __cplusplus 35 #ifdef __cplusplus
36 extern "C" { 36 extern "C" {
37 #endif 37 #endif
38 38
41 uint32_t numins; 41 uint32_t numins;
42 uint32_t current; 42 uint32_t current;
43 } EVHandler; 43 } EVHandler;
44 44
45 typedef struct event_handler_conf { 45 typedef struct event_handler_conf {
46 scstr_t name; 46 cxstring name;
47 int nthreads; 47 int nthreads;
48 int isdefault; 48 int isdefault;
49 } EventHandlerConfig; 49 } EventHandlerConfig;
50 50
51 int create_event_handler(EventHandlerConfig *cfg); 51 int create_event_handler(EventHandlerConfig *cfg);
52 52
53 int check_event_handler_cfg(); 53 int check_event_handler_cfg();
54 54
55 EVHandler* get_default_event_handler(); 55 EVHandler* get_default_event_handler();
56 56
57 EVHandler* get_event_handler(char *name); 57 EVHandler* get_event_handler(const char *name);
58 58
59 EventHandler* ev_instance(EVHandler *ev); 59 EventHandler* ev_instance(EVHandler *ev);
60 60
61 /* implementation in event_$platform */ 61 /* implementation in event_$platform */
62 EVHandler* evhandler_create(EventHandlerConfig *cfg); 62 EVHandler* evhandler_create(EventHandlerConfig *cfg);

mercurial