10Duke Enterprise C++ Client
Loading...
Searching...
No Matches
tenduke::ee::licensing::LicenseCheckoutParameters Class Reference

#include <LicenseCheckoutParameters.h>

Detailed Description

Parameters for license checkout request.

Public Types

enum  ConsumptionMode { UNKNOWN , DEFAULT , CACHE , CHECKOUT }
 License consumption modes. More...
 

Public Member Functions

 LicenseCheckoutParameters (const std::vector< tenduke::ee::licensing::LicenseCheckoutItem > &items, enum ConsumptionMode consumptionMode=ConsumptionMode::DEFAULT, std::string version="", ::tenduke::ee::ClientProperties clientProperties={}, std::uint64_t consumeDuration=DEFAULT_CONSUME_DURATION, std::uint64_t consumeCount=DEFAULT_CONSUME_COUNT, std::string entitlementId="", std::string organizationId="")
 Constructs new instance.
 
std::string consumptionModeAsString () const
 Returns the consumptionMode as string.
 
bool hasConsumeCount () const
 Checks if consumeCount was provided.
 
bool hasConsumeDuration () const
 Checks if consumeDuration was provided.
 
bool hasConsumptionMode () const
 Checks if consumptionMode was provided.
 
bool hasEntitlementId () const
 Checks if entitlementId was provided.
 
bool hasOrganizationId () const
 Checks if organizationId was provided.
 
bool hasVersion () const
 Checks if version was provided.
 

Static Public Member Functions

static std::string consumptionModeToString (enum ConsumptionMode mode)
 Converts ConsumptionMode to string.
 

Public Attributes

const ::tenduke::ee::ClientProperties clientProperties
 Client properties.
 
const std::uint64_t consumeCount
 (Optional) The requested number of units to be consumed from the license’s use count.
 
const std::uint64_t consumeDuration
 (Optional) The requested duration of the license token (and the lease) in milliseconds.
 
enum ConsumptionMode consumptionMode
 The license consumption mode requested.
 
const std::string entitlementId
 (Optional) Entitlement id.
 
const std::vector< tenduke::ee::licensing::LicenseCheckoutItemitems
 Items to checkout.
 
const std::string organizationId
 (Optional) Organization id.
 
const std::string version
 (Optional) The version of the software that is running on the device, typically expressed as a version number (for example, 1.6.14).
 

Static Public Attributes

static const std::uint64_t DEFAULT_CONSUME_DURATION = 0
 Default consume duration.
 
static const std::uint64_t DEFAULT_CONSUME_COUNT = 0
 Default consume count.
 

Member Enumeration Documentation

◆ ConsumptionMode

License consumption modes.

Enumerator
CACHE 

Online mode.

This is the default if the parameter is not provided. This is intended to be used by online client applications that are able to check and refresh the license token frequently to renew the license lease, and don’t need to store license tokens for a long period of time.

CHECKOUT 

Offline mode.

This is intended to be used with client applications that go offline for longer periods of time.

Constructor & Destructor Documentation

◆ LicenseCheckoutParameters()

tenduke::ee::licensing::LicenseCheckoutParameters::LicenseCheckoutParameters ( const std::vector< tenduke::ee::licensing::LicenseCheckoutItem > &  items,
enum ConsumptionMode  consumptionMode = ConsumptionMode::DEFAULT,
std::string  version = "",
::tenduke::ee::ClientProperties  clientProperties = {},
std::uint64_t  consumeDuration = DEFAULT_CONSUME_DURATION,
std::uint64_t  consumeCount = DEFAULT_CONSUME_COUNT,
std::string  entitlementId = "",
std::string  organizationId = "" 
)
explicit

Constructs new instance.

Parameters
itemsItems to checkout
consumptionModeThe license consumption mode requested.
version(Optional) The version of the software that is running on the device, typically expressed as a version number (for example, 1.6.14). NOTE: This can be overridden on per-item basis
clientPropertiesClient properties
consumeDuration(Optional) The requested duration of the license token (and the lease) in milliseconds.
consumeCount(Optional) The requested number of units to be consumed from the license’s use count. The value must be a positive integer.
entitlementId(Optional) The requested licenses will be searched only under this entitlement. NOTE: This does not apply to a tenduke::ee::licensing::LicenseCheckoutItem, which has the license-id set. The license-id overrides this.
organizationId(Optional) The requested licenses will be searched only under this organization. NOTE: This does not apply to a tenduke::ee::licensing::LicenseCheckoutItem, which has the license-id set. The license-id overrides this.

Member Function Documentation

◆ consumptionModeAsString()

std::string tenduke::ee::licensing::LicenseCheckoutParameters::consumptionModeAsString ( ) const

Returns the consumptionMode as string.

Returns
-

◆ consumptionModeToString()

std::string tenduke::ee::licensing::LicenseCheckoutParameters::consumptionModeToString ( enum ConsumptionMode  mode)
static

Converts ConsumptionMode to string.

Parameters
modethe mode
Returns
string representation of the mode

◆ hasConsumeCount()

bool tenduke::ee::licensing::LicenseCheckoutParameters::hasConsumeCount ( ) const

Checks if consumeCount was provided.

Returns
-

◆ hasConsumeDuration()

bool tenduke::ee::licensing::LicenseCheckoutParameters::hasConsumeDuration ( ) const

Checks if consumeDuration was provided.

Returns
-

◆ hasConsumptionMode()

bool tenduke::ee::licensing::LicenseCheckoutParameters::hasConsumptionMode ( ) const

Checks if consumptionMode was provided.

Returns
-

◆ hasEntitlementId()

bool tenduke::ee::licensing::LicenseCheckoutParameters::hasEntitlementId ( ) const

Checks if entitlementId was provided.

Returns
-

◆ hasOrganizationId()

bool tenduke::ee::licensing::LicenseCheckoutParameters::hasOrganizationId ( ) const

Checks if organizationId was provided.

Returns
-

◆ hasVersion()

bool tenduke::ee::licensing::LicenseCheckoutParameters::hasVersion ( ) const

Checks if version was provided.

Returns
-

Member Data Documentation

◆ consumeCount

const std::uint64_t tenduke::ee::licensing::LicenseCheckoutParameters::consumeCount

(Optional) The requested number of units to be consumed from the license’s use count.

The value must be a positive integer.

◆ entitlementId

const std::string tenduke::ee::licensing::LicenseCheckoutParameters::entitlementId

(Optional) Entitlement id.

If given, licenses are chosen from given entitlement only.

◆ organizationId

const std::string tenduke::ee::licensing::LicenseCheckoutParameters::organizationId

(Optional) Organization id.

If given, licenses are chosen from given organization only.


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