/** * * Distributed under the UTC Heudiascy Pacpus License, Version 1.0. * Copyright (c) UTC Heudiasyc 2010 - 2013. All rights reserved. * * See the LICENSE file for more information or a copy at: * http://www.hds.utc.fr/~kurdejma/LICENSE_1_0.txt * */ #ifndef DEF_PACPUS_DBTPLYENGINESTATECHART_H #define DEF_PACPUS_DBTPLYENGINESTATECHART_H #include #include namespace pacpus { class DbtPlyEngine; //////////////////////////////////////////////////////////////////////////////// class DBITE_PLAYER_API DbtPlyEngineState { public: /// @todo Documentation virtual ~DbtPlyEngineState(); /// @todo Documentation virtual void play(DbtPlyEngine & engine); /// @todo Documentation virtual void pause(DbtPlyEngine & engine); /// @todo Documentation virtual void stop(DbtPlyEngine & engine); /// @todo Documentation virtual void speedUp(DbtPlyEngine & engine); /// @todo Documentation virtual void speedDown(DbtPlyEngine & engine); /// @todo Documentation virtual bool isPlaying(); /// @todo Documentation virtual QString toString() const = 0; protected: /// @todo Documentation DbtPlyEngineState(); }; //////////////////////////////////////////////////////////////////////////////// class DBITE_PLAYER_API PlayingState : public DbtPlyEngineState { public: /// @todo Documentation virtual void pause(DbtPlyEngine & engine); /// @todo Documentation virtual void stop(DbtPlyEngine & engine); /// @todo Documentation virtual bool isPlaying(); /// @todo Documentation virtual QString toString() const; /// @todo Documentation static DbtPlyEngineState * getInstance(); private: PlayingState(); static PlayingState mInstance; }; //////////////////////////////////////////////////////////////////////////////// class DBITE_PLAYER_API PausedState : public DbtPlyEngineState { public: /// @todo Documentation virtual void play(DbtPlyEngine & engine); /// @todo Documentation virtual void stop(DbtPlyEngine & engine); /// @todo Documentation virtual QString toString() const; /// @todo Documentation static DbtPlyEngineState * getInstance(); private: PausedState(); static PausedState mInstance; }; //////////////////////////////////////////////////////////////////////////////// class DBITE_PLAYER_API StoppedState : public DbtPlyEngineState { public: /// @todo Documentation virtual void play(DbtPlyEngine & engine); /// @todo Documentation virtual QString toString() const; /// @todo Documentation static DbtPlyEngineState * getInstance(); private: StoppedState(); static StoppedState mInstance; }; } // namespace pacpus #endif // DEF_PACPUS_DBTPLYENGINESTATECHART_H