]> git.sesse.net Git - vlc/commitdiff
Move message subscription stuff from vlc_messages.h to vlc_interface.h
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 18 Apr 2012 20:22:41 +0000 (23:22 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 18 Apr 2012 20:22:41 +0000 (23:22 +0300)
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.

include/vlc_interface.h
include/vlc_messages.h
src/misc/messages.c

index d4d16e96d213ed7068b4af1883339f5866f01976..2acf5aa9a531acc199838a99b75ab4ba1b56b879 100644 (file)
@@ -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 */ \
index b358955b6333a85f010d39a1a65ab749a6f4f8f1..69aaea4465cb1a67e67b8adfb1cbeeedf2016f40 100644 (file)
@@ -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 *);
-
 /**
  * @}
  */
index 317319a0192d3a1a6aa93611ebf586ba0de7ca47..c2f982048f93ebd6307fafde92c03d3132c2d9b3 100644 (file)
@@ -32,8 +32,6 @@
 # include "config.h"
 #endif
 
-#include <vlc_common.h>
-
 #include <stdarg.h>                                       /* va_list for BSD */
 #ifdef __APPLE__
 # include <xlocale.h>
 # 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"