summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/PluginModel.cpp33
-rw-r--r--src/libs/client/PluginModel.hpp4
2 files changed, 35 insertions, 2 deletions
diff --git a/src/libs/client/PluginModel.cpp b/src/libs/client/PluginModel.cpp
index 6246a69e..32d9fd69 100644
--- a/src/libs/client/PluginModel.cpp
+++ b/src/libs/client/PluginModel.cpp
@@ -36,12 +36,43 @@ Redland::World* PluginModel::_rdf_world = NULL;
string
-PluginModel::default_node_name()
+PluginModel::default_node_symbol()
{
return Raul::Path::nameify(_symbol);
}
+string
+PluginModel::human_name()
+{
+#ifdef HAVE_SLV2
+ if (_slv2_plugin) {
+ SLV2Value name = slv2_plugin_get_name(_slv2_plugin);
+ string ret = slv2_value_as_string(name);
+ slv2_value_free(name);
+ return ret;
+ }
+#endif
+ return default_node_symbol();
+}
+
+
+string
+PluginModel::port_human_name(uint32_t index)
+{
+#ifdef HAVE_SLV2
+ if (_slv2_plugin) {
+ SLV2Port port = slv2_port(index);
+ SLV2Value name = slv2_port_get_name(_slv2_plugin, port);
+ string ret = slv2_value_as_string(name);
+ slv2_value_free(name);
+ return ret;
+ }
+#endif
+ return "";
+}
+
+
#ifdef HAVE_SLV2
bool
PluginModel::has_ui() const
diff --git a/src/libs/client/PluginModel.hpp b/src/libs/client/PluginModel.hpp
index f8630e94..e2137e19 100644
--- a/src/libs/client/PluginModel.hpp
+++ b/src/libs/client/PluginModel.hpp
@@ -83,7 +83,9 @@ public:
}
}
- string default_node_name();
+ string default_node_symbol();
+ string human_name();
+ string port_human_name(uint32_t index);
#ifdef HAVE_SLV2
static SLV2World slv2_world() { return _slv2_world; }