From 3c0dea811d498db3091dad868740c4653c22717e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Aug 2012 22:20:28 +0200 Subject: DatabasePlugin: add method GetStats() Optimize the ProxyDatabase by invoking "stats" on the peer, instead of visiting all songs. --- src/db/SimpleDatabasePlugin.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/db/SimpleDatabasePlugin.hxx') diff --git a/src/db/SimpleDatabasePlugin.hxx b/src/db/SimpleDatabasePlugin.hxx index 0b7e838b5..7e3f5d2db 100644 --- a/src/db/SimpleDatabasePlugin.hxx +++ b/src/db/SimpleDatabasePlugin.hxx @@ -58,6 +58,7 @@ public: virtual bool Open(GError **error_r) override; virtual void Close() override; + virtual struct song *GetSong(const char *uri_utf8, GError **error_r) const override; virtual bool Visit(const DatabaseSelection &selection, @@ -71,6 +72,10 @@ public: VisitString visit_string, GError **error_r) const override; + virtual bool GetStats(const DatabaseSelection &selection, + DatabaseStats &stats, + GError **error_r) const override; + protected: bool Configure(const struct config_param *param, GError **error_r); -- cgit v1.2.3