Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: xfa/fxfa/app/xfa_checksum.h

Issue 1846993002: Remove IXFA_* interfaces. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fxfa/app/xfa_checksum.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 PDFium Authors. All rights reserved.
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 XFA_FXFA_APP_XFA_CHECKSUM_H_
8 #define XFA_FXFA_APP_XFA_CHECKSUM_H_
9
10 #include "xfa/fgas/xml/fgas_sax.h"
11 #include "xfa/include/fxfa/fxfa.h"
12
13 class CXFA_SAXReaderHandler;
14 class CXFA_ChecksumContext;
15
16 class CXFA_SAXContext {
17 public:
18 CXFA_SAXContext() : m_eNode(FX_SAXNODE_Unknown) {}
19 CFX_ByteTextBuf m_TextBuf;
20 CFX_ByteString m_bsTagName;
21 FX_SAXNODE m_eNode;
22 };
23 class CXFA_SAXReaderHandler : public IFX_SAXReaderHandler {
24 public:
25 CXFA_SAXReaderHandler(CXFA_ChecksumContext* pContext);
26 virtual ~CXFA_SAXReaderHandler();
27 virtual void* OnTagEnter(const CFX_ByteStringC& bsTagName,
28 FX_SAXNODE eType,
29 uint32_t dwStartPos);
30 virtual void OnTagAttribute(void* pTag,
31 const CFX_ByteStringC& bsAttri,
32 const CFX_ByteStringC& bsValue);
33 virtual void OnTagBreak(void* pTag);
34 virtual void OnTagData(void* pTag,
35 FX_SAXNODE eType,
36 const CFX_ByteStringC& bsData,
37 uint32_t dwStartPos);
38 virtual void OnTagClose(void* pTag, uint32_t dwEndPos);
39 virtual void OnTagEnd(void* pTag,
40 const CFX_ByteStringC& bsTagName,
41 uint32_t dwEndPos);
42
43 virtual void OnTargetData(void* pTag,
44 FX_SAXNODE eType,
45 const CFX_ByteStringC& bsData,
46 uint32_t dwStartPos);
47
48 protected:
49 void UpdateChecksum(FX_BOOL bCheckSpace);
50 CXFA_ChecksumContext* m_pContext;
51 CXFA_SAXContext m_SAXContext;
52 };
53
54 class CXFA_ChecksumContext : public IXFA_ChecksumContext {
55 public:
56 CXFA_ChecksumContext();
57 virtual ~CXFA_ChecksumContext();
58 virtual void Release() { delete this; }
59 virtual FX_BOOL StartChecksum();
60 virtual FX_BOOL UpdateChecksum(IFX_FileRead* pSrcFile,
61 FX_FILESIZE offset = 0,
62 size_t size = 0);
63 virtual void FinishChecksum();
64 virtual void GetChecksum(CFX_ByteString& bsChecksum);
65 void Update(const CFX_ByteStringC& bsText);
66
67 protected:
68 IFX_SAXReader* m_pSAXReader;
69 uint8_t* m_pByteContext;
70 CFX_ByteString m_bsChecksum;
71 };
72
73 #endif // XFA_FXFA_APP_XFA_CHECKSUM_H_
OLDNEW
« no previous file with comments | « xfa/fwl/basewidget/fwl_editimp.cpp ('k') | xfa/fxfa/app/xfa_checksum.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698