summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-20 01:25:40 +0000
committerDavid Robillard <d@drobilla.net>2007-09-20 01:25:40 +0000
commit99524eb321120773c39ca357396603eb32cffd2c (patch)
treeaca911f6109756b865f8315e27a13e57f6c9b3b4 /src/libs/client
parent0a9c38574cafd3e77234d220a18241025098bbb3 (diff)
downloadingen-99524eb321120773c39ca357396603eb32cffd2c.tar.gz
ingen-99524eb321120773c39ca357396603eb32cffd2c.tar.bz2
ingen-99524eb321120773c39ca357396603eb32cffd2c.zip
Strip a bunch of old useless code.
git-svn-id: http://svn.drobilla.net/lad/ingen@735 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/DeprecatedLoader.cpp52
-rw-r--r--src/libs/client/OSCClientReceiver.cpp59
2 files changed, 1 insertions, 110 deletions
diff --git a/src/libs/client/DeprecatedLoader.cpp b/src/libs/client/DeprecatedLoader.cpp
index 621420c4..f6c07ecd 100644
--- a/src/libs/client/DeprecatedLoader.cpp
+++ b/src/libs/client/DeprecatedLoader.cpp
@@ -44,58 +44,6 @@ using namespace std;
namespace Ingen {
namespace Client {
-#if 0
-/** Searches for the filename passed in the path, returning the full
- * path of the file, or the empty string if not found.
- *
- * This function tries to be as friendly a black box as possible - if the path
- * passed is an absolute path and the file is found there, it will return
- * that path, etc.
- *
- * additional_path is a list (colon delimeted as usual) of additional
- * directories to look in. ie the directory the parent patch resides in would
- * be a good idea to pass as additional_path, in the case of a subpatch.
- */
-string
-DeprecatedLoader::find_file(const string& filename, const string& additional_path)
-{
- string search_path = additional_path + ":" + _patch_search_path;
-
- // Try to open the raw filename first
- std::ifstream is(filename.c_str(), std::ios::in);
- if (is.good()) {
- is.close();
- return filename;
- }
-
- string directory;
- string full_patch_path = "";
-
- while (search_path != "") {
- directory = search_path.substr(0, search_path.find(':'));
- if (search_path.find(':') != string::npos)
- search_path = search_path.substr(search_path.find(':')+1);
- else
- search_path = "";
-
- full_patch_path = directory +"/"+ filename;
-
- std::ifstream is;
- is.open(full_patch_path.c_str(), std::ios::in);
-
- if (is.good()) {
- is.close();
- return full_patch_path;
- } else {
- cerr << "[DeprecatedLoader] Could not find patch file " << full_patch_path << endl;
- }
- }
-
- return "";
-}
-
-#endif
-
string
DeprecatedLoader::nameify_if_invalid(const string& name)
{
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 9c68f2dd..c369db0e 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -173,9 +173,7 @@ OSCClientReceiver::setup_callbacks()
int
OSCClientReceiver::_error_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
- cerr << "ERROR: " << argv[0]->s << endl;
- // FIXME
- //error((char*)argv[0]);
+ error((char*)argv[0]);
return 0;
}
@@ -264,16 +262,6 @@ OSCClientReceiver::_new_node_cb(const char* path, const char* types, lo_arg** ar
new_node(uri, node_path, polyphonic, num_ports);
- /*_receiving_node_model = new NodeModel(node_path);
- _receiving_node_model->polyphonic((poly == 1));
- _receiving_node_num_ports = num_ports;
-
- PluginModel* pi = new PluginModel(type, uri);
- _receiving_node_model->plugin(pi);
-
- _receiving_node = true;
- _num_received_ports = 0;
- */
return 0;
}
@@ -286,54 +274,9 @@ OSCClientReceiver::_new_port_cb(const char* path, const char* types, lo_arg** ar
const char* port_path = &argv[0]->s;
const char* type = &argv[1]->s;
bool is_output = (argv[2]->i == 1);
- /*const char* direction = &argv[2]->s;
- const char* hint = &argv[3]->s;
- float default_val = argv[4]->f;
- float min_val = argv[5]->f;
- float max_val = argv[6]->f;*/
new_port(port_path, type, is_output);
-#if 0
- PortModel::Type ptype = PortModel::CONTROL;
- if (!strcmp(type, "AUDIO")) ptype = PortModel::AUDIO;
- else if (!strcmp(type, "CONTROL")) ptype = PortModel::CONTROL;
- else if (!strcmp(type, "MIDI")) ptype = PortModel::MIDI;
- else cerr << "[OSCClientReceiver] WARNING: Unknown port type received (" << type << ")" << endl;
-
-#if 0
- PortModel::Direction pdir = PortModel::INPUT;
- if (!strcmp(direction, "INPUT")) pdir = PortModel::INPUT;
- else if (!strcmp(direction, "OUTPUT")) pdir = PortModel::OUTPUT;
- else cerr << "[OSCClientReceiver] WARNING: Unknown port direction received (" << direction << ")" << endl;
-#endif
- PortModel::Direction pdir = is_output ? PortModel::OUTPUT : PortModel::INPUT;
-
-/*
- PortModel::Hint phint = PortModel::NONE;
- if (!strcmp(hint, "LOGARITHMIC")) phint = PortModel::LOGARITHMIC;
- else if (!strcmp(hint, "INTEGER")) phint = PortModel::INTEGER;
- else if (!strcmp(hint, "TOGGLE")) phint = PortModel::TOGGLE;
- PortModel* port_model = new PortModel(port_path, ptype, pdir, phint, default_val, min_val, max_val);
-*/
- PortModel* port_model = new PortModel(port_path, ptype, pdir);
- if (_receiving_node) {
- assert(_receiving_node_model);
- _receiving_node_model->add_port(port_model);
- ++m_num_received_ports;
-
- // If transmission is done, send new node to client
- if (_num_received_ports == _receiving_node_num_ports) {
- new_node_model(_receiving_node_model);
- _receiving_node = false;
- _receiving_node_model = NULL;
- _num_received_ports = 0;
- }
- } else {
- new_port_model(port_model);
- }
-
-#endif
return 0;
}