Commit b549105c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Move message subscription stuff from vlc_messages.h to vlc_interface.h

This is not particularly clean and intuitive. But <vlc_messages.h> is
included and used all over the place, whereas the back-end is only used
by interfaces.
parent 704980f3
......@@ -96,19 +96,34 @@ struct intf_dialog_args_t
struct interaction_dialog_t *p_dialog;
};
/*****************************************************************************
* Prototypes
*****************************************************************************/
VLC_API int intf_Create( vlc_object_t *, const char * );
#define intf_Create(a,b) intf_Create(VLC_OBJECT(a),b)
VLC_API void libvlc_Quit( libvlc_int_t * );
/**
* \defgroup vlc_subscription Log messages subscription
* These functions deal with log messages.
* @{
*/
/**
* Used by interface plugins which subscribe to the message bank.
*/
typedef struct msg_subscription_t msg_subscription_t;
/**
* Message logging callback signature.
* Accepts one private data pointer, the message, and an overrun counter.
*/
typedef void (*msg_callback_t) (void *, int, const msg_item_t *,
const char *, va_list);
VLC_API msg_subscription_t *vlc_Subscribe(msg_callback_t, void *) VLC_USED;
VLC_API void vlc_Unsubscribe(msg_subscription_t *);
/*@}*/
/*****************************************************************************
* Macros
*****************************************************************************/
#if defined( WIN32 ) && !defined( UNDER_CE )
# define CONSOLE_INTRO_MSG \
if( !getenv( "PWD" ) ) /* detect Cygwin shell or Wine */ \
......
......@@ -62,14 +62,6 @@ typedef struct
const char *psz_header; /**< Additional header (used by VLM media) */
} msg_item_t;
/**
* Used by interface plugins which subscribe to the message bank.
*/
typedef struct msg_subscription_t msg_subscription_t;
/*****************************************************************************
* Prototypes
*****************************************************************************/
VLC_API void vlc_Log(vlc_object_t *, int,
const char *, const char *, ...) VLC_FORMAT( 4, 5 );
VLC_API void vlc_vaLog(vlc_object_t *, int,
......@@ -85,16 +77,6 @@ VLC_API void vlc_vaLog(vlc_object_t *, int,
#define msg_Dbg( p_this, ... ) \
vlc_Log( VLC_OBJECT(p_this), VLC_MSG_DBG, MODULE_STRING, __VA_ARGS__ )
/**
* Message logging callback signature.
* Accepts one private data pointer, the message, and an overrun counter.
*/
typedef void (*msg_callback_t) (void *, int, const msg_item_t *,
const char *, va_list);
VLC_API msg_subscription_t *vlc_Subscribe(msg_callback_t, void *) VLC_USED;
VLC_API void vlc_Unsubscribe(msg_subscription_t *);
/**
* @}
*/
......
......@@ -32,8 +32,6 @@
# include "config.h"
#endif
#include <vlc_common.h>
#include <stdarg.h> /* va_list for BSD */
#ifdef __APPLE__
# include <xlocale.h>
......@@ -41,13 +39,13 @@
# include <locale.h>
#endif
#include <errno.h> /* errno */
#include <assert.h>
#include <vlc_common.h>
#include <vlc_interface.h>
#ifdef WIN32
# include <vlc_network.h> /* 'net_strerror' and 'WSAGetLastError' */
#endif
#include <assert.h>
#include <vlc_charset.h>
#include "../libvlc.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment