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
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
18
class
CFX_SeekableStreamProxy
final
:
public
Retainable
{
19
public
:
20
CONSTRUCT_VIA_MAKE_RETAIN
;
21
22
// Unlike IFX_SeekableStreamProxy, buffers and sizes are always in terms
23
// of the number of wchar_t elementss, not bytes.
24
FX_FILESIZE
GetSize
();
// Estimate under worst possible expansion.
25
bool
IsEOF
();
26
size_t
ReadBlock
(
wchar_t
* pStr, size_t size);
27
28
FX_CodePage
GetCodePage
()
const
{
return
m_wCodePage; }
29
void
SetCodePage
(
FX_CodePage
wCodePage);
30
31
private
:
32
enum
class
From {
33
Begin = 0,
34
Current,
35
};
36
37
explicit
CFX_SeekableStreamProxy(
38
const
RetainPtr
<
IFX_SeekableReadStream
>& stream);
39
~
CFX_SeekableStreamProxy
()
override
;
40
41
FX_FILESIZE
GetPosition();
42
void
Seek(From eSeek,
FX_FILESIZE
iOffset);
43
size_t ReadData(uint8_t* pBuffer, size_t iBufferSize);
44
45
FX_CodePage
m_wCodePage =
FX_CodePage
::
kDefANSI
;
46
size_t m_wBOMLength = 0;
47
FX_FILESIZE
m_iPosition = 0;
48
RetainPtr
<
IFX_SeekableReadStream
>
const
m_pStream;
49
};
50
51
#
endif
// CORE_FXCRT_CFX_SEEKABLESTREAMPROXY_H_
BOM_UTF8
#define BOM_UTF8
Definition
cfx_seekablestreamproxy.cpp:96
BOM_UTF16_LE
#define BOM_UTF16_LE
Definition
cfx_seekablestreamproxy.cpp:99
BOM_UTF16_BE
#define BOM_UTF16_BE
Definition
cfx_seekablestreamproxy.cpp:98
BOM_UTF8_MASK
#define BOM_UTF8_MASK
Definition
cfx_seekablestreamproxy.cpp:95
BOM_UTF16_MASK
#define BOM_UTF16_MASK
Definition
cfx_seekablestreamproxy.cpp:97
CFX_SeekableStreamProxy::IsEOF
bool IsEOF()
Definition
cfx_seekablestreamproxy.cpp:142
CFX_SeekableStreamProxy::ReadBlock
size_t ReadBlock(wchar_t *pStr, size_t size)
Definition
cfx_seekablestreamproxy.cpp:185
CFX_SeekableStreamProxy::GetSize
FX_FILESIZE GetSize()
Definition
cfx_seekablestreamproxy.cpp:134
CFX_SeekableStreamProxy::SetCodePage
void SetCodePage(FX_CodePage wCodePage)
Definition
cfx_seekablestreamproxy.cpp:161
CFX_SeekableStreamProxy::GetCodePage
FX_CodePage GetCodePage() const
Definition
cfx_seekablestreamproxy.h:28
CFX_SeekableStreamProxy::~CFX_SeekableStreamProxy
~CFX_SeekableStreamProxy() override
IFX_SeekableReadStream
Definition
fx_stream.h:57
fxcrt::RetainPtr
Definition
retain_ptr.h:29
fxcrt::Retainable
Definition
retain_ptr.h:158
FX_GetACP
FX_CodePage FX_GetACP()
Definition
fx_codepage.cpp:218
FX_CodePage
FX_CodePage
Definition
fx_codepage.h:18
FX_CodePage::kUTF16BE
@ kUTF16BE
FX_CodePage::kUTF8
@ kUTF8
FX_CodePage::kDefANSI
@ kDefANSI
FX_CodePage::kUTF16LE
@ kUTF16LE
FX_FILESIZE
#define FX_FILESIZE
Definition
fx_types.h:19
std
Definition
qfloat16.h:492
CONSTRUCT_VIA_MAKE_RETAIN
#define CONSTRUCT_VIA_MAKE_RETAIN
Definition
retain_ptr.h:224
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcrt
cfx_seekablestreamproxy.h
Generated on Sat Sep 21 2024 00:55:04 for Qt by
1.12.0