You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.8 KiB

/*****************************************************************************
27 years ago
* intf_msg.h: messages interface
* (c)1999 VideoLAN
*****************************************************************************
27 years ago
* This library provides basic functions for threads to interact with user
27 years ago
* interface, such as message output. See config.h for output configuration.
*****************************************************************************/
27 years ago
/*****************************************************************************
27 years ago
* intf_DbgMsg macros and functions
*****************************************************************************
* The intf_DbgMsg* functions are defined as macro to be able to use the
27 years ago
* compiler extensions and print the file, the function and the line number
* from which they have been called. They call _intf_DbgMsg*() functions after
* having added debugging informations.
* Outside DEBUG mode, intf_DbgMsg* functions do nothing.
*****************************************************************************/
27 years ago
#ifdef DEBUG
/* DEBUG mode */
void _intf_DbgMsg ( char *psz_file, char *psz_function, int i_line,
27 years ago
char *psz_format, ... );
void _intf_DbgMsgImm ( char *psz_file, char *psz_function, int i_line,
char *psz_format, ... );
#define intf_DbgMsg( format, args... ) \
_intf_DbgMsg( __FILE__, __FUNCTION__, __LINE__, format, ## args )
#define intf_DbgMsgImm( format, args... ) \
_intf_DbgMsg( __FILE__, __FUNCTION__, __LINE__, format, ## args )
#else
/* Non-DEBUG mode */
#define intf_DbgMsg( format, args... )
#define intf_DbgMsgImm( format, args...)
27 years ago
#endif
/*****************************************************************************
27 years ago
* intf_FlushMsg macro and function
*****************************************************************************
27 years ago
* intf_FlushMsg is a function which flushs message queue and print all messages
* remaining. It is only usefull if INTF_MSG_QUEUE is defined. In this case, it
* is really a function. In the other case, it is a macro doing nothing.
*****************************************************************************/
27 years ago
#ifdef INTF_MSG_QUEUE
/* Message queue mode */
void intf_FlushMsg ( void );
#else
/* Direct mode */
#define intf_FlushMsg() ;
#endif
/*****************************************************************************
* Prototypes
*****************************************************************************/
27 years ago
p_intf_msg_t intf_MsgCreate ( void );
void intf_MsgDestroy ( void );
27 years ago
27 years ago
void intf_Msg ( char *psz_format, ... );
void intf_ErrMsg ( char *psz_format, ... );
void intf_IntfMsg ( char *psz_format, ... );
27 years ago
27 years ago
void intf_MsgImm ( char *psz_format, ... );
void intf_ErrMsgImm ( char *psz_format, ... );