OLD | NEW |
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 _FPDF_OBJECTS_ | 7 #ifndef _FPDF_OBJECTS_ |
8 #define _FPDF_OBJECTS_ | 8 #define _FPDF_OBJECTS_ |
9 #ifndef _FXCRT_EXTENSION_ | 9 #ifndef _FXCRT_EXTENSION_ |
10 #include "../fxcrt/fx_ext.h" | 10 #include "../fxcrt/fx_ext.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 #define PDFOBJ_BOOLEAN 1 | 28 #define PDFOBJ_BOOLEAN 1 |
29 #define PDFOBJ_NUMBER 2 | 29 #define PDFOBJ_NUMBER 2 |
30 #define PDFOBJ_STRING 3 | 30 #define PDFOBJ_STRING 3 |
31 #define PDFOBJ_NAME 4 | 31 #define PDFOBJ_NAME 4 |
32 #define PDFOBJ_ARRAY 5 | 32 #define PDFOBJ_ARRAY 5 |
33 #define PDFOBJ_DICTIONARY 6 | 33 #define PDFOBJ_DICTIONARY 6 |
34 #define PDFOBJ_STREAM 7 | 34 #define PDFOBJ_STREAM 7 |
35 #define PDFOBJ_NULL 8 | 35 #define PDFOBJ_NULL 8 |
36 #define PDFOBJ_REFERENCE 9 | 36 #define PDFOBJ_REFERENCE 9 |
37 typedef IFX_FileStream* (*FPDF_LPFCloneStreamCallback)(CPDF_Stream *pStream, FX_
LPVOID pUserData); | 37 typedef IFX_FileStream* (*FPDF_LPFCloneStreamCallback)(CPDF_Stream *pStream, FX_
LPVOID pUserData); |
38 class CPDF_Object : public CFX_Object | 38 class CPDF_Object |
39 { | 39 { |
40 public: | 40 public: |
41 | 41 |
42 int GetType() const | 42 int GetType() const |
43 { | 43 { |
44 return m_Type; | 44 return m_Type; |
45 } | 45 } |
46 | 46 |
47 FX_DWORD GetObjNum() const | 47 FX_DWORD GetObjNum() const |
48 { | 48 { |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 FX_FILESIZE m_FileOffset; | 562 FX_FILESIZE m_FileOffset; |
563 | 563 |
564 CPDF_CryptoHandler* m_pCryptoHandler; | 564 CPDF_CryptoHandler* m_pCryptoHandler; |
565 | 565 |
566 void InitStream(CPDF_Dictionary* pDic
t); | 566 void InitStream(CPDF_Dictionary* pDic
t); |
567 friend class CPDF_Object; | 567 friend class CPDF_Object; |
568 friend class CPDF_StreamAcc; | 568 friend class CPDF_StreamAcc; |
569 friend class CPDF_AttachmentAcc; | 569 friend class CPDF_AttachmentAcc; |
570 }; | 570 }; |
571 class CPDF_StreamAcc : public CFX_Object | 571 class CPDF_StreamAcc |
572 { | 572 { |
573 public: | 573 public: |
574 | 574 |
575 CPDF_StreamAcc(); | 575 CPDF_StreamAcc(); |
576 | 576 |
577 ~CPDF_StreamAcc(); | 577 ~CPDF_StreamAcc(); |
578 | 578 |
579 void LoadAllData(const CPDF_Stream* p
Stream, FX_BOOL bRawAccess = FALSE, | 579 void LoadAllData(const CPDF_Stream* p
Stream, FX_BOOL bRawAccess = FALSE, |
580 FX_DWORD estimated_size = 0, FX_BOOL bIm
ageAcc = FALSE); | 580 FX_DWORD estimated_size = 0, FX_BOOL bIm
ageAcc = FALSE); |
581 | 581 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 CFX_ByteString m_ImageDecoder; | 615 CFX_ByteString m_ImageDecoder; |
616 | 616 |
617 CPDF_Dictionary* m_pImageParam; | 617 CPDF_Dictionary* m_pImageParam; |
618 | 618 |
619 const CPDF_Stream* m_pStream; | 619 const CPDF_Stream* m_pStream; |
620 | 620 |
621 FX_LPBYTE m_pSrcData; | 621 FX_LPBYTE m_pSrcData; |
622 }; | 622 }; |
623 CFX_DataFilter* FPDF_CreateFilter(FX_BSTR name, const CPDF_Dictionary* pParam, i
nt width = 0, int height = 0); | 623 CFX_DataFilter* FPDF_CreateFilter(FX_BSTR name, const CPDF_Dictionary* pParam, i
nt width = 0, int height = 0); |
624 #define FPDF_FILTER_BUFFER_SIZE 20480 | 624 #define FPDF_FILTER_BUFFER_SIZE 20480 |
625 class CPDF_StreamFilter : public CFX_Object | 625 class CPDF_StreamFilter |
626 { | 626 { |
627 public: | 627 public: |
628 | 628 |
629 ~CPDF_StreamFilter(); | 629 ~CPDF_StreamFilter(); |
630 | 630 |
631 FX_DWORD ReadBlock(FX_LPBYTE buffer, FX_DWORD size); | 631 FX_DWORD ReadBlock(FX_LPBYTE buffer, FX_DWORD size); |
632 | 632 |
633 FX_DWORD GetSrcPos() | 633 FX_DWORD GetSrcPos() |
634 { | 634 { |
635 return m_SrcOffset; | 635 return m_SrcOffset; |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 { | 698 { |
699 return m_RefObjNum == pOther->m_RefObjNum; | 699 return m_RefObjNum == pOther->m_RefObjNum; |
700 } | 700 } |
701 protected: | 701 protected: |
702 | 702 |
703 CPDF_IndirectObjects* m_pObjList; | 703 CPDF_IndirectObjects* m_pObjList; |
704 | 704 |
705 FX_DWORD m_RefObjNum; | 705 FX_DWORD m_RefObjNum; |
706 friend class CPDF_Object; | 706 friend class CPDF_Object; |
707 }; | 707 }; |
708 class CPDF_IndirectObjects : public CFX_Object | 708 class CPDF_IndirectObjects |
709 { | 709 { |
710 public: | 710 public: |
711 | 711 |
712 CPDF_IndirectObjects(IPDF_DocParser* pParser); | 712 CPDF_IndirectObjects(IPDF_DocParser* pParser); |
713 | 713 |
714 ~CPDF_IndirectObjects(); | 714 ~CPDF_IndirectObjects(); |
715 | 715 |
716 CPDF_Object* GetIndirectObject(FX_DWORD objnum, struc
t PARSE_CONTEXT* pContext = NULL); | 716 CPDF_Object* GetIndirectObject(FX_DWORD objnum, struc
t PARSE_CONTEXT* pContext = NULL); |
717 | 717 |
718 int GetIndirectType(FX_DWORD objnum)
; | 718 int GetIndirectType(FX_DWORD objnum)
; |
(...skipping 17 matching lines...) Expand all Loading... |
736 } | 736 } |
737 protected: | 737 protected: |
738 | 738 |
739 CFX_MapPtrToPtr m_IndirectObjs; | 739 CFX_MapPtrToPtr m_IndirectObjs; |
740 | 740 |
741 IPDF_DocParser* m_pParser; | 741 IPDF_DocParser* m_pParser; |
742 | 742 |
743 FX_DWORD m_LastObjNum; | 743 FX_DWORD m_LastObjNum; |
744 }; | 744 }; |
745 #endif | 745 #endif |
OLD | NEW |