replace from OnService to OnAppControl 76/35676/2 submit/tizen/20150223.103639
authorJehun Lim <jehun.lim@samsung.com>
Mon, 23 Feb 2015 08:36:15 +0000 (17:36 +0900)
committerJehun Lim <jehun.lim@samsung.com>
Mon, 23 Feb 2015 08:39:10 +0000 (17:39 +0900)
Change-Id: I107ba211c321d70d94cfc79c76bc03df68e08b5d
Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
include/view/gallery-view/gallery_view.h
src/main.cpp
src/view/gallery-view/layout_all.cpp

index 1fbdcb9..81ec0ad 100644 (file)
@@ -26,7 +26,7 @@ struct arg_list {
        int sort;
        int media_type;
 
-       service_h service;
+       app_control_h app_control;
 };
 
 enum user_signals {
index 7d277a4..3ca2a46 100644 (file)
@@ -60,7 +60,7 @@ private:
                Evas_Object *win;
                Evas_Object *lbl;
 
-               bool is_service;
+               bool is_app_control;
 
                struct arg_list *arglist;
        } ad;
@@ -88,7 +88,7 @@ protected:
        {
                if (ad.arglist) {
                        free(ad.arglist->id);
-                       service_destroy(ad.arglist->service);
+                       app_control_destroy(ad.arglist->app_control);
                        free(ad.arglist);
                        ad.arglist = NULL;
                }
@@ -160,7 +160,7 @@ public:
                CViewMgr::GetInstance()->Resume();
        }
 
-       virtual void OnService(service_h service)
+       virtual void OnAppControl(app_control_h app_control)
        {
                char *val;
                char *id = NULL;
@@ -172,18 +172,18 @@ public:
                int media_type = E_MEDIA_IMAGE_VIDEO;
                CViewMgr *vmgr;
 
-               if (ad.is_service) {
+               if (ad.is_app_control) {
                        elm_win_activate(ad.win);
                        CViewMgr::Finalize();
                }
 
-               if (ad.arglist && ad.arglist->service) {
-                       service_destroy(ad.arglist->service);
-                       ad.arglist->service = NULL;
+               if (ad.arglist && ad.arglist->app_control) {
+                       app_control_destroy(ad.arglist->app_control);
+                       ad.arglist->app_control = NULL;
                }
 
-               r = service_get_extra_data(service, PARAM_VIEW, &view);
-               if (r == SERVICE_ERROR_NONE && view) {
+               r = app_control_get_extra_data(app_control, PARAM_VIEW, &view);
+               if (r == APP_CONTROL_ERROR_NONE && view) {
                        if (!strcmp(view, "folder"))
                                view_val = 2;
                        else if (!strcmp(view, "events"))
@@ -194,8 +194,8 @@ public:
                        free(view);
                }
 
-               r = service_get_extra_data(service, PARAM_SOURCE, &val);
-               if (r == SERVICE_ERROR_NONE && val) {
+               r = app_control_get_extra_data(app_control, PARAM_SOURCE, &val);
+               if (r == APP_CONTROL_ERROR_NONE && val) {
                        if (!strcmp(val, "usb"))
                                source = 1;
                        else
@@ -204,8 +204,8 @@ public:
                        free(val);
                }
 
-               r = service_get_extra_data(service, PARAM_SORT, &val);
-               if (r == SERVICE_ERROR_NONE && val) {
+               r = app_control_get_extra_data(app_control, PARAM_SORT, &val);
+               if (r == APP_CONTROL_ERROR_NONE && val) {
                        if (!strcmp(val, "z_a"))
                                sort = 3;
                        else if (!strcmp(val, "a_z"))
@@ -218,15 +218,15 @@ public:
                        free(val);
                }
 
-               r = service_get_extra_data(service, PARAM_ID, &id);
-               if (r != SERVICE_ERROR_NONE || !id)
-                       service_get_extra_data(service, PARAM_URI, &id);
+               r = app_control_get_extra_data(app_control, PARAM_ID, &id);
+               if (r != APP_CONTROL_ERROR_NONE || !id)
+                       app_control_get_extra_data(app_control, PARAM_URI, &id);
 
-               service_get_operation(service, &operation);
+               app_control_get_operation(app_control, &operation);
 
                if (operation && !strcasecmp(
-                               operation, SERVICE_OPERATION_PICK)) {
-                       service_get_mime(service, &mime);
+                               operation, APP_CONTROL_OPERATION_PICK)) {
+                       app_control_get_mime(app_control, &mime);
 
                        if (mime) {
                                if (!strcmp(mime, MIME_IMAGE))
@@ -245,9 +245,9 @@ public:
                        elm_exit();
                }
 
-               if (service_clone(&ad.arglist->service, service)
-                                       != SERVICE_ERROR_NONE) {
-                       _ERR("Service clone error");
+               if (app_control_clone(&ad.arglist->app_control, app_control)
+                                       != APP_CONTROL_ERROR_NONE) {
+                       _ERR("app_control clone error");
                        elm_exit();
                }
 
@@ -287,7 +287,7 @@ public:
                        elm_exit();
                }
 
-               ad.is_service = 1;
+               ad.is_app_control = 1;
 
                return;
        }
index bdf9df6..87f772c 100644 (file)
@@ -188,33 +188,33 @@ Elm_Gengrid_Item_Class *CAllLayout::m_GetItemclass(int type)
 
 void CAllLayout::m_SendResultToApp(const char *filepath)
 {
-       service_h reply = NULL;
-       service_h service;
-       int service_ret = -1;
+       app_control_h reply;
+       app_control_h app_control;
+       int ret = -1;
 
        if (!filepath)
                return;
 
-       if (service_create(&reply) != SERVICE_ERROR_NONE) {
-               _ERR("service_create failed");
+       if (app_control_create(&reply) != APP_CONTROL_ERROR_NONE) {
+               _ERR("app_control create failed");
                return;
        }
 
-       service = m->arglist->service;
+       app_control = m->arglist->app_control;
 
-       service_add_extra_data(reply, SERVICE_DATA_SELECTED, filepath);
+       app_control_add_extra_data(reply, APP_CONTROL_DATA_SELECTED, filepath);
        if (!reply)
                return;
 
-       service_ret = service_reply_to_launch_request(reply, service,
-               SERVICE_RESULT_SUCCEEDED);
-       if (service_ret != SERVICE_ERROR_NONE) {
-               _ERR("service_reply_to_launch_request failed");
-               service_reply_to_launch_request(reply, service,
-                       SERVICE_RESULT_CANCELED);
+       ret = app_control_reply_to_launch_request(reply, app_control,
+               APP_CONTROL_RESULT_SUCCEEDED);
+       if (ret != APP_CONTROL_ERROR_NONE) {
+               _ERR("app_control_reply_to_launch_request failed");
+               app_control_reply_to_launch_request(reply, app_control,
+                       APP_CONTROL_RESULT_CANCELED);
        }
 
-       service_destroy(reply);
+       app_control_destroy(reply);
        elm_exit();
 }