Starting to switch Metadata portion to c++. Switching from TagLibSharp to Taglib (c++)

This commit is contained in:
kdeng00
2019-08-06 22:51:20 -04:00
parent 02bc671883
commit 47723c7d94
7 changed files with 50 additions and 363 deletions
+3 -1
View File
@@ -7,12 +7,14 @@ set(CMAKE_CXX_STANDARD 17)
set(SOURCES
src/directory_manager.cpp
src/metadata_retriever.cpp
)
set(HEADERS
include/models.h
include/directory_manager.h
include/metadata_retriever.h
)
add_library(icarus SHARED ${SOURCES} ${HEADERS})
include_directories(include)
target_link_libraries(icarus "-lstdc++fs")
target_link_libraries(icarus "-lstdc++fs" tag)
+7
View File
@@ -3,3 +3,10 @@
#include <string>
std::string create_directory_process(Song, const char*);
std::string read_cover_art(const char*);
void copy_stock_to_root(const char*, const std::string);
void copy_song_to_path(const char*, const char*);
void delete_cover_art_file(const std::string);
void delete_directories(Song song, const char*);
void delete_song(Song song);
+5
View File
@@ -0,0 +1,5 @@
#include <iostream>
#include "models.h"
Song fetch_metadata(const char*);
+26
View File
@@ -0,0 +1,26 @@
#include <iostream>
#include <string>
#include "metadata_retriever.h"
Song fetch_metadata(const char *song_path)
{
Song sng;
std::string title = "ddd";
sng.Title = (char*)title.c_str();
sng.SongPath = (char*)song_path;
return sng;
}
extern "C"
{
Song retrieve_metadata(const char*);
Song retrieve_metadata(const char* song_path)
{
return fetch_metadata(song_path);
}
}