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: 915f8ddbf4c42498d0994c544c1540588790f76c $
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 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 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     virtual void execute();
00040     virtual string getType() const { return "playlist del"; }
00041 
00042 private:
00043     /// List
00044     VarList &m_rList;
00045 };
00046 
00047 
00048 /// Command to sort the playlist
00049 DEFINE_COMMAND( PlaylistSort, "playlist sort" )
00050 
00051 /// Command to jump to the next item
00052 DEFINE_COMMAND( PlaylistNext, "playlist next" )
00053 
00054 /// Command to jump to the previous item
00055 DEFINE_COMMAND( PlaylistPrevious, "playlist previous" )
00056 
00057 /// Command to start the playlist
00058 DEFINE_COMMAND( PlaylistFirst, "playlist first" )
00059 
00060 
00061 /// Command to set the random state
00062 class CmdPlaylistRandom: public CmdGeneric
00063 {
00064 public:
00065     CmdPlaylistRandom( intf_thread_t *pIntf, bool value )
00066                      : CmdGeneric( pIntf ), m_value( value ) { }
00067     virtual ~CmdPlaylistRandom() { }
00068     virtual void execute();
00069     virtual string getType() const { return "playlist random"; }
00070 
00071 private:
00072     /// Random state
00073     bool m_value;
00074 };
00075 
00076 
00077 /// Command to set the loop state
00078 class CmdPlaylistLoop: public CmdGeneric
00079 {
00080 public:
00081     CmdPlaylistLoop( intf_thread_t *pIntf, bool value )
00082                    : CmdGeneric( pIntf ), m_value( value ) { }
00083     virtual ~CmdPlaylistLoop() { }
00084     virtual void execute();
00085     virtual string getType() const { return "playlist loop"; }
00086 
00087 private:
00088     /// Loop state
00089     bool m_value;
00090 };
00091 
00092 
00093 /// Command to set the repeat state
00094 class CmdPlaylistRepeat: public CmdGeneric
00095 {
00096 public:
00097     CmdPlaylistRepeat( intf_thread_t *pIntf, bool value )
00098                      : CmdGeneric( pIntf ), m_value( value ) { }
00099     virtual ~CmdPlaylistRepeat() { }
00100     virtual void execute();
00101     virtual string getType() const { return "playlist repeat"; }
00102 
00103 private:
00104     /// Repeat state
00105     bool m_value;
00106 };
00107 
00108 
00109 /// Command to load a playlist
00110 class CmdPlaylistLoad: public CmdGeneric
00111 {
00112 public:
00113     CmdPlaylistLoad( intf_thread_t *pIntf, const string& rFile )
00114                    : CmdGeneric( pIntf ), m_file( rFile ) { }
00115     virtual ~CmdPlaylistLoad() { }
00116     virtual void execute();
00117     virtual string getType() const { return "playlist load"; }
00118 
00119 private:
00120     /// Playlist file to load
00121     string m_file;
00122 };
00123 
00124 
00125 /// Command to save a playlist
00126 class CmdPlaylistSave: public CmdGeneric
00127 {
00128 public:
00129     CmdPlaylistSave( intf_thread_t *pIntf, const string& rFile )
00130                    : CmdGeneric( pIntf ), m_file( rFile ) { }
00131     virtual ~CmdPlaylistSave() { }
00132     virtual void execute();
00133     virtual string getType() const { return "playlist save"; }
00134 
00135 private:
00136     /// Playlist file to save
00137     string m_file;
00138 };
00139 
00140 
00141 #endif

Generated on Tue May 25 08:04:58 2010 for VLC by  doxygen 1.5.6