From ddba4ede6b451d0cfcd0d32b5180fbd0689966bf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 10 Feb 2014 08:04:30 +0000 Subject: - HANDLE hContact => HCONTACT - GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 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 dbb6e5a02b..5a8b873fb9 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((HANDLE)hContact, pszProtoName, pszSetting, 0) == dwID) { - char* szProto = GetContactProto((HANDLE)hContact); + if ( db_get_dw((HCONTACT)hContact, pszProtoName, pszSetting, 0) == dwID) { + char* szProto = GetContactProto((HCONTACT)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((HANDLE)hContact); + char* szProto = GetContactProto((HCONTACT)hContact); if ( !lstrcmpA(szProto, pszProtoName)) { - ptrW id(db_get_tsa((HANDLE)hContact, pszProtoName, pszSetting)); + ptrW id(db_get_tsa((HCONTACT)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((HANDLE)hContact, szModuleName, "UIN", uin); + db_set_dw((HCONTACT)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, (HANDLE)hContact); + CreateGroup(group, (HCONTACT)hContact); if (nick && *nick) { - db_set_ws((HANDLE)hContact, "CList", "MyHandle", nick); + db_set_ws((HCONTACT)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((HANDLE)hDst, dbei)) { + if (!IsDuplicateEvent((HCONTACT)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 eb8bfe696f..02fffe59d6 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( HANDLE hContact, const char* module, const char* var, DBVARIANT* dbv ); +void mySet(HCONTACT 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(HANDLE hContact, DBEVENTINFO dbei); +BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO dbei); -int CreateGroup(const TCHAR* name, HANDLE hContact); +int CreateGroup(const TCHAR* name, HCONTACT hContact); extern HINSTANCE hInst; extern HANDLE hIcoHandle; diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp index 58bad9efc9..c5660133ba 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, HANDLE hContact) +int CreateGroup(const TCHAR* group, HCONTACT hContact) { if (group == NULL) return 0; @@ -55,9 +55,9 @@ int CreateGroup(const TCHAR* group, HANDLE hContact) if ( !lstrcmp(dbv.ptszVal + 1, tszGrpName + 1 )) { if (hContact) - db_set_ts( hContact, "CList", "Group", tszGrpName+1 ); + db_set_ts(hContact, "CList", "Group", tszGrpName + 1); else - AddMessage( LPGENT("Skipping duplicate group %s."), tszGrpName + 1); + AddMessage(LPGENT("Skipping duplicate group %s."), tszGrpName + 1); db_free(&dbv); return 0; @@ -75,7 +75,7 @@ int CreateGroup(const TCHAR* group, HANDLE hContact) } // Returns TRUE if the event already exist in the database -BOOL IsDuplicateEvent(HANDLE hContact, DBEVENTINFO dbei) +BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO dbei) { static DWORD dwPreviousTimeStamp = -1; static HANDLE hPreviousContact = INVALID_HANDLE_VALUE; -- cgit v1.2.3