Fix memory leak / Define memory free macro
[platform/core/uifw/stt.git] / include / stt_internal.h
index d0b0e70..5b0cc70 100644 (file)
@@ -18,6 +18,7 @@
 #define __STT_INTERNAL_H__
 
 #include <tizen.h>
+#include <stt.h>
 
 /**
  * @file stt_internal.h
@@ -88,6 +89,41 @@ int stt_set_speech_status_cb(stt_h stt, stt_speech_status_cb callback, void* use
 */
 int stt_unset_speech_status_cb(stt_h stt);
 
+/**
+ * @brief Sets server STT.
+ * @details Using this API, the application can set server STT with a @a key as a @a user_data
+ *     The key is a private data to set STT server.
+ *     There are 3 types of keys; "server", "rampcode" and "epd".
+ *             "server": STT server address
+ *             "rampcode": ASR ramp code
+ *             "epd": A threshold for end-point detection
+ *
+ *     The application can input the @a user_data corresponding to the @a key.
+ *             "server": "qa", "sbx"
+ *             "rampcode": "dash_dict", "dash_da"
+ *             "epd": "100", "750", etc
+ *
+ *  If the application sets those keys, it will be able to use corresponding STT engines and options.
+ *
+ * @since_tizen 3.0
+ * @privilege %http://tizen.org/privilege/recorder
+ *
+ * @param[in] stt The STT handle
+ * @param[in] key The key
+ * @param[in] user_data The user data corresponding to the key
+ *
+ * @return 0 on success, otherwise a negative error value
+ * @retval #STT_ERROR_NONE Successful
+ * @retval #STT_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #STT_ERROR_INVALID_STATE Invalid state
+ * @retval #STT_ERROR_NOT_SUPPORTED STT NOT supported
+ * @retval #STT_ERROR_OUT_OF_MEMORY STT Out of memory
+ * @retval #STT_ERROR_PERMISSION_DENIED Permission denied
+ *
+ * @pre The state should be #STT_STATE_READY.
+ */
+int stt_set_server_stt(stt_h stt, const char* key, char* user_data);
+
 #ifdef __cplusplus
 }
 #endif