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 --- protocols/GTalkExt/src/avatar.cpp | 8 ++++---- protocols/GTalkExt/src/db.cpp | 2 +- protocols/GTalkExt/src/handlers.cpp | 2 +- protocols/GTalkExt/src/notifications.cpp | 18 +++++++++--------- protocols/GTalkExt/src/notifications.h | 2 +- protocols/GTalkExt/src/stdafx.h | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) (limited to 'protocols/GTalkExt') diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index 74359484f9..744b990e96 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -84,7 +84,7 @@ BOOL SaveAvatar(HANDLE hFile) struct AVACHANGED { HANDLE hTimer; - HANDLE hContact; + HCONTACT hContact; }; VOID CALLBACK CallSetAvatar(PVOID lpParameter, BOOLEAN TimerOrWaitFired) @@ -107,11 +107,11 @@ VOID CALLBACK CallSetAvatar(PVOID lpParameter, BOOLEAN TimerOrWaitFired) int AvaChanged(WPARAM wParam, LPARAM lParam) { - if (!lParam && db_get_b((HANDLE)wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) { + if (!lParam && db_get_b((HCONTACT)wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) { BOOL enqueued = FALSE; AVACHANGED *ach = (AVACHANGED*)malloc(sizeof(AVACHANGED)); __try { - ach->hContact = (HANDLE)wParam; + ach->hContact = (HCONTACT)wParam; enqueued = CreateTimerQueueTimer(&ach->hTimer, NULL, CallSetAvatar, ach, SET_AVATAR_INTERVAL, 0, WT_EXECUTEONLYONCE); } __finally { @@ -146,7 +146,7 @@ BOOL InitAvaUnit(BOOL init) } } -void SetAvatar(HANDLE hContact) +void SetAvatar(HCONTACT hContact) { mir_cslock lck(g_csSetAvatar); diff --git a/protocols/GTalkExt/src/db.cpp b/protocols/GTalkExt/src/db.cpp index a652babe49..661bce4409 100644 --- a/protocols/GTalkExt/src/db.cpp +++ b/protocols/GTalkExt/src/db.cpp @@ -42,7 +42,7 @@ void RenewPseudocontactHandles() db_unset(0, protos[i]->szModuleName, "GMailExtNotifyContact"); // remove this } - for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { if (db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) { LPCSTR proto = (LPCSTR)GetContactProto(hContact); db_set_dw(NULL, proto, PSEUDOCONTACT_LINK, (DWORD)hContact); diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 4643a26275..087a38e2aa 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -426,7 +426,7 @@ int OnExtListInit(WPARAM wParam, LPARAM lParam) int OnFilterPopup(WPARAM wParam, LPARAM lParam) { - HANDLE hContact = (HANDLE)wParam; + HCONTACT hContact = (HCONTACT)wParam; if ( !db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) return 0; diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index 30321de558..4e66154ac0 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -42,7 +42,7 @@ struct POPUP_DATA_HEADER { BOOL MarkRead; HANDLE hDbEvent; - HANDLE hContact; + HCONTACT hContact; LPTSTR jid; LPTSTR url; }; @@ -65,7 +65,7 @@ LPCSTR GetJidAcc(LPCTSTR jid) return NULL; } -void MarkEventRead(HANDLE hCnt, HANDLE hEvt) +void MarkEventRead(HCONTACT hCnt, HANDLE hEvt) { DWORD settings = (DWORD)TlsGetValue(itlsSettings); if ( ReadCheckbox(0, IDC_POPUPSENABLED, settings) && @@ -77,7 +77,7 @@ void MarkEventRead(HANDLE hCnt, HANDLE hEvt) int OnEventDeleted(WPARAM hContact, LPARAM hDbEvent, LPARAM wnd) { - if (db_get_b((HANDLE)hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) { + if (db_get_b((HCONTACT)hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) { CallService(MS_CLIST_REMOVEEVENT, hContact, hDbEvent); PostMessage((HWND)wnd, EVENT_DELETED_MSG, hContact, hDbEvent); } @@ -166,11 +166,11 @@ void FormatPseudocontactDisplayName(LPTSTR buff, LPCTSTR jid, LPCTSTR unreadCoun wsprintf(buff, _T("%s"), jid); //!!!!!!!!!!! } -HANDLE SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName) +HCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName) { - HANDLE result = (HANDLE)db_get_dw(NULL, acc, PSEUDOCONTACT_LINK, 0); + HCONTACT result = (HCONTACT)db_get_dw(NULL, acc, PSEUDOCONTACT_LINK, 0); if (!result || !db_get_b(result, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) { - result = (HANDLE)CallService(MS_DB_CONTACT_ADD, 0, 0); + result = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0); db_set_dw(0, acc, PSEUDOCONTACT_LINK, (DWORD)result); db_set_b(result, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 1); CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)result, (LPARAM)acc); @@ -191,7 +191,7 @@ HANDLE SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR return result; } -HANDLE AddCListNotification(HANDLE hContact, LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LPCTSTR unreadCount) +HANDLE AddCListNotification(HCONTACT hContact, LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LPCTSTR unreadCount) { mir_ptr szUrl( mir_utf8encodeT(url)), szText( mir_utf8encodeT(data->lptzText)); @@ -216,7 +216,7 @@ BOOL UsePopups() void ShowNotification(LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LPCTSTR unreadCount) { - HANDLE hCnt = SetupPseudocontact(jid, unreadCount, acc, &data->lptzContactName[0]); + HCONTACT hCnt = SetupPseudocontact(jid, unreadCount, acc, &data->lptzContactName[0]); HANDLE hEvt = ReadCheckbox(0, IDC_PSEUDOCONTACTENABLED, (DWORD)TlsGetValue(itlsSettings)) ? AddCListNotification(hCnt, acc, data, jid, url, unreadCount) : NULL; @@ -287,7 +287,7 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre void ClearNotificationContactHistory(LPCSTR acc) { - HANDLE hContact = (HANDLE)db_get_dw(NULL, acc, PSEUDOCONTACT_LINK, 0); + HCONTACT hContact = (HCONTACT)db_get_dw(NULL, acc, PSEUDOCONTACT_LINK, 0); if (!hContact || !db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) return; diff --git a/protocols/GTalkExt/src/notifications.h b/protocols/GTalkExt/src/notifications.h index 456cb3d366..43de74607d 100644 --- a/protocols/GTalkExt/src/notifications.h +++ b/protocols/GTalkExt/src/notifications.h @@ -40,5 +40,5 @@ void UnreadMailNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unread void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unreadCount, const MAIL_THREAD_NOTIFICATION *mtn); void CloseNotifications(LPCSTR acc, LPCTSTR url, LPCTSTR jid, BOOL PopupsOnly); DWORD ReadNotificationSettings(LPCSTR acc); -HANDLE SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName = NULL); +HCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName = NULL); LPCSTR GetJidAcc(LPCTSTR jid); \ No newline at end of file diff --git a/protocols/GTalkExt/src/stdafx.h b/protocols/GTalkExt/src/stdafx.h index 7e8bc5669b..fd47c8a964 100644 --- a/protocols/GTalkExt/src/stdafx.h +++ b/protocols/GTalkExt/src/stdafx.h @@ -72,5 +72,5 @@ extern HINSTANCE g_hInst; extern LIST g_accs; -void SetAvatar(HANDLE hContact); +void SetAvatar(HCONTACT hContact); BOOL InitAvaUnit(BOOL init); -- cgit v1.2.3