#ifdef DBUS_ENABLED #include "proxy_backend.hpp" #include "log.hpp" #include #include using namespace std::literals::chrono_literals; std::string ProxyGlueBackend::get_id() { return "proxy"; } std::string ProxyGlueBackend::get_name() { return "Proxy Backend"; } bool ProxyGlueBackend::allow_multi_instance() { return false; } int ProxyGlueBackend::run(std::vector realArgs, int argc, char **argv) { bool commands_specified = parse_args(realArgs, argc, argv); if (!commands_specified) { DEBUG.writeln("No commands specified."); return 1; } sender = DBusAPISender::Create(); if (sender == nullptr) { ERROR.writeln("Existing instance required to send commands."); return 1; } playback = (Playback*)sender; setup_playback_args(); return 0; } void ProxyGlueBackend::quitDaemon() { ((DBusAPISender*)playback)->Quit(); } #endif