* 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>
# undef HAVE_STDINT_H
# undef HAVE_INTTYPES_H
# undef off_t
+#elif defined( _MSC_VER )
+# pragma warning( disable : 4244 )
#endif
#include "vlc_config.h"
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 */
/* 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;
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;
/* 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;
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
*****************************************************************************/
#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 ) \
(index) = -1; \
for( _i_ = 0; _i_ < (count); _i_++ ) \
{ \
- if( ((void**)(tab))[_i_] == (void*)(p) ) \
+ if( (tab)[_i_] == (p) ) \
{ \
(index) = _i_; \
break; \
((void**)(tab) + _i_index_+1), \
( (count) - _i_index_ - 1 ) * sizeof( void* ) );\
} \
- else \
+ (count)--; \
+ if( (count) == 0 ) \
{ \
free( tab ); \
(tab) = NULL; \
} \
- (count)--; \
} \
}