diff --git a/src/runnermanagerclient.cpp b/src/runnermanagerclient.cpp index 83ca7ee..2431b22 100644 --- a/src/runnermanagerclient.cpp +++ b/src/runnermanagerclient.cpp @@ -3,12 +3,13 @@ #include "runnermanagerclient.h" +#include "runner1interface.h" + #include #include #include #include #include -#include #include #include #include @@ -338,8 +339,8 @@ void RunnerManagerClient::installRunnerFromUrl(const QString &url, const QString auto attempts = QSharedPointer::create(0); auto callPtr = QSharedPointer>::create(); *callPtr = [this, spec, attempts, callPtr]() { - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("InstallRunnerFromUrl"), spec); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.InstallRunnerFromUrl(spec); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, spec, attempts, callPtr](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w; @@ -397,8 +398,8 @@ void RunnerManagerClient::deletePrefix(const QString &gameId, const QString &pre auto attempts = QSharedPointer::create(0); auto callPtr = QSharedPointer>::create(); *callPtr = [this, spec, id, attempts, callPtr]() { - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("DeletePrefix"), spec); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.DeletePrefix(spec); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w; @@ -438,8 +439,8 @@ void RunnerManagerClient::cancelCurrentInstall() setStatus(QStringLiteral("Cancelling...")); - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - iface.asyncCall(QStringLiteral("CancelInstall"), m_installId); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + iface.CancelInstall(m_installId); } void RunnerManagerClient::onInstallStarted(const QString &installId, const QVariantMap &) @@ -489,8 +490,8 @@ void RunnerManagerClient::refreshRunners() { ensureRunnerDaemon(); - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("ListRunners")); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.ListRunners(); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w; @@ -544,8 +545,8 @@ void RunnerManagerClient::refreshGameProfiles() { ensureRunnerDaemon(); - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("ListGameProfiles")); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.ListGameProfiles(); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w; @@ -599,8 +600,8 @@ void RunnerManagerClient::requestGameProfile(const QString &gameId) auto attempts = QSharedPointer::create(0); auto callPtr = QSharedPointer>::create(); *callPtr = [this, id, attempts, callPtr]() { - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("GetGameProfile"), id); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.GetGameProfile(id); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w; @@ -641,8 +642,8 @@ void RunnerManagerClient::setGameProfile(const QVariantMap &spec) auto attempts = QSharedPointer::create(0); auto callPtr = QSharedPointer>::create(); *callPtr = [this, spec, id, attempts, callPtr]() { - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("SetGameProfile"), spec); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.SetGameProfile(spec); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w; @@ -683,8 +684,8 @@ void RunnerManagerClient::clearGameProfile(const QString &gameId) auto attempts = QSharedPointer::create(0); auto callPtr = QSharedPointer>::create(); *callPtr = [this, id, attempts, callPtr]() { - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("ClearGameProfile"), id); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.ClearGameProfile(id); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w; @@ -720,8 +721,8 @@ void RunnerManagerClient::uninstallRunner(const QString &runnerId) return; } - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("UninstallRunner"), id); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.UninstallRunner(id); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w; @@ -763,8 +764,8 @@ void RunnerManagerClient::ensurePrefix(const QString &gameId, const QString &run auto attempts = QSharedPointer::create(0); auto callPtr = QSharedPointer>::create(); *callPtr = [this, spec, id, attempts, callPtr]() { - QDBusInterface iface(kRunnerService, kRunnerPath, kRunnerInterface, QDBusConnection::sessionBus()); - QDBusPendingCall call = iface.asyncCall(QStringLiteral("EnsurePrefix"), spec); + org::kde::ALaKarte::Runner1 iface(kRunnerService, kRunnerPath, QDBusConnection::sessionBus()); + QDBusPendingCall call = iface.EnsurePrefix(spec); auto *watcher = new QDBusPendingCallWatcher(call, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this, id, attempts, callPtr](QDBusPendingCallWatcher *w) { QDBusPendingReply reply = *w;