[31] | 1 | /**
|
---|
| 2 | *
|
---|
| 3 | * Distributed under the UTC Heudiascy Pacpus License, Version 1.0.
|
---|
| 4 | * Copyright (c) UTC Heudiasyc 2010 - 2013. All rights reserved.
|
---|
| 5 | *
|
---|
| 6 | * See the LICENSE file for more information or a copy at:
|
---|
| 7 | * http://www.hds.utc.fr/~kurdejma/LICENSE_1_0.txt
|
---|
| 8 | *
|
---|
| 9 | */
|
---|
[3] | 10 |
|
---|
[31] | 11 | #ifndef DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|
| 12 | #define DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|
[3] | 13 |
|
---|
[31] | 14 | #include <QString>
|
---|
[3] | 15 |
|
---|
[31] | 16 | #include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
|
---|
[3] | 17 |
|
---|
| 18 | namespace pacpus {
|
---|
| 19 |
|
---|
| 20 | class DbtPlyEngine;
|
---|
| 21 |
|
---|
| 22 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 23 | class DBITE_PLAYER_API DbtPlyEngineState
|
---|
| 24 | {
|
---|
| 25 | public:
|
---|
[53] | 26 | /// @todo Documentation
|
---|
[3] | 27 | virtual ~DbtPlyEngineState();
|
---|
[53] | 28 |
|
---|
| 29 | /// @todo Documentation
|
---|
[3] | 30 | virtual void play(DbtPlyEngine & engine);
|
---|
[53] | 31 | /// @todo Documentation
|
---|
[3] | 32 | virtual void pause(DbtPlyEngine & engine);
|
---|
[53] | 33 | /// @todo Documentation
|
---|
[3] | 34 | virtual void stop(DbtPlyEngine & engine);
|
---|
[53] | 35 |
|
---|
| 36 | /// @todo Documentation
|
---|
[3] | 37 | virtual void speedUp(DbtPlyEngine & engine);
|
---|
[53] | 38 | /// @todo Documentation
|
---|
[3] | 39 | virtual void speedDown(DbtPlyEngine & engine);
|
---|
[53] | 40 |
|
---|
| 41 | /// @todo Documentation
|
---|
[3] | 42 | virtual bool isPlaying();
|
---|
[53] | 43 |
|
---|
| 44 | /// @todo Documentation
|
---|
[3] | 45 | virtual QString toString() const = 0;
|
---|
| 46 |
|
---|
| 47 | protected:
|
---|
[53] | 48 | /// @todo Documentation
|
---|
[3] | 49 | DbtPlyEngineState();
|
---|
| 50 | };
|
---|
| 51 |
|
---|
| 52 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 53 | class DBITE_PLAYER_API PlayingState
|
---|
| 54 | : public DbtPlyEngineState
|
---|
| 55 | {
|
---|
| 56 | public:
|
---|
[53] | 57 | /// @todo Documentation
|
---|
[3] | 58 | virtual void pause(DbtPlyEngine & engine);
|
---|
[53] | 59 | /// @todo Documentation
|
---|
[3] | 60 | virtual void stop(DbtPlyEngine & engine);
|
---|
[53] | 61 |
|
---|
| 62 | /// @todo Documentation
|
---|
[3] | 63 | virtual bool isPlaying();
|
---|
[53] | 64 |
|
---|
| 65 | /// @todo Documentation
|
---|
[3] | 66 | virtual QString toString() const;
|
---|
[53] | 67 | /// @todo Documentation
|
---|
[3] | 68 | static DbtPlyEngineState * getInstance();
|
---|
| 69 |
|
---|
| 70 | private:
|
---|
| 71 | PlayingState();
|
---|
| 72 | static PlayingState mInstance;
|
---|
| 73 | };
|
---|
| 74 |
|
---|
| 75 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 76 | class DBITE_PLAYER_API PausedState
|
---|
| 77 | : public DbtPlyEngineState
|
---|
| 78 | {
|
---|
| 79 | public:
|
---|
[53] | 80 | /// @todo Documentation
|
---|
[3] | 81 | virtual void play(DbtPlyEngine & engine);
|
---|
[53] | 82 | /// @todo Documentation
|
---|
[3] | 83 | virtual void stop(DbtPlyEngine & engine);
|
---|
[53] | 84 |
|
---|
| 85 | /// @todo Documentation
|
---|
[3] | 86 | virtual QString toString() const;
|
---|
[53] | 87 | /// @todo Documentation
|
---|
[3] | 88 | static DbtPlyEngineState * getInstance();
|
---|
| 89 |
|
---|
| 90 | private:
|
---|
| 91 | PausedState();
|
---|
| 92 | static PausedState mInstance;
|
---|
| 93 | };
|
---|
| 94 |
|
---|
| 95 | ////////////////////////////////////////////////////////////////////////////////
|
---|
| 96 | class DBITE_PLAYER_API StoppedState
|
---|
| 97 | : public DbtPlyEngineState
|
---|
| 98 | {
|
---|
| 99 | public:
|
---|
[53] | 100 | /// @todo Documentation
|
---|
[3] | 101 | virtual void play(DbtPlyEngine & engine);
|
---|
[53] | 102 |
|
---|
| 103 | /// @todo Documentation
|
---|
[3] | 104 | virtual QString toString() const;
|
---|
[53] | 105 | /// @todo Documentation
|
---|
[3] | 106 | static DbtPlyEngineState * getInstance();
|
---|
| 107 |
|
---|
| 108 | private:
|
---|
| 109 | StoppedState();
|
---|
| 110 | static StoppedState mInstance;
|
---|
| 111 | };
|
---|
| 112 |
|
---|
| 113 | } // namespace pacpus
|
---|
| 114 |
|
---|
[31] | 115 | #endif // DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|