9 #ifndef _CRYPTO_STREAMS_LIB_STDSTREAMADAPTER_H
10 #define _CRYPTO_STREAMS_LIB_STDSTREAMADAPTER_H
18 public std::enable_shared_from_this<StdStreamAdapter>{
25 virtual std::shared_future<int64_t>ReadAsync(uint8_t *pbBuffer,
28 std::launch launchType)
override;
29 virtual std::shared_future<int64_t>WriteAsync(
const uint8_t *cpbBuffer,
32 std::launch launchType)
34 virtual std::future<bool>FlushAsync(std::launch launchType)
override;
37 virtual int64_t Read(uint8_t *pbBuffer,
38 int64_t cbBuffer)
override;
39 virtual int64_t Write(
const uint8_t *cpbBuffer,
40 int64_t cbBuffer)
override;
41 virtual bool Flush()
override;
43 virtual SharedStream Clone()
override;
45 virtual void Seek(uint64_t u64Position)
override;
46 virtual bool CanRead()
const override;
47 virtual bool CanWrite()
const override;
48 virtual uint64_t Position()
override;
49 virtual uint64_t Size()
override;
50 virtual void Size(uint64_t u64Value)
override;
56 std::shared_ptr<std::mutex> m_locker;
57 std::shared_ptr<std::istream> m_iBackingStream;
58 std::shared_ptr<std::ostream> m_oBackingStream;
60 int64_t ReadInternal(uint8_t *pbBuffer,
62 int64_t WriteInternal(
const uint8_t *cpbBuffer,
67 #endif // _CRYPTO_STREAMS_LIB_STDSTREAMADAPTER_H
Definition: BlockBasedProtectedStream.cpp:13
Base interface for protected streams.
Definition: IStream.h:34
Definition: StdStreamAdapter.h:17