diff options
author | George Hazan <ghazan@miranda.im> | 2018-06-13 14:14:35 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-06-13 14:14:35 +0300 |
commit | 00d71971d9cf831b991d391bb073dd846a15855f (patch) | |
tree | f121836446e42c395749d6e4ecdddb8d1aea72b6 /include | |
parent | 1723a03ef74caa86cbfde4144541afb92147395f (diff) |
profile lock detection unbound from contact list services
Diffstat (limited to 'include')
-rw-r--r-- | include/m_database.h | 4 | ||||
-rw-r--r-- | include/m_db_int.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/include/m_database.h b/include/m_database.h index 651a0a3b0a..8f7e974b40 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -458,9 +458,11 @@ EXTERN_C MIR_APP_DLL(int) Profile_GetPathW(size_t cbLen, wchar_t *pwszDest); // Sets the default profile name programmatically
// Analog of Database/DefaultProfile in mirandaboot.ini
-
EXTERN_C MIR_APP_DLL(void) Profile_SetDefault(const wchar_t *pwszPath);
+// Checks if a profile is opened
+EXTERN_C MIR_APP_DLL(bool) Profile_CheckOpened(const wchar_t *pwszProfileName);
+
/////////////////////////////////////////////////////////////////////////////////////////
// Contact services
diff --git a/include/m_db_int.h b/include/m_db_int.h index f32439c213..d0b66e8f25 100644 --- a/include/m_db_int.h +++ b/include/m_db_int.h @@ -133,6 +133,7 @@ interface MIR_APP_EXPORT MIDatabase class MIR_APP_EXPORT MDatabaseCommon : public MIDatabase
{
+ HANDLE m_hLock;
protected:
int m_codePage;
@@ -142,7 +143,9 @@ protected: MIDatabaseCache* m_cache;
protected:
- int CheckProto(DBCachedContact *cc, const char *proto);
+ bool LockName(const wchar_t *pwszProfileName);
+ int CheckProto(DBCachedContact *cc, const char *proto);
+ void UnlockName();
STDMETHOD_(BOOL, GetContactSettingWorker)(MCONTACT contactID, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, int isStatic) PURE;
|