| LicenseSpring C++ SDK 7.32.0 Easily add Software Licensing to your application

Loading...
Searching...
No Matches
ProductDetails.h
Go to the documentation of this file.
1#ifndef LS_PRODUCT_DETAILS_H
2#define LS_PRODUCT_DETAILS_H
3
4#ifdef _MSC_VER
5#pragma once
6#pragma warning( push )
7#pragma warning( disable : 4251 )
8#endif
9
10#include <memory>
11#include <string>
12#include "APIDef.h"
13#include "PODTypes.h"
14#include "InstallationFile.h"
15
16 namespace LicenseSpring
17{
20 class LS_API ProductDetails
21 {
22 public:
23 using ptr_t = std::shared_ptr<ProductDetails>;
24
26 ProductDetails();
27
30 bool isTrialAllowed() const;
31
34 bool isVMAllowed() const;
35
38 uint32_t trialPeriod() const;
39
42 uint32_t floatingLicenseTimeout() const;
43
46 const std::string& productName() const;
47
50 const std::string& productCode() const;
51
54 LSAuthMethod authorizationMethod() const;
55
58 const std::string& metadata() const;
59
62 const std::string& latestVersion() const;
63
66 InstallationFile::ptr_t installationFile() const;
67
70 bool isEqual( const ProductDetails& other ) const;
71
74 static ProductDetails fromJsonString( const std::string& jsonString );
75
76 private:
77 bool m_isTrialAllowed;
78 bool m_isVMAllowed;
79 uint32_t m_trialPeriod;
80 uint32_t m_floatingTimeout;
81 std::string m_productName;
82 std::string m_productCode;
83 LSAuthMethod m_authorizationMethod;
84 std::string m_metadata;
85 std::string m_latestVersion;
86 };
87}
88
89#ifdef _MSC_VER
90#pragma warning( pop )
91#endif
92
93#endif // LS_PRODUCT_DETAILS_H
APIDef.h
LS_API
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition APIDef.h:22
InstallationFile.h
PODTypes.h
LSAuthMethod
LSAuthMethod
Product authorization method.
Definition PODTypes.h:10
LicenseSpring::InstallationFile::ptr_t
std::shared_ptr< InstallationFile > ptr_t
Definition InstallationFile.h:54
LicenseSpring::ProductDetails
Class that encapsulates information about a product.
Definition ProductDetails.h:21
LicenseSpring::ProductDetails::trialPeriod
uint32_t trialPeriod() const
Getter for trial period value in days.
LicenseSpring::ProductDetails::isVMAllowed
bool isVMAllowed() const
Checks if running the product on virtual machines is allowed.
LicenseSpring::ProductDetails::fromJsonString
static ProductDetails fromJsonString(const std::string &jsonString)
Helper method, creates ProductDetails object from JSON string.
LicenseSpring::ProductDetails::latestVersion
const std::string & latestVersion() const
Getter for latest product version.
LicenseSpring::ProductDetails::isTrialAllowed
bool isTrialAllowed() const
Checks whether trial license is allowed for this product or not.
LicenseSpring::ProductDetails::ProductDetails
ProductDetails()
Default constructor, creates empty (invalid) Product details.
LicenseSpring::ProductDetails::floatingLicenseTimeout
uint32_t floatingLicenseTimeout() const
Getter for floating licenses in minutes.
LicenseSpring::ProductDetails::authorizationMethod
LSAuthMethod authorizationMethod() const
Getter for product authorization method.
LicenseSpring::ProductDetails::productName
const std::string & productName() const
Getter for product name.
LicenseSpring::ProductDetails::installationFile
InstallationFile::ptr_t installationFile() const
Getter for product installation file.
LicenseSpring::ProductDetails::ptr_t
std::shared_ptr< ProductDetails > ptr_t
Definition ProductDetails.h:23
LicenseSpring::ProductDetails::productCode
const std::string & productCode() const
Getter for product code.
LicenseSpring::ProductDetails::isEqual
bool isEqual(const ProductDetails &other) const
Compare this object to other.
LicenseSpring::ProductDetails::metadata
const std::string & metadata() const
Getter for product metadata.
LicenseSpring
Definition BaseManager.h:16