[3] | 1 | /*********************************************************************
|
---|
| 2 | // created: 2007/04/12 - 16:30
|
---|
| 3 |
|
---|
| 4 | //
|
---|
| 5 | // author: Elie Al Alam & Gerald Dherbomez
|
---|
| 6 | //
|
---|
| 7 | // version: $Id: $
|
---|
| 8 | //
|
---|
| 9 | // purpose: Dbite Player Engine state chart header file
|
---|
| 10 | *********************************************************************/
|
---|
| 11 |
|
---|
| 12 | #ifndef DBTPLYENGINESTATECHART_H
|
---|
| 13 | #define DBTPLYENGINESTATECHART_H
|
---|
| 14 |
|
---|
| 15 | #include <qstring.h>
|
---|
| 16 |
|
---|
| 17 | #include "DbitePlayerConfig.h"
|
---|
| 18 |
|
---|
| 19 | namespace pacpus {
|
---|
| 20 |
|
---|
| 21 | class DbtPlyEngine;
|
---|
| 22 |
|
---|
| 23 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 24 | class DBITE_PLAYER_API DbtPlyEngineState
|
---|
| 25 | {
|
---|
| 26 | public:
|
---|
| 27 | virtual ~DbtPlyEngineState();
|
---|
| 28 |
|
---|
| 29 | virtual void play(DbtPlyEngine & engine);
|
---|
| 30 | virtual void pause(DbtPlyEngine & engine);
|
---|
| 31 | virtual void stop(DbtPlyEngine & engine);
|
---|
| 32 |
|
---|
| 33 | virtual void speedUp(DbtPlyEngine & engine);
|
---|
| 34 | virtual void speedDown(DbtPlyEngine & engine);
|
---|
| 35 |
|
---|
| 36 | virtual bool isPlaying();
|
---|
| 37 |
|
---|
| 38 | virtual QString toString() const = 0;
|
---|
| 39 |
|
---|
| 40 | protected:
|
---|
| 41 | DbtPlyEngineState();
|
---|
| 42 | };
|
---|
| 43 |
|
---|
| 44 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 45 | class DBITE_PLAYER_API PlayingState
|
---|
| 46 | : public DbtPlyEngineState
|
---|
| 47 | {
|
---|
| 48 | public:
|
---|
| 49 | virtual void pause(DbtPlyEngine & engine);
|
---|
| 50 | virtual void stop(DbtPlyEngine & engine);
|
---|
| 51 |
|
---|
| 52 | virtual bool isPlaying();
|
---|
| 53 |
|
---|
| 54 | virtual QString toString() const;
|
---|
| 55 | static DbtPlyEngineState * getInstance();
|
---|
| 56 |
|
---|
| 57 | private:
|
---|
| 58 | PlayingState();
|
---|
| 59 | static PlayingState mInstance;
|
---|
| 60 | };
|
---|
| 61 |
|
---|
| 62 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 63 | class DBITE_PLAYER_API PausedState
|
---|
| 64 | : public DbtPlyEngineState
|
---|
| 65 | {
|
---|
| 66 | public:
|
---|
| 67 | virtual void play(DbtPlyEngine & engine);
|
---|
| 68 | virtual void stop(DbtPlyEngine & engine);
|
---|
| 69 |
|
---|
| 70 | virtual QString toString() const;
|
---|
| 71 | static DbtPlyEngineState * getInstance();
|
---|
| 72 |
|
---|
| 73 | private:
|
---|
| 74 | PausedState();
|
---|
| 75 | static PausedState mInstance;
|
---|
| 76 | };
|
---|
| 77 |
|
---|
| 78 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 79 | class DBITE_PLAYER_API StoppedState
|
---|
| 80 | : public DbtPlyEngineState
|
---|
| 81 | {
|
---|
| 82 | public:
|
---|
| 83 | virtual void play(DbtPlyEngine & engine);
|
---|
| 84 |
|
---|
| 85 | virtual QString toString() const;
|
---|
| 86 | static DbtPlyEngineState * getInstance();
|
---|
| 87 |
|
---|
| 88 | private:
|
---|
| 89 | StoppedState();
|
---|
| 90 | static StoppedState mInstance;
|
---|
| 91 | };
|
---|
| 92 |
|
---|
| 93 | } // namespace pacpus
|
---|
| 94 |
|
---|
| 95 | #endif // DBTPLYENGINESTATECHART_H
|
---|