Changes between Version 4 and Version 5 of pjsip-doc/intro_pjsua2


Ignore:
Timestamp:
Dec 4, 2013 3:51:09 AM (11 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pjsip-doc/intro_pjsua2

    v4 v5  
    4242PJSUA2 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. 
    4343 
    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:: 
     44As 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: 
    4545 
    4646.. code-block:: c++ 
     
    5353    jDoc.saveFile(“jsontest.js”); 
    5454 
    55 To load from the file:: 
     55To load from the file: 
    5656 
    5757.. code-block:: c++ 
     
    5959    EpConfig epCfg; 
    6060    JsonDocument jDoc; 
    61     jDoc.loadFile(“jsontest.js”); 
     61    jDoc.loadFile("jsontest.js"); 
    6262    jDoc.readObject(epCfg); 
    6363