diff options
author | George Hazan <ghazan@miranda.im> | 2023-04-14 23:33:11 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-04-14 23:33:11 +0300 |
commit | 123fa87f68c42b4f121ad315623a9fb5a39ab30c (patch) | |
tree | b4bb358ed586b4514a099e445577887bc5f117f7 /include | |
parent | e90d73641e9df9d3c181c9eddd85b59b8d81f8e6 (diff) |
all LogStreamInEvents implementations unified, old memory allocation schema dropped
Diffstat (limited to 'include')
-rw-r--r-- | include/m_srmm_int.h | 28 |
1 files changed, 27 insertions, 1 deletions
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;
|