System CATSysCAALM

Usage: you must use this class as is. You should never derive it.


public class CATSysCAALM

Class providing access to CATIA's licensing subsystem.


Method Index


o Initialize(char*,unsigned long,RequestCallback,Handle&)
Initializes the licensing subsystem with the CAA2 partner data.
o IsProductAuthorized(char*)
Checks whether a product is enabled or not.
o LM_Setup()
This is not a function member of the CATSysCAALM class but an entry point to be defined in a shared library.
o ReleaseProduct(Handle,char*)
Releases a product that is enabled.
o RequestProduct(Handle,char*)
Requests a product for enabling.
o Start()
Initializes the licensing subsystem.
o Stop(Handle)
Releases licenses requested and resources used by the CAA2 partner.
o UpdateWorkbenches()
Updates the workbenches, works only with a CATInteractiveApplication.

Enumerated Type Index


o CATSysCAALMStatus
Status code returned.

Methods


o Initialize
public static Initialize( const iPartnerName,
iPartnerKey,
iRCB,
ohandle)
Initializes the licensing subsystem with the CAA2 partner data. This call should only be made by the LM_Setup entry point.
Parameters:
iPartnerName
The name of the CAA2 partner as specified by the SetPartner in the product identity card.
iPartnerKey
The confidential 32-bit integer assigned specifically to the CAA2 partner by DS.
iRCB
The pointer to a function implemented by the CAA2 partner that will be called for license operations. See RequestCallback for details.
ohandle
A Handle variable that will contain the CAA2 partner data upon return.
Returns:
success
invalidPartner
o IsProductAuthorized
public static IsProductAuthorized( const iproductName)
Checks whether a product is enabled or not.
Parameters:
iProductName
The name of the product (ie "ABC.prd")
Returns:
0 - the product is not enabled.
non 0 - the product is enabled.
o LM_Setup
public LM_Setup()
This is not a function member of the CATSysCAALM class but an entry point to be defined in a shared library.
Partners must normally deliver a shared library with a name of the form ABC_LM where ABC is the partner name as defined in the product identification card. The purpose of this entry point is to let the partner code perform all required initializations and to call Initialize.
Please note that LM_Setup should be declared as extern "C". On Windows systems, it should also be declared as an exported symbol with __declspec (export).
o ReleaseProduct
public static ReleaseProduct( ihandle,
const iProductName)
Releases a product that is enabled.
Parameters:
ihandle
The Handle variable that was passed to Initialize.
iProductName
The name of the product like ABC.prd
Returns:
sucess
error - data returned by the callback is invalid.
notInilialized
invalidProduct
invalidHandle
o RequestProduct
public static RequestProduct( ihandle,
const iProductName)
Requests a product for enabling.
Parameters:
ihandle
The Handle variable that was passed to Initialize.
iProductName
The name of the product like ABC.prd
Returns:
sucess
error - data returned by the callback is invalid.
notInilialized
invalidProduct
invalidHandle
o Start
public static Start()
Initializes the licensing subsystem. This will call the LM_Setup entry point. Use this method in non-interactive mode.
Returns:
success
error
o Stop
public static Stop( ihandle)
Releases licenses requested and resources used by the CAA2 partner.
Parameters:
iohandle
The Handle variable that was passed to Initialize.
Returns:
success
invalidHandle
o UpdateWorkbenches
public static UpdateWorkbenches()
Updates the workbenches, works only with a CATInteractiveApplication.
Returns:
sucess
error - unable to update workbenches.

Enumerated Types


o CATSysCAALMStatus
enum CATSysCAALMStatus {
  success,
  error,
  notInitialized,
  alreadyInitialized,
  notRequested,
  invalidPartner,
  invalidProduct,
  invalidICPath,
  invalidHandle
}
Status code returned.
Parameters:
success
The requested action has completed successfully.
error
Catch-all error code.
notInitialized
Initialize has not been called.
alreadyInitialized
The licensing subsystem is already initialized by way of Initialize or another CATIA's function. CAALM might not function.
invalidPartner
The specified CAA2 partner name and key are not recognized.
invavlidProduct
The specified product is unknown or cannot be handled by the current CAA2 partner.
invalidICPath
The specified directoty does not contain any product identity card.
invalidHandle
The specified Handle variable does not contain valid data.

This object is included in the file: CATSysCAALM.h
If needed, your Imakefile.mk should include the module: JS0GROUP

Copyright © 1999-2015, Dassault Systèmes. All rights reserved.