Celartem::License::LicenseManager Class Reference

#include <cel_license.h>

List of all members.

Public Member Functions

virtual void setLicenseScript (const String &inLicense)=0
virtual void setLicenseTarget (void *target, const String &inCookie)=0
virtual String getLicenseScript () const =0
virtual String getProductId () const =0
virtual String getProductDescription () const =0
virtual ActivationScheme getActivationScheme (Feature inFeature) const =0
virtual String getMachineId () const =0
virtual String getStatusString (bool inHumanReadable, const String &inProductId=NullString) const =0
virtual void setActivationServerUrl (const String &inActivationServerUrl)=0
virtual String getActivationServerUrl () const =0

Static Public Member Functions

static LicenseManagergetLicenseManager ()
static String getStatusStringFromProductStatus (bool inHumanReadable, const String &inMachineId, const ProductStatus &inProductStatus)
static String getProductStatusFromString (const String &inStatusString, ProductStatus &outProductStatus)
static String createLicenseScript (const String &inUnencryptedScript)
static String getFeatureName (Feature inFeature)


Detailed Description

LicenseManager manages an license script for a certain product and provide applications with the nifty string based properties which can be used by the applications.
For more information, see License System.

Definition at line 93 of file cel_license.h.


Member Function Documentation

static LicenseManager& Celartem::License::LicenseManager::getLicenseManager (  )  [static]

Get the LicenseManager instance.

Returns:
Reference to the LicenseManager instance.

virtual void Celartem::License::LicenseManager::setLicenseScript ( const String inLicense  )  [pure virtual]

Initializes the LicenseManager instance with the specified license script.

Parameters:
inLicense A license script provided by Celartem Software Authority.
If this string is NullString, then this method tries to obtain the embedded license string from the application binary.

virtual void Celartem::License::LicenseManager::setLicenseTarget ( void *  target,
const String inCookie 
) [pure virtual]

Set the target of license.

Parameters:
target Platform dependent handle/context of the license check target. This target is checked for license validity.
inCookie The cookie which verifies the module who calls this method is authorized to do so. If you're an authorized software developer, you can obtain the cookie from Celartem Technology Inc.

virtual String Celartem::License::LicenseManager::getLicenseScript (  )  const [pure virtual]

Get the current license script.

Returns:
The current license script.

virtual String Celartem::License::LicenseManager::getProductId (  )  const [pure virtual]

Get the product ID.

Returns:
The product ID.

virtual String Celartem::License::LicenseManager::getProductDescription (  )  const [pure virtual]

Get the product description.

Returns:
The product description.

virtual ActivationScheme Celartem::License::LicenseManager::getActivationScheme ( Feature  inFeature  )  const [pure virtual]

Determine whether a feature is currently enabled or not.

Parameters:
inFeature A feature to get the activation scheme.
Returns:
true if the feature is enabled; otherwise false.

virtual String Celartem::License::LicenseManager::getMachineId (  )  const [pure virtual]

Get the machine ID corresponding to this machine.

Returns:
Machine ID.

virtual String Celartem::License::LicenseManager::getStatusString ( bool  inHumanReadable,
const String inProductId = NullString 
) const [pure virtual]

Get a string which describes the current status of LicenseManager instance.

Parameters:
inHumanReadable true to generate human readable string; otherwise this method returns a machine readable but not human readable string.
inProductId The target product Id. If this is NullString, this method returns the status of current product.
Returns:
A status string.
This method can used to create a valid address of cartridge licensing site. The following sample illustrates this:
String prodId = ....;
LicenseManager& lm = getLicenseManager();
String url = utf8s("https://licensing.celartem.com/licensing/") + lm.getStatusString(false, prodId);

static String Celartem::License::LicenseManager::getStatusStringFromProductStatus ( bool  inHumanReadable,
const String inMachineId,
const ProductStatus inProductStatus 
) [static]

Get a string which describes the current status from the input information.

Parameters:
inHumanReadable true to generate human readable string; otherwise this method returns a machine readable but not human readable string.
inMachineId The machine ID to embed into the string.
inProductStatus The product status to embed into the string.
Returns:
A status string.

static String Celartem::License::LicenseManager::getProductStatusFromString ( const String inStatusString,
ProductStatus outProductStatus 
) [static]

Obtain information from non-human-readable form of the status string, which is returned by getStatusString.

Parameters:
inStatusString The string returned by getStatusString.
outProductStatus On return, product status in the status string.
Returns:
Machine ID in the status string.

virtual void Celartem::License::LicenseManager::setActivationServerUrl ( const String inActivationServerUrl  )  [pure virtual]

Set the activation server URL.

Parameters:
inActivationServerUrl The activation server URL.

virtual String Celartem::License::LicenseManager::getActivationServerUrl (  )  const [pure virtual]

Get the activation server URL.

Parameters:
inActivationServerUrl The activation server URL.

static String Celartem::License::LicenseManager::createLicenseScript ( const String inUnencryptedScript  )  [static]

Create a license script from unencrypted script.
This method is reserved for internal use.
For internal usage, see documents in cel_baselib/opt/licenseSystem.

static String Celartem::License::LicenseManager::getFeatureName ( Feature  inFeature  )  [static]

Get Feature Name.

Parameters:
inFeature A feature to get name.


The documentation for this class was generated from the following file:
This document is automatically generated using doxygen 1.5.4 at Fri Jun 27 18:23:36 2008.