2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 * http://www.apache.org/licenses/LICENSE-2.0
7 * Unless required by applicable law or agreed to in writing, software
8 * distributed under the License is distributed on an "AS IS" BASIS,
9 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 * See the License for the specific language governing permissions and
11 * limitations under the License.
15 #include "ttsd_main.h"
16 #include "ttsd_server.h"
17 #include "ttsd_dbus.h"
18 #include "ttsd_network.h"
22 /* Main of TTS Daemon */
25 SLOG(LOG_DEBUG, TAG_TTSD, " ");
26 SLOG(LOG_DEBUG, TAG_TTSD, " ");
27 SLOG(LOG_DEBUG, TAG_TTSD, "===== TTS DAEMON INITIALIZE");
29 SLOG(LOG_ERROR, TAG_TTSD, "[Main ERROR] fail ecore_init() \n");
33 if (0 != ttsd_initialize()) {
34 printf("Fail to initialize tts-daemon \n");
35 SLOG(LOG_ERROR, TAG_TTSD, "[Main ERROR] fail to initialize tts-daemon \n");
39 if (0 != ttsd_dbus_open_connection()) {
40 printf("Fail to initialize IPC connection \n");
41 SLOG(LOG_ERROR, TAG_TTSD, "[Main ERROR] fail to open dbus connection \n");
45 if (0 != ttsd_network_initialize()) {
46 SLOG(LOG_ERROR, TAG_TTSD, "[Main ERROR] fail to initialize network \n");
50 SLOG(LOG_DEBUG, TAG_TTSD, "[Main] tts-daemon start...\n");
51 SLOG(LOG_DEBUG, TAG_TTSD, "=====");
52 SLOG(LOG_DEBUG, TAG_TTSD, " ");
53 SLOG(LOG_DEBUG, TAG_TTSD, " ");
55 printf("TTS-Daemon Start...\n");
57 ecore_main_loop_begin();
61 ttsd_dbus_close_connection();
63 ttsd_network_finalize();