Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cpdf_cross_ref_avail.h
Go to the documentation of this file.
1
// Copyright 2017 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#
ifndef
CORE_FPDFAPI_PARSER_CPDF_CROSS_REF_AVAIL_H_
6
#
define
CORE_FPDFAPI_PARSER_CPDF_CROSS_REF_AVAIL_H_
7
8
#
include
<
queue
>
9
#
include
<
set
>
10
11
#
include
"core/fpdfapi/parser/cpdf_data_avail.h"
12
#
include
"core/fxcrt/retain_ptr.h"
13
#
include
"core/fxcrt/unowned_ptr.h"
14
15
class
CPDF_SyntaxParser
;
16
17
class
CPDF_CrossRefAvail
{
18
public
:
19
CPDF_CrossRefAvail
(
CPDF_SyntaxParser
* parser,
20
FX_FILESIZE
last_crossref_offset);
21
~
CPDF_CrossRefAvail
();
22
23
FX_FILESIZE
last_crossref_offset
()
const
{
return
last_crossref_offset_; }
24
25
CPDF_DataAvail::
DocAvailStatus
CheckAvail
();
26
27
private
:
28
enum
class
State {
29
kCrossRefCheck,
30
kCrossRefV4ItemCheck,
31
kCrossRefV4TrailerCheck,
32
kDone,
33
};
34
35
bool
CheckReadProblems();
36
bool
CheckCrossRef();
37
bool
CheckCrossRefV4();
38
bool
CheckCrossRefV4Item();
39
bool
CheckCrossRefV4Trailer();
40
bool
CheckCrossRefStream();
41
42
void
AddCrossRefForCheck(
FX_FILESIZE
crossref_offset);
43
44
RetainPtr
<
CPDF_ReadValidator
> GetValidator();
45
46
UnownedPtr
<
CPDF_SyntaxParser
>
const
parser_;
47
const
FX_FILESIZE
last_crossref_offset_;
48
CPDF_DataAvail::
DocAvailStatus
status_ = CPDF_DataAvail
::
kDataNotAvailable
;
49
State state_ = State::kCrossRefCheck;
50
FX_FILESIZE
offset_ = 0;
51
std::queue<
FX_FILESIZE
> cross_refs_for_check_;
52
std::set<
FX_FILESIZE
> registered_crossrefs_;
53
};
54
55
#
endif
// CORE_FPDFAPI_PARSER_CPDF_CROSS_REF_AVAIL_H_
CPDF_CrossRefAvail
Definition
cpdf_cross_ref_avail.h:17
CPDF_CrossRefAvail::~CPDF_CrossRefAvail
~CPDF_CrossRefAvail()
CPDF_CrossRefAvail::last_crossref_offset
FX_FILESIZE last_crossref_offset() const
Definition
cpdf_cross_ref_avail.h:23
CPDF_CrossRefAvail::CPDF_CrossRefAvail
CPDF_CrossRefAvail(CPDF_SyntaxParser *parser, FX_FILESIZE last_crossref_offset)
Definition
cpdf_cross_ref_avail.cpp:28
CPDF_CrossRefAvail::CheckAvail
CPDF_DataAvail::DocAvailStatus CheckAvail()
Definition
cpdf_cross_ref_avail.cpp:37
CPDF_DataAvail::DocAvailStatus
DocAvailStatus
Definition
cpdf_data_avail.h:36
CPDF_DataAvail::kDataAvailable
@ kDataAvailable
Definition
cpdf_data_avail.h:39
CPDF_DataAvail::kDataNotAvailable
@ kDataNotAvailable
Definition
cpdf_data_avail.h:38
CPDF_DataAvail::kDataError
@ kDataError
Definition
cpdf_data_avail.h:37
CPDF_ReadValidator::ScopedSession
Definition
cpdf_read_validator.h:16
CPDF_ReadValidator
Definition
cpdf_read_validator.h:14
CPDF_SyntaxParser
Definition
cpdf_syntax_parser.h:31
fxcrt::ByteString::operator==
bool operator==(const char *ptr) const
Definition
bytestring.cpp:256
fxcrt::ByteString::IsEmpty
bool IsEmpty() const
Definition
bytestring.h:119
fxcrt::ByteString::operator!=
bool operator!=(const char *ptr) const
Definition
bytestring.h:130
fxcrt::RetainPtr
Definition
retain_ptr.h:29
fxcrt::UnownedPtr
Definition
unowned_ptr.h:75
FX_FILESIZE
#define FX_FILESIZE
Definition
fx_types.h:19
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fpdfapi
parser
cpdf_cross_ref_avail.h
Generated on Thu Nov 14 2024 00:56:09 for Qt by
1.12.0