mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2024-10-31 09:20:38 +00:00
31 lines
431 B
C++
31 lines
431 B
C++
#include "Event.h"
|
|
#include "Log.h"
|
|
|
|
namespace i2p
|
|
{
|
|
namespace event
|
|
{
|
|
EventCore core;
|
|
|
|
void EventCore::SetListener(EventListener * l)
|
|
{
|
|
m_listener = l;
|
|
LogPrint(eLogInfo, "Event: listener set");
|
|
}
|
|
|
|
void EventCore::QueueEvent(const EventType & ev)
|
|
{
|
|
if(m_listener)
|
|
m_listener->HandleEvent(ev);
|
|
}
|
|
}
|
|
}
|
|
|
|
void EmitEvent(const EventType & e)
|
|
{
|
|
#ifdef WITH_EVENTS
|
|
i2p::event::core.QueueEvent(e);
|
|
#endif
|
|
}
|
|
|