I2P: End-to-End encrypted and anonymous Internet https://i2pd.website/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
431 B

#include "Event.h"
#include "Log.h"
namespace i2p
{
8 years ago
namespace event
{
EventCore core;
8 years ago
void EventCore::SetListener(EventListener * l)
{
m_listener = l;
LogPrint(eLogInfo, "Event: listener set");
}
8 years ago
void EventCore::QueueEvent(const EventType & ev)
{
if(m_listener)
m_listener->HandleEvent(ev);
}
}
}
void EmitEvent(const EventType & e)
{
8 years ago
#ifdef WITH_EVENTS
i2p::event::core.QueueEvent(e);
#endif
}