Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
cfx_seekablestreamproxy.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
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
CORE_FXCRT_CFX_SEEKABLESTREAMPROXY_H_
8
#
define
CORE_FXCRT_CFX_SEEKABLESTREAMPROXY_H_
9
10
#
include
<
stddef
.
h
>
11
#
include
<
stdint
.
h
>
12
13
#
include
"core/fxcrt/fx_codepage.h"
14
#
include
"core/fxcrt/fx_stream.h"
15
#
include
"core/fxcrt/fx_types.h"
16
#
include
"core/fxcrt/retain_ptr.h"
17
#
include
"core/fxcrt/span.h"
18
19
class
CFX_SeekableStreamProxy
final
:
public
Retainable
{
20
public
:
21
CONSTRUCT_VIA_MAKE_RETAIN
;
22
23
FX_FILESIZE
GetSize
()
const
;
// Estimate under worst possible expansion.
24
bool
IsEOF
()
const
;
25
26
// Returns number of wchar_t elements placed into `buffer`.
27
size_t
ReadBlock
(pdfium::span<
wchar_t
> buffer);
28
29
FX_CodePage
GetCodePage
()
const
{
return
m_wCodePage; }
30
void
SetCodePage
(
FX_CodePage
wCodePage);
31
32
private
:
33
enum
class
From {
34
Begin = 0,
35
Current,
36
};
37
38
explicit
CFX_SeekableStreamProxy(
39
const
RetainPtr
<
IFX_SeekableReadStream
>& stream);
40
~
CFX_SeekableStreamProxy
()
override
;
41
42
FX_FILESIZE
GetPosition()
const
;
43
void
Seek(From eSeek,
FX_FILESIZE
iOffset);
44
size_t ReadData(pdfium::span<uint8_t> buffer);
45
46
FX_CodePage
m_wCodePage =
FX_CodePage
::
kDefANSI
;
47
size_t m_wBOMLength = 0;
48
FX_FILESIZE
m_iPosition = 0;
49
RetainPtr
<
IFX_SeekableReadStream
>
const
m_pStream;
50
};
51
52
#
endif
// CORE_FXCRT_CFX_SEEKABLESTREAMPROXY_H_
BOM_UTF8
#define BOM_UTF8
Definition
cfx_seekablestreamproxy.cpp:91
BOM_UTF16_LE
#define BOM_UTF16_LE
Definition
cfx_seekablestreamproxy.cpp:94
BOM_UTF16_BE
#define BOM_UTF16_BE
Definition
cfx_seekablestreamproxy.cpp:93
BOM_UTF8_MASK
#define BOM_UTF8_MASK
Definition
cfx_seekablestreamproxy.cpp:90
BOM_UTF16_MASK
#define BOM_UTF16_MASK
Definition
cfx_seekablestreamproxy.cpp:92
DCHECK
#define DCHECK
Definition
check.h:33
CFX_SeekableStreamProxy::GetSize
FX_FILESIZE GetSize() const
Definition
cfx_seekablestreamproxy.cpp:129
CFX_SeekableStreamProxy::IsEOF
bool IsEOF() const
Definition
cfx_seekablestreamproxy.cpp:137
CFX_SeekableStreamProxy::ReadBlock
size_t ReadBlock(pdfium::span< wchar_t > buffer)
Definition
cfx_seekablestreamproxy.cpp:178
CFX_SeekableStreamProxy::SetCodePage
void SetCodePage(FX_CodePage wCodePage)
Definition
cfx_seekablestreamproxy.cpp:156
CFX_SeekableStreamProxy::GetCodePage
FX_CodePage GetCodePage() const
Definition
cfx_seekablestreamproxy.h:29
CFX_SeekableStreamProxy::~CFX_SeekableStreamProxy
~CFX_SeekableStreamProxy() override
IFX_SeekableReadStream
Definition
fx_stream.h:52
fxcrt::RetainPtr
Definition
retain_ptr.h:28
fxcrt::Retainable
Definition
retain_ptr.h:156
FX_GetACP
FX_CodePage FX_GetACP()
Definition
fx_codepage.cpp:218
FX_CodePage
FX_CodePage
Definition
fx_codepage.h:19
FX_CodePage::kUTF16BE
@ kUTF16BE
Definition
fx_codepage.h:44
FX_CodePage::kUTF8
@ kUTF8
Definition
fx_codepage.h:67
FX_CodePage::kDefANSI
@ kDefANSI
Definition
fx_codepage.h:20
FX_CodePage::kUTF16LE
@ kUTF16LE
Definition
fx_codepage.h:43
FX_SAFE_FILESIZE
pdfium::CheckedNumeric< FX_FILESIZE > FX_SAFE_FILESIZE
Definition
fx_safe_types.h:17
FX_FILESIZE
#define FX_FILESIZE
Definition
fx_types.h:19
fxcrt
Definition
stl_util.h:17
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
CONSTRUCT_VIA_MAKE_RETAIN
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition
retain_ptr.h:222
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcrt
cfx_seekablestreamproxy.h
Generated on
for Qt by
1.18.0