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

FloatingServerInfo.h
Go to the documentation of this file.
1 #ifndef LS_FLOATING_SERVER_INFO_H
2 #define LS_FLOATING_SERVER_INFO_H
3
4 #ifdef _MSC_VER
5 #pragma once
6 #pragma warning( push )
7 #pragma warning( disable : 4251 )
8 #endif
9
10 #include <string>
11 #include <memory>
12 #include <vector>
13 #include "APIDef.h"
14
15 namespace LicenseSpring
16 {
19 class LS_API FloatingServerInfo
20 {
21 public:
22 using ptr_t = std::shared_ptr<FloatingServerInfo>;
23
25 FloatingServerInfo() : m_registrationExpiry( 0 ) {}
26
30 FloatingServerInfo( uint32_t registrationExpiry, const std::vector<std::string>& serverList )
31 : m_registrationExpiry( registrationExpiry ), m_servers( serverList )
32 {}
33
36 uint32_t registrationExpiry() const { return m_registrationExpiry; }
37
40 const std::vector<std::string>& servers() const { return m_servers; }
41
42 private:
43 uint32_t m_registrationExpiry;
44 std::vector<std::string> m_servers;
45 };
46 }
47
48 #ifdef _MSC_VER
49 #pragma warning( pop )
50 #endif
51
52 #endif // LS_FLOATING_SERVER_INFO_H
LicenseSpring
Definition: BaseManager.h:15
LicenseSpring::FloatingServerInfo::FloatingServerInfo
FloatingServerInfo(uint32_t registrationExpiry, const std::vector< std::string > &serverList)
Constructs FloatingServerInfo with given data.
Definition: FloatingServerInfo.h:30
APIDef.h
LicenseSpring::FloatingServerInfo
Class that encapsulates information on Floating server settings.
Definition: FloatingServerInfo.h:19
LicenseSpring::FloatingServerInfo::FloatingServerInfo
FloatingServerInfo()
Default constructor, creates empty settings.
Definition: FloatingServerInfo.h:25
LicenseSpring::FloatingServerInfo::registrationExpiry
uint32_t registrationExpiry() const
Getter method for registration timeout.
Definition: FloatingServerInfo.h:36
LicenseSpring::FloatingServerInfo::servers
const std::vector< std::string > & servers() const
Getter method for server list.
Definition: FloatingServerInfo.h:40
LicenseSpring::FloatingServerInfo::ptr_t
std::shared_ptr< FloatingServerInfo > ptr_t
Definition: FloatingServerInfo.h:22
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