Code clean up
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define SONGREPOSITORY_H_
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <mysql/mysql.h>
|
||||
@@ -28,10 +29,13 @@ namespace database
|
||||
void saveRecord(const model::Song&);
|
||||
void updateRecord(const model::Song&);
|
||||
private:
|
||||
std::vector<model::Song> parseRecords(MYSQL_RES*); // TODO: to be removed
|
||||
std::shared_ptr<MYSQL_BIND> valueBind(model::Song&,
|
||||
std::tuple<char*, char*, char*, char*, char*>&);
|
||||
|
||||
std::tuple<char*, char*, char*, char*, char*> metadataBuffer();
|
||||
|
||||
std::vector<model::Song> parseRecords(MYSQL_STMT*);
|
||||
|
||||
model::Song parseRecord(MYSQL_RES*); // TODO: to be removed
|
||||
model::Song parseRecord(MYSQL_STMT*);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace manager {
|
||||
class SongManager
|
||||
{
|
||||
public:
|
||||
SongManager(std::string&);
|
||||
SongManager(const model::BinaryPath&);
|
||||
|
||||
|
||||
@@ -44,7 +43,6 @@ namespace manager {
|
||||
void modifySongOnFilesystem(model::Song&, const model::Song&);
|
||||
|
||||
model::BinaryPath m_bConf;
|
||||
std::string exe_path;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
namespace manager {
|
||||
class TokenManager {
|
||||
public:
|
||||
TokenManager();
|
||||
TokenManager() = default;
|
||||
|
||||
model::Token retrieveToken(const model::BinaryPath&);
|
||||
|
||||
@@ -27,7 +27,6 @@ private:
|
||||
|
||||
nlohmann::json createTokenBody(const model::AuthCredentials&);
|
||||
|
||||
model::AuthCredentials parseAuthCredentials(std::string_view);
|
||||
model::AuthCredentials parseAuthCredentials(const model::BinaryPath&);
|
||||
|
||||
std::vector<std::string> extractScopes(const jwt::decoded_jwt&&);
|
||||
|
||||
@@ -9,8 +9,10 @@ namespace type
|
||||
title,
|
||||
album,
|
||||
artist,
|
||||
albumArtist,
|
||||
genre,
|
||||
year
|
||||
year,
|
||||
titleAndArtist
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user