summaryrefslogtreecommitdiff
path: root/plugins/Import/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-19 14:24:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-19 14:24:12 +0000
commit83310365c69bd40365ee0ae0e16c99c28e24cd0b (patch)
tree10ac18bfdc3fcf0fd62a5aba3ccb5dedffa2e410 /plugins/Import/src
parentd68cd04d6f7b997692476b531bdc30f546a50efd (diff)
- 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
Diffstat (limited to 'plugins/Import/src')
-rw-r--r--plugins/Import/src/import.cpp16
-rw-r--r--plugins/Import/src/import.h2
-rw-r--r--plugins/Import/src/main.cpp2
3 files changed, 10 insertions, 10 deletions
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 <m_langpack.h>
#include <m_system_cpp.h>
#include <m_database.h>
-#include <m_protomod.h>
+#include <m_protosvc.h>
#include <m_icolib.h>
#include <m_clist.h>
#include <m_db_int.h>
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);