diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-09 18:21:23 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-09 18:22:12 +0300 |
commit | 5ef0585dbd3bfbc09093bc8f24f41e4ae2349c59 (patch) | |
tree | b76db3dc8173189591d65cc9a1a4e181331ca8f8 /include | |
parent | 6ef65121fed3c38c467238a08bf96bf98a23d7d8 (diff) |
SRMM: better support for group chats in database
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_database.inc | 1 | ||||
-rw-r--r-- | include/delphi/m_protosvc.inc | 1 | ||||
-rw-r--r-- | include/m_database.h | 3 | ||||
-rw-r--r-- | include/m_protosvc.h | 13 | ||||
-rw-r--r-- | include/m_srmm_int.h | 3 |
5 files changed, 14 insertions, 7 deletions
diff --git a/include/delphi/m_database.inc b/include/delphi/m_database.inc index 892f5740d0..43691bc9c6 100644 --- a/include/delphi/m_database.inc +++ b/include/delphi/m_database.inc @@ -46,6 +46,7 @@ type cbBlob : dword; // size in bytes of pBlob^
pBlob : PByte; // pointer to buffer containing the module defined event data
szId : PAnsiChar; // server id of event
+ szUserId : PAnsiChar; // user id of event
end;
(******************************************************************************
diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc index 69d9435a4e..2d60e9327f 100644 --- a/include/delphi/m_protosvc.inc +++ b/include/delphi/m_protosvc.inc @@ -182,6 +182,7 @@ type timestamp : dword;
szMessage : TChar;
lParam : LPARAM;
+ szUserId : PAnsiChar; // user id of event
end;
const
diff --git a/include/m_database.h b/include/m_database.h index ad0e16e60b..0a31bc68fc 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -188,7 +188,8 @@ struct DBEVENTINFO uint16_t eventType; // module-defined event type field
int cbBlob; // size of pBlob in bytes
uint8_t *pBlob; // pointer to buffer containing module-defined event data
- const char *szId; // server id
+ const char *szId; // server message id
+ const char *szUserId; // user id (for group chats only)
bool __forceinline markedRead() const {
return (flags & (DBEF_SENT | DBEF_READ)) != 0;
diff --git a/include/m_protosvc.h b/include/m_protosvc.h index e6f1df3ab2..031622a3a5 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -735,12 +735,13 @@ struct PROTOFILERESUME struct PROTORECVEVENT
{
- uint32_t flags; // combination of PREF_*
- uint32_t timestamp; // unix time
- char* szMessage; // message body in utf8
- LPARAM lParam; // extra space for the network level protocol module
- const char* szMsgId; // server message id, optional, should be NULL otherwise
- // ignored for protocols without PF4_SERVERMSGID in GetCaps()
+ uint32_t flags; // combination of PREF_*
+ uint32_t timestamp; // unix time
+ char* szMessage; // message body in utf8
+ LPARAM lParam; // extra space for the network level protocol module
+ const char* szMsgId; // server message id, optional, should be NULL otherwise
+ // ignored for protocols without PF4_SERVERMSGID in GetCaps()
+ const char *szUserId; // user id, for group chats stored in the database
};
///////////////////////////////////////////////////////////////////////////////
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index c9ac8c14b7..876c31dbaf 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -204,6 +204,7 @@ protected: bool ProcessHotkeys(int key, bool bShift, bool bCtrl, bool bAlt);
void RefreshButtonStatus(void);
void RunUserMenu(HWND hwndOwner, struct USERINFO *ui, const POINT &pt);
+ void UpdateChatLog(void);
protected:
CSrmmLogWindow *m_pLog = nullptr;
@@ -233,6 +234,7 @@ protected: public:
MCONTACT m_hContact;
+ MEVENT m_hDbEventFirst, m_hDbEventLast;
int m_iLogFilterFlags;
bool m_bFilterEnabled, m_bNicklistEnabled;
bool m_bFGSet, m_bBGSet;
@@ -246,6 +248,7 @@ public: virtual void AddLog();
virtual void CloseTab() {}
+ virtual bool GetFirstEvent() PURE;
virtual bool IsActive() const PURE;
virtual void LoadSettings() PURE;
virtual void SetStatusText(const wchar_t *, HICON) {}
|