From 7bdb598e26e7e98788933af43090d34027166969 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 14 Sep 2016 18:01:49 +0000 Subject: second major wipeout of database services & structures: - DBCONTACTENUMSETTINGS removed; - all helpers moved to mir_core.dll git-svn-id: http://svn.miranda-ng.org/main/trunk@17296 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/MSN/src/msn_commands.cpp | 2 +- protocols/MSN/src/msn_contact.cpp | 2 +- protocols/MSN/src/msn_lists.cpp | 6 +++--- protocols/MSN/src/msn_proto.cpp | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols/MSN/src') diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index 190fb1e704..93ac87ce7c 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -1590,7 +1590,7 @@ void CMsnProto::MSN_ProcessRemove(char* buf, size_t len) MsnContact* msc = Lists_Get(szEmail); if (msc == NULL || (msc->list & (LIST_RL | LIST_FL | LIST_LL)) == 0) { if (msc->hContact && _stricmp(szEmail, MyOptions.szEmail)) { - CallService(MS_DB_CONTACT_DELETE, (WPARAM)msc->hContact, 0); + db_delete_contact(msc->hContact); msc->hContact = NULL; } } diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp index fd3dde5643..921415024d 100644 --- a/protocols/MSN/src/msn_contact.cpp +++ b/protocols/MSN/src/msn_contact.cpp @@ -36,7 +36,7 @@ MCONTACT CMsnProto::MSN_HContactFromEmail(const char* wlid, const char* msnNick, if (hContact == NULL && addIfNeeded) { int netId = (msc && msc->netId)?msc->netId:(szNet?atoi(szNet):NETID_MSN); - hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0); + hContact = db_add_contact(); Proto_AddToContact(hContact, m_szModuleName); if (netId != NETID_SKYPE) setString(hContact, "e-mail", szEmail); setStringUtf(hContact, "Nick", msnNick ? msnNick : szEmail); diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp index acd43695cb..fdbaeb732e 100644 --- a/protocols/MSN/src/msn_lists.cpp +++ b/protocols/MSN/src/msn_lists.cpp @@ -222,7 +222,7 @@ void CMsnProto::Lists_Populate(void) else Lists_Add(0, netId, szEmail, hContact); } - else if (!isChatRoom(hContact)) CallService(MS_DB_CONTACT_DELETE, hContact, 0); + else if (!isChatRoom(hContact)) db_delete_contact(hContact); hContact = hNext; } } @@ -260,7 +260,7 @@ void CMsnProto::MSN_CleanupLists(void) } if (!(p.list & (LIST_LL | LIST_FL))) { - CallService(MS_DB_CONTACT_DELETE, (WPARAM)p.hContact, 0); + db_delete_contact(p.hContact); p.hContact = NULL; } } @@ -483,7 +483,7 @@ static void SaveSettings(MCONTACT hItem, HWND hwndList, CMsnProto* proto) if (xorMask & (LIST_FL | LIST_LL) && !(newMask & (LIST_FL | LIST_LL))) { if (!IsHContactInfo(hItem)) { - CallService(MS_DB_CONTACT_DELETE, (WPARAM)hItem, 0); + db_delete_contact(hItem); MsnContact* msc = proto->Lists_Get(szEmail); if (msc) msc->hContact = NULL; } diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index f66e293edd..745505288c 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -385,10 +385,10 @@ int CMsnProto::AuthDeny(MEVENT hDbEvent, const wchar_t*) MSN_AddUser(NULL, email, msc->netId, LIST_RL); if (!(msc->list & (LIST_FL | LIST_LL))) { - if (msc->hContact) CallService(MS_DB_CONTACT_DELETE, (WPARAM)msc->hContact, 0); + if (msc->hContact) db_delete_contact(msc->hContact); msc->hContact = NULL; MCONTACT hContact = MSN_HContactFromEmail(email); - if (hContact) CallService(MS_DB_CONTACT_DELETE, hContact, 0); + if (hContact) db_delete_contact(hContact); } return 0; @@ -1199,7 +1199,7 @@ int __cdecl CMsnProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM l case EV_PROTO_ONERASE: char szDbsettings[64]; mir_snprintf(szDbsettings, "%s_HTTPS", m_szModuleName); - DbModule_Delete(0, szDbsettings); + db_delete_module(0, szDbsettings); break; case EV_PROTO_ONCONTACTDELETED: -- cgit v1.2.3