Struct switch_asr_interface

Source
#[repr(C)]
pub struct switch_asr_interface {
Show 24 fields pub interface_name: *const c_char, pub asr_open: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, codec: *const c_char, rate: c_int, dest: *const c_char, flags: *mut switch_asr_flag_t) -> switch_status_t>, pub asr_load_grammar: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, grammar: *const c_char, name: *const c_char) -> switch_status_t>, pub asr_unload_grammar: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, name: *const c_char) -> switch_status_t>, pub asr_close: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, flags: *mut switch_asr_flag_t) -> switch_status_t>, pub asr_feed: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, data: *mut c_void, len: c_uint, flags: *mut switch_asr_flag_t) -> switch_status_t>, pub asr_resume: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t) -> switch_status_t>, pub asr_pause: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t) -> switch_status_t>, pub asr_check_results: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, flags: *mut switch_asr_flag_t) -> switch_status_t>, pub asr_get_results: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, xmlstr: *mut *mut c_char, flags: *mut switch_asr_flag_t) -> switch_status_t>, pub asr_get_result_headers: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, headers: *mut *mut switch_event_t, flags: *mut switch_asr_flag_t) -> switch_status_t>, pub asr_start_input_timers: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t) -> switch_status_t>, pub asr_text_param: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, param: *mut c_char, val: *const c_char)>, pub asr_numeric_param: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, param: *mut c_char, val: c_int)>, pub asr_float_param: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, param: *mut c_char, val: f64)>, pub rwlock: *mut switch_thread_rwlock_t, pub refs: c_int, pub reflock: *mut switch_mutex_t, pub parent: *mut switch_loadable_module_interface_t, pub next: *mut switch_asr_interface, pub asr_enable_grammar: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, name: *const c_char) -> switch_status_t>, pub asr_disable_grammar: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, name: *const c_char) -> switch_status_t>, pub asr_disable_all_grammars: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t) -> switch_status_t>, pub asr_feed_dtmf: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, dtmf: *const switch_dtmf_t, flags: *mut switch_asr_flag_t) -> switch_status_t>,
}
Expand description

\brief Abstract interface to an asr module

Fields§

§interface_name: *const c_char

the name of the interface

§asr_open: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, codec: *const c_char, rate: c_int, dest: *const c_char, flags: *mut switch_asr_flag_t) -> switch_status_t>

function to open the asr interface

§asr_load_grammar: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, grammar: *const c_char, name: *const c_char) -> switch_status_t>

function to load a grammar to the asr interface

§asr_unload_grammar: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, name: *const c_char) -> switch_status_t>

function to unload a grammar to the asr interface

§asr_close: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, flags: *mut switch_asr_flag_t) -> switch_status_t>

function to close the asr interface

§asr_feed: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, data: *mut c_void, len: c_uint, flags: *mut switch_asr_flag_t) -> switch_status_t>

function to feed audio to the ASR

§asr_resume: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t) -> switch_status_t>

function to resume the ASR

§asr_pause: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t) -> switch_status_t>

function to pause the ASR

§asr_check_results: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, flags: *mut switch_asr_flag_t) -> switch_status_t>

function to read results from the ASR

§asr_get_results: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, xmlstr: *mut *mut c_char, flags: *mut switch_asr_flag_t) -> switch_status_t>

function to read results from the ASR

§asr_get_result_headers: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, headers: *mut *mut switch_event_t, flags: *mut switch_asr_flag_t) -> switch_status_t>

function to read result headers from the ASR

§asr_start_input_timers: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t) -> switch_status_t>

function to start ASR input timers

§asr_text_param: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, param: *mut c_char, val: *const c_char)>§asr_numeric_param: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, param: *mut c_char, val: c_int)>§asr_float_param: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, param: *mut c_char, val: f64)>§rwlock: *mut switch_thread_rwlock_t§refs: c_int§reflock: *mut switch_mutex_t§parent: *mut switch_loadable_module_interface_t§next: *mut switch_asr_interface§asr_enable_grammar: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, name: *const c_char) -> switch_status_t>

function to enable a grammar to the asr interface

§asr_disable_grammar: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, name: *const c_char) -> switch_status_t>

function to disable a grammar to the asr interface

§asr_disable_all_grammars: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t) -> switch_status_t>

function to disable all grammars to the asr interface

§asr_feed_dtmf: Option<unsafe extern "C" fn(ah: *mut switch_asr_handle_t, dtmf: *const switch_dtmf_t, flags: *mut switch_asr_flag_t) -> switch_status_t>

function to feed DTMF to the ASR

Trait Implementations§

Source§

impl Clone for switch_asr_interface

Source§

fn clone(&self) -> switch_asr_interface

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for switch_asr_interface

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for switch_asr_interface

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.