diff options
author | George Hazan <ghazan@miranda.im> | 2018-10-30 13:23:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-10-30 13:23:54 +0300 |
commit | f307c5760e92529bf9653c528e624070b0cca2cf (patch) | |
tree | 6e1c21826353ac4a9ce0e4ce0036dd4baa92dcec /plugins/TabSRMM/src/mim.h | |
parent | 767c5e08a6e63cba75da64d2d344339ea72d70bd (diff) |
tabSRMM:
- obsolete M.GetDword & M.GetByte calls removed;
- useless m_isFavorite & m_isRecent moved from CContactCache to CMimAPI;
- other code cleaning
Diffstat (limited to 'plugins/TabSRMM/src/mim.h')
-rw-r--r-- | plugins/TabSRMM/src/mim.h | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h index 0aea60b9e5..ca8f45abb8 100644 --- a/plugins/TabSRMM/src/mim.h +++ b/plugins/TabSRMM/src/mim.h @@ -97,43 +97,42 @@ public: * database functions
*/
- static DWORD __forceinline GetDword(const char *szModule, const char *szSetting, DWORD uDefault)
- {
- return db_get_dw(0, szModule, szSetting, uDefault);
- }
static DWORD __forceinline GetDword(const char *szSetting, DWORD uDefault)
- {
- return db_get_dw(0, SRMSGMOD_T, szSetting, uDefault);
+ { return db_get_dw(0, SRMSGMOD_T, szSetting, uDefault);
}
static DWORD __forceinline GetDword(const MCONTACT hContact, const char *szSetting, DWORD uDefault)
- {
- return db_get_dw(hContact, SRMSGMOD_T, szSetting, uDefault);
+ { return db_get_dw(hContact, SRMSGMOD_T, szSetting, uDefault);
}
static int __forceinline GetByte(const char *szSetting, int uDefault)
- {
- return db_get_b(0, SRMSGMOD_T, szSetting, uDefault);
- }
- static int __forceinline GetByte(const char *szModule, const char *szSetting, int uDefault)
- {
- return db_get_b(0, szModule, szSetting, uDefault);
+ { return db_get_b(0, SRMSGMOD_T, szSetting, uDefault);
}
static int __forceinline GetByte(const MCONTACT hContact, const char *szSetting, int uDefault)
- {
- return db_get_b(hContact, SRMSGMOD_T, szSetting, uDefault);
+ { return db_get_b(hContact, SRMSGMOD_T, szSetting, uDefault);
}
static bool __forceinline GetBool(const char *szSetting, bool bDefault)
- {
- return db_get_b(0, SRMSGMOD_T, szSetting, bDefault) != 0;
+ { return db_get_b(0, SRMSGMOD_T, szSetting, bDefault) != 0;
}
static bool __forceinline GetBool(const char *szModule, const char *szSetting, bool bDefault)
- {
- return db_get_b(0, szModule, szSetting, bDefault) != 0;
+ { return db_get_b(0, szModule, szSetting, bDefault) != 0;
}
static bool __forceinline GetBool(const MCONTACT hContact, const char *szSetting, bool bDefault)
- {
- return db_get_b(hContact, SRMSGMOD_T, szSetting, bDefault) != 0;
+ { return db_get_b(hContact, SRMSGMOD_T, szSetting, bDefault) != 0;
+ }
+
+ static bool __forceinline IsFavorite(const MCONTACT hContact)
+ { return db_get_b(hContact, SRMSGMOD_T, "isFavorite", false);
+ }
+ static void __forceinline SetFavorite(const MCONTACT hContact, bool bValue)
+ { db_set_b(hContact, SRMSGMOD_T, "isFavorite", bValue);
+ }
+
+ static DWORD __forceinline IsRecent(const MCONTACT hContact)
+ { return db_get_dw(hContact, SRMSGMOD_T, "isRecent", 0);
+ }
+ static void __forceinline SetRecent(const MCONTACT hContact, DWORD dwValue)
+ { db_set_dw(hContact, SRMSGMOD_T, "isRecent", dwValue);
}
/*
@@ -149,9 +148,6 @@ public: void configureCustomFolders();
INT_PTR foldersPathChanged();
- void startTimer();
- void stopTimer(const char *szMsg = nullptr);
-
__forceinline __int64 getTimerStart() const { return m_tStart; }
__forceinline __int64 getTimerStop() const { return m_tStop; }
__forceinline __int64 getTicks() const { return m_tStop - m_tStart; }
|