Home | History | Annotate | Download | only in plugin
      1 /*
      2  * Copyright (C) 2014 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #ifndef __DMTRWPLUGIN_H__
     18 #define __DMTRWPLUGIN_H__
     19 
     20 #ifndef __cplusplus
     21 #error "This is a C++ header file; it requires C++ to compile."
     22 #endif
     23 
     24 /**
     25   \file dmtRWPlugin.hpp
     26   \brief Constants and datatypes for plugin API.\n
     27        The dmtRWPlugin.hpp header file contains constants and data types  of plugin API. \n
     28        Also it contains DmtRWPluginNode, DmtRWPluginTree classes definition. \n
     29        <b>Warning:</b> All functions, structures, and classes from this header file are for internal usage only!!!
     30 
     31        The <i>DmtRWPluginTree</i> is a base plugin tree class with read/write functionality; \n
     32        inheritance from  DmtPluginTree \n
     33        The <i>DmtRWPluginNode</i> is a base plugin node class with read/write functionality; \n
     34        inheritance from  DmtPluginNode \n
     35 */
     36 
     37 #include "dmtPlugin.hpp"
     38 
     39 class DmtRWPluginTree;
     40 class DmtRWPluginNode;
     41 
     42 /** Define DMT RW Plugin Tree smart pointer for plugins*/
     43 typedef JemSmartPtr< DmtRWPluginTree > PDmtRWPluginTree;
     44 
     45 /** Define DMT RW Plugin Node smart pointer for plugins*/
     46 typedef JemSmartPtr< DmtRWPluginNode > PDmtRWPluginNode;
     47 
     48 class SyncML_PlugIn_WBXMLLog;
     49 class DMFileHandler;
     50 
     51 /**
     52 * Based plugin tree class with read/write functionality. This class is inherited from the "DmtPluginTree".
     53 * \par Category: General
     54 * \par Persistence: Transient
     55 * \par Security: Non-Secure
     56 * \par Migration State: FINAL
     57 */
     58 
     59 class DmtRWPluginTree : public DmtPluginTree
     60 {
     61    //With some default Implementation of the DmtTree API including helper functions
     62 private:
     63 	  SYNCML_DM_RET_STATUS_T DeleteSubTree( PDmtNode ptrNode);
     64 	  BOOLEAN IsESNSetComplete(CPCHAR pbURI);
     65 	  SYNCML_DM_RET_STATUS_T CommitESN(CPCHAR pbURI);
     66 	  SYNCML_DM_RET_STATUS_T InitLog ();
     67 	  DMFileHandler *fpLog;
     68 	  SyncML_PlugIn_WBXMLLog* log;
     69 	  BOOLEAN  m_Playback;
     70 	  BOOLEAN  m_ESNDirty;
     71 	  DMString m_strLogPath;
     72 	  BOOLEAN  m_bIsAtomic;
     73 protected:
     74 
     75 /**
     76 * Protected destructor
     77 */
     78   virtual ~DmtRWPluginTree();
     79 
     80 public:
     81 
     82   /**
     83   * Default constructor - no memory allocation performed.
     84   */
     85    DmtRWPluginTree();
     86 
     87   /**
     88   * Collects all commands that has been executed on plugin tree for the recovery and rollback actions.
     89   * \par Sync (or) Async:
     90   * This is a Synchronous function.
     91   * \par Secure (or) Non-Secure (or) N/A:
     92   * This is a Non-Secure function.
     93   * \param type [in] - plugin command type
     94   * \param pbURI [in] -node URI
     95   * \param attribute [in] - plugin command attribute
     96   * \param inNode [in] - pointer to DMT node
     97   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
     98   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
     99   * - All other codes indicates failure. The description can be found in dmtError.h
    100   * \par Prospective Clients:
    101   * All potential applications that require configuration settings and Internal Classes.
    102   */
    103   virtual  SYNCML_DM_RET_STATUS_T LogCommand(SYNCML_DM_PLUGIN_COMMAND_T type,
    104                          CPCHAR pbURI,
    105                          SYNCML_DM_PLUGIN_COMMAND_ATTRIBUTE_T attribute,
    106                          const DmtNode * inNode);
    107 
    108 /**
    109   * For RW Trees, default atomicity support will be provided here.
    110   * \par Sync (or) Async:
    111   * This is a Synchronous function.
    112   * \par Secure (or) Non-Secure (or) N/A:
    113   * This is a Non-Secure function.
    114   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    115   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    116   * - All other codes indicates failure. The description can be found in dmtError.h
    117   * \par Prospective Clients:
    118   * All potential applications that require configuration settings and Internal Classes.
    119   */
    120    virtual SYNCML_DM_RET_STATUS_T Flush();
    121 
    122 /**
    123   * Begins an atomic operation that will end with commit() or rollback();
    124   * \par Sync (or) Async:
    125   * This is a Synchronous function.
    126   * \par Secure (or) Non-Secure (or) N/A:
    127   * This is a Non-Secure function.
    128   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    129   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    130   * - All other codes indicates failure. The description can be found in dmtError.h
    131   * \par Prospective Clients:
    132   * All potential applications that require configuration settings and Internal Classes.
    133   */
    134    virtual SYNCML_DM_RET_STATUS_T Begin();
    135 
    136   /**
    137   * Commits a series of atomic operations
    138   * \par Sync (or) Async:
    139   * This is a Synchronous function.
    140   * \par Secure (or) Non-Secure (or) N/A:
    141   * This is a Non-Secure function.
    142   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    143   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    144   * - All other codes indicates failure. The description can be found in dmtError.h
    145   * \par Prospective Clients:
    146   * All potential applications that require configuration settings and Internal Classes.
    147   */
    148    virtual SYNCML_DM_RET_STATUS_T Commit();
    149 
    150   /**
    151   * Rollbacks a series of atomic operations
    152   * \par Sync (or) Async:
    153   * This is a Synchronous function.
    154   * \par Secure (or) Non-Secure (or) N/A:
    155   * This is a Non-Secure function.
    156   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    157   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    158   * - All other codes indicates failure. The description can be found in dmtError.h
    159   * \par Prospective Clients:
    160   * All potential applications that require configuration settings and Internal Classes.
    161   */
    162    virtual SYNCML_DM_RET_STATUS_T Rollback();
    163 
    164 
    165   /**
    166   * Retrieves if operation is atomic
    167   * \par Sync (or) Async:
    168   * This is a Synchronous function.
    169   * \par Secure (or) Non-Secure (or) N/A:
    170   * This is a Non-Secure function.
    171   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    172   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    173   * - All other codes indicates failure. The description can be found in dmtError.h
    174   * \par Prospective Clients:
    175   * All potential applications that require configuration settings and Internal Classes.
    176   */
    177    virtual BOOLEAN IsAtomic() const;
    178 
    179 
    180   /**
    181   * Deletes a node according to the specified path
    182   * \par Sync (or) Async:
    183   * This is a Synchronous function.
    184   * \par Secure (or) Non-Secure (or) N/A:
    185   * This is a Non-Secure function.
    186   * \param path [in] - full path to the node
    187   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    188   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    189   * - All other codes indicates failure. The description can be found in dmtError.h
    190   * \par Prospective Clients:
    191   * All potential applications that require configuration settings and Internal Classes.
    192   */
    193    virtual SYNCML_DM_RET_STATUS_T DeleteNode( CPCHAR path );
    194 
    195   /**
    196   * Changes node's name. For example: <i>RenameNode( "./SyncML/DMAcc/Test", "NewTest" )</i>;
    197   * \par Sync (or) Async:
    198   * This is a Synchronous function.
    199   * \par Secure (or) Non-Secure (or) N/A:
    200   * This is a Non-Secure function.
    201   * \param path [in] - path to the node
    202   * \param szNewNodeName [in] - new node name
    203   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    204   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    205   * - All other codes indicates failure. The description can be found in dmtError.h
    206   * \par Prospective Clients:
    207   * All potential applications that require configuration settings and Internal Classes.
    208   */
    209    virtual SYNCML_DM_RET_STATUS_T RenameNode( CPCHAR path,
    210                                             CPCHAR szNewNodeName );
    211   /**
    212   * Deletes a node according to the specified path
    213   * \par Sync (or) Async:
    214   * This is a Synchronous function.
    215   * \par Secure (or) Non-Secure (or) N/A:
    216   * This is a Non-Secure function.
    217   * \param path [in] - full path to the node
    218   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    219   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    220   * - All other codes indicates failure. The description can be found in dmtError.h
    221   * \par Prospective Clients:
    222   * All potential applications that require configuration settings and Internal Classes.
    223   */
    224    virtual SYNCML_DM_RET_STATUS_T RemoveNode(CPCHAR path);
    225 
    226   /**
    227   * Creates an interior node in the tree.
    228   * \par Sync (or) Async:
    229   * This is a Synchronous function.
    230   * \par Secure (or) Non-Secure (or) N/A:
    231   * This is a Non-Secure function.
    232   * \param path [in] - path to the node
    233   * \param ptrCreatedNode [out] - new created node
    234   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    235   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    236   * - All other codes indicates failure. The description can be found in dmtError.h
    237   * \par Prospective Clients:
    238   * All potential applications that require configuration settings and Internal Classes.
    239   */
    240    virtual SYNCML_DM_RET_STATUS_T CreateInteriorNode( CPCHAR path,
    241                                                     PDmtNode& ptrCreatedNode );
    242 
    243   /**
    244   * Creates a leaf node in the tree.
    245   * \par Sync (or) Async:
    246   * This is a Synchronous function.
    247   * \par Secure (or) Non-Secure (or) N/A:
    248   * This is a Non-Secure function.
    249   * \param path [in] - path to the node
    250   * \param ptrCreatedNode [out] - new created node
    251   * \param value [in] - data value DmtData type
    252   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    253   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    254   * - All other codes indicates failure. The description can be found in dmtError.h
    255   * \par Prospective Clients:
    256   * All potential applications that require configuration settings and Internal Classes.
    257   */
    258    virtual SYNCML_DM_RET_STATUS_T CreateLeafNode( CPCHAR path,
    259                                                 PDmtNode& ptrCreatedNode,
    260                                                 const DmtData& value );
    261   /**
    262   * Creates a leaf node in the tree.
    263   * \par Important Notes:
    264   * -Note: This method provides default log implementation.
    265   * \par Sync (or) Async:
    266   * This is a Synchronous function.
    267   * \par Secure (or) Non-Secure (or) N/A:
    268   * This is a Non-Secure function.
    269   * \param path [in] - path to the node
    270   * \param ptrCreatedNode [out] - new created node
    271   * \param value [in] - data value DmtData type
    272   * \param isESN [in] - TRUE if it is an ESN, otherwise set to FALSE.
    273   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    274   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    275   * - All other codes indicates failure. The description can be found in dmtError.h
    276   * \par Prospective Clients:
    277   * All potential applications that require configuration settings and Internal Classes.
    278   */
    279   virtual SYNCML_DM_RET_STATUS_T CreateLeafNode(CPCHAR path,
    280   							PDmtNode& ptrCreatedNode,
    281   							const DmtData& value ,
    282   							BOOLEAN isESN);
    283 
    284   /**
    285   * Creates a leaf node in the tree.
    286   * \par Sync (or) Async:
    287   * This is a Synchronous function.
    288   * \par Secure (or) Non-Secure (or) N/A:
    289   * This is a Non-Secure function.
    290   * \param path [in] - path to the node
    291   * \param ptrCreatedNode [out] - new created node
    292   * \param value [in] - data value DmtData type
    293   * \param isESN [in] - TRUE if it is an ESN, otherwise set to FALSE.
    294   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    295   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    296   * - All other codes indicates failure. The description can be found in dmtError.h
    297   * \par Prospective Clients:
    298   * All potential applications that require configuration settings and Internal Classes.
    299   */
    300    virtual SYNCML_DM_RET_STATUS_T CreateLeafNodeInternal( CPCHAR path,
    301                                                              PDmtNode& ptrCreatedNode,
    302                                                              const DmtData& value ,
    303                                                              BOOLEAN isESN);
    304 
    305 #ifdef LOB_SUPPORT
    306   /**
    307   * Creates temporary storage for an ESN.
    308   * \par Sync (or) Async:
    309   * This is a Synchronous function.
    310   * \par Secure (or) Non-Secure (or) N/A:
    311   * This is a Non-Secure function.
    312   * \param path [in] - path to the node
    313   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    314   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    315   * - All other codes indicates failure. The description can be found in dmtError.h
    316   * \par Prospective Clients:
    317   * All potential applications that require configuration settings and Internal Classes.
    318   */
    319    SYNCML_DM_RET_STATUS_T BackupESNdata( CPCHAR path);
    320 
    321   /**
    322   * Indicates the ESN value is modified...
    323   * \par Sync (or) Async:
    324   * This is a Synchronous function.
    325   * \par Secure (or) Non-Secure (or) N/A:
    326   * This is a Non-Secure function.
    327   * \par Prospective Clients:
    328   * All potential applications that require configuration settings and Internal Classes.
    329   */
    330    void SetESNDirty() {m_ESNDirty = TRUE;}
    331 #endif
    332 
    333 
    334   /**
    335   * Sets handler to the log file.
    336   * \par Sync (or) Async:
    337   * This is a Synchronous function.
    338   * \par Secure (or) Non-Secure (or) N/A:
    339   * This is a Non-Secure function.
    340   * \param fileHandle [in] - handler to the log file
    341   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    342   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    343   * - All other codes indicates failure. The description can be found in dmtError.h
    344   * \par Prospective Clients:
    345   * All potential applications that require configuration settings and Internal Classes.
    346   */
    347    virtual SYNCML_DM_RET_STATUS_T setLogFileHandle(DMFileHandler *fileHandle);
    348 
    349   /**
    350   * Creates an interior node in the tree.
    351   * \par Important Notes:
    352   * -Note: The plugin developers should provide implementation !!!
    353   * \par Sync (or) Async:
    354   * This is a Synchronous function.
    355   * \par Secure (or) Non-Secure (or) N/A:
    356   * This is a Non-Secure function.
    357   * \param path [in] - path to the node
    358   * \param ptrCreatedNode [out] - new created node
    359   * \param childNodeNames [in] - vector with child nodes
    360   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    361   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    362   * - All other codes indicates failure. The description can be found in dmtError.h
    363   * \par Prospective Clients:
    364   * All potential applications that require configuration settings and Internal Classes.
    365   */
    366    virtual SYNCML_DM_RET_STATUS_T CreateInteriorNodeInternal( CPCHAR path,
    367                                                             PDmtNode& ptrCreatedNode,
    368                                                             const DMStringVector & childNodeNames);
    369 
    370   /**
    371   * Creates a leaf node in the tree.
    372   * \par Important Notes:
    373   * -Note: The plugin developers should provide implementation !
    374   * \par Sync (or) Async:
    375   * This is a Synchronous function.
    376   * \par Secure (or) Non-Secure (or) N/A:
    377   * This is a Non-Secure function.
    378   * \param path [in] - path to the node
    379   * \param ptrCreatedNode [out] - new created node
    380   * \param value [in] - data value DmtData type
    381   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    382   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    383   * - All other codes indicates failure. The description can be found in dmtError.h
    384   * \par Prospective Clients:
    385   * All potential applications that require configuration settings and Internal Classes.
    386   */
    387    virtual SYNCML_DM_RET_STATUS_T CreateLeafNodeInternal( CPCHAR path,
    388                                                              PDmtNode& ptrCreatedNode,
    389                                                              const DmtData& value );
    390 
    391   /**
    392   * Creates link (virtual) to a parent  for the given node.
    393   * \par Sync (or) Async:
    394   * This is a Synchronous function.
    395   * \par Secure (or) Non-Secure (or) N/A:
    396   * This is a Non-Secure function.
    397   * \param path [in] - path to the node
    398   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    399   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    400   * - All other codes indicates failure. The description can be found in dmtError.h
    401   * \par Prospective Clients:
    402   * All potential applications that require configuration settings and Internal Classes.
    403   */
    404    SYNCML_DM_RET_STATUS_T LinkToParentNode( CPCHAR path);
    405 
    406  /**
    407   * Additional API for Recovery and 2-phase commit for multiple plugins.
    408   * There is a default implementation using backward for forward logging.
    409   * \par Sync (or) Async:
    410   * This is a Synchronous function.
    411   * \par Secure (or) Non-Secure (or) N/A:
    412   * This is a Non-Secure function.
    413   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    414   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    415   * - All other codes indicates failure. The description can be found in dmtError.h
    416   * \par Prospective Clients:
    417   * All potential applications that require configuration settings and Internal Classes.
    418   */
    419    virtual SYNCML_DM_RET_STATUS_T Verify();
    420 
    421 
    422    /**
    423   * Retrieves if plugin is in a playback mode (recovery or rollback).
    424   * \par Sync (or) Async:
    425   * This is a Synchronous function.
    426   * \par Secure (or) Non-Secure (or) N/A:
    427   * This is a Non-Secure function.
    428   * \return Return Type (BOOLEAN)
    429   *  - TRUE - if plugin is in the playback mode
    430   *  - FALSE - if plugin is NOT in the playback mode
    431   * \par Prospective Clients:
    432   * All potential applications that require configuration settings and Internal Classes.
    433   */
    434    BOOLEAN IsPlaybackMode();
    435 
    436    /**
    437   * Sets plugin in playback mode (recovery or rollback).
    438   * \par Sync (or) Async:
    439   * This is a Synchronous function.
    440   * \par Secure (or) Non-Secure (or) N/A:
    441   * This is a Non-Secure function.
    442   * \param bPlayback [in] -  true or false
    443   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    444   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    445   * - All other codes indicates failure. The description can be found in dmtError.h
    446   * \par Prospective Clients:
    447   * All potential applications that require configuration settings and Internal Classes.
    448   */
    449    SYNCML_DM_RET_STATUS_T SetPlaybackMode(boolean bPlayback);
    450 };
    451 
    452 
    453 
    454 /**
    455 * Base plugin node class with the read/write functionality. This class is inherited from the "DmtPluginNode".
    456 * \par Category: General
    457 * \par Persistence: Transient
    458 * \par Security: Non-Secure
    459 * \par Migration State: FINAL
    460 */
    461 class DmtRWPluginNode :public DmtPluginNode
    462 {
    463 private:
    464 #ifdef LOB_SUPPORT
    465   BOOLEAN	m_LobComplete;
    466   BOOLEAN	m_LobDirty;
    467   BOOLEAN	m_LobLogging;
    468   DMString abStorageName;
    469 #endif
    470     SYNCML_DM_RET_STATUS_T RenameChildNodes( const char* szParentPath, const char* szNodeName );
    471 
    472 protected:
    473    /** Protected destructor */
    474   virtual ~DmtRWPluginNode();
    475 
    476 public:
    477   /**
    478   * Default constructor - no memory allocation performed.
    479   */
    480    DmtRWPluginNode();
    481 
    482 /**
    483   * Updates title information for the node.
    484   * \par Sync (or) Async:
    485   * This is a Synchronous function.
    486   * \par Secure (or) Non-Secure (or) N/A:
    487   * This is a Non-Secure function.
    488   * \param szTitle [in] - node titles string
    489   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    490   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    491   * - All other codes indicates failure. The description can be found in dmtError.h
    492   * \par Prospective Clients:
    493   * All potential applications that require configuration settings and Internal Classes.
    494   */
    495    virtual SYNCML_DM_RET_STATUS_T SetTitle( CPCHAR szTitle );
    496 
    497   /**
    498   * Changes the value of a node. If not successful, return an error code
    499   * \par Sync (or) Async:
    500   * This is a Synchronous function.
    501   * \par Secure (or) Non-Secure (or) N/A:
    502   * This is a Non-Secure function.
    503   * \param value [in] - new node value
    504   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    505   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    506   * - All other codes indicates failure. The description can be found in dmtError.h
    507   * \par Prospective Clients:
    508   * All potential applications that require configuration settings and Internal Classes.
    509   */
    510    virtual SYNCML_DM_RET_STATUS_T SetValue( const DmtData& value );
    511 
    512  /**
    513   * Changes the value of a node. If not successful, return an error code
    514   * \par Important Notes:
    515   * -Note: The plugin developers should provide implementation !
    516   * \par Sync (or) Async:
    517   * This is a Synchronous function.
    518   * \par Secure (or) Non-Secure (or) N/A:
    519   * This is a Non-Secure function.
    520   * \param value [in] - new node value
    521   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    522   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    523   * - All other codes indicates failure. The description can be found in dmtError.h
    524   * \par Prospective Clients:
    525   * All potential applications that require configuration settings and Internal Classes.
    526   */
    527    SYNCML_DM_RET_STATUS_T SetValueInternal( const DmtData& value );
    528 
    529   /**
    530   * Renames a node.
    531   * \par Sync (or) Async:
    532   * This is a Synchronous function.
    533   * \par Secure (or) Non-Secure (or) N/A:
    534   * This is a Non-Secure function.
    535   * param szNewName [in] - new name
    536   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    537   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    538   * - All other codes indicates failure. The description can be found in dmtError.h
    539   * \par Prospective Clients:
    540   * All potential applications that require configuration settings and Internal Classes.
    541   */
    542    SYNCML_DM_RET_STATUS_T Rename( CPCHAR szNewName );
    543 
    544 #ifdef LOB_SUPPORT
    545 
    546   /**
    547   * Gets first chunk of an ESN (External Storage Node).
    548   * \par Sync (or) Async:
    549   * This is a Synchronous function.
    550   * \par Secure (or) Non-Secure (or) N/A:
    551   * This is a Non-Secure function.
    552   * \param dmtChunkData [out] - reference to dmtChunkData
    553   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    554   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    555   * - All other codes indicates failure. The description can be found in dmtError.h
    556   * \par Prospective Clients:
    557   * All potential applications that require configuration settings and Internal Classes.
    558   */
    559     SYNCML_DM_RET_STATUS_T GetFirstChunk(DmtDataChunk&  dmtChunkData);
    560 
    561   /**
    562    * Gets next chunk of an ESN  (External Storage Node).
    563   * \par Sync (or) Async:
    564   * This is a Synchronous function.
    565   * \par Secure (or) Non-Secure (or) N/A:
    566   * This is a Non-Secure function.
    567   * \param dmtChunkData [out] - reference to dmtChunkData
    568   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    569   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    570   * - All other codes indicates failure. The description can be found in dmtError.h
    571   * \par Prospective Clients:
    572   * All potential applications that require configuration settings and Internal Classes.
    573   */
    574     SYNCML_DM_RET_STATUS_T GetNextChunk(DmtDataChunk& dmtChunkData);
    575 
    576   /**
    577   * Sets first chunk of an ESN  (External Storage Node).
    578   * \par Sync (or) Async:
    579   * This is a Synchronous function.
    580   * \par Secure (or) Non-Secure (or) N/A:
    581   * This is a Non-Secure function.
    582   * \param dmtChunkData [in] - reference to dmtChunkData
    583   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    584   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    585   * - All other codes indicates failure. The description can be found in dmtError.h
    586   * \par Prospective Clients:
    587   * All potential applications that require configuration settings and Internal Classes.
    588   */
    589     SYNCML_DM_RET_STATUS_T SetFirstChunk(DmtDataChunk& dmtChunkData);
    590 
    591   /**
    592   * Sets next chunk of an ESN  (External Storage Node).
    593   * \par Sync (or) Async:
    594   * This is a Synchronous function.
    595   * \par Secure (or) Non-Secure (or) N/A:
    596   * This is a Non-Secure function.
    597   * \param dmtChunkData [in] - reference to dmtChunkData
    598   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    599   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    600   * - All other codes indicates failure. The description can be found in dmtError.h
    601   * \par Prospective Clients:
    602   * All potential applications that require configuration settings and Internal Classes.
    603   */
    604     SYNCML_DM_RET_STATUS_T SetNextChunk(DmtDataChunk& dmtChunkData);
    605 
    606   /**
    607   * Sets last chunk of an ESN  (External Storage Node).
    608   * \par Sync (or) Async:
    609   * This is a Synchronous function.
    610   * \par Secure (or) Non-Secure (or) N/A:
    611   * This is a Non-Secure function.
    612   * \param dmtChunkData [in] - reference to dmtChunkData
    613   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    614   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    615   * - All other codes indicates failure. The description can be found in dmtError.h
    616   * \par Prospective Clients:
    617   * All potential applications that require configuration settings and Internal Classes.
    618   */
    619     SYNCML_DM_RET_STATUS_T SetLastChunk(DmtDataChunk& dmtChunkData);
    620 
    621   /**
    622   * Checks if the settings of all the ESN(External Storage Node)  under a subtree are complete.
    623   * \par Sync (or) Async:
    624   * This is a Synchronous function.
    625   * \par Secure (or) Non-Secure (or) N/A:
    626   * This is a Non-Secure function.
    627   * \return Return Type (BOOLEAN) \n
    628   * - TRUE - indicate that settings are complete. \n
    629   * - FALSE - indicate that  settings are not complete. \n
    630   * \par Prospective Clients:
    631   * All potential applications that require configuration settings and Internal Classes.
    632   */
    633     BOOLEAN IsESNSetComplete() const { return m_LobComplete;}
    634 
    635   /**
    636   * The method will commit a series of atomic operations.
    637   * \par Sync (or) Async:
    638   * This is a Synchronous function.
    639   * \par Secure (or) Non-Secure (or) N/A:
    640   * This is a Non-Secure function.
    641   * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
    642   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    643   * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
    644   * - All other codes indicates failure. The description can be found in dmtError.h
    645   * \par Prospective Clients:
    646   * All potential applications that require configuration settings and Internal Classes.
    647   */
    648     virtual SYNCML_DM_RET_STATUS_T Commit();
    649 
    650   /**
    651   * Place holder (for internal usage only !).
    652   * \warning This method should not be called !
    653   * \par Sync (or) Async:
    654   * This is a Synchronous function.
    655   * \par Secure (or) Non-Secure (or) N/A:
    656   * This is a Non-Secure function.
    657   * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
    658   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    659   * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
    660   * - All other codes indicates failure. The description can be found in dmtError.h
    661   * \par Prospective Clients:
    662   * Internal classes
    663   */
    664     virtual SYNCML_DM_RET_STATUS_T Delete();
    665 
    666   /**
    667   *  Gets the backup file name of an ESN.
    668   * \par Sync (or) Async:
    669   * This is a Synchronous function.
    670   * \par Secure (or) Non-Secure (or) N/A:
    671   * This is a Non-Secure function.
    672   * \return backup file name
    673   * \par Prospective Clients:
    674   * All potential applications that require configuration settings and Internal Classes.
    675   */
    676     CPCHAR GetESNBackupFileName(void) const {return ( !m_LobLogging &&  abStorageName != NULL) ? abStorageName.c_str() : NULL;};
    677 
    678   /**
    679   * Backs  all ESN data of a subteee.
    680   * This is a Synchronous function.
    681   * \par Secure (or) Non-Secure (or) N/A:
    682   * This is a Non-Secure function.
    683   * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
    684   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    685   * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
    686   * - All other codes indicates failure. The description can be found in dmtError.h
    687   * \par Prospective Clients:
    688   * Internal classes
    689   */
    690     SYNCML_DM_RET_STATUS_T BackupESNData();
    691 
    692   /**
    693   * Restores an ESN data from a file.
    694   * \par Sync (or) Async:
    695   * This is a Synchronous function.
    696   * \par Secure (or) Non-Secure (or) N/A:
    697   * This is a Non-Secure function.
    698   * \param szBackupFileName [in] - reference to a backup file
    699   * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
    700   * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
    701   * - All other codes indicates failure. The description can be found in dmtError.h
    702   * \par Prospective Clients:
    703   * All potential applications that require configuration settings and Internal Classes.
    704   */
    705     SYNCML_DM_RET_STATUS_T RestoreESNData( CPCHAR szBackupFileName );
    706 #endif
    707 };
    708 
    709 #endif
    710