Ignore:
Timestamp:
Jul 17, 2013 8:20:50 PM (9 years ago)
Author:
nanang
Message:

JNI projects:

  • More work on callbacks wrapper, i.e: pj_timer_heap_callback for pjsua_schedule_timer() and pjsua_logging_config::cb.
  • Map pjsua_call_dump() output buffer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/jni/pjsip-apps/src/jni/callbacks.i

    r4557 r4566  
    55%} 
    66 
     7/* 
     8 * Wrap pjsua_logging_config callback 
     9 */ 
     10%feature("director") PjsuaLoggingConfigCallback; 
     11%ignore pjsua_logging_config::cb; 
     12%extend pjsua_logging_config { 
     13    void setCb(PjsuaLoggingConfigCallback* callback) { 
     14        setPjsuaLoggingConfigCallback(callback); 
     15        $self->cb = callback? &pjsua_logging_config_callback_proxy : NULL; 
     16    } 
     17} 
     18 
     19 
     20/* 
     21 * Wrap pj_timer_heap_callback in pj_timer_entry 
     22 */ 
     23%feature("director") PjTimerHeapCallback; 
     24%ignore pj_timer_entry::cb; 
     25/* Suppress user_data, app can put user data in PjTimerHeapCallback inherited class */ 
     26%ignore pj_timer_entry::user_data; 
     27%extend pj_timer_entry { 
     28    void setCb(PjTimerHeapCallback* callback) { 
     29        setPjTimerHeapCallback($self, callback); 
     30        $self->cb = callback? &pj_timer_heap_callback_proxy : NULL; 
     31    } 
     32} 
     33 
     34 
     35/* 
     36 * Wrap pjsua_callback 
     37 */ 
    738%feature("director") PjsuaCallback; 
    839%ignore pjsua_callback; 
    940%ignore pjsua_config::cb; 
    1041%extend pjsua_config { 
    11     void setCb(PjsuaCallback *pjsuaCb) { 
    12         $self->cb = *PJSUA_CALLBACK_PROXY; 
    13         setPjsuaCallback(pjsuaCb); 
     42    void setCb(PjsuaCallback *callback) { 
     43        setPjsuaCallback(callback); 
     44        if (callback) 
     45            $self->cb = *pjsua_callback_proxy; 
     46        else 
     47            pj_bzero(&$self->cb, sizeof($self->cb)); 
    1448    } 
    1549} 
    1650 
     51 
    1752%include <callbacks.h> 
     53 
     54/* Ignore these callbacks */ 
     55%ignore pjsip_msg_body::print_body; 
     56%ignore pjsip_msg_body::clone_data; 
     57%ignore pjsip_tx_data::cb; 
     58%ignore pjsip_transaction::state_handler; 
Note: See TracChangeset for help on using the changeset viewer.