LicenseSpring C++ SDK  7.27.0
Easily add Software Licensing to your application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
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 
15 namespace LicenseSpring
16 {
20  {
21  public:
22  using ptr_t = std::shared_ptr<ProductDetails>;
23 
26 
29  bool isTrialAllowed() const;
30 
33  bool isVMAllowed() const;
34 
37  uint32_t trialPeriod() const;
38 
41  uint32_t floatingLicenseTimeout() const;
42 
45  const std::string& productName() const;
46 
49  const std::string& productCode() const;
50 
53  LSAuthMethod authorizationMethod() const;
54 
57  const std::string& metadata() const;
58 
61  bool isEqual( const ProductDetails& other ) const;
62 
65  static ProductDetails fromJsonString( const std::string& jsonString );
66 
67  private:
68  bool m_isTrialAllowed;
69  bool m_isVMAllowed;
70  uint32_t m_trialPeriod;
71  uint32_t m_floatingTimeout;
72  std::string m_productName;
73  std::string m_productCode;
74  LSAuthMethod m_authorizationMethod;
75  std::string m_metadata;
76  };
77 }
78 
79 #ifdef _MSC_VER
80 #pragma warning( pop )
81 #endif
82 
83 #endif // LS_PRODUCT_DETAILS_H
LSAuthMethod
Product authorization method.
Definition: PODTypes.h:9
std::shared_ptr< ProductDetails > ptr_t
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition: APIDef.h:22
Class that encapsulates information about a product.