1#ifndef TENDUKE_SE_LICENSING_REST_ABSTRACTLICENSEREQUEST_H
2#define TENDUKE_SE_LICENSING_REST_ABSTRACTLICENSEREQUEST_H
4#include "../../../config/BackendConfiguration.h"
5#include "../../../config/ClientProperties.h"
6#include "http/HTTPClient.h"
7#include "http/HTTPRequestAuthenticator.h"
8#include "http/HTTPResponseToException.h"
9#include "json/JSONParser.h"
14namespace tenduke {
namespace se {
namespace licensing {
namespace rest {
43 std::string licenseKey,
45 const std::shared_ptr<const ::tenduke::se::ClientProperties> &
clientProperties,
46 const std::shared_ptr<const ::tenduke::se::BackendConfiguration> &
configuration,
47 const std::shared_ptr<const ::tenduke::http::HTTPClient> &httpClient,
49 const std::shared_ptr<const ::tenduke::http::HTTPResponseToException> &
throwException,
50 const std::shared_ptr<const ::tenduke::json::JSONParser> &jsonParser
71 const std::string licenseKey;
79 const std::shared_ptr<const ::tenduke::se::BackendConfiguration>
configuration;
83 const std::shared_ptr<const ::tenduke::http::HTTPClient>
http;
87 const std::shared_ptr<const ::tenduke::http::HTTPResponseToException>
throwException;
89 const std::shared_ptr<const ::tenduke::json::JSONParser>
parseJSON;
Abstract base class for license-related requests.
Definition AbstractLicenseRequest.h:20
static const bool NON_METERED
Magic value to indicate that this is normal (not metered) license request.
Definition AbstractLicenseRequest.h:28
static const std::string NO_LICENSE_KEY
Magic value to indicate that this is not a license key request.
Definition AbstractLicenseRequest.h:23
static const bool METERED
Magic value to indicate that this is metered license request.
Definition AbstractLicenseRequest.h:26
const std::shared_ptr< const ::tenduke::http::HTTPClient > http
HTTP-client.
Definition AbstractLicenseRequest.h:83
const std::shared_ptr< const ::tenduke::http::HTTPRequestAuthenticator > httpRequestAuthenticator
HTTP-request authenticator.
Definition AbstractLicenseRequest.h:85
const std::shared_ptr< const ::tenduke::http::HTTPResponseToException > throwException
Throw-exception.
Definition AbstractLicenseRequest.h:87
bool isMetered() const
Checks if this metered-request.
std::string getLicenseKey() const
Returns license key.
Definition AbstractLicenseRequest.cpp:14
bool hasLicenseKey() const
Checks if this is license-key request.
Definition AbstractLicenseRequest.cpp:20
const std::shared_ptr< const ::tenduke::se::ClientProperties > clientProperties
Client properties.
Definition AbstractLicenseRequest.h:77
const std::shared_ptr< const ::tenduke::se::BackendConfiguration > configuration
Config.
Definition AbstractLicenseRequest.h:79
const std::shared_ptr< const ::tenduke::json::JSONParser > parseJSON
Parses JSON.
Definition AbstractLicenseRequest.h:89
Root for classes, functions and globals of 10Duke C++ Client.
Definition BackendConfiguration.h:7