started working on function to verify the configuration settings
This commit is contained in:
@@ -25,6 +25,7 @@ set(SOURCES
|
|||||||
src/manager/YearManager.cpp
|
src/manager/YearManager.cpp
|
||||||
src/utility/ImageFile.cpp
|
src/utility/ImageFile.cpp
|
||||||
src/utility/MetadataRetriever.cpp
|
src/utility/MetadataRetriever.cpp
|
||||||
|
src/verify/Initialization.cpp
|
||||||
)
|
)
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
include/callback/StreamCallback.h
|
include/callback/StreamCallback.h
|
||||||
@@ -70,6 +71,7 @@ set(HEADERS
|
|||||||
include/type/SongChanged.h
|
include/type/SongChanged.h
|
||||||
include/type/SongFilter.h
|
include/type/SongFilter.h
|
||||||
include/type/YearFilter.h
|
include/type/YearFilter.h
|
||||||
|
include/verify/Initialization.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set (TAGLIB
|
set (TAGLIB
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#ifndef INITIALIZATION_H_
|
||||||
|
#define INITIALIZATION_H_
|
||||||
|
|
||||||
|
#include "model/Models.h"
|
||||||
|
|
||||||
|
namespace verify
|
||||||
|
{
|
||||||
|
class Initialization
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void checkIcarus(const model::BinaryPath&);
|
||||||
|
private:
|
||||||
|
bool confirmConfigAuth(const model::BinaryPath&);
|
||||||
|
bool confirmConfigDatabase(const model::BinaryPath&);
|
||||||
|
bool confirmConfigPaths(const model::BinaryPath&);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "controller/SongController.hpp"
|
#include "controller/SongController.hpp"
|
||||||
#include "controller/YearController.hpp"
|
#include "controller/YearController.hpp"
|
||||||
#include "model/Models.h"
|
#include "model/Models.h"
|
||||||
|
#include "verify/Initialization.h"
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
@@ -59,6 +60,7 @@ int main(int argc, char **argv)
|
|||||||
oatpp::base::Environment::init();
|
oatpp::base::Environment::init();
|
||||||
|
|
||||||
model::BinaryPath bConf(argv[0]);
|
model::BinaryPath bConf(argv[0]);
|
||||||
|
verify::Initialization::checkIcarus(bConf);
|
||||||
|
|
||||||
run(bConf);
|
run(bConf);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
#include "verify/Initialization.h"
|
||||||
|
|
||||||
|
// verifies if the configuration settings are valid
|
||||||
|
void verify::Initialization::checkIcarus(const model::BinaryPath& bConf)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// verifies that the authorization settings are not the default values
|
||||||
|
bool verify::Initialization::confirmConfigAuth(const model::BinaryPath& bConf)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// verifies if database connectivity can be established
|
||||||
|
bool verify::Initialization::confirmConfigDatabase(const model::BinaryPath& bConf)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// verifies if the paths found in the config files exists
|
||||||
|
bool verify::Initialization::confirmConfigPaths(const model::BinaryPath& bConf)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user