summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_crtfileaccess.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-04-20 13:13:04 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-04-20 17:49:41 +0000
commitcfb1944e245e20fe2ce0e94feebc06526db34fa1 (patch)
tree6728e3ebca9e53dc97a18e1f5f37c3d53d9bb404 /core/fxcrt/cfx_crtfileaccess.h
parent6864bf8c4fbcac0833a77d044f17f4100d504f2a (diff)
downloadpdfium-cfb1944e245e20fe2ce0e94feebc06526db34fa1.tar.xz
Cleanup the fx_extension code.
This CL cleans up the fx_extension file. The stream code was moved to fx_stream. IFX_FileAccess was removed and CFX_CRTFileAccess split to its own file. Code shuffled from header to cpp file. Change-Id: I700fdfcc9797cf4e8050cd9ba010ad8854feefbf Reviewed-on: https://pdfium-review.googlesource.com/4371 Reviewed-by: Nicolás Peña <npm@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_crtfileaccess.h')
-rw-r--r--core/fxcrt/cfx_crtfileaccess.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/core/fxcrt/cfx_crtfileaccess.h b/core/fxcrt/cfx_crtfileaccess.h
new file mode 100644
index 0000000000..cb2a034f20
--- /dev/null
+++ b/core/fxcrt/cfx_crtfileaccess.h
@@ -0,0 +1,28 @@
+// Copyright 2017 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_FXCRT_CFX_CRTFILEACCESS_H_
+#define CORE_FXCRT_CFX_CRTFILEACCESS_H_
+
+#include "core/fxcrt/cfx_retain_ptr.h"
+#include "core/fxcrt/fx_stream.h"
+#include "core/fxcrt/fx_string.h"
+
+class CFX_CRTFileAccess : public CFX_Retainable {
+ public:
+ template <typename T, typename... Args>
+ friend CFX_RetainPtr<T> pdfium::MakeRetain(Args&&... args);
+
+ CFX_RetainPtr<IFX_SeekableStream> CreateFileStream(uint32_t dwModes);
+
+ private:
+ explicit CFX_CRTFileAccess(const CFX_WideStringC& wsPath);
+ ~CFX_CRTFileAccess() override;
+
+ CFX_WideString m_path;
+};
+
+#endif // CORE_FXCRT_CFX_CRTFILEACCESS_H_