Changes between Version 4 and Version 5 of pjsip-doc/intro_pjsua2
- Timestamp:
- Dec 4, 2013 3:51:09 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pjsip-doc/intro_pjsua2
v4 v5 42 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. 43 43 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: :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: 45 45 46 46 .. code-block:: c++ … … 53 53 jDoc.saveFile(“jsontest.js”); 54 54 55 To load from the file: :55 To load from the file: 56 56 57 57 .. code-block:: c++ … … 59 59 EpConfig epCfg; 60 60 JsonDocument jDoc; 61 jDoc.loadFile( “jsontest.js”);61 jDoc.loadFile("jsontest.js"); 62 62 jDoc.readObject(epCfg); 63 63