File: VoIPServerConfig.h

package info (click to toggle)
libtgvoip 2.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,004 kB
  • sloc: cpp: 61,331; ansic: 24,725; sh: 4,150; makefile: 749; asm: 242
file content (34 lines) | stat: -rw-r--r-- 835 bytes parent folder | download | duplicates (3)
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
//
// libtgvoip is free and unencumbered public domain software.
// For more information, see http://unlicense.org or the UNLICENSE file
// you should have received with this source code distribution.
//

#ifndef TGVOIP_VOIPSERVERCONFIG_H
#define TGVOIP_VOIPSERVERCONFIG_H

#include <memory>
#include <string>
#include <stdint.h>

namespace tgvoip{

class ServerConfigImpl;

class ServerConfig{
public:
	ServerConfig();
	~ServerConfig();
	static ServerConfig* GetSharedInstance();
	int32_t GetInt(std::string name, int32_t fallback);
	double GetDouble(std::string name, double fallback);
	std::string GetString(std::string name, std::string fallback);
	bool GetBoolean(std::string name, bool fallback);
	void Update(std::string jsonString);

private:
	std::shared_ptr<ServerConfigImpl> p_impl;
};
}

#endif //TGVOIP_VOIPSERVERCONFIG_H