Commit d402b550 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

IMediaLibrary: Allow setDiscoverNetworkEnabled to return an error

parent 322764af
......@@ -331,7 +331,7 @@ class IMediaLibrary
* @param entryPoint What to discover.
*/
virtual void discover( const std::string& entryPoint ) = 0;
virtual void setDiscoverNetworkEnabled( bool enable ) = 0;
virtual bool setDiscoverNetworkEnabled( bool enable ) = 0;
virtual Query<IFolder> entryPoints() const = 0;
virtual FolderPtr folder( const std::string& mrl ) const = 0;
virtual void removeEntryPoint( const std::string& entryPoint ) = 0;
......
......@@ -1202,7 +1202,7 @@ void MediaLibrary::discover( const std::string& entryPoint )
m_discovererWorker->discover( entryPoint );
}
void MediaLibrary::setDiscoverNetworkEnabled( bool enabled )
bool MediaLibrary::setDiscoverNetworkEnabled( bool enabled )
{
if ( enabled )
{
......@@ -1218,6 +1218,7 @@ void MediaLibrary::setDiscoverNetworkEnabled( bool enabled )
return fs->isNetworkFileSystem();
}), end( m_fsFactories ) );
}
return true;
}
Query<IFolder> MediaLibrary::entryPoints() const
......
......@@ -136,7 +136,7 @@ class MediaLibrary : public IMediaLibrary, public IDeviceListerCb
SortingCriteria sort, bool desc ) const override;
virtual void discover( const std::string& entryPoint ) override;
virtual void setDiscoverNetworkEnabled( bool enabled ) override;
virtual bool setDiscoverNetworkEnabled( bool enabled ) override;
virtual Query<IFolder> entryPoints() const override;
virtual FolderPtr folder( const std::string& mrl ) const override;
virtual void removeEntryPoint( const std::string& entryPoint ) override;
......
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