PTLib  Version 2.14.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PSecureConfig Class Reference

#include <cypher.h>

Inheritance diagram for PSecureConfig:
Collaboration diagram for PSecureConfig:

Public Types

enum  ValidationState {
  Defaults, Pending, IsValid, Expired,
  Invalid
}
 
- Public Types inherited from PConfig
enum  Source { Environment, System, Application, NumSources }
 Description of the standard source for configuration information. More...
 

Public Member Functions

 PSecureConfig (const PTEACypher::Key &productKey, const PStringArray &securedKeys, Source src=Application)
 
 PSecureConfig (const PTEACypher::Key &productKey, const char *const *securedKeyArray, PINDEX count, Source src=Application)
 
const PStringArrayGetSecuredKeys () const
 
const PStringGetSecurityKey () const
 
const PStringGetExpiryDateKey () const
 
const PStringGetOptionBitsKey () const
 
const PStringGetPendingPrefix () const
 
void GetProductKey (PTEACypher::Key &productKey) const
 
ValidationState GetValidation () const
 
PBoolean ValidatePending ()
 
void ResetPending ()
 
- Public Member Functions inherited from PConfig
 ~PConfig ()
 
virtual void SetDefaultSection (const PString &section)
 Set the default section for variable operations. More...
 
virtual PString GetDefaultSection () const
 Get the default section for variable operations. More...
 
virtual PStringArray GetSections () const
 Get all of the section names currently specified in the file. More...
 
virtual PStringArray GetKeys () const
 Get a list of all the keys in the section. More...
 
virtual PStringArray GetKeys (const PString &section) const
 Get a list of all the keys in the section. More...
 
virtual PStringToString GetAllKeyValues () const
 Get all of the keys in the section and their values. More...
 
virtual PStringToString GetAllKeyValues (const PString &section) const
 Get all of the keys in the section and their values. More...
 
virtual void DeleteSection ()
 Delete all variables in the specified section. More...
 
virtual void DeleteSection (const PString &section)
 Delete all variables in the specified section. More...
 
virtual void DeleteKey (const PString &key)
 Delete the particular variable in the specified section. More...
 
virtual void DeleteKey (const PString &section, const PString &key)
 Delete the particular variable in the specified section. More...
 
virtual PBoolean HasKey (const PString &key) const
 Determine if the particular variable in the section is actually present. More...
 
virtual PBoolean HasKey (const PString &section, const PString &key) const
 Determine if the particular variable in the section is actually present. More...
 
virtual PString GetString (const PString &key) const
 Get a string variable determined by the key in the section. More...
 
virtual PString GetString (const PString &key, const PString &dflt) const
 Get a string variable determined by the key in the section. More...
 
virtual PString GetString (const PString &section, const PString &key, const PString &dflt) const
 Get a string variable determined by the key in the section. More...
 
virtual void SetString (const PString &key, const PString &value)
 Set a string variable determined by the key in the section. More...
 
virtual void SetString (const PString &section, const PString &key, const PString &value)
 Set a string variable determined by the key in the section. More...
 
virtual PBoolean GetBoolean (const PString &key, PBoolean dflt=false) const
 Get a boolean variable determined by the key in the section. More...
 
virtual PBoolean GetBoolean (const PString &section, const PString &key, PBoolean dflt=false) const
 Get a boolean variable determined by the key in the section. More...
 
virtual void SetBoolean (const PString &key, PBoolean value)
 Set a boolean variable determined by the key in the section. More...
 
virtual void SetBoolean (const PString &section, const PString &key, PBoolean value)
 Set a boolean variable determined by the key in the section. More...
 
virtual long GetInteger (const PString &key, long dflt=0) const
 
virtual long GetInteger (const PString &section, const PString &key, long dflt=0) const
 
virtual void SetInteger (const PString &key, long value)
 Set an integer variable determined by the key in the section. More...
 
virtual void SetInteger (const PString &section, const PString &key, long value)
 Set an integer variable determined by the key in the section. More...
 
template<typename Enumeration >
Enumeration GetEnum (const PString &key, Enumeration dflt) const
 
template<typename Enumeration >
Enumeration GetEnum (const PString &section, const PString &key, Enumeration dflt) const
 
template<typename Enumeration >
void SetEnum (const PString &key, Enumeration value)
 Set an enum variable determined by the key in the section. More...
 
template<typename Enumeration >
void SetEnum (const PString &section, const PString &key, Enumeration value)
 Set an enum variable determined by the key in the section. More...
 
virtual PInt64 GetInt64 (const PString &key, PInt64 dflt=0) const
 Get a 64 bit integer variable determined by the key in the section. More...
 
virtual PInt64 GetInt64 (const PString &section, const PString &key, PInt64 dflt=0) const
 Get a 64 bit integer variable determined by the key in the section. More...
 
virtual void SetInt64 (const PString &key, PInt64 value)
 Set a 64 bit integer variable determined by the key in the section. More...
 
virtual void SetInt64 (const PString &section, const PString &key, PInt64 value)
 Set a 64 bit integer variable determined by the key in the section. More...
 
virtual double GetReal (const PString &key, double dflt=0) const
 Get a floating point variable determined by the key in the section. More...
 
virtual double GetReal (const PString &section, const PString &key, double dflt=0) const
 Get a floating point variable determined by the key in the section. More...
 
virtual void SetReal (const PString &key, double value)
 Set a floating point variable determined by the key in the section. More...
 
virtual void SetReal (const PString &section, const PString &key, double value)
 Set a floating point variable determined by the key in the section. More...
 
virtual PTime GetTime (const PString &key) const
 Get a PTime variable determined by the key in the section. More...
 
virtual PTime GetTime (const PString &key, const PTime &dflt) const
 Get a PTime variable determined by the key in the section. More...
 
virtual PTime GetTime (const PString &section, const PString &key) const
 Get a PTime variable determined by the key in the section. More...
 
virtual PTime GetTime (const PString &section, const PString &key, const PTime &dflt) const
 Get a PTime variable determined by the key in the section. More...
 
virtual void SetTime (const PString &key, const PTime &value)
 Set a PTime variable determined by the key in the section. More...
 
virtual void SetTime (const PString &section, const PString &key, const PTime &value)
 Set a PTime variable determined by the key in the section. More...
 
 PConfig (Source src=Application)
 Create a new configuration object. More...
 
 PConfig (Source src, const PString &appname)
 Create a new configuration object. More...
 
 PConfig (Source src, const PString &appname, const PString &manuf)
 Create a new configuration object. More...
 
 PConfig (const PString &section, Source src=Application)
 Create a new configuration object. More...
 
 PConfig (const PString &section, Source src, const PString &appname)
 Create a new configuration object. More...
 
 PConfig (const PString &section, Source src, const PString &appname, const PString &manuf)
 Create a new configuration object. More...
 
 PConfig (const PFilePath &filename, const PString &section)
 Create a new configuration object. More...
 
- Public Member Functions inherited from PObject
unsigned GetTraceContextIdentifier () const
 Get PTRACE context identifier. More...
 
void SetTraceContextIdentifier (unsigned id)
 
void GetTraceContextIdentifier (PObject &obj)
 
void GetTraceContextIdentifier (PObject *obj)
 
void SetTraceContextIdentifier (const PObject &obj)
 
void SetTraceContextIdentifier (const PObject *obj)
 
virtual ~PObject ()
 
virtual PObjectClone () const
 Create a copy of the class on the heap. More...
 
template<class CLS >
CLS * CloneAs () const
 As for Clone() but converts to specified type. More...
 
virtual PINDEX HashFunction () const
 This function yields a hash value required by the PDictionary class. More...
 
virtual const char * GetClass (unsigned ancestor=0) const
 Get the current dynamic type of the object instance. More...
 
PBoolean IsClass (const char *cls) const
 
virtual PBoolean InternalIsDescendant (const char *clsName) const
 Determine if the dynamic type of the current instance is a descendent of the specified class. More...
 
__inline const PObjectPTraceObjectInstance () const
 
virtual Comparison Compare (const PObject &obj) const
 Compare the two objects and return their relative rank. More...
 
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
 Determine the byte wise comparison of two objects. More...
 
bool operator== (const PObject &obj) const
 Compare the two objects. More...
 
bool operator!= (const PObject &obj) const
 Compare the two objects. More...
 
bool operator< (const PObject &obj) const
 Compare the two objects. More...
 
bool operator> (const PObject &obj) const
 Compare the two objects. More...
 
bool operator<= (const PObject &obj) const
 Compare the two objects. More...
 
bool operator>= (const PObject &obj) const
 Compare the two objects. More...
 
virtual void PrintOn (ostream &strm) const
 Output the contents of the object to the stream. More...
 
virtual void ReadFrom (istream &strm)
 Input the contents of the object from the stream. More...
 

Protected Attributes

PTEACypher::Key productKey
 
PStringArray securedKeys
 
PString securityKey
 
PString expiryDateKey
 
PString optionBitsKey
 
PString pendingPrefix
 
- Protected Attributes inherited from PConfig
PString defaultSection
 The current section for variable values. More...
 
Cached * m_config
 
- Protected Attributes inherited from PObject
unsigned m_traceContextIdentifier
 

Additional Inherited Members

- Static Public Member Functions inherited from PConfig
static const PStringDefaultSectionName ()
 
- Protected Member Functions inherited from PObject
 PObject ()
 Constructor for PObject, made protected so cannot ever create one on its own. More...
 
- Friends inherited from PObject

Member Enumeration Documentation

Enumerator
Defaults 
Pending 
IsValid 
Expired 
Invalid 

Constructor & Destructor Documentation

PSecureConfig::PSecureConfig ( const PTEACypher::Key productKey,
const PStringArray securedKeys,
Source  src = Application 
)
PSecureConfig::PSecureConfig ( const PTEACypher::Key productKey,
const char *const *  securedKeyArray,
PINDEX  count,
Source  src = Application 
)

Member Function Documentation

const PString& PSecureConfig::GetExpiryDateKey ( ) const
inline

References expiryDateKey.

const PString& PSecureConfig::GetOptionBitsKey ( ) const
inline

References optionBitsKey.

const PString& PSecureConfig::GetPendingPrefix ( ) const
inline

References pendingPrefix.

void PSecureConfig::GetProductKey ( PTEACypher::Key productKey) const
const PStringArray& PSecureConfig::GetSecuredKeys ( ) const
inline

References securedKeys.

const PString& PSecureConfig::GetSecurityKey ( ) const
inline

References securityKey.

ValidationState PSecureConfig::GetValidation ( ) const
void PSecureConfig::ResetPending ( )
PBoolean PSecureConfig::ValidatePending ( )

Member Data Documentation

PString PSecureConfig::expiryDateKey
protected

Referenced by GetExpiryDateKey().

PString PSecureConfig::optionBitsKey
protected

Referenced by GetOptionBitsKey().

PString PSecureConfig::pendingPrefix
protected

Referenced by GetPendingPrefix().

PTEACypher::Key PSecureConfig::productKey
protected
PStringArray PSecureConfig::securedKeys
protected

Referenced by GetSecuredKeys().

PString PSecureConfig::securityKey
protected

Referenced by GetSecurityKey().


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