diff options
author | Max Kellermann <max@duempel.org> | 2008-10-30 08:38:54 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-30 08:38:54 +0100 |
commit | 62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca (patch) | |
tree | 565dd0a8c2c50a31dac369408e6b499eb7daafb5 /src/decoder_api.h | |
parent | d29bad441066919f808c4ad1657bc5600fd9bd45 (diff) | |
download | mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.tar.gz mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.tar.xz mpd-62d4fa9306fdb5dd0a1b592fd8dbdf1b679d92ca.zip |
decoder: use bool for return values and flags
Don't return 0/-1 on success/error, but true/false. Instead of int,
use bool for storing flags.
Diffstat (limited to 'src/decoder_api.h')
-rw-r--r-- | src/decoder_api.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder_api.h b/src/decoder_api.h index fbd259859..808eb979e 100644 --- a/src/decoder_api.h +++ b/src/decoder_api.h @@ -58,7 +58,7 @@ struct decoder_plugin { * have/need one this must return < 0 if there is an error and * >= 0 otherwise */ - int (*init)(void); + bool (*init)(void); /** * optional, set this to NULL if the InputPlugin doesn't have/need one @@ -75,9 +75,9 @@ struct decoder_plugin { * this will be used to decode InputStreams, and is * recommended for files and networked (HTTP) connections. * - * returns -1 on error, 0 on success + * returns false on error, true on success */ - int (*stream_decode)(struct decoder *, struct input_stream *); + bool (*stream_decode)(struct decoder *, struct input_stream *); /** * use this if and only if your InputPlugin can only be passed @@ -86,7 +86,7 @@ struct decoder_plugin { * * returns -1 on error, 0 on success */ - int (*file_decode)(struct decoder *, char *path); + bool (*file_decode)(struct decoder *, char *path); /** * file should be the full path! Returns NULL if a tag cannot |