cmd_playlist.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * cmd_playlist.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
00008  *          Olivier Teulière <ipkiss@via.ecp.fr>
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
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef CMD_PLAYLIST_HPP
00026 #define CMD_PLAYLIST_HPP
00027 
00028 #include "cmd_generic.hpp"
00029 #include "../utils/var_list.hpp"
00030 
00031 
00032 /// Command to delete the selected items from a list
00033 class CmdPlaylistDel: public CmdGeneric
00034 {
00035     public:
00036         CmdPlaylistDel( intf_thread_t *pIntf, VarList &rList ):
00037             CmdGeneric( pIntf ), m_rList( rList ) {}
00038         virtual ~CmdPlaylistDel() {}
00039 
00040         /// This method does the real job of the command
00041         virtual void execute();
00042 
00043         /// Return the type of the command
00044         virtual string getType() const { return "playlist del"; }
00045 
00046     private:
00047         /// List
00048         VarList &m_rList;
00049 };
00050 
00051 
00052 /// Command to sort the playlist
00053 DEFINE_COMMAND( PlaylistSort, "playlist sort" )
00054 
00055 /// Command to jump to the next item
00056 DEFINE_COMMAND( PlaylistNext, "playlist next" )
00057 
00058 /// Command to jump to the previous item
00059 DEFINE_COMMAND( PlaylistPrevious, "playlist previous" )
00060 
00061 
00062 /// Command to set the random state
00063 class CmdPlaylistRandom: public CmdGeneric
00064 {
00065     public:
00066         CmdPlaylistRandom( intf_thread_t *pIntf, bool value ):
00067             CmdGeneric( pIntf ), m_value( value ) {}
00068         virtual ~CmdPlaylistRandom() {}
00069 
00070         /// This method does the real job of the command
00071         virtual void execute();
00072 
00073         /// Return the type of the command
00074         virtual string getType() const { return "playlist random"; }
00075 
00076     private:
00077         /// Random state
00078         bool m_value;
00079 };
00080 
00081 
00082 /// Command to set the loop state
00083 class CmdPlaylistLoop: public CmdGeneric
00084 {
00085     public:
00086         CmdPlaylistLoop( intf_thread_t *pIntf, bool value ):
00087             CmdGeneric( pIntf ), m_value( value ) {}
00088         virtual ~CmdPlaylistLoop() {}
00089 
00090         /// This method does the real job of the command
00091         virtual void execute();
00092 
00093         /// Return the type of the command
00094         virtual string getType() const { return "playlist loop"; }
00095 
00096     private:
00097         /// Loop state
00098         bool m_value;
00099 };
00100 
00101 
00102 /// Command to set the repeat state
00103 class CmdPlaylistRepeat: public CmdGeneric
00104 {
00105     public:
00106         CmdPlaylistRepeat( intf_thread_t *pIntf, bool value ):
00107             CmdGeneric( pIntf ), m_value( value ) {}
00108         virtual ~CmdPlaylistRepeat() {}
00109 
00110         /// This method does the real job of the command
00111         virtual void execute();
00112 
00113         /// Return the type of the command
00114         virtual string getType() const { return "playlist repeat"; }
00115 
00116     private:
00117         /// Repeat state
00118         bool m_value;
00119 };
00120 
00121 
00122 /// Command to load a playlist
00123 class CmdPlaylistLoad: public CmdGeneric
00124 {
00125     public:
00126         CmdPlaylistLoad( intf_thread_t *pIntf, const string& rFile ):
00127             CmdGeneric( pIntf ), m_file( rFile ) {}
00128         virtual ~CmdPlaylistLoad() {}
00129 
00130         /// This method does the real job of the command
00131         virtual void execute();
00132 
00133         /// Return the type of the command
00134         virtual string getType() const { return "playlist load"; }
00135 
00136     private:
00137         /// Playlist file to load
00138         string m_file;
00139 };
00140 
00141 
00142 /// Command to save a playlist
00143 class CmdPlaylistSave: public CmdGeneric
00144 {
00145     public:
00146         CmdPlaylistSave( intf_thread_t *pIntf, const string& rFile ):
00147             CmdGeneric( pIntf ), m_file( rFile ) {}
00148         virtual ~CmdPlaylistSave() {}
00149 
00150         /// This method does the real job of the command
00151         virtual void execute();
00152 
00153         /// Return the type of the command
00154         virtual string getType() const { return "playlist save"; }
00155 
00156     private:
00157         /// Playlist file to save
00158         string m_file;
00159 };
00160 
00161 
00162 #endif

Generated on Wed Aug 13 08:02:38 2008 for VLC by  doxygen 1.5.1