From 29030b54c98b0aee65fbc10ebf7ba36bed98c02c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 10 Aug 2013 18:02:44 +0200 Subject: util/Error: new error passing library Replaces GLib's GError. --- src/CheckAudioFormat.hxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/CheckAudioFormat.hxx') diff --git a/src/CheckAudioFormat.hxx b/src/CheckAudioFormat.hxx index 7fbce7f98..df952adc7 100644 --- a/src/CheckAudioFormat.hxx +++ b/src/CheckAudioFormat.hxx @@ -22,26 +22,18 @@ #include "AudioFormat.hxx" -#include +class Error; -/** - * The GLib quark used for errors reported by this library. - */ -gcc_const -static inline GQuark -audio_format_quark(void) -{ - return g_quark_from_static_string("audio_format"); -} +extern const class Domain audio_format_domain; bool -audio_check_sample_rate(unsigned long sample_rate, GError **error_r); +audio_check_sample_rate(unsigned long sample_rate, Error &error); bool -audio_check_sample_format(SampleFormat sample_format, GError **error_r); +audio_check_sample_format(SampleFormat sample_format, Error &error); bool -audio_check_channel_count(unsigned sample_format, GError **error_r); +audio_check_channel_count(unsigned sample_format, Error &error); /** * Wrapper for audio_format_init(), which checks all attributes. @@ -49,6 +41,6 @@ audio_check_channel_count(unsigned sample_format, GError **error_r); bool audio_format_init_checked(AudioFormat &af, unsigned long sample_rate, SampleFormat sample_format, unsigned channels, - GError **error_r); + Error &error); #endif -- cgit v1.2.3