summaryrefslogtreecommitdiff
path: root/include/egg/core/eggFile.h
blob: 7ab9ade2024744e6001453a3ca6a3827a0cf3461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef EGG_FILE_H
#define EGG_FILE_H

#include "common.h"

namespace EGG {

class File {
public:
    File() : mIsOpen(false) {}

public:
    /* vt 0x08 */ virtual ~File() {}
    /* vt 0x0C */ virtual bool open(const char *path) = 0;
    /* vt 0x10 */ virtual void close() = 0;
    /* vt 0x14 */ virtual s32 readData(void *buffer, s32 length, s32 offset) = 0;
    /* vt 0x18 */ virtual s32 writeData(const void *buffer, s32 length, s32 offset) = 0;
    /* vt 0x1C */ virtual u32 getFileSize() const = 0;

    /* 0x4 */ bool mIsOpen;

private:
    u8 pad[3];
};

} // namespace EGG

#endif