LicenseSpring C++ SDK  7.27.0
Easily add Software Licensing to your application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
BaseManager.h
Go to the documentation of this file.
1 #ifndef LS_BASE_MANAGER_H
2 #define LS_BASE_MANAGER_H
3 
4 #ifdef _MSC_VER
5 #pragma once
6 #pragma warning( push )
7 #pragma warning( disable : 4251 )
8 #endif
9 
10 #include "Configuration.h"
11 #include "ProductDetails.h"
12 #include "License.h"
13 #include "LicenseStorage.h"
14 
15 namespace LicenseSpring
16 {
17  class LicenseService;
18  class DataHandler;
19 
24  {
25  public:
30  BaseManager( Configuration::ptr_t config, LicenseStorage::ptr_t storage = nullptr );
31  BaseManager( const BaseManager& ) = delete;
32  BaseManager& operator =( const BaseManager& ) = delete;
34  virtual ~BaseManager();
35 
38  Configuration::ptr_t currentConfig() const;
39 
43  void reconfigure( Configuration::ptr_t config );
44 
54  ProductDetails getProductDetails();
55 
60  const License::ptr_t getCurrentLicense();
61 
65  const License::ptr_t reloadLicense();
66 
69  void clearLocalStorage();
70 
77  const std::wstring& dataLocation() const;
78 
84  void setDataLocation( const std::wstring& path );
85 
89  std::wstring licenseFileName() const;
90 
95  void setLicenseFileName( const std::wstring& name );
96 
100  std::wstring licenseFilePath() const;
101 
102  protected:
104  std::shared_ptr<DataHandler> m_dataHandler;
105  LicenseService* m_pLicenseService;
107 
109  void reset();
110  };
111 }
112 
113 #ifdef _MSC_VER
114 #pragma warning( pop )
115 #endif
116 
117 #endif // LS_BASE_MANAGER_H
std::shared_ptr< Configuration > ptr_t
Definition: Configuration.h:20
std::shared_ptr< LicenseStorage > ptr_t
Base class for license management.
Definition: BaseManager.h:23
std::shared_ptr< License > ptr_t
Definition: License.h:36
LicenseService * m_pLicenseService
Definition: BaseManager.h:105
Configuration::ptr_t m_config
Definition: BaseManager.h:103
License::ptr_t m_currentLicense
Definition: BaseManager.h:106
std::shared_ptr< DataHandler > m_dataHandler
Definition: BaseManager.h:104
#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.