tizen beta release
[platform/core/uifw/tts.git] / server / ttsd_player.h
1 /*
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.
12 */
13
14
15 #ifndef __TTSD_PLAYER_H_
16 #define __TTSD_PLAYER_H_
17
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21
22 typedef enum {
23         PLAYER_END_OF_PLAYING,
24         PLAYER_EMPTY_SOUND_QUEUE,
25         PLAYER_ERROR
26 }player_event_e;
27
28 typedef int (*player_result_callback_func)(player_event_e event, int uid, int utt_id);
29
30 /*
31 * TTSD Player Interfaces 
32 */
33
34 int ttsd_player_init(player_result_callback_func result_cb);
35
36 int ttsd_player_release(void);
37
38 int ttsd_player_create_instance(const int uid);
39
40 int ttsd_player_destroy_instance(const int uid);
41
42 int ttsd_player_play(const int uid);
43
44 int ttsd_player_next_play(int uid);
45
46 int ttsd_player_stop(const int uid);
47
48 int ttsd_player_pause(const int uid);
49
50 int ttsd_player_resume(const int uid);
51
52 int ttsd_player_get_current_client();
53
54 int ttsd_player_get_current_utterance_id(const int uid);
55
56 int ttsd_player_all_stop();
57
58 #ifdef __cplusplus
59 }
60 #endif
61
62 #endif /* __TTSD_PLAYER_H_ */