From 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 20:47:51 +0000 Subject: HCONTACT is not needed anymore git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Import/src/import.cpp | 16 ++++++++-------- plugins/Import/src/import.h | 6 +++--- plugins/Import/src/utils.cpp | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'plugins/Import/src') diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 5a8b873fb9..bece09a02c 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -65,8 +65,8 @@ static MCONTACT HContactFromNumericID(char *pszProtoName, char *pszSetting, DWOR { MCONTACT hContact = dstDb->FindFirstContact(); while (hContact != NULL) { - if ( db_get_dw((HCONTACT)hContact, pszProtoName, pszSetting, 0) == dwID) { - char* szProto = GetContactProto((HCONTACT)hContact); + if ( db_get_dw((MCONTACT)hContact, pszProtoName, pszSetting, 0) == dwID) { + char* szProto = GetContactProto((MCONTACT)hContact); if (szProto != NULL && !lstrcmpA(szProto, pszProtoName)) return hContact; } @@ -79,9 +79,9 @@ static MCONTACT HContactFromID(char *pszProtoName, char *pszSetting, TCHAR *pwsz { MCONTACT hContact = dstDb->FindFirstContact(); while (hContact != NULL) { - char* szProto = GetContactProto((HCONTACT)hContact); + char* szProto = GetContactProto((MCONTACT)hContact); if ( !lstrcmpA(szProto, pszProtoName)) { - ptrW id(db_get_tsa((HCONTACT)hContact, pszProtoName, pszSetting)); + ptrW id(db_get_tsa((MCONTACT)hContact, pszProtoName, pszSetting)); if ( !lstrcmp(pwszID, id)) return hContact; } @@ -107,7 +107,7 @@ static MCONTACT HistoryImportFindContact(HWND hdlgProgress, char* szModuleName, hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0); CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)szModuleName); - db_set_dw((HCONTACT)hContact, szModuleName, "UIN", uin); + db_set_dw((MCONTACT)hContact, szModuleName, "UIN", uin); AddMessage( LPGENT("Added contact %u (found in history)"), uin ); return hContact; } @@ -125,10 +125,10 @@ static MCONTACT AddContact(HWND hdlgProgress, char* szProto, char* pszUniqueSett mySet(hContact, szProto, pszUniqueSetting, id); - CreateGroup(group, (HCONTACT)hContact); + CreateGroup(group, (MCONTACT)hContact); if (nick && *nick) { - db_set_ws((HCONTACT)hContact, "CList", "MyHandle", nick); + db_set_ws((MCONTACT)hContact, "CList", "MyHandle", nick); AddMessage(LPGENT("Added %S contact %s, '%s'"), szProto, pszUserID, nick); } else AddMessage(LPGENT("Added %S contact %s"), szProto, pszUserID); @@ -404,7 +404,7 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC if (!skip) { // Check for duplicate entries - if (!IsDuplicateEvent((HCONTACT)hDst, dbei)) { + if (!IsDuplicateEvent((MCONTACT)hDst, dbei)) { // Add dbevent if (!bIsVoidContact) dbei.flags &= ~DBEF_FIRST; diff --git a/plugins/Import/src/import.h b/plugins/Import/src/import.h index 02fffe59d6..a4b000ae05 100644 --- a/plugins/Import/src/import.h +++ b/plugins/Import/src/import.h @@ -94,7 +94,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void AddMessage( const TCHAR* fmt, ... ); -void mySet(HCONTACT hContact, const char* module, const char* var, DBVARIANT* dbv ); +void mySet(MCONTACT hContact, const char* module, const char* var, DBVARIANT* dbv ); INT_PTR CALLBACK WizardIntroPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam); INT_PTR CALLBACK ProgressPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam); @@ -104,9 +104,9 @@ INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam, INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam); BOOL IsProtocolLoaded(char* pszProtocolName); -BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO dbei); +BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei); -int CreateGroup(const TCHAR* name, HCONTACT hContact); +int CreateGroup(const TCHAR* name, MCONTACT hContact); extern HINSTANCE hInst; extern HANDLE hIcoHandle; diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp index 4d3cca3b77..b6946665ab 100644 --- a/plugins/Import/src/utils.cpp +++ b/plugins/Import/src/utils.cpp @@ -35,7 +35,7 @@ BOOL IsProtocolLoaded(char* pszProtocolName) // If contact is specified adds it to group // ------------------------------------------------ // Returns 1 if successful and 0 when it fails. -int CreateGroup(const TCHAR* group, HCONTACT hContact) +int CreateGroup(const TCHAR* group, MCONTACT hContact) { if (group == NULL) return 0; @@ -75,10 +75,10 @@ int CreateGroup(const TCHAR* group, HCONTACT hContact) } // Returns TRUE if the event already exist in the database -BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO dbei) +BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei) { static DWORD dwPreviousTimeStamp = -1; - static HCONTACT hPreviousContact = (HCONTACT)INVALID_HANDLE_VALUE; + static MCONTACT hPreviousContact = INVALID_CONTACT_ID; static HANDLE hPreviousDbEvent = NULL; HANDLE hExistingDbEvent; @@ -220,6 +220,6 @@ BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO dbei) } } // reset last event - hPreviousContact = (HCONTACT)INVALID_HANDLE_VALUE; + hPreviousContact = INVALID_CONTACT_ID; return FALSE; } -- cgit v1.2.3