Added Manager namespace
This commit is contained in:
@@ -5,14 +5,17 @@
|
||||
|
||||
#include "models/models.h"
|
||||
|
||||
class coverArtManager
|
||||
namespace Manager
|
||||
{
|
||||
public:
|
||||
coverArtManager(const std::string&);
|
||||
class coverArtManager
|
||||
{
|
||||
public:
|
||||
coverArtManager(const std::string&);
|
||||
|
||||
Model::Cover saveCover(const Model::Song&, std::string&, const std::string&);
|
||||
private:
|
||||
std::string path;
|
||||
};
|
||||
Model::Cover saveCover(const Model::Song&, std::string&, const std::string&);
|
||||
private:
|
||||
std::string path;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,23 +8,25 @@
|
||||
|
||||
#include "models/models.h"
|
||||
|
||||
class directory_manager
|
||||
namespace Manager
|
||||
{
|
||||
public:
|
||||
class directory_manager
|
||||
{
|
||||
public:
|
||||
static std::string create_directory_process(Model::Song, const std::string&);
|
||||
static std::string configPath(std::string_view);
|
||||
static std::string contentOfPath(std::string_view);
|
||||
|
||||
static std::string create_directory_process(Model::Song, const std::string&);
|
||||
static std::string configPath(std::string_view);
|
||||
static std::string contentOfPath(std::string_view);
|
||||
static nlohmann::json credentialConfigContent(const std::string&);
|
||||
static nlohmann::json databaseConfigContent(const std::string&);
|
||||
static nlohmann::json pathConfigContent(const std::string&);
|
||||
|
||||
static nlohmann::json credentialConfigContent(const std::string&);
|
||||
static nlohmann::json databaseConfigContent(const std::string&);
|
||||
static nlohmann::json pathConfigContent(const std::string&);
|
||||
void delete_cover_art_file(const std::string&, const std::string&);
|
||||
static void delete_directories(Model::Song, const std::string&);
|
||||
|
||||
void delete_cover_art_file(const std::string&, const std::string&);
|
||||
static void delete_directories(Model::Song, const std::string&);
|
||||
|
||||
private:
|
||||
void delete_song(const Model::Song);
|
||||
};
|
||||
private:
|
||||
void delete_song(const Model::Song);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -8,19 +8,22 @@
|
||||
|
||||
#include "models/models.h"
|
||||
|
||||
class song_manager
|
||||
namespace Manager
|
||||
{
|
||||
public:
|
||||
song_manager(std::string&);
|
||||
class song_manager
|
||||
{
|
||||
public:
|
||||
song_manager(std::string&);
|
||||
|
||||
void saveSong(Model::Song&);
|
||||
void deleteSong(Model::Song&);
|
||||
void saveSong(Model::Song&);
|
||||
void deleteSong(Model::Song&);
|
||||
|
||||
static void printSong(const Model::Song&);
|
||||
private:
|
||||
void saveSongTemp(Model::Song&);
|
||||
static void printSong(const Model::Song&);
|
||||
private:
|
||||
void saveSongTemp(Model::Song&);
|
||||
|
||||
std::string exe_path;
|
||||
};
|
||||
std::string exe_path;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -11,22 +11,25 @@
|
||||
#include "models/models.h"
|
||||
#include "types/scopes.h"
|
||||
|
||||
class token_manager
|
||||
namespace Manager
|
||||
{
|
||||
public:
|
||||
token_manager();
|
||||
class token_manager
|
||||
{
|
||||
public:
|
||||
token_manager();
|
||||
|
||||
Model::loginResult retrieve_token();
|
||||
Model::loginResult retrieve_token(std::string_view);
|
||||
Model::loginResult retrieve_token();
|
||||
Model::loginResult retrieve_token(std::string_view);
|
||||
|
||||
bool is_token_valid(std::string&, Scope);
|
||||
private:
|
||||
Model::auth_credentials parse_auth_credentials(std::string_view);
|
||||
bool is_token_valid(std::string&, Scope);
|
||||
private:
|
||||
Model::auth_credentials parse_auth_credentials(std::string_view);
|
||||
|
||||
std::vector<std::string> extract_scopes(const jwt::decoded_jwt&&);
|
||||
std::pair<bool, std::vector<std::string>> fetch_auth_header(const std::string&);
|
||||
std::vector<std::string> extract_scopes(const jwt::decoded_jwt&&);
|
||||
std::pair<bool, std::vector<std::string>> fetch_auth_header(const std::string&);
|
||||
|
||||
bool token_supports_scope(const std::vector<std::string>, const std::string&&);
|
||||
};
|
||||
bool token_supports_scope(const std::vector<std::string>, const std::string&&);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user