Code clean up

This commit is contained in:
kdeng00
2019-11-03 13:03:32 -05:00
parent 01faa60699
commit c7bbdfe581
23 changed files with 370 additions and 601 deletions
+6 -2
View File
@@ -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*);
};
}
-2
View File
@@ -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;
};
}
+1 -2
View File
@@ -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&&);
+3 -1
View File
@@ -9,8 +9,10 @@ namespace type
title,
album,
artist,
albumArtist,
genre,
year
year,
titleAndArtist
};
}