Code cleanup
This commit is contained in:
@@ -3,10 +3,8 @@
|
||||
|
||||
#include "model/Models.h"
|
||||
|
||||
namespace manager
|
||||
{
|
||||
class AlbumManager
|
||||
{
|
||||
namespace manager {
|
||||
class AlbumManager {
|
||||
public:
|
||||
AlbumManager(const model::BinaryPath&);
|
||||
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
#include "model/Models.h"
|
||||
|
||||
namespace manager
|
||||
{
|
||||
class ArtistManager
|
||||
{
|
||||
namespace manager {
|
||||
class ArtistManager {
|
||||
public:
|
||||
ArtistManager(const model::BinaryPath&);
|
||||
|
||||
|
||||
@@ -6,12 +6,9 @@
|
||||
|
||||
#include "model/Models.h"
|
||||
|
||||
namespace manager
|
||||
{
|
||||
class CoverArtManager
|
||||
{
|
||||
namespace manager {
|
||||
class CoverArtManager {
|
||||
public:
|
||||
CoverArtManager(const std::string&);
|
||||
CoverArtManager(const model::BinaryPath& bConf);
|
||||
|
||||
model::Cover saveCover(const model::Song&);
|
||||
@@ -25,7 +22,6 @@ namespace manager
|
||||
std::string createImagePath(const model::Song&);
|
||||
|
||||
model::BinaryPath m_bConf;
|
||||
std::string path;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -9,13 +9,12 @@
|
||||
#include "model/Models.h"
|
||||
#include "type/PathType.h"
|
||||
|
||||
namespace manager
|
||||
{
|
||||
class DirectoryManager
|
||||
{
|
||||
namespace manager {
|
||||
class DirectoryManager {
|
||||
public:
|
||||
static std::string createDirectoryProcess(model::Song, const std::string&);
|
||||
static std::string createDirectoryProcess(const model::Song&, const model::BinaryPath&, type::PathType);
|
||||
static std::string createDirectoryProcess(const model::Song&,
|
||||
const model::BinaryPath&, type::PathType);
|
||||
static std::string configPath(std::string_view);
|
||||
static std::string configPath(const model::BinaryPath&);
|
||||
static std::string contentOfPath(const std::string&);
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
#include "model/Models.h"
|
||||
|
||||
namespace manager
|
||||
{
|
||||
class GenreManager
|
||||
{
|
||||
namespace manager {
|
||||
class GenreManager {
|
||||
public:
|
||||
GenreManager(const model::BinaryPath&);
|
||||
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
#include "type/SongUpload.h"
|
||||
|
||||
namespace manager {
|
||||
class SongManager
|
||||
{
|
||||
class SongManager {
|
||||
public:
|
||||
SongManager(const model::BinaryPath&);
|
||||
|
||||
|
||||
@@ -14,26 +14,26 @@
|
||||
#include "type/Scopes.h"
|
||||
|
||||
namespace manager {
|
||||
class TokenManager {
|
||||
public:
|
||||
TokenManager() = default;
|
||||
class TokenManager {
|
||||
public:
|
||||
TokenManager() = default;
|
||||
|
||||
model::Token retrieveToken(const model::BinaryPath&);
|
||||
model::Token retrieveToken(const model::BinaryPath&);
|
||||
|
||||
bool isTokenValid(std::string&, type::Scope);
|
||||
bool testAuth(const model::BinaryPath&);
|
||||
private:
|
||||
cpr::Response sendRequest(std::string_view, nlohmann::json&);
|
||||
bool isTokenValid(std::string&, type::Scope);
|
||||
bool testAuth(const model::BinaryPath&);
|
||||
private:
|
||||
cpr::Response sendRequest(std::string_view, nlohmann::json&);
|
||||
|
||||
nlohmann::json createTokenBody(const model::AuthCredentials&);
|
||||
nlohmann::json createTokenBody(const model::AuthCredentials&);
|
||||
|
||||
model::AuthCredentials parseAuthCredentials(const model::BinaryPath&);
|
||||
model::AuthCredentials parseAuthCredentials(const model::BinaryPath&);
|
||||
|
||||
std::vector<std::string> extractScopes(const jwt::decoded_jwt&&);
|
||||
std::pair<bool, std::vector<std::string>> fetchAuthHeader(const std::string&);
|
||||
std::vector<std::string> extractScopes(const jwt::decoded_jwt&&);
|
||||
std::pair<bool, std::vector<std::string>> fetchAuthHeader(const std::string&);
|
||||
|
||||
bool tokenSupportsScope(const std::vector<std::string>&, const std::string&&);
|
||||
};
|
||||
bool tokenSupportsScope(const std::vector<std::string>&, const std::string&&);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
#include "model/Models.h"
|
||||
|
||||
namespace manager {
|
||||
class UserManager {
|
||||
public:
|
||||
UserManager(const model::BinaryPath&);
|
||||
class UserManager {
|
||||
public:
|
||||
UserManager(const model::BinaryPath&);
|
||||
|
||||
model::RegisterResult registerUser(model::User&);
|
||||
model::RegisterResult registerUser(model::User&);
|
||||
|
||||
bool doesUserExist(const model::User&);
|
||||
bool validatePassword(const model::User&);
|
||||
bool doesUserExist(const model::User&);
|
||||
bool validatePassword(const model::User&);
|
||||
|
||||
void printUser(const model::User&);
|
||||
private:
|
||||
model::BinaryPath m_bConf;
|
||||
};
|
||||
void printUser(const model::User&);
|
||||
private:
|
||||
model::BinaryPath m_bConf;
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
|
||||
#include "model/Models.h"
|
||||
|
||||
namespace manager
|
||||
{
|
||||
class YearManager
|
||||
{
|
||||
namespace manager {
|
||||
class YearManager {
|
||||
public:
|
||||
YearManager(const model::BinaryPath&);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user