SoundPool implementation has been added.
[platform/core/api/sound-pool.git] / include / sound_pool_type.h
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef __TIZEN_SOUND_POOL_TYPE_H__
18 #define __TIZEN_SOUND_POOL_TYPE_H__
19
20 #include "tizen.h"
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * @file  sound_pool_type.h
28  * @brief This file contains handles, enumerations and callbacks types
29  *        definitions required by Tizen SoundPool API.
30  */
31
32 /**
33  * @addtogroup CAPI_SOUND_POOL_MODULE
34  * @{
35  */
36
37 /**
38  * @brief Enumeration for Tizen Sound Pool error.
39  *
40  * @since_tizen 3.0
41  */
42 typedef enum
43 {
44         SOUND_POOL_ERROR_NONE
45                         = TIZEN_ERROR_NONE,                /**< Successful */
46         SOUND_POOL_ERROR_NOT_SUPPORTED
47                         = TIZEN_ERROR_NOT_SUPPORTED,       /**< Not supported */
48         SOUND_POOL_ERROR_MSG_TOO_LONG
49                         = TIZEN_ERROR_MSG_TOO_LONG,        /**< Message too long */
50         SOUND_POOL_ERROR_NO_DATA
51                         = TIZEN_ERROR_NO_DATA,             /**< No data */
52         SOUND_POOL_ERROR_KEY_NOT_AVAILABLE
53                         = TIZEN_ERROR_KEY_NOT_AVAILABLE,   /**< Key not available */
54         SOUND_POOL_ERROR_OUT_OF_MEMORY
55                         = TIZEN_ERROR_OUT_OF_MEMORY,       /**< Out of memory */
56         SOUND_POOL_ERROR_INVALID_PARAMETER
57                         = TIZEN_ERROR_INVALID_PARAMETER,   /**< Invalid parameter */
58         SOUND_POOL_ERROR_INVALID_OPERATION
59                         = TIZEN_ERROR_INVALID_OPERATION,   /**< Invalid operation */
60         SOUND_POOL_ERROR_PERMISSION_DENIED
61                         = TIZEN_ERROR_NOT_PERMITTED,       /**< Not permitted */
62         SOUND_POOL_ERROR_NO_SUCH_FILE
63                         = TIZEN_ERROR_NO_SUCH_FILE,        /**< File not found */
64
65 } sound_pool_error_e;
66
67 /**
68  * @brief Sound pool handle type.
69  *
70  * @since_tizen 3.0
71  */
72 typedef void *sound_pool_h;
73
74 /**
75  * @brief Enumeration of sound pool stream state.
76  *
77  * @since_tizen 3.0
78  */
79 typedef enum {
80         SOUND_POOL_STREAM_STATE_NONE,       /**< Stream state isn't determined */
81         SOUND_POOL_STREAM_STATE_PLAYING,    /**< Stream state is playing */
82         SOUND_POOL_STREAM_STATE_PAUSED,     /**< Stream state is paused */
83         SOUND_POOL_STREAM_STATE_STOPPED,    /**< Stream state is stopped */
84         SOUND_POOL_STREAM_STATE_FINISHED,   /**< Stream state is finished */
85         SOUND_POOL_STREAM_STATE_SUSPENDED   /**< Stream state is suspended */
86 } sound_pool_stream_state_e;
87
88 /**
89  * @brief Enumeration of sound pool state.
90  *
91  * @since_tizen 3.0
92  */
93 typedef enum {
94         SOUND_POOL_STATE_ACTIVE,    /**< Sound pool active state: streams can be played */
95         SOUND_POOL_STATE_INACTIVE   /**< Sound pool inactive state: streams can't be played */
96 } sound_pool_state_e;
97
98 /**
99  * @}
100  */
101
102 #ifdef __cplusplus
103 }
104 #endif /* __cplusplus */
105
106 #endif /* __TIZEN_SOUND_POOL_TYPE_H__ */