|
...
|
...
|
@@ -27,6 +27,11 @@ |
|
27
|
27
|
|
|
28
|
28
|
#include "trbase.h"
|
|
29
|
29
|
#include "trdata.h"
|
|
|
30
|
+
|
|
|
31
|
+#include "tr/event.h"
|
|
|
32
|
+
|
|
|
33
|
+TR_CLASS(TR_EventDispatcher);
|
|
|
34
|
+
|
|
30
|
35
|
#include "tr/event_handler.h"
|
|
31
|
36
|
|
|
32
|
37
|
typedef enum TR_e_EventDispatcherMode {
|
|
...
|
...
|
@@ -46,7 +51,16 @@ TR_CLASS(TR_EventDispatcher) { |
|
46
|
51
|
TR_INSTANCE_INIT(TR_EventDispatcher);
|
|
47
|
52
|
TR_CLASSVARS_DECL(TR_EventDispatcher) {};
|
|
48
|
53
|
|
|
49
|
|
-void TR_eventDispatcherRegisterHandler(TR_EventDispatcher, TR_EventHandler);
|
|
|
54
|
+void TR_eventDispatcherRegisterHandler(TR_EventDispatcher, TR_EventHandler);
|
|
|
55
|
+void TR_eventDispatcherSetHeartbeat(TR_EventDispatcher, time_t);
|
|
|
56
|
+time_t TR_eventDispatcherGetBeatTime(TR_EventDispatcher);
|
|
|
57
|
+time_t TR_eventDispatcherGerDataWaitTime(TR_EventDispatcher);
|
|
|
58
|
+//void TR_eventDispatcherEnqueueEvent(TR_EventDispatcher, TR_Event);
|
|
|
59
|
+void TR_eventDispatcherStart(TR_EventDispatcher);
|
|
|
60
|
+void TR_eventDispatcherStop(TR_EventDispatcher);
|
|
|
61
|
+void TR_eventDispatcherShutdown(TR_EventDispatcher);
|
|
|
62
|
+
|
|
|
63
|
+#define TR_eventDispatcherEnqueueEvent(disp,ev) (TR_queuePut((disp)->events, (ev)))
|
|
50
|
64
|
|
|
51
|
65
|
#endif // __TR_EVENT_DISPATCHER_H__
|
|
52
|
66
|
|
...
|
...
|
|