Ignore:
Timestamp:
Aug 13, 2014 9:14:53 AM (7 years ago)
Author:
nanang
Message:

Close #1779: Add APIs for external/native thread registration to pjsua2: Endpoint::libRegisterThread() & Endpoint::libIsThreadRegistered().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua2/endpoint.hpp

    r4704 r4887  
    2828#include <pjsua2/siptypes.hpp> 
    2929#include <list> 
     30#include <map> 
    3031 
    3132/** PJSUA2 API is inside pj namespace */ 
     
    722723 
    723724    /** 
    724      * Register a thread to poll for events. This function should be 
    725      * called by an external worker thread, and it will block polling 
    726      * for events until the library is destroyed. 
    727      */ 
    728     void libRegisterWorkerThread(const string &name) throw(Error); 
     725     * Register a thread that was created by external or native API to the 
     726     * library. Note that each time this function is called, it will allocate 
     727     * some memory to store the thread description, which will only be freed 
     728     * when the library is destroyed. 
     729     * 
     730     * @param name      The optional name to be assigned to the thread. 
     731     */ 
     732    void libRegisterThread(const string &name) throw(Error); 
     733 
     734    /** 
     735     * Check if this thread has been registered to the library. Note that 
     736     * this function is only applicable for library main & worker threads and 
     737     * external/native threads registered using libRegisterThread(). 
     738     */ 
     739    bool libIsThreadRegistered(); 
    729740 
    730741    /** 
     
    11731184    AudDevManager                audioDevMgr; 
    11741185    CodecInfoVector              codecInfoList; 
     1186    std::map<pj_thread_t*, pj_thread_desc*> threadDescMap; 
    11751187 
    11761188    /* Pending logging */ 
Note: See TracChangeset for help on using the changeset viewer.