From 9390b42340def16388cd06ab851cc303db0c096e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 10 Oct 2018 23:38:16 +0300 Subject: code cleaning --- plugins/Db3x_mmap/src/dbcontacts.cpp | 4 ++-- plugins/Dbx_mdbx/src/dbcontacts.cpp | 4 ++-- plugins/Dbx_mdbx/src/dbintf.cpp | 9 --------- plugins/Dbx_sqlite/src/dbcontacts.cpp | 4 ++-- 4 files changed, 6 insertions(+), 15 deletions(-) (limited to 'plugins') diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index d2433d2d46..97d7e0d6b4 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -55,7 +55,7 @@ STDMETHODIMP_(LONG) CDb3Mmap::DeleteContact(MCONTACT contactID) log0("del contact"); // call notifier while outside mutex - NotifyEventHooks(g_hevEventDeleted, contactID, 0); + NotifyEventHooks(g_hevContactDeleted, contactID, 0); // get back in lck.lock(); @@ -136,7 +136,7 @@ STDMETHODIMP_(MCONTACT) CDb3Mmap::AddContact() DBCachedContact *cc = m_cache->AddContactToCache(dbc.dwContactID); cc->dwOfsContact = ofsNew; - NotifyEventHooks(g_hevEventAdded, dbc.dwContactID, 0); + NotifyEventHooks(g_hevContactAdded, dbc.dwContactID, 0); return dbc.dwContactID; } diff --git a/plugins/Dbx_mdbx/src/dbcontacts.cpp b/plugins/Dbx_mdbx/src/dbcontacts.cpp index 1cda600b34..6c6fd8a8ba 100644 --- a/plugins/Dbx_mdbx/src/dbcontacts.cpp +++ b/plugins/Dbx_mdbx/src/dbcontacts.cpp @@ -41,7 +41,7 @@ LONG CDbxMDBX::DeleteContact(MCONTACT contactID) if (contactID == 0) // global contact cannot be removed return 1; - NotifyEventHooks(g_hevEventDeleted, contactID, 0); + NotifyEventHooks(g_hevContactDeleted, contactID, 0); { OBJLIST events(50); GatherContactHistory(contactID, events); @@ -102,7 +102,7 @@ MCONTACT CDbxMDBX::AddContact() DBFlush(); - NotifyEventHooks(g_hevEventAdded, dwContactId, 0); + NotifyEventHooks(g_hevContactAdded, dwContactId, 0); return dwContactId; } diff --git a/plugins/Dbx_mdbx/src/dbintf.cpp b/plugins/Dbx_mdbx/src/dbintf.cpp index e2bb33d12c..17005a3cbb 100644 --- a/plugins/Dbx_mdbx/src/dbintf.cpp +++ b/plugins/Dbx_mdbx/src/dbintf.cpp @@ -57,15 +57,6 @@ CDbxMDBX::~CDbxMDBX() if (m_crypto) m_crypto->destroy(); - DestroyHookableEvent(g_hevEventDeleted); - DestroyHookableEvent(g_hevEventAdded); - DestroyHookableEvent(g_hevSettingChanged); - DestroyHookableEvent(g_hevMarkedRead); - - DestroyHookableEvent(g_hevEventAdded); - DestroyHookableEvent(g_hevEventDeleted); - DestroyHookableEvent(g_hevEventFiltered); - mir_free(m_tszProfileName); } diff --git a/plugins/Dbx_sqlite/src/dbcontacts.cpp b/plugins/Dbx_sqlite/src/dbcontacts.cpp index 7800e8b09a..63347e74c4 100644 --- a/plugins/Dbx_sqlite/src/dbcontacts.cpp +++ b/plugins/Dbx_sqlite/src/dbcontacts.cpp @@ -81,8 +81,8 @@ MCONTACT CDbxSQLite::AddContact() DBCachedContact *cc = m_cache->AddContactToCache(hContact); if (cc == nullptr) return INVALID_CONTACT_ID; - NotifyEventHooks(g_hevEventAdded, hContact); + NotifyEventHooks(g_hevContactAdded, hContact); return hContact; } @@ -104,7 +104,7 @@ LONG CDbxSQLite::DeleteContact(MCONTACT hContact) } m_cache->FreeCachedContact(hContact); - NotifyEventHooks(g_hevEventDeleted, hContact); + NotifyEventHooks(g_hevContactDeleted, hContact); return 0; } -- cgit v1.2.3