diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-19 14:24:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-19 14:24:12 +0000 |
commit | 83310365c69bd40365ee0ae0e16c99c28e24cd0b (patch) | |
tree | 10ac18bfdc3fcf0fd62a5aba3ccb5dedffa2e410 /plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp | |
parent | d68cd04d6f7b997692476b531bdc30f546a50efd (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/UserInfoEx/src/ex_import/classExImContactBase.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index a85bff5d88..0951d07ace 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -94,7 +94,7 @@ BYTE CExImContactBase::fromDB(MCONTACT hContact) if (!_hContact) return TRUE; // Proto - if (!(pszProto = DB::Contact::Proto(_hContact))) return FALSE; + if (!(pszProto = Proto_GetBaseAccountName(_hContact))) return FALSE; _pszProto = mir_strdup(pszProto); // AM_BaseProto @@ -229,21 +229,19 @@ MCONTACT CExImContactBase::toDB() { // create new contact if none exists if (_hContact == INVALID_CONTACT_ID && _pszProto && _pszUIDKey && _dbvUID.type != DBVT_DELETED) { - PROTOACCOUNT* pszAccount = 0; - if (NULL == (pszAccount = ProtoGetAccount( _pszProto ))) { + PROTOACCOUNT *pszAccount = Proto_GetAccount(_pszProto); + if (pszAccount == NULL) { //account does not exist return _hContact = INVALID_CONTACT_ID; } - if (!IsAccountEnabled(pszAccount)) { - ; - } + // create new contact _hContact = DB::Contact::Add(); if (!_hContact) { return _hContact = INVALID_CONTACT_ID; } // Add the protocol to the new contact - if (CallService(MS_PROTO_ADDTOCONTACT, _hContact, (LPARAM)_pszProto)) { + if (Proto_AddToContact(_hContact, _pszProto)) { DB::Contact::Delete(_hContact); return _hContact = INVALID_CONTACT_ID; } @@ -484,7 +482,7 @@ BYTE CExImContactBase::isHandle(MCONTACT hContact) if (!_pszProto) return hContact == NULL; // compare protocols - pszProto = DB::Contact::Proto(hContact); + pszProto = Proto_GetBaseAccountName(hContact); if (pszProto == NULL || (INT_PTR)pszProto == CALLSERVICE_NOTFOUND || mir_strcmp(pszProto, _pszProto)) return FALSE; |