+VLC_EXPORT( int, playlist_Export, ( playlist_t *p_playlist, const char *psz_name, playlist_item_t *p_export_root, const char *psz_type ) );
+
+/********************************************************
+ * Item management
+ ********************************************************/
+
+/*************************** Item creation **************************/
+
+VLC_EXPORT( playlist_item_t* , playlist_ItemNewWithType, ( playlist_t *,const char *,const char *, int , const char *const *, int, int) );
+
+/** Create a new item, without adding it to the playlist
+ * \param p_obj a vlc object (anyone will do)
+ * \param psz_uri the mrl of the item
+ * \param psz_name a text giving a name or description of the item
+ * \return the new item or NULL on failure
+ */
+#define playlist_ItemNew( a , b, c ) \
+ playlist_ItemNewWithType( VLC_OBJECT(a) , b , c, 0, NULL, -1, 0 )
+
+
+/*************************** Item deletion **************************/
+VLC_EXPORT( int, playlist_DeleteFromInput, ( playlist_t *, int, bool ) );
+
+/*************************** Item fields accessors **************************/
+VLC_EXPORT( int, playlist_ItemSetName, (playlist_item_t *, const char * ) );
+
+/******************** Item addition ********************/
+VLC_EXPORT( int, playlist_Add, ( playlist_t *, const char *, const char *, int, int, bool, bool ) );
+VLC_EXPORT( int, playlist_AddExt, ( playlist_t *, const char *, const char *, int, int, mtime_t, const char *const *,int, bool, bool ) );
+VLC_EXPORT( int, playlist_AddInput, ( playlist_t *, input_item_t *, int, int, bool, bool ) );
+VLC_EXPORT( int, playlist_BothAddInput, ( playlist_t *, input_item_t *,playlist_item_t *,int , int, int*, int*, bool ) );
+
+/********************** Misc item operations **********************/
+VLC_EXPORT( playlist_item_t*, playlist_ItemToNode, (playlist_t *,playlist_item_t *, bool) );
+
+/********************************** Item search *************************/
+VLC_EXPORT( playlist_item_t *, playlist_ItemGetById, (playlist_t *, int, bool ) );
+VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInput, (playlist_t *,input_item_t *, bool ) );
+VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInputId, (playlist_t *, int, playlist_item_t *) );
+
+VLC_EXPORT( int, playlist_LiveSearchUpdate, (playlist_t *, playlist_item_t *, const char *) );
+
+/********************************************************
+ * Tree management
+ ********************************************************/
+VLC_EXPORT( int, playlist_NodeChildrenCount, (playlist_t *,playlist_item_t* ) );
+
+/* Node management */
+VLC_EXPORT( playlist_item_t *, playlist_NodeCreate, ( playlist_t *, const char *, playlist_item_t * p_parent, int i_flags, input_item_t * ) );
+VLC_EXPORT( int, playlist_NodeAppend, (playlist_t *,playlist_item_t*,playlist_item_t *) );
+VLC_EXPORT( int, playlist_NodeInsert, (playlist_t *,playlist_item_t*,playlist_item_t *, int) );
+VLC_EXPORT( int, playlist_NodeRemoveItem, (playlist_t *,playlist_item_t*,playlist_item_t *) );
+VLC_EXPORT( playlist_item_t *, playlist_ChildSearchName, (playlist_item_t*, const char* ) );
+VLC_EXPORT( int, playlist_NodeDelete, ( playlist_t *, playlist_item_t *, bool , bool ) );
+VLC_EXPORT( int, playlist_NodeEmpty, ( playlist_t *, playlist_item_t *, bool ) );
+VLC_EXPORT( void, playlist_NodesPairCreate, (playlist_t *, const char *, playlist_item_t **, playlist_item_t **, bool ) );
+VLC_EXPORT( playlist_item_t *, playlist_GetPreferredNode, ( playlist_t *p_playlist, playlist_item_t *p_node ) );
+VLC_EXPORT( playlist_item_t *, playlist_GetNextLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, bool b_ena, bool b_unplayed ) );
+VLC_EXPORT( playlist_item_t *, playlist_GetPrevLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root, playlist_item_t *p_item, bool b_ena, bool b_unplayed ) );
+VLC_EXPORT( playlist_item_t *, playlist_GetLastLeaf, ( playlist_t *p_playlist, playlist_item_t *p_root ) );
+
+/***********************************************************************
+ * Inline functions
+ ***********************************************************************/
+/** Open a playlist file, add its content to the current playlist */
+static inline int playlist_Import( playlist_t *p_playlist, const char *psz_file)
+{
+ char psz_uri[256+10];
+ input_item_t *p_input;
+ snprintf( psz_uri, 256+9, "file/://%s", psz_file );
+ const char *const psz_option = "meta-file";
+ p_input = input_ItemNewExt( p_playlist, psz_uri, psz_file,
+ 1, &psz_option, -1 );
+ playlist_AddInput( p_playlist, p_input, PLAYLIST_APPEND, PLAYLIST_END,
+ true, false );
+ input_Read( p_playlist, p_input, true );
+ return VLC_SUCCESS;
+}
+
+/** Small helper tp get current playing input or NULL. Release the input after use. */
+#define pl_CurrentInput(a) __pl_CurrentInput( VLC_OBJECT(a) )
+static inline input_thread_t * __pl_CurrentInput( vlc_object_t * p_this )