Class: TLicenseProvider

Declaration: LicenseProvider.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible, MReferenceCounted

Inherited By:

None.

Purpose:

The abstract base class that represents a license provider. TLicenseProvider is derived for each implementation of the Licensing framework. The implementations, called license provider implementations, manage the activation keys and model the licensing terms through a TLicenseProviderSession object.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

This class is derived by all license providers. All derived classes should provide an implementation for CreateSession.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TLicenseProvider::~TLicenseProvider

virtual ~ TLicenseProvider ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called to destroy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLicenseProvider::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLicenseProvider::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws TInvalidVersionError if the version of the object is not supported.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLicenseProvider::GetProviderIterator

static void GetProviderIterator (TDeleterFor< TIteratorOver<TLicenseProvider> >& deleterFor)

Interface Category:

API.

Purpose:

Gets an iterator over the set of license providers. The iterator is returned in a TDeleterFor object that is responsible for the dynamic storage.

Calling Context:

Called to get an iterator over the set of providers.

Parameters:

Return Value:

Returns an iterator object.

Exceptions:

Throws TStandardLicenseConfigException if no providers can be found.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLicenseProvider::TLicenseProvider

  1. TLicenseProvider ()
  2. TLicenseProvider (const TLicenseProduct &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Initializes TLicenseProduct element of TLicenseProvider.

Calling Context:

  1. Called by the stream-in operators.
  2. Called by derived classes to initialize.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLicenseProvider::CreateSession

virtual TLicenseProviderSession * CreateSession (const TLicenseProduct & theProduct)

Interface Category:

API.

Purpose:

A pure virtual function that is called by the Licensing framework to create a TLicenseProviderSession derived class object used to communicate with this license provider. Each license provider derived class is required to provide an implementation of this function. The function should create a dynamically allocated instance of its corresponding TLicenseProviderSession derived class.

Calling Context:

Called by the Licensing framework.

Parameters:

Return Value:

Returns a pointer to a TLicenseProviderSession based object that can be used to allocate license units.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The object returned was allocated on the heap and is now the responsibility of the caller.

Member Function: TLicenseProvider::FlattenForDistribution

  1. void FlattenForDistribution (TStream & stream) const
  2. void FlattenForDistribution (const TPathName & pathName) const

Interface Category:

API.

Purpose:

These functions encapsulate the result of ::Flatten(*this,toWhere) so that the Licensing framework can check the file containing the flattened provider object before calling ::Resurrect. All providers must use this function to flatten their TLicenseProvider objects.
  1. Flattens into the provided stream.
  2. Flattens into the provided filename, in the default license provider directory. This is the preferred method of usage.

Calling Context:

  1. Providers of Licensing framework implementations call this function to generate flattened providers.
  2. Providers of Licensing framework implementations call this function to generate flattened providers.

Parameters:

Return Value:

None.

Exceptions:

  1. Throws no exceptions, passes all exceptions through.
  2. Throws TLicenseInvalidProvider if the pathName specified has more than one component. Flattened providers can be stored only one level down in the license provider directory. Passes all other exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TLicenseProvider::GetProviderProduct

virtual void GetProviderProduct (TLicenseProduct & theProviderProduct) const

Interface Category:

API.

Purpose:

Every provider of licensing technology is uniquely identified by a TLicenseProduct component that is retrieved by this member function.

Calling Context:

Called to query a license provider for its TLicenseProduct representation.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.