diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 |
commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp | |
parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp')
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 1bef0889b8..de9db38883 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -207,7 +207,7 @@ int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) if (!xmlfile)
return ERROR_INVALID_PARAMS;
- if (_hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (_hContact == INVALID_CONTACT_ID)
return ERROR_INVALID_CONTACT;
if (!CreateXmlElement())
@@ -219,7 +219,7 @@ int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) const int cnt = DB::MetaContact::SubCount(_hContact);
const int def = DB::MetaContact::SubDefNum(_hContact);
- HCONTACT hSubContact = DB::MetaContact::Sub(_hContact, def);
+ MCONTACT hSubContact = DB::MetaContact::Sub(_hContact, def);
// export default subcontact
if (hSubContact && vContact.fromDB(hSubContact))
@@ -488,7 +488,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) // delete last contact
db_free(&_dbvUID);
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_xmlNode = xContact;
MIR_FREE(_pszAMPro); ampro(xContact->Attribute("ampro"));
@@ -510,8 +510,8 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) CExImContactXML vSub(_pXmlFile);
if (vSub = xSub) {
// identify metacontact by the first valid subcontact in xmlfile
- if (_hContact == (HCONTACT)INVALID_HANDLE_VALUE && vSub.handle() != (HCONTACT)INVALID_HANDLE_VALUE) {
- HCONTACT hMeta = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
+ if (_hContact == INVALID_CONTACT_ID && vSub.handle() != INVALID_CONTACT_ID) {
+ MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
if (hMeta != NULL) {
_hContact = hMeta;
break;
@@ -520,7 +520,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) }
}
// if no handle was found, this is a new meta contact
- _isNewContact = _hContact == (HCONTACT)INVALID_HANDLE_VALUE;
+ _isNewContact = _hContact == INVALID_CONTACT_ID;
}
// entry is a default contact
else {
@@ -588,7 +588,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) int CExImContactXML::ImportContact()
{
// create the contact if not yet exists
- if (toDB() != (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (toDB() != INVALID_CONTACT_ID) {
_hEvent = NULL;
// count settings and events and init progress dialog
@@ -610,7 +610,7 @@ int CExImContactXML::ImportContact() LPGENT("You aborted import of a new contact.\nSome information may be missing for this contact.\n\nDo you want to delete the incomplete contact?"));
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
}
}
return ERROR_ABORTED;
@@ -674,9 +674,9 @@ int CExImContactXML::Import(BYTE keepMetaSubContact) return result;
// convert default subcontact to metacontact
- _hContact = (HCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
+ _hContact = (MCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
if (_hContact == NULL) {
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
return ERROR_CONVERT_METACONTACT;
}
@@ -736,7 +736,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) return err;
// check if contact is subcontact of the desired meta contact
- if ((HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL) != pMetaContact->handle()) {
+ if ((MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL) != pMetaContact->handle()) {
// add contact to the metacontact (this service returns TRUE if successful)
err = CallService(MS_MC_ADDTOMETA, (WPARAM)_hContact, (LPARAM)pMetaContact->handle());
if (err == FALSE) {
@@ -753,7 +753,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) MIR_FREE(ptszMetaNick);
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
}
}
return ERROR_ADDTO_METACONTACT;
|