Using the Tizen application manager to receive information about installed apps and... 27/6327/1 v0.2.0
authorBocklage, Jens <Jens_Bocklage@mentor.com>
Fri, 5 Aug 2016 17:42:52 +0000 (19:42 +0200)
committerBocklage, Jens <Jens_Bocklage@mentor.com>
Fri, 5 Aug 2016 17:42:52 +0000 (19:42 +0200)
This acts as a template for other app framework adoptions.
Using the weston ivi shell to control surfaces.
Using the input event manager to dispatch hard key inputs.

This is a bigger update, so I increased the version number from 0.1.1 to 0.2.0.

Some parts are under development.

I created the components "WindowsManager" and "InputEventManager" because they are not defined in AGL right now.
As soon as they are defined, we should switch to them.

Find more information on the official wiki page:
https://wiki.automotivelinux.org/homescreen

Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
65 files changed:
HomeScreen.pro
HomeScreen/HomeScreen.pro
HomeScreen/README.md
HomeScreen/resources/applauncherwidget.ui [new file with mode: 0644]
HomeScreen/resources/colorschemes/default/0.ini
HomeScreen/resources/colorschemes/default/1.ini
HomeScreen/resources/controlbarwidget.ui
HomeScreen/resources/homescreen.qrc
HomeScreen/resources/popupwidget.ui
HomeScreen/src/applauncherwidget.cpp [new file with mode: 0644]
HomeScreen/src/applauncherwidget.h [new file with mode: 0644]
HomeScreen/src/controlbarwidget.cpp
HomeScreen/src/controlbarwidget.h
HomeScreen/src/homescreencontrolinterface.cpp [new file with mode: 0644]
HomeScreen/src/homescreencontrolinterface.h [new file with mode: 0644]
HomeScreen/src/main.cpp
HomeScreen/src/mainwindow.cpp
HomeScreen/src/mainwindow.h
HomeScreen/src/popupwidget.cpp
HomeScreen/src/popupwidget.h
HomeScreen/src/settingswidget.cpp
HomeScreen/src/statusbarwidget.cpp
HomeScreenAppFrameworkBinderTizen/.gitignore [new file with mode: 0644]
HomeScreenAppFrameworkBinderTizen/HomeScreenAppFrameworkBinderTizen.pro [new file with mode: 0644]
HomeScreenAppFrameworkBinderTizen/LICENSE [new file with mode: 0644]
HomeScreenAppFrameworkBinderTizen/README.md [new file with mode: 0644]
HomeScreenAppFrameworkBinderTizen/src/homescreenappframeworkbindertizen.cpp [new file with mode: 0644]
HomeScreenAppFrameworkBinderTizen/src/homescreenappframeworkbindertizen.h [new file with mode: 0644]
HomeScreenAppFrameworkBinderTizen/src/main.cpp [new file with mode: 0644]
HomeScreenSimulator/HomeScreenSimulator.pro
HomeScreenSimulator/README.md
HomeScreenSimulator/resources/mainwindow.ui
HomeScreenSimulator/src/main.cpp
HomeScreenSimulator/src/mainwindow.cpp
HomeScreenSimulator/src/mainwindow.h
InputEventManager/.gitignore [new file with mode: 0644]
InputEventManager/InputEventManager.pro [new file with mode: 0644]
InputEventManager/LICENSE [new file with mode: 0644]
InputEventManager/README.md [new file with mode: 0644]
InputEventManager/src/inputeventmanager.cpp [new file with mode: 0644]
InputEventManager/src/inputeventmanager.h [new file with mode: 0644]
InputEventManager/src/main.cpp [new file with mode: 0644]
SampleAppTimeDate/README.md
SampleAppTimeDate/SampleAppTimeDate.pro
SampleAppTimeDate/src/main.cpp
SampleAppTimeDate/src/timedateprovider.cpp
SampleAppTimeDate/src/timedateprovider.hpp [moved from SampleAppTimeDate/src/timedateprovider.h with 82% similarity]
WindowManager/.gitignore [new file with mode: 0644]
WindowManager/LICENSE [new file with mode: 0644]
WindowManager/README.md [new file with mode: 0644]
WindowManager/WindowManager.pro [new file with mode: 0644]
WindowManager/src/main.cpp [new file with mode: 0644]
WindowManager/src/windowmanager.cpp [new file with mode: 0644]
WindowManager/src/windowmanager.hpp [new file with mode: 0644]
interfaces/appframework.xml [new file with mode: 0644]
interfaces/homescreen.xml [new file with mode: 0644]
interfaces/include/appframework.hpp [new file with mode: 0644]
interfaces/include/daynightmode.hpp [moved from interfaces/daynightmode.h with 100% similarity]
interfaces/include/homescreen.hpp [new file with mode: 0644]
interfaces/include/inputevent.hpp [new file with mode: 0644]
interfaces/include/popup.hpp [moved from interfaces/popup.h with 100% similarity]
interfaces/include/statusbar.hpp [new file with mode: 0644]
interfaces/inputevent.xml [new file with mode: 0644]
interfaces/interfaces.pro
interfaces/src/appframework.cpp [new file with mode: 0644]

index 6498293..80ada09 100644 (file)
@@ -16,12 +16,18 @@ TEMPLATE = subdirs
 
 SUBDIRS = interfaces \
         HomeScreen \
+       HomeScreenAppFrameworkBinderTizen \
        HomeScreenSimulator \
-       SampleAppTimeDate
+       InputEventManager \
+       SampleAppTimeDate \
+       WindowManager
 
 HomeScreen.depends = interfaces
 HomeScreenSimulator.depends = interfaces
+HomeScreenAppFrameworkBinderTizen.depends = interfaces
+InputEventManager.depends = interfaces
 SampleAppTimeDate.depends = interfaces
+WindowManager.depends = interfaces
 
 # remove generated files
 QMAKE_CLEAN += -r \
index bfe0491..458db51 100644 (file)
@@ -19,31 +19,31 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 TARGET = HomeScreen
 TEMPLATE = app
 
-
 SOURCES += \
     src/main.cpp \
     src/mainwindow.cpp \
     src/settingswidget.cpp \
     src/popupwidget.cpp \
     src/controlbarwidget.cpp \
-    src/statusbarwidget.cpp
+    src/statusbarwidget.cpp \
+    src/applauncherwidget.cpp \
+    src/homescreencontrolinterface.cpp
 
 HEADERS  += \
+    ../interfaces/appframework.h \
     ../interfaces/daynightmode.h \
     ../interfaces/popup.h \
+    ../interfaces/statusbar.h \
     src/mainwindow.h \
     src/settingswidget.h \
     src/popupwidget.h \
     src/controlbarwidget.h \
     src/statusbarwidget.h \
-    $$OUT_PWD/../interfaces/daynightmode_adapter.h \      #generated dbus adapter
-    $$OUT_PWD/../interfaces/daynightmode_proxy.h \        #generated dbus proxy
-    $$OUT_PWD/../interfaces/popup_adapter.h \             #generated dbus adapter
-    $$OUT_PWD/../interfaces/popup_proxy.h \               #generated dbus proxy
-    $$OUT_PWD/../interfaces/statusbar_adapter.h \         #generated dbus adapter
-    $$OUT_PWD/../interfaces/statusbar_proxy.h             #generated dbus proxy
+    src/applauncherwidget.h \
+    src/homescreencontrolinterface.h
 
 INCLUDEPATH += $$OUT_PWD/../interfaces
+INCLUDEPATH += ../interfaces/
 
 LIBS += -L$$OUT_PWD/../interfaces -linterfaces
 
@@ -53,7 +53,8 @@ FORMS    += \
     resources/settingswidget.ui \
     resources/popupwidget.ui \
     resources/controlbarwidget.ui \
-    resources/statusbarwidget.ui
+    resources/statusbarwidget.ui \
+    resources/applauncherwidget.ui
 
 TRANSLATIONS = \
     resources/translations/homescreen_en_US.ts \
@@ -74,5 +75,6 @@ QMAKE_EXTRA_TARGETS += HomeScreen copydata
 
 # remove generated files
 QMAKE_CLEAN += -r \
+    $$OUT_PWD/colorschemes \
     $$OUT_PWD/HomeScreen \
     $$OUT_PWD/Makefile
index dca6057..7ebc287 100644 (file)
@@ -9,6 +9,13 @@ 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
 
+v0.2.0
+08/05/2016
+
+#new features
+- app launcher implemented
+- input event manager used for new control bar "nav" button
+
 v0.1.1
 07/06/2016
 
diff --git a/HomeScreen/resources/applauncherwidget.ui b/HomeScreen/resources/applauncherwidget.ui
new file mode 100644 (file)
index 0000000..7b93bc9
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>AppLauncherWidget</class>
+ <widget class="QWidget" name="AppLauncherWidget">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>1080</width>
+    <height>1800</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form_AppLauncher</string>
+  </property>
+  <widget class="QWidget" name="widget_Background" native="true">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>0</y>
+     <width>1080</width>
+     <height>1800</height>
+    </rect>
+   </property>
+   <widget class="QWidget" name="widget_Home_Icon" native="true">
+    <property name="geometry">
+     <rect>
+      <x>-40</x>
+      <y>1640</y>
+      <width>200</width>
+      <height>200</height>
+     </rect>
+    </property>
+   </widget>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
index 569aa74..1ff1da8 100644 (file)
@@ -1,12 +1,17 @@
 [ControlBarWidget]
 pushButton_Home=:/icons/home_day.png
 pushButton_Settings=:/icons/settings_day.png
+pushButton_Nav=:/icons/explore_day.png
 widget_Background=background-image: url(:/images/backgrounds/bg_green_day.png)
 
 [MainWindow]
 widget_Background="background-image: url(:/images/backgrounds/bg_blue_day.png);"
 widget_Home_Icon="border-image: url(:/icons/home_day.png) 0 0 0 0 stretch stretch;"
 
+[AppLauncherWidget]
+widget_Background="background-image: url(:/images/backgrounds/bg_blue_day.png);"
+widget_Home_Icon="border-image: url(:/icons/home_day.png) 0 0 0 0 stretch stretch;"
+
 [PopupWidget]
 label_Text="background-color: rgba(109, 109, 109, 0);         background-image: url(:/images/transparency.png);         border-image: url(:/images/transparency.png);"
 widget_Popup="QWidget {         border: 1px solid #D3D3D3;         border-radius: 8px;         background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(242, 242, 249, 255), stop:1 rgba(255, 255, 255, 255));         color: #333;         padding: 0px;         }          QWidget:on {         background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE);         }"
index ec6d421..e62d1e7 100644 (file)
@@ -1,12 +1,17 @@
 [ControlBarWidget]
 pushButton_Home=:/icons/home_night.png
 pushButton_Settings=:/icons/settings_night.png
+pushButton_Nav=:/icons/explore_night.png
 widget_Background=background-image: url(:/images/backgrounds/bg_green_night.png)
 
 [MainWindow]
 widget_Background="background-image: url(:/images/backgrounds/bg_blue_night.png);"
 widget_Home_Icon="border-image: url(:/icons/home_night.png) 0 0 0 0 stretch stretch;"
 
+[AppLauncherWidget]
+widget_Background="background-image: url(:/images/backgrounds/bg_blue_night.png);"
+widget_Home_Icon="border-image: url(:/icons/home_night.png) 0 0 0 0 stretch stretch;"
+
 [PopupWidget]
 label_Text="background-color: rgba(109, 109, 109, 0);         background-image: url(:/images/transparency.png);         border-image: url(:/images/transparency.png);"
 widget_Popup="QWidget {         border: 1px solid #D3D3D3;         border-radius: 8px;         background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(147, 147, 151, 255), stop:1 rgba(255, 255, 255, 255));         color: #333;         padding: 0px;         }          QWidget:on {         background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE);         }"
index a20f0b6..8cd0b3e 100644 (file)
@@ -82,6 +82,36 @@ border-image: url(:/images/transparency.png);</string>
      </size>
     </property>
    </widget>
+   <widget class="QPushButton" name="pushButton_Nav">
+    <property name="geometry">
+     <rect>
+      <x>110</x>
+      <y>10</y>
+      <width>40</width>
+      <height>40</height>
+     </rect>
+    </property>
+    <property name="focusPolicy">
+     <enum>Qt::NoFocus</enum>
+    </property>
+    <property name="styleSheet">
+     <string notr="true">background-image: url(:/images/transparency.png);
+border-image: url(:/images/transparency.png);</string>
+    </property>
+    <property name="text">
+     <string/>
+    </property>
+    <property name="icon">
+     <iconset resource="homescreen.qrc">
+      <normaloff>:/icons/explore_day.png</normaloff>:/icons/explore_day.png</iconset>
+    </property>
+    <property name="iconSize">
+     <size>
+      <width>40</width>
+      <height>40</height>
+     </size>
+    </property>
+   </widget>
   </widget>
  </widget>
  <resources>
index 0a8ee15..03281bd 100644 (file)
@@ -11,6 +11,8 @@
         <file alias="icons/home_night.png">images/icons/Black/01.Home.png</file>
         <file alias="icons/settings_day.png">images/icons/White/45.Settings.png</file>
         <file alias="icons/settings_night.png">images/icons/Black/45.Settings.png</file>
+        <file alias="icons/explore_day.png">images/icons/White/47.Explore.png</file>
+        <file alias="icons/explore_night.png">images/icons/Black/47.Explore.png</file>
         <file>translations/homescreen_de_DE.qm</file>
         <file>translations/homescreen_en_US.qm</file>
         <file>translations/homescreen_ja_JP.qm</file>
index 5bda98b..a982adf 100644 (file)
@@ -14,7 +14,7 @@
    </rect>
   </property>
   <property name="windowTitle">
-   <string>Form</string>
+   <string>Form_Popup</string>
   </property>
   <widget class="QWidget" name="widget_Popup" native="true">
    <property name="geometry">
diff --git a/HomeScreen/src/applauncherwidget.cpp b/HomeScreen/src/applauncherwidget.cpp
new file mode 100644 (file)
index 0000000..94dd357
--- /dev/null
@@ -0,0 +1,153 @@
+/*
+ * Copyright (C) 2016 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 "applauncherwidget.h"
+#include "ui_applauncherwidget.h"
+#include <include/daynightmode.hpp>
+#include <QSettings>
+
+#define APP_LIST_COLUMN_COUNT 5
+
+AppLauncherWidget::AppLauncherWidget(QWidget *parent) :
+    QWidget(parent),
+    mp_ui(new Ui::AppLauncherWidget),
+    mp_appList(new QList<AppInfo>()),
+    mp_appTable(0),
+    mp_dBusAppFrameworkProxy()
+{
+    mp_ui->setupUi(this);
+
+    AppInfo ai;
+    for (int i = 0; i < 100; ++i)
+    {
+        ai.setName("test" + QString::number(i));
+        mp_appList->append(ai);
+    }
+
+    qDebug("D-Bus: connect to org.agl.homescreenappframeworkbindertizen /AppFramework");
+    mp_dBusAppFrameworkProxy = new org::agl::appframework("org.agl.homescreenappframeworkbindertizen",
+                                              "/AppFramework",
+                                              QDBusConnection::sessionBus(),
+                                              0);
+
+    populateAppList();
+}
+
+AppLauncherWidget::~AppLauncherWidget()
+{
+    delete mp_dBusAppFrameworkProxy;
+    if (0 != mp_appTable)
+    {
+        delete mp_appTable;
+    }
+    delete mp_appList;
+    delete mp_ui;
+}
+
+void AppLauncherWidget::updateColorScheme()
+{
+    QSettings settings;
+    QSettings settings_cs(QApplication::applicationDirPath() +
+                          "/colorschemes/" +
+                          settings.value("systemsettings/colorscheme", "default").toString() +
+                          "/" +
+                          QString::number(settings.value("systemsettings/daynightmode", SystemDayNight::DAYNIGHTMODE_DAY).toInt()) +
+                          ".ini",
+                          QSettings::IniFormat);
+
+    mp_ui->widget_Background->setStyleSheet(settings_cs.value("AppLauncherWidget/widget_Background").toString());
+    mp_ui->widget_Home_Icon->setStyleSheet(settings_cs.value("AppLauncherWidget/widget_Home_Icon").toString());
+}
+
+void AppLauncherWidget::populateAppList()
+{
+    setStyleSheet("QTableWidget {background-color: transparent;}"
+                  "QTableCornerButton::section {background-color: transparent;}");
+
+    if (0 == mp_appTable)
+    {
+        mp_appTable = new QTableWidget(this);
+        QObject::connect(mp_appTable, SIGNAL(cellClicked(int, int)), this, SLOT(on_tableView_clicked(int, int)));
+    }
+    else
+    {
+        mp_appTable->clear();
+    }
+
+    mp_appTable->setShowGrid(false);
+    mp_appTable->setFrameShape(QFrame::NoFrame);
+    mp_appTable->move(40, 40);
+    mp_appTable->resize(1000, 1920 - 40 - 40 - 60 - 60);
+    mp_appTable->horizontalHeader()->setVisible(false);
+    mp_appTable->verticalHeader()->setVisible(false);
+    mp_appTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+    mp_appTable->setRowCount(100);
+    mp_appTable->setColumnCount(APP_LIST_COLUMN_COUNT);
+
+    int i;
+
+    QStringList apps = mp_dBusAppFrameworkProxy->getAvailableAppNames();
+    mp_appList->clear();
+
+    mp_appTable->setRowCount((apps.size() + (APP_LIST_COLUMN_COUNT - 1)) / APP_LIST_COLUMN_COUNT);
+
+    if (apps.size() >= (9 * APP_LIST_COLUMN_COUNT))
+    {
+        mp_appTable->resize(1000, 1920 - 40 - 40 - 60 - 60);
+    }
+    else
+    {
+        mp_appTable->resize(1000, mp_appTable->rowCount() * 190);
+    }
+
+
+    for (i = 0; i < (mp_appTable->rowCount() * APP_LIST_COLUMN_COUNT); i++)
+    {
+        mp_appTable->verticalHeader()->resizeSection(i, 190);
+        mp_appTable->horizontalHeader()->resizeSection(i, 190);
+    }
+
+    AppInfo ai;
+    for (i = 0; i < apps.size(); ++i)
+    {
+        qDebug("new app: %s", apps.at(i).toStdString().c_str());
+        ai.setName(apps.at(i));
+        mp_appList->append(ai);
+    }
+
+    for (i = 0; i < mp_appList->size(); i++)
+    {
+       mp_appTable->setItem(i / APP_LIST_COLUMN_COUNT,
+                            i % APP_LIST_COLUMN_COUNT,
+                            new QTableWidgetItem(mp_appList->at(i).getName()));
+       mp_appTable->item(i / APP_LIST_COLUMN_COUNT,
+                         i % APP_LIST_COLUMN_COUNT)->setFlags(Qt::ItemIsEnabled);
+       mp_appTable->item(i / APP_LIST_COLUMN_COUNT,
+                         i % APP_LIST_COLUMN_COUNT)->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
+    }
+
+
+}
+
+void AppLauncherWidget::on_tableView_clicked(int row, int col)
+{
+    if (mp_appList->size() > row * APP_LIST_COLUMN_COUNT + col)
+    {
+        int pid = mp_dBusAppFrameworkProxy->launchApp(mp_appList->at(row * APP_LIST_COLUMN_COUNT + col).getName());
+        qDebug("%d, %d: start app %s", row, col, mp_appList->at(row * APP_LIST_COLUMN_COUNT + col).getName().toStdString().c_str());
+        qDebug("pid: %d", pid);
+    }
+}
diff --git a/HomeScreen/src/applauncherwidget.h b/HomeScreen/src/applauncherwidget.h
new file mode 100644 (file)
index 0000000..943f6d5
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2016 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 APPLAUNCHERWIDGET_H
+#define APPLAUNCHERWIDGET_H
+
+#include <QWidget>
+#include <QList>
+#include <QTableWidget>
+#include <include/appframework.hpp>
+#include <appframework_proxy.h>
+
+namespace Ui {
+class AppLauncherWidget;
+}
+
+class AppLauncherWidget : public QWidget
+{
+    Q_OBJECT
+
+public:
+    explicit AppLauncherWidget(QWidget *parent = 0);
+    ~AppLauncherWidget();
+public slots:
+    void updateColorScheme();
+
+private slots:
+    void on_tableView_clicked(int row, int col);
+
+private:
+    Ui::AppLauncherWidget *mp_ui;
+    QList<AppInfo> *mp_appList;
+    QTableWidget *mp_appTable;
+    org::agl::appframework *mp_dBusAppFrameworkProxy;
+    void populateAppList();
+};
+
+#endif // APPLAUNCHERWIDGET_H
index dee0207..2cce30b 100644 (file)
 
 #include "controlbarwidget.h"
 #include "ui_controlbarwidget.h"
-#include "../interfaces/daynightmode.h"
+#include <include/daynightmode.hpp>
+#include <include/inputevent.hpp>
 #include <QSettings>
 
 ControlBarWidget::ControlBarWidget(QWidget *parent) :
     QWidget(parent),
-    mp_ui(new Ui::ControlBarWidget)
+    mp_ui(new Ui::ControlBarWidget),
+    mp_dBusInputEventProxy()
 {
     mp_ui->setupUi(this);
+
+    qDebug("D-Bus: connect to org.agl.homescreenappframeworkbindertizen /AppFramework");
+    mp_dBusInputEventProxy = new org::agl::inputevent("org.agl.inputeventmanager",
+                                              "/InputEvent",
+                                              QDBusConnection::sessionBus(),
+                                              0);
 }
 
 ControlBarWidget::~ControlBarWidget()
 {
+    delete mp_dBusInputEventProxy;
     delete mp_ui;
 }
 
@@ -49,6 +58,8 @@ void ControlBarWidget::updateColorScheme()
     mp_ui->pushButton_Home->setIcon(icon);
     icon.addFile(settings_cs.value(QString("ControlBarWidget/pushButton_Settings")).toString(), QSize(), QIcon::Normal, QIcon::Off);
     mp_ui->pushButton_Settings->setIcon(icon);
+    icon.addFile(settings_cs.value(QString("ControlBarWidget/pushButton_Nav")).toString(), QSize(), QIcon::Normal, QIcon::Off);
+    mp_ui->pushButton_Nav->setIcon(icon);
 }
 
 void ControlBarWidget::on_pushButton_Settings_clicked()
@@ -60,3 +71,8 @@ void ControlBarWidget::on_pushButton_Home_clicked()
 {
     emit homeButtonPressed();
 }
+
+void ControlBarWidget::on_pushButton_Nav_clicked()
+{
+    mp_dBusInputEventProxy->hardKeyPressed(InputEvent::HARDKEY_NAV);
+}
index 0ab382b..89e505c 100644 (file)
@@ -18,6 +18,7 @@
 #define CONTROLBARWIDGET_H
 
 #include <QWidget>
+#include "inputevent_proxy.h"
 
 namespace Ui {
 class ControlBarWidget;
@@ -39,9 +40,11 @@ signals:
 private slots:
     void on_pushButton_Settings_clicked();
     void on_pushButton_Home_clicked();
+    void on_pushButton_Nav_clicked();
 
 private:
     Ui::ControlBarWidget *mp_ui;
+    org::agl::inputevent *mp_dBusInputEventProxy;
 };
 
 #endif // CONTROLBARWIDGET_H
diff --git a/HomeScreen/src/homescreencontrolinterface.cpp b/HomeScreen/src/homescreencontrolinterface.cpp
new file mode 100644 (file)
index 0000000..defc202
--- /dev/null
@@ -0,0 +1,42 @@
+#include "homescreencontrolinterface.h"
+
+HomeScreenControlInterface::HomeScreenControlInterface(QObject *parent) :
+    QObject(parent),
+    mp_homeScreenAdaptor(0),
+    mp_dBusAppFrameworkProxy()
+{
+    // publish dbus homescreen interface
+    mp_homeScreenAdaptor = new HomescreenAdaptor((QObject*)this);
+    QDBusConnection dbus = QDBusConnection::sessionBus();
+    dbus.registerObject("/HomeScreen", this);
+    dbus.registerService("org.agl.homescreen");
+
+    qDebug("D-Bus: connect to org.agl.homescreenappframeworkbindertizen /AppFramework");
+    mp_dBusAppFrameworkProxy = new org::agl::appframework("org.agl.homescreenappframeworkbindertizen",
+                                              "/AppFramework",
+                                              QDBusConnection::sessionBus(),
+                                              0);
+}
+
+HomeScreenControlInterface::~HomeScreenControlInterface()
+{
+    delete mp_dBusAppFrameworkProxy;
+    delete mp_homeScreenAdaptor;
+}
+
+void HomeScreenControlInterface::hardKeyPressed(int key)
+{
+    int pid = -1;
+
+    switch (key)
+    {
+    case InputEvent::HARDKEY_NAV:
+        qDebug("hardKeyPressed NAV key pressed!");
+        pid = mp_dBusAppFrameworkProxy->launchApp("demoapp");
+        qDebug("pid: %d", pid);
+        break;
+    default:
+        qDebug("hardKeyPressed %d", key);
+        break;
+    }
+}
diff --git a/HomeScreen/src/homescreencontrolinterface.h b/HomeScreen/src/homescreencontrolinterface.h
new file mode 100644 (file)
index 0000000..3480d30
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef HOMESCREENCONTROLINTERFACE_H
+#define HOMESCREENCONTROLINTERFACE_H
+
+#include <QObject>
+#include "include/homescreen.hpp"
+#include "homescreen_adapter.h"
+#include <include/appframework.hpp>
+#include <appframework_proxy.h>
+
+class HomeScreenControlInterface : public QObject
+{
+    Q_OBJECT
+public:
+    explicit HomeScreenControlInterface(QObject *parent = 0);
+    ~HomeScreenControlInterface();
+
+signals:
+
+public slots:
+
+//from homescreen_adapter.h
+public Q_SLOTS: // METHODS
+    void hardKeyPressed(int key);
+
+private:
+    HomescreenAdaptor *mp_homeScreenAdaptor;
+    org::agl::appframework *mp_dBusAppFrameworkProxy;
+};
+
+#endif // HOMESCREENCONTROLINTERFACE_H
index be8b534..cc552f2 100644 (file)
@@ -36,12 +36,16 @@ int main(int argc, char *argv[])
     QCoreApplication::setOrganizationDomain("LinuxFoundation");
     QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
     QCoreApplication::setApplicationName("HomeScreen");
-    QCoreApplication::setApplicationVersion("0.1.1");
+    QCoreApplication::setApplicationVersion("0.2.0");
 
-    // maybe trigger the wayland compositor to position the surface correctly
     MainWindow w;
-    w.move(0, 0);
     w.show();
+#ifdef __arm__
+    // trigger wayland compositor to position the surface correctly
+#endif
+#ifdef __i386__
+    w.move(0, 0);
+#endif
 
 
 #ifdef __arm__
index bf7735c..174f750 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
-#include "../interfaces/daynightmode.h"
+#include <include/daynightmode.hpp>
 
 MainWindow::MainWindow(QWidget *parent) :
     QMainWindow(parent),
@@ -24,15 +24,17 @@ MainWindow::MainWindow(QWidget *parent) :
     mp_statusBarWidget(0),
     mp_controlBarWidget(0),
     mp_settingsWidget(0),
+    mp_applauncherwidget(0),
     mp_popupWidget(0),
-    mp_dayNightModeProxy(0)
+    mp_dBusDayNightModeProxy(0),
+    mp_homeScreenControlInterface(0)
 {
     // this has to be adopted to the system setup
-    mp_dayNightModeProxy = new org::agl::daynightmode("org.agl.homescreen.simulator", //"org.agl.systeminfoprovider"
+    mp_dBusDayNightModeProxy = new org::agl::daynightmode("org.agl.homescreen.simulator", //"org.agl.systeminfoprovider"
                                                       "/",
                                                       QDBusConnection::sessionBus(),
                                                       0);
-    QObject::connect(mp_dayNightModeProxy, SIGNAL(dayNightMode(int)), this, SLOT(dayNightModeSlot(int)));
+    QObject::connect(mp_dBusDayNightModeProxy, SIGNAL(dayNightMode(int)), this, SLOT(dayNightModeSlot(int)));
 
     // dbus setup
     QDBusConnection dbus = QDBusConnection::sessionBus();
@@ -42,6 +44,7 @@ MainWindow::MainWindow(QWidget *parent) :
 
     // no window decoration
     setWindowFlags(Qt::FramelessWindowHint);
+
     mp_ui->setupUi(this);
 
     mp_statusBarWidget = new StatusBarWidget(this);
@@ -58,36 +61,49 @@ MainWindow::MainWindow(QWidget *parent) :
     mp_settingsWidget->raise();
     // apply layout
     mp_settingsWidget->move(0, 60);
-    mp_settingsWidget->hide();
+    //mp_settingsWidget->hide();
+
+    mp_applauncherwidget = new AppLauncherWidget(this);
+    mp_applauncherwidget->raise();
+    // apply layout
+    mp_applauncherwidget->move(0, 60);
 
-    mp_popupWidget = new PopupWidget(this);
+    mp_popupWidget = new PopupWidget();
     mp_controlBarWidget->raise();
     // apply layout
     mp_popupWidget->move(0, 0);
 
+
     QObject::connect(mp_settingsWidget, SIGNAL(colorSchemeChanged()), this, SLOT(updateColorScheme()));
     QObject::connect(mp_settingsWidget, SIGNAL(colorSchemeChanged()), mp_statusBarWidget, SLOT(updateColorScheme()));
     QObject::connect(mp_settingsWidget, SIGNAL(colorSchemeChanged()), mp_controlBarWidget, SLOT(updateColorScheme()));
     QObject::connect(mp_settingsWidget, SIGNAL(colorSchemeChanged()), mp_settingsWidget, SLOT(updateColorScheme()));
     QObject::connect(mp_settingsWidget, SIGNAL(colorSchemeChanged()), mp_popupWidget, SLOT(updateColorScheme()));
 
-    QObject::connect(mp_controlBarWidget, SIGNAL(settingsButtonPressed()), mp_settingsWidget, SLOT(show()));
-    QObject::connect(mp_controlBarWidget, SIGNAL(homeButtonPressed()), mp_settingsWidget, SLOT(hide()));
+    QObject::connect(mp_controlBarWidget, SIGNAL(settingsButtonPressed()), mp_settingsWidget, SLOT(raise()));
+    QObject::connect(mp_controlBarWidget, SIGNAL(homeButtonPressed()), mp_applauncherwidget, SLOT(raise()));
 
     // apply color scheme
     updateColorScheme();
     mp_statusBarWidget->updateColorScheme();
     mp_controlBarWidget->updateColorScheme();
     mp_settingsWidget->updateColorScheme();
+    mp_applauncherwidget->updateColorScheme();
     mp_popupWidget->updateColorScheme();
 
+    // this is only useful during development and will be removed later
     setWindowIcon(QIcon(":/icons/home_day.png"));
+
+    mp_homeScreenControlInterface = new HomeScreenControlInterface(this);
 }
 
 MainWindow::~MainWindow()
 {
-    delete mp_dayNightModeProxy;
+    delete mp_homeScreenControlInterface;
+
+    delete mp_dBusDayNightModeProxy;
     delete mp_popupWidget;
+    delete mp_applauncherwidget;
     delete mp_settingsWidget;
     delete mp_controlBarWidget;
     delete mp_statusBarWidget;
@@ -106,6 +122,7 @@ void MainWindow::dayNightModeSlot(int mode)
     mp_statusBarWidget->updateColorScheme();
     mp_controlBarWidget->updateColorScheme();
     mp_settingsWidget->updateColorScheme();
+    mp_applauncherwidget->updateColorScheme();
     mp_popupWidget->updateColorScheme();
 }
 
@@ -133,3 +150,12 @@ void MainWindow::changeEvent(QEvent* event)
 
     QMainWindow::changeEvent(event);
 }
+
+void MainWindow::on_pushButton_clicked()
+{
+    // start app
+    QProcess process;
+        QString file = "vlc";
+        process.startDetached(file);
+    // manage ivi shell
+}
index d984c3e..cb2243e 100644 (file)
 #include <QMainWindow>
 #include "daynightmode_proxy.h"
 
+#include "homescreencontrolinterface.h"
+
 #include "statusbarwidget.h"
 #include "controlbarwidget.h"
 #include "settingswidget.h"
+#include "applauncherwidget.h"
 #include "popupwidget.h"
 
 
@@ -42,6 +45,7 @@ public:
 public Q_SLOTS:
     void dayNightModeSlot(int mode);
 
+
 public slots:
     void updateColorScheme();
 
@@ -49,6 +53,9 @@ protected:
     // called when the translator loaded a new language set
     void changeEvent(QEvent* event);
 
+private slots:
+    void on_pushButton_clicked();
+
 private:
     Ui::MainWindow *mp_ui;
 
@@ -57,9 +64,12 @@ private:
     ControlBarWidget *mp_controlBarWidget;
     org::agl::daynightmode *mp_dBusDayNightMode_ControlBarWidget;
     SettingsWidget *mp_settingsWidget;
+    AppLauncherWidget *mp_applauncherwidget;
     PopupWidget *mp_popupWidget;
 
-    org::agl::daynightmode *mp_dayNightModeProxy;
+    org::agl::daynightmode *mp_dBusDayNightModeProxy;
+
+    HomeScreenControlInterface *mp_homeScreenControlInterface;
 };
 
 #endif // MAINWINDOW_H
index 4a89771..0a27dff 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "popupwidget.h"
 #include "ui_popupwidget.h"
-#include "../interfaces/daynightmode.h"
+#include <include/daynightmode.hpp>
 
 PopupWidget::PopupWidget(QWidget *parent) :
     QWidget(parent),
@@ -29,7 +29,11 @@ PopupWidget::PopupWidget(QWidget *parent) :
     dbus.registerObject("/Popup", this);
     dbus.registerService("org.agl.homescreen");
 
+    // no window decoration
+    setWindowFlags(Qt::FramelessWindowHint);
+
     mp_ui->setupUi(this);
+
     this->close();
 }
 
index a54a602..7a73b92 100644 (file)
@@ -18,7 +18,7 @@
 #define POPUPWIDGET_H
 
 #include <QWidget>
-#include "../interfaces/popup.h"
+#include <include/popup.hpp>
 #include "popup_adapter.h"
 
 namespace Ui {
@@ -46,6 +46,8 @@ private:
     Ui::PopupWidget *mp_ui;
 
     PopupAdaptor *mp_popupAdaptor;
+    // for showPupupFor LayoutSelection
+    //QList<QPushButton> m_pushButtons;
 };
 
 #endif // POPUPWIDGET_H
index 9c6f190..9df4a1c 100644 (file)
@@ -17,7 +17,7 @@
 #include "settingswidget.h"
 #include "ui_settingswidget.h"
 #include <QSettings>
-#include "../interfaces/daynightmode.h"
+#include <include/daynightmode.hpp>
 
 SettingsWidget::SettingsWidget(QWidget *parent) :
     QWidget(parent),
index 442c3e7..5628172 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "statusbarwidget.h"
 #include "ui_statusbarwidget.h"
-#include "../interfaces/daynightmode.h"
+#include <include/daynightmode.hpp>
 
 StatusBarWidget::StatusBarWidget(QWidget *parent) :
     QWidget(parent),
diff --git a/HomeScreenAppFrameworkBinderTizen/.gitignore b/HomeScreenAppFrameworkBinderTizen/.gitignore
new file mode 100644 (file)
index 0000000..051f2d5
--- /dev/null
@@ -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/HomeScreenAppFrameworkBinderTizen/HomeScreenAppFrameworkBinderTizen.pro b/HomeScreenAppFrameworkBinderTizen/HomeScreenAppFrameworkBinderTizen.pro
new file mode 100644 (file)
index 0000000..255dbc3
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright (C) 2016 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.
+
+QT       += core dbus
+QT       -= gui
+
+TARGET = HomeScreenAppFrameworkBinderTizen
+CONFIG   += console
+CONFIG   -= app_bundle
+
+TEMPLATE = app
+
+
+SOURCES += src/main.cpp \
+    src/homescreenappframeworkbindertizen.cpp
+
+HEADERS += \
+    src/homescreenappframeworkbindertizen.h
+
+INCLUDEPATH += $$OUT_PWD/../interfaces
+INCLUDEPATH += ../interfaces/
+
+LIBS += -L$$OUT_PWD/../interfaces -linterfaces
+
+contains(QT_ARCH, arm.*) {
+    LIBS += -lpkgmgr-info
+    LIBS += -laul
+}
+
+OTHER_FILES += \
+    README.md
+
+# remove generated files
+QMAKE_CLEAN += -r \
+    $$OUT_PWD/HomeScreenAppFrameworkBinderTizen \
+    $$OUT_PWD/Makefile
diff --git a/HomeScreenAppFrameworkBinderTizen/LICENSE b/HomeScreenAppFrameworkBinderTizen/LICENSE
new file mode 100644 (file)
index 0000000..31c692a
--- /dev/null
@@ -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/HomeScreenAppFrameworkBinderTizen/README.md b/HomeScreenAppFrameworkBinderTizen/README.md
new file mode 100644 (file)
index 0000000..17d181c
--- /dev/null
@@ -0,0 +1,20 @@
+AGL Home Screen AppFramework Binder for Tizen 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
+
+v0.2.0
+08/05/2016
+
+#new features
+- initial version
+
+#TODOs
+
+
diff --git a/HomeScreenAppFrameworkBinderTizen/src/homescreenappframeworkbindertizen.cpp b/HomeScreenAppFrameworkBinderTizen/src/homescreenappframeworkbindertizen.cpp
new file mode 100644 (file)
index 0000000..9e8dbba
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2016 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 "homescreenappframeworkbindertizen.h"
+
+
+HomeScreenAppFrameworkBinderTizen::HomeScreenAppFrameworkBinderTizen(QObject *parent) :
+    QObject(parent),
+    mp_appframeworkAdaptor(0)
+{
+    qDebug("D-Bus: register as org.agl.homescreenappframeworkbindertizen");
+
+    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.homescreenappframeworkbindertizen");
+
+#ifdef __arm__
+    pkgmgrinfo_pkginfo_get_list(HomeScreenAppFrameworkBinderTizen::pkg_list_cb_static, this);
+    //list_pkgs(this);
+#endif
+#ifdef __i386__
+    // for the simulation
+    AppInfo ai;
+    ai.setName("org.test.app1");
+    ai.setDescription("testdesc1");
+    ai.setIconPath("https://www.automotivelinux.org/sites/cpstandard/files/logo.png");
+    m_apps.append(ai);
+    ai.setName("org.test.app2");
+    ai.setDescription("testdesc2");
+    m_apps.append(ai);
+#endif
+}
+
+HomeScreenAppFrameworkBinderTizen::~HomeScreenAppFrameworkBinderTizen()
+{
+    delete mp_appframeworkAdaptor;
+}
+
+QStringList HomeScreenAppFrameworkBinderTizen::getAvailableAppNames()
+{
+    QStringList result;
+    for (int i = 0; i < m_apps.size(); ++i)
+    {
+        result.append(m_apps.at(i).getName());
+    }
+    qDebug("size: %d", result.size());
+    return result;
+}
+
+int HomeScreenAppFrameworkBinderTizen::launchApp(const QString &name)
+{
+    int pid = -1;
+#ifdef __arm__
+    qDebug("launchApp name: %s", name.toStdString().c_str());
+    pid = aul_launch_app(name.toStdString().c_str(), 0);
+    qDebug("launchApp pid: %d", pid);
+#endif
+#ifdef __i386__
+    qDebug("launchApp name: %s", name.toStdString().c_str());
+#endif
+
+    return pid;
+}
+
+void HomeScreenAppFrameworkBinderTizen::clearAppList()
+{
+    m_apps.clear();
+}
+
+void HomeScreenAppFrameworkBinderTizen::appendAppName(const char* name)
+{
+    AppInfo newApp;
+    newApp.setName(QString(name));
+    m_apps.append(newApp);
+}
+
+#ifdef __arm__
+void HomeScreenAppFrameworkBinderTizen::pkg_list_cb_non_static(pkgmgrinfo_pkginfo_h handle)
+{
+    qDebug("pkg_list_cb_non_static");
+    char *pkgid2 = NULL;
+    pkgmgrinfo_pkginfo_get_pkgid(handle, &pkgid2);
+    printf("pkg_list_cb_non_static: %s\n", pkgid2);
+    appendAppName(pkgid2);
+}
+
+int HomeScreenAppFrameworkBinderTizen::pkg_list_cb_static(pkgmgrinfo_pkginfo_h handle, void *user_data)
+{
+    qDebug("pkg_list_cb_static");
+    static_cast<HomeScreenAppFrameworkBinderTizen*>(user_data)->pkg_list_cb_non_static(handle);
+}
+#endif
diff --git a/HomeScreenAppFrameworkBinderTizen/src/homescreenappframeworkbindertizen.h b/HomeScreenAppFrameworkBinderTizen/src/homescreenappframeworkbindertizen.h
new file mode 100644 (file)
index 0000000..1d48f7a
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2016 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 HOMESCREENAPPFRAMEWORKBINDERTIZEN_H
+#define HOMESCREENAPPFRAMEWORKBINDERTIZEN_H
+
+#include <QObject>
+#include <include/appframework.hpp>
+#include "appframework_adapter.h"
+
+#ifdef __arm__
+extern "C" {
+#include "aul/aul.h"
+#include "pkgmgr-info.h"
+}
+#endif
+
+class HomeScreenAppFrameworkBinderTizen : public QObject
+{
+    Q_OBJECT
+public:
+    explicit HomeScreenAppFrameworkBinderTizen(QObject *parent = 0);
+    ~HomeScreenAppFrameworkBinderTizen();
+private:
+    AppframeworkAdaptor *mp_appframeworkAdaptor;
+    QList<AppInfo> m_apps;
+
+    //from appframework_adapter.h
+public Q_SLOTS: // METHODS
+    QStringList getAvailableAppNames();
+    int launchApp(const QString &name);
+
+public:
+    void clearAppList();
+    void appendAppName(const char* name);
+
+#ifdef __arm__
+    void pkg_list_cb_non_static(pkgmgrinfo_pkginfo_h handle);
+    static int pkg_list_cb_static(pkgmgrinfo_pkginfo_h handle, void *user_data);
+#endif
+
+public slots:
+
+};
+
+#endif // HOMESCREENAPPFRAMEWORKBINDERTIZEN_H
diff --git a/HomeScreenAppFrameworkBinderTizen/src/main.cpp b/HomeScreenAppFrameworkBinderTizen/src/main.cpp
new file mode 100644 (file)
index 0000000..2f7d3a8
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2016 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 "homescreenappframeworkbindertizen.h"
+
+int main(int argc, char *argv[])
+{
+    AppInfo::registerMetaType();
+
+    QCoreApplication a(argc, argv);
+
+    // used for application settings (QSettings)
+    QCoreApplication::setOrganizationDomain("LinuxFoundation");
+    QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
+    QCoreApplication::setApplicationName("HomeScreenAppFrameworkBinderTizen");
+    QCoreApplication::setApplicationVersion("0.2.0");
+
+    HomeScreenAppFrameworkBinderTizen *tdp = new HomeScreenAppFrameworkBinderTizen();
+
+    return a.exec();
+}
index 04aff3c..88eeb2e 100644 (file)
@@ -27,15 +27,10 @@ SOURCES += \
 HEADERS  += \
     ../interfaces/daynightmode.h \
     ../interfaces/popup.h \
-    src/mainwindow.h \
-    $$OUT_PWD/../interfaces/daynightmode_adapter.h \      #generated dbus adapter
-    $$OUT_PWD/../interfaces/daynightmode_proxy.h \        #generated dbus proxy
-    $$OUT_PWD/../interfaces/popup_adapter.h \             #generated dbus adapter
-    $$OUT_PWD/../interfaces/popup_proxy.h \               #generated dbus proxy
-    $$OUT_PWD/../interfaces/statusbar_adapter.h \         #generated dbus adapter
-    $$OUT_PWD/../interfaces/statusbar_proxy.h             #generated dbus proxy
+    src/mainwindow.h
 
 INCLUDEPATH += $$OUT_PWD/../interfaces
+INCLUDEPATH += ../interfaces
 
 LIBS += -L$$OUT_PWD/../interfaces -linterfaces
 
index 30dbfe8..0a10780 100644 (file)
@@ -9,6 +9,12 @@ 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
 
+v0.2.0
+08/05/2016
+
+#changes
+- just new version number
+
 v0.1.1
 07/06/2015
 
index dc03c7a..289c237 100644 (file)
@@ -41,7 +41,7 @@
        <rect>
         <x>20</x>
         <y>380</y>
-        <width>221</width>
+        <width>211</width>
         <height>27</height>
        </rect>
       </property>
@@ -52,7 +52,7 @@
      <widget class="QTableWidget" name="tableWidget_Status">
       <property name="geometry">
        <rect>
-        <x>20</x>
+        <x>30</x>
         <y>20</y>
         <width>681</width>
         <height>341</height>
        </rect>
       </property>
      </widget>
+     <widget class="QPushButton" name="pushButton_PopupExample">
+      <property name="geometry">
+       <rect>
+        <x>428</x>
+        <y>380</y>
+        <width>171</width>
+        <height>27</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>&quot;Hello World&quot; Example</string>
+      </property>
+     </widget>
     </widget>
     <widget class="QWidget" name="tab_DayNightMode">
      <attribute name="title">
index 921c4eb..5a165f8 100644 (file)
@@ -36,16 +36,11 @@ int main(int argc, char *argv[])
     QCoreApplication::setOrganizationDomain("LinuxFoundation");
     QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
     QCoreApplication::setApplicationName("HomeScreenSimulator");
-    QCoreApplication::setApplicationVersion("0.1.1");
+    QCoreApplication::setApplicationVersion("0.2.0");
 
     MainWindow w;
     w.show();
 
-    // TODO: input handling not defined right now...
-    /*InputEventDistributor *mp_inputEventDistributor;
-    mp_inputEventDistributor = new InputEventDistributor();*/
-
-
     // start input and system settings simulator on developer PCs
 #ifdef __arm__
     qDebug("Running on ARM architecture");
index ffc5170..74c02d7 100644 (file)
@@ -144,3 +144,8 @@ void MainWindow::on_pushButton_IconExample_clicked()
     // Home Screen app resources...
     mp_ui->tableWidget_Status->setItem(0, 2, new QTableWidgetItem(":/icons/home_day.png"));
 }
+
+void MainWindow::on_pushButton_PopupExample_clicked()
+{
+    mp_dBusPopupProxy->showPopup(0, "Hello Popup!\nNice to see you!");
+}
index 2eb6e11..7c2f19b 100644 (file)
@@ -18,7 +18,7 @@
 #define MAINWINDOW_H
 
 #include <QMainWindow>
-#include "../interfaces/daynightmode.h"
+#include <include/daynightmode.hpp>
 #include "daynightmode_adapter.h"
 
 #include "statusbar_proxy.h"
@@ -55,6 +55,8 @@ private slots:
 
     void on_pushButton_IconExample_clicked();
 
+    void on_pushButton_PopupExample_clicked();
+
 private:
     Ui::MainWindow *mp_ui;
     DaynightmodeAdaptor *mp_dBusDayNightModeAdapter;
diff --git a/InputEventManager/.gitignore b/InputEventManager/.gitignore
new file mode 100644 (file)
index 0000000..051f2d5
--- /dev/null
@@ -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/InputEventManager/InputEventManager.pro b/InputEventManager/InputEventManager.pro
new file mode 100644 (file)
index 0000000..421ad6e
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright (C) 2016 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.
+
+QT       += core dbus
+QT       -= gui
+
+TARGET = InputEventManager
+CONFIG   += console
+CONFIG   -= app_bundle
+
+TEMPLATE = app
+
+
+SOURCES += src/main.cpp \
+    src/inputeventmanager.cpp
+
+HEADERS += \
+    src/inputeventmanager.h
+
+INCLUDEPATH += $$OUT_PWD/../interfaces
+INCLUDEPATH += ../interfaces/
+
+LIBS += -L$$OUT_PWD/../interfaces -linterfaces
+
+#contains(QT_ARCH, arm.*) {
+#    LIBS += -lpkgmgr-info
+#    LIBS += -laul
+#}
+
+OTHER_FILES += \
+    README.md
+
+# remove generated files
+QMAKE_CLEAN += -r \
+    $$OUT_PWD/InputEventManager \
+    $$OUT_PWD/Makefile
diff --git a/InputEventManager/LICENSE b/InputEventManager/LICENSE
new file mode 100644 (file)
index 0000000..31c692a
--- /dev/null
@@ -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/InputEventManager/README.md b/InputEventManager/README.md
new file mode 100644 (file)
index 0000000..078305d
--- /dev/null
@@ -0,0 +1,20 @@
+AGL InputEventManager Sample App
+
+
+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
+
+v0.2.0
+08/05/2016
+
+#new features
+- initial version
+
+#TODOs
+
+
diff --git a/InputEventManager/src/inputeventmanager.cpp b/InputEventManager/src/inputeventmanager.cpp
new file mode 100644 (file)
index 0000000..a33fdbe
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2016 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 "inputeventmanager.h"
+#include "include/inputevent.hpp"
+
+
+InputEventManager::InputEventManager(QObject *parent) :
+    QObject(parent),
+    mp_inputEventAdaptor(0),
+    mp_dBusHomeScreenProxy(0)
+{
+    qDebug("D-Bus: register as org.agl.inputeventmanager");
+
+    // publish app framework interface
+    mp_inputEventAdaptor = new InputeventAdaptor((QObject*)this);
+    QDBusConnection dbus = QDBusConnection::sessionBus();
+    dbus.registerObject("/InputEvent", this);
+    dbus.registerService("org.agl.inputeventmanager");
+
+
+    qDebug("D-Bus: connect to org.agl.homescreen /HomeScreen");
+    mp_dBusHomeScreenProxy = new org::agl::homescreen("org.agl.homescreen",
+                                              "/HomeScreen",
+                                              QDBusConnection::sessionBus(),
+                                              0);
+}
+
+InputEventManager::~InputEventManager()
+{
+    delete mp_dBusHomeScreenProxy;
+    delete mp_inputEventAdaptor;
+}
+
+void InputEventManager::hardKeyPressed(int key)
+{
+    switch (key)
+    {
+    case InputEvent::HARDKEY_NAV:
+        mp_dBusHomeScreenProxy->hardKeyPressed(key);
+        qDebug("hardKeyPressed NAV key pressed!");
+        break;
+    default:
+        qDebug("hardKeyPressed %d", key);
+        break;
+    }
+}
diff --git a/InputEventManager/src/inputeventmanager.h b/InputEventManager/src/inputeventmanager.h
new file mode 100644 (file)
index 0000000..6bbf442
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2016 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 INPUTEVENTMANAGER_H
+#define INPUTEVENTMANAGER_H
+
+#include "inputevent_adapter.h"
+#include <include/homescreen.hpp>
+#include "homescreen_proxy.h"
+
+/*
+#ifdef __arm__
+extern "C" {
+#include "aul/aul.h"
+#include "pkgmgr-info.h"
+}
+#endif
+*/
+
+class InputEventManager : public QObject
+{
+    Q_OBJECT
+public:
+    explicit InputEventManager(QObject *parent = 0);
+    ~InputEventManager();
+private:
+    InputeventAdaptor *mp_inputEventAdaptor;
+    org::agl::homescreen *mp_dBusHomeScreenProxy;
+
+    //from inputevent_adapter.h
+public Q_SLOTS: // METHODS
+    void hardKeyPressed(int key);
+
+public:
+
+
+public slots:
+
+};
+
+#endif // INPUTEVENTMANAGER_H
diff --git a/InputEventManager/src/main.cpp b/InputEventManager/src/main.cpp
new file mode 100644 (file)
index 0000000..4862dbd
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2016 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 "inputeventmanager.h"
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication a(argc, argv);
+
+    // used for application settings (QSettings)
+    QCoreApplication::setOrganizationDomain("LinuxFoundation");
+    QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
+    QCoreApplication::setApplicationName("InputEventManager");
+    QCoreApplication::setApplicationVersion("0.2.0");
+
+    InputEventManager *inputEventManager = new InputEventManager();
+
+    return a.exec();
+}
index 65459c7..7d37899 100644 (file)
@@ -9,6 +9,12 @@ 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
 
+v0.2.0
+08/05/2016
+
+#changes
+- just new version number
+
 v0.1.1
 07/06/2015
 
index 1ae61dd..e2ec9e2 100644 (file)
@@ -26,10 +26,10 @@ SOURCES += src/main.cpp \
     src/timedateprovider.cpp
 
 HEADERS += \
-    $$OUT_PWD/../interfaces/statusbar_proxy.h \          #generated dbus proxy
-    src/timedateprovider.h
+    src/timedateprovider.hpp
 
-INCLUDEPATH +=  $$OUT_PWD/../interfaces
+INCLUDEPATH += $$OUT_PWD/../interfaces
+INCLUDEPATH += ../interfaces
 
 LIBS += -L$$OUT_PWD/../interfaces -linterfaces
 
index cc10b81..5be8431 100644 (file)
@@ -1,5 +1,5 @@
 #include <QCoreApplication>
-#include "timedateprovider.h"
+#include "timedateprovider.hpp"
 
 int main(int argc, char *argv[])
 {
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
     QCoreApplication::setOrganizationDomain("LinuxFoundation");
     QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
     QCoreApplication::setApplicationName("SampleAppTimeDate");
-    QCoreApplication::setApplicationVersion("0.1.1");
+    QCoreApplication::setApplicationVersion("0.2.0");
 
     TimeDateProvider *tdp = new TimeDateProvider();
     tdp->start();
index 91d5e30..2511432 100644 (file)
@@ -1,4 +1,4 @@
-#include "timedateprovider.h"
+#include "timedateprovider.hpp"
 #include <QTimerEvent>
 
 TimeDateProvider::TimeDateProvider(QObject *parent) :
@@ -15,7 +15,7 @@ TimeDateProvider::TimeDateProvider(QObject *parent) :
     dbus.registerService("org.agl.sampleapptimedate");
 
 
-    qDebug("D-Bus: connect to org.agl.mainwindow /StatusBar");
+    qDebug("D-Bus: connect to org.agl.homescreen /StatusBar");
     mp_dBusStatusBarProxy = new org::agl::statusbar("org.agl.homescreen",
                                               "/StatusBar",
                                               QDBusConnection::sessionBus(),
@@ -28,7 +28,6 @@ TimeDateProvider::~TimeDateProvider()
 
     if (0 != mp_dBusStatusBarProxy)
     {
-        qDebug("x");
         mp_dBusStatusBarProxy->setStatusText(1, "");
         delete mp_dBusStatusBarProxy;
     }
similarity index 82%
rename from SampleAppTimeDate/src/timedateprovider.h
rename to SampleAppTimeDate/src/timedateprovider.hpp
index 039104a..5ff663f 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef TIMEDATEPROVIDER_H
-#define TIMEDATEPROVIDER_H
+#ifndef TIMEDATEPROVIDER_HPP
+#define TIMEDATEPROVIDER_HPP
 
 #include <QObject>
 #include "statusbar_proxy.h"
@@ -24,4 +24,4 @@ public slots:
 
 };
 
-#endif // TIMEDATEPROVIDER_H
+#endif // TIMEDATEPROVIDER_HPP
diff --git a/WindowManager/.gitignore b/WindowManager/.gitignore
new file mode 100644 (file)
index 0000000..051f2d5
--- /dev/null
@@ -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/WindowManager/LICENSE b/WindowManager/LICENSE
new file mode 100644 (file)
index 0000000..31c692a
--- /dev/null
@@ -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/WindowManager/README.md b/WindowManager/README.md
new file mode 100644 (file)
index 0000000..64cf50b
--- /dev/null
@@ -0,0 +1,20 @@
+AGL WindowManager Sample App
+
+
+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
+
+v0.2.0
+08/05/2016
+
+#new features
+- initial version
+
+#TODOs
+
+
diff --git a/WindowManager/WindowManager.pro b/WindowManager/WindowManager.pro
new file mode 100644 (file)
index 0000000..74dfb3a
--- /dev/null
@@ -0,0 +1,50 @@
+# Copyright (C) 2016 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.
+
+QT       += core dbus
+QT       -= gui
+
+TARGET = WindowManager
+CONFIG   += console
+CONFIG   -= app_bundle
+
+TEMPLATE = app
+
+
+SOURCES += src/main.cpp \
+    src/windowmanager.cpp
+
+HEADERS += \
+    src/windowmanager.hpp
+
+INCLUDEPATH += $$OUT_PWD/../interfaces
+INCLUDEPATH += ../interfaces/
+
+#LIBS += -L$$OUT_PWD/../interfaces -linterfaces
+contains(QT_ARCH, arm.*) {
+    LIBS += -lilmControl -lilmCommon
+}
+
+#contains(QT_ARCH, arm.*) {
+#    LIBS += -lpkgmgr-info
+#    LIBS += -laul
+#}
+
+OTHER_FILES += \
+    README.md
+
+# remove generated files
+QMAKE_CLEAN += -r \
+    $$OUT_PWD/WindowManager \
+    $$OUT_PWD/Makefile
diff --git a/WindowManager/src/main.cpp b/WindowManager/src/main.cpp
new file mode 100644 (file)
index 0000000..14e0e00
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2016 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 "windowmanager.hpp"
+
+int main(int argc, char *argv[])
+{
+    QCoreApplication a(argc, argv);
+
+    // used for application settings (QSettings)
+    QCoreApplication::setOrganizationDomain("LinuxFoundation");
+    QCoreApplication::setOrganizationName("AutomotiveGradeLinux");
+    QCoreApplication::setApplicationName("WindowManager");
+    QCoreApplication::setApplicationVersion("0.2.0");
+
+    WindowManager *windowManager = new WindowManager();
+
+    return a.exec();
+}
diff --git a/WindowManager/src/windowmanager.cpp b/WindowManager/src/windowmanager.cpp
new file mode 100644 (file)
index 0000000..dcab2f4
--- /dev/null
@@ -0,0 +1,255 @@
+/*
+ * Copyright (C) 2016 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 "windowmanager.hpp"
+
+//////////////////////////////////////////
+// THIS IS STILL UNDER HEAVY DEVELOPMENT!
+// DO NOT JUDGE THE SOURCE CODE :)
+//////////////////////////////////////////
+
+
+WindowManager::WindowManager(QObject *parent) :
+    QObject(parent)
+{
+    qDebug("WindowManager");
+#ifdef __arm__
+    ilmErrorTypes err;
+    if (true)//!ilm_isInitialized()) ...crashes...
+    {
+        err = ilm_init();
+        qDebug("ilm_init = %d", err);
+    }
+
+
+    t_ilm_uint screenID = 0;
+    t_ilm_uint width;
+    t_ilm_uint height;
+
+    err = ilm_getScreenResolution(screenID, &width, &height);
+    qDebug("ilm_getScreenResolution = %d", err);
+    qDebug("pWidth %d, pHeight %d", width, height);
+
+
+    t_ilm_layer layerId = 42; // does not matter
+    err = ilm_layerCreateWithDimension(&layerId, width, height);
+    qDebug("ilm_layerCreateWithDimension = %d", err);
+    qDebug("layerId = %d", layerId);
+
+    err = ilm_layerSetVisibility(layerId, true);
+    qDebug("ilm_layerSetVisibility = %d", err);
+
+    ilm_commitChanges();
+
+    err = ilm_displaySetRenderOrder(screenID, &layerId, 1);
+    qDebug("ilm_displaySetRenderOrder = %d", err);
+
+    ilm_commitChanges();
+
+    err =  ilm_layerSetSourceRectangle(layerId, 0, 0, width, height);
+    qDebug("ilm_layerSetSourceRectangle = %d", err);
+    err =  ilm_layerSetDestinationRectangle(layerId, 0, 0, width, height);
+    qDebug("layerSetDestinationRectangle = %d", err);
+
+    ilm_commitChanges();
+
+    t_ilm_float opacity = 1.0;
+
+    err =  ilm_layerSetOpacity(layerId, opacity);
+    qDebug("ilm_layerSetOpacity = %d", err);
+
+
+    t_ilm_int length;
+    t_ilm_surface* pArray;
+
+    err = ilm_getSurfaceIDs(&length, &pArray);
+    qDebug("ilm_getSurfaceIDs = %d", err);
+    qDebug("length %d pArray[0] %d", length, pArray[0]);
+
+    if (length > 0)
+    {
+        t_ilm_surface surfaceId = pArray[0];
+
+        err = ilm_layerAddSurface(layerId, surfaceId);
+        qDebug("ilm_layerAddSurface = %d", err);
+
+        t_ilm_bool visibility;
+        err = ilm_surfaceGetVisibility(surfaceId, &visibility);
+        qDebug("ilm_surfaceGetVisibility = %d", err);
+        qDebug("visibility %d", visibility);
+
+        err = ilm_surfaceSetVisibility(surfaceId, true);
+        qDebug("ilm_surfaceSetVisibility = %d", err);
+
+        err = ilm_surfaceSetOpacity(surfaceId, opacity);
+        qDebug("ilm_surfaceSetOpacity = %d", err);
+
+        err = ilm_surfaceSetSourceRectangle(surfaceId, 0, 0, 200, 200);
+        qDebug("ilm_surfaceSetSourceRectangle = %d", err);
+        err = ilm_surfaceSetDestinationRectangle(surfaceId, 0, 0, 200, 200);
+        qDebug("surfaceSetDestinationRectangle = %d", err);
+
+
+    }
+
+    ilm_commitChanges();
+
+    struct ilmScreenProperties screenProperties;
+    struct ilmLayerProperties layerProperties;
+    struct ilmSurfaceProperties surfaceProperties;
+
+    err =  ilm_getPropertiesOfScreen(0, &screenProperties);
+    qDebug("ilm_getPropertiesOfScreen = %d", err);
+    err =  ilm_getPropertiesOfLayer(layerId, &layerProperties);
+    qDebug("ilm_getPropertiesOfLayer = %d", err);
+    err =  ilm_getPropertiesOfSurface(pArray[0], &surfaceProperties);
+    qDebug("ilm_getPropertiesOfSurface = %d", err);
+
+
+    qDebug("screen");
+    qDebug("t_ilm_uint %d", screenProperties.layerCount);          /*!< number of layers displayed on the screen */
+    //qDebug("t_ilm_layer* %d", screenProperties.layerIds[0]);          /*!< array of layer ids */
+    qDebug("t_ilm_uint %d", screenProperties.harwareLayerCount);   /*!< number of hardware layers */
+    qDebug("t_ilm_uint %d", screenProperties.screenWidth);         /*!< width value of screen in pixels */
+    qDebug("t_ilm_uint %d", screenProperties.screenHeight);        /*!< height value of screen in pixels */
+
+    qDebug("layer");
+    qDebug("t_ilm_float %f", layerProperties.opacity);         /*!< opacity value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.sourceX);          /*!< x source position value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.sourceY);          /*!< y source position value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.sourceWidth);      /*!< source width value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.sourceHeight);     /*!< source height value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.origSourceWidth);  /*!< original source width value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.origSourceHeight); /*!< original source height value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.destX);            /*!< x destination position value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.destY);            /*!< y desitination position value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.destWidth);        /*!< destination width value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.destHeight);       /*!< destination height value of the layer */
+    qDebug("ilmOrientation%d",  layerProperties.orientation);  /*!< orientation value of the layer */
+    qDebug("t_ilm_bool %d", layerProperties.visibility);       /*!< visibility value of the layer */
+    qDebug("t_ilm_uint %d", layerProperties.type);             /*!< type of layer */
+    qDebug("t_ilm_int  %d", layerProperties.creatorPid);       /*!< process id of application that created this layer */
+
+    qDebug("surface");
+    qDebug("t_ilm_float %f", surfaceProperties.opacity);                    /*!< opacity value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.sourceX);                     /*!< x source position value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.sourceY);                     /*!< y source position value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.sourceWidth);                 /*!< source width value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.sourceHeight);                /*!< source height value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.origSourceWidth);             /*!< original source width value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.origSourceHeight);            /*!< original source height value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.destX);                       /*!< x destination position value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.destY);                       /*!< y desitination position value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.destWidth);                   /*!< destination width value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.destHeight);                  /*!< destination height value of the surface */
+    qDebug("ilmOrientation %d", surfaceProperties.orientation);             /*!< orientation value of the surface */
+    qDebug("t_ilm_bool %d", surfaceProperties.visibility);                  /*!< visibility value of the surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.frameCounter);                /*!< already rendered frames of surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.drawCounter);                 /*!< content updates of surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.updateCounter);               /*!< content updates of surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.pixelformat);                 /*!< pixel format of surface */
+    qDebug("t_ilm_uint %d", surfaceProperties.nativeSurface);               /*!< native surface handle of surface */
+    qDebug("t_ilm_int  %d", surfaceProperties.creatorPid);                  /*!< process id of application that created this surface */
+    qDebug("ilmInputDevice %d", surfaceProperties.focus);                   /*!< bitmask of every type of device that this surface has focus in */
+
+    err =  ilm_registerNotification(WindowManager::notificationFunc_static, this);
+#endif
+}
+
+WindowManager::~WindowManager()
+{
+#ifdef __arm__
+    ilmErrorTypes err;
+    if (ilm_isInitialized())
+    {
+        err = ilm_destroy();
+        qDebug("ilm_destroy = %d", err);
+    }
+#endif
+}
+
+#ifdef __arm__
+void WindowManager::notificationFunc_non_static(ilmObjectType object,
+                                    t_ilm_uint id,
+                                    t_ilm_bool created)
+{
+    qDebug("notificationFunc_non_static");
+    if (ILM_SURFACE == object)
+    {
+        struct ilmSurfaceProperties surfaceProperties;
+
+        if (created)
+        {
+            qDebug("Surface created, ID: %d", id);
+
+            ilm_layerAddSurface(42 /*always use layer 42 for now*/, id);
+            ilm_surfaceSetOpacity(id, 1.0);
+            ilm_surfaceSetVisibility(id, true);
+            ilm_getPropertiesOfSurface(id, &surfaceProperties);
+            ilm_surfaceSetSourceRectangle(id, 0, 0, surfaceProperties.origSourceWidth, surfaceProperties.origSourceHeight);
+
+            ilm_commitChanges();
+        }
+        else
+        {
+            qDebug("Surface destroyed, ID: %d", id);
+        }
+
+        t_ilm_uint screenID = 0;
+        t_ilm_uint width;
+        t_ilm_uint height;
+        ilm_getScreenResolution(screenID, &width, &height);
+
+        t_ilm_int length;
+        t_ilm_surface* pArray;
+
+        ilm_getSurfaceIDs(&length, &pArray);
+        qDebug("length %d", length);
+
+
+        for (int i = 0; i < length; ++i)
+        {
+            //ilm_getPropertiesOfSurface(pArray[i], &surfaceProperties);
+            qDebug("place surface %d at x: %f, y: %f, width: %f, height: %f",
+                   pArray[i],
+                   i * (width / (1.0 * length)),
+                   0,
+                   width / (1.0 * length),
+                   height);
+            ilm_surfaceSetDestinationRectangle(pArray[(int)i],
+                    i * (width / (1.0 * length)),
+                    0,
+                    width / (1.0 * length),
+                    height);
+        }
+
+        ilm_commitChanges();
+    }
+    if (ILM_LAYER == object)
+    {
+        qDebug("Layer.. we don't care...");
+    }
+}
+
+void WindowManager::notificationFunc_static(ilmObjectType object,
+                                            t_ilm_uint id,
+                                            t_ilm_bool created,
+                                            void* user_data)
+{
+    qDebug("notificationFunc_static");
+    static_cast<WindowManager*>(user_data)->notificationFunc_non_static(object, id, created);
+}
+#endif
diff --git a/WindowManager/src/windowmanager.hpp b/WindowManager/src/windowmanager.hpp
new file mode 100644 (file)
index 0000000..ee779aa
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2016 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 WINDOWMANAGER_HPP
+#define WINDOWMANAGER_HPP
+
+#include <QObject>
+
+
+#ifdef __arm__
+extern "C" {
+#include "ilm/ilm_control.h"
+}
+#endif
+
+
+class WindowManager : public QObject
+{
+    Q_OBJECT
+public:
+    explicit WindowManager(QObject *parent = 0);
+    ~WindowManager();
+private:
+
+
+public:
+
+#ifdef __arm__
+    void notificationFunc_non_static(ilmObjectType object,
+                                        t_ilm_uint id,
+                                        t_ilm_bool created);
+    static void notificationFunc_static(ilmObjectType object,
+                                        t_ilm_uint id,
+                                        t_ilm_bool created,
+                                        void* user_data);
+#endif
+public slots:
+
+};
+
+#endif // WINDOWMANAGER_HPP
diff --git a/interfaces/appframework.xml b/interfaces/appframework.xml
new file mode 100644 (file)
index 0000000..1324386
--- /dev/null
@@ -0,0 +1,26 @@
+<!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 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>
+  <interface name="org.agl.appframework">
+      <method name="getAvailableAppNames">
+        <arg name="names" type="as" direction="out"/>
+      </method>
+      <method name="launchApp">
+        <arg name="name" type="s" direction="in"/>
+        <arg name="pid" type="i" direction="out"/>
+      </method>
+  </interface>
+</node>
+
diff --git a/interfaces/homescreen.xml b/interfaces/homescreen.xml
new file mode 100644 (file)
index 0000000..55f4305
--- /dev/null
@@ -0,0 +1,22 @@
+<!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 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>
+  <interface name="org.agl.homescreen">
+    <method name="hardKeyPressed">
+      <arg name="key" type="i" direction="in"/> <!-- using the inputevent.hpp InputEvent::HardKey type -->
+    </method>
+  </interface>
+</node>
+
diff --git a/interfaces/include/appframework.hpp b/interfaces/include/appframework.hpp
new file mode 100644 (file)
index 0000000..d95cd9d
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2016 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 <QObject>
+#include <QtDBus>
+#include <QString>
+
+class AppInfo : public QObject
+{
+    Q_OBJECT
+public:
+    explicit AppInfo(QObject *parent = 0);
+    AppInfo(const AppInfo &other);
+    AppInfo& operator=(const AppInfo &other);
+    ~AppInfo();
+
+    //register Message with the Qt type system
+    static void registerMetaType();
+
+    friend QDBusArgument &operator<<(QDBusArgument &argument, const AppInfo &appInfo);
+    friend const QDBusArgument &operator>>(const QDBusArgument &argument, AppInfo &appInfo);
+
+    void setName(const QString name) {this->name = name;}
+    QString getName() const {return name;}
+    void setIconPath(const QString iconPath) {this->iconPath = iconPath;}
+    QString getIconPath() const {return iconPath;}
+    void setDescription(const QString description) {this->description = description;}
+    QString getDescription() const {return description;}
+
+private:
+    QString name;
+    QString iconPath;
+    QString description;
+};
+
+Q_DECLARE_METATYPE(AppInfo)
+
+#endif // APPFRAMEWORK_HPP
diff --git a/interfaces/include/homescreen.hpp b/interfaces/include/homescreen.hpp
new file mode 100644 (file)
index 0000000..bef3695
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2016 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 HOMESCREEN_H
+#define HOMESCREEN_H
+
+#include "inputevent.hpp"
+
+#endif // HOMESCREEN_H
+
diff --git a/interfaces/include/inputevent.hpp b/interfaces/include/inputevent.hpp
new file mode 100644 (file)
index 0000000..28418f6
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2016 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 INPUTEVENT_H
+#define INPUTEVENT_H
+
+namespace InputEvent {
+    typedef enum HardKey
+    {
+        HARDKEY_UNDEFINED,
+        HARDKEY_NAV
+    } eHardKey;
+}
+
+#endif // INPUTEVENT_H
+
diff --git a/interfaces/include/statusbar.hpp b/interfaces/include/statusbar.hpp
new file mode 100644 (file)
index 0000000..d7fcc0c
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2016 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 STATUSBAR_H
+#define STATUSBAR_H
+
+
+
+#endif // STATUSBAR_H
diff --git a/interfaces/inputevent.xml b/interfaces/inputevent.xml
new file mode 100644 (file)
index 0000000..813139b
--- /dev/null
@@ -0,0 +1,22 @@
+<!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 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>
+  <interface name="org.agl.inputevent">
+    <method name="hardKeyPressed">
+      <arg name="key" type="i" direction="in"/>
+    </method>
+  </interface>
+</node>
+
index c2b8cc0..75b4412 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-QT += core gui dbus
+QT  += core dbus
+QT  -= gui
+
 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
 
 TEMPLATE = lib
 CONFIG += staticlib
 TARGET = interfaces
 
+HEADERS += include/appframework.hpp
+SOURCES += src/appframework.cpp
+
 XMLSOURCES = \
+    appframework.xml \
     daynightmode.xml \
+    homescreen.xml \
+    inputevent.xml \
     popup.xml \
     statusbar.xml
 
 gen_adapter_cpp.input = XMLSOURCES
 gen_adapter_cpp.commands = \
-    qdbusxml2cpp -m -a ${QMAKE_FILE_IN_BASE}_adapter ${QMAKE_FILE_IN}; \
+    qdbusxml2cpp -i include/${QMAKE_FILE_IN_BASE}.hpp -m -a ${QMAKE_FILE_IN_BASE}_adapter ${QMAKE_FILE_IN}; \
     moc $$OUT_PWD/${QMAKE_FILE_IN_BASE}_adapter.h -o $$OUT_PWD/${QMAKE_FILE_IN_BASE}_adapter.moc
 gen_adapter_cpp.output = ${QMAKE_FILE_IN_BASE}_adapter.cpp
 gen_adapter_cpp.variable_out = SOURCES
@@ -34,7 +42,7 @@ gen_adapter_cpp.clean = ${QMAKE_FILE_IN_BASE}_adapter.cpp
 
 gen_proxy_cpp.input = XMLSOURCES
 gen_proxy_cpp.commands = \
-    qdbusxml2cpp -m -p ${QMAKE_FILE_IN_BASE}_proxy ${QMAKE_FILE_IN}; \
+    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
@@ -43,7 +51,7 @@ gen_proxy_cpp.clean = ${QMAKE_FILE_IN_BASE}_proxy.cpp
 gen_adapter_h.input = XMLSOURCES
 gen_adapter_h.commands = @echo Fake making the header for ${QMAKE_FILE_IN}
 gen_adapter_h.depends = ${QMAKE_FILE_IN_BASE}_adapter.cpp
-en_adapter_h.output = ${QMAKE_FILE_IN_BASE}_adapter.h
+gen_adapter_h.output = ${QMAKE_FILE_IN_BASE}_adapter.h
 gen_adapter_h.clean = ${QMAKE_FILE_IN_BASE}_adapter.h
 
 gen_proxy_h.input = XMLSOURCES
diff --git a/interfaces/src/appframework.cpp b/interfaces/src/appframework.cpp
new file mode 100644 (file)
index 0000000..3a5ebda
--- /dev/null
@@ -0,0 +1,55 @@
+#include "include/appframework.hpp"
+
+AppInfo::AppInfo(QObject *parent) :
+    QObject(parent)
+{
+}
+
+AppInfo::AppInfo(const AppInfo &other) :
+    QObject(other.parent()),
+    name(other.getName()),
+    iconPath(other.getIconPath()),
+    description(other.getDescription())
+{
+}
+
+AppInfo& AppInfo::operator=(const AppInfo &other)
+{
+    setParent(other.parent());
+    name = other.getName();
+    iconPath = other.getIconPath();
+    description = other.getDescription();
+
+    return *this;
+}
+
+AppInfo::~AppInfo()
+{
+}
+
+void AppInfo::registerMetaType()
+{
+    qRegisterMetaType<AppInfo>("AppInfo");
+    qDBusRegisterMetaType<AppInfo>();
+}
+
+
+// Marshall the MyStructure data into a D-Bus argument
+QDBusArgument &operator<<(QDBusArgument &argument, const AppInfo &appInfo)
+{
+    argument.beginStructure();
+    argument << appInfo.name << appInfo.iconPath << appInfo.description;
+    argument.endStructure();
+    qDebug("appInfo.name:<< %s", appInfo.name.toStdString().c_str());
+    return argument;
+}
+
+// Retrieve the MyStructure data from the D-Bus argument
+const QDBusArgument &operator>>(const QDBusArgument &argument, AppInfo &appInfo)
+{
+    argument.beginStructure();
+    argument >> appInfo.name >> appInfo.iconPath >> appInfo.description;
+    argument.endStructure();
+    qDebug("appInfo.name:>> %s", appInfo.name.toStdString().c_str());
+    return argument;
+}