X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fstte.h;h=655aebb5693404718c497d82cef6f1d9f3b36a0d;hb=e200b2e89abf72b96332db59da24acc8d4cda44f;hp=82bf87ce9e40a8a2d0d8ff219a055e4c536d9b05;hpb=499d2f989a8c2d09bae2fc39c76d2c1cf5fa76ac;p=platform%2Fcore%2Fuifw%2Fstt.git diff --git a/include/stte.h b/include/stte.h index 82bf87c..655aebb 100755 --- a/include/stte.h +++ b/include/stte.h @@ -156,6 +156,20 @@ typedef enum { /** + * @brief Definition of audio ID that means audio source from bluetooth. + * @since_tizen 5.5 + */ +#define STTE_AUDIO_ID_BLUETOOTH "STT_AUDIO_ID_BLUETOOTH" + + +/** + * @brief Definition of audio ID that means audio source from wifi. + * @since_tizen 5.5 + */ +#define STTE_AUDIO_ID_WIFI "STT_AUDIO_ID_WIFI" + + +/** * @brief Called when STT engine provides the time stamp of result to the engine service user. * @details This callback function is implemented by the engine service user. Therefore, the engine developer does NOT have to implement this callback function. * @since_tizen 3.0 @@ -528,6 +542,20 @@ typedef int (*stte_private_data_requested_cb)(const char* key, char** data); /** + * @brief Called when the engine service user sets audio recording type. + * @since_tizen 5.5 + * @remarks The @a audio_type can be used only in the callback. To use outside, make a copy. + * @param[in] audio_type Current audio type (e.g. #STTE_AUDIO_ID_BLUETOOTH or #STTE_AUDIO_ID_WIFI) + * @param[in] user_data user_data The user data to be passed to the callback function + * @return 0 on success, otherwise a negative error value. + * @retval #VCE_ERROR_NONE Successful. + * @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #STTE_ERROR_OPERATION_FAILED Operation failure + */ +typedef int (*stte_audio_type_cb)(const char* audio_type, void* user_data); + + +/** * @brief A structure for the STT engine functions. * @details This structure contains essential callback functions for operating STT engine. * @since_tizen 3.0 @@ -787,13 +815,46 @@ int stte_set_private_data_set_cb(stte_private_data_set_cb callback_func); int stte_set_private_data_requested_cb(stte_private_data_requested_cb callback_func); +/** +* @brief Sets a callback function for setting the audio type. +* @since_tizen 5.5 +* @remarks The stte_audio_type_cb() function is called when STT framework sets audio type to the STT engine. +* @param[in] callback_func stte_audio_type_set event callback function +* @param[in] user_data The user data passed to the callback function +* @return @c 0 on success, +* otherwise a negative error value +* @retval #STTE_ERROR_NONE Successful +* @retval #STTE_ERROR_INVALID_PARAMETER Invalid parameter +* @retval #STTE_ERROR_NOT_SUPPORTED Not supported +* @retval #STTE_ERROR_OPERATION_FAILED Operation failure +* @pre The stte_main() function should be invoked before this function is called. +* @see stte_audio_type_cb() +* @see stte_unset_audio_type_set_cb() +*/ +int stte_set_audio_type_set_cb(stte_audio_type_cb callback_func, void* user_data); + + +/** +* @brief Unsets a callback function for setting the audio type. +* @since_tizen 5.5 +* @return @c 0 on success, +* otherwise a negative error value +* @retval #STTE_ERROR_NONE Successful +* @retval #STTE_ERROR_NOT_SUPPORTED Not supported +* @retval #STTE_ERROR_OPERATION_FAILED Operation failure +* @pre The stte_main() function should be invoked before this function is called. +* @see stte_set_audio_type_set_cb() +*/ +int stte_unset_audio_type_set_cb(void); + + #ifdef __cplusplus } #endif /** - * @}@} + * @} */