LicenseInfo Struct Reference

License information class. More...

#include <LicenseInfo.h>

List of all members.

Public Types

enum  LicenseType
 

License type.


enum  ModificationType
 

Allowed modifictions.


enum  SamplingType
 

Sampling license type.


enum  LoadedLicenseDataType
 

List of cached licenses.


Public Member Functions

 LicenseInfo ()
 Default constructor: initializes variables.
LoadedLicenseDataType GetCCLicenseType () const
 Retrieves the type of XML license information that this object can use (according to the member values).

Static Public Member Functions

static bool IsValidLicenseInfo (LoadedLicenseDataType eType)
 Checks if the license specified is valid.
static bool LoadData (LoadedLicenseDataType eType, const char *pXML)
 Loads an XML string as the cached license.
static const XDoc & GetLicenseXML (LoadedLicenseDataType eType)
 Retrieves an XML object holding the cached license.
static bool LoadAndValidateData (LoadedLicenseDataType eType, XDoc &doc, const char *pXML)
 Loads an XML string into the cached license object and makes sure it's valid.
static bool IsValidLicenseInfo (LoadedLicenseDataType eType, XDoc &doc)
 Tests to see if the received XML object holds valid license data information.

Public Attributes

LicenseType m_eLicense
 Type of license the user wants to set.
bool m_bCommercialUse
 Does this license allow commercial use of the matterial?
ModificationType m_eModification
 Type of modifications allowed in the license.
std::string m_sJurisdiction
 Name of jurisdiction the laws of which the license will be subject to.
SamplingType m_eSampling
 Type of sampling license.

Static Protected Attributes

static XDoc m_xmlData [LLDT_Count]
 Cached XML license information.

Detailed Description

License information class.

Static members of this class hold cached XML license information; an instance of this class holds license information that the user set in the license wizard

Definition at line 37 of file LicenseInfo.h.


Member Function Documentation

LicenseInfo::LoadedLicenseDataType LicenseInfo::GetCCLicenseType (  )  const

Retrieves the type of XML license information that this object can use (according to the member values).

Returns:
The type of license needed according to the information in the members

Definition at line 94 of file LicenseInfo.cpp.

References m_bCommercialUse, m_eLicense, m_eModification, and m_eSampling.

Referenced by CCInfoFullPlugin::RetrieveCCInfo().

static const XDoc& LicenseInfo::GetLicenseXML ( LoadedLicenseDataType  eType  )  [inline, static]

Retrieves an XML object holding the cached license.

Parameters:
eType Type of license information needed
Returns:
Reference to the cached XML object

Definition at line 125 of file LicenseInfo.h.

References m_xmlData.

Referenced by GetDescriptionFromField(), ADMWizJurisdicationPage::OnInitDialog(), and CCInfoFullPlugin::RetrieveCCInfo().

bool LicenseInfo::IsValidLicenseInfo ( LoadedLicenseDataType  eType,
XDoc &  doc 
) [static]

Tests to see if the received XML object holds valid license data information.

Parameters:
eType Type of license to check
doc XML object to validate the contents of
Returns:
true if the object holds valid license data, false otherwise

Definition at line 46 of file LicenseInfo.cpp.

bool LicenseInfo::IsValidLicenseInfo ( LoadedLicenseDataType  eType  )  [static]

Checks if the license specified is valid.

Parameters:
eType Type of license to check
Returns:
true if cached license information is valid

Definition at line 35 of file LicenseInfo.cpp.

References m_xmlData.

Referenced by LoadAndValidateData().

bool LicenseInfo::LoadAndValidateData ( LoadedLicenseDataType  eType,
XDoc &  doc,
const char *  pXML 
) [static]

Loads an XML string into the cached license object and makes sure it's valid.

Parameters:
eType Type of license to load
doc XML object to fill with the license data
pXML XML string to load
Returns:
true if XML object loaded with valid data, false otherwise

Definition at line 77 of file LicenseInfo.cpp.

References IsValidLicenseInfo().

Referenced by LoadData(), and CCInfoFullPlugin::RetrieveCCInfo().

bool LicenseInfo::LoadData ( LoadedLicenseDataType  eType,
const char *  pXML 
) [static]

Loads an XML string as the cached license.

Parameters:
eType Type of license to load into the cache
pXML XML string to load
Returns:
true if XML loaded successfully and the license data is valid, false otherwise

Definition at line 65 of file LicenseInfo.cpp.

References LoadAndValidateData(), and m_xmlData.

Referenced by CCInfoFullPlugin::LoadInternalLicenseInfo(), and CCInfoFullPlugin::RetrieveCCInfo().


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

Generated on Thu Dec 17 17:37:11 2009 for CCInfo PDF Plugin by doxygen 1.6.1