]> git.sesse.net Git - vlc/blobdiff - include/vlc_meta.h
Fix linking
[vlc] / include / vlc_meta.h
index 372992110dd9a7e4edeb94ba2469394353eef112..77b16a24ba3a849fbbc197f33c60cdcd2c53b27a 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_META_H
 #define _VLC_META_H 1
 
@@ -51,6 +55,7 @@
 #define ITEM_META_FETCHED   0x02
 #define ITEM_ARTURL_FETCHED 0x04
 #define ITEM_ART_FETCHED    0x08
+#define ITEM_ART_NOTFOUND   0x10
 
 struct vlc_meta_t
 {
@@ -70,6 +75,11 @@ struct vlc_meta_t
     char *psz_publisher;
     char *psz_encodedby;
     char *psz_arturl;
+    char *psz_trackid;
+#if 0 //not used
+    char *psz_artistid;
+    char *psz_albumid;
+#endif
 
     int i_status;
 #if 0
@@ -99,6 +109,12 @@ struct vlc_meta_t
 #define vlc_meta_SetPublisher( meta, b ) vlc_meta_Set( meta, publisher, b );
 #define vlc_meta_SetEncodedBy( meta, b ) vlc_meta_Set( meta, encodedby, b );
 #define vlc_meta_SetArtURL( meta, b ) vlc_meta_Set( meta, arturl, b );
+#define vlc_meta_SetTrackID( meta, b ) vlc_meta_Set( meta, trackid, b );
+#if 0 //not used
+#define vlc_meta_SetArtistID( meta, b ) vlc_meta_Set( meta, artistid, b );
+#define vlc_meta_SetAlbumID( meta, b ) vlc_meta_Set( meta, albumid, b );
+#endif
+
 
 static inline vlc_meta_t *vlc_meta_New( void )
 {
@@ -120,6 +136,11 @@ static inline vlc_meta_t *vlc_meta_New( void )
     m->psz_publisher = NULL;
     m->psz_encodedby = NULL;
     m->psz_arturl = NULL;
+    m->psz_trackid = NULL;
+#if 0 //not used
+    m->psz_artistid = NULL;
+    m->psz_albumid = NULL;
+#endif
     m->i_status = 0;
     return m;
 }
@@ -141,6 +162,11 @@ static inline void vlc_meta_Delete( vlc_meta_t *m )
     free( m->psz_nowplaying );
     free( m->psz_publisher );
     free( m->psz_encodedby );
+    free( m->psz_trackid );
+#if 0 //not used
+    free( m->psz_artistid );
+    free( m->psz_albumid );
+#endif
     free( m->psz_arturl );
 
     free( m );
@@ -169,15 +195,20 @@ static inline void vlc_meta_Merge( vlc_meta_t *dst, vlc_meta_t *src )
     COPY_FIELD( nowplaying );
     COPY_FIELD( publisher );
     COPY_FIELD( encodedby );
+    COPY_FIELD( trackid );
+#if 0 //not used
+    COPY_FIELD( artistid );
+    COPY_FIELD( albumid );
+#endif
     COPY_FIELD( arturl );
 }
     /** \todo Track meta */
 
 enum {
-    ALBUM_ART_NEVER,
     ALBUM_ART_WHEN_ASKED,
     ALBUM_ART_WHEN_PLAYED,
-    ALBUM_ART_ALL };
+    ALBUM_ART_ALL
+};
 
 struct meta_export_t
 {