summaryrefslogtreecommitdiffstats
path: root/src/PatchageEvent.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-02-17 22:00:26 +0000
committerDavid Robillard <d@drobilla.net>2008-02-17 22:00:26 +0000
commitbbb3abbe4b86a23ef884d38ca299aff13b8f9242 (patch)
tree71c193dc84cacc83daa1aa686a6e655d020f5f74 /src/PatchageEvent.hpp
parenta26faf1aa846e9ab9c5ede7a424549e235cf6fb0 (diff)
downloadpatchage-bbb3abbe4b86a23ef884d38ca299aff13b8f9242.tar.gz
patchage-bbb3abbe4b86a23ef884d38ca299aff13b8f9242.tar.bz2
patchage-bbb3abbe4b86a23ef884d38ca299aff13b8f9242.zip
Remove Jack API dependence from PatchageEvent.
git-svn-id: http://svn.drobilla.net/lad/patchage@1151 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/PatchageEvent.hpp')
-rw-r--r--src/PatchageEvent.hpp24
1 files changed, 13 insertions, 11 deletions
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 <typename P>
- PatchageEvent(Type type, P port)
- : _type(type)
+ PatchageEvent(Driver* driver, Type type, P port)
+ : _driver(driver)
, _port_1(port)
+ , _type(type)
{}
template <typename P>
- 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<PatchagePort> find_port(const Patchage* patchage, const PortRef& ref);
+ uint8_t _type;
};