]> git.sesse.net Git - vlc/blobdiff - include/vlc_vlm.h
DASH: remove unnecessary includes and other trivial fixes
[vlc] / include / vlc_vlm.h
index dab4094ba2c9c2b8fa931835c754dac776fbd312..cf45439207ef402fd6c4040ba76b6ea9af3cb87f 100644 (file)
@@ -184,16 +184,16 @@ struct vlm_message_t
 extern "C" {
 #endif
 
-VLC_EXPORT( vlm_t *, vlm_New, ( vlc_object_t * ) );
+VLC_API vlm_t * vlm_New( vlc_object_t * );
 #define vlm_New( a ) vlm_New( VLC_OBJECT(a) )
-VLC_EXPORT( void,      vlm_Delete, ( vlm_t * ) );
-VLC_EXPORT( int,       vlm_ExecuteCommand, ( vlm_t *, const char *, vlm_message_t ** ) );
-VLC_EXPORT( int,       vlm_Control, ( vlm_t *p_vlm, int i_query, ... ) );
+VLC_API void vlm_Delete( vlm_t * );
+VLC_API int vlm_ExecuteCommand( vlm_t *, const char *, vlm_message_t ** );
+VLC_API int vlm_Control( vlm_t *p_vlm, int i_query, ... );
 
-VLC_EXPORT( vlm_message_t *, vlm_MessageSimpleNew, ( const char * ) );
-VLC_EXPORT( vlm_message_t *, vlm_MessageNew, ( const char *, const char *, ... ) LIBVLC_FORMAT( 2, 3 ) );
-VLC_EXPORT( vlm_message_t *, vlm_MessageAdd, ( vlm_message_t *, vlm_message_t * ) );
-VLC_EXPORT( void,            vlm_MessageDelete, ( vlm_message_t * ) );
+VLC_API vlm_message_t * vlm_MessageSimpleNew( const char * );
+VLC_API vlm_message_t * vlm_MessageNew( const char *, const char *, ... ) VLC_FORMAT( 2, 3 );
+VLC_API vlm_message_t * vlm_MessageAdd( vlm_message_t *, vlm_message_t * );
+VLC_API void vlm_MessageDelete( vlm_message_t * );
 
 /* media helpers */
 
@@ -220,8 +220,12 @@ static inline void vlm_media_Init( vlm_media_t *p_media )
  * \param p_dst vlm_media_t instance to copy to
  * \param p_src vlm_media_t instance to copy from
  */
-static inline void vlm_media_Copy( vlm_media_t *restrict p_dst,
-                                   const vlm_media_t *restrict p_src )
+static inline void
+#ifndef __cplusplus
+vlm_media_Copy( vlm_media_t *restrict p_dst, const vlm_media_t *restrict p_src )
+#else
+vlm_media_Copy( vlm_media_t *p_dst, const vlm_media_t *p_src )
+#endif
 {
     int i;
 
@@ -232,9 +236,9 @@ static inline void vlm_media_Copy( vlm_media_t *restrict p_dst,
         p_dst->psz_name = strdup( p_src->psz_name );
 
     for( i = 0; i < p_src->i_input; i++ )
-        TAB_APPEND_CPP( char, p_dst->i_input, p_dst->ppsz_input, strdup(p_src->ppsz_input[i]) );
+        TAB_APPEND_CAST( (char**), p_dst->i_input, p_dst->ppsz_input, strdup(p_src->ppsz_input[i]) );
     for( i = 0; i < p_src->i_option; i++ )
-        TAB_APPEND_CPP( char, p_dst->i_option, p_dst->ppsz_option, strdup(p_src->ppsz_option[i]) );
+        TAB_APPEND_CAST( (char**), p_dst->i_option, p_dst->ppsz_option, strdup(p_src->ppsz_option[i]) );
 
     if( p_src->psz_output )
         p_dst->psz_output = strdup( p_src->psz_output );
@@ -262,11 +266,11 @@ static inline void vlm_media_Clean( vlm_media_t *p_media )
     free( p_media->psz_name );
 
     for( i = 0; i < p_media->i_input; i++ )
-        free( p_media->ppsz_input[i]) ;
+        free( p_media->ppsz_input[i]);
     TAB_CLEAN(p_media->i_input, p_media->ppsz_input );
 
     for( i = 0; i < p_media->i_option; i++ )
-        free( p_media->ppsz_option[i]) ;
+        free( p_media->ppsz_option[i]);
     TAB_CLEAN(p_media->i_option, p_media->ppsz_option );
 
     free( p_media->psz_output );