Files
Work/browse/HOLD/MEDIAPAK.HPP
2024-08-07 09:12:07 -04:00

37 lines
870 B
C++

#ifndef _BROWSE_MEDIAPAK_HPP_
#define _BROWSE_MEDIAPAK_HPP_
#ifndef _COMMON_WINDOWS_HPP_
#include <common/windows.hpp>
#endif
#ifndef _COMMON_OPENFILE_HPP_
#include <common/openfile.hpp>
#endif
#ifndef _SAMPLE_WAVEFORM_HPP_
#include <sample/wave.hpp>
#endif
#ifndef _BROWSE_PAKENTRY_HPP_
#include <browse/pakentry.hpp>
#endif
class MediaPak
{
public:
MediaPak(void);
virtual ~MediaPak();
BOOL open(const String &pathFileName,BOOL creationFlag=FALSE);
void close(void);
BOOL add(const PakEntry &pakEntry);
BOOL getEntry(PakEntry &pakEntry,DWORD entryIndex);
BOOL getEntry(WaveForm &waveForm,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