Package com.wibu.CodeMeter
Class CodeMeter.CMACCESS2
- java.lang.Object
-
- com.wibu.CodeMeter.CodeMeter.CMACCESS2
-
- Enclosing class:
- CodeMeter
public static class CodeMeter.CMACCESS2 extends java.lang.ObjectCMACCESS2 specifies additional data for the CmAccess2 call.CMACCESS specifies additional data for the Access Modes to a SubSystem (SubSystem Access), to a CmContainer (Box Access), to a single Firm Item (FC, Firm Item Access) or a CmContainer entry (FC:PC, Entry Access) in a given subsystem.
Definition for the class CMACCESS corresponding to the c-api struct CMACCESS
-
-
Field Summary
Fields Modifier and Type Field Description CodeMeter.CMBORROWDATAborrowDataContains a CMBORROWDATA structure, where the settings for License borrowing can be set.intboxMaskContains the box mask of the CmContainer to access.CodeMeter.CMCREDENTIALcredentialReference to a credential object.longctrlctrl specifies the kind of the subsystem access by setting one of the following flags.longfeatureCodeContains the Feature Code, which must map a given Feature Map.longfirmCodeContains the Firm Code of the access mode.longlicenseQuantityContains the number of licenses which will be used for a handle.shortminBoxMajorVersionContains the major firmware version of the CmContainer to access.shortminBoxMinorVersionContains the minor firmware version of the CmContainer to access.longproductCodeContains the Product Code of the access mode.longproductItemReferenceProduct Item Reference of the the Product Item to access.CodeMeter.CMTIMEreleaseDateContains a CMTIME structure where the Release Date can be set that is checked against the Maintenance Period of the license.longserialNumberContains the serial number of the CmContainer to access.java.lang.StringservernameContains the name of the CodeMeter server to access.longusedRuntimeVersionContains the minimum driver version of CodeMeter that has to be present.
-
Constructor Summary
Constructors Constructor Description CMACCESS2()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetUsedRuntimeVersion(int majorVersion, int minorVersion)Helper function to easily set the minimum required runtime version.voidsetUsedRuntimeVersion(int majorVersion, int minorVersion, int build)Helper function to easily set the minimum required runtime version.
-
-
-
Field Detail
-
ctrl
public long ctrl
ctrl specifies the kind of the subsystem access by setting one of the following flags. The following flags are possible:- CM_ACCESS_USERLIMIT needs a license for each CmAccess2() call. The NetworkCounter will be decreased by one at each access.
- CM_ACCESS_NOUSERLIMIT needs no license for each CmAccess2() call. The NetworkCounter will be not decreased in this mode.
- CM_ACCESS_EXCLUSIVE needs a license for each CmAccess2() call and on a computer only one access to the specified entry is permitted. The NetworkCounter will be decreased by one at each access.
- CM_ACCESS_FIRMITEM forces a Firm Item access to an CmContainer entry.
- CM_ACCESS_STATIONSHARE needs a license for each CmAccess2() call and on a computer only one license to the specified entry is blocked. The NetworkCounter will be decreased by one once per computer.
- CM_ACCESS_CONVENIENT doesn't require a license in the local subsystem (CmLocal) (locally works like CM_ACCESS_NOUSERLIMIT), but requires one license per access in the network (CmLAN) (remotely works like CM_ACCESS_USERLIMIT). This flags can be or'ed with one of the following flags:
- CM_ACCESS_FORCE forces the access to an entry, which has a expired Expiration Time, an invalid Activation Time or a UnitCounter, which is 0. Normally CmAccess2() does not return a valid handle if one of the three Product Item Options has not a true value.
- CM_ACCESS_CHECK_FSB specifies that the wanted access must be done to a Firm Security Box (FSB). If the specified entry is not inside a FSB an error is returned.
- CM_ACCESS_CHECK_CTSB specifies that the wanted access must be done to a Certified Time Security Box (CTSB). If the specified entry is not inside a CTSB an error is returned.
- CM_ACCESS_SUBSYSTEM specifies that the wanted access can also be a SubSystem Access. In this case mulFirm Code must be set to 0.
-
firmCode
public long firmCode
Contains the Firm Code of the access mode. Which Firm Code must be set for the different access modes you can see at the description of the CmAccess2() function
-
productCode
public long productCode
Contains the Product Code of the access mode. Which Product Code must be set for the different access modes you can see at the description of the CmAccess2() function.
-
featureCode
public long featureCode
Contains the Feature Code, which must map a given Feature Map. If the Feature Code is 0 there is no search for a fitting Feature Map.
-
usedRuntimeVersion
public long usedRuntimeVersion
Contains the minimum driver version of CodeMeter that has to be present. The version must be coded in a single long value by shifting the major/minor/build/count version:
cmacc.usedRuntimeVersion = (majorVersion << 24) | (minorVersion << 16) | ((build &0x0f) << 12) | (count & 0xfff);where build and count may be set to 0.- See Also:
setUsedRuntimeVersion(int, int)
-
productItemReference
public long productItemReference
Product Item Reference of the the Product Item to access.
-
minBoxMajorVersion
public short minBoxMajorVersion
Contains the major firmware version of the CmContainer to access.
-
minBoxMinorVersion
public short minBoxMinorVersion
Contains the minor firmware version of the CmContainer to access.
-
boxMask
public int boxMask
Contains the box mask of the CmContainer to access.
-
serialNumber
public long serialNumber
Contains the serial number of the CmContainer to access.
-
licenseQuantity
public long licenseQuantity
Contains the number of licenses which will be used for a handle.
-
servername
public java.lang.String servername
Contains the name of the CodeMeter server to access. The string length must not exceed 128 characters.
-
releaseDate
public CodeMeter.CMTIME releaseDate
Contains a CMTIME structure where the Release Date can be set that is checked against the Maintenance Period of the license.
-
borrowData
public CodeMeter.CMBORROWDATA borrowData
Contains a CMBORROWDATA structure, where the settings for License borrowing can be set. License borrowing is available since version 4.0 of CodeMeter and needs special programming of a license container. For easy access to borrowing functionality please refer to CmBorrow().
-
credential
public CodeMeter.CMCREDENTIAL credential
Reference to a credential object.
-
-
Method Detail
-
setUsedRuntimeVersion
public void setUsedRuntimeVersion(int majorVersion, int minorVersion)Helper function to easily set the minimum required runtime version.- Parameters:
majorVersion- minimum major version e.g. '4' for 4.01minorVersion- minimum minor version e.g. '1' for 4.01- See Also:
usedRuntimeVersion
-
setUsedRuntimeVersion
public void setUsedRuntimeVersion(int majorVersion, int minorVersion, int build)Helper function to easily set the minimum required runtime version.- Parameters:
majorVersion- minimum major version e.g. '4' for 4.01minorVersion- minimum minor version e.g. '20' for 4.20build- minimum build number, e.g. 283 for 4.20 Build 283- See Also:
usedRuntimeVersion
-
-