diff options
author | David Robillard <d@drobilla.net> | 2020-02-09 14:34:20 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-09 14:34:20 +0100 |
commit | af5ec4bdda21e9a2f76f22050216a0b1cbbed575 (patch) | |
tree | f93ddc033b70297abb472f7e28a06f9e936cf0ee /src/JackDbusDriver.hpp | |
parent | c321c02a6b9c67b4b106e36a77167ee279b9ef78 (diff) | |
download | patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.tar.gz patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.tar.bz2 patchage-af5ec4bdda21e9a2f76f22050216a0b1cbbed575.zip |
Format all code with clang-format
This configuration tries to get as close to the previous style as possible so
the changes aren't too dramatic. It's still far from ideal and the code could
use some adaptation, but this makes things much easier to work on.
Diffstat (limited to 'src/JackDbusDriver.hpp')
-rw-r--r-- | src/JackDbusDriver.hpp | 128 |
1 files changed, 57 insertions, 71 deletions
diff --git a/src/JackDbusDriver.hpp b/src/JackDbusDriver.hpp index d6c39dd..e3851a3 100644 --- a/src/JackDbusDriver.hpp +++ b/src/JackDbusDriver.hpp @@ -17,14 +17,14 @@ #ifndef PATCHAGE_JACKDBUSDRIVER_HPP #define PATCHAGE_JACKDBUSDRIVER_HPP -#include <string> -#include <jack/jack.h> -#include <jack/statistics.h> -#include <glibmm/thread.h> -#include <dbus/dbus.h> #include "Driver.hpp" #include "Patchage.hpp" #include "PatchageModule.hpp" +#include <dbus/dbus.h> +#include <glibmm/thread.h> +#include <jack/jack.h> +#include <jack/statistics.h> +#include <string> class PatchageEvent; class PatchageCanvas; @@ -45,13 +45,9 @@ public: void refresh(); void destroy_all(); - bool connect( - PatchagePort* src, - PatchagePort* dst); + bool connect(PatchagePort* src, PatchagePort* dst); - bool disconnect( - PatchagePort* src, - PatchagePort* dst); + bool disconnect(PatchagePort* src, PatchagePort* dst); size_t get_xruns(); void reset_xruns(); @@ -64,67 +60,58 @@ public: void process_events(Patchage* app) {} - PatchagePort* create_port_view( - Patchage* patchage, - const PortID& ref); + PatchagePort* create_port_view(Patchage* patchage, const PortID& ref); private: void error_msg(const std::string& msg) const; void info_msg(const std::string& msg) const; - PatchageModule* find_or_create_module( - ModuleType type, - const std::string& name); - - void add_port( - PatchageModule* module, - PortType type, - const std::string& name, - bool is_input); - - void add_port( - dbus_uint64_t client_id, - const char* client_name, - dbus_uint64_t port_id, - const char* port_name, - dbus_uint32_t port_flags, - dbus_uint32_t port_type); - - void remove_port( - dbus_uint64_t client_id, - const char* client_name, - dbus_uint64_t port_id, - const char* port_name); - - void connect_ports( - dbus_uint64_t connection_id, - dbus_uint64_t client1_id, - const char* client1_name, - dbus_uint64_t port1_id, - const char* port1_name, - dbus_uint64_t client2_id, - const char* client2_name, - dbus_uint64_t port2_id, - const char* port2_name); - - void disconnect_ports( - dbus_uint64_t connection_id, - dbus_uint64_t client1_id, - const char* client1_name, - dbus_uint64_t port1_id, - const char* port1_name, - dbus_uint64_t client2_id, - const char* client2_name, - dbus_uint64_t port2_id, - const char* port2_name); - - bool call( - bool response_expected, - const char* iface, - const char* method, - DBusMessage** reply_ptr_ptr, - int in_type, - ...); + PatchageModule* + find_or_create_module(ModuleType type, const std::string& name); + + void add_port(PatchageModule* module, + PortType type, + const std::string& name, + bool is_input); + + void add_port(dbus_uint64_t client_id, + const char* client_name, + dbus_uint64_t port_id, + const char* port_name, + dbus_uint32_t port_flags, + dbus_uint32_t port_type); + + void remove_port(dbus_uint64_t client_id, + const char* client_name, + dbus_uint64_t port_id, + const char* port_name); + + void connect_ports(dbus_uint64_t connection_id, + dbus_uint64_t client1_id, + const char* client1_name, + dbus_uint64_t port1_id, + const char* port1_name, + dbus_uint64_t client2_id, + const char* client2_name, + dbus_uint64_t port2_id, + const char* port2_name); + + void disconnect_ports(dbus_uint64_t connection_id, + dbus_uint64_t client1_id, + const char* client1_name, + dbus_uint64_t port1_id, + const char* port1_name, + dbus_uint64_t client2_id, + const char* client2_name, + dbus_uint64_t port2_id, + const char* port2_name); + + bool call(bool response_expected, + const char* iface, + const char* method, + DBusMessage** reply_ptr_ptr, + int in_type, + ...); void update_attached(); @@ -136,10 +123,9 @@ private: void refresh_internal(bool force); - static DBusHandlerResult dbus_message_hook( - DBusConnection *connection, - DBusMessage *message, - void *me); + static DBusHandlerResult dbus_message_hook(DBusConnection* connection, + DBusMessage* message, + void* me); void on_jack_appeared(); |