Class Hierarchy   Class Index   Method Index  

CHMlicense Class Reference

#include <CHMlicense.h>


Detailed Description

This class can be used by customers to automate the registration of Chameleon run-time instances.

This class allows you to programmatically register Chameleon on a user's machine without any user input.

Beginning in version 4.5, this class allows you to register Chameleon without the machine being registered having a direct connection to the Internet. This is useful for companies that want to automate the registration code setup for Chameleon. To make it easy for companies to incorporate Chameleon into their existing licensing process, this class allows you to:

(1) Generate a unique Machine ID for the host machine.

(2) Request a non-expiring license for the Machine ID using the user name and password for the host members account. The automated registration process involves communication with an iNTERFACEWARE server via HTTP. This can be accomplished either from a centrally located computer, or from the actual host machine.

(3) Apply the registration code to the host machine.

This process makes it easy for companies to get the machine IDs centrally using their own licensing, meaning they can add the extra Chameleon information to their own license file.

Please see http://www.interfaceware.com/manual/api_registration.html for details.


Public Member Functions

 CHMlicense ()
 Constructor.

virtual ~CHMlicense ()
 Destructor.

CHMlicenseoperator= (const CHMlicense &Orig)
 Assignment operator.

CHMlicenseHandle GetHandle () const
 This method is part of the internal implementation of this class and should not be called.

CHMboolean IsLicensed () const
 This is a boolean function, which returns true if the machine has a valid Chameleon license, and false otherwise.

const char * Proxy () const
 The IP address or hostname for the Web proxy to use.

void SetProxy (const char *Value)
 Set method for proxy.

const char * MachineId () const
 This method returns the unique machine ID of the machine to register.

const char * FetchRegistrationCode (const char *MachineId, const char *EmailAddress, const char *Password, const char *Description)
 If successful, this method will return the non-expiring runtime registration code for the unique machine ID from iNTERFACEWARE's server.

void RegisterHost (const char *RegistrationCode)
 This is a method that is used to register the machine using the given registration code.

const char * FetchTrialRegistrationCode (time_t &ExpiryDate, const char *MachineId, const char *EmailAddress, const char *Password, const char *Description)
 If successful, this method will return the expiring trial registration code for the unique machine ID from iNTERFACEWARE's server.

void RegisterTrialHost (const char *RegistrationCode, time_t ExpiryDate)
 This is a method that is used to register the machine using the given expiring trial registration code and expiry date.


Constructor & Destructor Documentation

CHMlicense::CHMlicense  ) 
 

Constructor.

virtual CHMlicense::~CHMlicense  )  [virtual]
 

Destructor.


Member Function Documentation

const char* CHMlicense::FetchRegistrationCode const char *  MachineId,
const char *  EmailAddress,
const char *  Password,
const char *  Description
 

If successful, this method will return the non-expiring runtime registration code for the unique machine ID from iNTERFACEWARE's server.

This process involves an HTTP request to the iNTERFACEWARE server on port 80, therefore, there must be an available Internet connection. The HTTP request consists of your email address and password (the same one used to log into your member's account) and a machineId uniquely identifying the machine to register. The Description of the registration code will be used to identify it in order to determine the nature of the license.

Parameters:
MachineId The Machine ID of the machine to register.
EmailAddress Email address used to login to iNTERFACEWARE's members site.
Password Password used to login to iNTERFACEWARE's members site.
Description A description of the registration code.

const char* CHMlicense::FetchTrialRegistrationCode time_t &  ExpiryDate,
const char *  MachineId,
const char *  EmailAddress,
const char *  Password,
const char *  Description
 

If successful, this method will return the expiring trial registration code for the unique machine ID from iNTERFACEWARE's server.

This process involves an HTTP request to the iNTERFACEWARE server on port 80, therefore, there must be an available Internet connection. The HTTP request consists of your email address and password (the same one used to log into your member's account) and a machineId uniquely identifying the machine to register. The Description of the registration code will be used to identify it in order to determine the nature of the license.

Parameters:
ExpiryDate Returns the expiry date of the registration code.
MachineId The Machine ID of the machine to register.
EmailAddress Email address used to login to iNTERFACEWARE's members site.
Password Password used to login to iNTERFACEWARE's members site.
Description A description of the registration code.

CHMlicenseHandle CHMlicense::GetHandle  )  const [inline]
 

This method is part of the internal implementation of this class and should not be called.

CHMboolean CHMlicense::IsLicensed  )  const
 

This is a boolean function, which returns true if the machine has a valid Chameleon license, and false otherwise.

This method checks the license status of the target machine, but does not send a request to the iNTERFACEWARE server.

const char* CHMlicense::MachineId  )  const
 

This method returns the unique machine ID of the machine to register.

CHMlicense& CHMlicense::operator= const CHMlicense Orig  ) 
 

Assignment operator.

const char* CHMlicense::Proxy  )  const
 

The IP address or hostname for the Web proxy to use.

A Web proxy is required when the local machine does not have direct access to the Internet and needs to forward the registration requests through another server. A Web proxy server is a server that handles the HTTP requests of its clients by forwarding its requests to other servers (e.g. iNTERFACEWARE server). A client will connect to the Web proxy server to request a file. The proxy server then connects to the specified server and requests the file on behalf of the client. If your network requires your Internet connection to be set up via a Web proxy, you must specify the proxy your network uses to forward HTTP requests to other servers. By default, no proxy will be used. After setting a Web proxy, to unset it simply set this property to an empty string.

See also the CHMlicense::SetProxy method.

void CHMlicense::RegisterHost const char *  RegistrationCode  ) 
 

This is a method that is used to register the machine using the given registration code.

This method checks if the registration key is valid and throws an exception if it is invalid; it does not send a request to the iNTERFACEWARE server. Also note that the method only supports non-expiring keys.

Parameters:
RegistrationCode The registration code.

void CHMlicense::RegisterTrialHost const char *  RegistrationCode,
time_t  ExpiryDate
 

This is a method that is used to register the machine using the given expiring trial registration code and expiry date.

This method checks if the registration key is valid and throws an exception if it is invalid; it does not send a request to the iNTERFACEWARE server.

Parameters:
RegistrationCode The registration code.
ExpiryDate The expiry date of the registration code.

void CHMlicense::SetProxy const char *  Value  ) 
 

Set method for proxy.

See CHMlicense::Proxy.

Parameters:
Value Value to set proxy to.


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