removed legacy API by replacing CAPI
authorMyoungJune Park <mj2004.park@samsung.com>
Mon, 10 Sep 2012 08:56:24 +0000 (17:56 +0900)
committerMyoungJune Park <mj2004.park@samsung.com>
Mon, 10 Sep 2012 08:56:24 +0000 (17:56 +0900)
20 files changed:
include/setting-debug.h
packaging/settings.spec
setting-about/CMakeLists.txt
setting-about/src/setting-about-main.c
setting-common/include/setting-common-general-func.h
setting-common/src/setting-common-general-func.c
setting-display/src/setting-display.c
setting-font/src/setting-font.c
setting-menuscreen/src/setting-menuscreen.c
setting-password/src/setting-password.c
setting-phone/src/setting-phone.c
setting-powersaving/src/setting-powersaving.c
setting-profile/CMakeLists.txt
setting-profile/src/setting-profile-sound-main.c
setting-profile/src/setting-profile.c
setting-time/src/setting-time-main.c
setting-time/src/setting-time.c
src/plugin-resource/test_server.c
src/setting-main.c
src/setting.c

index 372e6c5..fa980d3 100755 (executable)
@@ -84,7 +84,7 @@
 
 /*#endif*/
 
-#define SUPPORT_APP_ROATION                    0
+#define SUPPORT_APP_ROATION                    1
 #define SUPPORT_LCD_TIMEOUT_KEEPING            0
 #define USE_DEVICE_SET_DISPLAY_BRT             1
 
index 80be6be..1ab030f 100755 (executable)
@@ -57,8 +57,10 @@ BuildRequires:  pkgconfig(capi-system-device)
 BuildRequires:  pkgconfig(capi-appfw-application)
 BuildRequires:  pkgconfig(capi-appfw-app-manager)
 BuildRequires:  pkgconfig(capi-system-sensor)
+BuildRequires:  pkgconfig(capi-system-haptic)
 BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(capi-system-system-settings)
+BuildRequires:  pkgconfig(capi-network-bluetooth)
 BuildRequires:  sysman-internal-devel
 BuildRequires:  cmake
 BuildRequires:  edje-tools
index 6fe2611..9254e18 100755 (executable)
@@ -8,7 +8,7 @@ pkg_check_modules(pkgs_about REQUIRED
        elementary appcore-common appcore-efl
        ui-gadget-1
        capi-appfw-application capi-appfw-app-manager evas ecore
-       tapi bluetooth-api json-glib-1.0 capi-system-info)
+       tapi bluetooth-api json-glib-1.0 capi-system-info capi-system-system-settings capi-network-bluetooth)
 
 FOREACH(flag ${pkgs_about_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index 75f37d6..e4b86ba 100755 (executable)
@@ -24,7 +24,9 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <bluetooth-api.h>
+//#include <bluetooth-api.h>
+
+#include <bluetooth.h>
 
 
 #include <app_manager.h>
@@ -315,26 +317,32 @@ void setting_about_main_get_bluetooth_address_string(char *str, int size)
 {
        setting_retm_if(str == NULL, "str parameter is NULL");
 
-       bluetooth_device_address_t local_address;
-       memset(&local_address, 0x0, sizeof(local_address));
+       //bluetooth_device_address_t local_address;
+       //memset(&local_address, 0x0, sizeof(local_address));
        int ret = 0;
 
        /* for fixing BS of dbus signal */
-       bluetooth_register_callback(NULL, NULL);
-
-       ret = bluetooth_get_local_address(&local_address);
+       //bluetooth_register_callback(NULL, NULL);
+       //ret = bluetooth_get_local_address(&local_address);
+       char local_address[1024];
+       memset(local_address, 0x0, 1024);
+       ret = bt_adapter_get_address(&local_address);
 
        /* for fixing BS of dbus signal */
        bluetooth_unregister_callback();
 
        if (ret < 0) {
                snprintf(str, size, "%s", _("IDS_ST_HEADER_UNAVAILABLE"));
+               SETTING_TRACE_DEBUG("bt address : %s", str);
        } else {
+               /*
                snprintf(str, size, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
                         local_address.addr[0], local_address.addr[1], local_address.addr[2],
                         local_address.addr[3], local_address.addr[4], local_address.addr[5]);
+               */
+               SETTING_TRACE_DEBUG("bt address : %s", local_address);
+               snprintf(str, size, "%s", local_address);
        }
-       SETTING_TRACE_DEBUG("bt address : %s", str);
 }
 
 int __stat_get_cpuinfo(float *usr_pct, float *sys_pct)
index bbc08bc..ed24f8f 100755 (executable)
@@ -106,4 +106,6 @@ extern char *cur_font_get();
 extern void font_config_set(char *font_name);
 extern void font_size_set();
 
+extern int setting_set_i18n(char* pkgname, char* localedir);
+
 #endif                         /* __SETTING_COMMON_GENERAL_FUNC_H__ */
index 1d9ec67..e76c7ca 100755 (executable)
@@ -452,12 +452,12 @@ char *remove_first_substring(const char *parent, const char *pat)
        setting_retvm_if(!parent, NULL, "NULL == parent, Exit %s with return NULL", __FUNCTION__);
        char *str = strdup(parent); //to process the case parent pointing to const string
        setting_retvm_if(!pat, str, "NULL == pat, Exit %s with return [%s]", __FUNCTION__, str);
-       
+
        int idx = 0;
        int str_len = safeStrLen(str);
        int pat_len = safeStrLen(pat);
-       setting_retvm_if(pat_len > str_len, str, 
-                        "patlen[%d] > strlen[%d], Exit %s with return [%s]", 
+       setting_retvm_if(pat_len > str_len, str,
+                        "patlen[%d] > strlen[%d], Exit %s with return [%s]",
                         pat_len, str_len, __FUNCTION__, str);
        char *p = NULL;
        char *q = NULL;
@@ -695,7 +695,7 @@ int setting_invoke_reset_function(char *ug_name, service_h service, void *ext)
        char ug_file[PATH_MAX + 1];
        snprintf(ug_file, PATH_MAX, "%s/libug-%s.so", SETTING_UG_PATH, ug_name);
        struct stat st;
-       if(stat(ug_file, &st) != 0) { 
+       if(stat(ug_file, &st) != 0) {
 
                //2.if it does not exit in /opt/ug/lib, then do exist-checking in /usr/ug/lib
                memset(ug_file, 0x00, PATH_MAX + 1);
@@ -1340,3 +1340,89 @@ void font_size_set()
        text_classes = NULL;
        G_FREE(font_name);
 }
+
+static int _set;
+
+void update_lang(void)
+{
+    char *lang;
+    char *r;
+
+    lang = vconf_get_str(VCONFKEY_LANGSET);
+    if (lang) {
+        setenv("LANG", lang, 1);
+        setenv("LC_MESSAGES", lang, 1);
+        r = setlocale(LC_ALL, "");
+        if (r == NULL) {
+            r = setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET));
+            //_DBG("*****appcore setlocale=%s\n", r);
+        }
+        free(lang);
+    }
+}
+
+void update_region(void)
+{
+    char *region;
+
+    region = vconf_get_str(VCONFKEY_REGIONFORMAT);
+    if (region) {
+        setenv("LC_CTYPE", region, 1);
+        setenv("LC_NUMERIC", region, 1);
+        setenv("LC_TIME", region, 1);
+        setenv("LC_COLLATE", region, 1);
+        setenv("LC_MONETARY", region, 1);
+        setenv("LC_PAPER", region, 1);
+        setenv("LC_NAME", region, 1);
+        setenv("LC_ADDRESS", region, 1);
+        setenv("LC_TELEPHONE", region, 1);
+        setenv("LC_MEASUREMENT", region, 1);
+        setenv("LC_IDENTIFICATION", region, 1);
+        free(region);
+    }
+}
+
+static int __set_i18n(const char *domain, const char *dir)
+{
+    char *r;
+
+    if (domain == NULL) {
+        errno = EINVAL;
+        return -1;
+    }
+
+    r = setlocale(LC_ALL, "");
+    /* if locale is not set properly, try again to set as language base */
+    if (r == NULL) {
+        r = setlocale(LC_ALL, vconf_get_str(VCONFKEY_LANGSET));
+        //_DBG("*****appcore setlocale=%s\n", r);
+    }
+    //_retvm_if(r == NULL, -1, "appcore: setlocale() error");
+
+    r = bindtextdomain(domain, dir);
+    //_retvm_if(r == NULL, -1, "appcore: bindtextdomain() error");
+
+    r = textdomain(domain);
+    //_retvm_if(r == NULL, -1, "appcore: textdomain() error");
+
+    return 0;
+}
+
+
+
+int setting_set_i18n(char* pkgname, char* localedir)
+//int set_i18n(const char *domainname, const char *dirname)
+{
+#if 0
+       return appcore_set_i18n(pkgname, localedir);
+#else
+       if (_set)       return 0;
+    //_retv_if(_set, 0);
+
+    update_lang();
+    update_region();
+
+    return __set_i18n(pkgname, localedir);
+#endif
+}
+
index cf3d46a..c3a82f9 100755 (executable)
@@ -103,7 +103,7 @@ static void *setting_display_ug_on_create(ui_gadget_h ug,
 
        SettingDisplayUG *displayUG = priv;
        displayUG->ug = ug;
-       appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
 
        displayUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug);
        displayUG->win_get = (Evas_Object *) ug_get_window();
index 231834d..f13ddc5 100755 (executable)
@@ -69,7 +69,7 @@ static void *setting_font_ug_on_create(ui_gadget_h ug, enum ug_mode mode,
        setting_retvm_if((!priv), NULL, "!priv");
        SettingFontUG *fontUG = priv;
 
-       appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
 
        fontUG->ug = ug;
        fontUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug);
index 5e45758..cdc0e49 100755 (executable)
@@ -56,7 +56,7 @@ static void *setting_menuscreen_ug_on_create(ui_gadget_h ug,
        SettingMenuscreenUG *menuscreenUG = priv;
        menuscreenUG->ug = ug;
 
-       appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
 
        menuscreenUG->win_main_layout = (Evas_Object *) ug_get_parent_layout(ug);
        menuscreenUG->win_get = (Evas_Object *) ug_get_window();
index f9efb9e..41526db 100755 (executable)
@@ -405,7 +405,7 @@ static void *setting_password_ug_on_create(ui_gadget_h ug,
                return NULL;
        }
        /* set launguage */
-       appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
        FREE(pa_path);
 
        setting_create_Gendial_itc("dialogue/title", &(passwordUG->itc_title));
index 1d136cb..f0e0430 100755 (executable)
@@ -374,7 +374,7 @@ static void *setting_phone_ug_on_create(ui_gadget_h ug, enum ug_mode mode,
                return NULL;
        }
        /* set launguage */
-       appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
        FREE(pa_path);
        /* ---------------------------------------------------------     */
        int value = 0;
index 5698b84..355bd66 100755 (executable)
@@ -42,7 +42,7 @@ static void *setting_powersaving_ug_on_create(ui_gadget_h ug,
 
        SettingPowersavingUG *powersavingUG = priv;
        powersavingUG->ug = ug;
-       appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
 
        powersavingUG->win_main_layout =
            (Evas_Object *) ug_get_parent_layout(ug);
index b494354..92385be 100755 (executable)
@@ -3,7 +3,7 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/${SETTING_COMMON}/include)
 
 
 INCLUDE(FindPkgConfig)
-pkg_check_modules(pkgs_profile REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl devman_haptic ui-gadget-1 capi-appfw-application vconf capi-media-player capi-media-sound-manager dlog svi)
+pkg_check_modules(pkgs_profile REQUIRED ecore ecore-file evas elementary appcore-common appcore-efl devman_haptic ui-gadget-1 capi-appfw-application vconf capi-media-player capi-media-sound-manager dlog svi devman capi-system-device capi-system-haptic)
 
 FOREACH(flag ${pkgs_profile_CFLAGS})
        SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
index b0c881a..5297b04 100755 (executable)
@@ -866,7 +866,7 @@ static Evas_Object *__get_ringtone_list(void *data)
 
 static void __view_change_cb(void *data, Evas_Object *obj, void *event_info)
 {
-       appcore_measure_start();
+       //appcore_measure_start();
        retm_if(event_info == NULL, "Invalid argmuent: event info is NULL");
        retm_if(data == NULL, "Invalid argmuent: data is NULL");
 
index 61713f9..61fba99 100755 (executable)
  */
 
 #include <setting-profile.h>
-#include <devman_haptic.h>
+//#include <devman_haptic.h>
+#include <device.h>
+#include <haptic.h>
 
 #ifndef UG_MODULE_API
 #define UG_MODULE_API __attribute__ ((visibility("default")))
 #endif
 
+#define MIGRATION_HAPTIC 0
+
 SettingProfileUG *g_ProfileUG = NULL;  /*  just a handler */
 
 static void setting_profile_ug_cb_resize(void *data, Evas *e,
@@ -100,7 +104,7 @@ static char* __gl_sound_slider_text_get(void *data, Evas_Object *obj, const char
 }
 static Evas_Object* __gl_sound_slider_content_get(void *data, Evas_Object *obj, const char *part)
 {
-       appcore_measure_start();
+       //appcore_measure_start();
        retv_if(data == NULL, NULL);
        Setting_GenGroupItem_Data *item_data = (Setting_GenGroupItem_Data*)data;
 
@@ -191,9 +195,13 @@ static void setting_profile_vconf_change_cb(keynode_t *key, void *data)
                                /*  close mm plaer */
                                setting_profile_close_all_mm_players(ad);
                                /*  close vibration */
+
+
+                       #if MIGRATION_HAPTIC
                                if (device_haptic_stop_play(ad->hnd_hpt) != 0) {
                                        SETTING_TRACE("ERROR device_haptic_stop_play");
                                }
+                       #endif
                        }
                }
        }
@@ -274,7 +282,7 @@ static void *setting_profile_ug_on_create(ui_gadget_h ug,
                                          enum ug_mode mode, service_h service,
                                          void *priv)
 {
-       appcore_measure_start();
+       //appcore_measure_start();
        retv_if(priv == NULL, NULL);
 
        SettingProfileUG *profileUG = priv;
@@ -292,7 +300,7 @@ static void *setting_profile_ug_on_create(ui_gadget_h ug,
        //At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA
        sound_manager_set_volume_changed_cb(__sound_volume_changed_cb, profileUG);
 
-       appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
 
        /* register view node table */
        setting_view_node_table_intialize();
@@ -413,9 +421,9 @@ static void setting_profile_ug_on_destroy(ui_gadget_h ug, service_h service, voi
        //At present, there are only 4 types supported:RINGTONE,NOTIFICATION,SYSTEM,MEDIA
        sound_manager_unset_volume_changed_cb();
 
-       int ret = device_haptic_close(profileUG->hnd_hpt);
+       int ret = haptic_deinitialize();
        if (ret != 0) {
-               SETTING_TRACE_DEBUG("%s*** [ERR] Failed device_haptic_close ***%s",
+               SETTING_TRACE_DEBUG("%s*** [ERR] Failed haptic_deinitialize ***%s",
                                                SETTING_FONT_RED, SETTING_FONT_BLACK);
        }
        setting_profile_close_all_mm_players(profileUG);
@@ -478,9 +486,11 @@ static void setting_profile_ug_on_key_event(ui_gadget_h ug,
                                        /* close mm plaer */
                                        setting_profile_close_all_mm_players(ad);
                                        /* close vibration */
+                               #if MIGRATION_HAPTIC
                                        if (device_haptic_stop_play(ad->hnd_hpt) != 0) {
                                                SETTING_TRACE("ERROR device_haptic_stop_play");
                                        }
+                               #endif
                                }
                                setting_view_cb_at_endKey(ad);
                        }
@@ -492,7 +502,7 @@ static void setting_profile_ug_on_key_event(ui_gadget_h ug,
 
 UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
 {
-       appcore_measure_start();
+       //appcore_measure_start();
        SettingProfileUG *profileUG = calloc(1, sizeof(SettingProfileUG));
        setting_retvm_if(!profileUG, -1, "Create SettingProfileUG obj failed");
 
@@ -507,10 +517,10 @@ UG_MODULE_API int UG_MODULE_INIT(struct ug_module_ops *ops)
        ops->priv = profileUG;
        ops->opt = UG_OPT_INDICATOR_ENABLE;
        /* Haptic init */
-       profileUG->hnd_hpt = device_haptic_open(DEV_IDX_0, 0);
+       profileUG->hnd_hpt = haptic_initialize();
 
        if (profileUG->hnd_hpt < 0) {
-               SETTING_TRACE_DEBUG("%s*** [ERR] Failed device_haptic_open ***%s",
+               SETTING_TRACE_DEBUG("%s*** [ERR] Failed haptic_initialize ***%s",
                                                SETTING_FONT_RED, SETTING_FONT_BLACK);
                return SETTING_RETURN_FAIL;
        }
@@ -899,9 +909,11 @@ void setting_profile_play_vibration(void *data, int value)
        char pattern_file[MAX_COMMON_BUFFER_LEN] = {0,};
        svi_get_path(SVI_TYPE_VIB, value, pattern_file, sizeof(pattern_file));
 
+#if MIGRATION_HAPTIC
        if(device_haptic_play_file(ad->hnd_hpt, pattern_file, 1, HAPTIC_FEEDBACK_LEVEL_AUTO) != 0){
                SETTING_TRACE("ERROR device_haptic_play_pattern");
        }
+#endif
 }
 
 int setting_profile_get_call_playing_vib_by_vconf_value(int call_vib_value)
index fec3b10..7ffd8a8 100755 (executable)
@@ -569,7 +569,7 @@ static int setting_time_main_create(void *cb)
                                                 ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
        }
 
-       appcore_set_i18n("worldclock", SETTING_TIME_SHARE_LOCAL_PATH);
+       setting_set_i18n("worldclock", SETTING_TIME_SHARE_LOCAL_PATH);
 
        char time_zone_sub_str[CITY_BUF_SIZE + GMT_BUF_SIZE + 3] = { 0, };
        char *pa_timezone = NULL;
index 3be93f5..b9d3bae 100755 (executable)
@@ -86,7 +86,7 @@ static void *setting_time_ug_on_create(ui_gadget_h ug, enum ug_mode mode,
        }
 
        /* set launguage */
-       appcore_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
+       setting_set_i18n(SETTING_PACKAGE, SETTING_LOCALEDIR);
 
        /* register view node table */
        setting_view_node_table_intialize();
index dc99030..6357d16 100755 (executable)
@@ -298,6 +298,7 @@ static void _window_resize_cb(void *data, Evas * e, Evas_Object * obj, void *eve
     evas_object_geometry_get(ad->win_main, NULL, NULL, &ad->root_w, &ad->root_h);
 }
 
+#if 0
 static int _rotation_cb(enum appcore_rm mode, void *data)
 {
     struct appdata *ad = (struct appdata *)data;
@@ -331,6 +332,7 @@ static int _rotation_cb(enum appcore_rm mode, void *data)
 
     return 0;
 }
+#endif
 
 int app_create(void *data)
 {
@@ -344,7 +346,7 @@ int app_create(void *data)
     evas_object_event_callback_add(ad->win_main, EVAS_CALLBACK_RESIZE, _window_resize_cb, ad);
     evas_object_show(ad->win_main);
     ad->evas = evas_object_evas_get(ad->win_main);
-    appcore_set_rotation_cb(_rotation_cb, ad);
+//    appcore_set_rotation_cb(_rotation_cb, ad);
 
     // set_edj_name(NULL);
 
index a05298d..827d08e 100755 (executable)
@@ -1799,7 +1799,8 @@ static int setting_main_create(void *cb)
        setting_create_Gendial_itc("dialogue/2text.3", &(ad->itc[GENDIAL_Type_2text_3]));
 
        ad->view_type = SETTING_VIEW_MAIN;
-       __setting_create_main_view(ad);
+       bool ret = __setting_create_main_view(ad);
+       SETTING_TRACE(" >>>> ret = %d ", ret);
        setting_view_main.is_create = 1;
 
        return SETTING_RETURN_SUCCESS;
index 7f1e7ad..cf70ecd 100755 (executable)
@@ -19,6 +19,8 @@
  *
  */
 #include <setting.h>
+#include <app.h>
+
 #include <appcore-common.h>
 #include <heynoti.h>
 #include <Ecore_X.h>
@@ -198,15 +200,13 @@ static int setting_main_keydown_cb(void *data, int type, void *event)
 /**
 * The event process when battery becomes low.
 */
-static int setting_main_low_battery_cb(void *data)
+static void setting_main_low_battery_cb(void *data)
 {
        SETTING_TRACE_BEGIN;
        setting_main_appdata *ad = data;
 
        if (ad->ug)
                ug_send_event(UG_EVENT_LOW_BATTERY);
-
-       return 0;
 }
 #endif
 
@@ -215,7 +215,7 @@ static int setting_main_low_battery_cb(void *data)
 /**
 * To active rotation effect in Setting App
 */
-static int setting_main_rotate(enum appcore_rm m, void *data)
+static void setting_main_rotate(enum appcore_rm m, void *data)
 {
        SETTING_TRACE_BEGIN;
        setting_main_appdata *ad = data;
@@ -224,6 +224,7 @@ static int setting_main_rotate(enum appcore_rm m, void *data)
        if (ad == NULL || ad->win_main == NULL)
                return 0;
 
+#if 0
        switch (m) {
        case APPCORE_RM_PORTRAIT_NORMAL:
                r = 0;
@@ -241,25 +242,21 @@ static int setting_main_rotate(enum appcore_rm m, void *data)
                r = -1;
                break;
        }
-
+#endif
        if (r >= 0)
                elm_win_rotation_with_resize_set(ad->win_main, r);
-
-       return 0;
 }
 #endif
 
 /**
 * The event process when region is changes.
 */
-static int setting_main_region_changed_cb(void *data)
+static void setting_main_region_changed_cb(void *data)
 {
        setting_main_appdata *ad = data;
 
        if (ad->ug)
                ug_send_event(UG_EVENT_REGION_CHANGE);
-
-       return 0;
 }
 
 /**
@@ -296,7 +293,7 @@ static Evas_Object *setting_main_create_win(const char *name)
 /**
 * exceptional process, reset the env vars by Setting vconf VCONFKEY_LANGSET
 */
-static int setting_main_lang_changed_cb(void *data)
+static void setting_main_lang_changed_cb(void *data)
 {
        SETTING_TRACE_BEGIN;
        setting_main_appdata *ad = data;
@@ -397,8 +394,6 @@ static int setting_main_lang_changed_cb(void *data)
 
        if (ad->ug)
                ug_send_event(UG_EVENT_LANG_CHANGE);
-
-       return SETTING_RETURN_SUCCESS;
 }
 
 /**
@@ -625,19 +620,16 @@ static Eina_Bool setting_on_idle_lazy(void *data)
                SETTING_TRACE_ERROR("sensor_start fail");
        }
 
-       appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE,
-                                  setting_main_lang_changed_cb, ad);
+//     appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE, setting_main_lang_changed_cb, ad);
 
 #if LOW_BATTERY_DO_NOTHING
-       appcore_set_event_callback(APPCORE_EVENT_LOW_BATTERY,
-                                  setting_main_low_battery_cb, ad);
+//     appcore_set_event_callback(APPCORE_EVENT_LOW_BATTERY, setting_main_low_battery_cb, ad);
 #endif
 
-       appcore_set_event_callback(APPCORE_EVENT_REGION_CHANGE,
-                                  setting_main_region_changed_cb, ad);
+//     appcore_set_event_callback(APPCORE_EVENT_REGION_CHANGE, setting_main_region_changed_cb, ad);
 
 #if SUPPORT_APP_ROATION
-       appcore_set_rotation_cb(setting_main_rotate, ad);
+//     appcore_set_rotation_cb(setting_main_rotate, ad);
        evas_object_geometry_get(ad->win_main, &g_geometry_x, &g_geometry_y, &g_geometry_w, &g_geometry_h);
 #endif
 
@@ -651,8 +643,8 @@ static int setting_main_app_create(void *data)
 {
        SETTING_TRACE_BEGIN;
        //fprintf(stderr, "[TIME] 3. it taked %d msec from main to setting_main_app_create \n", appcore_measure_time());
-       SETTING_TRACE("[TIME] 3. it taked %d msec from main to setting_main_app_create ", appcore_measure_time());
-       appcore_measure_start();
+       //SETTING_TRACE("[TIME] 3. it taked %d msec from main to setting_main_app_create ", appcore_measure_time());
+       //appcore_measure_start();
        setting_main_appdata *ad = data;
 
        ad->data_roaming_popup = NULL;
@@ -740,16 +732,16 @@ static int setting_main_app_create(void *data)
                return SETTING_RETURN_FAIL;
        }
        //fprintf(stderr, "[TIME] 4. setting_main_app_create taked %d msec \n", appcore_measure_time());
-       SETTING_TRACE("[TIME] 4. setting_main_app_create taked %d msec ", appcore_measure_time());
-       appcore_measure_start();
+       //SETTING_TRACE("[TIME] 4. setting_main_app_create taked %d msec ", appcore_measure_time());
+       //appcore_measure_start();
 
-       return 0;
+       return true;
 }
 
 /**
 * The function is called when Setting is terminated
 */
-static int setting_main_app_terminate(void *data)
+static void setting_main_app_terminate(void *data)
 {
        SETTING_TRACE_BEGIN;
        setting_main_appdata *ad = data;
@@ -792,7 +784,7 @@ static int setting_main_app_terminate(void *data)
 /**
 * The function is called when Setting begins run in background from forground
 */
-static int setting_main_app_pause(void *data)
+static void setting_main_app_pause(void *data)
 {
        SETTING_TRACE_BEGIN;
        setting_main_appdata *ad = data;
@@ -809,14 +801,12 @@ static int setting_main_app_pause(void *data)
 #endif
 
        sensor_stop(ad->sf_handle, SENSOR_MOTION_DOUBLETAP);
-
-       return 0;
 }
 
 /**
 * The function is called when Setting begins run in forground from background
 */
-static int setting_main_app_resume(void *data)
+static void setting_main_app_resume(void *data)
 {
        SETTING_TRACE_BEGIN;
        setting_main_appdata *ad = data;
@@ -839,8 +829,6 @@ static int setting_main_app_resume(void *data)
                SETTING_TRACE("update main genlist in resuming app without UG");
                setting_update_gl_item(ad);     // update genlist sub-texts
        }
-
-       return 0;
 }
 
 /**
@@ -921,11 +909,11 @@ static int setting_main_app_reset(service_h service, void *data)
        ecore_idler_add(setting_on_idle_lazy, ad);
 
        //fprintf(stderr, "[TIME] 5. app_create -> app_resume (first display) : %d msec\n", appcore_measure_time());
-       SETTING_TRACE("[TIME] 5. app_create -> app_resume (first display) : %d msec", appcore_measure_time());
+       //SETTING_TRACE("[TIME] 5. app_create -> app_resume (first display) : %d msec", appcore_measure_time());
        //fprintf(stderr, "[TIME] Total. aul_launch -> app_resume (first display) : %d msec\n", appcore_measure_time_from("APP_START_TIME"));
-       SETTING_TRACE("[TIME] Total. aul_launch -> app_resume (first display) : %d msec", appcore_measure_time_from("APP_START_TIME"));
+       //SETTING_TRACE("[TIME] Total. aul_launch -> app_resume (first display) : %d msec", appcore_measure_time_from("APP_START_TIME"));
 
-       return 0;
+       //return 0;
 }
 
 int main(int argc, char *argv[])
@@ -940,24 +928,28 @@ int main(int argc, char *argv[])
 #endif
 
        //fprintf(stderr, "[TIME] 1. aul_launch -> main :: Setting main : %d msec \n", appcore_measure_time_from("APP_START_TIME"));
-       SETTING_TRACE("[TIME] 1. aul_launch -> main :: Setting main : %d msec ", appcore_measure_time_from("APP_START_TIME"));
-       appcore_measure_start();
+       //SETTING_TRACE("[TIME] 1. aul_launch -> main :: Setting main : %d msec ", appcore_measure_time_from("APP_START_TIME"));
+       //appcore_measure_start();
 
-       struct appcore_ops ops = {
+       app_event_callback_s ops = {
                .create = setting_main_app_create,
                .terminate = setting_main_app_terminate,
                .pause = setting_main_app_pause,
                .resume = setting_main_app_resume,
-               .reset = setting_main_app_reset,
+               .service = setting_main_app_reset,
+               .low_battery = setting_main_low_battery_cb,
+               .language_changed = setting_main_lang_changed_cb,
+               .region_format_changed = setting_main_region_changed_cb,
+               .device_orientation = setting_main_rotate,
        };
 
        memset(&ad, 0x0, sizeof(setting_main_appdata));
-       ops.data = &ad;
+       //ops.data = &ad;
 
        //fprintf(stderr, "[TIME] 2. main : %d msec \n", appcore_measure_time());
-       SETTING_TRACE("[TIME] 2. main : %d msec ", appcore_measure_time());
-       appcore_measure_start();
-       r = appcore_efl_main(SETTING_PACKAGE, &argc, &argv, &ops);
+       //SETTING_TRACE("[TIME] 2. main : %d msec ", appcore_measure_time());
+       //appcore_measure_start();
+       r = app_efl_main(&argc, &argv, &ops, &ad);
        retv_if(r == -1, -1);
 
        return 0;