mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
add web socket ui
This commit is contained in:
parent
3d4e2a275c
commit
b4e9ed7d18
15 changed files with 322 additions and 9 deletions
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);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue