LicenseSpring C++ SDK
Easily add Software Licensing to your application
FloatingClient.h
Go to the documentation of this file.
1#ifndef LS_FLOATING_CLIENT_H
2#define LS_FLOATING_CLIENT_H
3
4#ifdef _MSC_VER
5#pragma once
6#pragma warning(push)
7#pragma warning(disable : 4251)
8#endif
9
10#include "License.h"
11#include "BaseManager.h"
12#include "FloatingServerInfo.h"
13
14namespace LicenseSpring
15{
19{
20public:
21 using ptr_t = std::shared_ptr<FloatingClient>;
22
29 Configuration::ptr_t config, LicenseStorage::ptr_t storage = nullptr);
30
36
39 ~FloatingClient() override;
40
59 const std::string &id, const LicenseID &licenseID = LicenseID());
60
71 const std::string &id, const std::string &borrowEndDateTime = std::string());
72
83 bool unregisterLicense(const std::string &id, const LicenseID &licenseID = LicenseID());
84
93 bool isOnline(bool throwExceptions = false) const;
94
105};
106} // namespace LicenseSpring
107
108#ifdef _MSC_VER
109#pragma warning(pop)
110#endif
111
112#endif // LS_FLOATING_CLIENT_H
#define LS_API
Definition: APIDef.h:23
Base class for license management.
Definition: BaseManager.h:25
std::shared_ptr< Configuration > ptr_t
Definition: Configuration.h:21
Class for performing requests to LicenseSpring Floating server.
const License::ptr_t borrowLicense(const std::string &id, const std::string &borrowEndDateTime=std::string())
Allows to register and borrow license at once.
bool isOnline(bool throwExceptions=false) const
Helper method, it checks connection to the Floating server.
const License::ptr_t registerLicense(const std::string &id, const LicenseID &licenseID=LicenseID())
Register client with given id.
FloatingServerInfo::ptr_t getServerInfo()
Get Floating Server information (obsolete).
static FloatingClient::ptr_t create(Configuration::ptr_t config, LicenseStorage::ptr_t storage=nullptr)
Creates FloatingClient object and initialize it with given configuration.
std::shared_ptr< FloatingClient > ptr_t
bool unregisterLicense(const std::string &id, const LicenseID &licenseID=LicenseID())
Unregister client with given id.
~FloatingClient() override
Destroy FloatingClient and its configuration if there is no more references to the configuration.
FloatingClient(Configuration::ptr_t config, LicenseStorage::ptr_t storage)
Construct FloatingClient object and initialize it with given configuration.
std::shared_ptr< FloatingServerInfo > ptr_t
std::shared_ptr< License > ptr_t
Definition: License.h:37
Class that represents License identifier.
Definition: LicenseID.h:21
std::shared_ptr< LicenseStorage > ptr_t