Ignore:
Timestamp:
Dec 13, 2013 9:07:53 AM (8 years ago)
Author:
nanang
Message:

Re #1716: Initial implementation of new Android app based on pjsua2+SWIG API.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/pjsua2/pjsip-apps/src/swig/pjsua2.i

    r4669 r4691  
    2626  } 
    2727#endif 
     28 
     29// Allow C++ exceptions to be handled in Java 
     30#ifdef SWIGJAVA 
     31  %typemap(throws, throws="java.lang.Exception") pj::Error { 
     32  jclass excep = jenv->FindClass("java/lang/Exception"); 
     33  if (excep) 
     34    jenv->ThrowNew(excep, $1.info(true).c_str()); 
     35  return $null; 
     36} 
     37 
     38  // Force the Error Java class to extend java.lang.Exception 
     39  %typemap(javabase) pj::Error "java.lang.Exception"; 
     40 
     41  // Override getMessage() 
     42  %typemap(javacode) pj::Error %{ 
     43  public String getMessage() { 
     44    return getTitle(); 
     45  } 
     46%} 
     47#endif 
     48 
    2849 
    2950// Constants from PJSIP libraries 
     
    7596%template(AudioMediaVector)             std::vector<pj::AudioMedia*>; 
    7697%template(MediaFormatVector)            std::vector<pj::MediaFormat*>; 
    77 %template(AudioDevInfoVector)           std::vector<AudioDevInfo*>; 
     98%template(AudioDevInfoVector)           std::vector<pj::AudioDevInfo*>; 
    7899%template(CodecInfoVector)              std::vector<pj::CodecInfo*>; 
    79100 
Note: See TracChangeset for help on using the changeset viewer.