[vlmc-devel] [PATCH] Library: Add missing MediaLibrary overrides

yikei lu luyikei.qmltu at gmail.com
Wed Mar 1 19:52:06 CET 2017


On Wed, Mar 1, 2017 at 8:12 AM, Abhimanyu Singh Gaur <gaur.1 at iitj.ac.in> wrote:
> The recent changes in MediaLibrary API have introduced some more virtual functions, which were not implemented in Library, hence building VLMC was giving compile time errors. This patch adds empty definitions for those functions.
> This also resolves the issue #35.
> ---
>  src/Library/Library.cpp | 20 ++++++++++++++++++++
>  src/Library/Library.h   |  5 +++++
>  2 files changed, 25 insertions(+)
>
> diff --git a/src/Library/Library.cpp b/src/Library/Library.cpp
> index 9c74b43..7364a44 100644
> --- a/src/Library/Library.cpp
> +++ b/src/Library/Library.cpp
> @@ -339,3 +339,23 @@ void Library::onPlaylistsModified( std::vector<medialibrary::PlaylistPtr> )
>  void Library::onPlaylistsDeleted( std::vector<int64_t> )
>  {
>  }
> +
> +void Library::onReloadStarted( const std::string& entryPoint )
> +{
> +}

Nitpicking but you can omit names of parameter variables like other
empty functions do.
Also the usual way to format functions in VLMC is like:

void
functionNames()
{
}

Thanks for your patch though!

> +
> +void Library::onReloadCompleted( const std::string& entryPoint )
> +{
> +}
> +
> +void Library::onEntryPointRemoved( const std::string& entryPoint, bool success )
> +{
> +}
> +
> +void Library::onEntryPointBanned( const std::string& entryPoint, bool success )
> +{
> +}
> +
> +void Library::onEntryPointUnbanned( const std::string& entryPoint, bool success )
> +{
> +}
> diff --git a/src/Library/Library.h b/src/Library/Library.h
> index 5c50927..31617b8 100644
> --- a/src/Library/Library.h
> +++ b/src/Library/Library.h
> @@ -107,6 +107,11 @@ private:
>      virtual void onPlaylistsAdded( std::vector<medialibrary::PlaylistPtr> playlists ) override;
>      virtual void onPlaylistsModified( std::vector<medialibrary::PlaylistPtr> playlists ) override;
>      virtual void onPlaylistsDeleted( std::vector<int64_t> playlistIds ) override;
> +    virtual void onReloadStarted( const std::string& entryPoint ) override;
> +    virtual void onReloadCompleted( const std::string& entryPoint ) override;
> +    virtual void onEntryPointRemoved( const std::string& entryPoint, bool success ) override;
> +    virtual void onEntryPointBanned( const std::string& entryPoint, bool success ) override;
> +    virtual void onEntryPointUnbanned( const std::string& entryPoint, bool success ) override;
>
>  private:
>      std::unique_ptr<medialibrary::IMediaLibrary>    m_ml;
> --
> 2.9.3
>
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel


More information about the Vlmc-devel mailing list