summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-04-03 17:25:38 +0100
committerTom Hacohen <tom@stosb.com>2014-04-10 03:49:51 +0100
commit9794de08dbd636959393193257e1c01b3ee517f9 (patch)
treed15dd747be472b913da9f5541f862fd0ed743884
parentf61829a55ec0ab9434e52b1cb5eb0a0ab546e58d (diff)
downloadelementary-9794de08dbd636959393193257e1c01b3ee517f9.tar.gz
test application server: Adjusted to Eo2.
-rw-r--r--src/bin/test_application_server.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bin/test_application_server.c b/src/bin/test_application_server.c
index ecf309b97..05bffda29 100644
--- a/src/bin/test_application_server.c
+++ b/src/bin/test_application_server.c
@@ -90,7 +90,7 @@ static Elm_App_Server_View *
_create_view_cb(Elm_App_Server *app_server, const Eina_Value *args EINA_UNUSED, Eina_Stringshare **error_name, Eina_Stringshare **error_message EINA_UNUSED)
{
Elm_App_Server_View *view;
- const char *id, *pkg;
+ const char *id = NULL, *pkg = NULL;
App_View_Context *ctx;
ctx = calloc(1, sizeof(App_View_Context));
@@ -103,8 +103,8 @@ _create_view_cb(Elm_App_Server *app_server, const Eina_Value *args EINA_UNUSED,
view = eo_add_custom(ELM_APP_SERVER_VIEW_CLASS, app_server,
elm_app_server_view_constructor(NULL));
- eo_do(view, elm_app_server_view_id_get(&id));
- eo_do(app_server, elm_app_server_package_get(&pkg));
+ eo_do(view, id = elm_app_server_view_id_get());
+ eo_do(app_server, pkg = elm_app_server_package_get());
ctx->view_name = eina_stringshare_printf("%s %s", pkg, id);
_window_create(ctx);
@@ -124,11 +124,11 @@ _create_view_cb(Elm_App_Server *app_server, const Eina_Value *args EINA_UNUSED,
static Eina_Bool
_terminate_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
{
- const char *title;
+ const char *title = NULL;
printf("terminate cb\n");
eo_do(obj, elm_app_server_save(),
- elm_app_server_title_get(&title));
+ title = elm_app_server_title_get());
printf("Closing: %s\n", title);
eo_unref(obj);
@@ -138,25 +138,25 @@ _terminate_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc
Elm_App_Server *
test_application_server_common(const char *pkg)
{
- Eina_Iterator *views_iter;
+ Eina_Iterator *views_iter = NULL;
Elm_App_Server_View *view;
Elm_App_Server *server;
server = eo_add_custom(ELM_APP_SERVER_CLASS, NULL,
elm_app_server_constructor(pkg, _create_view_cb));
eo_do(server, elm_app_server_title_set(pkg),
- elm_app_server_views_get(&views_iter),
+ views_iter = elm_app_server_views_get(),
eo_event_callback_add(ELM_APP_SERVER_EVENT_TERMINATE, _terminate_cb, NULL));
//views create in shallow state
EINA_ITERATOR_FOREACH(views_iter, view)
{
App_View_Context *ctx;
- const char *id;
+ const char *id = NULL;
ctx = calloc(1, sizeof(App_View_Context));
- eo_do(view, elm_app_server_view_id_get(&id));
+ eo_do(view, id = elm_app_server_view_id_get());
ctx->view_name = eina_stringshare_printf("%s %s", pkg, id);
eo_do(view,