moved credential definition in seperate file
This commit is contained in:
parent
0ac9c497ae
commit
4bb1fd148a
@ -86,7 +86,7 @@ add_library(logger ${LIB_METHOD}
|
|||||||
set(SOURCE
|
set(SOURCE
|
||||||
src/main.cpp
|
src/main.cpp
|
||||||
src/IPRefresher.cpp
|
src/IPRefresher.cpp
|
||||||
)
|
src/Credentials.cpp)
|
||||||
|
|
||||||
add_executable(iprefresher ${SOURCE})
|
add_executable(iprefresher ${SOURCE})
|
||||||
|
|
||||||
|
@ -4,29 +4,19 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class Credentials {
|
class Credentials {
|
||||||
public:
|
public:
|
||||||
static const std::string dynuapikey;
|
static std::string dynuapikey;
|
||||||
|
|
||||||
static const std::string domainid; //id of the dynu domain
|
static std::string domainid; //id of the dynu domain
|
||||||
static const std::string domainname;
|
static std::string domainname;
|
||||||
|
|
||||||
static const std::string telegramApiKey;
|
static std::string telegramApiKey;
|
||||||
static const std::string chatId;
|
static std::string chatId;
|
||||||
|
|
||||||
static bool checkCredentialValidity();
|
static bool checkCredentialValidity();
|
||||||
};
|
|
||||||
|
|
||||||
const std::string Credentials::dynuapikey = "";
|
private:
|
||||||
const std::string Credentials::domainid = ""; //id of the dynu domain
|
};
|
||||||
const std::string Credentials::domainname = "";
|
|
||||||
|
|
||||||
static const std::string Credentials::telegramApiKey = "";
|
|
||||||
static const std::string Credentials::chatId = "";
|
|
||||||
|
|
||||||
bool Credentials::checkCredentialValidity() {
|
|
||||||
return !(dynuapikey.empty() || domainid.empty() || domainname.empty());
|
|
||||||
}
|
|
16
src/Credentials.cpp
Normal file
16
src/Credentials.cpp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
//
|
||||||
|
// Created by lukas on 11.02.20.
|
||||||
|
//
|
||||||
|
|
||||||
|
#include <Credentials.h>
|
||||||
|
|
||||||
|
std::string Credentials::dynuapikey = "";
|
||||||
|
std::string Credentials::domainid = ""; //id of the dynu domain
|
||||||
|
std::string Credentials::domainname = "";
|
||||||
|
|
||||||
|
std::string Credentials::telegramApiKey = "";
|
||||||
|
std::string Credentials::chatId = "";
|
||||||
|
|
||||||
|
bool Credentials::checkCredentialValidity() {
|
||||||
|
return !(Credentials::dynuapikey.empty() || Credentials::domainid.empty() || Credentials::domainname.empty());
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user