Make LocalFileLoader essentially private.

This commit is contained in:
Unknown W. Brackets 2014-11-23 14:02:35 -08:00
parent 967b589778
commit fd2d7406d1
5 changed files with 33 additions and 27 deletions

View file

@ -31,6 +31,34 @@
#include "Core/ELF/PBPReader.h"
#include "Core/ELF/ParamSFO.h"
class LocalFileLoader : public FileLoader {
public:
LocalFileLoader(const std::string &filename);
virtual ~LocalFileLoader();
virtual bool Reopen(const std::string &filename);
virtual bool Exists() override;
virtual bool IsDirectory() override;
virtual s64 FileSize() override;
virtual std::string Path() const override;
virtual void Seek(s64 absolutePos) override;
virtual size_t Read(size_t bytes, size_t count, void *data) override;
virtual size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data) override;
private:
// First only used by Android, but we can keep it here for everyone.
int fd_;
FILE *f_;
u64 filesize_;
std::string filename_;
};
FileLoader *ConstructFileLoader(const std::string &filename) {
return new LocalFileLoader(filename);
}
LocalFileLoader::LocalFileLoader(const std::string &filename) {
Reopen(filename);
}