LicenseSpring C++ SDK 7.31.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
15namespace LicenseSpring
16{
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
#define LS_API
Macros that expands to dllexport, dllimport or nothing on non Windows platforms or in case of static ...
Definition: APIDef.h:22
Class that encapsulates information on Floating server settings.
std::shared_ptr< FloatingServerInfo > ptr_t
const std::vector< std::string > & servers() const
Getter method for server list.
FloatingServerInfo()
Default constructor, creates empty settings.
uint32_t registrationExpiry() const
Getter method for registration timeout.
FloatingServerInfo(uint32_t registrationExpiry, const std::vector< std::string > &serverList)
Constructs FloatingServerInfo with given data.