]> git.sesse.net Git - vlc/blobdiff - include/vlc_playlist.h
* ALL:
[vlc] / include / vlc_playlist.h
index 8ca7ebb65d1abd45069d8dd1d848e9a74ba344c3..f7f644bdca9ded658be002a08f0a0f3922f3483f 100644 (file)
@@ -2,7 +2,7 @@
  * vlc_playlist.h : Playlist functions
  *****************************************************************************
  * Copyright (C) 1999, 2000, 2001, 2002 VideoLAN
- * $Id: vlc_playlist.h,v 1.6 2002/12/03 23:36:41 gitan Exp $
+ * $Id: vlc_playlist.h,v 1.9 2003/03/17 17:10:21 hartman Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -53,6 +53,13 @@ struct playlist_t
     input_thread_t *      p_input;
 };
 
+/*****************************************************************************
+ * Playlist status
+ *****************************************************************************/
+#define PLAYLIST_STOPPED 0
+#define PLAYLIST_RUNNING 1
+#define PLAYLIST_PAUSED  2
+
 /*****************************************************************************
  * Prototypes
  *****************************************************************************/
@@ -72,4 +79,28 @@ VLC_EXPORT( void, playlist_Command, ( playlist_t *, int, int ) );
 VLC_EXPORT( int,  playlist_Add,    ( playlist_t *, const char *, int, int ) );
 VLC_EXPORT( int,  playlist_AddItem, ( playlist_t *, playlist_item_t *, int, int ) );
 VLC_EXPORT( int,  playlist_Delete, ( playlist_t *, int ) );
+VLC_EXPORT( int,  playlist_Move, ( playlist_t *, int, int ) );
+VLC_EXPORT( int,  playlist_LoadFile, ( playlist_t *, const char * ) );
+VLC_EXPORT( int,  playlist_SaveFile, ( playlist_t *, const char * ) );
+
+static inline vlc_bool_t playlist_IsPlaying( playlist_t * p_playlist )
+{
+    vlc_bool_t b_playing;
+
+    vlc_mutex_lock( &p_playlist->object_lock );
+    b_playing = p_playlist->i_status == PLAYLIST_RUNNING; 
+    vlc_mutex_unlock( &p_playlist->object_lock );
+
+    return( b_playing );
+}
+
+static inline vlc_bool_t playlist_IsEmpty( playlist_t * p_playlist )
+{
+    vlc_bool_t b_empty;
+
+    vlc_mutex_lock( &p_playlist->object_lock );
+    b_empty = p_playlist->i_size == 0;
+    vlc_mutex_unlock( &p_playlist->object_lock );
 
+    return( b_empty );
+}