3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
36 #include "MsgHelper.h"
37 #include "MsgUtilFile.h"
38 #include "MsgCppTypes.h"
41 static GMainLoop *loop;
43 static gboolean _worker_done(void* data)
45 if (g_main_loop_is_running(loop))
46 g_main_loop_quit(loop);
51 // may called by threads
54 g_idle_add(_worker_done,NULL);
57 int main(int argc, char** argv)
60 MSG_DEBUG("############### Start msg_helper ###############");
68 MSG_DEBUG("No arguments to run msg_helper.");
72 MSG_DEBUG("argv[0] [%s] ", argv[0]);
74 if(strcmp(argv[0],MSG_SOUND_START)==0)
79 else if(strcmp(argv[0],MSG_SOUND_STOP)==0)
86 loop = g_main_loop_new(NULL, FALSE);
91 MSG_DEBUG("Waiting for working jobs to be finished!!!");
94 g_main_loop_run(loop);
98 MSG_DEBUG("Fail to create g_main_loop!!!");