aboutsummaryrefslogtreecommitdiffstats
path: root/src/stored_playlist.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-11 07:41:25 +0200
committerMax Kellermann <max@duempel.org>2011-09-11 07:57:50 +0200
commitca419c84b83d017c3e4309e22f92273500197eea (patch)
tree495a1a68c3bc4b0d1fbd2efb30985d31e14fe18d /src/stored_playlist.h
parentaede71b1dcda4dacc566f11d47188c85a3ee8dd2 (diff)
downloadmpd-ca419c84b83d017c3e4309e22f92273500197eea.tar.gz
mpd-ca419c84b83d017c3e4309e22f92273500197eea.tar.xz
mpd-ca419c84b83d017c3e4309e22f92273500197eea.zip
stored_playlist: return GError, code is playlist_result
Improve error reporting and handling. command.c gets the new function print_error(), which sends a GError to the client.
Diffstat (limited to 'src/stored_playlist.h')
-rw-r--r--src/stored_playlist.h35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/stored_playlist.h b/src/stored_playlist.h
index 3aa3b6cdc..cfe49633c 100644
--- a/src/stored_playlist.h
+++ b/src/stored_playlist.h
@@ -20,8 +20,6 @@
#ifndef MPD_STORED_PLAYLIST_H
#define MPD_STORED_PLAYLIST_H
-#include "playlist_error.h"
-
#include <glib.h>
#include <stdbool.h>
#include <time.h>
@@ -54,36 +52,37 @@ spl_valid_name(const char *name_utf8);
* NULL if an error occurred.
*/
GPtrArray *
-spl_list(void);
+spl_list(GError **error_r);
void
spl_list_free(GPtrArray *list);
GPtrArray *
-spl_load(const char *utf8path);
+spl_load(const char *utf8path, GError **error_r);
void
spl_free(GPtrArray *list);
-enum playlist_result
-spl_move_index(const char *utf8path, unsigned src, unsigned dest);
+bool
+spl_move_index(const char *utf8path, unsigned src, unsigned dest,
+ GError **error_r);
-enum playlist_result
-spl_clear(const char *utf8path);
+bool
+spl_clear(const char *utf8path, GError **error_r);
-enum playlist_result
-spl_delete(const char *name_utf8);
+bool
+spl_delete(const char *name_utf8, GError **error_r);
-enum playlist_result
-spl_remove_index(const char *utf8path, unsigned pos);
+bool
+spl_remove_index(const char *utf8path, unsigned pos, GError **error_r);
-enum playlist_result
-spl_append_song(const char *utf8path, struct song *song);
+bool
+spl_append_song(const char *utf8path, struct song *song, GError **error_r);
-enum playlist_result
-spl_append_uri(const char *file, const char *utf8file);
+bool
+spl_append_uri(const char *file, const char *utf8file, GError **error_r);
-enum playlist_result
-spl_rename(const char *utf8from, const char *utf8to);
+bool
+spl_rename(const char *utf8from, const char *utf8to, GError **error_r);
#endif