aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2020-01-27 12:37:45 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2020-01-27 15:10:03 -0800
commitaa8e593bf3d5138d007619048eeac0e4b9863b7a (patch)
treeceb504458987465fc29894f1320bc6abf68978e1
parentac2557137950463ba3feec2a19ca26c81ee91cbe (diff)
launcher: remove unused DBus code artifactsicefish_8.99.5icefish/8.99.58.99.5
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: I27f5afd89bd15eb50486e2546a730e40f016b05e Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
-rw-r--r--interfaces/README.md10
-rw-r--r--interfaces/afm_user_daemon.xml52
-rw-r--r--interfaces/appframework.xml57
-rw-r--r--interfaces/include/afm_user_daemon.hpp21
-rw-r--r--interfaces/include/appframework.hpp66
-rw-r--r--interfaces/interfaces.pri18
-rw-r--r--interfaces/interfaces.pro60
-rw-r--r--interfaces/src/appframework.cpp167
-rw-r--r--launcher.pro3
-rw-r--r--launcher/launcher.pro6
-rw-r--r--launcher/src/appinfo.cpp33
-rw-r--r--launcher/src/appinfo.h5
-rw-r--r--launcher/src/applicationlauncher.cpp85
-rw-r--r--launcher/src/applicationlauncher.h55
-rw-r--r--launcher/src/applicationmodel.cpp12
-rw-r--r--launcher/src/main.cpp42
-rw-r--r--package/config.xml1
17 files changed, 9 insertions, 684 deletions
diff --git a/interfaces/README.md b/interfaces/README.md
deleted file mode 100644
index 4a80a6c..0000000
--- a/interfaces/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-AGL launcher reference implementation
-
-
-Build with QtCreator 3.5.1
-
-AGL repo for source code:
-https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/launcher
-
-AGL repo for bitbake recipe:
-https://gerrit.automotivelinux.org/gerrit/apps/launcher
diff --git a/interfaces/afm_user_daemon.xml b/interfaces/afm_user_daemon.xml
deleted file mode 100644
index 17b7d63..0000000
--- a/interfaces/afm_user_daemon.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<node path="/org/AGL/afm/user">
- <interface name="org.AGL.afm.user">
- <method name="runnables">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="detail">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="start">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="once">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="terminate">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="pause">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="resume">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="runners">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="state">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="install">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <method name="uninstall">
- <arg name="in" type="s" direction="in"/>
- <arg name="out" type="s" direction="out"/>
- </method>
- <signal name="changed">
- <arg name="out" type="s" direction="out"/>
- </signal>
- </interface>
-</node>
diff --git a/interfaces/appframework.xml b/interfaces/appframework.xml
deleted file mode 100644
index ebc5088..0000000
--- a/interfaces/appframework.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
-<!-- Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License. -->
-<node>
- <!--
- org.agl.appframework:
- @short_description: The interface of the app framework binder.
-
- The app framework has to provide some basic functionality like
- getting a list of applications and start them. In further versions,
- also pausing or stopping, .
- -->
- <interface name="org.agl.appframework">
- <!--
- getAvailableApps:
- @apps: A list of applications that can be launched.
-
- The application info consists of:
- string id;
- string version;
- int width;
- int height;
- string name;
- string description;
- string shortname;
- string author;
- string iconPath;
- -->
- <method name="getAvailableApps">
- <arg name="apps" type="{ssiisssss}" direction="out"/>
- <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;AppInfo&gt;"/>
- </method>
- <!--
- launchApp:
- @name: The name of the application that shall be launched.
- @pid: Returns the pid of the process.
-
- Use the id of the application info to launch the app.
- -->
- <method name="launchApp">
- <arg name="name" type="s" direction="in"/>
- <arg name="pid" type="i" direction="out"/>
- </method>
- </interface>
-</node>
-
diff --git a/interfaces/include/afm_user_daemon.hpp b/interfaces/include/afm_user_daemon.hpp
deleted file mode 100644
index b9a5321..0000000
--- a/interfaces/include/afm_user_daemon.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef AFM_USER_DAEMON_HPP
-#define AFM_USER_DAEMON_HPP
-
-
-#endif // AFM_USER_DAEMON_HPP
diff --git a/interfaces/include/appframework.hpp b/interfaces/include/appframework.hpp
deleted file mode 100644
index 98ec317..0000000
--- a/interfaces/include/appframework.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef APPFRAMEWORK_HPP
-#define APPFRAMEWORK_HPP
-
-#include <QtCore/QSharedDataPointer>
-#include <QtDBus/QDBusArgument>
-
-class AppInfo
-{
- Q_GADGET
- Q_PROPERTY(QString id READ id)
- Q_PROPERTY(QString version READ version)
- Q_PROPERTY(int width READ width)
- Q_PROPERTY(int height READ height)
- Q_PROPERTY(QString name READ name)
- Q_PROPERTY(QString description READ description)
- Q_PROPERTY(QString shortname READ shortname)
- Q_PROPERTY(QString author READ author)
- Q_PROPERTY(QString iconPath READ iconPath)
-public:
- AppInfo();
- AppInfo(const AppInfo &other);
- virtual ~AppInfo();
- AppInfo &operator =(const AppInfo &other);
- void swap(AppInfo &other) { qSwap(d, other.d); }
-
- QString id() const;
- QString version() const;
- int width() const;
- int height() const;
- QString name() const;
- QString description() const;
- QString shortname() const;
- QString author() const;
- QString iconPath() const;
-
- void read(const QJsonObject &json);
-
- friend QDBusArgument &operator <<(QDBusArgument &argument, const AppInfo &appInfo);
- friend const QDBusArgument &operator >>(const QDBusArgument &argument, AppInfo &appInfo);
-
-private:
- class Private;
- QSharedDataPointer<Private> d;
-};
-
-Q_DECLARE_SHARED(AppInfo)
-Q_DECLARE_METATYPE(AppInfo)
-Q_DECLARE_METATYPE(QList<AppInfo>)
-
-#endif // APPFRAMEWORK_HPP
diff --git a/interfaces/interfaces.pri b/interfaces/interfaces.pri
deleted file mode 100644
index 07b9e6a..0000000
--- a/interfaces/interfaces.pri
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (C) 2016 The Qt Company Ltd.
-# Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-INCLUDEPATH += $$PWD $$OUT_PWD/../interfaces/
-
-LIBS += -L$$OUT_PWD/../interfaces/ -linterfaces
diff --git a/interfaces/interfaces.pro b/interfaces/interfaces.pro
deleted file mode 100644
index 281eeb8..0000000
--- a/interfaces/interfaces.pro
+++ /dev/null
@@ -1,60 +0,0 @@
-# Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-TEMPLATE = lib
-TARGET = interfaces
-QT = dbus
-CONFIG += staticlib
-
-HEADERS += \
- include/appframework.hpp
-
-SOURCES += \
- src/appframework.cpp
-
-XMLSOURCES = \
- afm_user_daemon.xml \
- appframework.xml
-
-gen_adaptor_cpp.input = XMLSOURCES
-gen_adaptor_cpp.commands = \
- qdbusxml2cpp -i include/${QMAKE_FILE_IN_BASE}.hpp -m -a ${QMAKE_FILE_IN_BASE}_adaptor ${QMAKE_FILE_IN}; \
- moc $$OUT_PWD/${QMAKE_FILE_IN_BASE}_adaptor.h -o $$OUT_PWD/${QMAKE_FILE_IN_BASE}_adaptor.moc
-gen_adaptor_cpp.output = ${QMAKE_FILE_IN_BASE}_adaptor.cpp
-gen_adaptor_cpp.variable_out = SOURCES
-gen_adaptor_cpp.clean = ${QMAKE_FILE_IN_BASE}_adaptor.cpp
-
-gen_proxy_cpp.input = XMLSOURCES
-gen_proxy_cpp.commands = \
- qdbusxml2cpp -i include/${QMAKE_FILE_IN_BASE}.hpp -m -p ${QMAKE_FILE_IN_BASE}_proxy ${QMAKE_FILE_IN}; \
- moc $$OUT_PWD/${QMAKE_FILE_IN_BASE}_proxy.h -o $$OUT_PWD/${QMAKE_FILE_IN_BASE}_proxy.moc
-gen_proxy_cpp.output = ${QMAKE_FILE_IN_BASE}_proxy.cpp
-gen_proxy_cpp.variable_out = SOURCES
-gen_proxy_cpp.clean = ${QMAKE_FILE_IN_BASE}_proxy.cpp
-
-gen_adaptor_h.input = XMLSOURCES
-gen_adaptor_h.commands = @echo Fake making the header for ${QMAKE_FILE_IN}
-gen_adaptor_h.depends = ${QMAKE_FILE_IN_BASE}_adaptor.cpp
-gen_adaptor_h.output = ${QMAKE_FILE_IN_BASE}_adaptor.h
-gen_adaptor_h.clean = ${QMAKE_FILE_IN_BASE}_adaptor.h
-
-gen_proxy_h.input = XMLSOURCES
-gen_proxy_h.commands = @echo Fake making the header for ${QMAKE_FILE_IN}
-gen_proxy_h.depends = ${QMAKE_FILE_IN_BASE}_proxy.cpp
-gen_proxy_h.output = ${QMAKE_FILE_IN_BASE}_proxy.h
-gen_proxy_h.clean = ${QMAKE_FILE_IN_BASE}_proxy.h
-
-QMAKE_EXTRA_COMPILERS += gen_adaptor_cpp gen_proxy_cpp gen_adaptor_h gen_proxy_h
-
-DISTFILES +=
diff --git a/interfaces/src/appframework.cpp b/interfaces/src/appframework.cpp
deleted file mode 100644
index 7420642..0000000
--- a/interfaces/src/appframework.cpp
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "include/appframework.hpp"
-
-#include <QtCore/QJsonObject>
-
-class AppInfo::Private : public QSharedData
-{
-public:
- Private();
- Private(const Private &other);
-
- QString id;
- QString version;
- int width;
- int height;
- QString name;
- QString description;
- QString shortname;
- QString author;
- QString iconPath;
-};
-
-AppInfo::Private::Private()
- : width(-1)
- , height(-1)
-{
-}
-
-AppInfo::Private::Private(const Private &other)
- : QSharedData(other)
- , id(other.id)
- , version(other.version)
- , width(other.width)
- , height(other.height)
- , name(other.name)
- , description(other.description)
- , shortname(other.shortname)
- , author(other.author)
- , iconPath(other.iconPath)
-{
-}
-
-AppInfo::AppInfo()
- : d(new Private)
-{
-}
-
-AppInfo::AppInfo(const AppInfo &other)
- : d(other.d)
-{
-}
-
-AppInfo::~AppInfo()
-{
-}
-
-AppInfo &AppInfo::operator =(const AppInfo &other)
-{
- d = other.d;
- return *this;
-}
-
-QString AppInfo::id() const
-{
- return d->id;
-}
-
-QString AppInfo::version() const
-{
- return d->version;
-}
-
-int AppInfo::width() const
-{
- return d->width;
-}
-
-int AppInfo::height() const
-{
- return d->height;
-}
-
-QString AppInfo::name() const
-{
- return d->name;
-}
-
-QString AppInfo::description() const
-{
- return d->description;
-}
-
-QString AppInfo::shortname() const
-{
- return d->shortname;
-}
-
-QString AppInfo::author() const
-{
- return d->author;
-}
-
-QString AppInfo::iconPath() const
-{
- return d->iconPath;
-}
-
-void AppInfo::read(const QJsonObject &json)
-{
- d->id = json["id"].toString();
- d->version = json["version"].toString();
- d->width = json["width"].toInt();
- d->height = json["height"].toInt();
- d->name = json["name"].toString();
- d->description = json["description"].toString();
- d->shortname = json["shortname"].toString();
- d->author = json["author"].toString();
- d->iconPath = json["iconPath"].toString();
-}
-
-QDBusArgument &operator <<(QDBusArgument &argument, const AppInfo &appInfo)
-{
- argument.beginStructure();
- argument << appInfo.d->id;
- argument << appInfo.d->version;
- argument << appInfo.d->width;
- argument << appInfo.d->height;
- argument << appInfo.d->name;
- argument << appInfo.d->description;
- argument << appInfo.d->shortname;
- argument << appInfo.d->author;
- argument << appInfo.d->iconPath;
- argument.endStructure();
-
- return argument;
-}
-
-const QDBusArgument &operator >>(const QDBusArgument &argument, AppInfo &appInfo)
-{
- argument.beginStructure();
- argument >> appInfo.d->id;
- argument >> appInfo.d->version;
- argument >> appInfo.d->width;
- argument >> appInfo.d->height;
- argument >> appInfo.d->name;
- argument >> appInfo.d->description;
- argument >> appInfo.d->shortname;
- argument >> appInfo.d->author;
- argument >> appInfo.d->iconPath;
- argument.endStructure();
- return argument;
-}
diff --git a/launcher.pro b/launcher.pro
index e142b63..b68702e 100644
--- a/launcher.pro
+++ b/launcher.pro
@@ -16,9 +16,8 @@ TEMPLATE = subdirs
load(configure)
-SUBDIRS = interfaces \
+SUBDIRS = \
launcher \
package
-launcher.depends = interfaces
package.depends += launcher
diff --git a/launcher/launcher.pro b/launcher/launcher.pro
index e16e9ce..63c6704 100644
--- a/launcher/launcher.pro
+++ b/launcher/launcher.pro
@@ -15,22 +15,18 @@
TEMPLATE = app
TARGET = launcher
-QT = qml quick dbus websockets
+QT = qml quick websockets
CONFIG += c++11 link_pkgconfig
DESTDIR = $${OUT_PWD}/../package/root/bin
PKGCONFIG += qlibwindowmanager libhomescreen
-include(../interfaces/interfaces.pri)
-
SOURCES += \
src/main.cpp \
src/applicationmodel.cpp \
src/appinfo.cpp \
- src/applicationlauncher.cpp \
src/homescreenhandler.cpp
HEADERS += \
- src/applicationlauncher.h \
src/applicationmodel.h \
src/appinfo.h \
src/homescreenhandler.h
diff --git a/launcher/src/appinfo.cpp b/launcher/src/appinfo.cpp
index c55d94c..78c48ed 100644
--- a/launcher/src/appinfo.cpp
+++ b/launcher/src/appinfo.cpp
@@ -142,36 +142,3 @@ void AppInfo::read(const QJsonObject &json)
d->author = json["author"].toString();
d->iconPath = json["iconPath"].toString();
}
-
-QDBusArgument &operator <<(QDBusArgument &argument, const AppInfo &appInfo)
-{
- argument.beginStructure();
- argument << appInfo.d->id;
- argument << appInfo.d->version;
- argument << appInfo.d->width;
- argument << appInfo.d->height;
- argument << appInfo.d->name;
- argument << appInfo.d->description;
- argument << appInfo.d->shortname;
- argument << appInfo.d->author;
- argument << appInfo.d->iconPath;
- argument.endStructure();
-
- return argument;
-}
-
-const QDBusArgument &operator >>(const QDBusArgument &argument, AppInfo &appInfo)
-{
- argument.beginStructure();
- argument >> appInfo.d->id;
- argument >> appInfo.d->version;
- argument >> appInfo.d->width;
- argument >> appInfo.d->height;
- argument >> appInfo.d->name;
- argument >> appInfo.d->description;
- argument >> appInfo.d->shortname;
- argument >> appInfo.d->author;
- argument >> appInfo.d->iconPath;
- argument.endStructure();
- return argument;
-}
diff --git a/launcher/src/appinfo.h b/launcher/src/appinfo.h
index 052c5df..e1b97e6 100644
--- a/launcher/src/appinfo.h
+++ b/launcher/src/appinfo.h
@@ -19,8 +19,8 @@
#ifndef APPINFO_H
#define APPINFO_H
+#include <QObject>
#include <QtCore/QSharedDataPointer>
-#include <QtDBus/QDBusArgument>
class AppInfo
{
@@ -54,9 +54,6 @@ public:
void read(const QJsonObject &json);
- friend QDBusArgument &operator <<(QDBusArgument &argument, const AppInfo &appInfo);
- friend const QDBusArgument &operator >>(const QDBusArgument &argument, AppInfo &appInfo);
-
private:
class Private;
QSharedDataPointer<Private> d;
diff --git a/launcher/src/applicationlauncher.cpp b/launcher/src/applicationlauncher.cpp
deleted file mode 100644
index 19ea2e3..0000000
--- a/launcher/src/applicationlauncher.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (C) 2016 The Qt Company Ltd.
- * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
- * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "applicationlauncher.h"
-
-#include "afm_user_daemon_proxy.h"
-
-#include "hmi-debug.h"
-
-extern org::AGL::afm::user *afm_user_daemon_proxy;
-
-ApplicationLauncher::ApplicationLauncher(QObject *parent)
- : QObject(parent)
- , m_launching(false)
- , m_timeout(new QTimer(this))
-{
- m_timeout->setInterval(3000);
- m_timeout->setSingleShot(true);
- connect(m_timeout, &QTimer::timeout, [&]() {
- setLaunching(false);
- });
- connect(this, &ApplicationLauncher::launchingChanged, [&](bool launching) {
- if (launching)
- m_timeout->start();
- else
- m_timeout->stop();
- });
- connect(this, &ApplicationLauncher::currentChanged, [&]() {
- setLaunching(false);
- });
-}
-
-int ApplicationLauncher::launch(const QString &application)
-{
- int result = -1;
- HMI_DEBUG("launch","ApplicationLauncher launch %s.", application.toStdString().c_str());
-
- result = afm_user_daemon_proxy->start(application).value().toInt();
- HMI_DEBUG("launch","ApplicationLauncher pid: %d.", result);
-
- if (result > 1) {
- setLaunching(true);
- }
-
- return result;
-}
-
-bool ApplicationLauncher::isLaunching() const
-{
- return m_launching;
-}
-
-void ApplicationLauncher::setLaunching(bool launching)
-{
- if (m_launching == launching) return;
- m_launching = launching;
- launchingChanged(launching);
-}
-
-QString ApplicationLauncher::current() const
-{
- return m_current;
-}
-
-void ApplicationLauncher::setCurrent(const QString &current)
-{
- if (m_current == current) return;
- m_current = current;
- emit currentChanged(current);
-}
diff --git a/launcher/src/applicationlauncher.h b/launcher/src/applicationlauncher.h
deleted file mode 100644
index d205994..0000000
--- a/launcher/src/applicationlauncher.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2016 The Qt Company Ltd.
- * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
- * Copyright (c) 2018 TOYOTA MOTOR CORPORATION
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef APPLICATIONLAUNCHER_H
-#define APPLICATIONLAUNCHER_H
-
-#include <QtCore/QObject>
-
-class QTimer;
-
-class ApplicationLauncher : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(bool launching READ isLaunching NOTIFY launchingChanged)
- Q_PROPERTY(QString current READ current WRITE setCurrent NOTIFY currentChanged)
-public:
- explicit ApplicationLauncher(QObject *parent = NULL);
-
- bool isLaunching() const;
- QString current() const;
-
-signals:
- void newAppRequestsToBeVisible(int pid);
- void launchingChanged(bool launching);
- void currentChanged(const QString &current);
-
-public slots:
- int launch(const QString &application);
- void setCurrent(const QString &current);
-
-private:
- void setLaunching(bool launching);
-
-private:
- bool m_launching;
- QString m_current;
- QTimer *m_timeout;
-};
-
-#endif // APPLICATIONLAUNCHER_H
diff --git a/launcher/src/applicationmodel.cpp b/launcher/src/applicationmodel.cpp
index 261e43e..42982d5 100644
--- a/launcher/src/applicationmodel.cpp
+++ b/launcher/src/applicationmodel.cpp
@@ -19,14 +19,12 @@
#include "applicationmodel.h"
#include "appinfo.h"
-#include "hmi-debug.h"
-
-#include <QtDBus/QDBusInterface>
-#include <QtDBus/QDBusReply>
+#include <QtCore/QFile>
+#include <QtCore/QJsonObject>
+#include <QtCore/QJsonDocument>
+#include <QtCore/QJsonArray>
-#include "afm_user_daemon_proxy.h"
-
-extern org::AGL::afm::user *afm_user_daemon_proxy;
+#include "hmi-debug.h"
class ApplicationModel::Private
{
diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp
index e550948..5a44cc7 100644
--- a/launcher/src/main.cpp
+++ b/launcher/src/main.cpp
@@ -17,6 +17,7 @@
#include <QGuiApplication>
#include <QCommandLineParser>
+#include <QtCore/QUrlQuery>
#include <QtGui/QGuiApplication>
#include <QtQml/QQmlApplicationEngine>
#include <QtQml/QQmlContext>
@@ -25,40 +26,16 @@
#include <QThread>
#include <qlibwindowmanager.h>
-#include "applicationlauncher.h"
#include "applicationmodel.h"
#include "appinfo.h"
-#include "afm_user_daemon_proxy.h"
#include "homescreenhandler.h"
#include "hmi-debug.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;
- }
-};
-
-}
-
int main(int argc, char *argv[])
{
QString myname = QString("launcher");
QGuiApplication a(argc, argv);
- // use launch process
- QScopedPointer<org::AGL::afm::user, Cleanup> 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(myname);
@@ -85,11 +62,6 @@ int main(int argc, char *argv[])
// import C++ class to QML
qmlRegisterType<ApplicationModel>("AppModel", 1, 0, "ApplicationModel");
- // DBus
- qDBusRegisterMetaType<AppInfo>();
- qDBusRegisterMetaType<QList<AppInfo> >();
-
- ApplicationLauncher *launcher = new ApplicationLauncher();
QLibWindowmanager* layoutHandler = new QLibWindowmanager();
if(layoutHandler->init(port,token) != 0){
exit(EXIT_FAILURE);
@@ -105,17 +77,6 @@ int main(int argc, char *argv[])
layoutHandler->endDraw(myname);
});
- layoutHandler->set_event_handler(QLibWindowmanager::Event_Visible, [layoutHandler, launcher](json_object *object) {
- QString label = QString(json_object_get_string( json_object_object_get(object, "drawing_name") ));
- qDebug() << label;
- QMetaObject::invokeMethod(launcher, "setCurrent", Qt::QueuedConnection, Q_ARG(QString, label == "HomeScreen" ? "Home" : label));
- });
-
- layoutHandler->set_event_handler(QLibWindowmanager::Event_Invisible, [layoutHandler, launcher](json_object *object) {
- const char* label = json_object_get_string( json_object_object_get(object, "drawing_name") );
- HMI_DEBUG("launch", "surface %s Event_Invisible", label);
- });
-
HomescreenHandler* homescreenHandler = new HomescreenHandler();
homescreenHandler->init(port, token.toStdString().c_str(), layoutHandler, myname);
@@ -143,7 +104,6 @@ int main(int argc, char *argv[])
QQmlApplicationEngine engine;
engine.rootContext()->setContextProperty(QStringLiteral("layoutHandler"), layoutHandler);
engine.rootContext()->setContextProperty(QStringLiteral("homescreenHandler"), homescreenHandler);
- engine.rootContext()->setContextProperty(QStringLiteral("launcher"), launcher);
engine.rootContext()->setContextProperty(QStringLiteral("screenInfo"), &screenInfo);
engine.load(QUrl(QStringLiteral("qrc:/Launcher.qml")));
homescreenHandler->getRunnables();
diff --git a/package/config.xml b/package/config.xml
index 36de348..0bd4e51 100644
--- a/package/config.xml
+++ b/package/config.xml
@@ -13,7 +13,6 @@
<feature name="urn:AGL:widget:required-permission">
<param name="urn:AGL:permission::public:no-htdocs" value="required" />
<param name="urn:AGL:permission::system:run-by-default" value="required" />
- <param name="http://tizen.org/privilege/internal/dbus" value="required" />
<param name="urn:AGL:permission::public:display" value="required" />
</feature>
</widget>