summaryrefslogtreecommitdiff
path: root/xfa/fgas/crt/fgas_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fgas/crt/fgas_stream.h')
-rw-r--r--xfa/fgas/crt/fgas_stream.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/xfa/fgas/crt/fgas_stream.h b/xfa/fgas/crt/fgas_stream.h
index b6552d9825..79fda58d2a 100644
--- a/xfa/fgas/crt/fgas_stream.h
+++ b/xfa/fgas/crt/fgas_stream.h
@@ -27,27 +27,23 @@ enum FX_STREAMSEEK {
FX_STREAMSEEK_End,
};
-class IFGAS_Stream {
+class IFGAS_Stream : public CFX_Retainable {
public:
- static IFGAS_Stream* CreateStream(
+ static CFX_RetainPtr<IFGAS_Stream> CreateStream(
const CFX_RetainPtr<IFX_SeekableReadStream>& pFileRead,
uint32_t dwAccess);
- static IFGAS_Stream* CreateStream(
+ static CFX_RetainPtr<IFGAS_Stream> CreateStream(
const CFX_RetainPtr<IFX_SeekableWriteStream>& pFileWrite,
uint32_t dwAccess);
- static IFGAS_Stream* CreateStream(uint8_t* pData,
- int32_t length,
- uint32_t dwAccess);
- static IFGAS_Stream* CreateTextStream(IFGAS_Stream* pBaseStream,
- bool bDeleteOnRelease);
+ static CFX_RetainPtr<IFGAS_Stream> CreateStream(uint8_t* pData,
+ int32_t length,
+ uint32_t dwAccess);
+ static CFX_RetainPtr<IFGAS_Stream> CreateTextStream(
+ const CFX_RetainPtr<IFGAS_Stream>& pBaseStream);
- virtual ~IFGAS_Stream() {}
- virtual void Release() = 0;
- virtual IFGAS_Stream* Retain() = 0;
-
- virtual IFGAS_Stream* CreateSharedStream(uint32_t dwAccess,
- int32_t iOffset,
- int32_t iLength) = 0;
+ virtual CFX_RetainPtr<IFGAS_Stream> CreateSharedStream(uint32_t dwAccess,
+ int32_t iOffset,
+ int32_t iLength) = 0;
virtual uint32_t GetAccessModes() const = 0;
virtual int32_t GetLength() const = 0;