summaryrefslogtreecommitdiff
path: root/plugins/MirFox
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/MirFox
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/MirFox')
-rw-r--r--plugins/MirFox/src/MirandaUtils.cpp6
-rw-r--r--plugins/MirFox/src/MirfoxData.cpp13
2 files changed, 8 insertions, 11 deletions
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp
index 8feae7a960..b213b3d1c9 100644
--- a/plugins/MirFox/src/MirandaUtils.cpp
+++ b/plugins/MirFox/src/MirandaUtils.cpp
@@ -481,9 +481,9 @@ void MirandaUtils::translateOldDBNames() {
//account's settings "ACCOUNTSTATE_"
int accountsTmpCount = 0;
PROTOACCOUNT **accountsTmp;
- CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)&accountsTmpCount, (LPARAM)&accountsTmp);
- for(int i=0; i<accountsTmpCount; i++) {
+ Proto_EnumAccounts(&accountsTmpCount, &accountsTmp);
+ for(int i=0; i<accountsTmpCount; i++) {
logger->log_p(L"TranslateOldDBNames: found ACCOUNT: [%s] protocol: [%S]", accountsTmp[i]->tszAccountName, accountsTmp[i]->szProtoName);
std::string mirandaAccountDBKey("ACCOUNTSTATE_");
@@ -496,7 +496,7 @@ void MirandaUtils::translateOldDBNames() {
}
}
- //contacts "state"
+ //contacts "state"
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
logger->log_p(L"TranslateOldDBNames: found CONTACT: [" SCNuPTR L"]", hContact);
diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp
index 9ed2657ee9..17d5a782ab 100644
--- a/plugins/MirFox/src/MirfoxData.cpp
+++ b/plugins/MirFox/src/MirfoxData.cpp
@@ -280,14 +280,12 @@ MirfoxData::getContactDefaultState(MirandaContact* contact)
void
MirfoxData::initializeMirandaAccounts()
{
-
clearMirandaAccounts();
+ //get accounts from Miranda by CallService MS_PROTO_ENUMACCOUNTS
int accountsCount = 0;
PROTOACCOUNT **accounts;
-
- //get accounts from Miranda by CallService MS_PROTO_ENUMACCOUNTS
- CallService(MS_PROTO_ENUMACCOUNTS, (WPARAM)&accountsCount, (LPARAM)&accounts);
+ Proto_EnumAccounts(&accountsCount, &accounts);
uint64_t protocolId = 1;
@@ -372,12 +370,11 @@ void MirfoxData::initializeMirandaContacts()
for (mirandaContactsIter = mirandaContactsPtr->begin(); mirandaContactsIter != mirandaContactsPtr->end(); mirandaContactsIter++){
logger->log_p(L"initializeMirandaContacts: try to get account for hContact = [" SCNuPTR L"]", mirandaContactsIter->contactHandle);
- char* szModuleName = (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)(mirandaContactsIter->contactHandle), 0);
- if (szModuleName == NULL){
+ char *szModuleName = Proto_GetBaseAccountName(mirandaContactsIter->contactHandle);
+ if (szModuleName == NULL)
continue; //mirandaContactsIter->mirandaAccountPtr will be NULL
- }
- mirandaContactsIter->mirandaAccountPtr = getMirandaAccountPtrBySzModuleName(szModuleName);
+ mirandaContactsIter->mirandaAccountPtr = getMirandaAccountPtrBySzModuleName(szModuleName);
}