]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: mmbman.h | |
3 | // Purpose: Multimedia Board manager | |
4 | // Author: Guilhem Lavaux, <guilhem.lavaux@libertysurf.fr> | |
5 | // Modified by: | |
6 | // Created: 13/02/2000 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2000, Guilhem Lavaux | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _MMBMAN_APP_H_ | |
13 | #define _MMBMAN_APP_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "mmbman.cpp" | |
17 | #endif | |
18 | ||
19 | #include "wx/stream.h" | |
20 | #include "wx/mmedia/sndbase.h" | |
21 | ||
22 | // ------------------------------------------------------------------------- | |
23 | // Base structure definitions | |
24 | // ------------------------------------------------------------------------- | |
25 | ||
26 | typedef struct { | |
27 | wxUint8 seconds, minutes, hours; | |
28 | } MMBoardTime; | |
29 | ||
30 | // ------------------------------------------------------------------------- | |
31 | // Constants | |
32 | // ------------------------------------------------------------------------- | |
33 | ||
34 | #define MMBoard_NoError 0 | |
35 | #define MMBoard_UnknownFile 1 | |
36 | ||
37 | // ------------------------------------------------------------------------- | |
38 | // Interface definition: MMBoardFile | |
39 | // ------------------------------------------------------------------------- | |
40 | ||
41 | class MMBoardFile { | |
42 | public: | |
43 | MMBoardFile(); | |
44 | virtual ~MMBoardFile(); | |
45 | ||
46 | virtual bool NeedWindow() = 0; | |
47 | ||
48 | virtual void SetWindow(wxWindow *window) = 0; | |
49 | ||
50 | virtual void Play() = 0; | |
51 | virtual void Pause() = 0; | |
52 | virtual void Resume() = 0; | |
53 | virtual void Stop() = 0; | |
54 | ||
55 | virtual MMBoardTime GetPosition() = 0; | |
56 | virtual MMBoardTime GetLength() = 0; | |
57 | virtual void SetPosition(MMBoardTime btime) = 0; | |
58 | ||
59 | virtual bool IsStopped() = 0; | |
60 | virtual bool IsPaused() = 0; | |
61 | ||
62 | virtual wxString GetStringType() = 0; | |
63 | virtual wxString GetStringInformation() = 0; | |
64 | ||
65 | void SetError(wxUint8 error) { m_error = error; } | |
66 | wxUint8 GetError() const { return m_error; } | |
67 | ||
68 | protected: | |
69 | wxUint8 m_error; | |
70 | }; | |
71 | ||
72 | // ------------------------------------------------------------------------- | |
73 | // Main manager | |
74 | // ------------------------------------------------------------------------- | |
75 | ||
76 | class MMBoardManager { | |
77 | public: | |
78 | static MMBoardFile *Open(const wxString& filename); | |
79 | ||
80 | static wxSoundStream *OpenSoundStream(); | |
81 | static void UnrefSoundStream(wxSoundStream *stream); | |
82 | }; | |
83 | ||
84 | #endif |