CPKIFPathSettingsSerializer Class Reference

#include <PathSettingsSerializer.h>

List of all members.


Detailed Description

This class can be used to serialize or de-serialize the settings conveyed via an instance of CPKIFPathSettings. The settings are stored using wxConfig. Thus, on Windows platforms the settings are stored in the HKEY_CURRENT_USER hive of the system registry and on non-Windows platforms the settings are stored in a configuration file.

TSP-enforcing: No

Definition at line 30 of file PathSettingsSerializer.h.


Public Member Functions

 CPKIFPathSettingsSerializer ()
 ~CPKIFPathSettingsSerializer ()
CPKIFPathSettingsPtr LoadSettings (const char *application, const char *company, const char *localFile=NULL, bool useFile=false, bool bAllUsers=false, const char *pathRelToCompanyApp=NULL)
void SaveSettings (CPKIFPathSettingsPtr &settingsToSave, const char *application, const char *company, const char *localFile=NULL, bool useFile=false, bool bAllUsers=false, const char *pathRelToCompanyApp=NULL)

Constructor & Destructor Documentation

CPKIFPathSettingsSerializer::CPKIFPathSettingsSerializer (  ) 

Interface: External

Default constructor for CPKIFPathSettingsSerializer.

Returns:
None

Definition at line 39 of file PathSettingsSerializer.cpp.

CPKIFPathSettingsSerializer::~CPKIFPathSettingsSerializer (  ) 

Interface: External

Default destructor for CPKIFPathSettingsSerializer.

Returns:
None

Definition at line 51 of file PathSettingsSerializer.cpp.


Member Function Documentation

CPKIFPathSettingsPtr CPKIFPathSettingsSerializer::LoadSettings ( const char *  application,
const char *  company,
const char *  localFile = NULL,
bool  useFile = false,
bool  bAllUsers = false,
const char *  pathRelToCompanyApp = NULL 
)

LoadSettings accepts a company name and an application name. The company name and the application name are used to determine from where the settings returned in the CPKIFPathSettings object are read. If no company name and no application name are supplied (i.e., the parameters are passed as NULL), then "Orion Security Solutions" is used as the company name and "PKIFv2" is used as the application name.

Parameters:
application  Pointer to a NULL terminated string indicating an application name for use in storing the settings (or NULL for default value)
company  Pointer to a NULL terminated string indicating a company name for use in storing the settings (or NULL for default value)
localFile  Pointer to a NULL terminated string indicating a file name for use in storing the settings
useFile  [in] Boolean value indicating if a file should be used to store settings.

Definition at line 279 of file PathSettingsSerializer.cpp.

References B64Decode(), and wxASCIIHelper::to_chars().

Referenced by LoadPathProcessingComponents().

void CPKIFPathSettingsSerializer::SaveSettings ( CPKIFPathSettingsPtr &  settingsToSave,
const char *  application,
const char *  company,
const char *  localFile = NULL,
bool  useFile = false,
bool  bAllUsers = false,
const char *  pathRelToCompanyApp = NULL 
)

Interface: External

SaveSettings accepts an instance of CPKIFPathSettings, a company name and an application name. The company name and the application name are used to determine where the settings stored in the CPKIFPathSettings object are stored. If no company name and no application name are supplied (i.e., the parameters are passed as NULL), then "Orion Security Solutions" is used as the company name and "PKIFv2" is used as the application name.

Prior to writing out new settings, previously existing settings are deleted. If this method does not complete successfully, previously existing settings will not be available and new settings will not be saved. If failure occurs during serialization of a particular value, the value will be indicated in the descriptive text returned via the exception object.

Returns:
None
Parameters:
settingsToSave  [in]Smart pointer to a CPKIFPathSettings object containing the settings to serialize
application  [in]Pointer to a NULL terminated string indicating an application name for use in storing the settings (or NULL for default value)
company  [in]Pointer to a NULL terminated string indicating a company name for use in storing the settings (or NULL for default value)
localFile  [in]Pointer to a NULL terminated string indicating a file name for use in storing the settings
useFile  [in] Boolean value indicating if a file should be used to store settings.

Definition at line 70 of file PathSettingsSerializer.cpp.

References SaveSettings_wx().


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

Generated on Mon Nov 15 11:20:34 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6