Changes between Version 6 and Version 7 of pjsip-doc/intro_pjsua2


Ignore:
Timestamp:
Feb 6, 2014 9:01:04 AM (8 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pjsip-doc/intro_pjsua2

    v6 v7  
    2222Media 
    2323---------- 
    24 This class represents a media element which is capable to either produce media or takes media. 
     24This is an abstract base class that represents a media element which is capable to either produce media or takes media. It is then subclassed into {{{AudioMedia}}}, which is then subclassed into concrete classes such as {{{AudioMediaPlayer}}} and {{{AudioMediaRecorder}}}. 
    2525 
    2626Call 
    2727------ 
    28 This class is used to manipulate calls, such as to answer the call, hangup the call, put the call on hold, transfer the call, etc. 
     28This class represents an ongoing call (or speaking technically, an INVITE session) and can be used to manipulate it, such as to answer the call, hangup the call, put the call on hold, transfer the call, etc. 
    2929 
    3030Buddy 
     
    4040Objects Persistence 
    4141--------------------- 
    42 PJSUA2 includes PersistentObject class to provide functionality to read/write data from/to a document (string or file). The data can be simple data types such as boolean, number, string, and string arrays, or a user defined object. Currently the implementation supports reading and writing from/to JSON document, but the framework allows application to extend the API to support other document formats. 
     42PJSUA2 includes PersistentObject class to provide functionality to read/write data from/to a document (string or file). The data can be simple data types such as boolean, number, string, and string arrays, or a user defined object. Currently the implementation supports reading and writing from/to JSON document ([http://tools.ietf.org/html/rfc4627 RFC 4627]), but the framework allows application to extend the API to support other document formats. 
    4343 
    4444As such, classes which inherit from PersistentObject, such as EpConfig (endpoint configuration), AccountConfig (account configuration), and BuddyConfig (buddy configuration) can be loaded/saved from/to a file. Here’s an example to save a config to a file: 
     
    7474Threading 
    7575---------- 
    76 For platforms that require polling, the PJSUA2 module provides its own worker thread to poll PJSIP, so it is not necessary to instantiate own your polling thread. Having said that the application should be prepared to have the callbacks called by different thread than the main thread. The PJSUA2 module should be thread safe. 
     76For platforms that require polling, the PJSUA2 module provides its own worker thread to poll PJSIP, so it is not necessary to instantiate own your polling thread. Having said that the application should be prepared to have the callbacks called by different thread than the main thread. The PJSUA2 module itself is thread safe. 
    7777 
    7878 
    7979Using in C++ Application 
    8080======================== 
    81 As mentioned in previous chapter, A C++ application can use *pjsua2* natively, while at the same time still has access to the lower level objects and the ability to extend the libraries if it needs to. Using the API will be exactly the same as the API reference that is written in this book. 
     81As mentioned in previous chapter, a C++ application can use *pjsua2* natively, while at the same time still has access to the lower level objects and the ability to extend the libraries if it needs to. Using the API will be exactly the same as the API reference that is written in this book. 
    8282 
    8383Here is a sample complete C++ application to give you some idea about the API. The snippet below initializes the library and creates an account that registers to our pjsip.org SIP server. 
     
    108108      // Initialize endpoint 
    109109      EpConfig ep_cfg; 
    110       ep_cfg.uaConfig.userAgent = "pjsua2-hello"; 
    111110      ep.libInit( ep_cfg ); 
    112111