123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #ifndef WSSerializedMessage_INCLUDED
- #define WSSerializedMessage_INCLUDED
- #include <kopano/zcdefs.h>
- #include <kopano/ECUnknown.h>
- #include <kopano/mapi_ptr.h>
- #include <kopano/memory.hpp>
- #include "soapStub.h"
- #include <string>
- class WSSerializedMessage _kc_final : public ECUnknown {
- public:
- WSSerializedMessage(soap *lpSoap, const std::string strStreamId, ULONG cbProps, LPSPropValue lpProps);
- HRESULT GetProps(ULONG *lpcbProps, LPSPropValue *lppProps);
- HRESULT CopyData(LPSTREAM lpDestStream);
- HRESULT DiscardData();
- private:
- HRESULT DoCopyData(LPSTREAM lpDestStream);
- static void* StaticMTOMWriteOpen(struct soap *soap, void *handle, const char *id, const char *type, const char *description, enum soap_mime_encoding encoding);
- static int StaticMTOMWrite(struct soap *soap, void *handle, const char *buf, size_t len);
- static void StaticMTOMWriteClose(struct soap *soap, void *handle);
- void* MTOMWriteOpen(struct soap *soap, void *handle, const char *id, const char *type, const char *description, enum soap_mime_encoding encoding);
- int MTOMWrite(struct soap *soap, void *handle, const char *buf, size_t len);
- void MTOMWriteClose(struct soap *soap, void *handle);
- soap *m_lpSoap;
- const std::string m_strStreamId;
- ULONG m_cbProps;
- LPSPropValue m_lpProps;
- bool m_bUsed = false;
- StreamPtr m_ptrDestStream;
- HRESULT m_hr = hrSuccess;
- };
- typedef KCHL::object_ptr<WSSerializedMessage> WSSerializedMessagePtr;
- #endif
|