Files
ac-decomp/include/JSystem/JKernel/JKRFile.h
T
Cuyler36 80ef14e480 Add & Link JKernel (#142)
* match and link JKRAram.cpp

* match and link JKRExpHeap

* match and link JKRAramStream.cpp

* match and link JKRFileLoader.cpp

* match and link JKRFileFinder.cpp

* JKernel Dump

* match and link JKRAramArchive.cpp

* match and link JKRDvdArchive.cpp

* match and link JKRCompArchive.cpp

* match but not link JKRDvdAramRipper

* small refactors

* match and link JKRThread.cpp

* fix and link JKRDvdAramStream.cpp

* Formatting fixes

---------

Co-authored-by: SwareJonge <olaf23okken@gmail.com>
2023-11-07 23:34:10 -05:00

34 lines
740 B
C++

#ifndef JKRFILE_H
#define JKRFILE_H
#include "types.h"
#include "dolphin/dvd.h"
#include "dolphin/os.h"
#include "JSystem/JSupport/JSUList.h"
#include "JSystem/JKernel/JKRDisposer.h"
#include "JSystem/JKernel/JKRMacro.h"
class JKRFile : public JKRDisposer {
public:
inline JKRFile()
: JKRDisposer()
, mFileOpen(false)
{
}
virtual ~JKRFile() { }
virtual bool open(const char* path) = 0;
virtual bool close() = 0;
virtual int readData(void* data, s32 length, s32 ofs) = 0;
virtual int writeData(const void* data, s32 length, s32 ofs) = 0;
virtual u32 getFileSize() const = 0;
void read(void* data, s32 length, s32 ofs);
bool isAvailable() { return this->mFileOpen; }
protected:
bool mFileOpen;
};
#endif