38 access_service()->object_for_path(
39 dbus::types::ObjectPath(
40 dbus::traits::Service<media::Service>::object_path()))})
43 worker = std::move(std::thread([bus]()
54 if (worker.joinable())
60 auto op = d->object->invoke_method_synchronously<mpris::Service::CreateSession,
61 dbus::types::ObjectPath>();
64 throw std::runtime_error(
"Problem creating session: " + op.error());
69 access_service()->object_for_path(op.value())
75 auto op = d->object->invoke_method_synchronously<mpris::Service::CreateFixedSession,
76 dbus::types::ObjectPath>(name);
79 throw std::runtime_error(
"Problem creating session: " + op.error());
84 access_service()->object_for_path(op.value())
90 auto op = d->object->invoke_method_synchronously<mpris::Service::ResumeSession,
91 dbus::types::ObjectPath>(key);
94 throw std::runtime_error(
"Problem resuming session: " + op.error());
99 access_service()->object_for_path(op.value())
105 std::cout << __PRETTY_FUNCTION__ << std::endl;
106 auto op = d->object->invoke_method_synchronously<mpris::Service::PauseOtherSessions,
110 throw std::runtime_error(
"Problem pausing other sessions: " + op.error());