summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ClientStore.cpp46
-rw-r--r--src/client/ClientStore.hpp20
-rw-r--r--src/client/ConnectionModel.hpp10
-rw-r--r--src/client/DeprecatedLoader.cpp96
-rw-r--r--src/client/DeprecatedLoader.hpp10
-rw-r--r--src/client/HTTPClientReceiver.cpp22
-rw-r--r--src/client/HTTPClientReceiver.hpp10
-rw-r--r--src/client/HTTPEngineSender.cpp12
-rw-r--r--src/client/HTTPEngineSender.hpp48
-rw-r--r--src/client/NodeModel.cpp20
-rw-r--r--src/client/NodeModel.hpp28
-rw-r--r--src/client/OSCClientReceiver.cpp38
-rw-r--r--src/client/OSCClientReceiver.hpp14
-rw-r--r--src/client/OSCEngineSender.cpp22
-rw-r--r--src/client/OSCEngineSender.hpp48
-rw-r--r--src/client/ObjectModel.cpp10
-rw-r--r--src/client/ObjectModel.hpp30
-rw-r--r--src/client/PatchModel.cpp16
-rw-r--r--src/client/PatchModel.hpp24
-rw-r--r--src/client/PluginModel.cpp16
-rw-r--r--src/client/PluginModel.hpp14
-rw-r--r--src/client/PluginUI.cpp14
-rw-r--r--src/client/PluginUI.hpp6
-rw-r--r--src/client/PortModel.cpp8
-rw-r--r--src/client/PortModel.hpp28
-rw-r--r--src/client/SigClientInterface.hpp82
-rw-r--r--src/client/ThreadedSigClientInterface.cpp8
-rw-r--r--src/client/ThreadedSigClientInterface.hpp76
-rw-r--r--src/client/client.cpp8
-rw-r--r--src/client/client.hpp6
30 files changed, 395 insertions, 395 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index 21ace7de..0db40a8d 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -86,10 +86,10 @@ ClientStore::add_object(SharedPtr<ObjectModel> object)
object->set_parent(parent);
parent->add_child(object);
assert(parent && (object->parent() == parent));
-
+
(*this)[object->path()] = object;
signal_new_object.emit(object);
-
+
#if 0
resolve_variable_orphans(parent);
resolve_orphans(parent);
@@ -198,7 +198,7 @@ void
ClientStore::add_plugin(SharedPtr<PluginModel> pm)
{
// FIXME: dupes? merge, like with objects?
-
+
(*_plugins)[pm->uri()] = pm;
signal_new_plugin(pm);
//cerr << "Plugin: " << pm->uri() << ", # plugins: " << _plugins->size() << endl;
@@ -221,7 +221,7 @@ ClientStore::rename(const Path& old_path_str, const Path& new_path_str)
{
Path old_path(old_path_str);
Path new_path(new_path_str);
-
+
iterator parent = find(old_path);
if (parent == end()) {
cerr << "[Store] Failed to find object " << old_path << " to rename." << endl;
@@ -229,16 +229,16 @@ ClientStore::rename(const Path& old_path_str, const Path& new_path_str)
}
iterator descendants_end = find_descendants_end(parent);
-
+
SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > removed
= yank(parent, descendants_end);
-
+
assert(removed->size() > 0);
for (Table<Path, SharedPtr<Shared::GraphObject> >::iterator i = removed->begin(); i != removed->end(); ++i) {
const Path& child_old_path = i->first;
assert(Path::descendant_comparator(old_path, child_old_path));
-
+
Path child_new_path;
if (child_old_path == old_path)
child_new_path = new_path;
@@ -281,7 +281,7 @@ ClientStore::new_object(const Shared::GraphObject* object)
new_patch(patch->path(), patch->internal_polyphony());
return true;
}
-
+
const Node* node = dynamic_cast<const Node*>(object);
if (node) {
new_node(node->path(), node->plugin()->uri());
@@ -340,7 +340,7 @@ ClientStore::clear_patch(const Path& path)
if (i != end()) {
assert((*i).second->path() == path);
SharedPtr<PatchModel> patch = PtrCast<PatchModel>(i->second);
-
+
iterator first_descendant = i;
++first_descendant;
iterator descendants_end = find_descendants_end(i);
@@ -380,7 +380,7 @@ ClientStore::set_variable(const URI& subject_path, const URI& predicate, const A
}
}
-
+
void
ClientStore::set_property(const URI& subject_path, const URI& predicate, const Atom& value)
{
@@ -416,7 +416,7 @@ ClientStore::set_voice_value(const Path& port_path, uint32_t voice, const Atom&
cerr << "ERROR: poly control change for nonexistant port " << port_path << endl;
}
-
+
void
ClientStore::activity(const Path& path)
{
@@ -435,13 +435,13 @@ ClientStore::connection_patch(const Path& src_port_path, const Path& dst_port_pa
if (src_port_path.parent() == dst_port_path.parent())
patch = PtrCast<PatchModel>(this->object(src_port_path.parent()));
-
+
if (!patch && src_port_path.parent() == dst_port_path.parent().parent())
patch = PtrCast<PatchModel>(this->object(src_port_path.parent()));
if (!patch && src_port_path.parent().parent() == dst_port_path.parent())
patch = PtrCast<PatchModel>(this->object(dst_port_path.parent()));
-
+
if (!patch)
patch = PtrCast<PatchModel>(this->object(src_port_path.parent().parent()));
@@ -458,8 +458,8 @@ ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_
{
SharedPtr<PortModel> src_port = PtrCast<PortModel>(object(src_port_path));
SharedPtr<PortModel> dst_port = PtrCast<PortModel>(object(dst_port_path));
-
- if (src_port && dst_port) {
+
+ if (src_port && dst_port) {
assert(src_port->parent());
assert(dst_port->parent());
@@ -467,7 +467,7 @@ ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_
assert(patch);
SharedPtr<ConnectionModel> cm(new ConnectionModel(src_port, dst_port));
-
+
src_port->connected_to(dst_port);
dst_port->connected_to(src_port);
@@ -480,7 +480,7 @@ ClientStore::attempt_connection(const Path& src_port_path, const Path& dst_port_
return false;
}
-
+
void
ClientStore::connect(const Path& src_port_path, const Path& dst_port_path)
{
@@ -493,7 +493,7 @@ ClientStore::disconnect(const Path& src_port_path, const Path& dst_port_path)
{
// Find the ports and create a ConnectionModel just to get at the parent path
// finding logic in ConnectionModel. So I'm lazy.
-
+
SharedPtr<PortModel> src_port = PtrCast<PortModel>(object(src_port_path));
SharedPtr<PortModel> dst_port = PtrCast<PortModel>(object(dst_port_path));
@@ -501,14 +501,14 @@ ClientStore::disconnect(const Path& src_port_path, const Path& dst_port_path)
src_port->disconnected_from(dst_port);
else
cerr << "WARNING: Disconnection from nonexistant src port " << src_port_path << endl;
-
+
if (dst_port)
dst_port->disconnected_from(dst_port);
else
cerr << "WARNING: Disconnection from nonexistant dst port " << dst_port_path << endl;
SharedPtr<PatchModel> patch = connection_patch(src_port_path, dst_port_path);
-
+
if (patch)
patch->remove_connection(src_port_path, dst_port_path);
else
diff --git a/src/client/ClientStore.hpp b/src/client/ClientStore.hpp
index b8451fd2..48f6dad1 100644
--- a/src/client/ClientStore.hpp
+++ b/src/client/ClientStore.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -65,7 +65,7 @@ public:
SharedPtr<const Plugins> plugins() const { return _plugins; }
SharedPtr<Plugins> plugins() { return _plugins; }
void set_plugins(SharedPtr<Plugins> p) { _plugins = p; }
-
+
// CommonInterface
void new_plugin(const Raul::URI& uri, const Raul::URI& type_uri, const Raul::Symbol& symbol);
bool new_object(const Shared::GraphObject* object);
@@ -80,9 +80,9 @@ public:
void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path);
void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path);
void destroy(const Raul::Path& path);
-
- sigc::signal<void, SharedPtr<ObjectModel> > signal_new_object;
- sigc::signal<void, SharedPtr<PluginModel> > signal_new_plugin;
+
+ sigc::signal<void, SharedPtr<ObjectModel> > signal_new_object;
+ sigc::signal<void, SharedPtr<PluginModel> > signal_new_plugin;
private:
@@ -90,7 +90,7 @@ private:
void add_object(SharedPtr<ObjectModel> object);
SharedPtr<ObjectModel> remove_object(const Raul::Path& path);
-
+
void add_plugin(SharedPtr<PluginModel> plugin);
SharedPtr<PatchModel> connection_patch(const Raul::Path& src_port_path, const Raul::Path& dst_port_path);
@@ -102,9 +102,9 @@ private:
void object_renamed(const Raul::Path& old_path, const Raul::Path& new_path);
void clear_patch(const Raul::Path& path);
void activity(const Raul::Path& path);
-
+
bool attempt_connection(const Raul::Path& src_port_path, const Raul::Path& dst_port_path, bool add_orphan=false);
-
+
bool _handle_orphans;
SharedPtr<Shared::EngineInterface> _engine;
diff --git a/src/client/ConnectionModel.hpp b/src/client/ConnectionModel.hpp
index d0f98ec7..7f3223c9 100644
--- a/src/client/ConnectionModel.hpp
+++ b/src/client/ConnectionModel.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -50,7 +50,7 @@ public:
const Raul::Path src_port_path() const { return _src_port->path(); }
const Raul::Path dst_port_path() const { return _dst_port->path(); }
-
+
private:
friend class ClientStore;
@@ -64,7 +64,7 @@ private:
assert(_dst_port->parent());
assert(_src_port->path() != _dst_port->path());
}
-
+
const SharedPtr<PortModel> _src_port;
const SharedPtr<PortModel> _dst_port;
};
diff --git a/src/client/DeprecatedLoader.cpp b/src/client/DeprecatedLoader.cpp
index c0591609..845c2ce7 100644
--- a/src/client/DeprecatedLoader.cpp
+++ b/src/client/DeprecatedLoader.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -42,7 +42,7 @@ namespace Ingen {
using namespace Shared;
namespace Client {
-
+
/** A single port's control setting (in a preset).
*
* \ingroup IngenClient
@@ -56,7 +56,7 @@ public:
{
assert(_port_path.find("//") == string::npos);
}
-
+
const Raul::Path& port_path() const { return _port_path; }
void port_path(const string& p) { _port_path = p; }
float value() const { return _value; }
@@ -118,7 +118,7 @@ string
DeprecatedLoader::translate_load_path(const string& path)
{
std::map<string,string>::iterator t = _load_path_translations.find(path);
-
+
if (t != _load_path_translations.end()) {
assert(Path::is_valid((*t).second));
return (*t).second;
@@ -161,12 +161,12 @@ DeprecatedLoader::add_variable(GraphObject::Properties& data, string old_key, st
// Hack to make module-x and module-y set as floats
char* c_val = strdup(value.c_str());
char* endptr = NULL;
-
+
// FIXME: locale kludges
char* locale = strdup(setlocale(LC_NUMERIC, NULL));
-
+
float fval = strtof(c_val, &endptr);
-
+
setlocale(LC_NUMERIC, locale);
free(locale);
@@ -174,7 +174,7 @@ DeprecatedLoader::add_variable(GraphObject::Properties& data, string old_key, st
data[key] = Atom(fval);
else
data[key] = Atom(Atom::STRING, value);
-
+
free(c_val);
}
}
@@ -220,14 +220,14 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
path = *parent_path;
if (name)
path = path.base() + *name;
-
+
size_t poly = 0;
-
+
/* Use parameter overridden polyphony, if given */
GraphObject::Properties::iterator poly_param = initial_data.find("ingen:polyphony");
if (poly_param != initial_data.end() && poly_param->second.type() == Atom::INT)
poly = poly_param->second.get_int32();
-
+
if (initial_data.find("filename") == initial_data.end())
initial_data["filename"] = Atom(filename.c_str()); // FIXME: URL?
@@ -258,7 +258,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
// Load Patch attributes
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
+
if ((!xmlStrcmp(cur->name, (const xmlChar*)"name"))) {
if (!merge && parent_path && !name && key) {
if (parent_path)
@@ -280,13 +280,13 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
if (key)
add_variable(initial_data, (const char*)cur->name, (const char*)key);
}
-
+
xmlFree(key);
key = NULL; // Avoid a (possible?) double free
cur = cur->next;
}
-
+
if (poly == 0)
poly = 1;
@@ -302,7 +302,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
while (cur != NULL) {
if ((!xmlStrcmp(cur->name, (const xmlChar*)"node")))
load_node(path, doc, cur);
-
+
cur = cur->next;
}
@@ -314,7 +314,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
}
cur = cur->next;
}
-
+
// Load connections
cur = xmlDocGetRootElement(doc)->xmlChildrenNode;
while (cur != NULL) {
@@ -323,7 +323,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
}
cur = cur->next;
}
-
+
// Load presets (control values)
cur = xmlDocGetRootElement(doc)->xmlChildrenNode;
while (cur != NULL) {
@@ -343,7 +343,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
}
cur = cur->next;
}
-
+
xmlFreeDoc(doc);
xmlCleanupParser();
@@ -367,12 +367,12 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
{
xmlChar* key;
xmlNodePtr cur = node->xmlChildrenNode;
-
+
string path = "";
bool polyphonic = false;
string plugin_uri;
-
+
string plugin_type; // deprecated
string library_name; // deprecated
string plugin_label; // deprecated
@@ -381,7 +381,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
+
if ((!xmlStrcmp(cur->name, (const xmlChar*)"name"))) {
path = parent.base() + nameify_if_invalid((char*)key);
} else if ((!xmlStrcmp(cur->name, (const xmlChar*)"polyphonic"))) {
@@ -397,14 +397,14 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
} else if ((!xmlStrcmp(cur->name, (const xmlChar*)"port"))) {
#if 0
xmlNodePtr child = cur->xmlChildrenNode;
-
+
string port_name;
float user_min = 0.0;
float user_max = 0.0;
-
+
while (child != NULL) {
key = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
-
+
if ((!xmlStrcmp(child->name, (const xmlChar*)"name"))) {
port_name = nameify_if_invalid((char*)key);
} else if ((!xmlStrcmp(child->name, (const xmlChar*)"user-min"))) {
@@ -412,10 +412,10 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
} else if ((!xmlStrcmp(child->name, (const xmlChar*)"user-max"))) {
user_max = atof((char*)key);
}
-
+
xmlFree(key);
key = NULL; // Avoid a (possible?) double free
-
+
child = child->next;
}
@@ -439,7 +439,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
cur = cur->next;
}
-
+
if (path == "") {
cerr << "[DeprecatedLoader] Malformed patch file (node tag has empty children)" << endl;
cerr << "[DeprecatedLoader] Node ignored." << endl;
@@ -478,7 +478,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
if (is_port) {
const string old_path = path;
const string new_path = (Path::is_valid(old_path) ? old_path : Path::pathify(old_path));
-
+
if (!Path::is_valid(old_path))
cerr << "WARNING: Translating invalid port path \"" << old_path << "\" => \""
<< new_path << "\"" << endl;
@@ -513,7 +513,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
_engine->new_node(path, plugin_uri);
_engine->set_variable(path, "ingen:polyphonic", bool(polyphonic));
-
+
for (GraphObject::Properties::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
_engine->set_variable(path, i->first, i->second);
@@ -538,16 +538,16 @@ DeprecatedLoader::load_subpatch(const string& base_filename, const Path& parent,
{
xmlChar *key;
xmlNodePtr cur = subpatch->xmlChildrenNode;
-
+
string name = "";
string filename = "";
size_t poly = 0;
-
+
GraphObject::Properties initial_data;
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
+
if ((!xmlStrcmp(cur->name, (const xmlChar*)"name"))) {
name = (const char*)key;
} else if ((!xmlStrcmp(cur->name, (const xmlChar*)"polyphony"))) {
@@ -568,7 +568,7 @@ DeprecatedLoader::load_subpatch(const string& base_filename, const Path& parent,
// load_patch sets the passed variable last, so values stored in the parent
// will override values stored in the child patch file
load_patch(filename, false, parent, Symbol(nameify_if_invalid(name)), initial_data, false);
-
+
return false;
}
@@ -580,12 +580,12 @@ DeprecatedLoader::load_connection(const Path& parent, xmlDocPtr doc, const xmlNo
{
xmlChar *key;
xmlNodePtr cur = node->xmlChildrenNode;
-
+
string source_node, source_port, dest_node, dest_port;
-
+
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
-
+
if ((!xmlStrcmp(cur->name, (const xmlChar*)"source-node"))) {
source_node = (char*)key;
} else if ((!xmlStrcmp(cur->name, (const xmlChar*)"source-port"))) {
@@ -595,7 +595,7 @@ DeprecatedLoader::load_connection(const Path& parent, xmlDocPtr doc, const xmlNo
} else if ((!xmlStrcmp(cur->name, (const xmlChar*)"destination-port"))) {
dest_port = (char*)key;
}
-
+
xmlFree(key);
key = NULL; // Avoid a (possible?) double free
@@ -613,11 +613,11 @@ DeprecatedLoader::load_connection(const Path& parent, xmlDocPtr doc, const xmlNo
source_port = nameify_if_invalid(source_port);
dest_node = nameify_if_invalid(dest_node);
dest_port = nameify_if_invalid(dest_port);
-
+
_engine->connect(
translate_load_path(parent.base() + source_node +"/"+ source_port),
translate_load_path(parent.base() + dest_node +"/"+ dest_port));
-
+
return true;
}
@@ -631,7 +631,7 @@ DeprecatedLoader::load_preset(const Path& parent, xmlDocPtr doc, const xmlNodePt
xmlChar* key;
SharedPtr<PresetModel> pm(new PresetModel(parent.base()));
-
+
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
@@ -640,13 +640,13 @@ DeprecatedLoader::load_preset(const Path& parent, xmlDocPtr doc, const xmlNodePt
pm->name((char*)key);
} else if ((!xmlStrcmp(cur->name, (const xmlChar*)"control"))) {
xmlNodePtr child = cur->xmlChildrenNode;
-
+
string node_name = "", port_name = "";
float val = 0.0;
-
+
while (child != NULL) {
key = xmlNodeListGetString(doc, child->xmlChildrenNode, 1);
-
+
if ((!xmlStrcmp(child->name, (const xmlChar*)"node-name"))) {
node_name = (char*)key;
} else if ((!xmlStrcmp(child->name, (const xmlChar*)"port-name"))) {
@@ -654,10 +654,10 @@ DeprecatedLoader::load_preset(const Path& parent, xmlDocPtr doc, const xmlNodePt
} else if ((!xmlStrcmp(child->name, (const xmlChar*)"value"))) {
val = atof((char*)key);
}
-
+
xmlFree(key);
key = NULL; // Avoid a (possible?) double free
-
+
child = child->next;
}
@@ -665,7 +665,7 @@ DeprecatedLoader::load_preset(const Path& parent, xmlDocPtr doc, const xmlNodePt
if (node_name != "")
node_name = nameify_if_invalid(node_name);
port_name = nameify_if_invalid(port_name);
-
+
if (port_name == "") {
string msg = "Unable to parse control in patch file ( node = ";
msg.append(node_name).append(", port = ").append(port_name).append(")");
diff --git a/src/client/DeprecatedLoader.hpp b/src/client/DeprecatedLoader.hpp
index c229017c..253bc12d 100644
--- a/src/client/DeprecatedLoader.hpp
+++ b/src/client/DeprecatedLoader.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -40,7 +40,7 @@ class NodeModel;
class ConnectionModel;
class PresetModel; // defined in DeprecatedLoader.cpp
-
+
/** Loads deprecated (XML) patch files (from the Om days).
*
* \ingroup IngenClient
@@ -75,7 +75,7 @@ private:
bool load_node(const Raul::Path& parent, xmlDocPtr doc, const xmlNodePtr cur);
bool load_connection(const Raul::Path& parent, xmlDocPtr doc, const xmlNodePtr cur);
bool load_subpatch(const std::string& base_filename, const Raul::Path& parent, xmlDocPtr doc, const xmlNodePtr cur);
-
+
SharedPtr<PresetModel> load_preset(const Raul::Path& parent, xmlDocPtr doc, const xmlNodePtr cur);
};
diff --git a/src/client/HTTPClientReceiver.cpp b/src/client/HTTPClientReceiver.cpp
index cad55107..9e954236 100644
--- a/src/client/HTTPClientReceiver.cpp
+++ b/src/client/HTTPClientReceiver.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -68,12 +68,12 @@ HTTPClientReceiver::Listener::Listener(HTTPClientReceiver* receiver, const std::
cout << "HTTP listen URI: " << uri << " port: " << port << endl;
struct sockaddr_in servaddr;
-
+
// Create listen address
memset(&servaddr, 0, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(port);
-
+
// Create listen socket
if ((_sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
cerr << "Error creating listening socket: %s" << strerror(errno) << endl;
@@ -138,7 +138,7 @@ HTTPClientReceiver::message_callback(SoupSession* session, SoupMessage* msg, voi
const string path = soup_message_get_uri(msg)->path;
if (path == Path::root_uri) {
me->_target->response_ok(0);
-
+
} else if (path == "/plugins") {
if (msg->response_body->data == NULL) {
cout << "ERROR: Empty response" << endl;
@@ -194,19 +194,19 @@ HTTPClientReceiver::start(bool dump)
_parser = SharedPtr<Parser>(new_parser());
}
}
-
+
_session = soup_session_sync_new();
SoupMessage* msg;
-
+
msg = soup_message_new("GET", _url.c_str());
soup_session_queue_message(_session, msg, message_callback, this);
-
+
msg = soup_message_new("GET", (_url + "/plugins").c_str());
soup_session_queue_message(_session, msg, message_callback, this);
-
+
msg = soup_message_new("GET", (_url + "/patch").c_str());
soup_session_queue_message(_session, msg, message_callback, this);
-
+
msg = soup_message_new("GET", (_url + "/stream").c_str());
soup_session_queue_message(_session, msg, message_callback, this);
}
diff --git a/src/client/HTTPClientReceiver.hpp b/src/client/HTTPClientReceiver.hpp
index c0f979f4..afe99dc2 100644
--- a/src/client/HTTPClientReceiver.hpp
+++ b/src/client/HTTPClientReceiver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -45,7 +45,7 @@ public:
void start(bool dump);
void stop();
-
+
private:
static void message_callback(SoupSession* session, SoupMessage* msg, void* ptr);
@@ -61,7 +61,7 @@ private:
int _sock;
HTTPClientReceiver* _receiver;
};
-
+
friend class Listener;
SharedPtr<Listener> _listener;
diff --git a/src/client/HTTPEngineSender.cpp b/src/client/HTTPEngineSender.cpp
index a586df72..0bedb56f 100644
--- a/src/client/HTTPEngineSender.cpp
+++ b/src/client/HTTPEngineSender.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -82,19 +82,19 @@ HTTPEngineSender::load_plugins()
void
-HTTPEngineSender::activate()
+HTTPEngineSender::activate()
{
}
void
-HTTPEngineSender::deactivate()
+HTTPEngineSender::deactivate()
{
}
void
-HTTPEngineSender::quit()
+HTTPEngineSender::quit()
{
}
diff --git a/src/client/HTTPEngineSender.hpp b/src/client/HTTPEngineSender.hpp
index 55d1646a..8b4d1a4f 100644
--- a/src/client/HTTPEngineSender.hpp
+++ b/src/client/HTTPEngineSender.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2008 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -39,9 +39,9 @@ class HTTPEngineSender : public Shared::EngineInterface {
public:
HTTPEngineSender(const Raul::URI& engine_url);
~HTTPEngineSender();
-
+
Raul::URI uri() const { return _engine_url; }
-
+
inline int32_t next_id()
{ int32_t ret = (_id == -1) ? -1 : _id++; return ret; }
@@ -52,13 +52,13 @@ public:
/* *** EngineInterface implementation below here *** */
-
+
void enable() { _enabled = true; }
void disable() { _enabled = false; }
-
+
void bundle_begin() { transfer_begin(); }
void bundle_end() { transfer_end(); }
-
+
void transfer_begin() {}
void transfer_end() {}
@@ -71,59 +71,59 @@ public:
void activate();
void deactivate();
void quit();
-
+
// Object commands
-
+
virtual bool new_object(const Shared::GraphObject* object);
virtual void new_patch(const Raul::Path& path,
uint32_t poly);
-
+
virtual void new_node(const Raul::Path& path,
const Raul::URI& plugin_uri);
-
+
virtual void new_port(const Raul::Path& path,
const Raul::URI& type,
uint32_t index,
bool is_output);
-
+
virtual void clear_patch(const Raul::Path& path);
-
+
virtual void destroy(const Raul::Path& path);
-
+
virtual void rename(const Raul::Path& old_path,
const Raul::Path& new_path);
-
+
virtual void connect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void disconnect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void disconnect_all(const Raul::Path& parent_patch_path,
const Raul::Path& path);
-
+
virtual void set_variable(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_port_value(const Raul::Path& port_path,
const Raul::Atom& value);
-
+
virtual void set_voice_value(const Raul::Path& port_path,
uint32_t voice,
const Raul::Atom& value);
-
+
virtual void set_program(const Raul::Path& node_path,
uint32_t bank,
uint32_t program);
virtual void midi_learn(const Raul::Path& node_path);
-
+
// Requests //
void ping();
diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp
index 97743098..da35fbe7 100644
--- a/src/client/NodeModel.cpp
+++ b/src/client/NodeModel.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -109,7 +109,7 @@ void
NodeModel::add_child(SharedPtr<ObjectModel> c)
{
assert(c->parent().get() == this);
-
+
//ObjectModel::add_child(c);
SharedPtr<PortModel> pm = PtrCast<PortModel>(c);
@@ -123,7 +123,7 @@ NodeModel::remove_child(SharedPtr<ObjectModel> c)
{
assert(c->path().is_child_of(_path));
assert(c->parent().get() == this);
-
+
//bool ret = ObjectModel::remove_child(c);
SharedPtr<PortModel> pm = PtrCast<PortModel>(c);
@@ -143,7 +143,7 @@ NodeModel::add_port(SharedPtr<PortModel> pm)
assert(pm->parent().get() == this);
Ports::iterator existing = find(_ports.begin(), _ports.end(), pm);
-
+
// Store should have handled this by merging the two
assert(existing == _ports.end());
@@ -161,7 +161,7 @@ NodeModel::get_port(const string& port_name) const
return (*i);
return SharedPtr<PortModel>();
}
-
+
Shared::Port*
NodeModel::port(uint32_t index) const
@@ -175,7 +175,7 @@ void
NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max) const
{
assert(port->parent().get() == this);
-
+
#ifdef HAVE_SLV2
// Plugin value first
if (_plugin && _plugin->type() == PluginModel::LV2) {
@@ -187,7 +187,7 @@ NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max) c
_num_values = slv2_plugin_get_num_ports(_plugin->slv2_plugin());
_min_values = new float[_num_values];
_max_values = new float[_num_values];
- slv2_plugin_get_port_ranges_float(_plugin->slv2_plugin(),
+ slv2_plugin_get_port_ranges_float(_plugin->slv2_plugin(),
_min_values, _max_values, 0);
}
@@ -210,7 +210,7 @@ NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max) c
max = min + 1.0;
}
-
+
void
NodeModel::set(SharedPtr<ObjectModel> model)
{
diff --git a/src/client/NodeModel.hpp b/src/client/NodeModel.hpp
index cc9811fd..5d220a61 100644
--- a/src/client/NodeModel.hpp
+++ b/src/client/NodeModel.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -37,7 +37,7 @@ namespace Client {
class PluginModel;
class ClientStore;
-
+
/** Node model class, used by the client to store engine's state.
*
* \ingroup IngenClient
@@ -47,27 +47,27 @@ class NodeModel : public ObjectModel, virtual public Ingen::Shared::Node
public:
NodeModel(const NodeModel& copy);
virtual ~NodeModel();
-
+
typedef std::vector< SharedPtr<PortModel> > Ports;
SharedPtr<PortModel> get_port(const std::string& port_name) const;
-
+
Shared::Port* port(uint32_t index) const;
-
+
const Raul::URI& plugin_uri() const { return _plugin_uri; }
const Shared::Plugin* plugin() const { return _plugin.get(); }
uint32_t num_ports() const { return _ports.size(); }
const Ports& ports() const { return _ports; }
-
+
void port_value_range(SharedPtr<PortModel> port, float& min, float& max) const;
-
+
// Signals
- sigc::signal<void, SharedPtr<PortModel> > signal_new_port;
- sigc::signal<void, SharedPtr<PortModel> > signal_removed_port;
-
+ sigc::signal<void, SharedPtr<PortModel> > signal_new_port;
+ sigc::signal<void, SharedPtr<PortModel> > signal_removed_port;
+
protected:
friend class ClientStore;
-
+
NodeModel(const Raul::URI& plugin_uri, const Raul::Path& path);
NodeModel(SharedPtr<PluginModel> plugin, const Raul::Path& path);
@@ -82,7 +82,7 @@ protected:
void set(SharedPtr<ObjectModel> model);
virtual void clear();
-
+
Ports _ports; ///< Vector of ports (not a Table to preserve order)
Raul::URI _plugin_uri; ///< Plugin URI (if PluginModel is unknown)
SharedPtr<PluginModel> _plugin; ///< The plugin this node is an instance of
diff --git a/src/client/OSCClientReceiver.cpp b/src/client/OSCClientReceiver.cpp
index 445c92cc..66488df2 100644
--- a/src/client/OSCClientReceiver.cpp
+++ b/src/client/OSCClientReceiver.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -59,7 +59,7 @@ OSCClientReceiver::start(bool dump_osc)
}
// Find a free port
- if (!_st) {
+ if (!_st) {
_st = lo_server_thread_new(NULL, lo_error_cb);
_listen_port = lo_server_thread_get_port(_st);
}
@@ -99,13 +99,13 @@ int
OSCClientReceiver::generic_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data)
{
printf("[OSCMsg] %s (%s)\t", path, types);
-
+
for (int i=0; i < argc; ++i) {
lo_arg_pp(lo_type(types[i]), argv[i]);
printf("\t");
}
printf("\n");
-
+
/*for (int i=0; i < argc; ++i) {
printf(" '%c' ", types[i]);
lo_arg_pp(lo_type(types[i]), argv[i]);
@@ -169,7 +169,7 @@ OSCClientReceiver::_error_cb(const char* path, const char* types, lo_arg** argv,
_target->error((char*)argv[0]);
return 0;
}
-
+
int
OSCClientReceiver::_new_patch_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
@@ -208,7 +208,7 @@ OSCClientReceiver::_connection_cb(const char* path, const char* types, lo_arg**
{
const char* const src_port_path = &argv[0]->s;
const char* const dst_port_path = &argv[1]->s;
-
+
_target->connect(src_port_path, dst_port_path);
return 0;
@@ -252,8 +252,8 @@ OSCClientReceiver::_new_port_cb(const char* path, const char* types, lo_arg** ar
const bool is_output = (argv[3]->i == 1);
_target->new_port(port_path, type, index, is_output);
-
- return 0;
+
+ return 0;
}
@@ -272,7 +272,7 @@ OSCClientReceiver::_set_variable_cb(const char* path, const char* types, lo_arg*
_target->set_variable(obj_path, key, value);
- return 0;
+ return 0;
}
@@ -291,7 +291,7 @@ OSCClientReceiver::_set_property_cb(const char* path, const char* types, lo_arg*
_target->set_property(obj_path, key, value);
- return 0;
+ return 0;
}
@@ -303,10 +303,10 @@ OSCClientReceiver::_set_port_value_cb(const char* path, const char* types, lo_ar
_target->set_port_value(port_path, value);
- return 0;
+ return 0;
}
-
+
int
OSCClientReceiver::_set_voice_value_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
@@ -316,7 +316,7 @@ OSCClientReceiver::_set_voice_value_cb(const char* path, const char* types, lo_a
_target->set_voice_value(port_path, voice, value);
- return 0;
+ return 0;
}
@@ -327,7 +327,7 @@ OSCClientReceiver::_activity_cb(const char* path, const char* types, lo_arg** ar
_target->activity(port_path);
- return 0;
+ return 0;
}
@@ -359,7 +359,7 @@ OSCClientReceiver::_plugin_cb(const char* path, const char* types, lo_arg** argv
assert(argc == 3 && !strcmp(types, "sss"));
_target->new_plugin(&argv[0]->s, &argv[1]->s, &argv[2]->s); // uri, type, symbol
- return 0;
+ return 0;
}
@@ -373,7 +373,7 @@ OSCClientReceiver::_program_add_cb(const char* path, const char* types, lo_arg**
_target->program_add(node_path, bank, program, name);
- return 0;
+ return 0;
}
@@ -386,7 +386,7 @@ OSCClientReceiver::_program_remove_cb(const char* path, const char* types, lo_ar
_target->program_remove(node_path, bank, program);
- return 0;
+ return 0;
}
diff --git a/src/client/OSCClientReceiver.hpp b/src/client/OSCClientReceiver.hpp
index c0ea2f43..af6b08af 100644
--- a/src/client/OSCClientReceiver.hpp
+++ b/src/client/OSCClientReceiver.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -61,18 +61,18 @@ public:
void start(bool dump_osc);
void stop();
-
+
int listen_port() { return _listen_port; }
std::string listen_url() { return lo_server_thread_get_url(_st); }
-
+
private:
void setup_callbacks();
-
+
static void lo_error_cb(int num, const char* msg, const char* path);
static int generic_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* user_data);
static int unknown_cb(const char* path, const char* types, lo_arg** argv, int argc, void* data, void* osc_receiver);
-
+
SharedPtr<Shared::ClientInterface> _target;
int _listen_port;
diff --git a/src/client/OSCEngineSender.cpp b/src/client/OSCEngineSender.cpp
index 2286108c..87a66daa 100644
--- a/src/client/OSCEngineSender.cpp
+++ b/src/client/OSCEngineSender.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -108,27 +108,27 @@ OSCEngineSender::load_plugins()
void
-OSCEngineSender::activate()
+OSCEngineSender::activate()
{
send("/ingen/activate", "i", next_id(), LO_ARGS_END);
}
void
-OSCEngineSender::deactivate()
+OSCEngineSender::deactivate()
{
send("/ingen/deactivate", "i", next_id(), LO_ARGS_END);
}
void
-OSCEngineSender::quit()
+OSCEngineSender::quit()
{
send("/ingen/quit", "i", next_id(), LO_ARGS_END);
}
-
+
// Object commands
@@ -142,7 +142,7 @@ OSCEngineSender::new_object(const Shared::GraphObject* object)
new_patch(patch->path(), patch->internal_polyphony());
return true;
}
-
+
const Node* node = dynamic_cast<const Node*>(object);
if (node) {
new_node(node->path(), node->plugin()->uri());
@@ -231,7 +231,7 @@ OSCEngineSender::clear_patch(const Path& patch_path)
LO_ARGS_END);
}
-
+
void
OSCEngineSender::connect(const Path& src_port_path,
const Path& dst_port_path)
@@ -334,7 +334,7 @@ OSCEngineSender::set_variable(const URI& obj_path,
send_message("/ingen/set_variable", m);
}
-
+
void
OSCEngineSender::set_property(const URI& obj_path,
const URI& predicate,
@@ -389,7 +389,7 @@ OSCEngineSender::request_variable(const URI& object_path, const URI& key)
LO_ARGS_END);
}
-
+
void
OSCEngineSender::request_property(const URI& object_path, const URI& key)
{
diff --git a/src/client/OSCEngineSender.hpp b/src/client/OSCEngineSender.hpp
index 13609df3..bd93e4eb 100644
--- a/src/client/OSCEngineSender.hpp
+++ b/src/client/OSCEngineSender.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -39,13 +39,13 @@ class OSCEngineSender : public Shared::EngineInterface, public Shared::OSCSender
public:
OSCEngineSender(const Raul::URI& engine_url);
~OSCEngineSender();
-
+
static OSCEngineSender* create(const Raul::URI& engine_url) {
return new OSCEngineSender(engine_url);
}
-
+
Raul::URI uri() const { return _engine_url; }
-
+
inline int32_t next_id()
{ int32_t ret = (_id == -1) ? -1 : _id++; return ret; }
@@ -56,10 +56,10 @@ public:
/* *** EngineInterface implementation below here *** */
-
+
void enable() { _enabled = true; }
void disable() { _enabled = false; }
-
+
void bundle_begin() { OSCSender::bundle_begin(); }
void bundle_end() { OSCSender::bundle_end(); }
void transfer_begin() { OSCSender::transfer_begin(); }
@@ -74,60 +74,60 @@ public:
void activate();
void deactivate();
void quit();
-
+
// Object commands
-
+
virtual bool new_object(const Shared::GraphObject* object);
virtual void new_patch(const Raul::Path& path,
uint32_t poly);
-
+
virtual void new_node(const Raul::Path& path,
const Raul::URI& plugin_uri);
-
+
virtual void new_port(const Raul::Path& path,
const Raul::URI& type,
uint32_t index,
bool is_output);
-
+
virtual void clear_patch(const Raul::Path& path);
-
+
virtual void destroy(const Raul::Path& path);
-
+
virtual void rename(const Raul::Path& old_path,
const Raul::Path& new_path);
-
+
virtual void connect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void disconnect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
-
+
virtual void disconnect_all(const Raul::Path& parent_patch_path,
const Raul::Path& path);
-
+
virtual void set_variable(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
-
+
virtual void set_port_value(const Raul::Path& port_path,
const Raul::Atom& value);
-
+
virtual void set_voice_value(const Raul::Path& port_path,
uint32_t voice,
const Raul::Atom& value);
-
+
virtual void set_program(const Raul::Path& node_path,
uint32_t bank,
uint32_t program);
virtual void midi_learn(const Raul::Path& node_path);
-
+
// Requests //
void ping();
void request_plugin(const Raul::URI& uri);
diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp
index 68326a3d..cd61c78d 100644
--- a/src/client/ObjectModel.cpp
+++ b/src/client/ObjectModel.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -37,7 +37,7 @@ ObjectModel::ObjectModel(const Path& path)
ObjectModel::~ObjectModel()
{
}
-
+
/** Get a variable for this object.
*
@@ -92,7 +92,7 @@ ObjectModel::set(SharedPtr<ObjectModel> o)
assert(_path == o->path());
if (o->_parent)
_parent = o->_parent;
-
+
for (Properties::const_iterator v = o->properties().begin(); v != o->properties().end(); ++v) {
const Raul::Atom& mine = get_property(v->first);
if (mine.is_valid())
diff --git a/src/client/ObjectModel.hpp b/src/client/ObjectModel.hpp
index 230a030e..14c5180b 100644
--- a/src/client/ObjectModel.hpp
+++ b/src/client/ObjectModel.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -56,12 +56,12 @@ public:
const Raul::Atom& get_variable(const Raul::URI& key) const;
Raul::Atom& get_variable(Raul::URI& key);
-
+
virtual void set_property(const Raul::URI& key, const Raul::Atom& value) {
ResourceImpl::set_property(key, value);
signal_property.emit(key, value);
}
-
+
virtual void set_variable(const Raul::URI& key, const Raul::Atom& value)
{ _variables[key] = value; signal_variable.emit(key, value); }
@@ -71,22 +71,22 @@ public:
const Raul::Symbol symbol() const { return _path.name(); }
SharedPtr<ObjectModel> parent() const { return _parent; }
bool polyphonic() const;
-
+
GraphObject* graph_parent() const { return _parent.get(); }
// Signals
- sigc::signal<void, SharedPtr<ObjectModel> > signal_new_child;
- sigc::signal<void, SharedPtr<ObjectModel> > signal_removed_child;
- sigc::signal<void, const Raul::URI&, const Raul::Atom&> signal_variable;
- sigc::signal<void, const Raul::URI&, const Raul::Atom&> signal_property;
- sigc::signal<void> signal_destroyed;
- sigc::signal<void> signal_renamed;
+ sigc::signal<void, SharedPtr<ObjectModel> > signal_new_child;
+ sigc::signal<void, SharedPtr<ObjectModel> > signal_removed_child;
+ sigc::signal<void, const Raul::URI&, const Raul::Atom&> signal_variable;
+ sigc::signal<void, const Raul::URI&, const Raul::Atom&> signal_property;
+ sigc::signal<void> signal_destroyed;
+ sigc::signal<void> signal_renamed;
protected:
friend class ClientStore;
-
+
ObjectModel(const Raul::Path& path);
-
+
virtual void set_path(const Raul::Path& p) { _path = p; signal_renamed.emit(); }
virtual void set_parent(SharedPtr<ObjectModel> p) { assert(p); _parent = p; }
virtual void add_child(SharedPtr<ObjectModel> c) {}
@@ -96,7 +96,7 @@ protected:
Raul::Path _path;
SharedPtr<ObjectModel> _parent;
-
+
Properties _variables;
};
diff --git a/src/client/PatchModel.cpp b/src/client/PatchModel.cpp
index 1f322259..19509c6c 100644
--- a/src/client/PatchModel.cpp
+++ b/src/client/PatchModel.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -39,7 +39,7 @@ PatchModel::add_child(SharedPtr<ObjectModel> c)
add_port(pm);
return;
}
-
+
SharedPtr<NodeModel> nm = PtrCast<NodeModel>(c);
if (nm)
signal_new_node.emit(nm);
@@ -55,7 +55,7 @@ PatchModel::remove_child(SharedPtr<ObjectModel> o)
SharedPtr<PortModel> pm = PtrCast<PortModel>(o);
if (pm)
remove_port(pm);
-
+
// Remove any connections which referred to this object,
// since they can't possibly exist anymore
for (Connections::iterator j = _connections->begin(); j != _connections->end() ; ) {
@@ -78,9 +78,9 @@ PatchModel::remove_child(SharedPtr<ObjectModel> o)
}
SharedPtr<NodeModel> nm = PtrCast<NodeModel>(o);
- if (nm)
+ if (nm)
signal_removed_node.emit(nm);
-
+
return true;
}
@@ -129,7 +129,7 @@ PatchModel::add_connection(SharedPtr<ConnectionModel> cm)
|| cm->src_port()->parent()->parent().get() == this);
assert(cm->dst_port()->parent().get() == this
|| cm->dst_port()->parent()->parent().get() == this);
-
+
SharedPtr<ConnectionModel> existing = get_connection(cm->src_port_path(), cm->dst_port_path());
if (existing) {
diff --git a/src/client/PatchModel.hpp b/src/client/PatchModel.hpp
index b07924cc..2816cf4e 100644
--- a/src/client/PatchModel.hpp
+++ b/src/client/PatchModel.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -42,10 +42,10 @@ public:
/* WARNING: Copy constructor creates a shallow copy WRT connections */
const Connections& connections() const { return *_connections.get(); }
-
+
SharedPtr<ConnectionModel> get_connection(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path) const;
-
+
uint32_t poly() const { return _poly; }
uint32_t internal_polyphony() const { return _poly; }
bool enabled() const;
@@ -59,13 +59,13 @@ public:
_editable = e;
signal_editable.emit(e);
} }
-
+
virtual void set_variable(const Raul::URI& key, const Raul::Atom& value);
// Signals
- sigc::signal<void, SharedPtr<NodeModel> > signal_new_node;
- sigc::signal<void, SharedPtr<NodeModel> > signal_removed_node;
- sigc::signal<void, SharedPtr<ConnectionModel> > signal_new_connection;
+ sigc::signal<void, SharedPtr<NodeModel> > signal_new_node;
+ sigc::signal<void, SharedPtr<NodeModel> > signal_removed_node;
+ sigc::signal<void, SharedPtr<ConnectionModel> > signal_new_connection;
sigc::signal<void, SharedPtr<ConnectionModel> > signal_removed_connection;
sigc::signal<void, bool> signal_editable;
@@ -79,14 +79,14 @@ private:
, _editable(true)
{
}
-
+
void clear();
void add_child(SharedPtr<ObjectModel> c);
bool remove_child(SharedPtr<ObjectModel> c);
-
+
void add_connection(SharedPtr<ConnectionModel> cm);
void remove_connection(const Raul::Path& src_port_path, const Raul::Path& dst_port_path);
-
+
SharedPtr<Connections> _connections;
uint32_t _poly;
bool _editable;
diff --git a/src/client/PluginModel.cpp b/src/client/PluginModel.cpp
index 6f6aa715..69ee2002 100644
--- a/src/client/PluginModel.cpp
+++ b/src/client/PluginModel.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -35,7 +35,7 @@ SLV2Plugins PluginModel::_slv2_plugins = NULL;
#endif
Redland::World* PluginModel::_rdf_world = NULL;
-
+
PluginModel::PluginModel(const URI& uri, const URI& type_uri)
: ResourceImpl(uri)
@@ -52,7 +52,7 @@ PluginModel::PluginModel(const URI& uri, const URI& type_uri)
if (_type == Internal)
set_property("doap:name", Raul::Atom(uri.substr(uri.find_last_of("#") + 1).c_str()));
}
-
+
string
PluginModel::default_node_symbol() const
@@ -137,7 +137,7 @@ PluginModel::icon_path() const
Glib::Mutex::Lock lock(_rdf_world->mutex());
_icon_path = get_lv2_icon_path(_slv2_plugin);
}
-
+
return _icon_path;
}
@@ -151,14 +151,14 @@ PluginModel::get_lv2_icon_path(SLV2Plugin plugin)
"http://ll-plugins.nongnu.org/lv2/namespace#svgIcon");
SLV2Values paths = slv2_plugin_get_value(plugin, svg_icon_pred);
-
+
if (slv2_values_size(paths) > 0) {
SLV2Value value = slv2_values_get_at(paths, 0);
if (slv2_value_is_uri(value))
result = slv2_uri_to_path(slv2_value_as_string(value));
slv2_values_free(paths);
}
-
+
slv2_value_free(svg_icon_pred);
return result;
}
diff --git a/src/client/PluginModel.hpp b/src/client/PluginModel.hpp
index b2f4cd0e..cf0b1eed 100644
--- a/src/client/PluginModel.hpp
+++ b/src/client/PluginModel.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -47,9 +47,9 @@ class PluginModel : public Ingen::Shared::Plugin
{
public:
PluginModel(const Raul::URI& uri, const Raul::URI& type_uri);
-
+
Type type() const { return _type; }
-
+
const std::string symbol() const { return string_property("lv2:symbol"); }
const std::string name() const { return string_property("doap:name"); }
@@ -68,7 +68,7 @@ public:
static void set_slv2_world(SLV2World world) {
Glib::Mutex::Lock lock(_rdf_world->mutex());
- _slv2_world = world;
+ _slv2_world = world;
_slv2_plugins = slv2_world_get_all_plugins(_slv2_world);
}
@@ -89,7 +89,7 @@ public:
private:
const Type _type;
-
+
const std::string string_property(const std::string& name) const;
#ifdef HAVE_SLV2
diff --git a/src/client/PluginUI.cpp b/src/client/PluginUI.cpp
index 63bef6b2..249d3c2e 100644
--- a/src/client/PluginUI.cpp
+++ b/src/client/PluginUI.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -53,7 +53,7 @@ lv2_ui_write(LV2UI_Controller controller,
PluginUI* ui = (PluginUI*)controller;
SharedPtr<PortModel> port = ui->node()->ports()[port_index];
-
+
const LV2Features::Feature* f = ui->world()->lv2_features->feature(LV2_URI_MAP_URI);
LV2URIMap* map = (LV2URIMap*)f->controller;
assert(map);
@@ -63,7 +63,7 @@ lv2_ui_write(LV2UI_Controller controller,
assert(buffer_size == 4);
if (*(float*)buffer == port->value().get_float())
return; // do nothing (handle stupid plugin UIs that feed back)
-
+
ui->world()->engine->set_port_value(port->path(), Atom(*(float*)buffer));
// FIXME: slow, need to cache ID
@@ -80,7 +80,7 @@ lv2_ui_write(LV2UI_Controller controller,
ui->world()->engine->set_port_value(port->path(),
Atom("lv2midi:MidiEvent", ev->size, data));
} else {
- cerr << "WARNING: Unable to send event type " << ev->type <<
+ cerr << "WARNING: Unable to send event type " << ev->type <<
" over OSC, ignoring event" << endl;
}
@@ -93,7 +93,7 @@ lv2_ui_write(LV2UI_Controller controller,
}
}
-
+
PluginUI::PluginUI(Ingen::Shared::World* world,
SharedPtr<NodeModel> node)
: _world(world)
diff --git a/src/client/PluginUI.hpp b/src/client/PluginUI.hpp
index 81aa23a4..f3461f22 100644
--- a/src/client/PluginUI.hpp
+++ b/src/client/PluginUI.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
diff --git a/src/client/PortModel.cpp b/src/client/PortModel.cpp
index d62aa236..e5c4b96f 100644
--- a/src/client/PortModel.cpp
+++ b/src/client/PortModel.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -27,7 +27,7 @@ PortModel::has_hint(const std::string& qname) const
const Raul::Atom& hint = get_variable(qname);
return (hint.is_valid() && hint.get_bool() > 0);
}
-
+
void
PortModel::set(SharedPtr<ObjectModel> model)
{
diff --git a/src/client/PortModel.hpp b/src/client/PortModel.hpp
index 90b11ae0..cfdd9d01 100644
--- a/src/client/PortModel.hpp
+++ b/src/client/PortModel.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -40,14 +40,14 @@ class PortModel : public ObjectModel, public Ingen::Shared::Port
{
public:
enum Direction { INPUT, OUTPUT };
-
- inline uint32_t index() const { return _index; }
+
+ inline uint32_t index() const { return _index; }
inline Shared::DataType type() const { return _type; }
inline const Raul::Atom& value() const { return _current_val; }
inline bool connected() const { return (_connections > 0); }
inline bool is_input() const { return (_direction == INPUT); }
inline bool is_output() const { return (_direction == OUTPUT); }
-
+
bool has_hint(const std::string& qname) const;
bool is_logarithmic() const { return has_hint("ingen:logarithmic"); }
@@ -55,19 +55,19 @@ public:
bool is_toggle() const { return has_hint("lv2:toggled"); }
inline bool operator==(const PortModel& pm) const { return (_path == pm._path); }
-
+
inline void value(const Raul::Atom& val) {
if (val != _current_val) {
_current_val = val;
signal_value_changed.emit(val);
}
}
-
+
inline void value(uint32_t voice, const Raul::Atom& val) {
// FIXME: implement properly
signal_voice_changed.emit(voice, val);
}
-
+
// Signals
sigc::signal<void, const Raul::Atom&> signal_value_changed; ///< Value ports
sigc::signal<void, uint32_t, const Raul::Atom&> signal_voice_changed; ///< Polyphonic value ports
@@ -77,7 +77,7 @@ public:
private:
friend class ClientStore;
-
+
PortModel(const Raul::Path& path, uint32_t index, Shared::DataType type, Direction dir)
: ObjectModel(path)
, _index(index)
@@ -89,15 +89,15 @@ private:
if (_type == Shared::DataType::UNKNOWN)
std::cerr << "[PortModel] Warning: Unknown port type" << std::endl;
}
-
+
void add_child(SharedPtr<ObjectModel> c) { throw; }
bool remove_child(SharedPtr<ObjectModel> c) { throw; }
-
+
void connected_to(SharedPtr<PortModel> p) { ++_connections; signal_connection.emit(p); }
void disconnected_from(SharedPtr<PortModel> p) { --_connections; signal_disconnection.emit(p); }
-
+
void set(SharedPtr<ObjectModel> model);
-
+
uint32_t _index;
Shared::DataType _type;
Direction _direction;
diff --git a/src/client/SigClientInterface.hpp b/src/client/SigClientInterface.hpp
index ee20797a..5ea3436a 100644
--- a/src/client/SigClientInterface.hpp
+++ b/src/client/SigClientInterface.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -40,51 +40,51 @@ class SigClientInterface : public Ingen::Shared::ClientInterface, public sigc::t
{
public:
SigClientInterface() : _enabled(true) {}
-
+
bool enabled() const { return _enabled; }
Raul::URI uri() const { return "ingen:internal"; }
// Signal parameters match up directly with ClientInterface calls
sigc::signal<bool, const Shared::GraphObject*> signal_new_object;
-
+
sigc::signal<void, int32_t> signal_response_ok;
sigc::signal<void, int32_t, std::string> signal_response_error;
- sigc::signal<void> signal_bundle_begin;
- sigc::signal<void> signal_bundle_end;
- sigc::signal<void, std::string> signal_error;
- sigc::signal<void, Raul::URI, Raul::URI, Raul::Symbol> signal_new_plugin;
- sigc::signal<void, Raul::Path, uint32_t> signal_new_patch;
- sigc::signal<void, Raul::Path, Raul::URI> signal_new_node;
- sigc::signal<void, Raul::Path, Raul::URI, uint32_t, bool> signal_new_port;
- sigc::signal<void, Raul::Path> signal_clear_patch;
- sigc::signal<void, Raul::Path, Raul::Path> signal_object_renamed;
- sigc::signal<void, Raul::Path> signal_object_destroyed;
- sigc::signal<void, Raul::Path, Raul::Path> signal_connection;
- sigc::signal<void, Raul::Path, Raul::Path> signal_disconnection;
- sigc::signal<void, Raul::URI, Raul::URI, Raul::Atom> signal_variable_change;
- sigc::signal<void, Raul::URI, Raul::URI, Raul::Atom> signal_property_change;
- sigc::signal<void, Raul::Path, Raul::Atom> signal_port_value;
- sigc::signal<void, Raul::Path, uint32_t, Raul::Atom> signal_voice_value;
- sigc::signal<void, Raul::Path> signal_activity;
- sigc::signal<void, Raul::Path, uint32_t, uint32_t, std::string> signal_program_add;
- sigc::signal<void, Raul::Path, uint32_t, uint32_t> signal_program_remove;
-
+ sigc::signal<void> signal_bundle_begin;
+ sigc::signal<void> signal_bundle_end;
+ sigc::signal<void, std::string> signal_error;
+ sigc::signal<void, Raul::URI, Raul::URI, Raul::Symbol> signal_new_plugin;
+ sigc::signal<void, Raul::Path, uint32_t> signal_new_patch;
+ sigc::signal<void, Raul::Path, Raul::URI> signal_new_node;
+ sigc::signal<void, Raul::Path, Raul::URI, uint32_t, bool> signal_new_port;
+ sigc::signal<void, Raul::Path> signal_clear_patch;
+ sigc::signal<void, Raul::Path, Raul::Path> signal_object_renamed;
+ sigc::signal<void, Raul::Path> signal_object_destroyed;
+ sigc::signal<void, Raul::Path, Raul::Path> signal_connection;
+ sigc::signal<void, Raul::Path, Raul::Path> signal_disconnection;
+ sigc::signal<void, Raul::URI, Raul::URI, Raul::Atom> signal_variable_change;
+ sigc::signal<void, Raul::URI, Raul::URI, Raul::Atom> signal_property_change;
+ sigc::signal<void, Raul::Path, Raul::Atom> signal_port_value;
+ sigc::signal<void, Raul::Path, uint32_t, Raul::Atom> signal_voice_value;
+ sigc::signal<void, Raul::Path> signal_activity;
+ sigc::signal<void, Raul::Path, uint32_t, uint32_t, std::string> signal_program_add;
+ sigc::signal<void, Raul::Path, uint32_t, uint32_t> signal_program_remove;
+
/** Fire pending signals. Only does anything on derived classes (that may queue) */
virtual bool emit_signals() { return false; }
protected:
-
+
bool _enabled;
// ClientInterface hooks that fire the above signals
-
+
void enable() { _enabled = true; }
void disable() { _enabled = false ; }
void bundle_begin()
{ if (_enabled) signal_bundle_begin.emit(); }
-
+
void bundle_end()
{ if (_enabled) signal_bundle_end.emit(); }
@@ -96,58 +96,58 @@ protected:
void response_error(int32_t id, const std::string& msg)
{ if (_enabled) signal_response_error.emit(id, msg); }
-
+
void error(const std::string& msg)
{ if (_enabled) signal_error.emit(msg); }
-
+
void new_plugin(const Raul::URI& uri, const Raul::URI& type_uri, const Raul::Symbol& symbol)
{ if (_enabled) signal_new_plugin.emit(uri, type_uri, symbol); }
-
+
bool new_object(const Shared::GraphObject* object)
{ if (_enabled) signal_new_object.emit(object); return false; }
void new_patch(const Raul::Path& path, uint32_t poly)
{ if (_enabled) signal_new_patch.emit(path, poly); }
-
+
void new_node(const Raul::Path& path, const Raul::URI& plugin_uri)
{ if (_enabled) signal_new_node.emit(path, plugin_uri); }
-
+
void new_port(const Raul::Path& path, const Raul::URI& type, uint32_t index, bool is_output)
{ if (_enabled) signal_new_port.emit(path, type, index, is_output); }
-
+
void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path)
{ if (_enabled) signal_connection.emit(src_port_path, dst_port_path); }
void destroy(const Raul::Path& path)
{ if (_enabled) signal_object_destroyed.emit(path); }
-
+
void clear_patch(const Raul::Path& path)
{ if (_enabled) signal_clear_patch.emit(path); }
void rename(const Raul::Path& old_path, const Raul::Path& new_path)
{ if (_enabled) signal_object_renamed.emit(old_path, new_path); }
-
+
void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path)
{ if (_enabled) signal_disconnection.emit(src_port_path, dst_port_path); }
-
+
void set_variable(const Raul::URI& path, const Raul::URI& key, const Raul::Atom& value)
{ if (_enabled) signal_variable_change.emit(path, key, value); }
-
+
void set_property(const Raul::URI& path, const Raul::URI& key, const Raul::Atom& value)
{ if (_enabled) signal_property_change.emit(path, key, value); }
void set_port_value(const Raul::Path& port_path, const Raul::Atom& value)
{ if (_enabled) signal_port_value.emit(port_path, value); }
-
+
void set_voice_value(const Raul::Path& port_path, uint32_t voice, const Raul::Atom& value)
{ if (_enabled) signal_voice_value.emit(port_path, voice, value); }
-
+
void activity(const Raul::Path& port_path)
{ if (_enabled) signal_activity.emit(port_path); }
void program_add(const Raul::Path& path, uint32_t bank, uint32_t program, const std::string& name)
{ if (_enabled) signal_program_add.emit(path, bank, program, name); }
-
+
void program_remove(const Raul::Path& path, uint32_t bank, uint32_t program)
{ if (_enabled) signal_program_remove.emit(path, bank, program); }
};
diff --git a/src/client/ThreadedSigClientInterface.cpp b/src/client/ThreadedSigClientInterface.cpp
index bc7707f3..980b8057 100644
--- a/src/client/ThreadedSigClientInterface.cpp
+++ b/src/client/ThreadedSigClientInterface.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -98,7 +98,7 @@ ThreadedSigClientInterface::new_object(const Shared::GraphObject* object)
new_port(port->path(), port->type().uri(), port->index(), !port->is_input());
return true;
}
-
+
return false;
}
diff --git a/src/client/ThreadedSigClientInterface.hpp b/src/client/ThreadedSigClientInterface.hpp
index 0862bdee..a2aca427 100644
--- a/src/client/ThreadedSigClientInterface.hpp
+++ b/src/client/ThreadedSigClientInterface.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -79,66 +79,66 @@ public:
void bundle_end()
{ push_sig(bundle_end_slot); }
-
+
void transfer_begin() {}
void transfer_end() {}
void response_ok(int32_t id)
{ push_sig(sigc::bind(response_ok_slot, id)); }
-
+
void response_error(int32_t id, const std::string& msg)
{ push_sig(sigc::bind(response_error_slot, id, msg)); }
void error(const std::string& msg)
{ push_sig(sigc::bind(error_slot, msg)); }
-
+
void new_plugin(const Raul::URI& uri, const Raul::URI& type_uri, const Raul::Symbol& symbol)
{ push_sig(sigc::bind(new_plugin_slot, uri, type_uri, symbol)); }
-
+
bool new_object(const Shared::GraphObject* object);
-
+
void new_patch(const Raul::Path& path, uint32_t poly)
{ push_sig(sigc::bind(new_patch_slot, path, poly)); }
-
+
void new_node(const Raul::Path& path, const Raul::URI& plugin_uri)
{ push_sig(sigc::bind(new_node_slot, path, plugin_uri)); }
-
+
void new_port(const Raul::Path& path, const Raul::URI& type, uint32_t index, bool is_output)
{ push_sig(sigc::bind(new_port_slot, path, type, index, is_output)); }
-
+
void connect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path)
{ push_sig(sigc::bind(connection_slot, src_port_path, dst_port_path)); }
void destroy(const Raul::Path& path)
{ push_sig(sigc::bind(object_destroyed_slot, path)); }
-
+
void clear_patch(const Raul::Path& path)
{ push_sig(sigc::bind(clear_patch_slot, path)); }
void rename(const Raul::Path& old_path, const Raul::Path& new_path)
{ push_sig(sigc::bind(object_renamed_slot, old_path, new_path)); }
-
+
void disconnect(const Raul::Path& src_port_path, const Raul::Path& dst_port_path)
{ push_sig(sigc::bind(disconnection_slot, src_port_path, dst_port_path)); }
-
+
void set_variable(const Raul::URI& path, const Raul::URI& key, const Raul::Atom& value)
{ push_sig(sigc::bind(variable_change_slot, path, key, value)); }
-
+
void set_property(const Raul::URI& path, const Raul::URI& key, const Raul::Atom& value)
{ push_sig(sigc::bind(property_change_slot, path, key, value)); }
void set_port_value(const Raul::Path& port_path, const Raul::Atom& value)
{ push_sig(sigc::bind(port_value_slot, port_path, value)); }
-
+
void set_voice_value(const Raul::Path& port_path, uint32_t voice, const Raul::Atom& value)
{ push_sig(sigc::bind(voice_value_slot, port_path, voice, value)); }
-
+
void activity(const Raul::Path& port_path)
{ push_sig(sigc::bind(activity_slot, port_path)); }
void program_add(const Raul::Path& path, uint32_t bank, uint32_t program, const std::string& name)
{ push_sig(sigc::bind(program_add_slot, path, bank, program, name)); }
-
+
void program_remove(const Raul::Path& path, uint32_t bank, uint32_t program)
{ push_sig(sigc::bind(program_remove_slot, path, bank, program)); }
@@ -147,34 +147,34 @@ public:
private:
void push_sig(Closure ev);
-
+
Glib::Mutex _mutex;
Glib::Cond _cond;
Raul::SRSWQueue<Closure> _sigs;
bool _attached;
- sigc::slot<void> bundle_begin_slot;
- sigc::slot<void> bundle_end_slot;
- sigc::slot<void, int32_t> response_ok_slot;
- sigc::slot<void, int32_t, std::string> response_error_slot;
- sigc::slot<void, std::string> error_slot;
- sigc::slot<void, Raul::URI, Raul::URI, Raul::Symbol> new_plugin_slot;
- sigc::slot<void, Raul::Path, uint32_t> new_patch_slot;
- sigc::slot<void, Raul::Path, Raul::URI> new_node_slot;
+ sigc::slot<void> bundle_begin_slot;
+ sigc::slot<void> bundle_end_slot;
+ sigc::slot<void, int32_t> response_ok_slot;
+ sigc::slot<void, int32_t, std::string> response_error_slot;
+ sigc::slot<void, std::string> error_slot;
+ sigc::slot<void, Raul::URI, Raul::URI, Raul::Symbol> new_plugin_slot;
+ sigc::slot<void, Raul::Path, uint32_t> new_patch_slot;
+ sigc::slot<void, Raul::Path, Raul::URI> new_node_slot;
sigc::slot<void, Raul::Path, Raul::URI, uint32_t, bool> new_port_slot;
sigc::slot<void, Raul::Path, Raul::Path> connection_slot;
- sigc::slot<void, Raul::Path> clear_patch_slot;
- sigc::slot<void, Raul::Path> object_destroyed_slot;
- sigc::slot<void, Raul::Path, Raul::Path> object_renamed_slot;
- sigc::slot<void, Raul::Path, Raul::Path> disconnection_slot;
- sigc::slot<void, Raul::URI, Raul::URI, Raul::Atom> variable_change_slot;
- sigc::slot<void, Raul::URI, Raul::URI, Raul::Atom> property_change_slot;
- sigc::slot<void, Raul::Path, Raul::Atom> port_value_slot;
- sigc::slot<void, Raul::Path, uint32_t, Raul::Atom> voice_value_slot;
- sigc::slot<void, Raul::Path> activity_slot;
- sigc::slot<void, Raul::Path, uint32_t, uint32_t, std::string> program_add_slot;
- sigc::slot<void, Raul::Path, uint32_t, uint32_t> program_remove_slot;
+ sigc::slot<void, Raul::Path> clear_patch_slot;
+ sigc::slot<void, Raul::Path> object_destroyed_slot;
+ sigc::slot<void, Raul::Path, Raul::Path> object_renamed_slot;
+ sigc::slot<void, Raul::Path, Raul::Path> disconnection_slot;
+ sigc::slot<void, Raul::URI, Raul::URI, Raul::Atom> variable_change_slot;
+ sigc::slot<void, Raul::URI, Raul::URI, Raul::Atom> property_change_slot;
+ sigc::slot<void, Raul::Path, Raul::Atom> port_value_slot;
+ sigc::slot<void, Raul::Path, uint32_t, Raul::Atom> voice_value_slot;
+ sigc::slot<void, Raul::Path> activity_slot;
+ sigc::slot<void, Raul::Path, uint32_t, uint32_t, std::string> program_add_slot;
+ sigc::slot<void, Raul::Path, uint32_t, uint32_t> program_remove_slot;
};
diff --git a/src/client/client.cpp b/src/client/client.cpp
index 72d329ef..2635101d 100644
--- a/src/client/client.cpp
+++ b/src/client/client.cpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but HAVEOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
@@ -30,7 +30,7 @@ using namespace std;
namespace Ingen {
namespace Client {
-
+
SharedPtr<Ingen::Shared::EngineInterface>
new_remote_interface(const std::string& url)
diff --git a/src/client/client.hpp b/src/client/client.hpp
index c33b0abd..e933cd91 100644
--- a/src/client/client.hpp
+++ b/src/client/client.hpp
@@ -1,15 +1,15 @@
/* This file is part of Ingen.
* Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
+ *
* Ingen is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
- *
+ *
* Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA