]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
* src/input/control.c: added INPUT_ADD_INFO/INPUT_SET_NAME to input_Control().
[vlc] / include / vlc_common.h
index beead76809e0d39fdcaa3cf3a13f4fa856c74839..0d32ea6a88f119173b4a9f89b85c0c2e8866da06 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.109 2004/02/23 20:34:47 gbazin Exp $
+ * $Id$
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -43,6 +43,8 @@
 #   undef HAVE_STDINT_H
 #   undef HAVE_INTTYPES_H
 #   undef off_t
+#elif defined( _MSC_VER )
+#   pragma warning( disable : 4244 )
 #endif
 
 #include "vlc_config.h"
@@ -190,8 +192,6 @@ typedef struct msg_subscription_t msg_subscription_t;
 typedef struct playlist_t playlist_t;
 typedef struct playlist_item_t playlist_item_t;
 typedef struct playlist_group_t playlist_group_t;
-typedef struct item_info_t item_info_t;
-typedef struct item_info_category_t item_info_category_t;
 typedef struct playlist_export_t playlist_export_t;
 
 /* Modules */
@@ -210,11 +210,10 @@ typedef struct intf_channel_t intf_channel_t;
 /* Input */
 typedef struct input_thread_t input_thread_t;
 typedef struct input_thread_sys_t input_thread_sys_t;
+typedef struct input_item_t input_item_t;
 typedef struct input_area_t input_area_t;
 typedef struct input_buffers_t input_buffers_t;
 typedef struct input_socket_t input_socket_t;
-typedef struct input_info_t input_info_t;
-typedef struct input_info_category_t input_info_category_t;
 typedef struct access_sys_t access_sys_t;
 typedef struct demux_sys_t demux_sys_t;
 typedef struct es_descriptor_t es_descriptor_t;
@@ -222,6 +221,9 @@ typedef struct es_sys_t es_sys_t;
 typedef struct pgrm_descriptor_t pgrm_descriptor_t;
 typedef struct pgrm_sys_t pgrm_sys_t;
 typedef struct stream_descriptor_t stream_descriptor_t;
+typedef struct seekpoint_t seekpoint_t;
+typedef struct info_t info_t;
+typedef struct info_category_t info_category_t;
 
 /* Format */
 typedef struct audio_format_t audio_format_t;
@@ -264,10 +266,8 @@ typedef struct text_style_t text_style_t;
 
 /* Stream output */
 typedef struct sout_instance_t sout_instance_t;
-typedef struct sout_fifo_t sout_fifo_t;
 typedef struct sout_input_t sout_input_t;
 typedef struct sout_packetizer_input_t sout_packetizer_input_t;
-typedef struct sout_buffer_t sout_buffer_t;
 typedef struct sout_access_out_t sout_access_out_t;
 typedef struct sout_mux_t sout_mux_t;
 typedef struct sout_stream_t    sout_stream_t;
@@ -296,6 +296,27 @@ typedef struct iso639_lang_t iso639_lang_t;
 typedef struct block_t      block_t;
 typedef struct block_fifo_t block_fifo_t;
 
+/* httpd */
+typedef struct httpd_t          httpd_t;
+typedef struct httpd_host_t     httpd_host_t;
+typedef struct httpd_url_t      httpd_url_t;
+typedef struct httpd_client_t   httpd_client_t;
+typedef struct httpd_callback_sys_t httpd_callback_sys_t;
+typedef struct httpd_message_t  httpd_message_t;
+typedef int    (*httpd_callback_t)( httpd_callback_sys_t *, httpd_client_t *, httpd_message_t *answer, httpd_message_t *query );
+typedef struct httpd_file_t     httpd_file_t;
+typedef struct httpd_file_sys_t httpd_file_sys_t;
+typedef int (*httpd_file_callback_t)( httpd_file_sys_t*, httpd_file_t *, uint8_t *psz_request, uint8_t **pp_data, int *pi_data );
+typedef struct httpd_redirect_t httpd_redirect_t;
+typedef struct httpd_stream_t httpd_stream_t;
+
+/* divers */
+typedef struct vlc_meta_t    vlc_meta_t;
+
+typedef struct vlm_t         vlm_t;
+typedef struct vlm_message_t vlm_message_t;
+
+
 /*****************************************************************************
  * Variable callbacks
  *****************************************************************************/
@@ -454,13 +475,13 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 #define TAB_APPEND( count, tab, p )             \
     if( (count) > 0 )                           \
     {                                           \
-        (void *)(tab) = realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
+        (tab) = realloc( tab, sizeof( void ** ) * ( (count) + 1 ) ); \
     }                                           \
     else                                        \
     {                                           \
-        (void *)(tab) = malloc( sizeof( void ** ) );    \
+        (tab) = malloc( sizeof( void ** ) );    \
     }                                           \
-    ((void**)(tab))[count] = (void*)(p);        \
+    (tab)[count] = (p);        \
     (count)++
 
 #define TAB_FIND( count, tab, p, index )        \
@@ -469,7 +490,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
         (index) = -1;                           \
         for( _i_ = 0; _i_ < (count); _i_++ )    \
         {                                       \
-            if( ((void**)(tab))[_i_] == (void*)(p) )  \
+            if( (tab)[_i_] == (p) )  \
             {                                   \
                 (index) = _i_;                  \
                 break;                          \
@@ -489,12 +510,12 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
                          ((void**)(tab) + _i_index_+1),  \
                          ( (count) - _i_index_ - 1 ) * sizeof( void* ) );\
             }                                   \
-            else                                \
+            (count)--;                          \
+            if( (count) == 0 )                  \
             {                                   \
                 free( tab );                    \
                 (tab) = NULL;                   \
             }                                   \
-            (count)--;                          \
         }                                       \
     }