00001 /***************************************************************************** 00002 * playtree.hpp 00003 ***************************************************************************** 00004 * Copyright (C) 2005 the VideoLAN team 00005 * $Id: 871cc08e9bc37c2a2e3bed0b87b2016a81089002 $ 00006 * 00007 * Authors: Antoine Cellerier <dionoea@videolan.org> 00008 * Clément Stenac <zorglub@videolan.org> 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License along 00021 * with this program; if not, write to the Free Software Foundation, Inc., 00022 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. 00023 *****************************************************************************/ 00024 00025 #ifndef PLAYTREE_HPP 00026 #define PLAYTREE_HPP 00027 00028 #include <vlc_playlist.h> 00029 #include "../utils/var_tree.hpp" 00030 00031 /// Variable for VLC playlist (new tree format) 00032 class Playtree: public VarTree 00033 { 00034 public: 00035 Playtree( intf_thread_t *pIntf ); 00036 virtual ~Playtree(); 00037 00038 /// Remove the selected elements from the list 00039 virtual void delSelected(); 00040 00041 /// Execute the action associated to this item 00042 virtual void action( VarTree *pItem ); 00043 00044 /// Function called to notify playlist changes 00045 void onChange(); 00046 00047 /// Function called to notify playlist item update 00048 void onUpdateItem( int id ); 00049 00050 /// Function called to notify about current playing item 00051 void onUpdateCurrent( bool b_active ); 00052 00053 /// Function called to notify playlist item append 00054 void onAppend( playlist_add_t * ); 00055 00056 /// Function called to notify playlist item delete 00057 void onDelete( int ); 00058 00059 /// Items waiting to be appended 00060 int i_items_to_append; 00061 00062 private: 00063 /// VLC playlist object 00064 playlist_t *m_pPlaylist; 00065 00066 /// Build the list from the VLC playlist 00067 void buildTree(); 00068 00069 /// Update Node's children 00070 void buildNode( playlist_item_t *p_node, VarTree &m_pNode ); 00071 00072 /// keep track of item being played 00073 playlist_item_t* m_currentItem; 00074 }; 00075 00076 #endif
1.5.6