]> git.sesse.net Git - vlc/commitdiff
Rename msg_item_* to vlc_log_* (cosmetic)
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Mar 2013 20:38:05 +0000 (22:38 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 18 Mar 2013 21:15:22 +0000 (23:15 +0200)
(This is needed for the next change.)

include/vlc_interface.h
include/vlc_messages.h
lib/log.c
modules/gui/macosx/intf.h
modules/gui/macosx/intf.m
modules/gui/ncurses.c
modules/gui/qt4/dialogs/messages.cpp
modules/gui/qt4/dialogs/messages.hpp
modules/misc/logger.c
src/libvlc.h
src/misc/messages.c

index 1dabb2dc13d95372062e9dad741f6803e050801b..0ba9154cf3aa9d95655883452ee6e61433fd622e 100644 (file)
@@ -104,12 +104,12 @@ VLC_API void libvlc_Quit( libvlc_int_t * );
 /**
  * Message logging callback signature.
  * \param data data pointer as provided to vlc_msg_SetCallback().
- * \param type message type (VLC_MSG_* values from enum msg_item_type)
+ * \param type message type (VLC_MSG_* values from enum vlc_log_type)
  * \param item meta informations
  * \param fmt format string
  * \param args format string arguments
  */
-typedef void (*vlc_log_cb) (void *data, int type, const msg_item_t *item,
+typedef void (*vlc_log_cb) (void *data, int type, const vlc_log_t *item,
                             const char *fmt, va_list args);
 
 VLC_API void vlc_LogSet(libvlc_int_t *, vlc_log_cb cb, void *data);
index 69aaea4465cb1a67e67b8adfb1cbeeedf2016f40..79aa519e00a65af6b0e64f60dd0f67e03ad20268 100644 (file)
@@ -43,7 +43,7 @@
  */
 
 /** Message types */
-enum msg_item_type
+enum vlc_log_type
 {
     VLC_MSG_INFO=0, /**< Important information */
     VLC_MSG_ERR,    /**< Error */
@@ -54,13 +54,13 @@ enum msg_item_type
 /**
  * Log message
  */
-typedef struct
+typedef struct vlc_log_t
 {
     uintptr_t   i_object_id; /**< Emitter (temporaly) unique object ID or 0 */
     const char *psz_object_type; /**< Emitter object type name */
     const char *psz_module; /**< Emitter module (source code) */
     const char *psz_header; /**< Additional header (used by VLM media) */
-} msg_item_t;
+} vlc_log_t;
 
 VLC_API void vlc_Log(vlc_object_t *, int,
                      const char *, const char *, ...) VLC_FORMAT( 4, 5 );
index 0999c562096ee1d7619976c4c3e9bcc694383aa8..f74081f38dfa6276e5a775c771662809731d3cd9 100644 (file)
--- a/lib/log.c
+++ b/lib/log.c
@@ -60,7 +60,7 @@ static void libvlc_log (int level, const char *fmt, ...)
     va_end (ap);
 }
 
-static void libvlc_logf (void *dummy, int level, const msg_item_t *item,
+static void libvlc_logf (void *dummy, int level, const vlc_log_t *item,
                          const char *fmt, va_list ap)
 {
     char *msg;
index 084191908b89be4a2c524fc3f1c248919a5d979d..8c5d1e746219cf6d5984b5155c696e57791c923a 100644 (file)
@@ -201,7 +201,7 @@ struct intf_sys_t
 - (IBAction)showMessagesPanel:(id)sender;
 - (IBAction)updateMessagesPanel:(id)sender;
 
-- (void)processReceivedlibvlcMessage:(const msg_item_t *) item ofType: (int)type withStr: (char *)str;
+- (void)processReceivedlibvlcMessage:(const vlc_log_t *) item ofType: (int)type withStr: (char *)str;
 
 - (void)updateTogglePlaylistState;
 
index 6a3a92d5cf8f0cb2c3a49d2fa67f89a78c70b46e..edd8b7135caf5dbab5776e262905f359cc5f2aaa 100644 (file)
@@ -82,7 +82,7 @@ static void updateProgressPanel (void *, const char *, float);
 static bool checkProgressPanel (void *);
 static void destroyProgressPanel (void *);
 
-static void MsgCallback(void *data, int type, const msg_item_t *item, const char *format, va_list ap);
+static void MsgCallback(void *data, int type, const vlc_log_t *item, const char *format, va_list ap);
 
 static int InputEvent(vlc_object_t *, const char *,
                       vlc_value_t, vlc_value_t, void *);
@@ -300,7 +300,7 @@ static void Run(intf_thread_t *p_intf)
  * ready to be displayed. We store everything in a NSArray in our Cocoa part
  * of this file.
  *****************************************************************************/
-static void MsgCallback(void *data, int type, const msg_item_t *item, const char *format, va_list ap)
+static void MsgCallback(void *data, int type, const vlc_log_t *item, const char *format, va_list ap)
 {
     int canc = vlc_savecancel();
     char *str;
@@ -1901,7 +1901,7 @@ static VLCMain *_o_sharedMainInstance = nil;
         return @"";
 }
 
-- (void)processReceivedlibvlcMessage:(const msg_item_t *) item ofType: (int)i_type withStr: (char *)str
+- (void)processReceivedlibvlcMessage:(const vlc_log_t *) item ofType: (int)i_type withStr: (char *)str
 {
     if (o_msg_arr) {
         NSColor *o_white = [NSColor whiteColor];
index 6b46bbba1f2da432284b139655a6e70db2192604..40b36bf1440d7b9a699f485892d3734e29f39116 100644 (file)
@@ -194,7 +194,7 @@ struct intf_sys_t
     struct
     {
         int              type;
-        msg_item_t      *item;
+        vlc_log_t       *item;
         char            *msg;
     } msgs[50];      // ring buffer
     int                 i_msgs;
@@ -999,7 +999,7 @@ static int DrawMessages(intf_thread_t *intf)
     vlc_mutex_lock(&sys->msg_lock);
     int i = sys->i_msgs;
     for(;;) {
-        msg_item_t *msg = sys->msgs[i].item;
+        vlc_log_t *msg = sys->msgs[i].item;
         if (msg) {
             if (sys->color)
                 color_set(sys->msgs[i].type + C_INFO, NULL);
@@ -1698,9 +1698,9 @@ static void HandleKey(intf_thread_t *intf)
 /*
  *
  */
-static msg_item_t *msg_Copy (const msg_item_t *msg)
+static vlc_log_t *msg_Copy (const vlc_log_t *msg)
 {
-    msg_item_t *copy = (msg_item_t *)xmalloc (sizeof (*copy));
+    vlc_log_t *copy = (vlc_log_t *)xmalloc (sizeof (*copy));
     copy->i_object_id = msg->i_object_id;
     copy->psz_object_type = msg->psz_object_type;
     copy->psz_module = strdup (msg->psz_module);
@@ -1708,14 +1708,14 @@ static msg_item_t *msg_Copy (const msg_item_t *msg)
     return copy;
 }
 
-static void msg_Free (msg_item_t *msg)
+static void msg_Free (vlc_log_t *msg)
 {
     free ((char *)msg->psz_module);
     free ((char *)msg->psz_header);
     free (msg);
 }
 
-static void MsgCallback(void *data, int type, const msg_item_t *msg,
+static void MsgCallback(void *data, int type, const vlc_log_t *msg,
                         const char *format, va_list ap)
 {
     intf_sys_t *sys = data;
index ef00245431927d5bfab3f8b89cea0b4f29584f0a..223c4798f2534ceda56741a5ec62e6a8f05228dd 100644 (file)
@@ -50,7 +50,7 @@ enum {
 class MsgEvent : public QEvent
 {
 public:
-    MsgEvent( int, const msg_item_t *, const char * );
+    MsgEvent( int, const vlc_log_t *, const char * );
 
     int priority;
     uintptr_t object_id;
@@ -60,7 +60,7 @@ public:
     QString text;
 };
 
-MsgEvent::MsgEvent( int type, const msg_item_t *msg, const char *text )
+MsgEvent::MsgEvent( int type, const vlc_log_t *msg, const char *text )
     : QEvent( (QEvent::Type)MsgEvent_Type ),
       priority( type ),
       object_id( msg->i_object_id ),
@@ -332,7 +332,7 @@ void MessagesDialog::tabChanged( int i )
                                      : qtr("Clear the messages") );
 }
 
-void MessagesDialog::MsgCallback( void *self, int type, const msg_item_t *item,
+void MessagesDialog::MsgCallback( void *self, int type, const vlc_log_t *item,
                                   const char *format, va_list ap )
 {
     MessagesDialog *dialog = (MessagesDialog *)self;
index 99637077dcbdb33c0d795422c4272ef13489e1e4..945db4fa29b47031e27e73257db76ffa7a5304f2 100644 (file)
@@ -50,13 +50,13 @@ private:
     virtual ~MessagesDialog();
 
     Ui::messagesPanelWidget ui;
-    static void sinkMessage( void *, msg_item_t *, unsigned );
+    static void sinkMessage( void *, vlc_log_t *, unsigned );
     void customEvent( QEvent * );
     void sinkMessage( const MsgEvent * );
     bool matchFilter( const QString& );
 
     vlc_atomic_t verbosity;
-    static void MsgCallback( void *, int, const msg_item_t *, const char *,
+    static void MsgCallback( void *, int, const vlc_log_t *, const char *,
                              va_list );
 
 private slots:
index 333d3b0c0edc0d67ac89b66a022e86651b6c607f..9d6dd234f41ba53d079896f22e1179de08e6c6f4 100644 (file)
@@ -84,14 +84,13 @@ struct intf_sys_t
 static int  Open    ( vlc_object_t * );
 static void Close   ( vlc_object_t * );
 
-static void TextPrint(void *, int, const msg_item_t *, const char *, va_list);
-static void HtmlPrint(void *, int, const msg_item_t *, const char *, va_list);
+static void TextPrint(void *, int, const vlc_log_t *, const char *, va_list);
+static void HtmlPrint(void *, int, const vlc_log_t *, const char *, va_list);
 #ifdef HAVE_SYSLOG_H
-static void SyslogPrint(void *, int, const msg_item_t *, const char *,
-                        va_list);
+static void SyslogPrint(void *, int, const vlc_log_t *, const char *, va_list);
 #endif
 #ifdef __ANDROID__
-static void AndroidPrint(void *, int, const msg_item_t *, const char *, va_list);
+static void AndroidPrint(void *, int, const vlc_log_t *, const char *, va_list);
 #endif
 
 /*****************************************************************************
@@ -357,7 +356,7 @@ static const android_LogPriority prioritytype[4] = {
     ANDROID_LOG_DEBUG
 };
 
-static void AndroidPrint( void *opaque, int type, const msg_item_t *item,
+static void AndroidPrint( void *opaque, int type, const vlc_log_t *item,
                        const char *fmt, va_list ap )
 {
     (void)item;
@@ -372,7 +371,7 @@ static void AndroidPrint( void *opaque, int type, const msg_item_t *item,
 }
 #endif
 
-static void TextPrint( void *opaque, int type, const msg_item_t *item,
+static void TextPrint( void *opaque, int type, const vlc_log_t *item,
                        const char *fmt, va_list ap )
 {
     intf_thread_t *p_intf = opaque;
@@ -391,7 +390,7 @@ static void TextPrint( void *opaque, int type, const msg_item_t *item,
 }
 
 #ifdef HAVE_SYSLOG_H
-static void SyslogPrint( void *opaque, int type, const msg_item_t *item,
+static void SyslogPrint( void *opaque, int type, const vlc_log_t *item,
                          const char *fmt, va_list ap )
 {
     static const int i_prio[4] = { LOG_INFO, LOG_ERR, LOG_WARNING, LOG_DEBUG };
@@ -416,7 +415,7 @@ static void SyslogPrint( void *opaque, int type, const msg_item_t *item,
 }
 #endif
 
-static void HtmlPrint( void *opaque, int type, const msg_item_t *item,
+static void HtmlPrint( void *opaque, int type, const vlc_log_t *item,
                        const char *fmt, va_list ap )
 {
     static const unsigned color[4] = {
index b939faac398ee45b1202d5dc70ab70c009126233..79bce5ec384d2ebdc3eb2ec95bf71bbecb73769a 100644 (file)
@@ -150,7 +150,7 @@ typedef struct libvlc_priv_t
     /* Logging */
     struct
     {
-        void (*cb) (void *, int, const msg_item_t *, const char *, va_list);
+        void (*cb) (void *, int, const vlc_log_t *, const char *, va_list);
         void *opaque;
         vlc_rwlock_t lock;
     } log;
index 15ec77556d3777deabee09222174900515748fa8..abc6c98cde915759f31e99b8ff5c132adb2fc4dd 100644 (file)
@@ -68,7 +68,7 @@ void vlc_Log (vlc_object_t *obj, int type, const char *module,
 }
 
 #ifdef WIN32
-static void Win32DebugOutputMsg (void *, int , const msg_item_t *,
+static void Win32DebugOutputMsg (void *, int , const vlc_log_t *,
                                  const char *, va_list);
 #endif
 
@@ -143,7 +143,7 @@ void vlc_vaLog (vlc_object_t *obj, int type, const char *module,
 #endif
 
     /* Fill message information fields */
-    msg_item_t msg;
+    vlc_log_t msg;
 
     msg.i_object_id = (uintptr_t)obj;
     msg.psz_object_type = (obj != NULL) ? obj->psz_object_type : "generic";
@@ -185,7 +185,7 @@ static const char msg_type[4][9] = { "", " error", " warning", " debug" };
 #define GRAY    "\033[0m"
 static const char msg_color[4][8] = { WHITE, RED, YELLOW, GRAY };
 
-static void PrintColorMsg (void *d, int type, const msg_item_t *p_item,
+static void PrintColorMsg (void *d, int type, const vlc_log_t *p_item,
                            const char *format, va_list ap)
 {
     FILE *stream = stderr;
@@ -211,7 +211,7 @@ static void PrintColorMsg (void *d, int type, const msg_item_t *p_item,
     vlc_restorecancel (canc);
 }
 
-static void PrintMsg (void *d, int type, const msg_item_t *p_item,
+static void PrintMsg (void *d, int type, const vlc_log_t *p_item,
                       const char *format, va_list ap)
 {
     FILE *stream = stderr;
@@ -238,7 +238,7 @@ static void PrintMsg (void *d, int type, const msg_item_t *p_item,
 }
 
 #ifdef WIN32
-static void Win32DebugOutputMsg (void* d, int type, const msg_item_t *p_item,
+static void Win32DebugOutputMsg (void* d, int type, const vlc_log_t *p_item,
                                  const char *format, va_list dol)
 {
     VLC_UNUSED(p_item);