aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md39
-rw-r--r--homescreenappframeworkbinderagl.pro22
-rw-r--r--homescreenappframeworkbinderagl/.gitignore125
-rw-r--r--homescreenappframeworkbinderagl/LICENSE54
-rw-r--r--homescreenappframeworkbinderagl/README.md11
-rw-r--r--homescreenappframeworkbinderagl/conf/HomeScreenAppFrameworkBinderAGL.service15
-rw-r--r--homescreenappframeworkbinderagl/homescreenappframeworkbinderagl.pro28
-rw-r--r--homescreenappframeworkbinderagl/src/homescreenappframeworkbinderagl.cpp98
-rw-r--r--homescreenappframeworkbinderagl/src/homescreenappframeworkbinderagl.h46
-rw-r--r--homescreenappframeworkbinderagl/src/main.cpp54
-rw-r--r--interfaces/LICENSE54
-rw-r--r--interfaces/README.md11
-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.pro57
-rw-r--r--interfaces/src/appframework.cpp167
-rw-r--r--test/commandlinetests.txt35
20 files changed, 1030 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..77c25e8
--- /dev/null
+++ b/README.md
@@ -0,0 +1,39 @@
+This project contains:
+
+HomeScreenAppFrameworkBinderAGL: Binder for the AGL application framework
+
+AGL repo for source code:
+https://gerrit.automotivelinux.org/gerrit/gitweb?p=staging%2FHomeScreen.git
+
+AGL repo for bitbake recipe:
+https://gerrit.automotivelinux.org/gerrit/gitweb?p=AGL/meta-agl-demo.git;a=blob;f=recipes-demo-hmi/homescreen/homescreen_git.bb
+
+
+
+
+Quickstart:
+
+Instructions for building HomeScreenAppFrameworkBinderAGL app
+-------------------------------------------------------------
+
+The HomeScreenAppFrameworkBinderAGL app is part of the
+packagegroup-agl-demo-platform
+packagegroup.
+
+This also includes the following apps:
+- HomeScreen
+- InputEventManager
+- SampleAppTimeDate
+- SampleHomeScreenInterfaceApp
+- WindowManager
+
+And the library
+- libhomescreen
+
+
+To build all the above, follow the instrucions on the AGL
+documentation website:
+http://docs.automotivelinux.org/docs/getting_started/en/dev/reference/source-code.html#features-supported-by-aglsetup
+
+Please activate the "agl-demo" feature when running the aglsetup script:
+http://docs.automotivelinux.org/docs/getting_started/en/dev/reference/source-code.html#features-supported-by-aglsetup
diff --git a/homescreenappframeworkbinderagl.pro b/homescreenappframeworkbinderagl.pro
new file mode 100644
index 0000000..212d287
--- /dev/null
+++ b/homescreenappframeworkbinderagl.pro
@@ -0,0 +1,22 @@
+# 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 = subdirs
+
+load(configure)
+
+SUBDIRS = interfaces \
+ homescreenappframeworkbinderagl
+
+HomeScreenAppFrameworkBinderAGL.depends = interfaces
diff --git a/homescreenappframeworkbinderagl/.gitignore b/homescreenappframeworkbinderagl/.gitignore
new file mode 100644
index 0000000..051f2d5
--- /dev/null
+++ b/homescreenappframeworkbinderagl/.gitignore
@@ -0,0 +1,125 @@
+# manually added:
+.DS_Store
+
+# Created by https://www.gitignore.io/api/linux,qt,c,c++
+
+### Linux ###
+*~
+
+# temporary files which can be created if a process still has a handle open of a deleted file
+.fuse_hidden*
+
+# KDE directory preferences
+.directory
+
+# Linux trash folder which might appear on any partition or disk
+.Trash-*
+
+
+### Qt ###
+# C++ objects and libs
+
+*.slo
+*.lo
+*.o
+*.a
+*.la
+*.lai
+*.so
+*.dll
+*.dylib
+
+# Qt-es
+
+/.qmake.cache
+/.qmake.stash
+*.pro.user
+*.pro.user.*
+*.qbs.user
+*.qbs.user.*
+*.moc
+moc_*.cpp
+qrc_*.cpp
+ui_*.h
+Makefile*
+*build-*
+
+# QtCreator
+
+*.autosave
+
+# QtCtreator Qml
+*.qmlproject.user
+*.qmlproject.user.*
+
+# QtCtreator CMake
+CMakeLists.txt.user
+
+
+
+### C ###
+# Object files
+*.o
+*.ko
+*.obj
+*.elf
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Libraries
+*.lib
+*.a
+*.la
+*.lo
+
+# Shared objects (inc. Windows DLLs)
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# Executables
+*.exe
+*.out
+*.app
+*.i*86
+*.x86_64
+*.hex
+
+# Debug files
+*.dSYM/
+
+
+### C++ ###
+# Compiled Object files
+*.slo
+*.lo
+*.o
+*.obj
+
+# Precompiled Headers
+*.gch
+*.pch
+
+# Compiled Dynamic libraries
+*.so
+*.dylib
+*.dll
+
+# Fortran module files
+*.mod
+
+# Compiled Static libraries
+*.lai
+*.la
+*.a
+*.lib
+
+# Executables
+*.exe
+*.out
+*.app
+
+
diff --git a/homescreenappframeworkbinderagl/LICENSE b/homescreenappframeworkbinderagl/LICENSE
new file mode 100644
index 0000000..31c692a
--- /dev/null
+++ b/homescreenappframeworkbinderagl/LICENSE
@@ -0,0 +1,54 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
diff --git a/homescreenappframeworkbinderagl/README.md b/homescreenappframeworkbinderagl/README.md
new file mode 100644
index 0000000..a177830
--- /dev/null
+++ b/homescreenappframeworkbinderagl/README.md
@@ -0,0 +1,11 @@
+AGL Home Screen AppFramework Binder for AGL App Framework
+
+
+Build with QtCreator 3.0.1
+
+AGL repo for source code:
+https://gerrit.automotivelinux.org/gerrit/#/admin/projects/staging/HomeScreen
+
+AGL repo for bitbake recipe:
+https://gerrit.automotivelinux.org/gerrit/#/admin/projects/AGL/meta-agl-demo/recipes-demo-hmi/HomeScreen/HomeScreen_?.bb
+
diff --git a/homescreenappframeworkbinderagl/conf/HomeScreenAppFrameworkBinderAGL.service b/homescreenappframeworkbinderagl/conf/HomeScreenAppFrameworkBinderAGL.service
new file mode 100644
index 0000000..f13ab74
--- /dev/null
+++ b/homescreenappframeworkbinderagl/conf/HomeScreenAppFrameworkBinderAGL.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=AGL App Framework Binder for HomeScreen
+Requires=dbus.service afm-user-daemon.service
+After=afm-user-daemon.service
+
+[Service]
+User=root
+Type=dbus
+BusName=org.agl.homescreenappframeworkbinder
+ExecStart=/usr/AGL/homescreen/HomeScreenAppFrameworkBinderAGL
+Restart=on-failure
+RestartSec=5
+
+[Install]
+WantedBy=default.target
diff --git a/homescreenappframeworkbinderagl/homescreenappframeworkbinderagl.pro b/homescreenappframeworkbinderagl/homescreenappframeworkbinderagl.pro
new file mode 100644
index 0000000..9611c63
--- /dev/null
+++ b/homescreenappframeworkbinderagl/homescreenappframeworkbinderagl.pro
@@ -0,0 +1,28 @@
+# 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 = app
+TARGET = HomeScreenAppFrameworkBinderAGL
+QT = core dbus
+
+include(../interfaces/interfaces.pri)
+
+SOURCES += src/main.cpp \
+ src/homescreenappframeworkbinderagl.cpp
+
+HEADERS += \
+ src/homescreenappframeworkbinderagl.h
+
+OTHER_FILES += \
+ README.md
diff --git a/homescreenappframeworkbinderagl/src/homescreenappframeworkbinderagl.cpp b/homescreenappframeworkbinderagl/src/homescreenappframeworkbinderagl.cpp
new file mode 100644
index 0000000..3e7c55d
--- /dev/null
+++ b/homescreenappframeworkbinderagl/src/homescreenappframeworkbinderagl.cpp
@@ -0,0 +1,98 @@
+/*
+ * 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 "homescreenappframeworkbinderagl.h"
+
+
+HomeScreenAppFrameworkBinderAgl::HomeScreenAppFrameworkBinderAgl(QObject *parent) :
+ QObject(parent),
+ mp_appframeworkAdaptor(0),
+ m_apps(),
+ mp_dBusAfmUserProxy(0)
+{
+ qDebug("D-Bus: register as org.agl.homescreenappframeworkbinder");
+
+ //m_apps.clear();
+
+ // publish app framework interface
+ mp_appframeworkAdaptor = new AppframeworkAdaptor((QObject*)this);
+ QDBusConnection dbus = QDBusConnection::sessionBus();
+ dbus.registerObject("/AppFramework", this);
+ dbus.registerService("org.agl.homescreenappframeworkbinder");
+
+ qDebug("D-Bus: connect to org.AGL.afm.user /org/AGL/afm/user");
+ mp_dBusAfmUserProxy = new org::AGL::afm::user("org.AGL.afm.user",
+ "/org/AGL/afm/user",
+ QDBusConnection::sessionBus(),
+ 0);
+
+ QString runnables = mp_dBusAfmUserProxy->runnables("{\"dummy\": \"entry\"}");
+ qDebug("runnables: %s", runnables.toStdString().c_str());
+
+ QJsonDocument jsonResponse = QJsonDocument::fromJson(runnables.toUtf8());
+ QJsonArray appsArray = jsonResponse.array();
+ for (int i = 0; i < appsArray.size(); ++i)
+ {
+ qDebug("new app %d", i);
+ QJsonObject appObject = appsArray[i].toObject();
+ AppInfo appInfo;
+ appInfo.read(appObject);
+ qDebug("name %s", appInfo.name().toStdString().c_str());
+ m_apps.append(appInfo);
+
+ }
+}
+
+HomeScreenAppFrameworkBinderAgl::~HomeScreenAppFrameworkBinderAgl()
+{
+ delete mp_appframeworkAdaptor;
+}
+
+QList<AppInfo> HomeScreenAppFrameworkBinderAgl::getAvailableApps()
+{
+ return m_apps;
+}
+
+int HomeScreenAppFrameworkBinderAgl::launchApp(const QString &name)
+{
+ int pid = -1;
+ qDebug("launchApp name: %s", name.toStdString().c_str());
+ QString jsonLaunch = "{\"id\":\"" + name + "\", \"mode\":\"local\"}";
+ qDebug("jsonLaunch %s", jsonLaunch.toStdString().c_str());
+ QString stateString = mp_dBusAfmUserProxy->once(jsonLaunch);
+ qDebug("stateString %s", stateString.toStdString().c_str());
+
+ QJsonDocument jsonResponse = QJsonDocument::fromJson(stateString.toUtf8());
+ QJsonObject obj = jsonResponse.object();
+ QJsonArray pidArray = obj["pids"].toArray();
+ for (int i = 0; i < pidArray.size(); ++i)
+ {
+ qDebug("pid %d", pidArray[i].toInt());
+ }
+ if (1 == pidArray.size())
+ {
+ pid = pidArray[0].toInt();
+ }
+ if (2 == pidArray.size())
+ {
+ pid = pidArray[1].toInt();
+ }
+
+ qDebug("launchApp pid: %d", pid);
+
+ return pid;
+}
+
diff --git a/homescreenappframeworkbinderagl/src/homescreenappframeworkbinderagl.h b/homescreenappframeworkbinderagl/src/homescreenappframeworkbinderagl.h
new file mode 100644
index 0000000..742ce7e
--- /dev/null
+++ b/homescreenappframeworkbinderagl/src/homescreenappframeworkbinderagl.h
@@ -0,0 +1,46 @@
+/*
+ * 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 HOMESCREENAPPFRAMEWORKBINDERAGL_H
+#define HOMESCREENAPPFRAMEWORKBINDERAGL_H
+
+#include <QObject>
+#include <include/appframework.hpp>
+#include "appframework_adaptor.h"
+#include "afm_user_daemon_proxy.h"
+
+
+class HomeScreenAppFrameworkBinderAgl : public QObject
+{
+ Q_OBJECT
+public:
+ explicit HomeScreenAppFrameworkBinderAgl(QObject *parent = 0);
+ ~HomeScreenAppFrameworkBinderAgl();
+private:
+ AppframeworkAdaptor *mp_appframeworkAdaptor;
+ QList<AppInfo> m_apps;
+
+ //from appframework_adaptor.h
+public Q_SLOTS: // METHODS
+ QList<AppInfo> getAvailableApps();
+ int launchApp(const QString &name);
+
+private:
+ org::AGL::afm::user *mp_dBusAfmUserProxy;
+
+};
+
+#endif // HOMESCREENAPPFRAMEWORKBINDERAGL_H
diff --git a/homescreenappframeworkbinderagl/src/main.cpp b/homescreenappframeworkbinderagl/src/main.cpp
new file mode 100644
index 0000000..12ed15c
--- /dev/null
+++ b/homescreenappframeworkbinderagl/src/main.cpp
@@ -0,0 +1,54 @@
+/*
+ * 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 <QCoreApplication>
+#include <QCommandLineParser>
+#include "homescreenappframeworkbinderagl.h"
+
+void noOutput(QtMsgType, const QMessageLogContext &, const QString &)
+{
+}
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication a(argc, argv);
+
+ QCoreApplication::setOrganizationDomain("LinuxFoundation");
+ QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
+ QCoreApplication::setApplicationName("HomeScreenAppFrameworkBinderAGL");
+ QCoreApplication::setApplicationVersion("0.7.0");
+
+ QCommandLineParser parser;
+ parser.setApplicationDescription("AGL Application Framwork Proxy - see wwww... for more details");
+ parser.addHelpOption();
+ parser.addVersionOption();
+ QCommandLineOption quietOption(QStringList() << "q" << "quiet",
+ QCoreApplication::translate("main", "Be quiet. No outputs."));
+ parser.addOption(quietOption);
+ parser.process(a);
+
+ if (parser.isSet(quietOption))
+ {
+ qInstallMessageHandler(noOutput);
+ }
+
+ qDBusRegisterMetaType<AppInfo>();
+ qDBusRegisterMetaType<QList<AppInfo> >();
+
+ HomeScreenAppFrameworkBinderAgl *tdp = new HomeScreenAppFrameworkBinderAgl();
+
+ return a.exec();
+}
diff --git a/interfaces/LICENSE b/interfaces/LICENSE
new file mode 100644
index 0000000..31c692a
--- /dev/null
+++ b/interfaces/LICENSE
@@ -0,0 +1,54 @@
+Apache License
+
+Version 2.0, January 2004
+
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
diff --git a/interfaces/README.md b/interfaces/README.md
new file mode 100644
index 0000000..15dfaa9
--- /dev/null
+++ b/interfaces/README.md
@@ -0,0 +1,11 @@
+AGL Home Screen reference implementation
+This lib provides the needed D-Bus interfaces
+
+Build with QtCreator 3.0.1
+
+AGL repo for source code:
+https://gerrit.automotivelinux.org/gerrit/#/admin/projects/staging/HomeScreen
+
+AGL repo for bitbake recipe:
+https://gerrit.automotivelinux.org/gerrit/#/admin/projects/AGL/meta-agl-demo/recipes-demo-hmi/HomeScreen/HomeScreen_?.bb
+
diff --git a/interfaces/afm_user_daemon.xml b/interfaces/afm_user_daemon.xml
new file mode 100644
index 0000000..17b7d63
--- /dev/null
+++ b/interfaces/afm_user_daemon.xml
@@ -0,0 +1,52 @@
+<!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
new file mode 100644
index 0000000..f10b3ae
--- /dev/null
+++ b/interfaces/appframework.xml
@@ -0,0 +1,57 @@
+<!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
new file mode 100644
index 0000000..b9a5321
--- /dev/null
+++ b/interfaces/include/afm_user_daemon.hpp
@@ -0,0 +1,21 @@
+/*
+ * 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
new file mode 100644
index 0000000..98ec317
--- /dev/null
+++ b/interfaces/include/appframework.hpp
@@ -0,0 +1,66 @@
+/*
+ * 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
new file mode 100644
index 0000000..07b9e6a
--- /dev/null
+++ b/interfaces/interfaces.pri
@@ -0,0 +1,18 @@
+# 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
new file mode 100644
index 0000000..25b6dbc
--- /dev/null
+++ b/interfaces/interfaces.pro
@@ -0,0 +1,57 @@
+# 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 = \
+ appframework.xml \
+ afm_user_daemon.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
diff --git a/interfaces/src/appframework.cpp b/interfaces/src/appframework.cpp
new file mode 100644
index 0000000..7420642
--- /dev/null
+++ b/interfaces/src/appframework.cpp
@@ -0,0 +1,167 @@
+/*
+ * 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/test/commandlinetests.txt b/test/commandlinetests.txt
new file mode 100644
index 0000000..3136357
--- /dev/null
+++ b/test/commandlinetests.txt
@@ -0,0 +1,35 @@
+Command line tests
+
+Precondition for all test is, that the D-Bus session is launched:
+$export `dbus-launch`
+
+---------------------------------------------------------------------------------------------------------------------
+Interface:
+org.agl.appframework
+
+Method:
+ <method name="getAvailableApps">
+ <arg name="apps" type="{ssiisssss}" direction="out"/>
+ <annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QList&lt;AppInfo&gt;"/>
+ </method>
+
+Preconditions:
+- HomeScreenAppFrameworkBinderAGL app is running
+
+Test:
+$dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreenappframeworkbinder /AppFramework org.agl.appframework.getAvailableApps
+
+Method:
+ <method name="launchApp">
+ <arg name="name" type="s" direction="in"/>
+ <arg name="pid" type="i" direction="out"/>
+ </method>
+
+Preconditions:
+- HomeScreenAppFrameworkBinderAGL app is running
+
+Test:
+$dbus-send --session --type=method_call --print-reply --dest=org.agl.homescreenappframeworkbinder /AppFramework org.agl.appframework.launchApp string:"hvac@0.1"
+
+
+