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.
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.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
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.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
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.
- TLicenseProvider ()
- TLicenseProvider (const TLicenseProduct &)
Interface Category:
API.
Purpose:
- Default constructor.
- Initializes TLicenseProduct element of TLicenseProvider.
Calling Context:
- Called by the stream-in operators.
- Called by derived classes to initialize.
Parameters:
- Takes no parameters.
- const TLicenseProduct & -The provider product information.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
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
- void FlattenForDistribution (TStream & stream) const
- 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.
- Flattens into the provided stream.
- Flattens into the provided filename, in the default license provider directory. This is the preferred method of usage.
Calling Context:
- Providers of Licensing framework implementations call this function to generate flattened providers.
- Providers of Licensing framework implementations call this function to generate flattened providers.
Parameters:
- TStream & stream -Specifies the stream onto which the flattened provider object is written out.
- const TPathName & pathName -Specifies the pathname of the file into which the flattened provider object is written out.
Return Value:
None.
Exceptions:
- Throws no exceptions, passes all exceptions through.
- 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.