From f0be21988c9b0a4d165d386f8062a4bf2f5b095b Mon Sep 17 00:00:00 2001 From: Jean-Benoit MARTIN Date: Tue, 2 Dec 2014 11:55:14 +0100 Subject: Remove Ecore evas dependency Librarie gdk-pixbuf is used to create thumbnail instead of Ecore-evas Bug-Tizen: TC-1694 Change-Id: Ib8facf8ec8d2d82ffaf5138a3b7e09ee5853b7b5 Signed-off-by: Jean-Benoit MARTIN --- server/thumb-server-internal.c | 8 +++----- server/thumb-server.c | 19 ++++++++----------- 2 files changed, 11 insertions(+), 16 deletions(-) (limited to 'server') diff --git a/server/thumb-server-internal.c b/server/thumb-server-internal.c index cc65652..6de74ad 100755 --- a/server/thumb-server-internal.c +++ b/server/thumb-server-internal.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #ifdef LOG_TAG @@ -65,9 +64,8 @@ void _thumb_daemon_finish_jobs() thumb_dbg("sqlite3 handle is alive. So disconnect to sqlite3"); } - /* Shutdown ecore-evas */ - ecore_evas_shutdown(); - + g_main_loop_quit(g_thumb_server_mainloop); + return; } @@ -404,7 +402,7 @@ gboolean _thumb_server_read_socket(GIOChannel *src, if(recv_msg.msg_type == THUMB_REQUEST_KILL_SERVER) { thumb_warn("Shutting down..."); - ecore_main_loop_quit(); + g_main_loop_quit(g_thumb_server_mainloop); } return TRUE; diff --git a/server/thumb-server.c b/server/thumb-server.c index bed8711..ca5fd48 100755 --- a/server/thumb-server.c +++ b/server/thumb-server.c @@ -30,8 +30,6 @@ #include //#include //#include -#include -#include #ifdef LOG_TAG @@ -49,7 +47,7 @@ static void _media_thumb_signal_handler(void *user_data) thumb_dbg("Singal Hander for HEYNOTI \"power_off_start\""); if (g_thumb_server_mainloop) - ecore_main_loop_quit(); + g_main_loop_quit(g_thumb_server_mainloop); else exit(1); @@ -98,7 +96,7 @@ int main() return -1; } - context = g_main_context_default (); + g_thumb_server_mainloop = g_main_loop_new(context, FALSE); /* Create new channel to watch udp socket */ channel = g_io_channel_unix_new(sockfd); @@ -108,10 +106,10 @@ int main() g_source_set_callback(source, (GSourceFunc)_thumb_server_read_socket, NULL, NULL); g_source_attach(source, context); - GSource *source_evas_init = NULL; - source_evas_init = g_idle_source_new (); - g_source_set_callback (source_evas_init, _thumb_daemon_start_jobs, NULL, NULL); - g_source_attach (source_evas_init, context); + GSource *source_init = NULL; + source_init = g_idle_source_new (); + g_source_set_callback (source_init, _thumb_daemon_start_jobs, NULL, NULL); + g_source_attach (source_init, context); /* Would be used when glib 2.32 is installed GSource *sig_handler_src = NULL; @@ -119,14 +117,13 @@ int main() g_source_set_callback(sig_handler_src, (GSourceFunc)_media_thumb_signal_handler, NULL, NULL); g_source_attach(sig_handler_src, context); */ - ecore_evas_init(); thumb_dbg("************************************"); thumb_dbg("*** Thumbnail server is running ***"); thumb_dbg("************************************"); - ecore_main_loop_begin(); - + g_main_loop_run(g_thumb_server_mainloop); + thumb_dbg("Thumbnail server is shutting down..."); g_io_channel_shutdown(channel, FALSE, NULL); -- cgit v1.2.3