summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuWan Kim <juwan.kim@samsung.com>2015-02-25 16:15:30 +0900
committerJuWan Kim <juwan.kim@samsung.com>2015-02-25 16:15:30 +0900
commit0ddd16091b92905b880fb69748becda0456647a2 (patch)
treee5f6283bc168f69f3055b07cd8881ed67cfaf52f /src
parentd24a98a6a94e7cec6e3f2181e3ef0d5708116383 (diff)
downloadsettings-0ddd16091b92905b880fb69748becda0456647a2.tar.gz
settings-0ddd16091b92905b880fb69748becda0456647a2.tar.bz2
settings-0ddd16091b92905b880fb69748becda0456647a2.zip
Change-Id: Id2a4e71ae7c62360d1edda777814fff30de485e9 Signed-off-by: JuWan Kim <juwan.kim@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/main.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/main.c b/src/main.c
index 794438b..b2868fa 100644
--- a/src/main.c
+++ b/src/main.c
@@ -18,7 +18,6 @@
#include <Elementary.h>
#include <Ecore_X.h>
#include <utilX.h>
-#include <dlog.h>
#include <ui-gadget.h>
#include "dbg.h"
#include "def.h"
@@ -35,7 +34,7 @@ struct _appdata {
struct setting_mgr *mgr;
const char *name;
char *item;
- unsigned int service;
+ unsigned int app_control;
};
/**
@@ -129,7 +128,7 @@ static bool _create(void *data)
}
ad->win = win;
- ad->service = 0;
+ ad->app_control = 0;
return true;
}
@@ -199,9 +198,9 @@ static void _resume(void *data)
* @param data [in] The function specific data passed by app_efl_main.
* @return void.
*/
-static void _service(service_h service, void *data)
+static void _app_control(app_control_h app_control, void *data)
{
- _DBG("############################# START _service #############################");
+ _DBG("############################# START _app_control #############################");
struct _appdata *ad;
struct setting_mgr *mgr;
int r;
@@ -214,8 +213,8 @@ static void _service(service_h service, void *data)
ad = data;
param = NULL;
- if (ad->service) {
- service_get_extra_data(service, PARAM_SETTINGS_ITEM, &param);
+ if (ad->app_control) {
+ app_control_get_extra_data(app_control, PARAM_SETTINGS_ITEM, &param);
if ((!param && !ad->item) ||
(param && ad->item &&
!strcmp(ad->item, param))) {
@@ -240,8 +239,8 @@ static void _service(service_h service, void *data)
if (!mgr)
app_efl_exit();
- r = service_get_extra_data(service, PARAM_SETTINGS_ITEM, &param);
- if (r == SERVICE_ERROR_NONE && param) {
+ r = app_control_get_extra_data(app_control, PARAM_SETTINGS_ITEM, &param);
+ if (r == APP_CONTROL_ERROR_NONE && param) {
r = settingmgr_launch_item(mgr, param);
if (r != 0) {
_ERR("the item is not exist.");
@@ -252,11 +251,11 @@ static void _service(service_h service, void *data)
}
ad->mgr = mgr;
- ad->service = 1;
+ ad->app_control = 1;
free(ad->item);
ad->item = param;
- _DBG("############################# END _service #############################");
+ _DBG("############################# END _app_control #############################");
}
/**
@@ -305,17 +304,12 @@ static void _region_changed(void *data)
int main(int argc, char **argv)
{
struct _appdata ad;
- app_event_callback_s cbs = {
+ ui_app_lifecycle_callback_s cbs = {
.create = _create,
.terminate = _terminate,
.pause = _pause,
.resume = _resume,
- .service = _service,
- .low_memory = NULL,
- .low_battery = NULL,
- .device_orientation = NULL,
- .language_changed = _lang_changed,
- .region_format_changed = _region_changed,
+ .app_control = _app_control,
};
memset(&ad, 0x00, sizeof(ad));
@@ -323,7 +317,11 @@ int main(int argc, char **argv)
i18n_init();
- app_efl_main(&argc, &argv, &cbs, &ad);
+ /* TODO : _lang_changed, _region_changed callback will be registerd
+ * Use BaseApp in application-common.
+ */
+
+ ui_app_main(argc, argv, &cbs, &ad);
return 0;
}