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

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

Issue 1783933003: Split CPDF_Stream/CPDF_StreamAcc into separate files (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: 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/cpdf_stream.h ('k') | core/include/fpdfapi/fpdf_resource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/cpdf_stream_acc.h
diff --git a/core/include/fpdfapi/cpdf_stream_acc.h b/core/include/fpdfapi/cpdf_stream_acc.h
new file mode 100644
index 0000000000000000000000000000000000000000..77ad272de3f1d3307f303c1ef601b2cb2abcd381
--- /dev/null
+++ b/core/include/fpdfapi/cpdf_stream_acc.h
@@ -0,0 +1,46 @@
+// 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_CPDF_STREAM_ACC_H_
+#define CORE_INCLUDE_FPDFAPI_CPDF_STREAM_ACC_H_
+
+#include "core/include/fpdfapi/cpdf_stream.h"
+#include "core/include/fpdfapi/cpdf_dictionary.h"
+#include "core/include/fxcrt/fx_string.h"
+#include "core/include/fxcrt/fx_system.h"
+
+class CPDF_StreamAcc {
+ public:
+ CPDF_StreamAcc();
+ ~CPDF_StreamAcc();
+
+ void LoadAllData(const CPDF_Stream* pStream,
+ FX_BOOL bRawAccess = FALSE,
+ FX_DWORD estimated_size = 0,
+ FX_BOOL bImageAcc = FALSE);
+
+ const CPDF_Stream* GetStream() const { return m_pStream; }
+ CPDF_Dictionary* GetDict() const {
+ return m_pStream ? m_pStream->GetDict() : nullptr;
+ }
+
+ const uint8_t* GetData() const;
+ FX_DWORD GetSize() const;
+ const CFX_ByteString& GetImageDecoder() const { return m_ImageDecoder; }
+ const CPDF_Dictionary* GetImageParam() const { return m_pImageParam; }
+ uint8_t* DetachData();
+
+ protected:
+ uint8_t* m_pData;
+ FX_DWORD m_dwSize;
+ FX_BOOL m_bNewBuf;
+ CFX_ByteString m_ImageDecoder;
+ CPDF_Dictionary* m_pImageParam;
+ const CPDF_Stream* m_pStream;
+ uint8_t* m_pSrcData;
+};
+
+#endif // CORE_INCLUDE_FPDFAPI_CPDF_STREAM_ACC_H_
« no previous file with comments | « core/include/fpdfapi/cpdf_stream.h ('k') | core/include/fpdfapi/fpdf_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698