2 * Copyright (c) 2015 Samsung Electronics Co., Ltd. All rights reserved.
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "screen_reader.h"
18 #include "screen_reader_tts.h"
19 #include "screen_reader_vconf.h"
20 #include "screen_reader_spi.h"
24 #ifdef RUN_IPC_TEST_SUIT
25 #include "test_suite/test_suite.h"
30 Service_Data service_data = {
33 #ifdef SCREEN_READER_TV
34 .tracking_signal_name = FOCUS_CHANGED_SIG,
36 .tracking_signal_name = HIGHLIGHT_CHANGED_SIG,
41 .available_languages = NULL,
43 //Actions to do when tts state is 'ready'
44 .update_language_list = false,
45 .lua_script_path = SCRIPTDIR "/mobile.lua",
47 .text_to_say_info = NULL
50 Service_Data *get_pointer_to_service_data_struct()
55 int screen_reader_create_service(void *data)
57 Service_Data *service_data = data;
59 vconf_init(service_data);
60 tts_init(service_data);
62 #ifdef SCREEN_READER_TV
63 spi_init(service_data);
68 int screen_reader_terminate_service(void *data)
70 DEBUG("Service Terminate Callback \n");
72 Service_Data *service_data = data;
74 #ifdef SCREEN_READER_TV
75 spi_shutdown(service_data);
78 tts_stop(service_data->tts);
79 tts_unprepare(service_data->tts);
80 tts_destroy(service_data->tts);
81 service_data->text_from_dbus = NULL;
82 service_data->current_value = NULL;