Fix mistypo in doxygen comment
[platform/core/api/tone-player.git] / include / tone_player.h
old mode 100644 (file)
new mode 100755 (executable)
index 21031b6..05d2e1d
@@ -11,7 +11,7 @@
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
-* limitations under the License. 
+* limitations under the License.
 */
 
 
@@ -41,23 +41,24 @@ extern "C"
  */
 
 /**
- * @brief Enumerations of error codes for wav player
+ * @brief Enumeration of error codes for tone player.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
-    TONE_PLAYER_ERROR_NONE        = TIZEN_ERROR_NONE,                      /**< Successful */
-    TONE_PLAYER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,       /**< Invalid parameter */
-    TONE_PLAYER_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,       /**< Invalid operation */
+typedef enum {
+       TONE_PLAYER_ERROR_NONE               = TIZEN_ERROR_NONE,                    /**< Successful */
+       TONE_PLAYER_ERROR_INVALID_PARAMETER  = TIZEN_ERROR_INVALID_PARAMETER,       /**< Invalid parameter */
+       TONE_PLAYER_ERROR_INVALID_OPERATION  = TIZEN_ERROR_INVALID_OPERATION,       /**< Invalid operation */
+       TONE_PLAYER_ERROR_NOT_SUPPORTED_TYPE = TIZEN_ERROR_TONE_PLAYER | 0x01       /**< Not supported (Since 3.0) */
 } tone_player_error_e;
 
 /**
- * @brief Enumerations of tone
+ * @brief Enumeration of tone.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
-typedef enum
-{
+typedef enum {
        TONE_TYPE_DEFAULT = 0,                  /**< The default tone */
        TONE_TYPE_DTMF_0 = 0,                           /**< Predefined DTMF 0 */
-       TONE_TYPE_DTMF_1,                               /**< Predefined DTMF 1 */
+       TONE_TYPE_DTMF_1,                               /**< Predefined DTMF 1 */
        TONE_TYPE_DTMF_2,                               /**< Predefined DTMF 2 */
        TONE_TYPE_DTMF_3,                               /**< Predefined DTMF 3 */
        TONE_TYPE_DTMF_4,                               /**< Predefined DTMF 4 */
@@ -69,8 +70,8 @@ typedef enum
        TONE_TYPE_DTMF_S,                          /**< Predefined DTMF Star - Asterisk (*) */
        TONE_TYPE_DTMF_P,                               /**< Predefined DTMF sharP (#) */
        TONE_TYPE_DTMF_A,                               /**< Predefined DTMF A (A) */
-       TONE_TYPE_DTMF_B,                               /**< Predefined DTMF B (B) */   
-       TONE_TYPE_DTMF_C,                               /**< Predefined DTMF C (C) */   
+       TONE_TYPE_DTMF_B,                               /**< Predefined DTMF B (B) */
+       TONE_TYPE_DTMF_C,                               /**< Predefined DTMF C (C) */
        TONE_TYPE_DTMF_D,                               /**< Predefined DTMF D (D) */
        TONE_TYPE_SUP_DIAL,     /**< Call supervisory tone, Dial tone: CEPT: 425Hz, continuous */
        TONE_TYPE_ANSI_DIAL,    /**< Call supervisory tone, Dial tone: ANSI (IS-95): 350Hz+440Hz, continuous */
@@ -162,8 +163,10 @@ typedef enum
        TONE_TYPE_CDMA_CALLDROP_LITE,     /**< CDMA CALLDROP LITE tone: 1480Hz 125ms, 1397Hz 125ms, 784Hz 125ms */
        TONE_TYPE_CDMA_NETWORK_BUSY_ONE_SHOT,   /**< CDMA_NETWORK_BUSY_ONE_SHOT tone: 425Hz 500ms ON, 500ms OFF. */
        TONE_TYPE_CDMA_ABBR_ALERT,      /**< CDMA_ABBR_ALERT tone: 1150Hz+770Hz 400ms ON */
-       TONE_TYPE_CDMA_SIGNAL_OFF    /**< CDMA_SIGNAL_OFF - silent tone */
-       
+       TONE_TYPE_CDMA_SIGNAL_OFF,    /**< CDMA_SIGNAL_OFF - silent tone */
+       TONE_TYPE_USER_DEFINED_LOW_FRE,                    /**< User Defined Tone: 100Hz continuous */
+       TONE_TYPE_USER_DEFINED_MED_FRE,                    /**< User Defined Tone: 200Hz continuous */
+       TONE_TYPE_USER_DEFINED_HIGH_FRE                   /**< User Defined Tone: 300Hz continuous */
 } tone_type_e;
 
 
@@ -179,32 +182,67 @@ typedef enum
 
 
 /**
+ * @deprecated Deprecated since 3.0. Use tone_player_start_with_stream_info() instead.
  * @brief Plays a tone.
  *
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ *
+ * @remarks Sound can be mixed with other sounds if you don't control the sound session in sound-manager module since 3.0.\n
+ *     You can refer to @ref CAPI_MEDIA_SOUND_MANAGER_MODULE.
+ *
  * @param[in] tone     The tone type to play
  * @param[in] type     The sound type
- * @param[in] duration_ms      The tone duration in milliseconds\n
- *             -1 indicates an infinite duration
- * @param[out] id      The tone player ID ( can be set to NULL ) 
- * 
- * @return 0 on success, otherwise a negative error value.
+ * @param[in] duration_ms      The tone duration in milliseconds \n
+ *                                 @c -1 indicates an infinite duration.
+ * @param[out] id      The tone player ID ( can be set to @c NULL )
+ *
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ * @retval #TONE_PLAYER_ERROR_NONE Successful
+ * @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ *
+ * @see tone_player_stop()
+ */
+int tone_player_start(tone_type_e tone, sound_type_e type, int duration_ms, int *id) TIZEN_DEPRECATED_API;
+
+/**
+ * @brief Plays a tone with stream information of sound-manager.
+ *
+ * @since_tizen 3.0
+ *
+ * @remarks Voice Recognition stream type is not supported in this API.
+ *
+ * @param[in] tone     The tone type to play
+ * @param[in] stream_info      The sound stream information handle
+ * @param[in] duration_ms      The tone duration in milliseconds \n
+ *                                 @c -1 indicates an infinite duration.
+ * @param[out] id      The tone player ID ( can be set to @c NULL )
+ *
+ * @return @c 0 on success,
+ *         otherwise a negative error value
  * @retval #TONE_PLAYER_ERROR_NONE Successful
- * @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter 
+ * @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
  * @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation
+ * @retval #TONE_PLAYER_ERROR_NOT_SUPPORTED_TYPE Not supported stream type
  *
  * @see tone_player_stop()
+ * @see sound_manager_create_stream_information()
+ * @see sound_manager_destroy_stream_information()
  */
-int tone_player_start(tone_type_e tone, sound_type_e type, int duration_ms, int *id);
+int tone_player_start_with_stream_info(tone_type_e tone, sound_stream_info_h stream_info, int duration_ms, int *id);
 
 /**
  * @brief Stops playing the tone.
  *
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ *
  * @param[in] id       The tone player ID to stop
  *
  * @return 0 on success, otherwise a negative error value.
  * @retval #TONE_PLAYER_ERROR_NONE Successful
- * @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter 
- * @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation  
+ * @retval #TONE_PLAYER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #TONE_PLAYER_ERROR_INVALID_OPERATION Invalid operation
  *
  * @see tone_player_start()
  */