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

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

Issue 1990003002: Move fgas_sax into individual files in fde. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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
« xfa/fde/xml/cfx_saxreader.cpp ('K') | « xfa/fxfa/app/xfa_checksum.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FXFA_INCLUDE_XFA_CHECKSUM_H_ 7 #ifndef XFA_FXFA_INCLUDE_XFA_CHECKSUM_H_
8 #define XFA_FXFA_INCLUDE_XFA_CHECKSUM_H_ 8 #define XFA_FXFA_INCLUDE_XFA_CHECKSUM_H_
9 9
10 #include "xfa/fgas/xml/fgas_sax.h" 10 #include "xfa/fde/xml/cfx_saxreader.h"
11 #include "xfa/fxfa/include/fxfa.h" 11 #include "xfa/fxfa/include/fxfa.h"
12 12
13 class CXFA_SAXReaderHandler; 13 class CXFA_SAXReaderHandler;
14 class CXFA_ChecksumContext; 14 class CXFA_ChecksumContext;
15 15
16 class CXFA_SAXContext { 16 class CXFA_SAXContext {
17 public: 17 public:
18 CXFA_SAXContext() : m_eNode(FX_SAXNODE_Unknown) {} 18 CXFA_SAXContext() : m_eNode(CFX_SaxNode::Unknown) {}
19 19
20 CFX_ByteTextBuf m_TextBuf; 20 CFX_ByteTextBuf m_TextBuf;
21 CFX_ByteString m_bsTagName; 21 CFX_ByteString m_bsTagName;
22 FX_SAXNODE m_eNode; 22 CFX_SaxNode m_eNode;
23 }; 23 };
24 24
25 class CXFA_SAXReaderHandler { 25 class CXFA_SAXReaderHandler {
26 public: 26 public:
27 CXFA_SAXReaderHandler(CXFA_ChecksumContext* pContext); 27 CXFA_SAXReaderHandler(CXFA_ChecksumContext* pContext);
28 ~CXFA_SAXReaderHandler(); 28 ~CXFA_SAXReaderHandler();
29 29
30 void* OnTagEnter(const CFX_ByteStringC& bsTagName, 30 void* OnTagEnter(const CFX_ByteStringC& bsTagName,
31 FX_SAXNODE eType, 31 CFX_SaxNode eType,
32 uint32_t dwStartPos); 32 uint32_t dwStartPos);
33 void OnTagAttribute(void* pTag, 33 void OnTagAttribute(void* pTag,
34 const CFX_ByteStringC& bsAttri, 34 const CFX_ByteStringC& bsAttri,
35 const CFX_ByteStringC& bsValue); 35 const CFX_ByteStringC& bsValue);
36 void OnTagBreak(void* pTag); 36 void OnTagBreak(void* pTag);
37 void OnTagData(void* pTag, 37 void OnTagData(void* pTag,
38 FX_SAXNODE eType, 38 CFX_SaxNode eType,
39 const CFX_ByteStringC& bsData, 39 const CFX_ByteStringC& bsData,
40 uint32_t dwStartPos); 40 uint32_t dwStartPos);
41 void OnTagClose(void* pTag, uint32_t dwEndPos); 41 void OnTagClose(void* pTag, uint32_t dwEndPos);
42 void OnTagEnd(void* pTag, 42 void OnTagEnd(void* pTag,
43 const CFX_ByteStringC& bsTagName, 43 const CFX_ByteStringC& bsTagName,
44 uint32_t dwEndPos); 44 uint32_t dwEndPos);
45 45
46 void OnTargetData(void* pTag, 46 void OnTargetData(void* pTag,
47 FX_SAXNODE eType, 47 CFX_SaxNode eType,
48 const CFX_ByteStringC& bsData, 48 const CFX_ByteStringC& bsData,
49 uint32_t dwStartPos); 49 uint32_t dwStartPos);
50 50
51 protected: 51 protected:
52 void UpdateChecksum(FX_BOOL bCheckSpace); 52 void UpdateChecksum(FX_BOOL bCheckSpace);
53 53
54 CXFA_ChecksumContext* m_pContext; 54 CXFA_ChecksumContext* m_pContext;
55 CXFA_SAXContext m_SAXContext; 55 CXFA_SAXContext m_SAXContext;
56 }; 56 };
57 57
(...skipping 11 matching lines...) Expand all
69 void GetChecksum(CFX_ByteString& bsChecksum); 69 void GetChecksum(CFX_ByteString& bsChecksum);
70 void Update(const CFX_ByteStringC& bsText); 70 void Update(const CFX_ByteStringC& bsText);
71 71
72 protected: 72 protected:
73 CFX_SAXReader* m_pSAXReader; 73 CFX_SAXReader* m_pSAXReader;
74 uint8_t* m_pByteContext; 74 uint8_t* m_pByteContext;
75 CFX_ByteString m_bsChecksum; 75 CFX_ByteString m_bsChecksum;
76 }; 76 };
77 77
78 #endif // XFA_FXFA_INCLUDE_XFA_CHECKSUM_H_ 78 #endif // XFA_FXFA_INCLUDE_XFA_CHECKSUM_H_
OLDNEW
« xfa/fde/xml/cfx_saxreader.cpp ('K') | « xfa/fxfa/app/xfa_checksum.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698