mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
add web socket ui
This commit is contained in:
28
Event.cpp
Normal file
28
Event.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user