Changeset 4476 for pjproject/trunk/pjsip-apps/src/pjsua/pjsua_common.h
- Timestamp:
- Apr 19, 2013 6:05:06 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/pjsua_common.h
r4461 r4476 26 26 #define current_acc pjsua_acc_get_default() 27 27 28 #define NO_LIMIT_DURATION(int)0x7FFFFFFF29 #define MAX_AVI430 #define NO_NB-228 #define PJSUA_APP_NO_LIMIT_DURATION (int)0x7FFFFFFF 29 #define PJSUA_APP_MAX_AVI 4 30 #define PJSUA_APP_NO_NB -2 31 31 32 32 typedef struct input_result … … 53 53 pj_bool_t out_auto_transmit; 54 54 } app_vid; 55 56 /* Enumeration of CLI frontends */ 57 typedef enum { 58 CLI_FE_CONSOLE = 1, 59 CLI_FE_TELNET = 2 60 } CLI_FE; 61 62 /** CLI config **/ 63 typedef struct cli_cfg_t 64 { 65 /** Bitmask of CLI_FE **/ 66 int cli_fe; 67 pj_cli_cfg cfg; 68 pj_cli_telnet_cfg telnet_cfg; 69 pj_cli_console_cfg console_cfg; 70 } cli_cfg_t; 55 71 56 72 /* Pjsua application data */ … … 134 150 pjmedia_vid_dev_index dev_id; 135 151 pjsua_conf_port_id slot; 136 } avi[ MAX_AVI];152 } avi[PJSUA_APP_MAX_AVI]; 137 153 pj_bool_t avi_auto_play; 138 154 int avi_def_idx; … … 140 156 /* CLI setting */ 141 157 pj_bool_t use_cli; 142 int cli_telnet_port; 143 pj_bool_t disable_cli_console; 158 cli_cfg_t cli_cfg; 144 159 } pjsua_app_config; 145 146 /** CLI callback **/147 /** This specifies the callback called when cli quit is called. **/148 typedef void (*pj_cli_on_quit)(pj_bool_t is_restarting);149 /** This callback is called when the cli is completely destroyed **/150 typedef void (*pj_cli_on_destroy)(void);151 /** This callback is called when pjsua restart command is invode by cli **/152 typedef void (*pj_cli_on_restart_pjsua)(void);153 160 154 161 /** Extern variable declaration **/ … … 159 166 extern pjsua_call_setting call_opt; 160 167 extern pjsua_msg_data msg_data; 168 extern pj_bool_t app_running; 161 169 162 170 PJ_DECL(int) my_atoi(const char *cs); … … 172 180 PJ_DECL(pj_bool_t) is_cli_inited(); 173 181 174 /** Defined in pjsua_app.c **/175 PJ_DECL(pj_status_t) app_init(pj_cli_telnet_on_started on_started_cb,176 pj_cli_on_quit on_quit_cb,177 pj_cli_on_destroy on_destroy_cb,178 pj_cli_on_restart_pjsua on_restart_pjsua_cb);179 PJ_DECL(void) setup_signal_handler(void);180 181 182 /** Defined in pjsua_config.c **/ 182 /** This is to store the app runtime/startup options **/183 PJ_DECL(void) add_startup_config(int argc, char *argv[]);184 /** This is to store the app reload options **/185 PJ_DECL(void) add_reload_config(unsigned idx, pj_str_t *option);186 183 /** This is to load the configuration **/ 187 PJ_DECL(pj_status_t) load_config(pjsua_app_config *app_config, 188 pj_str_t *uri_arg, 189 pj_bool_t app_running); 184 PJ_DECL(pj_status_t) load_config(int argc, 185 char **argv, 186 pj_str_t *uri_arg); 187 188 /** Pjsua app callback **/ 189 /** This callback is called when CLI is started. **/ 190 PJ_DECL(void) cli_on_started(pj_status_t status); 191 192 /** This callback is called when "shutdown"/"restart" command is invoked **/ 193 PJ_DECL(pj_bool_t) cli_on_stopped(pj_bool_t restart, int argc, char **argv); 194 195 /** This callback is called when "quit"/"restart" command is invoked **/ 196 PJ_DECL(pj_bool_t) legacy_on_stopped(pj_bool_t restart); 197 198 /** Pjsua cli method **/ 199 PJ_DECL(pj_status_t) cli_init(); 200 PJ_DECL(pj_status_t) cli_main(pj_bool_t wait_telnet_cli); 201 PJ_DECL(void) cli_destroy(); 202 PJ_DECL(void) cli_get_info(char *info, pj_size_t size); 203 204 /** Legacy method **/ 205 PJ_DECL(void) legacy_main(); 190 206 191 207 #if PJSUA_HAS_VIDEO … … 211 227 PJ_END_DECL 212 228 213 #endif /* __PJSUA_C MD_H__ */214 229 #endif /* __PJSUA_COMMON_H__ */ 230
Note: See TracChangeset
for help on using the changeset viewer.