Class that saves license in a file, derived from LicenseFileStorageBase
class.
More...
#include <LicenseSpring/LicenseFileStorage.h>
|
std::wstring | prepareRead () const |
| Prepare to read license file.
|
|
std::wstring | prepareWrite () const |
| Prepare to write license file.
|
|
std::string | readLicense (const std::wstring &filePath) const |
| Reads license from file.
|
|
void | writeLicense (const std::wstring &filePath, const std::string &data) const |
| Writes given license data string to the file.
|
|
std::wstring | m_folderPath |
|
std::wstring | m_fileName |
|
Class that saves license in a file, derived from LicenseFileStorageBase
class.
Enhanced license file storage type for interprocess use. It uses file locking mechanism for synchronization. File operations of this class is thread and process safe.
Definition at line 211 of file LicenseFileStorage.h.
◆ ptr_t
◆ FileStorageWithLock()
LicenseSpring::FileStorageWithLock::FileStorageWithLock |
( |
const std::wstring & | licensePath = std::wstring() | ) |
|
FileStorageWithLock constructor.
- Parameters
-
licensePath | The path that license folder path will be set to |
◆ create()
static ptr_t LicenseSpring::FileStorageWithLock::create |
( |
const std::wstring & | licensePath = std::wstring() | ) |
|
|
static |
◆ saveLicense()
void LicenseSpring::FileStorageWithLock::saveLicense |
( |
const std::string & | data | ) |
|
|
overridevirtual |
◆ loadLicense()
std::string LicenseSpring::FileStorageWithLock::loadLicense |
( |
| ) |
|
|
overridevirtual |
◆ clear()
void LicenseSpring::FileStorageWithLock::clear |
( |
| ) |
|
|
overridevirtual |
◆ attemptsCount()
uint32_t LicenseSpring::FileStorageWithLock::attemptsCount |
( |
| ) |
const |
Get file lock operation attempts count.
Default value is 20 attempts, min is 1.
- Returns
- Attempts count.
◆ setAttemptsCount()
void LicenseSpring::FileStorageWithLock::setAttemptsCount |
( |
uint32_t | count | ) |
|
Set file lock operation attempts count.
- Parameters
-
◆ waitTimeout()
uint32_t LicenseSpring::FileStorageWithLock::waitTimeout |
( |
| ) |
const |
Get timeout in milliseconds between file lock attempts.
Default value is 50ms, min is 10ms.
- Returns
- Timeout in milliseconds.
◆ setWaitTimeout()
void LicenseSpring::FileStorageWithLock::setWaitTimeout |
( |
uint32_t | timeout | ) |
|
Set timeout in milliseconds between file lock attempts.
- Parameters
-
timeout | Timeout in milliseconds |
The documentation for this class was generated from the following file: