From 123fa87f68c42b4f121ad315623a9fb5a39ab30c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 14 Apr 2023 23:33:11 +0300 Subject: all LogStreamInEvents implementations unified, old memory allocation schema dropped --- include/m_srmm_int.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index dc1d2303fd..817558e664 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -148,6 +148,25 @@ EXTERN_C MIR_APP_DLL(void) UnregisterSrmmLog(HANDLE); ///////////////////////////////////////////////////////////////////////////////////////// // Standard built-in RTF logger class +struct RtfLogStreamBase +{ + int stage; + MCONTACT hContact; + MEVENT hDbEvent, hDbEventLast; + int eventsToInsert; + int isFirst, isEmpty; + + CMStringA buf; + DB::EventInfo *dbei; + class CRtfLogWindow *pLog; +}; + +#ifdef SRMM_OWN_STRUCTURES + struct RtfLogStreamData; +#else + struct RtfLogStreamData : public RtfLogStreamBase {}; +#endif + class MIR_APP_EXPORT CRtfLogWindow : public CSrmmLogWindow { protected: @@ -159,9 +178,16 @@ public: CRtfLogWindow(CMsgDialog &pDlg); ~CRtfLogWindow() override; - virtual void AppendUnicodeString(CMStringA &str, const wchar_t *pwszBuf) = 0; + virtual void AppendUnicodeString(CMStringA &str, const wchar_t *pwszBuf) = 0; + + virtual void CreateRtfHeader(RtfLogStreamData *dat) = 0; + virtual bool CreateRtfEvent(RtfLogStreamData *dat, DB::EventInfo &dbei) = 0; + virtual void CreateRtfTail(RtfLogStreamData *dat); + virtual INT_PTR WndProc(UINT msg, WPARAM wParam, LPARAM lParam); + void StreamRtfEvents(RtfLogStreamData *dat, bool bAppend); + //////////////////////////////////////////////////////////////////////////////////////// void Attach() override; void Detach() override; -- cgit v1.2.3