I'm using CSipSimple for android and trying to set log callback to receive pjsip library log messages. In log configuration there is a function setCb but I don't understand how declare callback and use it.
pjsua_logging_config logCfg = new pjsua_logging_config();
logCfg.setLevel(1);
logCfg.setMsg_logging(pjsuaConstants.PJ_TRUE);
logCfg.setCb(?????);
In CSipSimple pjsua_logging_config setCb declared as:
public void setCb(SWIGTYPE_p_f_int_p_q_const__char_int__void value) {
pjsuaJNI.pjsua_logging_config_cb_set(swigCPtr, this, SWIGTYPE_p_f_int_p_q_const__char_int__void.getCPtr(value));
In pjsip - http://www.pjsip.org/pjsip/docs/html/structpjsua__logging__config.htm
Thanks for any help.
Use something like this:
logCfg.setCb(new pjsua_callback(pjsuaJNI.WRAPPER_CALLBACK_STRUCT_get(), false));
You can refer this project for sample: https://github.com/tqcenglish/CSipSimple
Edit:
logCfg.setCb(new SWIGTYPE_p_f_int_p_q_const__char_int__void(pjsua_logging_config.getCPtr(logCfg), false));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.