DMTClientConfig Class Reference
[Client]

#include <DMTClientConfig.h>

Inheritance diagram for DMTClientConfig:

Inheritance graph
[legend]
Collaboration diagram for DMTClientConfig:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DMTClientConfig (const char *root)
 ~DMTClientConfig ()
SyncSourceConfiggetSyncSourceConfig (const char *name, bool refresh=false)
SyncSourceConfiggetSyncSourceConfig (unsigned int i, bool refresh=false)
virtual bool read ()
virtual bool save ()
virtual bool open ()
virtual ManagementNode * getSyncMLNode ()
virtual int getNumSources ()
virtual ManagementNode * getSyncSourceNode (int index)
virtual ManagementNode * getSyncSourceNode (const char *name)
virtual void close ()

Protected Member Functions

void initialize ()
 DMTClientConfig ()
virtual bool readAccessConfig (ManagementNode &n)
virtual void saveAccessConfig (ManagementNode &n)
virtual bool readDeviceConfig (ManagementNode &n)
virtual void saveDeviceConfig (ManagementNode &n)
virtual bool readSourceConfig (int i, ManagementNode &n)
virtual void saveSourceConfig (int i, ManagementNode &n)
virtual bool readAuthConfig (ManagementNode &syncMLNode, ManagementNode &authNode)
virtual void saveAuthConfig (ManagementNode &syncMLNode, ManagementNode &authNode)
virtual bool readConnConfig (ManagementNode &syncMLNode, ManagementNode &connNode)
virtual void saveConnConfig (ManagementNode &syncMLNode, ManagementNode &connNode)
virtual bool readExtAccessConfig (ManagementNode &syncMLNode, ManagementNode &extNode)
virtual void saveExtAccessConfig (ManagementNode &syncMLNode, ManagementNode &extNode)
virtual bool readDevInfoConfig (ManagementNode &syncMLNode, ManagementNode &devInfoNode)
virtual void saveDevInfoConfig (ManagementNode &syncMLNode, ManagementNode &devInfoNode)
virtual bool readDevDetailConfig (ManagementNode &syncMLNode, ManagementNode &devDetailNode)
virtual void saveDevDetailConfig (ManagementNode &syncMLNode, ManagementNode &devDetailNode)
virtual bool readExtDevConfig (ManagementNode &syncMLNode, ManagementNode &extNode)
virtual void saveExtDevConfig (ManagementNode &syncMLNode, ManagementNode &extNode)
virtual bool readSourceVars (int i, ManagementNode &sourcesNode, ManagementNode &sourceNode)
virtual void saveSourceVars (int i, ManagementNode &sourcesNode, ManagementNode &sourceNode)
virtual bool readSourceConfig (int i, ManagementNode &sourcesNode, ManagementNode &sourceNode)
virtual void saveSourceConfig (int i, ManagementNode &sourcesNode, ManagementNode &sourceNode)

Protected Attributes

char * rootContext
DMTree * dmt
ManagementNode * syncMLNode
ManagementNode * sourcesNode


Detailed Description

This class is an extension of SyncManagerConfig that is DM tree aware; this means that configuration properties are read/stored from/to the DM tree.

Todo:
describe the properties of the DM tree and how they are grouped into device info, additional device info, extended device info, etc.

Definition at line 62 of file DMTClientConfig.h.


Constructor & Destructor Documentation

DMTClientConfig::DMTClientConfig (  )  [protected]

DMTClientConfig::DMTClientConfig ( const char *  root  ) 

DMTClientConfig::~DMTClientConfig (  ) 


Member Function Documentation

virtual void DMTClientConfig::close (  )  [virtual]

Closes the configuration backend. Frees all resources associated with and invalidates all ManagementNode pointers returned by this config.

virtual int DMTClientConfig::getNumSources (  )  [virtual]

Gets number of sync source configurations, -1 if not open.

virtual ManagementNode* DMTClientConfig::getSyncMLNode (  )  [virtual]

Provides access to the "syncml" configuration node, can be used to read/write custom configuration options. Config must have been opened before.

Returns:
node pointer owned by config and valid while the config is open

SyncSourceConfig* DMTClientConfig::getSyncSourceConfig ( unsigned int  i,
bool  refresh = false 
)

SyncSourceConfig* DMTClientConfig::getSyncSourceConfig ( const char *  name,
bool  refresh = false 
)

virtual ManagementNode* DMTClientConfig::getSyncSourceNode ( const char *  name  )  [virtual]

Get the specified sync source configuration by name.

virtual ManagementNode* DMTClientConfig::getSyncSourceNode ( int  index  )  [virtual]

Get the specified sync source configuration.

Parameters:
index number of the requested sync source configuration
Returns:
node pointer owned by config and valid while the config is open

void DMTClientConfig::initialize (  )  [protected]

virtual bool DMTClientConfig::open (  )  [virtual]

Opens the configuration backend associated with the root context. Calling on an open config does nothing.

Returns:
true for success

virtual bool DMTClientConfig::read (  )  [virtual]

virtual bool DMTClientConfig::readAccessConfig ( ManagementNode &  n  )  [protected, virtual]

virtual bool DMTClientConfig::readAuthConfig ( ManagementNode &  syncMLNode,
ManagementNode &  authNode 
) [protected, virtual]

Called by readAccessConfig() to save authentication settings. The purpose of making this function virtual is that a derived class can override it and then to read the settings from a different than the default "spds/syncml/auth" node by calling the base function with a different authNode parameter or generate the settings in some other way.

Parameters:
syncMLNode the "spds/syncml" node
authNode the "spds/syncml/auth" node

virtual bool DMTClientConfig::readConnConfig ( ManagementNode &  syncMLNode,
ManagementNode &  connNode 
) [protected, virtual]

Same as readAccessConfig() for reading connection information.

Parameters:
syncMLNode the "spds/syncml" node
connNode the "spds/syncml/conn" node

virtual bool DMTClientConfig::readDevDetailConfig ( ManagementNode &  syncMLNode,
ManagementNode &  devDetailNode 
) [protected, virtual]

Same as readAccessConfig() for reading additional device information.

Parameters:
syncMLNode the "spds/syncml" node
devDetailNode the "spds/syncml/devdetail" node

virtual bool DMTClientConfig::readDeviceConfig ( ManagementNode &  n  )  [protected, virtual]

virtual bool DMTClientConfig::readDevInfoConfig ( ManagementNode &  syncMLNode,
ManagementNode &  devInfoNode 
) [protected, virtual]

Same as readAccessConfig() for reading device information.

Parameters:
syncMLNode the "spds/syncml" node
devInfoNode the "spds/syncml/devinfo" node

virtual bool DMTClientConfig::readExtAccessConfig ( ManagementNode &  syncMLNode,
ManagementNode &  extNode 
) [protected, virtual]

Same as readAccessConfig() for reading additional access information.

Parameters:
syncMLNode the "spds/syncml" node
extNode the "spds/syncml/ext" node

virtual bool DMTClientConfig::readExtDevConfig ( ManagementNode &  syncMLNode,
ManagementNode &  extNode 
) [protected, virtual]

Same as readAccessConfig() for reading some more additional device information.

Parameters:
syncMLNode the "spds/syncml" node
extNode the "spds/syncml/ext" node

virtual bool DMTClientConfig::readSourceConfig ( int  i,
ManagementNode &  sourcesNode,
ManagementNode &  sourceNode 
) [protected, virtual]

Same as readAccessConfig() for reading the normal properties of a sync source, i.e. excluding variables like anchors.

Parameters:
i index of the source
sourcesNode the "spds/sources" node
sourceNode the "spds/sources/<source name>" node

virtual bool DMTClientConfig::readSourceConfig ( int  i,
ManagementNode &  n 
) [protected, virtual]

virtual bool DMTClientConfig::readSourceVars ( int  i,
ManagementNode &  sourcesNode,
ManagementNode &  sourceNode 
) [protected, virtual]

Same as readAccessConfig() for reading variables that the library uses internally, like anchors.

Parameters:
i index of the source
sourcesNode the "spds/sources" node
sourceNode the "spds/sources/<source name>" node

virtual bool DMTClientConfig::save (  )  [virtual]

virtual void DMTClientConfig::saveAccessConfig ( ManagementNode &  n  )  [protected, virtual]

virtual void DMTClientConfig::saveAuthConfig ( ManagementNode &  syncMLNode,
ManagementNode &  authNode 
) [protected, virtual]

Same as readAccessConfig() for saving the settings.

Parameters:
syncMLNode the "spds/syncml" node
authNode the "spds/syncml/auth" node

virtual void DMTClientConfig::saveConnConfig ( ManagementNode &  syncMLNode,
ManagementNode &  connNode 
) [protected, virtual]

Same as readAccessConfig() for saving connection information.

Parameters:
syncMLNode the "spds/syncml" node
connNode the "spds/syncml/conn" node

virtual void DMTClientConfig::saveDevDetailConfig ( ManagementNode &  syncMLNode,
ManagementNode &  devDetailNode 
) [protected, virtual]

Same as readAccessConfig() for saving additional device information.

Parameters:
syncMLNode the "spds/syncml" node
devDetailNode the "spds/syncml/devdetail" node

virtual void DMTClientConfig::saveDeviceConfig ( ManagementNode &  n  )  [protected, virtual]

virtual void DMTClientConfig::saveDevInfoConfig ( ManagementNode &  syncMLNode,
ManagementNode &  devInfoNode 
) [protected, virtual]

Same as readAccessConfig() for saving device information.

Parameters:
syncMLNode the "spds/syncml" node
devInfoNode the "spds/syncml/devinfo" node

virtual void DMTClientConfig::saveExtAccessConfig ( ManagementNode &  syncMLNode,
ManagementNode &  extNode 
) [protected, virtual]

Same as readAccessConfig() for saving additional access information.

Parameters:
syncMLNode the "spds/syncml" node
extNode the "spds/syncml/ext" node

virtual void DMTClientConfig::saveExtDevConfig ( ManagementNode &  syncMLNode,
ManagementNode &  extNode 
) [protected, virtual]

Same as readAccessConfig() for saving some more additional device information.

Parameters:
syncMLNode the "spds/syncml" node
extNode the "spds/syncml/ext" node

virtual void DMTClientConfig::saveSourceConfig ( int  i,
ManagementNode &  sourcesNode,
ManagementNode &  sourceNode 
) [protected, virtual]

Same as readAccessConfig() for reading the normal properties of a sync source, i.e. excluding variables like anchors.

Parameters:
i index of the source
sourcesNode the "spds/sources" node
sourceNode the "spds/sources/<source name>" node

virtual void DMTClientConfig::saveSourceConfig ( int  i,
ManagementNode &  n 
) [protected, virtual]

virtual void DMTClientConfig::saveSourceVars ( int  i,
ManagementNode &  sourcesNode,
ManagementNode &  sourceNode 
) [protected, virtual]

Same as readAccessConfig() for saveing variables that the library uses internally, like anchors.

Parameters:
i index of the source
sourcesNode the "spds/sources" node
sourceNode the "spds/sources/<source name>" node


Member Data Documentation

DMTree* DMTClientConfig::dmt [protected]

Definition at line 68 of file DMTClientConfig.h.

char* DMTClientConfig::rootContext [protected]

Definition at line 66 of file DMTClientConfig.h.

ManagementNode* DMTClientConfig::sourcesNode [protected]

Definition at line 70 of file DMTClientConfig.h.

ManagementNode* DMTClientConfig::syncMLNode [protected]

Definition at line 69 of file DMTClientConfig.h.


The documentation for this class was generated from the following file:

Generated on Sat Oct 18 17:17:03 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1