i2pd/Event.cpp

29 lines
436 B
C++
Raw Normal View History

2016-10-20 16:12:15 +03:00
#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)
{
i2p::event::core.QueueEvent(e);
}