summaryrefslogtreecommitdiffstats
path: root/src/libs/shared/LV2URIMap.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-07-28 21:56:03 +0000
committerDavid Robillard <d@drobilla.net>2008-07-28 21:56:03 +0000
commita6fb6a0289ea47692d87f3e0200532a426f8e60d (patch)
tree0e497255eb8a263ff9cca87b2ed125b71144cacb /src/libs/shared/LV2URIMap.hpp
parent8e2ba26101828dcf310e0a43ace7aa68dafd3b16 (diff)
downloadingen-a6fb6a0289ea47692d87f3e0200532a426f8e60d.tar.gz
ingen-a6fb6a0289ea47692d87f3e0200532a426f8e60d.tar.bz2
ingen-a6fb6a0289ea47692d87f3e0200532a426f8e60d.zip
Simply global memory management crap by using shared_ptr in the World struct (it's not C anyway, might as well).
Properly support LV2 events from plugin UIs over OSC and directly (w/ monolithic UI/engine). Fix crashes on node destruction with monolithic UI/engine. Resolves ticket #177. git-svn-id: http://svn.drobilla.net/lad/ingen@1293 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/shared/LV2URIMap.hpp')
-rw-r--r--src/libs/shared/LV2URIMap.hpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/libs/shared/LV2URIMap.hpp b/src/libs/shared/LV2URIMap.hpp
index 0c947560..35130066 100644
--- a/src/libs/shared/LV2URIMap.hpp
+++ b/src/libs/shared/LV2URIMap.hpp
@@ -25,6 +25,7 @@
#include <map>
#include <string>
+#include <boost/utility.hpp>
#include <slv2/slv2.h>
#include "common/lv2ext/lv2_uri_map.h"
@@ -32,22 +33,28 @@ namespace Ingen {
namespace Shared {
-/** Stuff that may need to be passed to an LV2 plugin (i.e. LV2 features).
+/** Implementation of the LV2 URI Map extension
*/
-class LV2URIMap {
+class LV2URIMap : public boost::noncopyable {
public:
LV2URIMap();
+
+ LV2_Feature* feature() { return &uri_map_feature; }
+
+ uint32_t uri_to_id(const char* map,
+ const char* uri);
+private:
typedef std::map<std::string, uint32_t> URIMap;
+ static uint32_t uri_map_uri_to_id(LV2_URI_Map_Callback_Data callback_data,
+ const char* map,
+ const char* uri);
+
LV2_Feature uri_map_feature;
LV2_URI_Map_Feature uri_map_feature_data;
URIMap uri_map;
uint32_t next_uri_id;
-
- static uint32_t uri_map_uri_to_id(LV2_URI_Map_Callback_Data callback_data,
- const char* map,
- const char* uri);
};