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

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
LicenseSpring::LicenseStorage Class Referenceabstract

LicenseStorage interface. More...

`#include <LicenseSpring/LicenseStorage.h>`

Inheritance diagram for LicenseSpring::LicenseStorage:

## Public Types
using | ptr_t = std::shared_ptr< LicenseStorage >

## Public Member Functions
virtual void | saveLicense (const std::string &licenseData)=0
| Save license data somewhere.
virtual std::string | loadLicense ()=0
| Load license data.
virtual void | clear ()=0
| Removes local license data.
virtual | ~LicenseStorage ()
| Destructor for LicenseStorage object.

## Detailed Description

LicenseStorage interface.

You can implement this interface to provide your custom license storage logic. For example to store license in your DB, Windows registry, remotely etc.

Definition at line 16 of file LicenseStorage.h.

## Member Typedef Documentation

## ◆ ptr_t

using LicenseSpring::LicenseStorage::ptr_t = std::shared_ptr<LicenseStorage>

Definition at line 19 of file LicenseStorage.h.

## Constructor & Destructor Documentation

## ◆ ~LicenseStorage()

virtual LicenseSpring::LicenseStorage::~LicenseStorage | ( |  | ) |
| virtual

Destructor for LicenseStorage object.

## Member Function Documentation

## ◆ saveLicense()

virtual void LicenseSpring::LicenseStorage::saveLicense | ( | const std::string & | licenseData | ) |
| pure virtual

Save license data somewhere.

Parameters

  licenseData | Encrypted license data string

You can throw any appropriate exception in case of errors, it will be wrapped into LocalLicenseException and propagated further.

Implemented in LicenseSpring::LicenseFileStorageBase, LicenseSpring::LicenseFileStorage, LicenseSpring::LicenseFileStorageEx, LicenseSpring::FileStorageWithLock, and LicenseSpring::LicenseMemoryStorage.

## ◆ loadLicense()

virtual std::string LicenseSpring::LicenseStorage::loadLicense | ( |  | ) |
| pure virtual

Load license data.

Return empty string if license does not exists. You can throw any appropriate exception in case of errors, it will be wrapped into LocalLicenseException and propagated further.

Returns
  Encrypted license data string.

Implemented in LicenseSpring::LicenseMemoryStorage, LicenseSpring::LicenseFileStorageBase, LicenseSpring::LicenseFileStorage, LicenseSpring::LicenseFileStorageEx, and LicenseSpring::FileStorageWithLock.

## ◆ clear()

virtual void LicenseSpring::LicenseStorage::clear | ( |  | ) |
| pure virtual

Removes local license data.

Implemented in LicenseSpring::LicenseMemoryStorage, LicenseSpring::LicenseFileStorageBase, LicenseSpring::LicenseFileStorage, LicenseSpring::LicenseFileStorageEx, and LicenseSpring::FileStorageWithLock.

The documentation for this class was generated from the following file:

- LicenseSpring/LicenseStorage.h