- Timestamp:
- Mar 20, 2015 10:19:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/pjsua/android/jni/pjsua_app_callback.cpp
r4496 r5005 24 24 #if defined(PJ_ANDROID) && PJ_ANDROID != 0 25 25 26 #include <android/log.h> 27 26 28 static PjsuaAppCallback* registeredCallbackObject = NULL; 27 29 static pjsua_app_cfg_t android_app_config; … … 33 35 #define THIS_FILE "pjsua_app_callback.cpp" 34 36 37 extern "C" { 38 static void log_writer(int level, const char *data, int len) 39 { 40 __android_log_write(ANDROID_LOG_INFO, "pjsua", data); 41 } 42 } 43 44 35 45 /** Callback wrapper **/ 36 void on_cli_started(pj_status_t status, const char *msg) 46 static void on_cli_config(pjsua_app_config *cfg) 47 { 48 cfg->log_cfg.cb = &log_writer; 49 } 50 51 static void on_cli_started(pj_status_t status, const char *msg) 37 52 { 38 53 char errmsg[PJ_ERR_MSG_SIZE]; … … 46 61 } 47 62 48 void on_cli_stopped(pj_bool_t restart, int argc, char **argv)63 static void on_cli_stopped(pj_bool_t restart, int argc, char **argv) 49 64 { 50 65 if (restart) { … … 83 98 pj_bzero(&android_app_config, sizeof(android_app_config)); 84 99 100 android_app_config.on_config_init = &on_cli_config; 85 101 android_app_config.on_started = &on_cli_started; 86 102 android_app_config.on_stopped = &on_cli_stopped;
Note: See TracChangeset
for help on using the changeset viewer.