]> git.saurik.com Git - wxWidgets.git/blame - contrib/include/wx/mmedia/cdbase.h
Added WXDLLEXPORT symbol for DynLib classes
[wxWidgets.git] / contrib / include / wx / mmedia / cdbase.h
CommitLineData
e8482f24
GL
1// ---------------------------------------------------------------------------
2// Name: cdbase.h
3// Purpose: wxMMedia
4// Author: Guilhem Lavaux
5// Created: 1997
6// Updated: 1998, 1999, 2000
7// Copyright: (C) 1997, 1998, 1999, 2000 Guilhem Lavaux
8// License: wxWindows license
9// ---------------------------------------------------------------------------
10#ifndef __CDA_base_H__
11#define __CDA_base_H__
12
13#ifdef __GNUG__
14#pragma interface "cdbase.h"
15#endif
16
17#include "wx/defs.h"
18#include "wx/object.h"
19
20typedef struct wxCDtime {
21 wxUint8 track;
22 wxUint8 hour, min, sec;
23} wxCDtime;
24
25class WXDLLEXPORT wxCDAudio : public wxObject {
26 DECLARE_ABSTRACT_CLASS(wxCDAudio)
27public:
28 typedef enum { PLAYING, PAUSED, STOPPED } CDstatus;
29 // Table of contents manager
30 class CDtoc {
31 protected:
32 wxCDtime *tracks_time, *tracks_pos;
33 wxCDtime total_time;
34 public:
35 //
36 CDtoc(wxCDtime& tot_tm, wxCDtime *trks_tm, wxCDtime *trks_pos)
37 { tracks_time = trks_tm; total_time = tot_tm; tracks_pos = trks_pos; }
38
39 // Returns the length of the specified track
40 // track: track to get length
41 wxCDtime GetTrackTime(wxUint8 track) const;
42 // Returns the position of the specified track
43 // track: track to get position
44 wxCDtime GetTrackPos(wxUint8 track) const;
45 // Returns the total time
46 inline wxCDtime GetTotalTime() const { return total_time; }
47 };
48public:
49 //
50 wxCDAudio() : wxObject() {}
51 //
52 virtual ~wxCDAudio() {}
53
54 // Play audio at the specified position
55 virtual bool Play(const wxCDtime& beg_play, const wxCDtime& end_play) = 0;
56 // Play audio from the specified to the end of the CD audio
57 bool Play(const wxCDtime& beg_play);
58 //
59 bool Play(wxUint8 beg_track, wxUint8 end_track = 0);
60 // Pause the audio playing
61 virtual bool Pause() = 0;
62 // Resume a paused audio playing
63 virtual bool Resume() = 0;
64 // Get the current CD status
65 virtual CDstatus GetStatus() = 0;
66 // Get the current playing time
67 virtual wxCDtime GetTime() = 0;
68 // Returns the table of contents
69 virtual const CDtoc& GetToc() = 0;
70 // CD ok
71 virtual bool Ok() const = 0;
72};
73
74#endif