1 | // %pacpus:license{
|
---|
2 | // This file is part of the PACPUS framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %pacpus:license}
|
---|
5 | /// @file
|
---|
6 | /// @author Elie Al Alam <firstname.surname@utc.fr>
|
---|
7 | /// @author Gerald Dherbomez <firstname.surname@utc.fr>
|
---|
8 | /// @author Marek Kurdej <firstname.surname@utc.fr>
|
---|
9 | /// @date April, 2007
|
---|
10 | /// @version $Id: DbtPlyEngineStateChart.h 76 2013-01-10 17:05:10Z kurdejma $
|
---|
11 | /// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
|
---|
12 | /// @brief DbitePlayer state machine.
|
---|
13 | ///
|
---|
14 | /// Detailed description.
|
---|
15 |
|
---|
16 | #ifndef DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|
17 | #define DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|
18 |
|
---|
19 | #include <QString>
|
---|
20 |
|
---|
21 | #include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
|
---|
22 |
|
---|
23 | namespace pacpus {
|
---|
24 |
|
---|
25 | class DbtPlyEngine;
|
---|
26 |
|
---|
27 | ////////////////////////////////////////////////////////////////////////////////
|
---|
28 | class DBITE_PLAYER_API DbtPlyEngineState
|
---|
29 | {
|
---|
30 | public:
|
---|
31 | /// @todo Documentation
|
---|
32 | virtual ~DbtPlyEngineState();
|
---|
33 |
|
---|
34 | /// @todo Documentation
|
---|
35 | virtual void play(DbtPlyEngine & engine);
|
---|
36 | /// @todo Documentation
|
---|
37 | virtual void pause(DbtPlyEngine & engine);
|
---|
38 | /// @todo Documentation
|
---|
39 | virtual void stop(DbtPlyEngine & engine);
|
---|
40 |
|
---|
41 | /// @todo Documentation
|
---|
42 | virtual void speedUp(DbtPlyEngine & engine);
|
---|
43 | /// @todo Documentation
|
---|
44 | virtual void speedDown(DbtPlyEngine & engine);
|
---|
45 |
|
---|
46 | /// @todo Documentation
|
---|
47 | virtual bool isPlaying();
|
---|
48 |
|
---|
49 | /// @todo Documentation
|
---|
50 | virtual QString toString() const = 0;
|
---|
51 |
|
---|
52 | protected:
|
---|
53 | /// @todo Documentation
|
---|
54 | DbtPlyEngineState();
|
---|
55 | };
|
---|
56 |
|
---|
57 | ////////////////////////////////////////////////////////////////////////////////
|
---|
58 | class DBITE_PLAYER_API PlayingState
|
---|
59 | : public DbtPlyEngineState
|
---|
60 | {
|
---|
61 | public:
|
---|
62 | /// @todo Documentation
|
---|
63 | virtual void pause(DbtPlyEngine & engine);
|
---|
64 | /// @todo Documentation
|
---|
65 | virtual void stop(DbtPlyEngine & engine);
|
---|
66 |
|
---|
67 | /// @todo Documentation
|
---|
68 | virtual bool isPlaying();
|
---|
69 |
|
---|
70 | /// @todo Documentation
|
---|
71 | virtual QString toString() const;
|
---|
72 | /// @todo Documentation
|
---|
73 | static DbtPlyEngineState * getInstance();
|
---|
74 |
|
---|
75 | private:
|
---|
76 | PlayingState();
|
---|
77 | static PlayingState mInstance;
|
---|
78 | };
|
---|
79 |
|
---|
80 | ////////////////////////////////////////////////////////////////////////////////
|
---|
81 | /// State class when player is on pause.
|
---|
82 | class DBITE_PLAYER_API PausedState
|
---|
83 | : public DbtPlyEngineState
|
---|
84 | {
|
---|
85 | public:
|
---|
86 | /// @todo Documentation
|
---|
87 | virtual void play(DbtPlyEngine & engine);
|
---|
88 | /// @todo Documentation
|
---|
89 | virtual void stop(DbtPlyEngine & engine);
|
---|
90 |
|
---|
91 | /// @todo Documentation
|
---|
92 | virtual QString toString() const;
|
---|
93 | /// @todo Documentation
|
---|
94 | static DbtPlyEngineState * getInstance();
|
---|
95 |
|
---|
96 | private:
|
---|
97 | PausedState();
|
---|
98 | static PausedState mInstance;
|
---|
99 | };
|
---|
100 |
|
---|
101 | ////////////////////////////////////////////////////////////////////////////////
|
---|
102 | /// State class when player is stopped.
|
---|
103 | class DBITE_PLAYER_API StoppedState
|
---|
104 | : public DbtPlyEngineState
|
---|
105 | {
|
---|
106 | public:
|
---|
107 | /// @todo Documentation
|
---|
108 | virtual void play(DbtPlyEngine & engine);
|
---|
109 |
|
---|
110 | /// @todo Documentation
|
---|
111 | virtual QString toString() const;
|
---|
112 | /// @todo Documentation
|
---|
113 | static DbtPlyEngineState * getInstance();
|
---|
114 |
|
---|
115 | private:
|
---|
116 | StoppedState();
|
---|
117 | static StoppedState mInstance;
|
---|
118 | };
|
---|
119 |
|
---|
120 | } // namespace pacpus
|
---|
121 |
|
---|
122 | #endif // DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|