Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

IVRMenu Class Reference

#include <switch_swigable_cpp.h>

Collaboration diagram for IVRMenu:

Collaboration graph
[legend]

Public Member Functions

SWITCH_DECLARE_CONSTRUCTOR IVRMenu (IVRMenu *main, const char *name, const char *greeting_sound, const char *short_greeting_sound, const char *invalid_sound, const char *exit_sound, const char *confirm_macro, const char *confirm_key, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures, int max_timeouts)
virtual SWITCH_DECLARE_CONSTRUCTOR ~IVRMenu ()
void bindAction (char *action, const char *arg, const char *bind)
void execute (CoreSession *session, const char *name)
 IVRMenu (IVRMenu *main, const char *name, const char *greeting_sound, const char *short_greeting_sound, const char *invalid_sound, const char *exit_sound, const char *confirm_macro, const char *confirm_key, int confirm_attempts, int inter_timeout, int digit_len, int timeout, int max_failures, int max_timeouts)
virtual ~IVRMenu ()
void bindAction (char *action, const char *arg, const char *bind)
void execute (CoreSession *session, const char *name)

Protected Attributes

switch_ivr_menu_tmenu
switch_memory_pool_tpool
switch_ivr_menu_tmenu
switch_memory_pool_tpool

Constructor & Destructor Documentation

SWITCH_DECLARE_CONSTRUCTOR IVRMenu::IVRMenu IVRMenu main,
const char *  name,
const char *  greeting_sound,
const char *  short_greeting_sound,
const char *  invalid_sound,
const char *  exit_sound,
const char *  confirm_macro,
const char *  confirm_key,
int  confirm_attempts,
int  inter_timeout,
int  digit_len,
int  timeout,
int  max_failures,
int  max_timeouts
 

00117 {
00118         menu = NULL;
00119         switch_core_new_memory_pool(&pool);
00120         switch_assert(pool);
00121         if (switch_strlen_zero(name)) {
00122                 name = "no name";
00123         }
00124 
00125         switch_ivr_menu_init(&menu, main ? main->menu : NULL, name, greeting_sound, short_greeting_sound, invalid_sound, 
00126                                                  exit_sound, confirm_macro, confirm_key, confirm_attempts, inter_timeout, digit_len, timeout, max_failures, max_timeouts, pool);
00127         
00128 
00129 }

Here is the call graph for this function:

SWITCH_DECLARE_CONSTRUCTOR IVRMenu::~IVRMenu  )  [virtual]
 

00132 {
00133         if (menu) {
00134                 switch_ivr_menu_stack_free(menu);
00135         }
00136         switch_core_destroy_memory_pool(&pool);
00137 }

Here is the call graph for this function:

IVRMenu::IVRMenu IVRMenu main,
const char *  name,
const char *  greeting_sound,
const char *  short_greeting_sound,
const char *  invalid_sound,
const char *  exit_sound,
const char *  confirm_macro,
const char *  confirm_key,
int  confirm_attempts,
int  inter_timeout,
int  digit_len,
int  timeout,
int  max_failures,
int  max_timeouts
 

virtual IVRMenu::~IVRMenu  )  [virtual]
 


Member Function Documentation

void IVRMenu::bindAction char *  action,
const char *  arg,
const char *  bind
 

void IVRMenu::bindAction char *  action,
const char *  arg,
const char *  bind
 

00140 {
00141         switch_ivr_action_t ivr_action = SWITCH_IVR_ACTION_NOOP;
00142 
00143         this_check_void();
00144         
00145         if (switch_ivr_menu_str2action(action, &ivr_action) == SWITCH_STATUS_SUCCESS) {
00146                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "bind %s to %s(%s)\n", bind, action, arg);
00147                 switch_ivr_menu_bind_action(menu, ivr_action, arg, bind);
00148         } else {
00149                 switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "invalid action %s\n", action);
00150         }
00151 }

Here is the call graph for this function:

void IVRMenu::execute CoreSession session,
const char *  name
 

void IVRMenu::execute CoreSession session,
const char *  name
 

00154 {
00155         this_check_void();
00156         switch_ivr_menu_execute(session->session, menu, (char *)name, NULL);
00157 }

Here is the call graph for this function:


Field Documentation

switch_ivr_menu_t* IVRMenu::menu [protected]
 

switch_ivr_menu_t* IVRMenu::menu [protected]
 

switch_memory_pool_t* IVRMenu::pool [protected]
 

switch_memory_pool_t* IVRMenu::pool [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Oct 10 11:24:10 2008 for FreeSWITCH by  doxygen 1.3.9.1