From 5a5a3c53f75a093b1a0642174cdbd5a9504e083f Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 1 Jun 2014 03:41:46 +0200 Subject: client API: report success status when running commands Until now, an error was reported only if the command couldn't be parsed. Attempt to do more fine-grained reporting. This is not necessarily perfect, but it's an improvement. --- libmpv/client.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libmpv') diff --git a/libmpv/client.h b/libmpv/client.h index 673586e169..7e2dc1b98a 100644 --- a/libmpv/client.h +++ b/libmpv/client.h @@ -207,7 +207,7 @@ typedef enum mpv_error { /** * Trying to set or get a property using an unsupported MPV_FORMAT. */ - MPV_ERROR_PROPERTY_FORMAT = -9, + MPV_ERROR_PROPERTY_FORMAT = -9, /** * The property exists, but is not available. This usually happens when the * associated subsystem is not active, e.g. querying audio parameters while @@ -217,7 +217,11 @@ typedef enum mpv_error { /** * Error setting or getting a property. */ - MPV_ERROR_PROPERTY_ERROR = -11 + MPV_ERROR_PROPERTY_ERROR = -11, + /** + * General error when running a command with mpv_command and similar. + */ + MPV_ERROR_COMMAND = -12 } mpv_error; /** @@ -620,10 +624,6 @@ int mpv_set_option_string(mpv_handle *ctx, const char *name, const char *data); * * The commands and their parameters are documented in input.rst. * - * Caveat: currently, commands do not report whether they run successfully. If - * the command exists and its arguments are not broken, always success - * will be returned. - * * @param[in] args NULL-terminated list of strings. Usually, the first item * is the command, and the following items are arguments. * @return error code -- cgit v1.2.3