From 4d8882c9c68f74ae41364995720517e7dff14d33 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 30 Oct 2018 15:44:09 +0300 Subject: code cleaning --- plugins/TabSRMM/src/contactcache.h | 48 +++++++++++++++++++------------------- plugins/TabSRMM/src/msgs.h | 7 +++--- 2 files changed, 27 insertions(+), 28 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h index 7f68be3e62..a538ab5579 100644 --- a/plugins/TabSRMM/src/contactcache.h +++ b/plugins/TabSRMM/src/contactcache.h @@ -57,8 +57,31 @@ struct TSessionStats : public MZeroedObject BOOL bWritten; }; -struct CContactCache : public MZeroedObject +class CContactCache : public MZeroedObject { + MCONTACT m_hContact, m_hSub; + int m_iOldStatus = ID_STATUS_OFFLINE, m_iMetaStatus; + char *m_szMetaProto; + wchar_t *m_szAccount; + wchar_t m_szNick[80], m_szUIN[80]; + wchar_t *m_szStatusMsg, *m_xStatusMsg, *m_ListeningInfo; + BYTE m_xStatus; + DWORD m_idleTS; + bool m_isMeta; + bool m_isValid; + int m_nMax; + int m_iHistoryCurrent, m_iHistoryTop, m_iHistorySize; + + CSrmmWindow *m_dat; + TSessionStats *m_stats; + TInputHistory *m_history; + DBCachedContact *cc; + + void initPhaseTwo(); + void allocHistory(); + void releaseAlloced(); + +public: CContactCache(MCONTACT hContact); ~CContactCache() { @@ -119,29 +142,6 @@ struct CContactCache : public MZeroedObject static CContactCache* getContactCache(MCONTACT hContact); static int cacheUpdateMetaChanged(WPARAM wParam, LPARAM lParam); - -private: - void initPhaseTwo(); - void allocHistory(); - void releaseAlloced(); - - MCONTACT m_hContact, m_hSub; - int m_iOldStatus = ID_STATUS_OFFLINE, m_iMetaStatus; - char *m_szMetaProto; - wchar_t *m_szAccount; - wchar_t m_szNick[80], m_szUIN[80]; - wchar_t *m_szStatusMsg, *m_xStatusMsg, *m_ListeningInfo; - BYTE m_xStatus; - DWORD m_idleTS; - bool m_isMeta; - bool m_isValid; - int m_nMax; - int m_iHistoryCurrent, m_iHistoryTop, m_iHistorySize; - - CSrmmWindow *m_dat; - TSessionStats *m_stats; - TInputHistory *m_history; - DBCachedContact *cc; }; #endif /* __CONTACTCACHE_H */ diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 72bfdc0eb4..88a4f7c7b4 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -130,14 +130,13 @@ struct TitleBtn { #define NR_BUTTONBARICONS 37//MaD: 29 #define NR_SIDEBARICONS 2 -class CTaskbarInteract; +class CContactCache; class CMenuBar; -class CSideBar; class CProxyWindow; +class CSideBar; +class CTaskbarInteract; class CThumbBase; -struct CContactCache; - #define STICK_ICON_MSG 10 struct TLogTheme -- cgit v1.2.3