#ifndef _MEDIAPAK_MEDIAPAK_HPP_ #define _MEDIAPAK_MEDIAPAK_HPP_ #ifndef _COMMON_WINDOWS_HPP_ #include #endif #ifndef _COMMON_OPENFILE_HPP_ #include #endif #ifndef _COMMON_ARRAY_HPP_ #include #endif #ifndef _SAMPLE_WAVEFORM_HPP_ #include #endif #ifndef _MEDIAPAK_PAKENTRY_HPP_ #include #endif class EntryInfo; class MediaPak { public: enum Mode{CreateAlways,OpenExisting,OpenAlways}; MediaPak(void); virtual ~MediaPak(); BOOL open(const String &pathFileName,Mode openMode=OpenExisting); void close(void); BOOL add(const PakEntry &pakEntry); BOOL add(const String &strPathFileName); BOOL getEntry(PakEntry &pakEntry,DWORD entryIndex); BOOL getEntry(WaveForm &waveForm,DWORD entryIndex); BOOL getInfo(Array &entryInfoArray); BOOL getInfo(EntryInfo &entryInfo,DWORD entryIndex); DWORD entries(void)const; BOOL isOkay(void)const; private: enum {HeaderMagic=0x4050414E}; MediaPak(const MediaPak &mediaPak); MediaPak &operator=(const MediaPak &mediaPak); FileHandle mPakFile; DWORD mEntries; DWORD mOffsetEntries; }; #endif