summaryrefslogtreecommitdiffstats
path: root/src/JackDbusDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-27 20:19:46 +0100
committerDavid Robillard <d@drobilla.net>2020-11-27 21:52:29 +0100
commit2e7a3b3bc94f8d68475883c845f31ee42cba115c (patch)
tree7df6bfbc81e354bd73c13e1f48408c4a5691e485 /src/JackDbusDriver.cpp
parent10a9f00294c3a33477dee21980f91d1417b6ef21 (diff)
downloadpatchage-2e7a3b3bc94f8d68475883c845f31ee42cba115c.tar.gz
patchage-2e7a3b3bc94f8d68475883c845f31ee42cba115c.tar.bz2
patchage-2e7a3b3bc94f8d68475883c845f31ee42cba115c.zip
Remove use of PatchagePort from Driver connection interface
Diffstat (limited to 'src/JackDbusDriver.cpp')
-rw-r--r--src/JackDbusDriver.cpp48
1 files changed, 28 insertions, 20 deletions
diff --git a/src/JackDbusDriver.cpp b/src/JackDbusDriver.cpp
index b2acc69..fbd8bf4 100644
--- a/src/JackDbusDriver.cpp
+++ b/src/JackDbusDriver.cpp
@@ -913,26 +913,30 @@ JackDriver::refresh()
}
bool
-JackDriver::connect(PatchagePort* src, PatchagePort* dst)
+JackDriver::connect(const PortID tail_id,
+ const std::string& tail_client_name,
+ const std::string& tail_port_name,
+ const PortID head_id,
+ const std::string& head_client_name,
+ const std::string& head_port_name)
{
- const char* client1_name = src->get_module()->get_label();
- const char* port1_name = src->get_label();
- const char* client2_name = dst->get_module()->get_label();
- const char* port2_name = dst->get_label();
- DBusMessage* reply_ptr = nullptr;
+ (void)tail_id;
+ (void)head_id;
+
+ DBusMessage* reply_ptr = nullptr;
if (!call(true,
JACKDBUS_IFACE_PATCHBAY,
"ConnectPortsByName",
&reply_ptr,
DBUS_TYPE_STRING,
- &client1_name,
+ &tail_client_name,
DBUS_TYPE_STRING,
- &port1_name,
+ &tail_port_name,
DBUS_TYPE_STRING,
- &client2_name,
+ &head_client_name,
DBUS_TYPE_STRING,
- &port2_name,
+ &head_port_name,
DBUS_TYPE_INVALID)) {
error_msg("ConnectPortsByName() failed");
return false;
@@ -942,26 +946,30 @@ JackDriver::connect(PatchagePort* src, PatchagePort* dst)
}
bool
-JackDriver::disconnect(PatchagePort* src, PatchagePort* dst)
+JackDriver::disconnect(const PortID tail_id,
+ const std::string& tail_client_name,
+ const std::string& tail_port_name,
+ const PortID head_id,
+ const std::string& head_client_name,
+ const std::string& head_port_name)
{
- const char* client1_name = src->get_module()->get_label();
- const char* port1_name = src->get_label();
- const char* client2_name = dst->get_module()->get_label();
- const char* port2_name = dst->get_label();
- DBusMessage* reply_ptr = nullptr;
+ (void)tail_id;
+ (void)head_id;
+
+ DBusMessage* reply_ptr = nullptr;
if (!call(true,
JACKDBUS_IFACE_PATCHBAY,
"DisconnectPortsByName",
&reply_ptr,
DBUS_TYPE_STRING,
- &client1_name,
+ &tail_client_name,
DBUS_TYPE_STRING,
- &port1_name,
+ &tail_port_name,
DBUS_TYPE_STRING,
- &client2_name,
+ &head_client_name,
DBUS_TYPE_STRING,
- &port2_name,
+ &head_port_name,
DBUS_TYPE_INVALID)) {
error_msg("DisconnectPortsByName() failed");
return false;