X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc%2Flibvlc.h;h=f4663eb28fe15e0bf38a1d40fd8aebe5b3135587;hb=e996cbefaf0f8db55513071b9678242e0a7733da;hp=4f27ad9f4cd0a801ad171159534372637fb3c844;hpb=3fb6bc11f1060f045a45d5df0ac803e4b1969db4;p=vlc diff --git a/include/vlc/libvlc.h b/include/vlc/libvlc.h index 4f27ad9f4c..f4663eb28f 100644 --- a/include/vlc/libvlc.h +++ b/include/vlc/libvlc.h @@ -58,6 +58,7 @@ extern "C" { # endif +#include #include /***************************************************************************** @@ -117,6 +118,49 @@ libvlc_exception_get_message( const libvlc_exception_t *p_exception ); /**@} */ +/***************************************************************************** + * Error handling + *****************************************************************************/ +/** \defgroup libvlc_error libvlc_error + * \ingroup libvlc_core + * LibVLC error handling + * @{ + */ + +/** + * A human-readable error message for the last LibVLC error in the calling + * thread. The resulting string is valid until another error occurs (at least + * until the next LibVLC call). + * + * @warning + * This will be NULL if there was no error. + */ +const char *libvlc_errmsg (void); + +/** + * Clears the LibVLC error status for the current thread. This is optional. + * By default, the error status is automatically overriden when a new error + * occurs, and destroyed when the thread exits. + */ +void libvlc_clearerr (void); + +/** + * Sets the LibVLC error status and message for the current thread. + * Any previous error is overriden. + * @return a nul terminated string in any case + */ +const char *libvlc_vprinterr (const char *fmt, va_list ap); + +/** + * Sets the LibVLC error status and message for the current thread. + * Any previous error is overriden. + * @return a nul terminated string in any case + */ +const char *libvlc_printerr (const char *fmt, ...); + +/**@} */ + + /***************************************************************************** * Core handling *****************************************************************************/