title: JNI how to bridge some of the complex object and callbacks
body: <p>My android project requires some C++/C libraries,and I've got a library (.so) and some headers(.h). and I have reference to some simple demo, using JNI bridge some simple functions, but This lib is complicated for me. How bridging these complex objects and callback.</p>
  
  <ol>
  <li><p>Created a android project</p></li>
  <li><p>Copy xxx.so into lib/armeabi, copy all .h files to jni folder.</p></li>
  <li><p>I want use JNI bridging these c ++ function, I konw I need creat a MStack.h and MStack.cpp to implement these functions, But these headers class makes me very confused，I'm not familiar with C++</p></li>
  </ol>
  
  <p>some .h like this :</p>
  
  <pre><code>class SIPSTACK_API ISipStack : public Component::IUnknown
  {
  public:
  
  class IFactory : public Component::IFactoryUnknown
  {
  public:
  
      virtual ISipStack* create() = 0;
  
  
      static const char* iid() {return "SipStack";}
  };  
  public:
  virtual ~ISipStack(void){}
  
  ///@brief 
  ///\param [in] config 
  ///\note 
  virtual bool setConfig(SipConfigInfo&amp; config)
      COMPONENT_UNIMPLEMENTED_OPERATION
  
  
  ///\param [in] handler 
  ///\note  
  virtual bool start(void)
      COMPONENT_UNIMPLEMENTED_OPERATION
  
  ///@brief 
  enum
  {
      inviteHandler = 0,   
      actRegHandler,       
      pasRegHandler,       
      outCallMsgHandler,  
      subscribeHandler,    
      proxyHandler        
  };
  
  /// @brief 
  ///\param[in] type inviteHandler、registerHandler    
  ///\param[in] handler  
  ///\note  
  virtual bool attachHandler(int type, Component::IUnknown* handler)
      COMPONENT_UNIMPLEMENTED_OPERATION
  </code></pre>
  
  <p>.....</p>
  
  <p>How can I put these into the corresponding .h and implemented in the cpp. Thanks!</p>