diff options
author | Max Kellermann <max@duempel.org> | 2013-08-10 18:02:44 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-04 18:14:22 +0200 |
commit | 29030b54c98b0aee65fbc10ebf7ba36bed98c02c (patch) | |
tree | 79766830b55ebca38ddbce84d8d548227eedb69e /src/DatabasePlugin.hxx | |
parent | c9fcc7f14860777458153eb2d13c773ccfa1daa2 (diff) | |
download | mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.gz mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.tar.xz mpd-29030b54c98b0aee65fbc10ebf7ba36bed98c02c.zip |
util/Error: new error passing library
Replaces GLib's GError.
Diffstat (limited to '')
-rw-r--r-- | src/DatabasePlugin.hxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/DatabasePlugin.hxx b/src/DatabasePlugin.hxx index 835244020..c17bff63c 100644 --- a/src/DatabasePlugin.hxx +++ b/src/DatabasePlugin.hxx @@ -34,6 +34,7 @@ struct config_param; struct DatabaseSelection; struct db_visitor; struct Song; +class Error; struct DatabaseStats { /** @@ -73,7 +74,7 @@ public: /** * Open the database. Read it into memory if applicable. */ - virtual bool Open(gcc_unused GError **error_r) { + virtual bool Open(gcc_unused Error &error) { return true; } @@ -90,7 +91,7 @@ public: * directory (UTF-8) */ virtual Song *GetSong(const char *uri_utf8, - GError **error_r) const = 0; + Error &error) const = 0; /** * Mark the song object as "unused". Call this on objects @@ -105,19 +106,19 @@ public: VisitDirectory visit_directory, VisitSong visit_song, VisitPlaylist visit_playlist, - GError **error_r) const = 0; + Error &error) const = 0; bool Visit(const DatabaseSelection &selection, VisitDirectory visit_directory, VisitSong visit_song, - GError **error_r) const { + Error &error) const { return Visit(selection, visit_directory, visit_song, - VisitPlaylist(), error_r); + VisitPlaylist(), error); } bool Visit(const DatabaseSelection &selection, VisitSong visit_song, - GError **error_r) const { - return Visit(selection, VisitDirectory(), visit_song, error_r); + Error &error) const { + return Visit(selection, VisitDirectory(), visit_song, error); } /** @@ -126,11 +127,11 @@ public: virtual bool VisitUniqueTags(const DatabaseSelection &selection, enum tag_type tag_type, VisitString visit_string, - GError **error_r) const = 0; + Error &error) const = 0; virtual bool GetStats(const DatabaseSelection &selection, DatabaseStats &stats, - GError **error_r) const = 0; + Error &error) const = 0; }; struct DatabasePlugin { @@ -140,7 +141,7 @@ struct DatabasePlugin { * Allocates and configures a database. */ Database *(*create)(const config_param ¶m, - GError **error_r); + Error &error); }; #endif |