summaryrefslogtreecommitdiff
path: root/core/include/fpdfapi/fpdf_serial.h
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 12:19:10 -0700
commitb048f791a15f2da781a01eba5b09eb9d389f9c11 (patch)
tree6850a73c18bbc41eaf4b1fdc6b3c96646d45587b /core/include/fpdfapi/fpdf_serial.h
parentc8eeed31f217d99a706b0cbf5e4ce0bcc12beb64 (diff)
downloadpdfium-b048f791a15f2da781a01eba5b09eb9d389f9c11.tar.xz
clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163' | \ xargs ../../buildtools/mac/clang-format -i See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1265503005 .
Diffstat (limited to 'core/include/fpdfapi/fpdf_serial.h')
-rw-r--r--core/include/fpdfapi/fpdf_serial.h138
1 files changed, 71 insertions, 67 deletions
diff --git a/core/include/fpdfapi/fpdf_serial.h b/core/include/fpdfapi/fpdf_serial.h
index cccb3abf11..7197e0d7b0 100644
--- a/core/include/fpdfapi/fpdf_serial.h
+++ b/core/include/fpdfapi/fpdf_serial.h
@@ -12,99 +12,103 @@
class CPDF_ObjectStream;
class CPDF_XRefStream;
-CFX_ByteTextBuf& operator << (CFX_ByteTextBuf& buf, const CPDF_Object* pObj);
-#define FPDFCREATE_INCREMENTAL 1
-#define FPDFCREATE_NO_ORIGINAL 2
-#define FPDFCREATE_PROGRESSIVE 4
-#define FPDFCREATE_OBJECTSTREAM 8
-class CPDF_Creator
-{
-public:
+CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj);
+#define FPDFCREATE_INCREMENTAL 1
+#define FPDFCREATE_NO_ORIGINAL 2
+#define FPDFCREATE_PROGRESSIVE 4
+#define FPDFCREATE_OBJECTSTREAM 8
+class CPDF_Creator {
+ public:
+ CPDF_Creator(CPDF_Document* pDoc);
- CPDF_Creator(CPDF_Document* pDoc);
+ ~CPDF_Creator();
- ~CPDF_Creator();
+ void RemoveSecurity();
- void RemoveSecurity();
+ FX_BOOL Create(const FX_WCHAR* filename, FX_DWORD flags = 0);
- FX_BOOL Create(const FX_WCHAR* filename, FX_DWORD flags = 0);
+ FX_BOOL Create(const FX_CHAR* filename, FX_DWORD flags = 0);
- FX_BOOL Create(const FX_CHAR* filename, FX_DWORD flags = 0);
+ FX_BOOL Create(IFX_StreamWrite* pFile, FX_DWORD flags = 0);
- FX_BOOL Create(IFX_StreamWrite* pFile, FX_DWORD flags = 0);
+ int32_t Continue(IFX_Pause* pPause = NULL);
- int32_t Continue(IFX_Pause *pPause = NULL);
+ FX_BOOL SetFileVersion(int32_t fileVersion = 17);
- FX_BOOL SetFileVersion(int32_t fileVersion = 17);
-protected:
+ protected:
+ CPDF_Document* m_pDocument;
- CPDF_Document* m_pDocument;
+ CPDF_Parser* m_pParser;
- CPDF_Parser* m_pParser;
+ FX_BOOL m_bCompress;
- FX_BOOL m_bCompress;
+ FX_BOOL m_bSecurityChanged;
- FX_BOOL m_bSecurityChanged;
+ CPDF_Dictionary* m_pEncryptDict;
+ FX_DWORD m_dwEnryptObjNum;
+ FX_BOOL m_bEncryptCloned;
- CPDF_Dictionary* m_pEncryptDict;
- FX_DWORD m_dwEnryptObjNum;
- FX_BOOL m_bEncryptCloned;
+ FX_BOOL m_bStandardSecurity;
- FX_BOOL m_bStandardSecurity;
+ CPDF_CryptoHandler* m_pCryptoHandler;
+ FX_BOOL m_bNewCrypto;
- CPDF_CryptoHandler* m_pCryptoHandler;
- FX_BOOL m_bNewCrypto;
+ FX_BOOL m_bEncryptMetadata;
- FX_BOOL m_bEncryptMetadata;
+ CPDF_Object* m_pMetadata;
- CPDF_Object* m_pMetadata;
+ CPDF_XRefStream* m_pXRefStream;
- CPDF_XRefStream* m_pXRefStream;
+ int32_t m_ObjectStreamSize;
- int32_t m_ObjectStreamSize;
+ FX_DWORD m_dwLastObjNum;
+ FX_BOOL Create(FX_DWORD flags);
+ void ResetStandardSecurity();
+ void Clear();
+ int32_t WriteDoc_Stage1(IFX_Pause* pPause);
+ int32_t WriteDoc_Stage2(IFX_Pause* pPause);
+ int32_t WriteDoc_Stage3(IFX_Pause* pPause);
+ int32_t WriteDoc_Stage4(IFX_Pause* pPause);
- FX_DWORD m_dwLastObjNum;
- FX_BOOL Create(FX_DWORD flags);
- void ResetStandardSecurity();
- void Clear();
- int32_t WriteDoc_Stage1(IFX_Pause *pPause);
- int32_t WriteDoc_Stage2(IFX_Pause *pPause);
- int32_t WriteDoc_Stage3(IFX_Pause *pPause);
- int32_t WriteDoc_Stage4(IFX_Pause *pPause);
+ CFX_FileBufferArchive m_File;
- CFX_FileBufferArchive m_File;
+ FX_FILESIZE m_Offset;
+ void InitOldObjNumOffsets();
+ void InitNewObjNumOffsets();
+ void AppendNewObjNum(FX_DWORD objbum);
+ int32_t WriteOldIndirectObject(FX_DWORD objnum);
+ int32_t WriteOldObjs(IFX_Pause* pPause);
+ int32_t WriteNewObjs(FX_BOOL bIncremental, IFX_Pause* pPause);
+ int32_t WriteIndirectObj(const CPDF_Object* pObj);
+ int32_t WriteDirectObj(FX_DWORD objnum,
+ const CPDF_Object* pObj,
+ FX_BOOL bEncrypt = TRUE);
+ int32_t WriteIndirectObjectToStream(const CPDF_Object* pObj);
+ int32_t WriteIndirectObj(FX_DWORD objnum, const CPDF_Object* pObj);
+ int32_t WriteIndirectObjectToStream(FX_DWORD objnum,
+ const uint8_t* pBuffer,
+ FX_DWORD dwSize);
+ int32_t AppendObjectNumberToXRef(FX_DWORD objnum);
+ void InitID(FX_BOOL bDefault = TRUE);
+ int32_t WriteStream(const CPDF_Object* pStream,
+ FX_DWORD objnum,
+ CPDF_CryptoHandler* pCrypto);
- FX_FILESIZE m_Offset;
- void InitOldObjNumOffsets();
- void InitNewObjNumOffsets();
- void AppendNewObjNum(FX_DWORD objbum);
- int32_t WriteOldIndirectObject(FX_DWORD objnum);
- int32_t WriteOldObjs(IFX_Pause *pPause);
- int32_t WriteNewObjs(FX_BOOL bIncremental, IFX_Pause *pPause);
- int32_t WriteIndirectObj(const CPDF_Object* pObj);
- int32_t WriteDirectObj(FX_DWORD objnum, const CPDF_Object* pObj, FX_BOOL bEncrypt = TRUE);
- int32_t WriteIndirectObjectToStream(const CPDF_Object* pObj);
- int32_t WriteIndirectObj(FX_DWORD objnum, const CPDF_Object* pObj);
- int32_t WriteIndirectObjectToStream(FX_DWORD objnum, const uint8_t* pBuffer, FX_DWORD dwSize);
- int32_t AppendObjectNumberToXRef(FX_DWORD objnum);
- void InitID(FX_BOOL bDefault = TRUE);
- int32_t WriteStream(const CPDF_Object* pStream, FX_DWORD objnum, CPDF_CryptoHandler* pCrypto);
+ int32_t m_iStage;
+ FX_DWORD m_dwFlags;
+ FX_POSITION m_Pos;
+ FX_FILESIZE m_XrefStart;
- int32_t m_iStage;
- FX_DWORD m_dwFlags;
- FX_POSITION m_Pos;
- FX_FILESIZE m_XrefStart;
+ CFX_FileSizeListArray m_ObjectOffset;
- CFX_FileSizeListArray m_ObjectOffset;
+ CFX_DWordListArray m_ObjectSize;
+ CFX_DWordArray m_NewObjNumArray;
- CFX_DWordListArray m_ObjectSize;
- CFX_DWordArray m_NewObjNumArray;
+ CPDF_Array* m_pIDArray;
- CPDF_Array* m_pIDArray;
-
- int32_t m_FileVersion;
- friend class CPDF_ObjectStream;
- friend class CPDF_XRefStream;
+ int32_t m_FileVersion;
+ friend class CPDF_ObjectStream;
+ friend class CPDF_XRefStream;
};
#endif // CORE_INCLUDE_FPDFAPI_FPDF_SERIAL_H_