10Duke Scale C++ Client
Loading...
Searching...
No Matches
DefaultLicensingClient.h
1#ifndef TENDUKE_SE_LICENSING_DEFAULTLICENSINGCLIENT_H
2#define TENDUKE_SE_LICENSING_DEFAULTLICENSINGCLIENT_H
3
4#include "../../api/MutableLeases.h"
5#include "../../api/licenses/LicensingClient.h"
6#include "../../rest/licenses/ScaleLicensingApi.h"
7#include "oidc/session/OIDCSession.h"
8
9#include <memory>
10
11namespace tenduke { namespace se { namespace licensing {
12
21{
22public:
30 const std::shared_ptr<::tenduke::oidc::OIDCSession> &oidc,
31 const std::shared_ptr<::tenduke::se::licensing::rest::ScaleLicensingApi> &restApi,
32 const std::shared_ptr<::tenduke::se::licensing::MutableLeases> &leases
33 );
34
35 // `tenduke::se::licensing::LicensingClient` interface
36public:
37 ::tenduke::se::licensing::LicenseCheckoutResponse checkoutLicenses(const ::tenduke::se::licensing::LicenseCheckoutParameters &parameters) const override;
39 ::tenduke::se::licensing::LicenseCheckoutResponse checkoutLicensesWithKey(const std::string &licenseKey, const ::tenduke::se::licensing::LicenseCheckoutParameters &parameters) const override;
40 ::tenduke::se::licensing::FluentLicenseCheckout checkoutLicensesWithKey(const std::string &licenseKey) const override;
41
42 ::tenduke::se::licensing::LicenseKeyLicensesStatus describeLicenseKey(const std::string &licenseKey, const ::tenduke::se::Paging &paging, bool withMetadata) const override;
43 ::tenduke::se::licensing::LicenseKeyLicensesStatus describeLicenseKey(const std::string &licenseKey) const override;
44
45 ::tenduke::se::licensing::LicenseHeartbeatResponse heartbeatLicenses(const ::tenduke::se::licensing::LicenseHeartbeatParameters &parameters) const override;
47
48 ::tenduke::se::licensing::LicenseReleaseResponse releaseLicenses(const ::tenduke::se::licensing::LicenseReleaseParameters &parameters) const override;
50
51 ::tenduke::se::licensing::StartMeteredUseResponse startMeteredLicenseUse(const ::tenduke::se::licensing::StartMeteredUseParameters &parameters) const override;
53 ::tenduke::se::licensing::StartMeteredUseResponse startMeteredLicenseUseWithKey(const std::string &licenseKey, const ::tenduke::se::licensing::StartMeteredUseParameters &parameters) const override;
54 ::tenduke::se::licensing::FluentStartMeteredUse startMeteredLicenseUseWithKey(const std::string &licenseKey) const override;
55
56private:
57 const std::shared_ptr<::tenduke::oidc::OIDCSession> oidc;
58 const std::shared_ptr<::tenduke::se::licensing::rest::ScaleLicensingApi> restApi;
59 const std::shared_ptr<::tenduke::se::licensing::MutableLeases> leases;
60};
61
62}}}
63
64#endif //TENDUKE_SE_LICENSING_DEFAULTLICENSINGCLIENT_H
Default implementation of tenduke::se::licensing::LicensingClient.
Definition DefaultLicensingClient.h:21
::tenduke::se::licensing::FluentLicenseCheckout checkoutLicenses() const override
Starts fluent license checkout.
Definition DefaultLicensingClient.cpp:160
::tenduke::se::licensing::LicenseKeyLicensesStatus describeLicenseKey(const std::string &licenseKey, const ::tenduke::se::Paging &paging, bool withMetadata) const override
Describe license key.
Definition DefaultLicensingClient.cpp:173
::tenduke::se::licensing::FluentStartMeteredUse startMeteredLicenseUse() const override
Starts fluently building "start-metered-license-use"-request.
Definition DefaultLicensingClient.cpp:344
::tenduke::se::licensing::LicenseCheckoutResponse checkoutLicensesWithKey(const std::string &licenseKey, const ::tenduke::se::licensing::LicenseCheckoutParameters &parameters) const override
Checks out licenses with license key.
Definition DefaultLicensingClient.cpp:149
::tenduke::se::licensing::FluentLicenseHeartbeat heartbeatLicenses() const override
Starts fluent license heartbeat.
Definition DefaultLicensingClient.cpp:254
::tenduke::se::licensing::StartMeteredUseResponse startMeteredLicenseUseWithKey(const std::string &licenseKey, const ::tenduke::se::licensing::StartMeteredUseParameters &parameters) const override
Starts metered license use with license key.
Definition DefaultLicensingClient.cpp:350
::tenduke::se::licensing::FluentLicenseRelease releaseLicenses() const override
Starts fluent license release.
Definition DefaultLicensingClient.cpp:324
Checks out licenses, building the request fluently.
Definition FluentLicenseCheckout.h:18
Heartbeats licenses, building the request fluently.
Definition FluentLicenseHeartbeat.h:18
Releases licenses, building the request fluently.
Definition FluentLicenseRelease.h:18
Starts metered license use, building the request fluently.
Definition FluentStartMeteredUse.h:18
Response from license checkout call.
Definition LicenseCheckoutResponse.h:17
Response from license heartbeat call.
Definition LicenseHeartbeatResponse.h:19
A REST-entity to describe licenses matching a license key.
Definition LicenseKeyLicensesStatus.h:14
Response from license release call.
Definition LicenseReleaseResponse.h:17
Client for licensing operations.
Definition LicensingClient.h:72
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7