From 133ac94184bbd28b53544b34e3391f8d6bffdeca Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Mon, 27 Jan 2020 11:17:15 -0800 Subject: homescreen: remove unused DBus code artifacts All accesses to control launching applications are now done via agl-service-homescreen/libhomescreen, and thus the unused DBus interface can be removed. Bug-AGL: SPEC-3137 Change-Id: I56201c138c7061bba8114e367729d2b29f672ed1 Signed-off-by: Matt Ranostay --- homescreen/homescreen.pro | 6 ++---- homescreen/src/applicationlauncher.cpp | 21 ++------------------- homescreen/src/applicationlauncher.h | 1 - homescreen/src/main.cpp | 28 +--------------------------- 4 files changed, 5 insertions(+), 51 deletions(-) (limited to 'homescreen') diff --git a/homescreen/homescreen.pro b/homescreen/homescreen.pro index 773271e..3a08ddc 100644 --- a/homescreen/homescreen.pro +++ b/homescreen/homescreen.pro @@ -15,15 +15,13 @@ TEMPLATE = app TARGET = HomeScreen -QT = qml quick dbus websockets +QT = qml quick websockets CONFIG += c++11 link_pkgconfig DESTDIR = $${OUT_PWD}/../package/root/bin PKGCONFIG += qlibwindowmanager qtappfw afb-helpers-qt LIBS += -lhomescreen -include(../interfaces/interfaces.pri) - SOURCES += \ src/main.cpp \ src/statusbarmodel.cpp \ @@ -55,4 +53,4 @@ RESOURCES += \ qml/images/Status/status.qrc \ qml/images/images.qrc \ qml/qml.qrc \ - qml/images/SpeechChrome/speechchrome.qrc \ No newline at end of file + qml/images/SpeechChrome/speechchrome.qrc diff --git a/homescreen/src/applicationlauncher.cpp b/homescreen/src/applicationlauncher.cpp index 5a1e2d6..6bb0729 100644 --- a/homescreen/src/applicationlauncher.cpp +++ b/homescreen/src/applicationlauncher.cpp @@ -16,14 +16,12 @@ * limitations under the License. */ -#include "applicationlauncher.h" +#include -#include "afm_user_daemon_proxy.h" +#include "applicationlauncher.h" #include "hmi-debug.h" -extern org::AGL::afm::user *afm_user_daemon_proxy; - ApplicationLauncher::ApplicationLauncher(QObject *parent) : QObject(parent) , m_launching(false) @@ -45,21 +43,6 @@ ApplicationLauncher::ApplicationLauncher(QObject *parent) }); } -int ApplicationLauncher::launch(const QString &application) -{ - int result = -1; - HMI_DEBUG("HomeScreen","ApplicationLauncher launch %s.", application.toStdString().c_str()); - - result = afm_user_daemon_proxy->start(application).value().toInt(); - HMI_DEBUG("HomeScreen","ApplicationLauncher pid: %d.", result); - - if (result > 1) { - setLaunching(true); - } - - return result; -} - bool ApplicationLauncher::isLaunching() const { return m_launching; diff --git a/homescreen/src/applicationlauncher.h b/homescreen/src/applicationlauncher.h index dfa5846..bd7656e 100644 --- a/homescreen/src/applicationlauncher.h +++ b/homescreen/src/applicationlauncher.h @@ -40,7 +40,6 @@ signals: void currentChanged(const QString ¤t); public slots: - int launch(const QString &application); void setCurrent(const QString ¤t); private: diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp index 5c819f9..b92ff60 100644 --- a/homescreen/src/main.cpp +++ b/homescreen/src/main.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -28,42 +29,15 @@ #include #include "applicationlauncher.h" #include "statusbarmodel.h" -#include "afm_user_daemon_proxy.h" #include "mastervolume.h" #include "homescreenhandler.h" #include "hmi-debug.h" #include "chromecontroller.h" -// XXX: We want this DBus connection to be shared across the different -// QML objects, is there another way to do this, a nice way, perhaps? -org::AGL::afm::user *afm_user_daemon_proxy; - -namespace { - -struct Cleanup { - static inline void cleanup(org::AGL::afm::user *p) { - delete p; - afm_user_daemon_proxy = Q_NULLPTR; - } -}; - -void noOutput(QtMsgType, const QMessageLogContext &, const QString &) -{ -} - -} - int main(int argc, char *argv[]) { QGuiApplication a(argc, argv); - // use launch process - QScopedPointer afm_user_daemon_proxy(new org::AGL::afm::user("org.AGL.afm.user", - "/org/AGL/afm/user", - QDBusConnection::sessionBus(), - 0)); - ::afm_user_daemon_proxy = afm_user_daemon_proxy.data(); - QCoreApplication::setOrganizationDomain("LinuxFoundation"); QCoreApplication::setOrganizationName("AutomotiveGradeLinux"); QCoreApplication::setApplicationName("HomeScreen"); -- cgit 1.2.3-korg