Remove LaunchPad and AppBundle
[platform/core/security/ode.git] / server / external-encryption.cpp
index 09af99f..e2e230e 100644 (file)
@@ -28,8 +28,6 @@
 
 #include "misc.h"
 #include "logger.h"
-#include "launchpad.h"
-#include "app-bundle.h"
 #include "progress-bar.h"
 #include "rmi/common.h"
 #include "file-footer.h"
@@ -50,11 +48,14 @@ void spawnUI()
 {
        INFO(SINK, "Launching SD card password popup.");
        try {
-               AppBundle bundle;
-               bundle.add("viewtype", "SD_CARD_PASSWORD");
-
-               Launchpad launchpad(::tzplatform_getuid(TZ_SYS_DEFAULT_USER));
-               launchpad.launch("org.tizen.ode", bundle);
+               dbus::Connection &systemDBus = dbus::Connection::getSystem();
+               std::string unit("ode-password@external.service");
+
+               systemDBus.methodcall("org.freedesktop.systemd1",
+                                                               "/org/freedesktop/systemd1",
+                                                               "org.freedesktop.systemd1.Manager",
+                                                               "StartUnit",
+                                                               -1, "", "(ss)", unit.c_str(), "replace");
        } catch (runtime::Exception &e) {
                ERROR(SINK, "Failed to launch SD card password popup: " + std::string(e.what()));
        }
@@ -135,8 +136,8 @@ void externalAddEventReceiver()
                                                                externalCallback);
 
        systemDBus.subscribeSignal("",
-                                                               "/Org/Tizen/System/Pass/Core",
-                                                               "org.tizen.system.pass.core",
+                                                               "/Org/Tizen/System/DeviceD/Core",
+                                                               "org.tizen.system.deviced.core",
                                                                "BootingDone",
                                                                bootCompletionCallback);
 }