summaryrefslogtreecommitdiffstats
path: root/src/vis-config.hpp
blob: b0f72f9fae4f5e0ca6ab760dbb7d4d0263805e0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// SPDX-License-Identifier: Apache-2.0

#ifndef _VIS_CONFIG_HPP
#define _VIS_CONFIG_HPP

#include <string>

class VisConfig
{
public:
        explicit VisConfig(const std::string &hostname,
			   const unsigned port,
			   const std::string &clientKey,
			   const std::string &clientCert,
			   const std::string &caCert,
			   const std::string &authToken,
			   bool verifyPeer = true);
        explicit VisConfig(const std::string &appname);
        ~VisConfig() {};

	std::string hostname() { return m_hostname; };
	unsigned port() { return m_port; };
	std::string clientKey() { return m_clientKey; };
	std::string clientCert() { return m_clientCert; };
	std::string caCert() { return m_caCert; };
	std::string authToken() { return m_authToken; };
	bool verifyPeer() { return m_verifyPeer; };
	bool valid() { return m_valid; };
	unsigned verbose() { return m_verbose; };

private:
	std::string m_hostname;
	unsigned m_port;
	std::string m_clientKey;
	std::string m_clientCert;
	std::string m_caCert;
	std::string m_authToken;
	bool m_verifyPeer;
	unsigned m_verbose;
	bool m_valid;
};

#endif // _VIS_CONFIG_HPP