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 __DMTPLUGIN_H__
18#define __DMTPLUGIN_H__
19
20#ifndef __cplusplus
21#error "This is a C++ header file; it requires C++ to compile."
22#endif
23
24/**
25  \file dmtPlugin.hpp
26  \brief  The dmtPlugin.hpp is a helper  header file contains constants and data types\n
27                of plugin API. Also it contains DmtPluginNode, DmtAPIPluginTree and \n
28                DmtAPIPluginTree classes definition.\n
29               <b>Warning:</b>  All functions, structures, and classes from this header file are for internal usage only!!!
30
31<P>
32
33Plugin DLLs' exported function types:<P>
34
35\code
36
37    //Mandatory function:
38    int DMT_PluginLib_GetVersion();  //Should return DMT_PLUGIN_VERSION_1_1
39
40    //Data plug-in:
41    extern "C"
42    SYNCML_DM_RET_STATUS_T DMT_PluginLib_Data_GetTree(
43    	const char * pluginRootNodePath,
44    	DMStringMap & mapParameters,	//For the Tree
45    	PDmtAPIPluginTree & pPluginTree	      //root tree for the current path
46    );
47
48    DmtPluginTree and DmtPluginNode are only used for Data plug-ins.
49
50    //Exec plug-in:
51    extern "C"
52    SYNCML_DM_RET_STATUS_T DMT_PluginLib_Execute2(
53    	const char * path,
54        DMStringMap & mapParameters,
55        CPCHAR args,
56        CPCHAR szCorrelator,
57        PDmtTree tree,
58        DMString & results);
59
60    //Constraint plug-in:
61    extern "C"
62    SYNCML_DM_RET_STATUS_T DMT_PluginLib_CheckConstraint(
63    	const char * path,
64    	DMStringMap & mapParameters,
65    	PDmtTree tree        //Global Tree with same access rights for current session
66       );
67
68    //Commit plug-in:
69    extern "C"
70    SYNCML_DM_RET_STATUS_T DMT_PluginLib_OnCommit(
71    	const DMSubscriptionVector &updatedNodes,
72    	DMStringMap& mapParameters,
73    	PDmtTree tree );
74 \endcode
75*/
76
77#include "jem_defs.hpp"
78#include "dmt.hpp"      // Use Dmt C++ API for Data Plugin
79
80/**  Version definition that should be used by both DLL and plugin*/
81#define DMT_PLUGIN_VERSION_1_1      0x00010001
82
83/** Define DMStringMap for plugins*/
84typedef  DMMap<DMString, DMString> DMStringMap;
85
86/** Define DmtOverlayPluginData for plugins*/
87typedef DMVector<unsigned char> DmtOverlayPluginData;
88
89/** Overlay plugin synchronization data */
90struct DmtOverlayPluginSyncData
91{
92/** possible values for a status */
93  enum {
94  	/** status deleted */
95  	enum_StatusDeleted,
96  	/** status unchanged */
97  	enum_StatusUnchanged,
98  	/** status added */
99  	enum_StatusAdded
100  };
101   /** node name */
102  DMString m_strNodeName;
103   /** plugin data */
104  DmtOverlayPluginData m_oData;
105   /** node status */
106  UINT8     m_nStatus;
107};
108
109/**
110*  Device management plugin tree API class; inherited from  the DmtTree class.
111* \par Category: General
112* \par Persistence: Transient
113* \par Security: Non-Secure
114* \par Migration State: FINAL
115*/
116class DmtAPIPluginTree : public DmtTree
117{
118 public:
119
120  /**
121  * Will be called by DM Engine whenever in prior to add multi-nodes with flag "storesPD".
122  * \par Sync (or) Async:
123  * This is a Synchronous function.
124  * \par Secure (or) Non-Secure (or) N/A:
125  * This is a Non-Secure function.
126  * \param path [in] - node path
127  * \param data [in] - reference to a node data
128  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
129  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
130  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
131  * - All other codes indicates failure. The description can be found in dmtError.h \n
132  * \par Prospective Clients:
133  * All potential applications that require configuration settings and Internal Classes.
134  */
135  virtual SYNCML_DM_RET_STATUS_T OnAdd( CPCHAR path, DmtOverlayPluginData& data );
136
137  /**
138  * Will be called by DM Engine whenever in prior to delete multi-nodes with flag "storesPD".
139  * \par Sync (or) Async:
140  * This is a Synchronous function.
141  * \par Secure (or) Non-Secure (or) N/A:
142  * This is a Non-Secure function.
143  * \param path [in] - node path
144  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
145  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
146  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
147  * - All other codes indicates failure. The description can be found in dmtError.h \n
148  * \par Prospective Clients:
149  * All potential applications that require configuration settings and Internal Classes.
150  */
151  virtual SYNCML_DM_RET_STATUS_T OnDelete( CPCHAR path );
152
153  /**
154  * Will be called by DM Engine to make synchronization in prior execution other functions.
155  * \par Sync (or) Async:
156  * This is a Synchronous function.
157  * \par Secure (or) Non-Secure (or) N/A:
158  * This is a Non-Secure function.
159  * \param path [in] - node path
160  * \param data [in] - vector with data
161  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
162  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
163  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
164  * - All other codes indicates failure. The description can be found in dmtError.h \n
165  * \par Prospective Clients:
166  * All potential applications that require configuration settings and Internal Classes.
167  */
168  virtual SYNCML_DM_RET_STATUS_T Synchronize( const char* path, DMVector<DmtOverlayPluginSyncData>& data );
169
170  /**
171  * Called whenever plugin is unloaded to help free all resources
172  * \par Sync (or) Async:
173  * This is a Synchronous function.
174  * \par Secure (or) Non-Secure (or) N/A:
175  * This is a Non-Secure function.
176  * \par Prospective Clients:
177  * All potential applications that require configuration settings and Internal Classes.
178  */
179  virtual void Release();
180
181 /**
182  * Flushs memory
183  * \par Sync (or) Async:
184  * This is a Synchronous function.
185  * \par Secure (or) Non-Secure (or) N/A:
186  * This is a Non-Secure function.
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 \n
190  * \par Prospective Clients:
191  * All potential applications that require configuration settings and Internal Classes.
192  */
193  virtual SYNCML_DM_RET_STATUS_T Flush();
194
195  /**
196  * Finds added node
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] - CPCHAR path to added node
202  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
203  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
204  * - All other codes indicates failure. The description can be found in dmtError.h \n
205  * \par Prospective Clients:
206  * All potential applications that require configuration settings and Internal Classes.
207  */
208  virtual SYNCML_DM_RET_STATUS_T FindAddedNode(CPCHAR path);
209
210  /**
211  * Finds added parent node
212  * \par Sync (or) Async:
213  * This is a Synchronous function.
214  * \par Secure (or) Non-Secure (or) N/A:
215  * This is a Non-Secure function.
216  * \param path [in] - CPCHAR path to added parent node
217  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
218  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
219  * - All other codes indicates failure. The description can be found in dmtError.h \n
220  * \par Prospective Clients:
221  * All potential applications that require configuration settings and Internal Classes.
222  */
223  virtual SYNCML_DM_RET_STATUS_T FindAddedParentNode(CPCHAR path);
224
225  /**
226  * Sets added node
227  * \par Sync (or) Async:
228  * This is a Synchronous function.
229  * \par Secure (or) Non-Secure (or) N/A:
230  * This is a Non-Secure function.
231  * \param ptrNode [in] - reference to a node
232  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
233  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
234  * - All other codes indicates failure. The description can be found in dmtError.h \n
235  * \par Prospective Clients:
236  * All potential applications that require configuration settings and Internal Classes.
237  */
238  virtual SYNCML_DM_RET_STATUS_T SetAddedNode(PDmtNode ptrNode);
239
240  /**
241  * Removes added node
242  * \par Sync (or) Async:
243  * This is a Synchronous function.
244  * \par Secure (or) Non-Secure (or) N/A:
245  * This is a Non-Secure function.
246  * \param path [in] - CPCHAR path to added node
247  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
248  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
249  * - All other codes indicates failure. The description can be found in dmtError.h \n
250  * \par Prospective Clients:
251  * All potential applications that require configuration settings and Internal Classes.
252  */
253  virtual SYNCML_DM_RET_STATUS_T RemoveAddedNode(CPCHAR path);
254
255
256  /**
257  * Sets principal for the plugin tree
258  * \par Sync (or) Async:
259  * This is a Synchronous function.
260  * \par Secure (or) Non-Secure (or) N/A:
261  * This is a Non-Secure function.
262  * \param strPrincipal [in] - principal string for the session
263  * \return  Return Type (BOOLEAN)
264  * - TRUE -set principal successful
265  * - FALSE -set principal fail
266  * \par Prospective Clients:
267  * All potential applications that require configuration settings and Internal Classes.
268  */
269   virtual BOOLEAN SetPrincipal( CPCHAR strPrincipal );
270
271/**
272* Retrieves a principal
273  * \par Sync (or) Async:
274  * This is a Synchronous function.
275  * \par Secure (or) Non-Secure (or) N/A:
276  * This is a Non-Secure function.
277  * \return the DmtPrincipal object that the session was created with.
278  * \par Prospective Clients:
279  * All potential applications that require configuration settings and Internal Classes.
280  */
281   virtual DmtPrincipal GetPrincipal() const;
282
283
284protected:
285 /** DmtAPIPluginTree class member contains	list of added nodes*/
286  DMVector<PDmtNode> m_oAddedNodes;
287 /** DmtAPIPluginTree class member contains	principal*/
288  DmtPrincipal m_Principal;
289
290};
291
292/** Define PDmtAPIPluginTree for plugins*/
293typedef JemSmartPtr< DmtAPIPluginTree > PDmtAPIPluginTree;
294
295
296class DmtPluginTree;
297class DmtPluginNode;
298
299/** Define Dmt Plugin Tree smart pointer for plugins*/
300typedef JemSmartPtr< DmtPluginTree > PDmtPluginTree;
301
302/** Define Dmt Plugin Node smart pointer for plugins*/
303typedef JemSmartPtr< DmtPluginNode > PDmtPluginNode;
304
305
306/** Has parent DmtAPIPluginTree class; handle operation with nodes and other tasks:\n
307*    1. Provide default implementation for many DmtTree virtual functions for ease of plugin development.\n
308*    2. Support default power failure recovery internally. \n
309*    3. Support plugin node to check parameters for each different node (GerNodeParameters).
310* \par Category: General
311* \par Persistence: Transient
312* \par Security: Non-Secure
313* \par Migration State: FINAL
314*/
315
316class DmtPluginTree : public DmtAPIPluginTree
317{
318   //With some default Implementation of the DmtTree API including helper functions
319protected:
320
321   DMString m_strRootPath;
322   DMMap<DMString, PDmtNode> m_Nodes;
323
324   /** Protected destructor */
325   virtual ~DmtPluginTree();
326
327public:
328
329  /**
330  * Default constructor - no memory allocation performed.
331  */
332   DmtPluginTree();
333
334public:
335
336/**
337  * Initializes DM tree
338  * \par Sync (or) Async:
339  * This is a Synchronous function.
340  * \par Secure (or) Non-Secure (or) N/A:
341  * This is a Non-Secure function.
342  * \param rootNodePath [in] - path to root node
343  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
344  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
345  * - SYNCML_DM_DEVICE_FULL - indicating the operation cannot be performed. \n
346  * - All other codes indicates failure. The description can be found in dmtError.h \n
347  * \par Prospective Clients:
348  * All potential applications that require configuration settings and Internal Classes.
349  */
350   virtual SYNCML_DM_RET_STATUS_T Init( CPCHAR rootNodePath );
351
352  /**
353  * Retrieves full path to node
354  * \par Sync (or) Async:
355  * This is a Synchronous function.
356  * \par Secure (or) Non-Secure (or) N/A:
357  * This is a Non-Secure function.
358  * \param path [in] - path to a node
359  * \param fullPath [out] - full path to a node
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 \n
363  * \par Prospective Clients:
364  * All potential applications that require configuration settings and Internal Classes.
365  */
366   virtual SYNCML_DM_RET_STATUS_T GetFullPath( CPCHAR path,
367                                                 DMString & fullPath ) const;
368
369  /**
370  * Retrieves  node by given path
371  * \par Sync (or) Async:
372  * This is a Synchronous function.
373  * \par Secure (or) Non-Secure (or) N/A:
374  * This is a Non-Secure function.
375  * \param path [in] - path to a node
376  * \param ptrNode [out] - reference to a node
377  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
378  * - SYNCML_DM_NOT_FOUND - indicating the operation cannot be performed. \n
379  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
380  * - All other codes indicates failure. The description can be found in dmtError.h \n
381  * \par Prospective Clients:
382  * All potential applications that require configuration settings and Internal Classes.
383  */
384   virtual SYNCML_DM_RET_STATUS_T GetNode( CPCHAR path,
385                                              PDmtNode& ptrNode );
386
387  /**
388  * Retrieves  child nodes names by given path
389  * \par Sync (or) Async:
390  * This is a Synchronous function.
391  * \par Secure (or) Non-Secure (or) N/A:
392  * This is a Non-Secure function.
393  * \param path [in] - path to a node
394  * \param mapNodes [out] - vector with child nodes
395  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
396  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
397  * - All other codes indicates failure. The description can be found in dmtError.h
398  * \par Prospective Clients:
399  * All potential applications that require configuration settings and Internal Classes.
400  */
401   virtual SYNCML_DM_RET_STATUS_T GetChildNodeNames( CPCHAR path,
402                                                           DMStringVector& mapNodes );
403  /**
404  * Default atomicity support will be provided here
405  * \par Sync (or) Async:
406  * This is a Synchronous function.
407  * \par Secure (or) Non-Secure (or) N/A:
408  * This is a Non-Secure function.
409  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
410  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
411  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
412  * - All other codes indicates failure. The description can be found in dmtError.h
413  * \par Prospective Clients:
414  * All potential applications that require configuration settings and Internal Classes.
415  */
416   virtual SYNCML_DM_RET_STATUS_T Flush();
417
418  /**
419  * Checks for atomicity.
420  * \par Sync (or) Async:
421  * This is a Synchronous function.
422  * \par Secure (or) Non-Secure (or) N/A:
423  * This is a Non-Secure function.
424  * \return '"false", not supported.
425  * \par Prospective Clients:
426  * All potential applications that require configuration settings and Internal Classes.
427  */
428   virtual BOOLEAN IsAtomic() const;
429
430  /**
431  * Begins an atomic operation that will end with commit() or rollback();
432  * \par Sync (or) Async:
433  * This is a Synchronous function.
434  * \par Secure (or) Non-Secure (or) N/A:
435  * This is a Non-Secure function.
436  * returns an error code if a transaction is running already.
437  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
438  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
439  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
440  * - All other codes indicates failure. The description can be found in dmtError.h
441  * \par Prospective Clients:
442  * All potential applications that require configuration settings and Internal Classes.
443  */
444   virtual SYNCML_DM_RET_STATUS_T Begin();
445
446  /**
447  * The method will commit a series of atomic operations
448  * \par Sync (or) Async:
449  * This is a Synchronous function.
450  * \par Secure (or) Non-Secure (or) N/A:
451  * This is a Non-Secure function.
452  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
453  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
454  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
455  * - All other codes indicates failure. The description can be found in dmtError.h
456  * \par Prospective Clients:
457  * All potential applications that require configuration settings and Internal Classes.
458  */
459   virtual SYNCML_DM_RET_STATUS_T Commit();
460
461  /**
462   * The method will rollback a series of atomic operations
463  * \par Sync (or) Async:
464  * This is a Synchronous function.
465  * \par Secure (or) Non-Secure (or) N/A:
466  * This is a Non-Secure function.
467  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
468  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
469  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
470  * - All other codes indicates failure. The description can be found in dmtError.h
471  * \par Prospective Clients:
472  * All potential applications that require configuration settings and Internal Classes.
473  */
474   virtual SYNCML_DM_RET_STATUS_T Rollback() ;
475
476  /**
477   * Deletes a node according to the specified path
478  * \par Sync (or) Async:
479  * This is a Synchronous function.
480  * \par Secure (or) Non-Secure (or) N/A:
481  * This is a Non-Secure function.
482  * \param path [in] - full path to the node
483  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
484  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
485  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
486  * - All other codes indicates failure. The description can be found in dmtError.h
487  * \par Prospective Clients:
488  * All potential applications that require configuration settings and Internal Classes.
489  */
490   virtual SYNCML_DM_RET_STATUS_T DeleteNode( CPCHAR path );
491
492  /**
493  * Changes node's name. For example: RenameNode( "./SyncML/DMAcc/Test", "NewTest" );
494  * \par Sync (or) Async:
495  * This is a Synchronous function.
496  * \par Secure (or) Non-Secure (or) N/A:
497  * This is a Non-Secure function.
498  * \param path [in] - path to the node
499  * \param szNewNodeName [in] - new node name
500  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
501  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
502  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
503  * - All other codes indicates failure. The description can be found in dmtError.h
504  * \par Prospective Clients:
505  * All potential applications that require configuration settings and Internal Classes.
506  */
507   virtual SYNCML_DM_RET_STATUS_T RenameNode( CPCHAR path,
508                                                   CPCHAR szNewNodeName );
509
510  /**
511   * Creates an interior node in the tree.
512  * \par Sync (or) Async:
513  * This is a Synchronous function.
514  * \par Secure (or) Non-Secure (or) N/A:
515  * This is a Non-Secure function.
516  * \param path [in] - path to the node
517  * \param ptrCreatedNode [out] - new created node
518  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
519  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
520  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
521  * - All other codes indicates failure. The description can be found in dmtError.h
522  * \par Prospective Clients:
523  * All potential applications that require configuration settings and Internal Classes.
524  */
525   virtual SYNCML_DM_RET_STATUS_T CreateInteriorNode( CPCHAR path,
526                                                         PDmtNode& ptrCreatedNode );
527
528
529  /**
530   * Creates a leaf node in the tree.
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 path [in] - path to the node
536  * \param ptrCreatedNode [out] - new created node
537  * \param value [in] - data value DmtData type
538  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
539  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
540  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
541  * - All other codes indicates failure. The description can be found in dmtError.h
542  * \par Prospective Clients:
543  * All potential applications that require configuration settings and Internal Classes.
544  */
545   virtual SYNCML_DM_RET_STATUS_T CreateLeafNode( CPCHAR path,
546                                                      PDmtNode& ptrCreatedNode,
547                                                      const DmtData& value );
548
549  /**
550   * Creates a leaf node in the tree.
551  * \par Sync (or) Async:
552  * This is a Synchronous function.
553  * \par Secure (or) Non-Secure (or) N/A:
554  * This is a Non-Secure function.
555  * \param path [in] - path to the node
556  * \param ptrCreatedNode [out] - new created node
557  * \param value [in] - data value DmtData type
558  * \param isESN [in] - TRUE if path is to an ESN node, otherwise -FALSE
559  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
560  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
561  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
562  * - All other codes indicates failure. The description can be found in dmtError.h
563  * \par Prospective Clients:
564  * All potential applications that require configuration settings and Internal Classes.
565  */
566   virtual SYNCML_DM_RET_STATUS_T CreateLeafNode(CPCHAR path,
567						   PDmtNode& ptrCreatedNode,
568						   const DmtData& value ,
569						   BOOLEAN isESN);
570
571   /**
572  * Releases DM tree
573  * \par Sync (or) Async:
574  * This is a Synchronous function.
575  * \par Secure (or) Non-Secure (or) N/A:
576  * This is a Non-Secure function.
577  * \par Prospective Clients:
578  * All potential applications that require configuration settings and Internal Classes.
579  */
580   virtual void Release();
581
582public:
583
584   //Other Helper Function Implementation for the Tree, NOT used
585
586  /**
587  * <b>NOT used</b>. Creates a sibling of the node specified by its URI "path".
588  * This new node's name is user-specified as "szNewNodename".
589  * \par Sync (or) Async:
590  * This is a Synchronous function.
591  * \par Secure (or) Non-Secure (or) N/A:
592  * This is a Non-Secure function.
593  * \param path [in] - URI of node to be cloned.
594  * \param szNewNodename [in] - new node name as specified by user.
595  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
596  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
597  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
598  * - All other codes indicates failure. The description can be found in dmtError.h
599  * \par Prospective Clients:
600  * All potential applications that require configuration settings and Internal Classes.
601  */
602   virtual SYNCML_DM_RET_STATUS_T Clone(CPCHAR path,
603                                          CPCHAR szNewNodename);
604
605  /**
606  * <b>NOT used</b>. . This is a  helper method. It will return a table of all leaf nodes of the current node.
607  * The table key is the child node name, and value is the string node value. It sets leaf nodes only.
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 path [in] - path to the node
613  * \param mapNodes [out] - map with leaf nodes only
614  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
615  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
616  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
617  * - All other codes indicates failure. The description can be found in dmtError.h
618  * \par Prospective Clients:
619  * All potential applications that require configuration settings and Internal Classes.
620  */
621   virtual SYNCML_DM_RET_STATUS_T GetChildValuesMap( CPCHAR path,
622                                                          DMMap<DMString, DmtData>& mapNodes );
623
624  /**
625  * <b>NOT used</b>. This is a  helper method. It will delete all leaf nodes and creates new which are provided in the map.
626  * The table key is the child node name, and value is the node value. It changes leaf nodes only.
627  * \par Sync (or) Async:
628  * This is a Synchronous function.
629  * \par Secure (or) Non-Secure (or) N/A:
630  * This is a Non-Secure function.
631  * \param path [in] - path to the node
632  * \param mapNodes [in] - map with leaf nodes only
633  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
634  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
635  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
636  * - All other codes indicates failure. The description can be found in dmtError.h
637  * \par Prospective Clients:
638  * All potential applications that require configuration settings and Internal Classes.
639  */
640   virtual SYNCML_DM_RET_STATUS_T SetChildValuesMap( CPCHAR path,
641                                                          const DMMap<DMString, DmtData>& mapNodes );
642
643public:
644   //
645   //Additional API for Recovery and 2-phase commit for multiple plugins.
646   //For future expansion. Currently not used
647   //
648   /**
649  * Additional API for Recovery and 2-phase commit for multiple plugins.
650  * \warning This API is for the future expansion  and currently <b>NOT used</b>.
651  * \par Sync (or) Async:
652  * This is a Synchronous function.
653  * \par Secure (or) Non-Secure (or) N/A:
654  * This is a Non-Secure function.
655  * \return status code. Return Type (SYNCML_DM_RET_STATUS_T) \n
656  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
657  * - All other codes indicates failure. The description can be found in dmtError.h
658  * \par Prospective Clients:
659  * All potential applications that require configuration settings and Internal Classes.
660  */
661   virtual SYNCML_DM_RET_STATUS_T Verify();
662
663
664   //Additional API to shield plugins from accessing engine functions directly
665   // i.e. to get parameters for each plugin Node
666   // this is more generic since they can query *ANY* other parameters
667 /**
668  * Additional API to shield plugins from accessing engine functions directly  (i.e. to get parameters for each plugin Node).
669  * This is more generic since they can query *ANY* other parameters.
670  * \par Sync (or) Async:
671  * This is a Synchronous function.
672  * \par Secure (or) Non-Secure (or) N/A:
673  * This is a Non-Secure function.
674  * \param name [in] - parameter name
675  * \param value [out] - parameter value
676  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
677  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
678  * - SYNCML_DM_NOT_FOUND - indicating the operation cannot be performed. \n
679  * - All other codes indicates failure. The description can be found in dmtError.h
680  * \par Prospective Clients:
681  * All potential applications that require configuration settings and Internal Classes.
682  */
683   virtual SYNCML_DM_RET_STATUS_T GetParameter(CPCHAR name,
684                                                  DMString & value);
685
686   //
687   // Helper set Functions for shared library developer to use
688   //
689 /**
690  *  This is a  helper method. It will set Functions for shared library developer to use.
691  * \par Sync (or) Async:
692  * This is a Synchronous function.
693  * \par Secure (or) Non-Secure (or) N/A:
694  * This is a Non-Secure function.
695  * \param path [in] - node path
696  * \param node [out] - node to be set
697  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
698  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
699  * - All other codes indicates failure. The description can be found in dmtError.h
700  * \par Prospective Clients:
701  * All potential applications that require configuration settings and Internal Classes.
702  */
703
704   SYNCML_DM_RET_STATUS_T SetNode(CPCHAR path,
705                                    PDmtNode node);
706
707 /**
708  * Removes node fron the tree
709  * \par Sync (or) Async:
710  * This is a Synchronous function.
711  * \par Secure (or) Non-Secure (or) N/A:
712  * This is a Non-Secure function.
713  * \param path [in] - node path
714  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
715  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
716  * - All other codes indicates failure. The description can be found in dmtError.h
717  * \par Prospective Clients:
718  * All potential applications that require configuration settings and Internal Classes.
719  */
720   SYNCML_DM_RET_STATUS_T RemoveNode(CPCHAR path);
721
722 /**
723  * Removes all nodes
724  * \par Sync (or) Async:
725  * This is a Synchronous function.
726  * \par Secure (or) Non-Secure (or) N/A:
727  * This is a Non-Secure function.
728  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
729  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
730  * - All other codes indicates failure. The description can be found in dmtError.h
731  * \par Prospective Clients:
732  * All potential applications that require configuration settings and Internal Classes.
733  */
734   SYNCML_DM_RET_STATUS_T ClearNodes();
735
736};
737
738
739/**
740* Class DmtPluginNode for default read only plugin node implementation.
741* \par Category: General
742* \par Persistence: Transient
743* \par Security: Non-Secure
744* \par Migration State: FINAL
745*/
746class DmtPluginNode : public DmtNode
747{
748protected:
749   BOOLEAN   m_bLeaf;
750   DMString  m_strPath;
751   PDmtPluginTree  m_ptrTree;
752   DMString  m_strName;
753   DmtData   m_oData;
754   DMString  m_strTitle;
755   DmtAttributes m_oAttr;
756   BOOLEAN  m_bESN;
757   /** Protected destructor is changed to public destructor*/
758public:
759   virtual ~DmtPluginNode();
760
761
762public:
763  /**
764  * Default constructor - no memory allocation performed.
765  */
766   DmtPluginNode();
767
768 /**
769  * Initializes plugin
770  * \par Sync (or) Async:
771  * This is a Synchronous function.
772  * \par Secure (or) Non-Secure (or) N/A:
773  * This is a Non-Secure function.
774  * \param  ptrTree [in] - DM tree pointer
775  * \param path [in] - path
776  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
777  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
778  * - All other codes indicates failure. The description can be found in dmtError.h
779  * \par Prospective Clients:
780  * All potential applications that require configuration settings and Internal Classes.
781  */
782   virtual SYNCML_DM_RET_STATUS_T Init(PDmtPluginTree ptrTree,
783                                      CPCHAR path);
784 /**
785  * Initializes plugin
786  * \par Sync (or) Async:
787  * This is a Synchronous function.
788  * \par Secure (or) Non-Secure (or) N/A:
789  * This is a Non-Secure function.
790  * \param ptrTree [in] - DM tree pointer
791  * \param path [in] - path
792  * \param isleaf [in] - TRUE if path is to leaf node, otherwise -FALSE
793  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
794  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
795  * - All other codes indicates failure. The description can be found in dmtError.h
796  * \par Prospective Clients:
797  * All potential applications that require configuration settings and Internal Classes.
798  */
799   virtual SYNCML_DM_RET_STATUS_T Init(PDmtPluginTree ptrTree,
800                                      CPCHAR path,
801                                      BOOLEAN isleaf);
802
803   /**
804  * Initializes plugin
805  * \par Sync (or) Async:
806  * This is a Synchronous function.
807  * \par Secure (or) Non-Secure (or) N/A:
808  * This is a Non-Secure function.
809  * \param ptrTree [in] - DM tree pointer
810  * \param path [in] - path
811  * \param oData [in] - node data
812  * \param isESN [in] - TRUE if path is to an ESN node, otherwise -FALSE
813  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
814  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
815  * - All other codes indicates failure. The description can be found in dmtError.h
816  * \par Prospective Clients:
817  * All potential applications that require configuration settings and Internal Classes.
818  */
819   virtual SYNCML_DM_RET_STATUS_T Init(PDmtPluginTree ptrTree,
820                                      CPCHAR path,
821                                      const DmtData & oData,
822                                      BOOLEAN isESN = FALSE);
823 /**
824  * Initializes plugin
825  * \par Sync (or) Async:
826  * This is a Synchronous function.
827  * \par Secure (or) Non-Secure (or) N/A:
828  * This is a Non-Secure function.
829  * \param ptrTree [in] - DM tree pointer
830  * \param path [in] - path
831  * \param childNodeNames [in] - vector with child node names
832  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
833  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
834  * - All other codes indicates failure. The description can be found in dmtError.h
835  * \par Prospective Clients:
836  * All potential applications that require configuration settings and Internal Classes.
837  */
838   virtual SYNCML_DM_RET_STATUS_T Init(PDmtPluginTree ptrTree,
839                                      CPCHAR path,
840                                      const DMStringVector & childNodeNames);
841
842
843  /**
844  * Could set empty DmtData object if there is no value associated with it.
845  * The DmtValue is a copy of current data of the node. The node value will not
846  * be changed until a <i>setValue()</i> is called.
847  * \par Sync (or) Async:
848  * This is a Synchronous function.
849  * \par Secure (or) Non-Secure (or) N/A:
850  * This is a Non-Secure function.
851  * \param oData [out] - reference to DmtData object
852  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
853  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
854  * - All other codes indicates failure. The description can be found in dmtError.h
855  * \par Prospective Clients:
856  * All potential applications that require configuration settings and Internal Classes.
857  */
858   virtual SYNCML_DM_RET_STATUS_T GetValue( DmtData& oData ) const;
859
860
861   //Attributes May also need to be replaced IF DmtData size is not WWW
862 /**
863  * Gets a copy of DmtAttributes, user can modify the DmtAttributes individually
864  * but any change made to DmtAttributes will not propagated to the Node until a <i>setAttributes()</i> is called.
865  * \par Sync (or) Async:
866  * This is a Synchronous function.
867  * \par Secure (or) Non-Secure (or) N/A:
868  * This is a Non-Secure function.
869  * \param  oAttr [out] - reference to DM tree attributes
870  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
871  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
872  * - All other codes indicates failure. The description can be found in dmtError.h
873  * \par Prospective Clients:
874  * All potential applications that require configuration settings and Internal Classes.
875  */
876   virtual SYNCML_DM_RET_STATUS_T GetAttributes( DmtAttributes& oAttr ) const;
877
878 /**
879  * Retrieves tree
880  * \par Sync (or) Async:
881  * This is a Synchronous function.
882  * \par Secure (or) Non-Secure (or) N/A:
883  * This is a Non-Secure function.
884  * \param ptrTree [out] - reference to the DM tree
885  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
886  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
887  * - All other codes indicates failure. The description can be found in dmtError.h
888  * \par Prospective Clients:
889  * All potential applications that require configuration settings and Internal Classes.
890  */
891   virtual SYNCML_DM_RET_STATUS_T GetTree( PDmtTree& ptrTree ) const;
892
893  /**
894  * Retrieves path
895  * \par Sync (or) Async:
896  * This is a Synchronous function.
897  * \par Secure (or) Non-Secure (or) N/A:
898  * This is a Non-Secure function.
899  * \param path [out] - reference to path in the tree
900  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
901  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
902  * - SYNCML_DM_DEVICE_FULL - indicating the operation cannot be performed. \n
903  * - All other codes indicates failure. The description can be found in dmtError.h
904  * \par Prospective Clients:
905  * All potential applications that require configuration settings and Internal Classes.
906  */
907   virtual SYNCML_DM_RET_STATUS_T GetPath(DMString & path) const;
908
909   /**
910  * Updates title information for the node.
911  * \par Sync (or) Async:
912  * This is a Synchronous function.
913  * \par Secure (or) Non-Secure (or) N/A:
914  * This is a Non-Secure function.
915  * \param szTitle [in] - node titles string
916  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
917  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
918  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
919  * - All other codes indicates failure. The description can be found in dmtError.h
920  * \par Prospective Clients:
921  * All potential applications that require configuration settings and Internal Classes.
922  */
923   virtual SYNCML_DM_RET_STATUS_T SetTitle( CPCHAR szTitle );
924
925  /**
926   * Updates ACL for the node.
927  * \par Sync (or) Async:
928  * This is a Synchronous function.
929  * \par Secure (or) Non-Secure (or) N/A:
930  * This is a Non-Secure function.
931  * \param oAcl [in] - reference to DMT ACL object
932  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
933  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
934  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
935  * - All other codes indicates failure. The description can be found in dmtError.h
936  * \par Prospective Clients:
937  * All potential applications that require configuration settings and Internal Classes.
938  */
939   virtual SYNCML_DM_RET_STATUS_T SetAcl( const DmtAcl& oAcl );
940
941  /**
942  * Changes the value of a node. If not successful, return an error code
943  * \par Sync (or) Async:
944  * This is a Synchronous function.
945  * \par Secure (or) Non-Secure (or) N/A:
946  * This is a Non-Secure function.
947  * \param value [in] - new node value
948  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
949  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
950  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
951  * - All other codes indicates failure. The description can be found in dmtError.h
952  * \par Prospective Clients:
953  * All potential applications that require configuration settings and Internal Classes.
954  */
955   virtual SYNCML_DM_RET_STATUS_T SetValue( const DmtData& value );
956
957  /**
958  * Fills in oChildren list of child nodes
959  * \par Sync (or) Async:
960  * This is a Synchronous function.
961  * \par Secure (or) Non-Secure (or) N/A:
962  * This is a Non-Secure function.
963  * \param oChildren [out] - vector for child nodes
964  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
965  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
966  * - All other codes indicates failure. The description can be found in dmtError.h
967  * \par Prospective Clients:
968  * All potential applications that require configuration settings and Internal Classes.
969  */
970   virtual SYNCML_DM_RET_STATUS_T GetChildNodes( DMVector<PDmtNode>& oChildren ) const;
971
972  /**
973   * Checks if a node is leaf
974  * \par Sync (or) Async:
975  * This is a Synchronous function.
976  * \par Secure (or) Non-Secure (or) N/A:
977  * This is a Non-Secure function.
978  * \return TRUE if the node is a leaf, otherwise - FALSE
979  * \par Prospective Clients:
980  * All potential applications that require configuration settings and Internal Classes.
981  */
982   virtual BOOLEAN IsLeaf() const;
983
984  /**
985   * Executes a node according to the specified path. Pass a String parameter to the executable code
986  * \par Sync (or) Async:
987  * This is a Synchronous function.
988  * \par Secure (or) Non-Secure (or) N/A:
989  * This is a Non-Secure function.
990  * \param strData [in] - data to be executed as a string
991  * \param result [out] - the result of executing will be set to this string
992  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
993  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
994  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
995  * - All other codes indicates failure. The description can be found in dmtError.h
996  * \par Prospective Clients:
997  * All potential applications that require configuration settings and Internal Classes.
998  */
999   virtual SYNCML_DM_RET_STATUS_T Execute( CPCHAR strData, DMString& result );
1000
1001  /**
1002  * Gets the name of the node.
1003  * \par Sync (or) Async:
1004  * This is a Synchronous function.
1005  * \par Secure (or) Non-Secure (or) N/A:
1006  * This is a Non-Secure function.
1007  * param node [out] - name string
1008  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1009  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1010  * - SYNCML_DM_DEVICE_FULL - indicating the operation cannot be performed. \n
1011  * - All other codes indicates failure. The description can be found in dmtError.h
1012  * \par Prospective Clients:
1013  * All potential applications that require configuration settings and Internal Classes.
1014  */
1015   virtual SYNCML_DM_RET_STATUS_T GetNodeName(DMString & name) const;
1016
1017  /**
1018  * Gets  name of a node.
1019  * \par Sync (or) Async:
1020  * This is a Synchronous function.
1021  * \par Secure (or) Non-Secure (or) N/A:
1022  * This is a Non-Secure function.
1023  * \return  name of a node as DMString.
1024  * \par Prospective Clients:
1025  * All potential applications that require configuration settings and Internal Classes.
1026  */
1027   virtual DMString GetNodeName() const { return m_strName; };
1028
1029  /**
1030   * Renames a node.
1031  * \par Sync (or) Async:
1032  * This is a Synchronous function.
1033  * \par Secure (or) Non-Secure (or) N/A:
1034  * This is a Non-Secure function.
1035  * param szNewName [in] - new name
1036  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1037  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1038  * - SYNCML_DM_FEATURE_NOT_SUPPORTED - indicate that this operation is not supported for "read only" plugins.
1039  * - All other codes indicates failure. The description can be found in dmtError.h
1040  * \par Prospective Clients:
1041  * All potential applications that require configuration settings and Internal Classes.
1042  */
1043   SYNCML_DM_RET_STATUS_T Rename( CPCHAR szNewName );
1044
1045  /**
1046   * Sets child node object by name
1047  * \par Sync (or) Async:
1048  * This is a Synchronous function.
1049  * \par Secure (or) Non-Secure (or) N/A:
1050  * This is a Non-Secure function.
1051  * \param szPath [in] - name of node
1052  * \param ptrNode [out] - reference to DmtNode
1053  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1054  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1055  * - All other codes indicates failure. The description can be found in dmtError.h
1056  * \par Prospective Clients:
1057  * All potential applications that require configuration settings and Internal Classes.
1058  */
1059   virtual SYNCML_DM_RET_STATUS_T GetChildNode( CPCHAR szPath, PDmtNode& ptrNode  );
1060
1061  /**
1062  * Gets first chunk of an ESN (External Storage Node).
1063  * \par Sync (or) Async:
1064  * This is a Synchronous function.
1065  * \par Secure (or) Non-Secure (or) N/A:
1066  * This is a Non-Secure function.
1067  * \param dmtChunkData [out] - reference to dmtChunkData
1068  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1069  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1070  * - All other codes indicates failure. The description can be found in dmtError.h
1071  * \par Prospective Clients:
1072  * All potential applications that require configuration settings and Internal Classes.
1073  */
1074   virtual SYNCML_DM_RET_STATUS_T GetFirstChunk(DmtDataChunk&  dmtChunkData);
1075  /**
1076   * Gets next chunk of an ESN  (External Storage Node).
1077  * \par Sync (or) Async:
1078  * This is a Synchronous function.
1079  * \par Secure (or) Non-Secure (or) N/A:
1080  * This is a Non-Secure function.
1081  * \param dmtChunkData [out] - reference to dmtChunkData
1082  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1083  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1084  * - All other codes indicates failure. The description can be found in dmtError.h
1085  * \par Prospective Clients:
1086  * All potential applications that require configuration settings and Internal Classes.
1087  */
1088   virtual SYNCML_DM_RET_STATUS_T GetNextChunk(DmtDataChunk& dmtChunkData);
1089
1090  /**
1091  * Sets first chunk of an ESN  (External Storage Node).
1092  * \par Sync (or) Async:
1093  * This is a Synchronous function.
1094  * \par Secure (or) Non-Secure (or) N/A:
1095  * This is a Non-Secure function.
1096  * \param dmtChunkData [in] - reference to dmtChunkData
1097  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1098  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1099  * - All other codes indicates failure. The description can be found in dmtError.h
1100  * \par Prospective Clients:
1101  * All potential applications that require configuration settings and Internal Classes.
1102  */
1103   virtual SYNCML_DM_RET_STATUS_T SetFirstChunk(DmtDataChunk& dmtChunkData);
1104
1105  /**
1106  * Sets next chunk of an ESN  (External Storage Node).
1107  * \par Sync (or) Async:
1108  * This is a Synchronous function.
1109  * \par Secure (or) Non-Secure (or) N/A:
1110  * This is a Non-Secure function.
1111  * \param dmtChunkData [in] - reference to dmtChunkData
1112  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1113  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1114  * - All other codes indicates failure. The description can be found in dmtError.h
1115  * \par Prospective Clients:
1116  * All potential applications that require configuration settings and Internal Classes.
1117  */
1118   virtual SYNCML_DM_RET_STATUS_T SetNextChunk(DmtDataChunk& dmtChunkData);
1119
1120  /**
1121  * Sets last chunk of an ESN  (External Storage Node).
1122  * \par Sync (or) Async:
1123  * This is a Synchronous function.
1124  * \par Secure (or) Non-Secure (or) N/A:
1125  * This is a Non-Secure function.
1126  * \param dmtChunkData [in] - reference to dmtChunkData
1127  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1128  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1129  * - All other codes indicates failure. The description can be found in dmtError.h
1130  * \par Prospective Clients:
1131  * All potential applications that require configuration settings and Internal Classes.
1132  */
1133   virtual SYNCML_DM_RET_STATUS_T SetLastChunk(DmtDataChunk& dmtChunkData);
1134
1135  /**
1136   * Checks if a Node is  an ESN  (External Storage Node).
1137  * \par Sync (or) Async:
1138  * This is a Synchronous function.
1139  * \par Secure (or) Non-Secure (or) N/A:
1140  * This is a Non-Secure function.
1141  * \return Return Type (BOOLEAN) \n
1142  * - TRUE - indicating it is an ESN node. \n
1143  * - FALSE - not an ESN
1144  * \par Prospective Clients:
1145  * All potential applications that require configuration settings and Internal Classes.
1146  */
1147   boolean IsExternalStorageNode(void)  const {return m_bESN;}
1148
1149private :
1150   SYNCML_DM_RET_STATUS_T InitAttributes(SYNCML_DM_DATAFORMAT_T type);
1151};
1152
1153
1154/**
1155* Engine side support for Overlay plug-ins including meta node ID and PD retrieval
1156*/
1157struct DmtOPINodeData
1158{
1159/**  plugin data*/
1160  DMVector< DmtOverlayPluginData >  aPD;
1161/** meta ID of a node */
1162  int   metaNodeID;
1163};
1164
1165  /**
1166  * Function should be called only from the plug-in "getNode" function
1167  * \warning This method for internal usage only!
1168  * \par Sync (or) Async:
1169  * This is a Synchronous function.
1170  * \par Secure (or) Non-Secure (or) N/A:
1171  * This is a Non-Secure function.
1172  * \return cached PDs and metaNodeID (or -1 if not set) for the current node
1173  * \par Prospective Clients:
1174  * For internal usage only
1175  */
1176extern "C" const DmtOPINodeData* DmtGetCachedOPINodeData();
1177
1178  /**
1179  * Allows to update plug-in data in DMT
1180  * \warning This method for internal usage only!
1181  * \par Sync (or) Async:
1182  * This is a Synchronous function.
1183  * \par Secure (or) Non-Secure (or) N/A:
1184  * This is a Non-Secure function.
1185  * \param szURI [in] - node URI
1186  * \param oData [out] - node data
1187  * \return Return Type (SYNCML_DM_RET_STATUS_T) \n
1188  * - SYNCML_DM_SUCCESS - indicates that the operation is completed successfully. \n
1189  * - All other codes indicates failure. The description can be found in dmtError.h
1190  * \par Prospective Clients:
1191  * For internal usage only
1192  */
1193extern "C" SYNCML_DM_RET_STATUS_T DmtSetOPINodeData( CPCHAR szURI, const DmtOverlayPluginData& oData );
1194
1195#endif
1196