Initial commit.
[pdfium.git] / core / src / fpdfapi / fpdf_edit / editint.h
1 // Copyright 2014 PDFium Authors. All rights reserved.\r
2 // Use of this source code is governed by a BSD-style license that can be\r
3 // found in the LICENSE file.\r
4  \r
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com\r
6 \r
7 #ifndef _FPDF_EDITINT_\r
8 #define _FPDF_EDITINT_\r
9 class CPDF_ObjectStream : public CFX_Object\r
10 {\r
11 public:\r
12     CPDF_ObjectStream();\r
13 \r
14     FX_BOOL                             Start();\r
15 \r
16     FX_INT32                    CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Object *pObj);\r
17     FX_INT32                    CompressIndirectObject(FX_DWORD dwObjNum, FX_LPCBYTE pBuffer, FX_DWORD dwSize);\r
18 \r
19     FX_FILESIZE                 End(CPDF_Creator* pCreator);\r
20 \r
21     CFX_DWordArray              m_ObjNumArray;\r
22 \r
23     CFX_ByteTextBuf             m_Buffer;\r
24     FX_DWORD                    m_dwObjNum;\r
25     FX_INT32                    m_index;\r
26 protected:\r
27 \r
28     CFX_DWordArray              m_OffsetArray;\r
29 };\r
30 class CPDF_XRefStream : public CFX_Object\r
31 {\r
32 public:\r
33 \r
34     CPDF_XRefStream();\r
35 \r
36     FX_BOOL                             Start();\r
37 \r
38     FX_INT32                    CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Object *pObj, CPDF_Creator *pCreator);\r
39 \r
40     FX_INT32                    CompressIndirectObject(FX_DWORD dwObjNum, FX_LPCBYTE pBuffer, FX_DWORD dwSize, CPDF_Creator *pCreator);\r
41 \r
42     FX_BOOL                             End(CPDF_Creator *pCreator, FX_BOOL bEOF = FALSE);\r
43     FX_BOOL                             AddObjectNumberToIndexArray(FX_DWORD objnum);\r
44     FX_BOOL                             EndXRefStream(CPDF_Creator* pCreator);\r
45 \r
46 \r
47     CFX_DWordArray              m_IndexArray;\r
48 \r
49     FX_FILESIZE                 m_PrevOffset;\r
50     FX_DWORD                    m_dwTempObjNum;\r
51 \r
52 protected:\r
53     FX_INT32                    EndObjectStream(CPDF_Creator *pCreator, FX_BOOL bEOF = TRUE);\r
54     FX_BOOL                             GenerateXRefStream(CPDF_Creator* pCreator, FX_BOOL bEOF);\r
55     FX_INT32                    m_iSeg;\r
56     CPDF_ObjectStream   m_ObjStream;\r
57     CFX_ByteTextBuf             m_Buffer;\r
58 };\r
59 #endif\r