Files
Work/proto/source/MEDIAPAK.HPP
2024-08-07 09:16:27 -04:00

37 lines
863 B
C++

#ifndef _CHAT_MEDIAPAK_HPP_
#define _CHAT_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 _CHAT_PAKENTRY_HPP_
#include <proto/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