1 //---------------------------------------------------------------------------
  2 
  3 #ifndef PlayerH
  4 #define PlayerH
  5 
  6 #define MAX(a, b)  (((a) > (b)) ? (a) : (b))
  7 #define MIN(a, b)  (((a) < (b)) ? (a) : (b))
  8 
  9 //---------------------------------------------------------------------------
 10 
 11 class TPlayer
 12 {
 13 private:
 14     long __fastcall FGetInternalTrackIndex();
 15     void __fastcall FSetInternalTrackIndex(long);
 16     AnsiString __fastcall FPlayerVersion();
 17     AnsiString __fastcall FPlayerDirectory();
 18     void __fastcall FStatusMessage(AnsiString Msg);
 19 
 20     int __fastcall FStatus(void);
 21 
 22 
 23     long __fastcall FGetNumTracks();
 24     long __fastcall FGetPlayNext(void);
 25     void __fastcall FSetPlayNext(long);
 26 
 27     int __fastcall FPlayerReadVolume();
 28     void __fastcall FPlayerWriteVolume(int );
 29 
 30     int __fastcall FPlayerReadBalance();
 31     void __fastcall FPlayerWriteBalance(int );
 32 
 33     long __fastcall GetAudioInfo(int par1);
 34     long __fastcall FGetCurrentSamplerate();
 35     long __fastcall FGetCurrentBitrate();
 36     long __fastcall FGetCurrentChannels();
 37     long __fastcall FGetCurrentIndex();
 38 
 39     long __fastcall FGetSongPosition();
 40     void __fastcall FSetSongPosition(long);
 41     long __fastcall FGetSongRemain();
 42 
 43 
 44     void __fastcall FRepeatTrack(bool);
 45     void __fastcall FShuffle(bool);
 46 
 47     bool __fastcall FShuffleState();
 48     bool __fastcall FRepeatState();
 49 
 50 
 51     AnsiString __fastcall FCurrentArtist();
 52     AnsiString __fastcall FCurrentTitle();
 53 
 54     AnsiString __fastcall FGetSupportedExtensions();
 55     AnsiString FSupportedExtensions;
 56 
 57     char smallBuffer[512];
 58 
 59     HWND hwndPlayer, hwndWinampPlaylist, hwndEqualizer;
 60     int FInternalVolume, FInternalBalance;
 61     long FInternalTrackIndex;
 62 
 63 protected:
 64 
 65 
 66 public:
 67     __fastcall TPlayer();
 68     __fastcall ~TPlayer();
 69 
 70 
 71 
 72     HWND __fastcall GetWindowHandle(int);
 73     void __fastcall Restart();
 74     void __fastcall Minimize(void);
 75     void __fastcall Close(void);
 76     void __fastcall ExecutePlugin(void);
 77 
 78     __property long PrevIndex = {read=FGetInternalTrackIndex, write=FSetInternalTrackIndex};
 79     __property int Volume = {read=FPlayerReadVolume, write=FPlayerWriteVolume};
 80     __property int Balance = {read=FPlayerReadBalance, write=FPlayerWriteBalance};
 81     __property long GetNumTracks = {read=FGetNumTracks};
 82     __property int Status = {read=FStatus};
 83     __property long NextTrack = {write=FSetPlayNext, read=FGetPlayNext};
 84     __property AnsiString StatusMessage = {write=FStatusMessage};
 85     __property AnsiString SupportedExtensions = {read=FGetSupportedExtensions};
 86 
 87     __property AnsiString PlayerVersion = {read=FPlayerVersion};
 88     __property AnsiString PlayerDirectory = {read=FPlayerDirectory};
 89 
 90     __property AnsiString CurrentArtist = {read=FCurrentArtist};
 91     __property AnsiString CurrentTitle = {read=FCurrentTitle};
 92     __property long CurrentSamplerate = {read = FGetCurrentSamplerate};
 93     __property long CurrentBitrate = {read = FGetCurrentBitrate};
 94     __property long CurrentChannels = {read = FGetCurrentChannels};
 95     __property long CurrentIndex = {read = FGetCurrentIndex};
 96 
 97     __property long SongPosition = {read = FGetSongPosition, write = FSetSongPosition};
 98     __property long SongRemain = {read = FGetSongRemain};
 99 
100     __property bool ShuffleState = {read = FShuffleState, write=FShuffle};
101     __property bool RepeatState = {read = FRepeatState, write=FRepeatTrack};
102 
103 
104   	AnsiString __fastcall GetTrackFile(int);
105   	AnsiString __fastcall GetTrackName(int);
106   	AnsiString __fastcall GetArtistName(int);
107     AnsiString __fastcall GetTitle(int);
108 
109     AnsiString __fastcall GetMetaData(AnsiString Filename, AnsiString Item);
110 
111 
112     AnsiString ArtistSeparator;
113 
114 
115     int __fastcall GetTrackLength(int index);
116 
117     void __fastcall AddFile(int Pos, AnsiString FileName);
118     void __fastcall DeleteIndex(int Index);
119     void __fastcall ClearPlaylist();
120     void __fastcall SavePlaylist();
121     void __fastcall SavePlaylistTo(AnsiString path, AnsiString filename);
122 
123     void __fastcall Play();
124     void __fastcall Stop();
125     void __fastcall Pause();
126     void __fastcall TrackFwd();
127     void __fastcall TrackBwd();
128     void __fastcall SeekFwd();
129     void __fastcall SeekBwd();
130     void __fastcall PlayIndex(int num);
131 
132 };
133 
134 extern PACKAGE TPlayer *Player;
135 
136 #endif


syntax highlighted by Code2HTML, v. 0.9.1