[Freeswitch-svn] [commit] r6121 - in freeswitch/trunk/src: . include
Author: mikej Date: Thu Nov 1 07:55:00 2007 New Revision: 6121 Modified: freeswitch/trunk/src/include/switch_core.h freeswitch/trunk/src/include/switch_ivr.h freeswitch/trunk/src/include/switch_module_interfaces.h freeswitch/trunk/src/switch_core_asr.c freeswitch/trunk/src/switch_ivr_async.c Log: const qualifiers in asr/tts interfaces. Modified: freeswitch/trunk/src/include/switch_core.h ============================================================================== --- freeswitch/trunk/src/include/switch_core.h (original) +++ freeswitch/trunk/src/include/switch_core.h Thu Nov 1 07:55:00 2007 @@ -1252,8 +1252,12 @@ \return SWITCH_STATUS_SUCCESS if the asr handle was opened */ SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah, - char *module_name, - char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool); + const char *module_name, + const char *codec, + int rate, + const char *dest, + switch_asr_flag_t *flags, + switch_memory_pool_t *pool); /*! \brief Close an asr handle @@ -1297,7 +1301,7 @@ \param path the path to the grammaar file \return SWITCH_STATUS_SUCCESS */ -SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t *ah, char *grammar, char *path); +SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t *ah, const char *grammar, const char *path); /*! \brief Unload a grammar from an asr handle @@ -1305,7 +1309,7 @@ \param grammar the grammar to unload \return SWITCH_STATUS_SUCCESS */ -SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, char *grammar); +SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, const char *grammar); /*! \brief Pause detection on an asr handle Modified: freeswitch/trunk/src/include/switch_ivr.h ============================================================================== --- freeswitch/trunk/src/include/switch_ivr.h (original) +++ freeswitch/trunk/src/include/switch_ivr.h Thu Nov 1 07:55:00 2007 @@ -153,7 +153,10 @@ \return SWITCH_STATUS_SUCCESS if all is well */ SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *session, - char *mod_name, char *grammar, char *path, char *dest, switch_asr_handle_t *ah); + const char *mod_name, + const char *grammar, + const char *path, + const char *dest, switch_asr_handle_t *ah); /*! \brief Stop background Speech detection on a session @@ -191,7 +194,7 @@ \param grammar the grammar name \return SWITCH_STATUS_SUCCESS if all is well */ -SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, char *grammar); +SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, const char *grammar); /*! \brief Record a session to disk Modified: freeswitch/trunk/src/include/switch_module_interfaces.h ============================================================================== --- freeswitch/trunk/src/include/switch_module_interfaces.h (original) +++ freeswitch/trunk/src/include/switch_module_interfaces.h Thu Nov 1 07:55:00 2007 @@ -294,11 +294,11 @@ /*! the name of the interface */ const char *interface_name; /*! function to open the asr interface */ - switch_status_t (*asr_open) (switch_asr_handle_t *ah, char *codec, int rate, char *dest, switch_asr_flag_t *flags); + switch_status_t (*asr_open) (switch_asr_handle_t *ah, const char *codec, int rate, const char *dest, switch_asr_flag_t *flags); /*! function to load a grammar to the asr interface */ - switch_status_t (*asr_load_grammar) (switch_asr_handle_t *ah, char *grammar, char *path); + switch_status_t (*asr_load_grammar) (switch_asr_handle_t *ah, const char *grammar, const char *path); /*! function to unload a grammar to the asr interface */ - switch_status_t (*asr_unload_grammar) (switch_asr_handle_t *ah, char *grammar); + switch_status_t (*asr_unload_grammar) (switch_asr_handle_t *ah, const char *grammar); /*! function to close the asr interface */ switch_status_t (*asr_close) (switch_asr_handle_t *ah, switch_asr_flag_t *flags); /*! function to feed audio to the ASR */ Modified: freeswitch/trunk/src/switch_core_asr.c ============================================================================== --- freeswitch/trunk/src/switch_core_asr.c (original) +++ freeswitch/trunk/src/switch_core_asr.c Thu Nov 1 07:55:00 2007 @@ -35,8 +35,12 @@ #include "private/switch_core_pvt.h" SWITCH_DECLARE(switch_status_t) switch_core_asr_open(switch_asr_handle_t *ah, - char *module_name, - char *codec, int rate, char *dest, switch_asr_flag_t *flags, switch_memory_pool_t *pool) + const char *module_name, + const char *codec, + int rate, + const char *dest, + switch_asr_flag_t *flags, + switch_memory_pool_t *pool) { switch_status_t status; char buf[256] = ""; @@ -77,7 +81,7 @@ return ah->asr_interface->asr_open(ah, codec, rate, dest, flags); } -SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t *ah, char *grammar, char *path) +SWITCH_DECLARE(switch_status_t) switch_core_asr_load_grammar(switch_asr_handle_t *ah, const char *grammar, const char *path) { char *epath = NULL; switch_status_t status; @@ -95,7 +99,7 @@ return status; } -SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, char *grammar) +SWITCH_DECLARE(switch_status_t) switch_core_asr_unload_grammar(switch_asr_handle_t *ah, const char *grammar) { switch_status_t status; Modified: freeswitch/trunk/src/switch_ivr_async.c ============================================================================== --- freeswitch/trunk/src/switch_ivr_async.c (original) +++ freeswitch/trunk/src/switch_ivr_async.c Thu Nov 1 07:55:00 2007 @@ -1042,7 +1042,7 @@ } -SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, char *grammar) +SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech_unload_grammar(switch_core_session_t *session, const char *grammar) { switch_channel_t *channel = switch_core_session_get_channel(session); switch_asr_flag_t flags = SWITCH_ASR_FLAG_NONE; @@ -1064,7 +1064,11 @@ } SWITCH_DECLARE(switch_status_t) switch_ivr_detect_speech(switch_core_session_t *session, - char *mod_name, char *grammar, char *path, char *dest, switch_asr_handle_t *ah) + const char *mod_name, + const char *grammar, + const char *path, + const char *dest, + switch_asr_handle_t *ah) { switch_channel_t *channel; switch_codec_t *read_codec;
participants (1)
-
Freeswitch SVN