Fix bug on resume and file message(IPC) is applied
[platform/core/uifw/tts.git] / server / ttsd_player.h
1 /*
2 *  Copyright (c) 2012, 2013 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 enum {
29         TTSD_PLAYER_STATE_NULL,
30         TTSD_PLAYER_STATE_PAUSED,
31         TTSD_PLAYER_STATE_PLAYING
32 }ttsd_player_state_e;
33
34 typedef int (*player_result_callback_func)(player_event_e event, int uid, int utt_id);
35
36 /*
37 * TTSD Player Interfaces 
38 */
39
40 int ttsd_player_init(player_result_callback_func result_cb);
41
42 int ttsd_player_release(void);
43
44 int ttsd_player_create_instance(int uid);
45
46 int ttsd_player_destroy_instance(int uid);
47
48 int ttsd_player_play(int uid);
49
50 int ttsd_player_next_play(int uid);
51
52 int ttsd_player_stop(int uid);
53
54 int ttsd_player_pause(int uid);
55
56 int ttsd_player_resume(int uid);
57
58 int ttsd_player_get_state(int uid, ttsd_player_state_e* state);
59
60 int ttsd_player_get_current_client();
61
62 int ttsd_player_get_current_utterance_id(int uid);
63
64 int ttsd_player_all_stop();
65
66 #ifdef __cplusplus
67 }
68 #endif
69
70 #endif /* __TTSD_PLAYER_H_ */