#include "testing/fake_file_access.h"
#include <utility>
#include "core/fxcrt/check.h"
#include "core/fxcrt/fx_system.h"
class FileAccessWrapper final : public FPDF_FILEACCESS { … };
class FileAvailImpl final : public FX_FILEAVAIL { … };
class DownloadHintsImpl final : public FX_DOWNLOADHINTS { … };
FakeFileAccess::FakeFileAccess(FPDF_FILEACCESS* file_access)
: … { … }
FakeFileAccess::~FakeFileAccess() = default;
FPDF_FILEACCESS* FakeFileAccess::GetFileAccess() const { … }
FX_FILEAVAIL* FakeFileAccess::GetFileAvail() const { … }
FX_DOWNLOADHINTS* FakeFileAccess::GetDownloadHints() const { … }
FPDF_BOOL FakeFileAccess::IsDataAvail(size_t offset, size_t size) const { … }
void FakeFileAccess::AddSegment(size_t offset, size_t size) { … }
unsigned long FakeFileAccess::GetFileSize() { … }
int FakeFileAccess::GetBlock(unsigned long position,
unsigned char* pBuf,
unsigned long size) { … }
void FakeFileAccess::SetRequestedDataAvailable() { … }
void FakeFileAccess::SetWholeFileAvailable() { … }