From fdf8666254e5a0feee085d87e6703bf3ddbecdb8 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Fri, 4 Apr 2003 19:20:46 +0000 Subject: add initial async error/general message reporting to frontend obs: more messages should be added CVS patchset: 4539 CVS date: 2003/04/04 19:20:46 --- include/xine.h.in | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/xine.h.in b/include/xine.h.in index 9f0a49ab6..263d794da 100644 --- a/include/xine.h.in +++ b/include/xine.h.in @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: xine.h.in,v 1.70 2003/03/27 18:56:54 miguelfreitas Exp $ + * $Id: xine.h.in,v 1.71 2003/04/04 19:20:46 miguelfreitas Exp $ * * public xine-lib (libxine) interface and documentation * @@ -1264,6 +1264,33 @@ typedef struct { char str[256]; /* might be longer */ } xine_ui_data_t; +/* + * Send messages to UI. used mostly to report errors. + */ +typedef struct { + /* + * old xine-ui versions expect xine_ui_data_t type. + * this struct is added for compatibility. + */ + xine_ui_data_t compatibility; + + /* See XINE_MSG_xxx for defined types. */ + int type; + + /* defined types are provided with a standard explanation. + * note: explanation may be NULL. + */ + char *explanation; + + /* parameters are zero terminated strings */ + int num_parameters; + char *parameters; + + /* where messages are stored, will be longer */ + char internal_data[1]; +} xine_ui_message_data_t; + + /* * notify frame format change */ @@ -1361,6 +1388,27 @@ typedef struct { #endif +/* + * Defined message types for XINE_EVENT_UI_MESSAGE + * This is the mechanism to report async errors from engine. + * + * If frontend knows about the XINE_MSG_xxx type it may safely + * ignore the 'explanation' field and provide it's own custom + * dialog to the 'parameters'. + * + * right column specifies the usual parameters. + */ + +#define XINE_MSG_NO_ERROR 0 /* (messages to UI) */ +#define XINE_MSG_GENERAL_WARNING 1 /* (warning message) */ +#define XINE_MSG_UNKNOWN_HOST 2 /* (host name) */ +#define XINE_MSG_UNKNOWN_DEVICE 3 /* (device name) */ +#define XINE_MSG_NETWORK_UNREACHABLE 4 /* none */ +#define XINE_MSG_CONNECTION_REFUSED 5 /* (host name) */ +#define XINE_MSG_FILE_NOT_FOUND 6 /* (file name or mrl) */ +#define XINE_MSG_READ_ERROR 7 /* (device/file/mrl) */ +#define XINE_MSG_LIBRARY_LOAD_ERROR 8 /* (library/decoder) */ + /* opaque xine_event_queue_t */ typedef struct xine_event_queue_s xine_event_queue_t; -- cgit v1.2.3