diff options
author | wm4 <wm4@nowhere> | 2014-06-01 03:41:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-01 03:41:46 +0200 |
commit | 5a5a3c53f75a093b1a0642174cdbd5a9504e083f (patch) | |
tree | 73aa81a8a15c4dd0636551c1797fb621010fa13a /libmpv/client.h | |
parent | c84f8735960fc3af6c50d0af675dfe9593174be5 (diff) | |
download | mpv-5a5a3c53f75a093b1a0642174cdbd5a9504e083f.tar.bz2 mpv-5a5a3c53f75a093b1a0642174cdbd5a9504e083f.tar.xz |
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.
Diffstat (limited to 'libmpv/client.h')
-rw-r--r-- | libmpv/client.h | 12 |
1 files changed, 6 insertions, 6 deletions
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 |