DatabasePlugin: make Visit() const
This commit is contained in:
parent
8e331cfc65
commit
af1c497759
@ -59,7 +59,7 @@ public:
|
||||
* directory (UTF-8)
|
||||
*/
|
||||
virtual struct song *GetSong(const char *uri_utf8,
|
||||
GError **error_r) = 0;
|
||||
GError **error_r) const = 0;
|
||||
|
||||
/**
|
||||
* Visit the selected entities.
|
||||
@ -68,7 +68,7 @@ public:
|
||||
VisitDirectory visit_directory,
|
||||
VisitSong visit_song,
|
||||
VisitPlaylist visit_playlist,
|
||||
GError **error_r) = 0;
|
||||
GError **error_r) const = 0;
|
||||
};
|
||||
|
||||
struct DatabasePlugin {
|
||||
|
@ -208,7 +208,7 @@ SimpleDatabase::Close()
|
||||
}
|
||||
|
||||
struct song *
|
||||
SimpleDatabase::GetSong(const char *uri, GError **error_r)
|
||||
SimpleDatabase::GetSong(const char *uri, GError **error_r) const
|
||||
{
|
||||
assert(root != NULL);
|
||||
|
||||
@ -241,7 +241,7 @@ SimpleDatabase::Visit(const struct db_selection *selection,
|
||||
VisitDirectory visit_directory,
|
||||
VisitSong visit_song,
|
||||
VisitPlaylist visit_playlist,
|
||||
GError **error_r)
|
||||
GError **error_r) const
|
||||
{
|
||||
const struct directory *directory = LookupDirectory(selection->uri);
|
||||
if (directory == NULL) {
|
||||
|
@ -59,12 +59,12 @@ public:
|
||||
virtual bool Open(GError **error_r) override;
|
||||
virtual void Close() override;
|
||||
virtual struct song *GetSong(const char *uri_utf8,
|
||||
GError **error_r) override;
|
||||
GError **error_r) const override;
|
||||
virtual bool Visit(const struct db_selection *selection,
|
||||
VisitDirectory visit_directory,
|
||||
VisitSong visit_song,
|
||||
VisitPlaylist visit_playlist,
|
||||
GError **error_r) override;
|
||||
GError **error_r) const override;
|
||||
|
||||
protected:
|
||||
bool Configure(const struct config_param *param, GError **error_r);
|
||||
|
Loading…
Reference in New Issue
Block a user