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 | */
|
---|
10 |
|
---|
11 | #ifndef DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|
12 | #define DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|
13 |
|
---|
14 | #include <QString>
|
---|
15 |
|
---|
16 | #include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
|
---|
17 |
|
---|
18 | namespace pacpus {
|
---|
19 |
|
---|
20 | class DbtPlyEngine;
|
---|
21 |
|
---|
22 | ////////////////////////////////////////////////////////////////////////////////
|
---|
23 | class DBITE_PLAYER_API DbtPlyEngineState
|
---|
24 | {
|
---|
25 | public:
|
---|
26 | /// @todo Documentation
|
---|
27 | virtual ~DbtPlyEngineState();
|
---|
28 |
|
---|
29 | /// @todo Documentation
|
---|
30 | virtual void play(DbtPlyEngine & engine);
|
---|
31 | /// @todo Documentation
|
---|
32 | virtual void pause(DbtPlyEngine & engine);
|
---|
33 | /// @todo Documentation
|
---|
34 | virtual void stop(DbtPlyEngine & engine);
|
---|
35 |
|
---|
36 | /// @todo Documentation
|
---|
37 | virtual void speedUp(DbtPlyEngine & engine);
|
---|
38 | /// @todo Documentation
|
---|
39 | virtual void speedDown(DbtPlyEngine & engine);
|
---|
40 |
|
---|
41 | /// @todo Documentation
|
---|
42 | virtual bool isPlaying();
|
---|
43 |
|
---|
44 | /// @todo Documentation
|
---|
45 | virtual QString toString() const = 0;
|
---|
46 |
|
---|
47 | protected:
|
---|
48 | /// @todo Documentation
|
---|
49 | DbtPlyEngineState();
|
---|
50 | };
|
---|
51 |
|
---|
52 | ////////////////////////////////////////////////////////////////////////////////
|
---|
53 | class DBITE_PLAYER_API PlayingState
|
---|
54 | : public DbtPlyEngineState
|
---|
55 | {
|
---|
56 | public:
|
---|
57 | /// @todo Documentation
|
---|
58 | virtual void pause(DbtPlyEngine & engine);
|
---|
59 | /// @todo Documentation
|
---|
60 | virtual void stop(DbtPlyEngine & engine);
|
---|
61 |
|
---|
62 | /// @todo Documentation
|
---|
63 | virtual bool isPlaying();
|
---|
64 |
|
---|
65 | /// @todo Documentation
|
---|
66 | virtual QString toString() const;
|
---|
67 | /// @todo Documentation
|
---|
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:
|
---|
80 | /// @todo Documentation
|
---|
81 | virtual void play(DbtPlyEngine & engine);
|
---|
82 | /// @todo Documentation
|
---|
83 | virtual void stop(DbtPlyEngine & engine);
|
---|
84 |
|
---|
85 | /// @todo Documentation
|
---|
86 | virtual QString toString() const;
|
---|
87 | /// @todo Documentation
|
---|
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:
|
---|
100 | /// @todo Documentation
|
---|
101 | virtual void play(DbtPlyEngine & engine);
|
---|
102 |
|
---|
103 | /// @todo Documentation
|
---|
104 | virtual QString toString() const;
|
---|
105 | /// @todo Documentation
|
---|
106 | static DbtPlyEngineState * getInstance();
|
---|
107 |
|
---|
108 | private:
|
---|
109 | StoppedState();
|
---|
110 | static StoppedState mInstance;
|
---|
111 | };
|
---|
112 |
|
---|
113 | } // namespace pacpus
|
---|
114 |
|
---|
115 | #endif // DEF_PACPUS_DBTPLYENGINESTATECHART_H
|
---|