LicenseSpring C++ SDK
Easily add Software Licensing to your application
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 #include "CustomField.h"
16 
17 namespace LicenseSpring
18 {
23 {
24 public:
25  using ptr_t = std::shared_ptr<ProductDetails>;
26 
29 
32  bool isTrialAllowed() const;
33 
36  bool isVMAllowed() const;
37 
40  uint32_t trialPeriod() const;
41 
44  uint32_t floatingLicenseTimeout() const;
45 
48  const std::string &productName() const;
49 
52  const std::string &productCode() const;
53 
57  LSAuthMethod authorizationMethod() const;
58 
61  const std::string &metadata() const;
62 
65  const std::string &latestVersion() const;
66 
69  InstallationFile::ptr_t installationFile() const;
70 
73  std::vector<CustomField> customFields() const;
74 
77  bool isEqual(const ProductDetails &other) const;
78 
81  static ProductDetails fromJsonString(const std::string &jsonString);
82 
83 private:
84  bool m_isTrialAllowed;
85  bool m_isVMAllowed;
86  uint32_t m_trialPeriod;
87  uint32_t m_floatingTimeout;
88  std::string m_productName;
89  std::string m_productCode;
90  LSAuthMethod m_authorizationMethod;
91  std::string m_metadata;
92  std::string m_latestVersion;
93  std::vector<CustomField> m_customFields;
94 };
95 } // namespace LicenseSpring
96 
97 #ifdef _MSC_VER
98 #pragma warning(pop)
99 #endif
100 
101 #endif // LS_PRODUCT_DETAILS_H
LSAuthMethod
Product authorization method.
Definition: PODTypes.h:9
std::shared_ptr< ProductDetails > ptr_t
#define LS_API
Definition: APIDef.h:23
std::shared_ptr< InstallationFile > ptr_t
Class that encapsulates information about a product.