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

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. More...
virtual std::string | loadLicense ()=0
| Load license data. More...
virtual void | clear ()=0
| Removes local license data. More...
virtual | ~LicenseStorage ()
| Destructor for LicenseStorage object. More...

## 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::FileStorageWithLock, LicenseSpring::LicenseFileStorageEx, LicenseSpring::LicenseFileStorage, LicenseSpring::LicenseFileStorageBase, 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::FileStorageWithLock, LicenseSpring::LicenseFileStorageEx, LicenseSpring::LicenseFileStorage, LicenseSpring::LicenseFileStorageBase, and LicenseSpring::LicenseMemoryStorage.

## ◆ clear()

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

Removes local license data.

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

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

- LicenseSpring/LicenseStorage.h