|
|
@ -27,6 +27,11 @@ |
|
|
|
|
|
|
|
|
#include "trbase.h" |
|
|
#include "trbase.h" |
|
|
#include "trdata.h" |
|
|
#include "trdata.h" |
|
|
|
|
|
|
|
|
|
|
|
#include "tr/event.h" |
|
|
|
|
|
|
|
|
|
|
|
TR_CLASS(TR_EventDispatcher); |
|
|
|
|
|
|
|
|
#include "tr/event_handler.h" |
|
|
#include "tr/event_handler.h" |
|
|
|
|
|
|
|
|
typedef enum TR_e_EventDispatcherMode { |
|
|
typedef enum TR_e_EventDispatcherMode { |
|
|
@ -46,7 +51,16 @@ TR_CLASS(TR_EventDispatcher) { |
|
|
TR_INSTANCE_INIT(TR_EventDispatcher); |
|
|
TR_INSTANCE_INIT(TR_EventDispatcher); |
|
|
TR_CLASSVARS_DECL(TR_EventDispatcher) {}; |
|
|
TR_CLASSVARS_DECL(TR_EventDispatcher) {}; |
|
|
|
|
|
|
|
|
void TR_eventDispatcherRegisterHandler(TR_EventDispatcher, TR_EventHandler); |
|
|
|
|
|
|
|
|
void TR_eventDispatcherRegisterHandler(TR_EventDispatcher, TR_EventHandler); |
|
|
|
|
|
void TR_eventDispatcherSetHeartbeat(TR_EventDispatcher, time_t); |
|
|
|
|
|
time_t TR_eventDispatcherGetBeatTime(TR_EventDispatcher); |
|
|
|
|
|
time_t TR_eventDispatcherGerDataWaitTime(TR_EventDispatcher); |
|
|
|
|
|
//void TR_eventDispatcherEnqueueEvent(TR_EventDispatcher, TR_Event); |
|
|
|
|
|
void TR_eventDispatcherStart(TR_EventDispatcher); |
|
|
|
|
|
void TR_eventDispatcherStop(TR_EventDispatcher); |
|
|
|
|
|
void TR_eventDispatcherShutdown(TR_EventDispatcher); |
|
|
|
|
|
|
|
|
|
|
|
#define TR_eventDispatcherEnqueueEvent(disp,ev) (TR_queuePut((disp)->events, (ev))) |
|
|
|
|
|
|
|
|
#endif // __TR_EVENT_DISPATCHER_H__ |
|
|
#endif // __TR_EVENT_DISPATCHER_H__ |
|
|
|
|
|
|
|
|
|