#include <stdlib.h>
#include <stdarg.h>
-#ifdef HAVE_STRING_H
-# include <string.h> /* strerror() */
-#endif
+#include <string.h> /* strerror() */
+#include <stdio.h>
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
+static inline void __vlc_fourcc_to_char( vlc_fourcc_t fcc, char *psz_fourcc )
+{
+#ifdef WORDS_BIGENDIAN
+ psz_fourcc[0] = (uint32_t) (fcc >> 24);
+ psz_fourcc[1] = (uint32_t) (fcc >> 16);
+ psz_fourcc[2] = (uint32_t) (fcc >> 8);
+ psz_fourcc[3] = (uint32_t) (fcc);
+#else
+ psz_fourcc[3] = (uint32_t) (fcc >> 24);
+ psz_fourcc[2] = (uint32_t) (fcc >> 16);
+ psz_fourcc[1] = (uint32_t) (fcc >> 8);
+ psz_fourcc[0] = (uint32_t) (fcc);
+#endif
+}
+
+#define vlc_fourcc_to_char( a, b ) \
+ __vlc_fourcc_to_char( (vlc_fourcc_t)(a), (char *)(b) )
+
/*****************************************************************************
* Classes declaration
*****************************************************************************/
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 int (*httpd_callback_t)( httpd_callback_sys_t *, httpd_client_t *, httpd_message_t *answer, const 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 );
#if defined (WIN32) && defined (DLL_EXPORT)
# ifdef __cplusplus
-# define VLC_PUBLIC_API __declspec(dllexport)
-# define VLC_PRIVATE_API __declspec(dllexport)
+# define VLC_PUBLIC_API __declspec(dllexport)
+# define VLC_PRIVATE_API __declspec(dllexport)
# define VLC_EXPORT( type, name, args ) extern "C" __declspec(dllexport) type name args
# define VLC_INTERNAL( type, name, args ) extern "C" type name args
# else
-# define VLC_PUBLIC_API extern __declspec(dllexport)
-# define VLC_PRIVATE_API extern __declspec(dllexport)
+# define VLC_PUBLIC_API extern __declspec(dllexport)
+# define VLC_PRIVATE_API extern __declspec(dllexport)
# define VLC_EXPORT( type, name, args ) __declspec(dllexport) type name args
# define VLC_INTERNAL( type, name, args ) type name args
# endif
# define VLC_EXPORT( type, name, args ) __attribute__((visibility("default"))) type name args
# define VLC_INTERNAL( type, name, args ) __attribute__((visibility("hidden"))) type name args
# else
-# define VLC_PUBLIC_API extern
+# define VLC_PUBLIC_API extern
# define VLC_PRIVATE_API extern
# define VLC_EXPORT( type, name, args ) type name args
# define VLC_INTERNAL( type, name, args ) type name args
#include "vlc_threads.h"
+typedef struct vlc_object_internals_t vlc_object_internals_t;
+
/*****************************************************************************
* Common structure members
*****************************************************************************/
* these members are common for all vlc objects \
*/ \
/**@{*/ \
+ vlc_object_internals_t *p_internals; \
int i_object_id; \
int i_object_type; \
const char *psz_object_type; \
char *psz_header; \
int i_flags; \
\
- /* Thread properties, if any */ \
- vlc_bool_t b_thread; \
- vlc_thread_t thread_id; \
- \
/* Object access lock */ \
vlc_mutex_t object_lock; \
vlc_cond_t object_wait; \
volatile vlc_bool_t b_error; /**< set by the object */ \
volatile vlc_bool_t b_die; /**< set by the outside */ \
volatile vlc_bool_t b_dead; /**< set by the object */ \
- volatile vlc_bool_t b_attached; /**< set by the object */ \
vlc_bool_t b_force; /**< set by the outside (eg. module_Need()) */ \
\
- /* Object variables */ \
- vlc_mutex_t var_lock; \
- int i_vars; \
- variable_t * p_vars; \
- \
/* Stuff related to the libvlc structure */ \
- vlc_object_t *p_libvlc_global; /**< root of all evil */ \
libvlc_int_t *p_libvlc; /**< (root of all evil) - 1 */ \
\
volatile int i_refcount; /**< usage count */ \