From 83310365c69bd40365ee0ae0e16c99c28e24cd0b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 14:24:12 +0000 Subject: - all static protocol services replaced with functions; - m_protomod.h removed as useless git-svn-id: http://svn.miranda-ng.org/main/trunk@14260 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.cpp | 16 ++++++++-------- plugins/Import/src/import.h | 2 +- plugins/Import/src/main.cpp | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'plugins/Import/src') diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index e31a16a8b9..88aadd22ea 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -166,7 +166,7 @@ static MCONTACT HistoryImportFindContact(HWND hdlgProgress, char *szModuleName, return INVALID_CONTACT_ID; hContact = CallService(MS_DB_CONTACT_ADD, 0, 0); - CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)szModuleName); + Proto_AddToContact(hContact, szModuleName); db_set_dw(hContact, szModuleName, "UIN", uin); AddMessage(LPGENT("Added contact %u (found in history)"), uin); return hContact; @@ -275,7 +275,7 @@ static LRESULT CALLBACK ListWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM int protoCount, iSel = 0; PROTOACCOUNT **accs; - ProtoEnumAccounts(&protoCount, &accs); + Proto_EnumAccounts(&protoCount, &accs); for (int i = 0; i < protoCount; i++) { int idx = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName); SendMessage(hwndCombo, CB_SETITEMDATA, idx, (LPARAM)accs[i]); @@ -394,7 +394,7 @@ static PROTOACCOUNT* FindMyAccount(const char *szProto, const char *szBaseProto, { int destProtoCount; PROTOACCOUNT **destAccs; - CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)&destProtoCount, (LPARAM)&destAccs); + Proto_EnumAccounts(&destProtoCount, &destAccs); PROTOACCOUNT *pProto = NULL; for (int i = 0; i < destProtoCount; i++) { @@ -548,7 +548,7 @@ static MCONTACT MapContact(MCONTACT hSrc) static MCONTACT AddContact(HWND hdlgProgress, char* szProto, char* pszUniqueSetting, DBVARIANT* id, const TCHAR* pszUserID, TCHAR *nick, TCHAR *group) { MCONTACT hContact = CallService(MS_DB_CONTACT_ADD, 0, 0); - if (CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)szProto) != 0) { + if (Proto_AddToContact(hContact, szProto) != 0) { CallService(MS_DB_CONTACT_DELETE, hContact, 0); AddMessage(LPGENT("Failed to add %S contact %s"), szProto, pszUserID); return INVALID_CONTACT_ID; @@ -719,7 +719,7 @@ void ImportMeta(DBCachedContact *ccSrc) // do we need to add a new metacontact? if (hDest == INVALID_CONTACT_ID) { hDest = CallService(MS_DB_CONTACT_ADD, 0, 0); - CallService(MS_PROTO_ADDTOCONTACT, hDest, LPARAM(META_PROTO)); + Proto_AddToContact(hDest, META_PROTO); CopySettings(ccSrc->contactID, META_PROTO, hDest, META_PROTO); ccDst = dstDb->m_cache->GetCachedContact(hDest); @@ -768,7 +768,7 @@ void ImportMeta(DBCachedContact *ccSrc) else AddMessage(LPGENT("Added metacontact")); } - PROTOACCOUNT *pa = ProtoGetAccount(META_PROTO); + PROTOACCOUNT *pa = Proto_GetAccount(META_PROTO); if (pa) { AccountMap pda(META_PROTO, 0, _T(META_PROTO)); ImportContactSettings(&pda, ccSrc->contactID, ccDst->contactID); @@ -799,7 +799,7 @@ static MCONTACT ImportContact(MCONTACT hSrc) return NULL; } - if (!ProtoGetAccount(pda->pa->szModuleName)) { + if (!Proto_GetAccount(pda->pa->szModuleName)) { AddMessage(LPGENT("Skipping contact, %S not installed."), cc->szProto); return NULL; } @@ -1114,7 +1114,7 @@ void MirandaImport(HWND hdlg) int protoCount; PROTOACCOUNT **accs; - CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)&protoCount, (LPARAM)&accs); + Proto_EnumAccounts(&protoCount, &accs); if (protoCount > 0) ImportHistory(NULL, accs, protoCount); diff --git a/plugins/Import/src/import.h b/plugins/Import/src/import.h index 572ac475f2..4e412862cb 100644 --- a/plugins/Import/src/import.h +++ b/plugins/Import/src/import.h @@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include +#include #include #include #include diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp index 04f1bc2ff2..55e85c3266 100644 --- a/plugins/Import/src/main.cpp +++ b/plugins/Import/src/main.cpp @@ -88,7 +88,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) // Only autorun import wizard if at least one protocol is installed int nProtocols = 0; PROTOACCOUNT **ppProtos = NULL; - ProtoEnumAccounts(&nProtocols, &ppProtos); + Proto_EnumAccounts(&nProtocols, &ppProtos); if (nProtocols > 0) { CallService(IMPORT_SERVICE, 0, 0); db_set_b(NULL, IMPORT_MODULE, IMP_KEY_FR, 1); -- cgit v1.2.3