00001 /***************************************************************************** 00002 * cmd_vars.cpp 00003 ***************************************************************************** 00004 * Copyright (C) 2004 the VideoLAN team 00005 * $Id: cmd_vars.cpp 12949 2005-10-23 17:42:16Z asmax $ 00006 * 00007 * Authors: Cyril Deguet <[email protected]> 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. 00022 *****************************************************************************/ 00023 00024 #include "cmd_vars.hpp" 00025 #include "../src/vlcproc.hpp" 00026 #include "../utils/var_text.hpp" 00027 #include "../vars/playlist.hpp" 00028 #include "../vars/playtree.hpp" 00029 00030 00031 void CmdNotifyPlaylist::execute() 00032 { 00033 // Notify the playlist variable 00034 Playlist &rVar = VlcProc::instance( getIntf() )->getPlaylistVar(); 00035 rVar.onChange(); 00036 } 00037 00038 void CmdPlaytreeChanged::execute() 00039 { 00040 // Notify the playtree variable 00041 Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar(); 00042 rVar.onChange(); 00043 } 00044 00045 00046 void CmdPlaytreeUpdate::execute() 00047 { 00048 // Notify the playtree variable 00049 Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar(); 00050 rVar.onUpdate( m_id ); 00051 } 00052 00053 00054 void CmdSetText::execute() 00055 { 00056 // Change the text variable 00057 m_rText.set( m_value ); 00058 } 00059