mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
merge
This commit is contained in:
parent
cd9cd84c5b
commit
d4a0076aba
13 changed files with 232 additions and 234 deletions
38
Event.h
38
Event.h
|
@ -10,26 +10,26 @@ typedef std::map<std::string, std::string> EventType;
|
|||
|
||||
namespace i2p
|
||||
{
|
||||
namespace event
|
||||
{
|
||||
class EventListener {
|
||||
public:
|
||||
virtual ~EventListener() {};
|
||||
virtual void HandleEvent(const EventType & ev) = 0;
|
||||
};
|
||||
namespace event
|
||||
{
|
||||
class EventListener {
|
||||
public:
|
||||
virtual ~EventListener() {};
|
||||
virtual void HandleEvent(const EventType & ev) = 0;
|
||||
};
|
||||
|
||||
class EventCore
|
||||
{
|
||||
public:
|
||||
void QueueEvent(const EventType & ev);
|
||||
void SetListener(EventListener * l);
|
||||
|
||||
private:
|
||||
EventListener * m_listener = nullptr;
|
||||
};
|
||||
|
||||
extern EventCore core;
|
||||
}
|
||||
class EventCore
|
||||
{
|
||||
public:
|
||||
void QueueEvent(const EventType & ev);
|
||||
void SetListener(EventListener * l);
|
||||
|
||||
private:
|
||||
EventListener * m_listener = nullptr;
|
||||
};
|
||||
|
||||
extern EventCore core;
|
||||
}
|
||||
}
|
||||
|
||||
void EmitEvent(const EventType & ev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue