]> git.sesse.net Git - vlc/blobdiff - include/vlc_epg.h
Added blend filter helpers.
[vlc] / include / vlc_epg.h
index 62732f9ec9d8e3910f681390fbc43cd6f5a5127b..3313e4a6ba928171ed1279941978433b48cd4093 100644 (file)
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#if !defined( __LIBVLC__ )
-  #error You are not libvlc or one of its plugins. You cannot include this file
-#endif
+#ifndef VLC_EPG_H
+#define VLC_EPG_H 1
 
-#ifndef _VLC_EPG_H
-#define _VLC_EPG_H 1
+/**
+ * \file
+ * This file defines functions and structures for storing dvb epg information
+ */
 
 typedef struct
 {
@@ -54,24 +55,22 @@ static inline void vlc_epg_Init( vlc_epg_t *p_epg, const char *psz_name )
     p_epg->p_current = NULL;
     TAB_INIT( p_epg->i_event, p_epg->pp_event );
 }
+
 static inline void vlc_epg_Clean( vlc_epg_t *p_epg )
 {
     int i;
     for( i = 0; i < p_epg->i_event; i++ )
     {
         vlc_epg_event_t *p_evt = p_epg->pp_event[i];
-        if( p_evt->psz_name )
-            free( p_evt->psz_name );
-        if( p_evt->psz_short_description )
-            free( p_evt->psz_short_description );
-        if( p_evt->psz_description )
-            free( p_evt->psz_description );
+        free( p_evt->psz_name );
+        free( p_evt->psz_short_description );
+        free( p_evt->psz_description );
         free( p_evt );
     }
     TAB_CLEAN( p_epg->i_event, p_epg->pp_event );
-    if( p_epg->psz_name )
-        free( p_epg->psz_name );
+    free( p_epg->psz_name );
 }
+
 static inline void vlc_epg_AddEvent( vlc_epg_t *p_epg, int64_t i_start, int i_duration,
                                 const char *psz_name, const char *psz_short_description, const char *psz_description )
 {
@@ -86,6 +85,7 @@ static inline void vlc_epg_AddEvent( vlc_epg_t *p_epg, int64_t i_start, int i_du
     TAB_APPEND_CPP( vlc_epg_event_t, p_epg->i_event, p_epg->pp_event, p_evt );
 }
 
+LIBVLC_USED
 static inline vlc_epg_t *vlc_epg_New( const char *psz_name )
 {
     vlc_epg_t *p_epg = (vlc_epg_t*)malloc( sizeof(vlc_epg_t) );
@@ -93,11 +93,13 @@ static inline vlc_epg_t *vlc_epg_New( const char *psz_name )
         vlc_epg_Init( p_epg, psz_name );
     return p_epg;
 }
+
 static inline void vlc_epg_Delete( vlc_epg_t *p_epg )
 {
     vlc_epg_Clean( p_epg );
     free( p_epg );
 }
+
 static inline void vlc_epg_SetCurrent( vlc_epg_t *p_epg, int64_t i_start )
 {
     int i;