From bbb3abbe4b86a23ef884d38ca299aff13b8f9242 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Feb 2008 22:00:26 +0000 Subject: Remove Jack API dependence from PatchageEvent. git-svn-id: http://svn.drobilla.net/lad/patchage@1151 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchageEvent.hpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'src/PatchageEvent.hpp') diff --git a/src/PatchageEvent.hpp b/src/PatchageEvent.hpp index 0d982bf..bffc3c8 100644 --- a/src/PatchageEvent.hpp +++ b/src/PatchageEvent.hpp @@ -26,6 +26,7 @@ #include "PatchagePort.hpp" class Patchage; +class Driver; /** A Driver event to be processed by the GUI thread. @@ -41,29 +42,29 @@ public: DISCONNECTION }; - PatchageEvent(Type type=NULL_EVENT) - : _type(type) + PatchageEvent(Driver* d = NULL, Type type=NULL_EVENT) + : _driver(d) + , _type(type) {} template - PatchageEvent(Type type, P port) - : _type(type) + PatchageEvent(Driver* driver, Type type, P port) + : _driver(driver) , _port_1(port) + , _type(type) {} template - PatchageEvent(Type type, P port_1, P port_2) - : _type(type) + PatchageEvent(Driver* driver, Type type, P port_1, P port_2) + : _driver(driver) , _port_1(port_1, false) , _port_2(port_2, true) + , _type(type) {} void execute(Patchage* patchage); inline Type type() const { return (Type)_type; } - -private: - uint8_t _type; struct PortRef { PortRef() : type(NULL_PORT_REF) { memset(&id, 0, sizeof(id)); } @@ -92,10 +93,11 @@ private: } id; }; +private: + Driver* _driver; PortRef _port_1; PortRef _port_2; - - boost::shared_ptr find_port(const Patchage* patchage, const PortRef& ref); + uint8_t _type; }; -- cgit v1.2.1