Changes between Version 6 and Version 7 of pjsip-doc/intro_pjsua2
- Timestamp:
- Feb 6, 2014 9:01:04 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pjsip-doc/intro_pjsua2
v6 v7 22 22 Media 23 23 ---------- 24 This class represents a media element which is capable to either produce media or takes media.24 This 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}}}. 25 25 26 26 Call 27 27 ------ 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.28 This 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. 29 29 30 30 Buddy … … 40 40 Objects Persistence 41 41 --------------------- 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.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 ([http://tools.ietf.org/html/rfc4627 RFC 4627]), but the framework allows application to extend the API to support other document formats. 43 43 44 44 As 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: … … 74 74 Threading 75 75 ---------- 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 bethread safe.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 itself is thread safe. 77 77 78 78 79 79 Using in C++ Application 80 80 ======================== 81 As mentioned in previous chapter, AC++ 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.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. 82 82 83 83 Here 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. … … 108 108 // Initialize endpoint 109 109 EpConfig ep_cfg; 110 ep_cfg.uaConfig.userAgent = "pjsua2-hello";111 110 ep.libInit( ep_cfg ); 112 111