/// Command to sort the playtree
DEFINE_COMMAND( PlaytreeSort, "playtree sort" )
-/// Command to jump to the next item
-DEFINE_COMMAND( PlaytreeNext, "playtree next" )
-
-/// Command to jump to the previous item
-DEFINE_COMMAND( PlaytreePrevious, "playtree previous" )
-
-/// Command to set the random state
-class CmdPlaytreeRandom: public CmdGeneric
-{
- public:
- CmdPlaytreeRandom( intf_thread_t *pIntf, bool value ):
- CmdGeneric( pIntf ), m_value( value ) {}
- virtual ~CmdPlaytreeRandom() {}
-
- /// This method does the real job of the command
- virtual void execute();
-
- /// Return the type of the command
- virtual string getType() const { return "playtree random"; }
-
- private:
- /// Random state
- bool m_value;
-};
-
-/// Command to set the loop state
-class CmdPlaytreeLoop: public CmdGeneric
-{
- public:
- CmdPlaytreeLoop( intf_thread_t *pIntf, bool value ):
- CmdGeneric( pIntf ), m_value( value ) {}
- virtual ~CmdPlaytreeLoop() {}
-
- /// This method does the real job of the command
- virtual void execute();
-
- /// Return the type of the command
- virtual string getType() const { return "playtree loop"; }
-
- private:
- /// Loop state
- bool m_value;
-};
-
-/// Command to set the repeat state
-class CmdPlaytreeRepeat: public CmdGeneric
-{
- public:
- CmdPlaytreeRepeat( intf_thread_t *pIntf, bool value ):
- CmdGeneric( pIntf ), m_value( value ) {}
- virtual ~CmdPlaytreeRepeat() {}
-
- /// This method does the real job of the command
- virtual void execute();
-
- /// Return the type of the command
- virtual string getType() const { return "playtree repeat"; }
-
- private:
- /// Loop state
- bool m_value;
-};
-
-/// Command to load a playlist
-class CmdPlaytreeLoad: public CmdGeneric
-{
- public:
- CmdPlaytreeLoad( intf_thread_t *pIntf, bool value ):
- CmdGeneric( pIntf ), m_value( value ) {}
- virtual ~CmdPlaytreeLoad() {}
-
- /// This method does the real job of the command
- virtual void execute();
-
- /// Return the type of the command
- virtual string getType() const { return "playtree load"; }
-
- private:
- /// Loop state
- bool m_value;
-};
-
-/// Command to save a playlist
-class CmdPlaytreeSave: public CmdGeneric
-{
- public:
- CmdPlaytreeSave( intf_thread_t *pIntf, bool value ):
- CmdGeneric( pIntf ), m_value( value ) {}
- virtual ~CmdPlaytreeSave() {}
-
- /// This method does the real job of the command
- virtual void execute();
-
- /// Return the type of the command
- virtual string getType() const { return "playtree save"; }
-
- private:
- /// Loop state
- bool m_value;
-};
-
#endif
CmdGenericPtr( new CmdPlaylistRepeat( getIntf(), true ) );
m_commandMap["playlist.setRepeat(false)"] =
CmdGenericPtr( new CmdPlaylistRepeat( getIntf(), false ) );
- REGISTER_CMD( "playtree.load()", CmdDlgPlaytreeLoad )
- REGISTER_CMD( "playtree.save()", CmdDlgPlaytreeSave )
- REGISTER_CMD( "playtree.add()", CmdDlgAdd )
VarTree &rVarTree = VlcProc::instance( getIntf() )->getPlaytreeVar();
m_commandMap["playtree.del()"] =
CmdGenericPtr( new CmdPlaytreeDel( getIntf(), rVarTree ) );
- REGISTER_CMD( "playtree.next()", CmdPlaytreeNext )
- REGISTER_CMD( "playtree.previous()", CmdPlaytreePrevious )
REGISTER_CMD( "playtree.sort()", CmdPlaytreeSort )
- m_commandMap["playtree.setRandom(true)"] =
- CmdGenericPtr( new CmdPlaytreeRandom( getIntf(), true ) );
- m_commandMap["playtree.setRandom(false)"] =
- CmdGenericPtr( new CmdPlaytreeRandom( getIntf(), false ) );
- m_commandMap["playtree.setLoop(true)"] =
- CmdGenericPtr( new CmdPlaytreeLoop( getIntf(), true ) );
- m_commandMap["playtree.setLoop(false)"] =
- CmdGenericPtr( new CmdPlaytreeLoop( getIntf(), false ) );
- m_commandMap["playtree.setRepeat(true)"] =
- CmdGenericPtr( new CmdPlaytreeRepeat( getIntf(), true ) );
- m_commandMap["playtree.setRepeat(false)"] =
- CmdGenericPtr( new CmdPlaytreeRepeat( getIntf(), false ) );
REGISTER_CMD( "vlc.fullscreen()", CmdFullscreen )
REGISTER_CMD( "vlc.play()", CmdPlay )
REGISTER_CMD( "vlc.pause()", CmdPause )