Clear data when AUDIO_POLICY_BLOCKED is occurred
[platform/core/uifw/tts.git] / server / ttsd_player.h
1 /*
2 *  Copyright (c) 2011-2016 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 /*
35 * TTSD Player Interfaces 
36 */
37
38 int ttsd_player_init();
39
40 int ttsd_player_release(void);
41
42 int ttsd_player_create_instance(int uid);
43
44 int ttsd_player_destroy_instance(int uid);
45
46 int ttsd_player_play(int uid);
47
48 int ttsd_player_stop(int uid);
49
50 int ttsd_player_clear(int uid);
51
52 int ttsd_player_pause(int uid);
53
54 int ttsd_player_resume(int uid);
55
56 int ttsd_player_all_stop();
57
58 int ttsd_player_play_pcm(int uid);
59
60 int ttsd_player_check_current_playback_focus(bool *is_current_interrupt);
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif /* __TTSD_PLAYER_H_ */