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

Unified Diff: core/include/fpdfapi/ipdf_data_avail.h

Issue 1805603002: core/include/fdpfapi cleanup Part I. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/include/fpdfapi/ipdf_crypto_handler.h ('k') | core/include/fpdfapi/ipdf_security_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/ipdf_data_avail.h
diff --git a/core/include/fpdfapi/ipdf_data_avail.h b/core/include/fpdfapi/ipdf_data_avail.h
deleted file mode 100644
index e2b22eaf2a757019700d1ad7221aca1040b8cf40..0000000000000000000000000000000000000000
--- a/core/include/fpdfapi/ipdf_data_avail.h
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef CORE_INCLUDE_FPDFAPI_IPDF_DATA_AVAIL_H_
-#define CORE_INCLUDE_FPDFAPI_IPDF_DATA_AVAIL_H_
-
-#include "core/include/fxcrt/fx_stream.h"
-#include "core/include/fxcrt/fx_system.h"
-
-class CPDF_Document;
-class CPDF_Object;
-
-class IPDF_DataAvail {
- public:
- // Must match PDF_DATA_* definitions in public/fpdf_dataavail.h, but cannot
- // #include that header. fpdfsdk/fpdf_dataavail.cpp has static_asserts
- // to make sure the two sets of values match.
- enum DocAvailStatus {
- DataError = -1, // PDF_DATA_ERROR
- DataNotAvailable = 0, // PDF_DATA_NOTAVAIL
- DataAvailable = 1, // PDF_DATA_AVAIL
- };
-
- // Must match PDF_*LINEAR* definitions in public/fpdf_dataavail.h, but cannot
- // #include that header. fpdfsdk/fpdf_dataavail.cpp has static_asserts
- // to make sure the two sets of values match.
- enum DocLinearizationStatus {
- LinearizationUnknown = -1, // PDF_LINEARIZATION_UNKNOWN
- NotLinearized = 0, // PDF_NOT_LINEARIZED
- Linearized = 1, // PDF_LINEARIZED
- };
-
- // Must match PDF_FORM_* definitions in public/fpdf_dataavail.h, but cannot
- // #include that header. fpdfsdk/fpdf_dataavail.cpp has static_asserts
- // to make sure the two sets of values match.
- enum DocFormStatus {
- FormError = -1, // PDF_FORM_ERROR
- FormNotAvailable = 0, // PDF_FORM_NOTAVAIL
- FormAvailable = 1, // PDF_FORM_AVAIL
- FormNotExist = 2, // PDF_FORM_NOTEXIST
- };
-
- class FileAvail {
- public:
- virtual ~FileAvail();
- virtual FX_BOOL IsDataAvail(FX_FILESIZE offset, FX_DWORD size) = 0;
- };
-
- class DownloadHints {
- public:
- virtual ~DownloadHints();
- virtual void AddSegment(FX_FILESIZE offset, FX_DWORD size) = 0;
- };
-
- static IPDF_DataAvail* Create(FileAvail* pFileAvail, IFX_FileRead* pFileRead);
- virtual ~IPDF_DataAvail();
-
- FileAvail* GetFileAvail() const { return m_pFileAvail; }
- IFX_FileRead* GetFileRead() const { return m_pFileRead; }
-
- virtual DocAvailStatus IsDocAvail(DownloadHints* pHints) = 0;
- virtual void SetDocument(CPDF_Document* pDoc) = 0;
- virtual DocAvailStatus IsPageAvail(int iPage, DownloadHints* pHints) = 0;
- virtual FX_BOOL IsLinearized() = 0;
- virtual DocFormStatus IsFormAvail(DownloadHints* pHints) = 0;
- virtual DocLinearizationStatus IsLinearizedPDF() = 0;
- virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos,
- FX_DWORD* pSize) = 0;
-
- protected:
- IPDF_DataAvail(FileAvail* pFileAvail, IFX_FileRead* pFileRead);
-
- FileAvail* m_pFileAvail;
- IFX_FileRead* m_pFileRead;
-};
-
-#endif // CORE_INCLUDE_FPDFAPI_IPDF_DATA_AVAIL_H_
« no previous file with comments | « core/include/fpdfapi/ipdf_crypto_handler.h ('k') | core/include/fpdfapi/ipdf_security_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698