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

IParserService: Expose medialibrary as IMediaLibrary

parent 690c0b3a
......@@ -62,10 +62,10 @@ bool MetadataParser::cacheUnknownArtist()
return m_unknownArtist != nullptr;
}
bool MetadataParser::initialize( MediaLibrary* ml)
bool MetadataParser::initialize( IMediaLibrary* ml )
{
m_ml = ml;
m_notifier = ml->getNotifier();
m_ml = static_cast<MediaLibrary*>( ml );
m_notifier = m_ml->getNotifier();
return cacheUnknownArtist();
}
......
......@@ -37,7 +37,7 @@ public:
protected:
bool cacheUnknownArtist();
virtual bool initialize( MediaLibrary* ml ) override;
virtual bool initialize( IMediaLibrary* ml ) override;
virtual parser::Status run( parser::IItem& item ) override;
virtual const char* name() const override;
virtual uint8_t nbThreads() const override;
......
......@@ -40,7 +40,7 @@ VLCMetadataService::VLCMetadataService()
{
}
bool VLCMetadataService::initialize( MediaLibrary* )
bool VLCMetadataService::initialize( IMediaLibrary* )
{
return true;
}
......
......@@ -42,7 +42,7 @@ class VLCMetadataService : public IParserService
explicit VLCMetadataService();
private:
virtual bool initialize( MediaLibrary* ml ) override;
virtual bool initialize( IMediaLibrary* ml ) override;
virtual parser::Status run( parser::IItem& item ) override;
virtual const char* name() const override;
virtual uint8_t nbThreads() const override;
......
......@@ -29,7 +29,7 @@
namespace medialibrary
{
class MediaLibrary;
class IMediaLibrary;
class IParserService
{
......@@ -71,7 +71,7 @@ public:
*
* If false is returned, the service will be released and won't be used.
*/
virtual bool initialize( MediaLibrary* ml ) = 0;
virtual bool initialize( IMediaLibrary* ml ) = 0;
/**
* @brief onFlushing will be invoked prior to restarting/flushing the service
......
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