summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/SigClientInterface.hpp39
-rw-r--r--src/client/ThreadedSigClientInterface.cpp2
-rw-r--r--src/client/ThreadedSigClientInterface.hpp4
-rw-r--r--src/engine/HTTPClientSender.hpp2
-rw-r--r--src/engine/InputPort.cpp1
-rw-r--r--src/engine/OSCClientSender.hpp2
-rw-r--r--src/gui/ConnectWindow.cpp2
7 files changed, 18 insertions, 34 deletions
diff --git a/src/client/SigClientInterface.hpp b/src/client/SigClientInterface.hpp
index 6efbdd8e..c262d408 100644
--- a/src/client/SigClientInterface.hpp
+++ b/src/client/SigClientInterface.hpp
@@ -39,9 +39,7 @@ namespace Client {
class SigClientInterface : public Ingen::Shared::ClientInterface, public sigc::trackable
{
public:
- SigClientInterface() : _enabled(true) {}
-
- bool enabled() const { return _enabled; }
+ SigClientInterface() {}
Raul::URI uri() const { return "ingen:internal"; }
@@ -69,60 +67,57 @@ public:
protected:
- bool _enabled;
-
// ClientInterface hooks that fire the above signals
- void enable() { _enabled = true; }
- void disable() { _enabled = false ; }
+#define EMIT(name, ...) { signal_ ## name (__VA_ARGS__); }
void bundle_begin()
- { if (_enabled) signal_bundle_begin.emit(); }
+ { EMIT(bundle_begin); }
void bundle_end()
- { if (_enabled) signal_bundle_end.emit(); }
+ { EMIT(bundle_end); }
void transfer_begin() {}
void transfer_end() {}
void response_ok(int32_t id)
- { if (_enabled) signal_response_ok.emit(id); }
+ { EMIT(response_ok, id); }
void response_error(int32_t id, const std::string& msg)
- { if (_enabled) signal_response_error.emit(id, msg); }
+ { EMIT(response_error, id, msg); }
void error(const std::string& msg)
- { if (_enabled) signal_error.emit(msg); }
+ { EMIT(error, msg); }
void put(const Raul::URI& path, const Shared::Resource::Properties& properties)
- { if (_enabled) signal_put.emit(path, properties); }
+ { EMIT(put, path, properties); }
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); }
+ { EMIT(connection, src_port_path, dst_port_path); }
void del(const Raul::Path& path)
- { if (_enabled) signal_object_deleted.emit(path); }
+ { EMIT(object_deleted, path); }
void clear_patch(const Raul::Path& path)
- { if (_enabled) signal_clear_patch.emit(path); }
+ { EMIT(clear_patch, path); }
void move(const Raul::Path& old_path, const Raul::Path& new_path)
- { if (_enabled) signal_object_moved.emit(old_path, new_path); }
+ { EMIT(object_moved, 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); }
+ { EMIT(disconnection, src_port_path, dst_port_path); }
void set_property(const Raul::URI& subject, const Raul::URI& key, const Raul::Atom& value)
- { if (_enabled) signal_property_change.emit(subject, key, value); }
+ { EMIT(property_change, subject, key, value); }
void set_port_value(const Raul::Path& port_path, const Raul::Atom& value)
- { if (_enabled) signal_port_value.emit(port_path, value); }
+ { EMIT(port_value, 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); }
+ { EMIT(voice_value, port_path, voice, value); }
void activity(const Raul::Path& port_path)
- { if (_enabled) signal_activity.emit(port_path); }
+ { EMIT(activity, port_path); }
};
diff --git a/src/client/ThreadedSigClientInterface.cpp b/src/client/ThreadedSigClientInterface.cpp
index 5bd7e8b3..8741ecf7 100644
--- a/src/client/ThreadedSigClientInterface.cpp
+++ b/src/client/ThreadedSigClientInterface.cpp
@@ -33,8 +33,6 @@ void
ThreadedSigClientInterface::push_sig(Closure ev)
{
_attached = true;
- if (!_enabled)
- return;
bool success = false;
while (!success) {
diff --git a/src/client/ThreadedSigClientInterface.hpp b/src/client/ThreadedSigClientInterface.hpp
index eda3bfb2..34847797 100644
--- a/src/client/ThreadedSigClientInterface.hpp
+++ b/src/client/ThreadedSigClientInterface.hpp
@@ -66,10 +66,6 @@ public:
virtual Raul::URI uri() const { return "ingen:internal"; }
- virtual void subscribe(Shared::EngineInterface* engine) { throw; }
-
- bool enabled() const { return _attached; }
-
void bundle_begin()
{ push_sig(bundle_begin_slot); }
diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp
index a9d37784..753197ea 100644
--- a/src/engine/HTTPClientSender.hpp
+++ b/src/engine/HTTPClientSender.hpp
@@ -61,8 +61,6 @@ public:
Raul::URI uri() const { return "http://example.org/"; }
- void subscribe(Shared::EngineInterface* engine) { }
-
/* *** ClientInterface Implementation Below *** */
//void client_registration(const std::string& url, int client_id);
diff --git a/src/engine/InputPort.cpp b/src/engine/InputPort.cpp
index 8d5238e3..31cb3e92 100644
--- a/src/engine/InputPort.cpp
+++ b/src/engine/InputPort.cpp
@@ -65,7 +65,6 @@ InputPort::set_buffer_size(size_t size)
for (Connections::iterator c = _connections.begin(); c != _connections.end(); ++c)
((ConnectionImpl*)c->get())->set_buffer_size(size);
-
}
diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp
index 58175d47..8138e0eb 100644
--- a/src/engine/OSCClientSender.hpp
+++ b/src/engine/OSCClientSender.hpp
@@ -60,8 +60,6 @@ public:
Raul::URI uri() const { return lo_address_get_url(_address); }
- void subscribe(Shared::EngineInterface* engine) { }
-
/* *** ClientInterface Implementation Below *** */
//void client_registration(const std::string& url, int client_id);
diff --git a/src/gui/ConnectWindow.cpp b/src/gui/ConnectWindow.cpp
index 80ac0de3..deb97b35 100644
--- a/src/gui/ConnectWindow.cpp
+++ b/src/gui/ConnectWindow.cpp
@@ -474,7 +474,7 @@ ConnectWindow::gtk_callback()
++_connect_stage;
} else if (_connect_stage == 1) {
- if (_attached || App::instance().client()->enabled()) {
+ if (_attached) {
App::instance().engine()->activate();
++_connect_stage;
} else {