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

Loading...
Searching...
No Matches
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
14 namespace LicenseSpring
15{
18 class LS_API FloatingClient : public BaseManager
19 {
20 public:
21 using ptr_t = std::shared_ptr<FloatingClient>;
22
28 static FloatingClient::ptr_t create( Configuration::ptr_t config, LicenseStorage::ptr_t storage = nullptr );
29
34 FloatingClient( Configuration::ptr_t config, LicenseStorage::ptr_t storage );
35
37 ~FloatingClient() override;
38
52 const License::ptr_t registerLicense( const std::string& id, const LicenseID& licenseID = LicenseID() );
53
59 const License::ptr_t borrowLicense( const std::string& id, const std::string& borrowEndDateTime = std::string() );
60
69 bool unregisterLicense( const std::string& id, const LicenseID& licenseID = LicenseID() );
70
78 bool isOnline( bool throwExceptions = false ) const;
79
87 FloatingServerInfo::ptr_t getServerInfo();
88 };
89}
90
91#ifdef _MSC_VER
92#pragma warning( pop )
93#endif
94
95#endif // LS_FLOATING_CLIENT_H
LS_API
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition APIDef.h:22
BaseManager.h
FloatingServerInfo.h
License.h
LicenseSpring::BaseManager
Base class for license management.
Definition BaseManager.h:24
LicenseSpring::Configuration::ptr_t
std::shared_ptr< Configuration > ptr_t
Definition Configuration.h:20
LicenseSpring::FloatingClient
Class for performing requests to LicenseSpring Floating server.
Definition FloatingClient.h:19
LicenseSpring::FloatingClient::borrowLicense
const License::ptr_t borrowLicense(const std::string &id, const std::string &borrowEndDateTime=std::string())
Allows to register and borrow license at once.
LicenseSpring::FloatingClient::isOnline
bool isOnline(bool throwExceptions=false) const
Helper method, it checks connection to the Floating server.
LicenseSpring::FloatingClient::registerLicense
const License::ptr_t registerLicense(const std::string &id, const LicenseID &licenseID=LicenseID())
Register client with given id.
LicenseSpring::FloatingClient::getServerInfo
FloatingServerInfo::ptr_t getServerInfo()
Get Floating Server information (obsolete).
LicenseSpring::FloatingClient::create
static FloatingClient::ptr_t create(Configuration::ptr_t config, LicenseStorage::ptr_t storage=nullptr)
Creates FloatingClient object and initialize it with given configuration.
LicenseSpring::FloatingClient::ptr_t
std::shared_ptr< FloatingClient > ptr_t
Definition FloatingClient.h:21
LicenseSpring::FloatingClient::unregisterLicense
bool unregisterLicense(const std::string &id, const LicenseID &licenseID=LicenseID())
Unregister client with given id.
LicenseSpring::FloatingClient::~FloatingClient
~FloatingClient() override
Destroy FloatingClient and its configuration if there is no more references to the configuration.
LicenseSpring::FloatingClient::FloatingClient
FloatingClient(Configuration::ptr_t config, LicenseStorage::ptr_t storage)
Construct FloatingClient object and initialize it with given configuration.
LicenseSpring::FloatingServerInfo::ptr_t
std::shared_ptr< FloatingServerInfo > ptr_t
Definition FloatingServerInfo.h:22
LicenseSpring::License::ptr_t
std::shared_ptr< License > ptr_t
Definition License.h:36
LicenseSpring::LicenseID
Class that represents License identifier.
Definition LicenseID.h:19
LicenseSpring::LicenseStorage::ptr_t
std::shared_ptr< LicenseStorage > ptr_t
Definition LicenseStorage.h:19
LicenseSpring
Definition BaseManager.h:16