summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/groupchat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Gadu-Gadu/src/groupchat.cpp')
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 5fb2027896..676b7abbe5 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -138,8 +138,8 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam)
list_remove(&chats, chat, 1);
// Remove contact from contact list (duh!) should be done by chat.dll !!
- for (HANDLE hContact = db_find_first(); hContact; ) {
- HANDLE hNext = db_find_next(hContact);
+ for (HCONTACT hContact = db_find_first(); hContact; ) {
+ HCONTACT hNext = db_find_next(hContact);
DBVARIANT dbv;
if (!getTString(hContact, "ChatRoomID", &dbv)) {
if (dbv.ptszVal && !_tcscmp(gch->pDest->ptszID, dbv.ptszVal))
@@ -193,7 +193,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam)
// Privmessage selected
if (gch->pDest->iType == GC_USER_PRIVMESS)
{
- HANDLE hContact = NULL;
+ HCONTACT hContact = NULL;
if ((uin = _ttoi(gch->ptszUID)) && (hContact = getcontact(uin, 1, 0, NULL)))
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
}
@@ -369,7 +369,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count
// Add contacts
for(i = 0; i < chat->recipients_count; i++) {
- HANDLE hContact = getcontact(chat->recipients[i], 1, 0, NULL);
+ HCONTACT hContact = getcontact(chat->recipients[i], 1, 0, NULL);
UIN2IDT(chat->recipients[i], id);
if (hContact && (name = pcli->pfnGetContactDisplayName(hContact, 0)) != NULL)
gce.ptszNick = name;
@@ -389,7 +389,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count
return chat->id;
}
-static HANDLE gg_getsubcontact(GGPROTO* gg, HANDLE hContact)
+static HCONTACT gg_getsubcontact(GGPROTO* gg, HCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
char* szMetaProto = (char*)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
@@ -397,10 +397,8 @@ static HANDLE gg_getsubcontact(GGPROTO* gg, HANDLE hContact)
if (szProto && szMetaProto && (INT_PTR)szMetaProto != CALLSERVICE_NOTFOUND && !lstrcmpA(szProto, szMetaProto))
{
int nSubContacts = (int)CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0), i;
- HANDLE hMetaContact;
- for (i = 0; i < nSubContacts; i++)
- {
- hMetaContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ for (i = 0; i < nSubContacts; i++) {
+ HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
szProto = GetContactProto(hMetaContact);
if (szProto && !lstrcmpA(szProto, gg->m_szModuleName))
return hMetaContact;
@@ -425,7 +423,7 @@ static void gg_gc_resetclistopts(HWND hwndList)
static int gg_gc_countcheckmarks(HWND hwndList)
{
int count = 0;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
count++;
@@ -477,10 +475,10 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa
TCHAR* chat;
uin_t* participants = (uin_t*)calloc(count, sizeof(uin_t));
gg->debugLogA("gg_gc_openconfdlg(): WM_COMMAND IDOK Opening new conference for %d contacts.", count);
- for (HANDLE hContact = db_find_first(); hContact && i < count; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact && i < count; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- HANDLE hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
+ HCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
participants[i++] = db_get_dw(hMetaContact ? hMetaContact : hContact, gg->m_szModuleName, GG_KEY_UIN, 0);
}
}
@@ -526,10 +524,10 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa
if (!gg) break;
// Delete non-gg contacts
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ HCONTACT hItem = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
- HANDLE hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
+ HCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
if (hMetaContact) {
szProto = gg->m_szModuleName;
uin = (uin_t)gg->getDword(hMetaContact, GG_KEY_UIN, 0);
@@ -620,7 +618,7 @@ INT_PTR GGPROTO::gc_openconf(WPARAM wParam, LPARAM lParam)
return 1;
}
-int GGPROTO::gc_changenick(HANDLE hContact, TCHAR *ptszNick)
+int GGPROTO::gc_changenick(HCONTACT hContact, TCHAR *ptszNick)
{
list_t l;
uin_t uin = getDword(hContact, GG_KEY_UIN, 0);