10Duke Scale C++ Client
|
#include <TendukeClient.h>
Base 10Duke Scale client, usable standalone for licensekey-based operations without user login.
See tenduke::se::TendukeClientWithOIDCSession
for a client, which uses identity-based authorization (and requires user to login).
The client is stateful: It holds the checked-out leases in a memory cache. Keep the client instance available for the duration of the application.
This client hold two services:
See the documentation for the classes for more details.
To create client for licensekey-based operations only, use factory function tenduke::se::createTendukeClientForLicenseKeyUsage(const std::string &,const tenduke::se::BackendConfiguration &, const tenduke::se::ClientProperties &, const std::string &, const tenduke::ServiceConfiguration &). Client created with the above factory-method must only by used for licensing operations with license-key, because other methods will not authorize properly. These methods of the
tenduke::se::licensing::LicensingClientare safe to use: -
tenduke::se::licensing::LicensingClient::checkoutLicensesWithKey(const std::string &) const -
tenduke::se::licensing::LicensingClient::checkoutLicensesWithKey(const std::string &, const ::tenduke::se::licensing::LicenseCheckoutParameters &) const -
tenduke::se::licensing::LicensingClient::describeLicenseKey(const std::string &) const -
tenduke::se::licensing::LicensingClient::describeLicenseKey(const std::string &, const ::tenduke::se::Paging&, bool) const -
tenduke::se::licensing::LicensingClient::heartbeatLicenses() const -
tenduke::se::licensing::LicensingClient::heartbeatLicenses(const ::tenduke::se::licensing::LicenseHeartbeatParameters &) const -
tenduke::se::licensing::LicensingClient::releaseLicenses() const -
tenduke::se::licensing::LicensingClient::releaseLicenses(const ::tenduke::se::licensing::LicenseReleaseParameters &) const -
tenduke::se::licensing::LicensingClient::startMeteredLicenseUseWithKey(const std::string &) const -
tenduke::se::licensing::LicensingClient::startMeteredLicenseUseWithKey(const std::string &,const ::tenduke::se::licensing::StartMeteredUseParameters &) const`
Public Member Functions | |
TendukeClient (const std::shared_ptr<::tenduke::se::licensing::LicensingClient > &licensingClient, const std::shared_ptr<::tenduke::se::licensing::Leases > &leases) | |
Creates new client. | |
virtual std::string | serializeState ()=0 |
Serializes the client state into a JSON. | |
Public Attributes | |
const std::shared_ptr<::tenduke::se::licensing::LicensingClient > | licensing |
Licensing client. | |
const std::shared_ptr<::tenduke::se::licensing::Leases > | leases |
Lease-cache. | |
|
inline |
Creates new client.
licensingClient | - |
leases | - |
|
pure virtual |
Serializes the client state into a JSON.
This JSON can be stored to persist the state when the application is closed. The stored state can then be restored when the application is restarted.
Implemented in tenduke::se::TendukeClientWithOIDCSessionImpl.