5#ifndef CORE_FPDFAPI_PARSER_CPDF_READ_VALIDATOR_H_
6#define CORE_FPDFAPI_PARSER_CPDF_READ_VALIDATOR_H_
8#include "core/fpdfapi/parser/cpdf_data_avail.h"
9#include "core/fxcrt/fx_memory.h"
10#include "core/fxcrt/fx_stream.h"
11#include "core/fxcrt/retain_ptr.h"
12#include "core/fxcrt/unowned_ptr.h"
27 const bool saved_read_error_;
28 const bool saved_has_unavailable_data_;
58 void ScheduleDownload(
FX_FILESIZE offset, size_t size);
59 bool IsDataRangeAvailable(
FX_FILESIZE offset, size_t size)
const;
64 bool read_error_ =
false;
65 bool has_unavailable_data_ =
false;
66 bool whole_file_already_available_ =
false;
FX_FILESIZE last_crossref_offset() const
CPDF_CrossRefAvail(CPDF_SyntaxParser *parser, FX_FILESIZE last_crossref_offset)
CPDF_DataAvail::DocAvailStatus CheckAvail()
virtual void AddSegment(FX_FILESIZE offset, size_t size)=0
virtual bool IsDataAvail(FX_FILESIZE offset, size_t size)=0
CPDF_DataAvail(FileAvail *pFileAvail, RetainPtr< IFX_SeekableReadStream > pFileRead)
~CPDF_DataAvail() override
DocAvailStatus IsPageAvail(uint32_t dwPage, DownloadHints *pHints)
const CPDF_HintTables * GetHintTablesForTest() const
std::pair< CPDF_Parser::Error, std::unique_ptr< CPDF_Document > > ParseDocument(std::unique_ptr< CPDF_Document::RenderDataIface > pRenderData, std::unique_ptr< CPDF_Document::PageDataIface > pPageData, const ByteString &password)
RetainPtr< const CPDF_Dictionary > GetPageDictionary(int index) const
RetainPtr< CPDF_ReadValidator > GetValidator() const
DocAvailStatus IsDocAvail(DownloadHints *pHints)
void OnObservableDestroyed() override
DocLinearizationStatus IsLinearizedPDF()
DocFormStatus IsFormAvail(DownloadHints *pHints)
ScopedSession & operator=(const ScopedSession &that)=delete
ScopedSession(const ScopedSession &that)=delete
ScopedSession(RetainPtr< CPDF_ReadValidator > validator)
bool has_read_problems() const
void SetDownloadHints(CPDF_DataAvail::DownloadHints *hints)
CPDF_ReadValidator(RetainPtr< IFX_SeekableReadStream > file_read, CPDF_DataAvail::FileAvail *file_avail)
bool has_unavailable_data() const
bool IsWholeFileAvailable()
FX_FILESIZE GetSize() override
bool CheckDataRangeAndRequestIfUnavailable(FX_FILESIZE offset, size_t size)
~CPDF_ReadValidator() override
bool ReadBlockAtOffset(pdfium::span< uint8_t > buffer, FX_FILESIZE offset) override
bool CheckWholeFileAndRequestIfUnavailable()
bool operator==(const char *ptr) const
bool operator!=(const char *ptr) const
#define CONSTRUCT_VIA_MAKE_RETAIN