diff options
Diffstat (limited to 'src/Event.hpp')
-rw-r--r-- | src/Event.hpp | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/src/Event.hpp b/src/Event.hpp index 3cb5bba..46fdb1e 100644 --- a/src/Event.hpp +++ b/src/Event.hpp @@ -26,52 +26,55 @@ #include <boost/variant/variant.hpp> namespace patchage { +namespace event { -struct DriverAttachmentEvent { - ClientType type; +struct ClientCreated { + ClientID id; + ClientInfo info; }; -struct DriverDetachmentEvent { - ClientType type; +struct ClientDestroyed { + ClientID id; }; -struct ClientCreationEvent { - ClientID id; - ClientInfo info; +struct DriverAttached { + ClientType type; }; -struct ClientDestructionEvent { - ClientID id; +struct DriverDetached { + ClientType type; }; -struct PortCreationEvent { +struct PortCreated { PortID id; PortInfo info; }; -struct PortDestructionEvent { +struct PortDestroyed { PortID id; }; -struct ConnectionEvent { +struct PortsConnected { PortID tail; PortID head; }; -struct DisconnectionEvent { +struct PortsDisconnected { PortID tail; PortID head; }; +} // namespace event + /// An event from drivers that is processed by the GUI -using Event = boost::variant<DriverAttachmentEvent, - DriverDetachmentEvent, - ClientCreationEvent, - ClientDestructionEvent, - PortCreationEvent, - PortDestructionEvent, - ConnectionEvent, - DisconnectionEvent>; +using Event = boost::variant<event::ClientCreated, + event::ClientDestroyed, + event::DriverAttached, + event::DriverDetached, + event::PortCreated, + event::PortDestroyed, + event::PortsConnected, + event::PortsDisconnected>; } // namespace patchage |