app: Call myfiles app on Move files button callback 58/150958/2
authorpr.jung <pr.jung@samsung.com>
Tue, 19 Sep 2017 07:35:04 +0000 (16:35 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 19 Sep 2017 08:03:17 +0000 (08:03 +0000)
Change-Id: I865ba1dc65f0801ea4747aca4375dc61aab09301
Signed-off-by: pr.jung <pr.jung@samsung.com>
apps/extended-sd/CMakeLists.txt
apps/extended-sd/include/extended-sd-main.h
apps/extended-sd/src/es-internal-storage-page.c
apps/extended-sd/src/es-portable-storage-page.c
packaging/storaged.spec

index 183382a..c1b3a7e 100755 (executable)
@@ -23,6 +23,7 @@ pkg_check_modules(pkgs REQUIRED
        capi-appfw-application
        capi-system-system-settings
        efl-extension
+       capi-appfw-app-control
 )
 
 FIND_LIBRARY(LIB_M m)
index 470a6be..c4d5441 100644 (file)
@@ -17,6 +17,8 @@
 
 #define UNMOUNT_FORCE  1
 
+#define MYFILES_APP_ID "org.tizen.myfile"
+
 typedef enum {
        USE_AS_PORTABLE_STORAGE = 0,
        USE_AS_INTERNAL_STORAGE
index e5f2d94..3405d50 100644 (file)
@@ -1,3 +1,5 @@
+#include <app_control.h>
+
 #include "extended-sd-main.h"
 #include "dbus-call.h"
 #include "log-util.h"
@@ -139,6 +141,22 @@ _move_files_button_click_cb(void *data, Evas_Object* obj, void *event_info)
 {
        FUNC_BEGIN();
 
+       app_control_h app_control = NULL;
+       int ret;
+
+       ret = app_control_create(&app_control);
+       if (ret != APP_CONTROL_ERROR_NONE)
+               return;
+
+       ret = app_control_set_app_id(app_control, MYFILES_APP_ID);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               app_control_destroy(app_control);
+               return;
+       }
+
+       ret = app_control_send_launch_request(app_control, NULL, NULL);
+       app_control_destroy(app_control);
+
        FUNC_END();
 }
 
index 6e9ffdb..41a3141 100644 (file)
@@ -1,3 +1,5 @@
+#include <app_control.h>
+
 #include "extended-sd-main.h"
 #include "dbus-call.h"
 //#include "dbus-macro.h"
@@ -112,6 +114,22 @@ _move_button_click_cb(void *data, Evas_Object* obj, void *event_info)
 {
        FUNC_BEGIN();
 
+       app_control_h app_control = NULL;
+       int ret;
+
+       ret = app_control_create(&app_control);
+       if (ret != APP_CONTROL_ERROR_NONE)
+               return;
+
+       ret = app_control_set_app_id(app_control, MYFILES_APP_ID);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               app_control_destroy(app_control);
+               return;
+       }
+
+       ret = app_control_send_launch_request(app_control, NULL, NULL);
+       app_control_destroy(app_control);
+
        FUNC_END();
 }
 
@@ -391,6 +409,7 @@ static Evas_Object* create_page_3(appdata_s* ad)
        item->it = elm_genlist_item_append(genlist, extended_multiline_genlist_itc, item, NULL, ELM_GENLIST_ITEM_NONE, NULL, item);
        elm_genlist_item_select_mode_set(item->it, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
 
+
        item = (genlist_item_s *)malloc(sizeof(genlist_item_s));
        if (!item) {
                DMSG_ERR("malloc failed");
index b64f8af..8467b30 100644 (file)
@@ -32,6 +32,7 @@ BuildRequires:        pkgconfig(mount)
 BuildRequires: pkgconfig(capi-ui-efl-util)
 BuildRequires: pkgconfig(capi-appfw-application)
 BuildRequires: pkgconfig(capi-appfw-preference)
+BuildRequires: pkgconfig(capi-appfw-app-control)
 BuildRequires: pkgconfig(capi-system-system-settings)
 BuildRequires: pkgconfig(efl-extension)