forked from Glimesh/janus-ftl-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfiguration.h
60 lines (50 loc) · 1.57 KB
/
Configuration.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**
* @file Configuration.h
* @author Hayden McAfee ([email protected])
* @version 0.1
* @date 2020-09-28
*
* @copyright Copyright (c) 2020 Hayden McAfee
*
*/
#pragma once
#include <cstdint>
#include <string>
enum class ServiceConnectionKind
{
DummyServiceConnection = 0,
GlimeshServiceConnection = 1,
};
class Configuration
{
public:
/* Public methods */
void Load();
/* Configuration values */
std::string GetMyHostname();
ServiceConnectionKind GetServiceConnectionKind();
uint16_t GetServiceConnectionMetadataReportIntervalMs();
// Dummy Service Connection Values
std::string GetDummyHmacKey();
std::string GetDummyPreviewImagePath();
// Glimesh Service Connection Values
std::string GetGlimeshServiceHostname();
uint16_t GetGlimeshServicePort();
bool GetGlimeshServiceUseHttps();
std::string GetGlimeshServiceClientId();
std::string GetGlimeshServiceClientSecret();
private:
/* Backing stores */
std::string myHostname;
ServiceConnectionKind serviceConnectionKind = ServiceConnectionKind::DummyServiceConnection;
uint16_t serviceConnectionMetadataReportIntervalMs = 4000;
// Dummy Service Connection Backing Stores
std::string dummyHmacKey = "aBcDeFgHiJkLmNoPqRsTuVwXyZ123456";
std::string dummyPreviewImagePath;
// Glimesh Service Connection Backing Stores
std::string glimeshServiceHostname = "localhost";
uint16_t glimeshServicePort = 4000;
bool glimeshServiceUseHttps = false;
std::string glimeshServiceClientId;
std::string glimeshServiceClientSecret;
};