Commit c348a6e5 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

MediaLibrary: Move setFsFactory to test code

parent 92ff27f5
......@@ -96,12 +96,6 @@ class IMediaLibrary
///
virtual bool initialize( const std::string& dbPath, const std::string& thumbnailPath, IMediaLibraryCb* metadataCb ) = 0;
virtual void setVerbosity( LogLevel v ) = 0;
/**
* Replaces the default filesystem factory
* The default one will use standard opendir/readdir functions
* Calling this after initialize() is not a supported scenario.
*/
virtual void setFsFactory( std::shared_ptr<factory::IFileSystem> fsFactory ) = 0;
virtual LabelPtr createLabel( const std::string& label ) = 0;
virtual bool deleteLabel( LabelPtr label ) = 0;
......
......@@ -114,11 +114,6 @@ MediaLibrary::~MediaLibrary()
m_dbConnection->release();
}
void MediaLibrary::setFsFactory(std::shared_ptr<factory::IFileSystem> fsFactory)
{
m_fsFactory = fsFactory;
}
bool MediaLibrary::createAllTables()
{
auto t = m_dbConnection->newTransaction();
......
......@@ -50,7 +50,6 @@ class MediaLibrary : public IMediaLibrary
~MediaLibrary();
virtual bool initialize( const std::string& dbPath, const std::string& thumbnailPath, IMediaLibraryCb* metadataCb ) override;
virtual void setVerbosity( LogLevel v ) override;
virtual void setFsFactory( std::shared_ptr<factory::IFileSystem> fsFactory ) override;
std::vector<MediaPtr> files();
virtual std::vector<MediaPtr> audioFiles() override;
......
......@@ -153,3 +153,8 @@ std::shared_ptr<Device> MediaLibraryTester::addDevice( const std::string& uuid,
{
return Device::create( m_dbConnection.get(), uuid, isRemovable );
}
void MediaLibraryTester::setFsFactory(std::shared_ptr<factory::IFileSystem> fsFactory)
{
m_fsFactory = fsFactory;
}
......@@ -42,6 +42,7 @@ public:
void deleteGenre( unsigned int genreId );
void deleteArtist( unsigned int artistId );
std::shared_ptr<Device> addDevice( const std::string& uuid, bool isRemovable );
void setFsFactory( std::shared_ptr<factory::IFileSystem> fsFactory );
private:
std::unique_ptr<fs::IDirectory> dummyDirectory;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment