1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #ifndef ECMessageStreamImporterIStreamAdapter_INCLUDED
- #define ECMessageStreamImporterIStreamAdapter_INCLUDED
- #include <kopano/zcdefs.h>
- #include <kopano/memory.hpp>
- #include <kopano/ECUnknown.h>
- #include "WSMessageStreamImporter.h"
- class ECMessageStreamImporterIStreamAdapter _kc_final : public ECUnknown {
- public:
- static HRESULT Create(WSMessageStreamImporter *lpStreamImporter, IStream **lppStream);
-
- virtual HRESULT QueryInterface(REFIID refiid, void **lppInterface) _kc_override;
-
- virtual HRESULT Read(void *pv, ULONG cb, ULONG *pcbRead);
- virtual HRESULT Write(const void *pv, ULONG cb, ULONG *pcbWritten);
-
- virtual HRESULT Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition);
- virtual HRESULT SetSize(ULARGE_INTEGER libNewSize);
- virtual HRESULT CopyTo(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten);
- virtual HRESULT Commit(DWORD grfCommitFlags);
- virtual HRESULT Revert(void);
- virtual HRESULT LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
- virtual HRESULT UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
- virtual HRESULT Stat(STATSTG *pstatstg, DWORD grfStatFlag);
- virtual HRESULT Clone(IStream **ppstm);
- private:
- ECMessageStreamImporterIStreamAdapter(WSMessageStreamImporter *lpStreamImporter);
- ~ECMessageStreamImporterIStreamAdapter();
- class xSequentialStream _kc_final : public ISequentialStream {
- #include <kopano/xclsfrag/IUnknown.hpp>
- #include <kopano/xclsfrag/ISequentialStream.hpp>
- } m_xSequentialStream;
- class xStream _kc_final : public IStream {
- #include <kopano/xclsfrag/IUnknown.hpp>
- #include <kopano/xclsfrag/ISequentialStream.hpp>
- #include <kopano/xclsfrag/IStream.hpp>
- } m_xStream;
- WSMessageStreamImporterPtr m_ptrStreamImporter;
- WSMessageStreamSinkPtr m_ptrSink;
- };
- typedef KCHL::object_ptr<ECMessageStreamImporterIStreamAdapter> ECMessageStreamImporterIStreamAdapterPtr;
- #endif
|