aboutsummaryrefslogtreecommitdiffstats
path: root/homescreen/src/homescreencontrolinterface.cpp
diff options
context:
space:
mode:
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-05-10 14:10:05 +0200
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>2017-05-11 08:12:31 +0200
commit52ef216acfe810a482dbab0c4422dad6ad8e77b7 (patch)
tree4b79a1e2d15aee01ad284345275bd434a764a5ad /homescreen/src/homescreencontrolinterface.cpp
parent0d3a0050cd3d35dbda51931134bd81460a1d12b2 (diff)
HomeScreenControlInterface: use single afm_user_daemon
* The org.agl.homescreenappframeworkbindertizen should not be used here. * Simplify the implementation. Change-Id: I5d2dedf2dcacea2104ba38e4467fd8299a88d776 Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
Diffstat (limited to 'homescreen/src/homescreencontrolinterface.cpp')
-rw-r--r--homescreen/src/homescreencontrolinterface.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/homescreen/src/homescreencontrolinterface.cpp b/homescreen/src/homescreencontrolinterface.cpp
index a9a1ba1..ecbe8e4 100644
--- a/homescreen/src/homescreencontrolinterface.cpp
+++ b/homescreen/src/homescreencontrolinterface.cpp
@@ -14,30 +14,21 @@
* limitations under the License.
*/
+#include "afm_user_daemon_proxy.h"
#include "homescreencontrolinterface.h"
+extern org::AGL::afm::user *afm_user_daemon_proxy;
+
HomeScreenControlInterface::HomeScreenControlInterface(QObject *parent) :
QObject(parent),
- mp_homeScreenAdaptor(0),
- mp_dBusAppFrameworkProxy()
+ mp_homeScreenAdaptor(0)
{
// 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;
}
QList<int> HomeScreenControlInterface::getAllSurfacesOfProcess(int pid)
@@ -60,13 +51,13 @@ void HomeScreenControlInterface::hardKeyPressed(int key)
{
case InputEvent::HARDKEY_NAV:
qDebug("hardKeyPressed NAV key pressed!");
- pid = mp_dBusAppFrameworkProxy->launchApp("navigation@0.1");
+ pid = afm_user_daemon_proxy->start("navigation@0.1").value().toInt();
qDebug("pid: %d", pid);
emit newRequestsToBeVisibleApp(pid);
break;
case InputEvent::HARDKEY_MEDIA:
qDebug("hardKeyPressed MEDIA key pressed!");
- pid = mp_dBusAppFrameworkProxy->launchApp("media@0.1");
+ pid = afm_user_daemon_proxy->start("media@0.1").value().toInt();
qDebug("pid: %d", pid);
emit newRequestsToBeVisibleApp(pid);
break;