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 #include "../include/fsdk_define.h" | 7 #include "../include/fsdk_define.h" |
8 #include "../include/fpdf_dataavail.h" | 8 #include "../include/fpdf_dataavail.h" |
9 #include "../include/fpdfxfa/fpdfxfa_doc.h" | 9 #include "../include/fpdfxfa/fpdfxfa_doc.h" |
10 #include "../include/fpdfformfill.h" | 10 #include "../include/fpdfformfill.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 CFPDF_DataAvail() | 86 CFPDF_DataAvail() |
87 { | 87 { |
88 m_pDataAvail = NULL; | 88 m_pDataAvail = NULL; |
89 } | 89 } |
90 | 90 |
91 ~CFPDF_DataAvail() | 91 ~CFPDF_DataAvail() |
92 { | 92 { |
93 if (m_pDataAvail) delete m_pDataAvail; | 93 if (m_pDataAvail) delete m_pDataAvail; |
94 } | 94 } |
95 | 95 |
96 » CPDF_DataAvail*»» » m_pDataAvail; | 96 » IPDF_DataAvail*»» » m_pDataAvail; |
97 CFPDF_FileAvailWrap m_FileAvail; | 97 CFPDF_FileAvailWrap m_FileAvail; |
98 CFPDF_FileAccessWrap m_FileRead; | 98 CFPDF_FileAccessWrap m_FileRead; |
99 }; | 99 }; |
100 | 100 |
101 DLLEXPORT FPDF_AVAIL STDCALL FPDFAvail_Create(FX_FILEAVAIL* file_avail, FPDF_FIL
EACCESS* file) | 101 DLLEXPORT FPDF_AVAIL STDCALL FPDFAvail_Create(FX_FILEAVAIL* file_avail, FPDF_FIL
EACCESS* file) |
102 { | 102 { |
103 CFPDF_DataAvail* pAvail = FX_NEW CFPDF_DataAvail; | 103 CFPDF_DataAvail* pAvail = FX_NEW CFPDF_DataAvail; |
104 pAvail->m_FileAvail.Set(file_avail); | 104 pAvail->m_FileAvail.Set(file_avail); |
105 pAvail->m_FileRead.Set(file); | 105 pAvail->m_FileRead.Set(file); |
106 » pAvail->m_pDataAvail = FX_NEW CPDF_DataAvail(&pAvail->m_FileAvail, &pAva
il->m_FileRead); | 106 » pAvail->m_pDataAvail = IPDF_DataAvail::Create(&pAvail->m_FileAvail, &pAv
ail->m_FileRead); |
107 return pAvail; | 107 return pAvail; |
108 } | 108 } |
109 | 109 |
110 DLLEXPORT void STDCALL FPDFAvail_Destroy(FPDF_AVAIL avail) | 110 DLLEXPORT void STDCALL FPDFAvail_Destroy(FPDF_AVAIL avail) |
111 { | 111 { |
112 if (avail == NULL) return; | 112 if (avail == NULL) return; |
113 delete (CFPDF_DataAvail*)avail; | 113 delete (CFPDF_DataAvail*)avail; |
114 } | 114 } |
115 | 115 |
116 DLLEXPORT int STDCALL FPDFAvail_IsDocAvail(FPDF_AVAIL avail, FX_DOWNLOADHINTS* h
ints) | 116 DLLEXPORT int STDCALL FPDFAvail_IsDocAvail(FPDF_AVAIL avail, FX_DOWNLOADHINTS* h
ints) |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 CFPDF_DownloadHintsWrap hints_wrap(hints); | 165 CFPDF_DownloadHintsWrap hints_wrap(hints); |
166 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap)
; | 166 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsFormAvail(&hints_wrap)
; |
167 } | 167 } |
168 | 168 |
169 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) | 169 DLLEXPORT FPDF_BOOL STDCALL FPDFAvail_IsLinearized(FPDF_AVAIL avail) |
170 { | 170 { |
171 if (avail == NULL) return -1; | 171 if (avail == NULL) return -1; |
172 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF(); | 172 return ((CFPDF_DataAvail*)avail)->m_pDataAvail->IsLinearizedPDF(); |
173 | 173 |
174 } | 174 } |
OLD | NEW |