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 /protocols/JabberG/src | |
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 'protocols/JabberG/src')
31 files changed, 253 insertions, 253 deletions
diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h index bf7839a11e..04634dce2c 100644 --- a/protocols/JabberG/src/jabber.h +++ b/protocols/JabberG/src/jabber.h @@ -363,7 +363,7 @@ struct ThreadData // for nick names resolving
int resolveID;
- HCONTACT resolveContact;
+ MCONTACT resolveContact;
// features & registration
HWND reg_hwndDlg;
@@ -760,7 +760,7 @@ void strdel(char* parBuffer, int len); //---- jabber_userinfo.cpp --------------------------------------------------------------
-void JabberUserInfoUpdate(HCONTACT hContact);
+void JabberUserInfoUpdate(MCONTACT hContact);
//---- jabber_iq_handlers.cpp
BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE);
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index f3777d0ff9..2e0df413f3 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -510,7 +510,7 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int res = -1;
if ((hContact != NULL || lParam != 0) && m_bJabberOnline) {
diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp index fa057d002b..208076acf3 100644 --- a/protocols/JabberG/src/jabber_api.cpp +++ b/protocols/JabberG/src/jabber_api.cpp @@ -56,13 +56,13 @@ int CJabberProto::CompareJIDs(LPCTSTR jid1, LPCTSTR jid2) return JabberCompareJids(jid1, jid2);
}
-HCONTACT CJabberProto::ContactFromJID(LPCTSTR jid)
+MCONTACT CJabberProto::ContactFromJID(LPCTSTR jid)
{
if (jid == NULL) return NULL;
return HContactFromJID(jid);
}
-LPTSTR CJabberProto::ContactToJID(HCONTACT hContact)
+LPTSTR CJabberProto::ContactToJID(MCONTACT hContact)
{
return getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid");
}
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index 11c972ca3b..ae4e61ad05 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -32,7 +32,7 @@ void CJabberProto::EnableArchive(bool bEnable) << XCHILDNS( _T("auto"), JABBER_FEAT_ARCHIVE) << XATTR(_T("save"), (bEnable) ? _T("true") : _T("false")));
}
-void CJabberProto::RetrieveMessageArchive(HCONTACT hContact, JABBER_LIST_ITEM *pItem)
+void CJabberProto::RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *pItem)
{
if (pItem->bHistoryRead)
return;
@@ -60,7 +60,7 @@ void CJabberProto::OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*) if (!list || lstrcmp( xmlGetAttrValue(list, _T("xmlns")), JABBER_FEAT_ARCHIVE))
return;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
time_t tmLast = 0;
for (int nodeIdx = 1; ; nodeIdx++) {
@@ -95,11 +95,11 @@ void CJabberProto::OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*) /////////////////////////////////////////////////////////////////////////////////////////
static DWORD dwPreviousTimeStamp = -1;
-static HCONTACT hPreviousContact = (HCONTACT)INVALID_HANDLE_VALUE;
+static MCONTACT hPreviousContact = INVALID_CONTACT_ID;
static HANDLE hPreviousDbEvent = NULL;
// Returns TRUE if the event already exist in the database
-BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO& dbei)
+BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei)
{
HANDLE hExistingDbEvent;
DWORD dwEventTimeStamp;
@@ -240,7 +240,7 @@ BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO& dbei) }
}
// reset last event
- hPreviousContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ hPreviousContact = INVALID_CONTACT_ID;
return FALSE;
}
@@ -258,7 +258,7 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) if (!start || !with)
return;
- HCONTACT hContact = HContactFromJID(with);
+ MCONTACT hContact = HContactFromJID(with);
time_t tmStart = str2time(start);
if (hContact == 0 || tmStart == 0)
return;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 4e1ce74aa6..f11323d14a 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -132,7 +132,7 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) gcw.ptszID = item->jid;
CallServiceSync(MS_GC_NEWSESSION, NULL, (LPARAM)&gcw);
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (hContact != NULL) {
if (JABBER_LIST_ITEM *bookmark = ListGetItemPtr(LIST_BOOKMARK, item->jid))
if (bookmark->name) {
@@ -600,7 +600,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) mir_sntprintf(sttRJidBuf, SIZEOF(sttRJidBuf), TranslateT("Real &JID: %s"), him->m_tszRealJid);
if (TCHAR *tmp = _tcschr(sttRJidBuf, _T('/'))) *tmp = 0;
- if (HCONTACT hContact = HContactFromJID(him->m_tszRealJid)) {
+ if (MCONTACT hContact = HContactFromJID(him->m_tszRealJid)) {
gcmi->Item[3].uType = MENU_HMENU;
gcmi->Item[3].dwID = CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
sttShowGcMenuItems(gcmi, sttRJidItems, 0);
@@ -662,7 +662,7 @@ class CGroupchatInviteDlg : public CJabberDlgBase void FilterList(CCtrlClc *)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (lstrcmpA(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
if (HANDLE hItem = m_clc.FindContact(hContact))
@@ -740,7 +740,7 @@ public: m_txtNewJid.GetText(buf, SIZEOF(buf));
m_txtNewJid.SetTextA("");
- HCONTACT hContact = m_proto->HContactFromJID(buf);
+ MCONTACT hContact = m_proto->HContactFromJID(buf);
if (hContact)
{
int hItem = SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
@@ -776,7 +776,7 @@ public: HWND hwndList = GetDlgItem(m_hwnd, IDC_CLIST);
// invite users from roster
- for (HCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
if (m_proto->isChatRoom(hContact))
continue;
@@ -1003,7 +1003,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if ((gch->dwData >= CLISTMENUIDMIN) && (gch->dwData <= CLISTMENUIDMAX)) {
if (him->m_tszRealJid && *him->m_tszRealJid)
- if (HCONTACT hContact = ppro->HContactFromJID(him->m_tszRealJid))
+ if (MCONTACT hContact = ppro->HContactFromJID(him->m_tszRealJid))
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(gch->dwData, MPCF_CONTACTMENU), (LPARAM)hContact);
return;
}
@@ -1039,7 +1039,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* JABBER_LIST_ITEM *item = ppro->ListAdd(LIST_VCARD_TEMP, jsr.jid);
ppro->ListAddResource(LIST_VCARD_TEMP, jsr.jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
- HCONTACT hContact = (HCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
+ MCONTACT hContact = (MCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
}
break;
@@ -1202,7 +1202,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* case IDM_RJID_VCARD:
if (him->m_tszRealJid && *him->m_tszRealJid) {
- HCONTACT hContact;
+ MCONTACT hContact;
JABBER_SEARCH_RESULT jsr = { 0 };
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
mir_sntprintf(jsr.jid, SIZEOF(jsr.jid), _T("%s"), him->m_tszRealJid);
@@ -1211,7 +1211,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* JABBER_LIST_ITEM *item = ppro->ListAdd(LIST_VCARD_TEMP, jsr.jid);
ppro->ListAddResource(LIST_VCARD_TEMP, jsr.jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
- hContact = (HCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
+ hContact = (MCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
}
break;
@@ -1305,7 +1305,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g item = ppro->ListGetItemPtr(LIST_CHATROOM, gch->pDest->ptszID);
if (item != NULL) {
item->type = _T("conference");
- HCONTACT hContact = ppro->HContactFromJID(item->jid);
+ MCONTACT hContact = ppro->HContactFromJID(item->jid);
item->name = pcli->pfnGetContactDisplayName(hContact, 0);
ppro->AddEditBookmark(item);
}
@@ -1328,7 +1328,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g case IDM_PRESENCE_NA:
case IDM_PRESENCE_DND:
case IDM_PRESENCE_FREE4CHAT:
- if (HCONTACT h = ppro->HContactFromJID(item->jid))
+ if (MCONTACT h = ppro->HContactFromJID(item->jid))
ppro->OnMenuHandleDirectPresence((WPARAM)h, 0, gch->dwData);
break;
@@ -1369,7 +1369,7 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co {
TCHAR szFullJid[JABBER_MAX_JID_LEN];
mir_sntprintf(szFullJid, SIZEOF(szFullJid), _T("%s/%s"), item->jid, nick);
- HCONTACT hContact = ppro->DBCreateContact(szFullJid, NULL, TRUE, FALSE);
+ MCONTACT hContact = ppro->DBCreateContact(szFullJid, NULL, TRUE, FALSE);
if (hContact != NULL) {
pResourceStatus r(item->findResource(nick));
if (r)
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index 1453e9f40f..b4722a2b2b 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -406,7 +406,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) {
if ((item=ListGetItemPtrFromIndex(i)) != NULL) {
if (_tcschr(item->jid, '@') == NULL && _tcschr(item->jid, '/') == NULL && item->subscription!=SUB_NONE) {
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (hContact != NULL)
setByte(hContact, "IsTransport", TRUE);
@@ -1237,7 +1237,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM if (!items[i].feature) {
if (items[i].title) {
- HCONTACT hContact;
+ MCONTACT hContact;
if ((items[i].action == SD_ACT_USERMENU) && (hContact = HContactFromJID(pNode->GetJid()))) {
HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
AppendMenu(hMenu, MF_STRING|MF_POPUP, (UINT_PTR)hContactMenu, TranslateTS(items[i].title));
@@ -1397,7 +1397,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_USERMENU:
{
- HCONTACT hContact = HContactFromJID(pNode->GetJid());
+ MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (!hContact) {
hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), TRUE, FALSE);
JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
@@ -1413,12 +1413,12 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_VCARD:
{
TCHAR *jid = pNode->GetJid();
- HCONTACT hContact = HContactFromJID(pNode->GetJid());
+ MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (!hContact) {
JABBER_SEARCH_RESULT jsr={0};
mir_sntprintf(jsr.jid, SIZEOF(jsr.jid), _T("%s"), jid);
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
- hContact = (HCONTACT)CallProtoService(m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
+ hContact = (MCONTACT)CallProtoService(m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
}
if (ListGetItemPtr(LIST_VCARD_TEMP, pNode->GetJid()) == NULL) {
JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
@@ -1432,7 +1432,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_ROSTER:
{
- HCONTACT hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), FALSE, FALSE);
+ MCONTACT hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), FALSE, FALSE);
db_unset(hContact, "CList", "NotOnList");
JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
@@ -1453,7 +1453,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM default:
if ((res >= CLISTMENUIDMIN) && (res <= CLISTMENUIDMAX)) {
- HCONTACT hContact = HContactFromJID(pNode->GetJid());
+ MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (hContact)
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), (LPARAM)hContact);
}
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index f9795c7ac9..4fb8a4a3c1 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -36,7 +36,7 @@ int CJabberProto::OnContactDeleted(WPARAM wParam, LPARAM) if (!m_bJabberOnline) // should never happen
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT jid(getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid"));
if (jid == NULL)
return 0;
@@ -75,7 +75,7 @@ static TCHAR* sttSettingToTchar(DBCONTACTWRITESETTING *cws) return NULL;
}
-void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrT(getTStringA(hContact, "jid")));
if (item == NULL)
@@ -106,7 +106,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, HCONTACT hC }
}
-void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrT( getTStringA(hContact, "jid")));
if (item == NULL)
@@ -126,7 +126,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, HCONTACT }
}
-void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
if (cws->value.type != DBVT_DELETED && !(cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
return;
@@ -159,7 +159,7 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, HCONT int __cdecl CJabberProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL || !m_bJabberOnline)
return 0;
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index c36d2cdc77..bbf4cae4f7 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -185,7 +185,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleJoinGroupchat(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT jid( getTStringA(hContact, "ChatRoomID"));
if (jid == NULL)
return 0;
@@ -210,7 +210,7 @@ INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT jid(getTStringA(hContact, "ChatRoomID"));
if (jid != NULL) {
if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE) {
@@ -791,7 +791,7 @@ void CJabberProto::RenameParticipantNick(JABBER_LIST_ITEM *item, const TCHAR *ol if (!lstrcmp(item->nick, oldNick)) {
replaceStrT(item->nick, newNick);
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (hContact != NULL)
setTString(hContact, "MyNick", newNick);
}
@@ -931,7 +931,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (r && bRoleChanged) GcLogShowInformation(item, r, INFO_ROLE);
// update clist status
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact != NULL)
setWord(hContact, "Status", status);
@@ -992,7 +992,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) GcLogUpdateMemberStatus(item, resource, nick, str, GC_EVENT_PART, statusNode);
ListRemoveResource(LIST_CHATROOM, from);
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact != NULL)
setWord(hContact, "Status", ID_STATUS_OFFLINE);
}
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 8c36b3d02b..53491363bd 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -384,7 +384,7 @@ int CJabberProto::OnReloadIcons(WPARAM, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
// Prototype for Jabber and other protocols to return index of Advanced status
-// wParam - HCONTACT of called protocol
+// wParam - MCONTACT of called protocol
// lParam - should be 0 (reserverd for futher usage)
// return value: -1 - no Advanced status
// : other - index of icons in clcimagelist.
@@ -393,7 +393,7 @@ int CJabberProto::OnReloadIcons(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return -1;
@@ -415,7 +415,7 @@ INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM wParam, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
// Transport check functions
-BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR *jid, HCONTACT hContact)
+BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR *jid, MCONTACT hContact)
{
// check if transport is already set
if (!jid || !hContact)
@@ -455,7 +455,7 @@ BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR *jid, HCONTACT hConta void CJabberProto::CheckAllContactsAreTransported()
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT jid( getTStringA(hContact, "jid"));
if (jid)
DBCheckIsTransportedContact(jid, hContact);
diff --git a/protocols/JabberG/src/jabber_iq.h b/protocols/JabberG/src/jabber_iq.h index 3eece1ec6e..cd229247ca 100644 --- a/protocols/JabberG/src/jabber_iq.h +++ b/protocols/JabberG/src/jabber_iq.h @@ -70,7 +70,7 @@ public: TCHAR *m_szChildTagXmlns;
TCHAR *m_szChildTagName;
HXML m_pChildNode;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
TCHAR *m_szTo;
TCHAR *m_szId;
@@ -117,7 +117,7 @@ public: __forceinline TCHAR* GetIdStr()
{ return m_szId;
}
- __forceinline HCONTACT GetHContact()
+ __forceinline MCONTACT GetHContact()
{ return m_hContact;
}
__forceinline HXML GetChildNode()
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index bd360cd167..d783fb189c 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -525,7 +525,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) }
JABBER_LIST_ITEM *item;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
const TCHAR *jid, *str, *name;
TCHAR *nick;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 04f05dd3e8..acb1ce6fe6 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -313,7 +313,7 @@ void CJabberProto::OnIqResultSession(HXML iqNode, CJabberIqInfo *pInfo) OnLoggedIn();
}
-void CJabberProto::GroupchatJoinByHContact(HCONTACT hContact, bool autojoin)
+void CJabberProto::GroupchatJoinByHContact(MCONTACT hContact, bool autojoin)
{
ptrT roomjid( getTStringA(hContact, "ChatRoomID"));
if (roomjid == NULL)
@@ -425,7 +425,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) }
}
- HCONTACT hContact = HContactFromJID(jid);
+ MCONTACT hContact = HContactFromJID(jid);
if (hContact == NULL) {
// Received roster has a new JID.
// Add the jid (with empty resource) to Miranda contact list.
@@ -496,8 +496,8 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) // Delete orphaned contacts (if roster sync is enabled)
if (m_options.RosterSync == TRUE) {
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
- HCONTACT hNext = db_find_next(hContact, m_szModuleName);
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
+ MCONTACT hNext = db_find_next(hContact, m_szModuleName);
ptrT jid( getTStringA(hContact, "jid"));
if (jid != NULL && !ListGetItemPtr(LIST_ROSTER, jid)) {
debugLogA("Syncing roster: preparing to delete %S (hContact=0x%x)", jid, hContact);
@@ -515,7 +515,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) if (m_options.AutoJoinConferences)
for (i=0; i < chatRooms.getCount(); i++)
- GroupchatJoinByHContact((HCONTACT)chatRooms[i], true);
+ GroupchatJoinByHContact((MCONTACT)chatRooms[i], true);
//UI_SAFE_NOTIFY(m_pDlgJabberJoinGroupchat, WM_JABBER_CHECK_ONLINE);
//UI_SAFE_NOTIFY(m_pDlgBookmarks, WM_JABBER_CHECK_ONLINE);
@@ -565,7 +565,7 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) if ((from = xmlGetAttrValue(iqNode, _T("from"))) == NULL) return;
if (!lstrcmp(type, _T("result"))) {
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact != NULL)
setByte(hContact, "IsTransport", TRUE);
@@ -583,7 +583,7 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) /////////////////////////////////////////////////////////////////////////////////////////
// JabberIqResultGetVcard - processes the server-side v-card
-void CJabberProto::OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, HCONTACT hContact, bool &hasPhoto)
+void CJabberProto::OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, MCONTACT hContact, bool &hasPhoto)
{
debugLogA("JabberIqResultGetVcardPhoto: %d", hasPhoto);
if (hasPhoto)
@@ -661,7 +661,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) {
HXML vCardNode, m, n, o;
const TCHAR *type, *jid;
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR text[128];
DBVARIANT dbv;
@@ -1284,7 +1284,7 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo*) if (from == NULL)
return;
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact == NULL)
return;
@@ -1324,7 +1324,7 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*) const TCHAR *from = xmlGetAttrValue(iqNode, _T("from"));
if (from == NULL)
return;
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact == NULL)
return;
@@ -1363,7 +1363,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo *pInfo) if (from == NULL)
return;
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact == NULL)
return;
@@ -1396,7 +1396,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo *pInfo) }
-void CJabberProto::OnIqResultGotAvatar(HCONTACT hContact, HXML n, const TCHAR *mimeType)
+void CJabberProto::OnIqResultGotAvatar(MCONTACT hContact, HXML n, const TCHAR *mimeType)
{
unsigned resultLen;
ptrA body((char*)mir_base64_decode( _T2A(xmlGetText(n)), &resultLen));
diff --git a/protocols/JabberG/src/jabber_list.h b/protocols/JabberG/src/jabber_list.h index eaddb149eb..081da8675f 100644 --- a/protocols/JabberG/src/jabber_list.h +++ b/protocols/JabberG/src/jabber_list.h @@ -212,9 +212,9 @@ struct JABBER_LIST_ITEM : public MZeroedObject struct JABBER_HTTP_AVATARS
{
char * Url;
- HCONTACT hContact;
+ MCONTACT hContact;
- JABBER_HTTP_AVATARS(const TCHAR *tUrl, HCONTACT thContact)
+ JABBER_HTTP_AVATARS(const TCHAR *tUrl, MCONTACT thContact)
: Url(mir_t2a(tUrl)), hContact(thContact) {}
~JABBER_HTTP_AVATARS() { mir_free(Url); }
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index b644efbbd8..c816f155e1 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -73,7 +73,7 @@ static INT_PTR JabberMenuChooseService(WPARAM wParam, LPARAM lParam) return 0;
}
-static CJabberProto* JabberGetInstanceByHContact(HCONTACT hContact)
+static CJabberProto* JabberGetInstanceByHContact(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -88,73 +88,73 @@ static CJabberProto* JabberGetInstanceByHContact(HCONTACT hContact) static INT_PTR JabberMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuHandleRequestAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuHandleGrantAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuRevokeAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuRevokeAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuConvertChatContact(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuConvertChatContact(wParam, lParam) : 0;
}
static INT_PTR JabberMenuRosterAdd(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuRosterAdd(wParam, lParam) : 0;
}
static INT_PTR JabberMenuBookmarkAdd(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuBookmarkAdd(wParam, lParam) : 0;
}
static INT_PTR JabberMenuTransportLogin(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuTransportLogin(wParam, lParam) : 0;
}
static INT_PTR JabberMenuTransportResolve(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuTransportResolve(wParam, lParam) : 0;
}
static INT_PTR JabberContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->ContactMenuRunCommands(wParam, lParam) : 0;
}
static INT_PTR JabberMenuSendNote(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuSendNote(wParam, lParam) : 0;
}
static INT_PTR JabberMenuHandleResource(WPARAM wParam, LPARAM lParam, LPARAM lRes)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuHandleResource(wParam, lParam, lRes) : 0;
}
static INT_PTR JabberMenuHandleDirectPresence(WPARAM wParam, LPARAM lParam, LPARAM lRes)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuHandleDirectPresence(wParam, lParam, lRes) : 0;
}
@@ -173,7 +173,7 @@ static int JabberPrebuildContactMenu(WPARAM wParam, LPARAM lParam) Menu_ShowItem(g_hMenuResourcesRoot, FALSE);
Menu_ShowItem(g_hMenuDirectPresence[0], FALSE);
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnPrebuildContactMenu(wParam, lParam) : 0;
}
@@ -347,7 +347,7 @@ void g_MenuUninit(void) int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -479,7 +479,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
BYTE bIsChatRoom = isChatRoom(hContact);
const char *szSetting = (bIsChatRoom) ? "ChatRoomID" : "jid";
@@ -494,7 +494,7 @@ INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -524,7 +524,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -535,7 +535,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -546,7 +546,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -557,7 +557,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -573,7 +573,7 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -585,7 +585,7 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -977,7 +977,7 @@ void CJabberProto::MenuUpdateSrmmIcon(JABBER_LIST_ITEM *item) if (item->list != LIST_ROSTER)
return;
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (!hContact)
return;
@@ -1043,7 +1043,7 @@ int CJabberProto::OnProcessSrmmIconClick(WPARAM wParam, LPARAM lParam) if (lstrcmpA(sicd->szModule, m_szModuleName))
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0;
@@ -1097,7 +1097,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM wParam, LPARAM, LPARAM if (!m_bJabberOnline || !wParam)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT tszJid(getTStringA(hContact, "jid"));
if (tszJid == NULL)
return 0;
@@ -1129,7 +1129,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM wParam, LPARAM l if (!m_bJabberOnline || !wParam)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TCHAR *jid, text[1024];
ptrT tszJid(getTStringA(hContact, "jid"));
diff --git a/protocols/JabberG/src/jabber_message_manager.h b/protocols/JabberG/src/jabber_message_manager.h index e2bc848e2b..ab12cf7ca7 100644 --- a/protocols/JabberG/src/jabber_message_manager.h +++ b/protocols/JabberG/src/jabber_message_manager.h @@ -57,7 +57,7 @@ public: LPCTSTR m_szChildTagXmlns;
LPCTSTR m_szChildTagName;
HXML m_hChildNode;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
LPCTSTR m_szTo;
LPCTSTR m_szId;
@@ -77,7 +77,7 @@ public: __forceinline LPCTSTR GetIdStr()
{ return m_szId;
}
- __forceinline HCONTACT GetHContact()
+ __forceinline MCONTACT GetHContact()
{ return m_hContact;
}
__forceinline HXML GetChildNode()
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 04af56aec0..e3b56f08b5 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -70,7 +70,7 @@ int JabberCompareJids(const TCHAR *jid1, const TCHAR *jid2) void CJabberProto::DBAddAuthRequest(const TCHAR *jid, const TCHAR *nick)
{
- HCONTACT hContact = DBCreateContact(jid, nick, TRUE, TRUE);
+ MCONTACT hContact = DBCreateContact(jid, nick, TRUE, TRUE);
delSetting(hContact, "Hidden");
char* szJid = mir_utf8encodeT(jid);
@@ -103,7 +103,7 @@ void CJabberProto::DBAddAuthRequest(const TCHAR *jid, const TCHAR *nick) ///////////////////////////////////////////////////////////////////////////////
// JabberDBCreateContact()
-HCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL temporary, BOOL stripResource)
+MCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL temporary, BOOL stripResource)
{
if (jid == NULL || jid[0]=='\0')
return NULL;
@@ -120,7 +120,7 @@ HCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL // We can't use JabberHContactFromJID() here because of the stripResource option
size_t len = _tcslen(s);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL)
continue;
@@ -130,7 +130,7 @@ HCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL return hContact;
}
- HCONTACT hNewContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hNewContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hNewContact, (LPARAM)m_szModuleName);
setTString(hNewContact, "jid", s);
if (nick != NULL && *nick != '\0')
@@ -144,7 +144,7 @@ HCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL return hNewContact;
}
-BOOL CJabberProto::AddDbPresenceEvent(HCONTACT hContact, BYTE btEventType)
+BOOL CJabberProto::AddDbPresenceEvent(MCONTACT hContact, BYTE btEventType)
{
if (!hContact)
return FALSE;
@@ -179,7 +179,7 @@ BOOL CJabberProto::AddDbPresenceEvent(HCONTACT hContact, BYTE btEventType) ///////////////////////////////////////////////////////////////////////////////
// JabberGetAvatarFileName() - gets a file name for the avatar image
-void CJabberProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen)
+void CJabberProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
@@ -219,7 +219,7 @@ void CJabberProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t c void CJabberProto::ResolveTransportNicks(const TCHAR *jid)
{
// Set all contacts to offline
- HCONTACT hContact = m_ThreadInfo->resolveContact;
+ MCONTACT hContact = m_ThreadInfo->resolveContact;
if (hContact == NULL)
hContact = db_find_first(m_szModuleName);
@@ -320,7 +320,7 @@ static sttCapsNodeToName_Map[] = void CJabberProto::UpdateMirVer(JABBER_LIST_ITEM *item)
{
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (!hContact)
return;
@@ -396,7 +396,7 @@ void CJabberProto::FormatMirVer(pResourceStatus &resource, CMString &res) }
-void CJabberProto::UpdateMirVer(HCONTACT hContact, pResourceStatus &resource)
+void CJabberProto::UpdateMirVer(MCONTACT hContact, pResourceStatus &resource)
{
CMString tszMirVer;
FormatMirVer(resource, tszMirVer);
@@ -415,7 +415,7 @@ void CJabberProto::UpdateMirVer(HCONTACT hContact, pResourceStatus &resource) setTString(hContact, DBSETTING_DISPLAY_UID, szFullJid);
}
-void CJabberProto::UpdateSubscriptionInfo(HCONTACT hContact, JABBER_LIST_ITEM *item)
+void CJabberProto::UpdateSubscriptionInfo(MCONTACT hContact, JABBER_LIST_ITEM *item)
{
switch (item->subscription) {
case SUB_TO:
@@ -445,7 +445,7 @@ void CJabberProto::UpdateSubscriptionInfo(HCONTACT hContact, JABBER_LIST_ITEM *i }
}
-void CJabberProto::SetContactOfflineStatus(HCONTACT hContact)
+void CJabberProto::SetContactOfflineStatus(MCONTACT hContact)
{
if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
setWord(hContact, "Status", ID_STATUS_OFFLINE);
@@ -482,7 +482,7 @@ void CJabberProto::InitPopups(void) Skin_ReleaseIcon(ppc.hIcon);
}
-void CJabberProto::MsgPopup(HCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle)
+void CJabberProto::MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle)
{
if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
char name[256];
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index db49f4d08e..9a9f88f1b0 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -813,7 +813,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleNotes(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuSendNote(WPARAM wParam, LPARAM)
{
if (wParam) {
- CNoteItem *pItem = new CNoteItem(NULL, ptrT(getTStringA((HCONTACT)wParam, "jid")));
+ CNoteItem *pItem = new CNoteItem(NULL, ptrT(getTStringA((MCONTACT)wParam, "jid")));
CJabberDlgBase *pDlg = new CJabberDlgNoteItem(this, pItem, &CJabberProto::ProcessOutgoingNote);
pDlg->Show();
}
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index d6720c5a84..a1978f2c89 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -858,7 +858,7 @@ public: JABBER_LIST_ITEM *item = m_proto->ListGetItemPtrFromIndex(index);
if (item != NULL) {
if (_tcschr(item->jid, '@') == NULL) {
- HCONTACT hContact = m_proto->HContactFromJID(item->jid);
+ MCONTACT hContact = m_proto->HContactFromJID(item->jid);
if (hContact != NULL) {
if (bChecked) {
if (item->getTemp()->m_iStatus != m_proto->getWord(hContact, "Status", ID_STATUS_OFFLINE)) {
@@ -1039,7 +1039,7 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) }
// now it is require to process whole contact list to add not in roster contacts
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT tszJid( getTStringA(hContact, "jid"));
if (tszJid == NULL)
continue;
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index f5cb1785c9..e3ecbe6c74 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -418,7 +418,7 @@ public: SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUES, CB_RESETCONTENT, 0, 0);
{
- for (HCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
ptrT jid( m_proto->getTStringA(hContact, "jid"));
if (jid != NULL)
SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUES, CB_ADDSTRING, 0, jid);
@@ -1153,7 +1153,7 @@ void CJabberDlgPrivacyLists::DrawRulesList(LPDRAWITEMSTRUCT lpdis) DrawNextRulePart(lpdis->hDC, clLine1, pRule->GetValue(), &rc);
DrawNextRulePart(lpdis->hDC, clLine2, TranslateT("'"), &rc);
- if (HCONTACT hContact = m_proto->HContactFromJID(pRule->GetValue())) {
+ if (MCONTACT hContact = m_proto->HContactFromJID(pRule->GetValue())) {
TCHAR *szName = pcli->pfnGetContactDisplayName(hContact, 0);
if (szName) {
DrawNextRulePart(lpdis->hDC, clLine2, TranslateT(" (nickname: "), &rc);
@@ -1300,7 +1300,7 @@ void CJabberDlgPrivacyLists::CListResetOptions(HWND) void CJabberDlgPrivacyLists::CListFilter(HWND)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (!proto || lstrcmpA(proto, m_proto->m_szModuleName))
if (HANDLE hItem = m_clcClist.FindContact(hContact))
@@ -1322,7 +1322,7 @@ void CJabberDlgPrivacyLists::CListSetupIcons(HWND, HANDLE hItem, int iSlot, DWOR HANDLE CJabberDlgPrivacyLists::CListAddContact(HWND hwndList, TCHAR *jid)
{
- HCONTACT hContact = m_proto->HContactFromJID(jid);
+ MCONTACT hContact = m_proto->HContactFromJID(jid);
if (hContact)
return m_clcClist.FindContact(hContact);
@@ -1357,7 +1357,7 @@ void CJabberDlgPrivacyLists::CListApplyList(HWND hwndList, CPrivacyList *pList) CListResetIcons(hwndList, hItem, bHideIcons);
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = m_clcClist.FindContact(hContact);
if (hItem)
CListResetIcons(hwndList, hItem, bHideIcons);
@@ -1455,7 +1455,7 @@ void CJabberDlgPrivacyLists::CListBuildList(HWND hwndList, CPrivacyList *pList) pList->AddRule(Jid, szJid, FALSE, dwOrder++, dwPackets);
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
hItem = m_clcClist.FindContact(hContact);
ptrT jid( m_proto->getTStringA(hContact, "jid"));
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index fc34abf429..b380fa7276 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -257,7 +257,7 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM) ConvertPasswords();
// Set all contacts to offline
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
SetContactOfflineStatus(hContact);
if (!getByte(hContact, "IsTransport", 0))
@@ -314,9 +314,9 @@ int __cdecl CJabberProto::OnPreShutdown(WPARAM, LPARAM) ////////////////////////////////////////////////////////////////////////////////////////
// JabberAddToList - adds a contact to the contact list
-HCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags)
+MCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags)
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR *jid, *nick;
debugLogA("AddToListByJID jid = %S", newJid);
@@ -325,7 +325,7 @@ HCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags) // not already there: add
jid = mir_tstrdup(newJid);
debugLogA("Add new jid to contact jid = %S", jid);
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName);
setTString(hContact, "jid", jid);
if ((nick=JabberNickFromJID(newJid)) == NULL)
@@ -358,7 +358,7 @@ HCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags) return hContact;
}
-HCONTACT CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
if (psr->cbSize != sizeof(JABBER_SEARCH_RESULT) && psr->id == NULL)
return NULL;
@@ -368,7 +368,7 @@ HCONTACT CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr) return AddToListByJID(jid, flags);
}
-HCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HANDLE hDbEvent)
+MCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HANDLE hDbEvent)
{
debugLogA("AddToListByEvent");
@@ -398,7 +398,7 @@ HCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HAN char *jid = lastName + strlen(lastName) + 1;
TCHAR *newJid = (dbei.flags & DBEF_UTF) ? mir_utf8decodeT(jid) : mir_a2t(jid);
- HCONTACT hContact = (HCONTACT)AddToListByJID(newJid, flags);
+ MCONTACT hContact = (MCONTACT)AddToListByJID(newJid, flags);
mir_free(newJid);
return hContact;
}
@@ -440,7 +440,7 @@ int CJabberProto::Authorize(HANDLE hDbEvent) if ((item = ListGetItemPtr(LIST_ROSTER, newJid)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
debugLogA("Try adding contact automatically jid = %S", jid);
- if (HCONTACT hContact = AddToListByJID(newJid, 0)) {
+ if (MCONTACT hContact = AddToListByJID(newJid, 0)) {
// Trigger actual add by removing the "NotOnList" added by AddToListByJID()
// See AddToListByJID() and JabberDbSettingChanged().
db_unset(hContact, "CList", "NotOnList");
@@ -492,7 +492,7 @@ int CJabberProto::AuthDeny(HANDLE hDbEvent, const TCHAR*) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CJabberProto::AuthRecv(HCONTACT, PROTORECVEVENT*)
+int __cdecl CJabberProto::AuthRecv(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -500,7 +500,7 @@ int __cdecl CJabberProto::AuthRecv(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CJabberProto::AuthRequest(HCONTACT, const TCHAR*)
+int __cdecl CJabberProto::AuthRequest(MCONTACT, const TCHAR*)
{
return 1;
}
@@ -516,7 +516,7 @@ HANDLE __cdecl CJabberProto::ChangeInfo(int /*iInfoType*/, void*) ////////////////////////////////////////////////////////////////////////////////////////
// JabberFileAllow - starts a file transfer
-HANDLE __cdecl CJabberProto::FileAllow(HCONTACT /*hContact*/, HANDLE hTransfer, const TCHAR *szPath)
+HANDLE __cdecl CJabberProto::FileAllow(MCONTACT /*hContact*/, HANDLE hTransfer, const TCHAR *szPath)
{
if (!m_bJabberOnline)
return 0;
@@ -544,7 +544,7 @@ HANDLE __cdecl CJabberProto::FileAllow(HCONTACT /*hContact*/, HANDLE hTransfer, ////////////////////////////////////////////////////////////////////////////////////////
// JabberFileCancel - cancels a file transfer
-int __cdecl CJabberProto::FileCancel(HCONTACT, HANDLE hTransfer)
+int __cdecl CJabberProto::FileCancel(MCONTACT, HANDLE hTransfer)
{
filetransfer *ft = (filetransfer*)hTransfer;
HANDLE hEvent;
@@ -572,7 +572,7 @@ int __cdecl CJabberProto::FileCancel(HCONTACT, HANDLE hTransfer) ////////////////////////////////////////////////////////////////////////////////////////
// JabberFileDeny - denies a file transfer
-int __cdecl CJabberProto::FileDeny(HCONTACT, HANDLE hTransfer, const TCHAR *)
+int __cdecl CJabberProto::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR *)
{
if (!m_bJabberOnline)
return 1;
@@ -616,7 +616,7 @@ int __cdecl CJabberProto::FileResume(HANDLE hTransfer, int *action, const TCHAR ////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CJabberProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR __cdecl CJabberProto::GetCaps(int type, MCONTACT hContact)
{
switch(type) {
case PFLAGNUM_1:
@@ -644,7 +644,7 @@ DWORD_PTR __cdecl CJabberProto::GetCaps(int type, HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// GetInfo - retrieves a contact info
-int __cdecl CJabberProto::GetInfo(HCONTACT hContact, int /*infoType*/)
+int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/)
{
if (!m_bJabberOnline || isChatRoom(hContact))
return 1;
@@ -858,7 +858,7 @@ HANDLE __cdecl CJabberProto::SearchByName(const TCHAR *nick, const TCHAR *firstN ////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CJabberProto::RecvContacts(HCONTACT, PROTORECVEVENT*)
+int __cdecl CJabberProto::RecvContacts(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -866,7 +866,7 @@ int __cdecl CJabberProto::RecvContacts(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// RecvFile
-int __cdecl CJabberProto::RecvFile(HCONTACT hContact, PROTORECVFILET *evt)
+int __cdecl CJabberProto::RecvFile(MCONTACT hContact, PROTORECVFILET *evt)
{
return Proto_RecvFile(hContact, evt);
}
@@ -874,7 +874,7 @@ int __cdecl CJabberProto::RecvFile(HCONTACT hContact, PROTORECVFILET *evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvMsg
-int __cdecl CJabberProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *evt)
+int __cdecl CJabberProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *evt)
{
ptrA szResUtf( mir_utf8encodeT((LPCTSTR)evt->lParam));
evt->pCustomData = szResUtf;
@@ -886,7 +886,7 @@ int __cdecl CJabberProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvUrl
-int __cdecl CJabberProto::RecvUrl(HCONTACT, PROTORECVEVENT*)
+int __cdecl CJabberProto::RecvUrl(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -894,7 +894,7 @@ int __cdecl CJabberProto::RecvUrl(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CJabberProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int __cdecl CJabberProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
if (!m_bJabberOnline)
return 0;
@@ -924,7 +924,7 @@ int __cdecl CJabberProto::SendContacts(HCONTACT hContact, int flags, int nContac ////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CJabberProto::SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR** ppszFiles)
+HANDLE __cdecl CJabberProto::SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR** ppszFiles)
{
if (!m_bJabberOnline) return 0;
@@ -1011,10 +1011,10 @@ HANDLE __cdecl CJabberProto::SendFile(HCONTACT hContact, const TCHAR *szDescript struct TFakeAckParams
{
- inline TFakeAckParams(HCONTACT _hContact, const char* _msg, int _msgid = 0)
+ inline TFakeAckParams(MCONTACT _hContact, const char* _msg, int _msgid = 0)
: hContact(_hContact), msg(_msg), msgid(_msgid) {}
- HCONTACT hContact;
+ MCONTACT hContact;
const char *msg;
int msgid;
};
@@ -1034,7 +1034,7 @@ void __cdecl CJabberProto::SendMessageAckThread(void* param) static char PGP_PROLOG[] = "-----BEGIN PGP MESSAGE-----\r\n\r\n";
static char PGP_EPILOG[] = "\r\n-----END PGP MESSAGE-----\r\n";
-int __cdecl CJabberProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
{
TCHAR szClientJid[JABBER_MAX_JID_LEN];
if (!m_bJabberOnline || !GetClientJID(hContact, szClientJid, SIZEOF(szClientJid))) {
@@ -1134,7 +1134,7 @@ int __cdecl CJabberProto::SendMsg(HCONTACT hContact, int flags, const char* pszS ////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CJabberProto::SendUrl(HCONTACT, int /*flags*/, const char* /*url*/)
+int __cdecl CJabberProto::SendUrl(MCONTACT, int /*flags*/, const char* /*url*/)
{
return 1;
}
@@ -1142,7 +1142,7 @@ int __cdecl CJabberProto::SendUrl(HCONTACT, int /*flags*/, const char* /*url*/) ////////////////////////////////////////////////////////////////////////////////////////
// JabberSetApparentMode - sets the visibility status
-int __cdecl CJabberProto::SetApparentMode(HCONTACT hContact, int mode)
+int __cdecl CJabberProto::SetApparentMode(MCONTACT hContact, int mode)
{
if (mode != 0 && mode != ID_STATUS_ONLINE && mode != ID_STATUS_OFFLINE)
return 1;
@@ -1224,7 +1224,7 @@ int __cdecl CJabberProto::SetStatus(int iNewStatus) void __cdecl CJabberProto::GetAwayMsgThread(void *param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
ptrT jid( getTStringA(hContact, "jid"));
if (jid != NULL) {
@@ -1272,7 +1272,7 @@ void __cdecl CJabberProto::GetAwayMsgThread(void *param) ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)0);
}
-HANDLE __cdecl CJabberProto::GetAwayMsg(HCONTACT hContact)
+HANDLE __cdecl CJabberProto::GetAwayMsg(MCONTACT hContact)
{
debugLogA("GetAwayMsg called, hContact=%08X", hContact);
@@ -1283,7 +1283,7 @@ HANDLE __cdecl CJabberProto::GetAwayMsg(HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG
-int __cdecl CJabberProto::RecvAwayMsg(HCONTACT, int /*statusMode*/, PROTORECVEVENT*)
+int __cdecl CJabberProto::RecvAwayMsg(MCONTACT, int /*statusMode*/, PROTORECVEVENT*)
{
return 1;
}
@@ -1344,7 +1344,7 @@ int __cdecl CJabberProto::SetAwayMsg(int status, const TCHAR *msg) /////////////////////////////////////////////////////////////////////////////////////////
// JabberUserIsTyping - sends a UTN notification
-int __cdecl CJabberProto::UserIsTyping(HCONTACT hContact, int type)
+int __cdecl CJabberProto::UserIsTyping(MCONTACT hContact, int type)
{
if (!m_bJabberOnline) return 0;
@@ -1426,7 +1426,7 @@ void CJabberProto::InfoFrame_OnSetup(CJabberInfoFrame_Event*) void CJabberProto::InfoFrame_OnTransport(CJabberInfoFrame_Event *evt)
{
if (evt->m_event == CJabberInfoFrame_Event::CLICK) {
- HCONTACT hContact = (HCONTACT)evt->m_pUserData;
+ MCONTACT hContact = (MCONTACT)evt->m_pUserData;
HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
POINT pt;
GetCursorPos(&pt);
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 80b206ce71..84533eb9da 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -82,23 +82,23 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
@@ -106,24 +106,24 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char *msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char *url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
@@ -132,7 +132,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam);
//====| Events |======================================================================
- void __cdecl OnAddContactForever(DBCONTACTWRITESETTING* cws, HCONTACT hContact);
+ void __cdecl OnAddContactForever(DBCONTACTWRITESETTING* cws, MCONTACT hContact);
int __cdecl OnContactDeleted(WPARAM, LPARAM);
int __cdecl OnDbSettingChanged(WPARAM, LPARAM);
int __cdecl OnIdleChanged(WPARAM, LPARAM);
@@ -145,8 +145,8 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface int __cdecl OnProcessSrmmIconClick(WPARAM, LPARAM);
int __cdecl OnProcessSrmmEvent(WPARAM, LPARAM);
int __cdecl OnReloadIcons(WPARAM, LPARAM);
- void __cdecl OnRenameContact(DBCONTACTWRITESETTING* cws, HCONTACT hContact);
- void __cdecl OnRenameGroup(DBCONTACTWRITESETTING* cws, HCONTACT hContact);
+ void __cdecl OnRenameContact(DBCONTACTWRITESETTING* cws, MCONTACT hContact);
+ void __cdecl OnRenameGroup(DBCONTACTWRITESETTING* cws, MCONTACT hContact);
int __cdecl OnUserInfoInit(WPARAM, LPARAM);
int __cdecl JabberGcEventHook(WPARAM, LPARAM);
@@ -294,7 +294,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface //---- jabber_archive.c --------------------------------------------------------------
void EnableArchive(bool bEnable);
- void RetrieveMessageArchive(HCONTACT hContact, JABBER_LIST_ITEM *pItem);
+ void RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *pItem);
void OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*);
void OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*);
@@ -451,7 +451,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface int LoadAdvancedIcons(int iID);
int GetTransportProtoID(TCHAR* TransportDomain);
int GetTransportStatusIconIndex(int iID, int Status);
- BOOL DBCheckIsTransportedContact(const TCHAR *jid, HCONTACT hContact);
+ BOOL DBCheckIsTransportedContact(const TCHAR *jid, MCONTACT hContact);
void CheckAllContactsAreTransported(void);
INT_PTR __cdecl JGetAdvancedStatusIcon(WPARAM wParam, LPARAM lParam);
@@ -472,7 +472,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo *pInfo);
void OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo *pInfo);
void OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo *pInfo);
- void OnIqResultGotAvatar(HCONTACT hContact, HXML n, const TCHAR *mimeType);
+ void OnIqResultGotAvatar(MCONTACT hContact, HXML n, const TCHAR *mimeType);
void OnIqResultGetMuc(HXML iqNode, CJabberIqInfo *pInfo);
void OnIqResultGetRegister(HXML iqNode, CJabberIqInfo *pInfo);
void OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo);
@@ -528,7 +528,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface //---- jabber_iqid.cpp ---------------------------------------------------------------
- void GroupchatJoinByHContact(HCONTACT hContact, bool autojoin=false);
+ void GroupchatJoinByHContact(MCONTACT hContact, bool autojoin=false);
//---- jabber_message_handlers.cpp ---------------------------------------------------
@@ -560,7 +560,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void OnIqResultMucGetJidList(HXML iqNode, JABBER_MUC_JIDLIST_TYPE listType);
void OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo *pInfo);
- void OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, HCONTACT hContact, bool &hasPhoto);
+ void OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, MCONTACT hContact, bool &hasPhoto);
void SetBookmarkRequest (XmlNodeIq& iqId);
//---- jabber_menu.cpp ---------------------------------------------------------------
@@ -584,7 +584,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void MenuInit(void);
void MenuUpdateSrmmIcon(JABBER_LIST_ITEM *item);
- void AuthWorker(HCONTACT hContact, char* authReqType);
+ void AuthWorker(MCONTACT hContact, char* authReqType);
void UpdatePriorityMenu(short priority);
@@ -599,18 +599,18 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void AddContactToRoster(const TCHAR *jid, const TCHAR *nick, const TCHAR *grpName);
void DBAddAuthRequest(const TCHAR *jid, const TCHAR *nick);
- BOOL AddDbPresenceEvent(HCONTACT hContact, BYTE btEventType);
- HCONTACT DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL temporary, BOOL stripResource);
- void GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen);
+ BOOL AddDbPresenceEvent(MCONTACT hContact, BYTE btEventType);
+ MCONTACT DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL temporary, BOOL stripResource);
+ void GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen);
void ResolveTransportNicks(const TCHAR *jid);
void SetServerStatus(int iNewStatus);
void FormatMirVer(pResourceStatus &resource, CMString&);
void UpdateMirVer(JABBER_LIST_ITEM *item);
- void UpdateMirVer(HCONTACT hContact, pResourceStatus &resource);
- void UpdateSubscriptionInfo(HCONTACT hContact, JABBER_LIST_ITEM *item);
- void SetContactOfflineStatus(HCONTACT hContact);
+ void UpdateMirVer(MCONTACT hContact, pResourceStatus &resource);
+ void UpdateSubscriptionInfo(MCONTACT hContact, JABBER_LIST_ITEM *item);
+ void SetContactOfflineStatus(MCONTACT hContact);
void InitPopups(void);
- void MsgPopup(HCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle);
+ void MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle);
//---- jabber_opt.cpp ----------------------------------------------------------------
@@ -653,7 +653,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void __cdecl GetAwayMsgThread(void* hContact);
void __cdecl SendMessageAckThread(void* hContact);
- HCONTACT AddToListByJID(const TCHAR *newJid, DWORD flags);
+ MCONTACT AddToListByJID(const TCHAR *newJid, DWORD flags);
void WindowSubscribe(HWND hwnd);
void WindowUnsubscribe(HWND hwnd);
void WindowNotify(UINT msg, bool async = false);
@@ -739,7 +739,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void OnProcessProtocol(HXML node, ThreadData *info);
void UpdateJidDbSettings(const TCHAR *jid);
- HCONTACT CreateTemporaryContact(const TCHAR *szJid, JABBER_LIST_ITEM* chatItem);
+ MCONTACT CreateTemporaryContact(const TCHAR *szJid, JABBER_LIST_ITEM* chatItem);
void PerformRegistration(ThreadData* info);
void PerformIqAuth(ThreadData* info);
@@ -759,8 +759,8 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface //---- jabber_util.c -----------------------------------------------------------------
pResourceStatus ResourceInfoFromJID(const TCHAR *jid);
- HCONTACT HContactFromJID(const TCHAR *jid, BOOL bStripResource = 3);
- HCONTACT ChatRoomHContactFromJID(const TCHAR *jid);
+ MCONTACT HContactFromJID(const TCHAR *jid, BOOL bStripResource = 3);
+ MCONTACT ChatRoomHContactFromJID(const TCHAR *jid);
void SendVisibleInvisiblePresence(BOOL invisible);
void SendPresenceTo(int status, const TCHAR* to, HXML extra, const TCHAR *msg = NULL);
void SendPresence(int m_iStatus, bool bSendToAll);
@@ -768,7 +768,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void RebuildInfoFrame(void);
// returns buf or NULL on error
- TCHAR* GetClientJID(HCONTACT hContact, TCHAR *dest, size_t destLen);
+ TCHAR* GetClientJID(MCONTACT hContact, TCHAR *dest, size_t destLen);
TCHAR* GetClientJID(const TCHAR *jid, TCHAR *dest, size_t destLen);
void ComboLoadRecentStrings(HWND hwndDlg, UINT idcCombo, char *param, int recentCount=JABBER_DEFAULT_RECENT_COUNT);
@@ -819,16 +819,16 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface HICON GetXStatusIcon(int bStatus, UINT flags);
void RegisterAdvStatusSlot(const char *pszSlot);
- void ResetAdvStatus(HCONTACT hContact, const char *pszSlot);
- void WriteAdvStatus(HCONTACT hContact, const char *pszSlot, const TCHAR *pszMode, const char *pszIcon, const TCHAR *pszTitle, const TCHAR *pszText);
- char* ReadAdvStatusA(HCONTACT hContact, const char *pszSlot, const char *pszValue);
- TCHAR* ReadAdvStatusT(HCONTACT hContact, const char *pszSlot, const char *pszValue);
+ void ResetAdvStatus(MCONTACT hContact, const char *pszSlot);
+ void WriteAdvStatus(MCONTACT hContact, const char *pszSlot, const TCHAR *pszMode, const char *pszIcon, const TCHAR *pszTitle, const TCHAR *pszText);
+ char* ReadAdvStatusA(MCONTACT hContact, const char *pszSlot, const char *pszValue);
+ TCHAR* ReadAdvStatusT(MCONTACT hContact, const char *pszSlot, const char *pszValue);
BOOL SendPepTune(TCHAR* szArtist, TCHAR* szLength, TCHAR* szSource, TCHAR* szTitle, TCHAR* szTrack, TCHAR* szUri);
void XStatusInit(void);
- void SetContactTune(HCONTACT hContact, LPCTSTR szArtist, LPCTSTR szLength, LPCTSTR szSource, LPCTSTR szTitle, LPCTSTR szTrack);
+ void SetContactTune(MCONTACT hContact, LPCTSTR szArtist, LPCTSTR szLength, LPCTSTR szSource, LPCTSTR szTitle, LPCTSTR szTrack);
void InfoFrame_OnUserMood(CJabberInfoFrame_Event *evt);
void InfoFrame_OnUserActivity(CJabberInfoFrame_Event *evt);
@@ -857,8 +857,8 @@ public: DWORD STDMETHODCALLTYPE GetJabberVersion() const; // Returns Jabber plugin version.
int STDMETHODCALLTYPE CompareJIDs(LPCTSTR jid1, LPCTSTR jid2); // Strips resource names from given JIDs and returns result of comparison for these JIDs.
- HCONTACT STDMETHODCALLTYPE ContactFromJID(LPCTSTR jid); // Returns contact handle for given JID.
- LPTSTR STDMETHODCALLTYPE ContactToJID(HCONTACT hContact); // Returns JID of hContact. You must free the result using mir_free().
+ MCONTACT STDMETHODCALLTYPE ContactFromJID(LPCTSTR jid); // Returns contact handle for given JID.
+ LPTSTR STDMETHODCALLTYPE ContactToJID(MCONTACT hContact); // Returns JID of hContact. You must free the result using mir_free().
LPTSTR STDMETHODCALLTYPE GetBestResourceName(LPCTSTR jid); // Returns best resource name for given JID. You must free the result using mir_free().
LPTSTR STDMETHODCALLTYPE GetResourceList(LPCTSTR jid); // Returns all resource names for a given JID in format "resource1\0resource2\0resource3\0\0" (all resources are separated by \0 character and the whole string is terminated with two \0 characters). You must free the string using mir_free().
char* STDMETHODCALLTYPE GetModuleName() const; // Returns Jabber module name.
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index 5df492cb82..a4cbc67229 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -466,7 +466,7 @@ int CJabberProto::AdhocOptionsHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe int CJabberProto::RcGetUnreadEventsCount()
{
int nEventsSent = 0;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL) continue;
@@ -552,7 +552,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe m_options.RcMarkMessagesAsRead = bRemoveCListEvents ? 1 : 0;
int nEventsSent = 0;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT tszJid( getTStringA(hContact, "jid"));
if (tszJid == NULL)
continue;
diff --git a/protocols/JabberG/src/jabber_std.cpp b/protocols/JabberG/src/jabber_std.cpp index 985030607f..1d633787eb 100644 --- a/protocols/JabberG/src/jabber_std.cpp +++ b/protocols/JabberG/src/jabber_std.cpp @@ -41,7 +41,7 @@ void __forceinline sttCryptString(char *str) }
}
-static TCHAR* JSetStringCrypt(LPCSTR szModule, HCONTACT hContact, char *valueName)
+static TCHAR* JSetStringCrypt(LPCSTR szModule, MCONTACT hContact, char *valueName)
{
DBVARIANT dbv;
if (db_get_s(hContact, szModule, valueName, &dbv))
@@ -62,7 +62,7 @@ void CJabberProto::ConvertPasswords() setTString("Password", passw);
delSetting("LoginPassword");
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if ((passw = JSetStringCrypt(m_szModuleName, hContact, "LoginPassword")) == NULL)
continue;
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 6741a69007..d1e828ea2c 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -449,7 +449,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) return 1;
TCHAR *szMsgBody = NULL;
- HCONTACT hContact = HContactFromJID(szJid, TRUE);
+ MCONTACT hContact = HContactFromJID(szJid, TRUE);
if (hContact == NULL)
hContact = DBCreateContact(szJid, szJid, TRUE, TRUE);
if (hContact == NULL)
@@ -520,7 +520,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) if (!ServiceExists(MS_FILE_SENDFILE))
return 1;
- HCONTACT hContact = HContactFromJID(szJid, TRUE);
+ MCONTACT hContact = HContactFromJID(szJid, TRUE);
if (hContact == NULL)
hContact = DBCreateContact(szJid, szJid, TRUE, TRUE);
if (hContact == NULL)
@@ -538,7 +538,7 @@ INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM wParam, LPARAM) if (!m_bJabberOnline)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL)
return 0;
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index eed8b47784..41c7238f64 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -559,7 +559,7 @@ recvRest: ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus);
// Set all contacts to offline
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
SetContactOfflineStatus(hContact);
mir_free(m_szJabberJID);
@@ -995,7 +995,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node) m_pepServices.ProcessEvent(from, eventNode);
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (!hContact)
return;
@@ -1030,7 +1030,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node) }
// returns 0, if error or no events
-DWORD JabberGetLastContactMessageTime(HCONTACT hContact)
+DWORD JabberGetLastContactMessageTime(MCONTACT hContact)
{
// TODO: time cache can improve performance
HANDLE hDbEvent = db_event_last(hContact);
@@ -1051,9 +1051,9 @@ DWORD JabberGetLastContactMessageTime(HCONTACT hContact) return dwTime;
}
-HCONTACT CJabberProto::CreateTemporaryContact(const TCHAR *szJid, JABBER_LIST_ITEM* chatItem)
+MCONTACT CJabberProto::CreateTemporaryContact(const TCHAR *szJid, JABBER_LIST_ITEM* chatItem)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if (chatItem) {
const TCHAR *p = _tcschr(szJid, '/');
if (p != NULL && p[1] != '\0')
@@ -1101,7 +1101,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info) if (m_messageManager.HandleMessagePermanent(node, info))
return;
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
JABBER_LIST_ITEM *chatItem = ListGetItemPtr(LIST_CHATROOM, from);
if (chatItem) {
HXML xCaptcha = xmlGetChild(node, "captcha");
@@ -1353,12 +1353,12 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info) const TCHAR *group = xmlGetText(xmlGetChild(iNode, _T("group")));
if (action && jid && _tcsstr(jid, chkJID)) {
if (!_tcscmp(action, _T("add"))) {
- HCONTACT hContact = DBCreateContact(jid, nick, FALSE, FALSE);
+ MCONTACT hContact = DBCreateContact(jid, nick, FALSE, FALSE);
if (group)
db_set_ts(hContact, "CList", "Group", group);
}
else if (!_tcscmp(action, _T("delete"))) {
- HCONTACT hContact = HContactFromJID(jid);
+ MCONTACT hContact = HContactFromJID(jid);
if (hContact)
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
}
@@ -1462,7 +1462,7 @@ void CJabberProto::OnProcessPresenceCapabilites(HXML node) r->m_tszCapsNode = mir_tstrdup(szNode);
r->m_tszCapsVer = mir_tstrdup(szVer);
r->m_tszCapsExt = mir_tstrdup(szExt);
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact)
UpdateMirVer(hContact, r);
}
@@ -1477,7 +1477,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, jid);
if (item == NULL)
return;
- HCONTACT hContact = HContactFromJID(jid);
+ MCONTACT hContact = HContactFromJID(jid);
if (hContact == NULL)
return;
@@ -1535,7 +1535,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) void CJabberProto::OnProcessPresence(HXML node, ThreadData* info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
HXML showNode;
JABBER_LIST_ITEM *item;
LPCTSTR from, show;
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index adb80356f6..68eaaf10c0 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -74,7 +74,7 @@ struct UserInfoStringBuf struct JabberUserInfoDlgData
{
- HCONTACT hContact;
+ MCONTACT hContact;
CJabberProto *ppro;
JABBER_LIST_ITEM *item;
int resourcesCount;
@@ -311,7 +311,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti sttFillInfoLine(hwndTree, htiSoftwareInfo, NULL, TranslateT("Miranda core version"), r->m_tszXMirandaCoreVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
}
-static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM htiRoot, DWORD dwInfoLine, HCONTACT hContact, TCHAR *szTitle, char *pszSlot)
+static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM htiRoot, DWORD dwInfoLine, MCONTACT hContact, TCHAR *szTitle, char *pszSlot)
{
char *szAdvStatusIcon = ppro->ReadAdvStatusA(hContact, pszSlot, ADVSTATUS_VAL_ICON);
TCHAR *szAdvStatusTitle = ppro->ReadAdvStatusT(hContact, pszSlot, ADVSTATUS_VAL_TITLE);
@@ -340,7 +340,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, ppro->LoadIconEx("main"), _T("JID"), item->jid, sttInfoLineId(0, INFOLINE_NAME), true);
TCHAR buf[256];
- if (HCONTACT hContact = ppro->HContactFromJID(item->jid)) {
+ if (MCONTACT hContact = ppro->HContactFromJID(item->jid)) {
sttFillAdvStatusInfo(ppro, hwndTree, htiRoot, sttInfoLineId(0, INFOLINE_MOOD), hContact, TranslateT("Mood"), ADVSTATUS_MOOD);
sttFillAdvStatusInfo(ppro, hwndTree, htiRoot, sttInfoLineId(0, INFOLINE_ACTIVITY), hContact, TranslateT("Activity"), ADVSTATUS_ACTIVITY);
sttFillAdvStatusInfo(ppro, hwndTree, htiRoot, sttInfoLineId(0, INFOLINE_TUNE), hContact, TranslateT("Tune"), ADVSTATUS_TUNE);
@@ -445,7 +445,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa dat->resourcesCount = -1;
if (CallService(MS_DB_CONTACT_IS, (WPARAM)lParam, 0))
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
else if (!IsBadReadPtr((void*)lParam, sizeof(JABBER_LIST_ITEM))) {
dat->hContact = NULL;
dat->item = (JABBER_LIST_ITEM *)lParam;
@@ -550,7 +550,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa switch (((LPNMHDR)lParam)->code) {
case PSN_INFOCHANGED:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
SendMessage(hwndDlg, WM_JABBER_REFRESH, 0, (LPARAM)hContact);
}
break;
@@ -589,7 +589,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa struct USER_PHOTO_INFO
{
- HCONTACT hContact;
+ MCONTACT hContact;
HBITMAP hBitmap;
CJabberProto *ppro;
};
@@ -605,7 +605,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP // lParam is hContact
TranslateDialogDefault(hwndDlg);
photoInfo = (USER_PHOTO_INFO *) mir_alloc(sizeof(USER_PHOTO_INFO));
- photoInfo->hContact = (HCONTACT)lParam;
+ photoInfo->hContact = (MCONTACT)lParam;
photoInfo->ppro = NULL;
photoInfo->hBitmap = NULL;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) photoInfo);
@@ -800,7 +800,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName))
return 0;
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
if (hContact == NULL) {
// Show our vcard
OnUserInfoInit_VCard(wParam, lParam);
@@ -844,7 +844,7 @@ void JabberUserInfoUninit() /////////////////////////////////////////////////////////////////////////////////////////
// JabberUserInfoUpdate
-void JabberUserInfoUpdate(HCONTACT hContact)
+void JabberUserInfoUpdate(MCONTACT hContact)
{
if (!hContact)
WindowList_BroadcastAsync(hUserInfoList, WM_JABBER_REFRESH, 0, 0);
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 9a881deafb..a93186ee14 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -32,14 +32,14 @@ int CJabberProto::SerialNext(void) }
///////////////////////////////////////////////////////////////////////////////
-// JabberChatRoomHContactFromJID - looks for the char room HCONTACT with required JID
+// JabberChatRoomHContactFromJID - looks for the char room MCONTACT with required JID
-HCONTACT CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid)
+MCONTACT CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid)
{
if (jid == NULL)
return NULL;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT dbJid( getTStringA(hContact, "ChatRoomID"));
if (dbJid == NULL)
if ((dbJid = getTStringA(hContact, "jid")) == NULL)
@@ -53,16 +53,16 @@ HCONTACT CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid) }
///////////////////////////////////////////////////////////////////////////////
-// JabberHContactFromJID - looks for the HCONTACT with required JID
+// JabberHContactFromJID - looks for the MCONTACT with required JID
-HCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource)
+MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource)
{
if (jid == NULL)
return NULL;
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, jid);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
bool bIsChat = isChatRoom(hContact);
ptrT dbJid( getTStringA(hContact, bIsChat ? "ChatRoomID" : "jid"));
@@ -513,7 +513,7 @@ void CJabberProto::SendVisibleInvisiblePresence(BOOL invisible) if (item == NULL)
continue;
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (hContact == NULL)
continue;
@@ -727,7 +727,7 @@ int __stdcall JabberGetPacketID(HXML n) ///////////////////////////////////////////////////////////////////////////////
// JabberGetClientJID - adds a resource postfix to a JID
-TCHAR* CJabberProto::GetClientJID(HCONTACT hContact, TCHAR *dest, size_t destLen)
+TCHAR* CJabberProto::GetClientJID(MCONTACT hContact, TCHAR *dest, size_t destLen)
{
if (hContact == NULL)
return NULL;
@@ -932,7 +932,7 @@ static VOID CALLBACK sttRebuildInfoFrameApcProc(void* param) {
if ((item=ppro->ListGetItemPtrFromIndex(i)) != NULL) {
if (_tcschr(item->jid, '@') == NULL && _tcschr(item->jid, '/') == NULL && item->subscription!=SUB_NONE) {
- HCONTACT hContact = ppro->HContactFromJID(item->jid);
+ MCONTACT hContact = ppro->HContactFromJID(item->jid);
if (hContact == NULL) continue;
char name[128];
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 28d8b2a416..4843701d63 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -616,7 +616,7 @@ CPepMood::~CPepMood() void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode)
{
- HCONTACT hContact = NULL, hSelfContact = NULL;
+ MCONTACT hContact = NULL, hSelfContact = NULL;
if (!m_proto->IsMyOwnJID(from)) {
hContact = m_proto->HContactFromJID(from);
if (!hContact) return;
@@ -659,19 +659,19 @@ void CPepMood::CreateData(HXML n) moodNode << XCHILD(_T("text"), m_text);
}
-void CPepMood::ResetExtraIcon(HCONTACT hContact)
+void CPepMood::ResetExtraIcon(MCONTACT hContact)
{
char *szMood = m_proto->ReadAdvStatusA(hContact, ADVSTATUS_MOOD, "id");
SetExtraIcon(hContact, szMood);
mir_free(szMood);
}
-void CPepMood::SetExtraIcon(HCONTACT hContact, char *szMood)
+void CPepMood::SetExtraIcon(MCONTACT hContact, char *szMood)
{
ExtraIcon_SetIcon(hExtraMood, hContact, szMood == NULL ? NULL : g_MoodIcons.GetIcolibHandle(szMood));
}
-void CPepMood::SetMood(HCONTACT hContact, const TCHAR *szMood, const TCHAR *szText)
+void CPepMood::SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szText)
{
int mood = -1;
if (szMood) {
@@ -994,7 +994,7 @@ CPepActivity::~CPepActivity() void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode)
{
- HCONTACT hContact = NULL, hSelfContact = NULL;
+ MCONTACT hContact = NULL, hSelfContact = NULL;
if (!m_proto->IsMyOwnJID(from)) {
hContact = m_proto->HContactFromJID(from);
if (!hContact) return;
@@ -1051,19 +1051,19 @@ void CPepActivity::CreateData(HXML n) activityNode << XCHILD(_T("text"), m_text);
}
-void CPepActivity::ResetExtraIcon(HCONTACT hContact)
+void CPepActivity::ResetExtraIcon(MCONTACT hContact)
{
char *szActivity = m_proto->ReadAdvStatusA(hContact, ADVSTATUS_ACTIVITY, "id");
SetExtraIcon(hContact, szActivity);
mir_free(szActivity);
}
-void CPepActivity::SetExtraIcon(HCONTACT hContact, char *szActivity)
+void CPepActivity::SetExtraIcon(MCONTACT hContact, char *szActivity)
{
ExtraIcon_SetIcon(hExtraActivity, hContact, szActivity == NULL ? NULL : g_ActivityIcons.GetIcolibHandle(szActivity));
}
-void CPepActivity::SetActivity(HCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSecond, LPCTSTR szText)
+void CPepActivity::SetActivity(MCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSecond, LPCTSTR szText)
{
int activity = -1;
if (szFirst || szSecond) {
@@ -1194,7 +1194,7 @@ BOOL CJabberProto::SendPepTune(TCHAR* szArtist, TCHAR* szLength, TCHAR* szSource return TRUE;
}
-void CJabberProto::SetContactTune(HCONTACT hContact, LPCTSTR szArtist, LPCTSTR szLength, LPCTSTR szSource, LPCTSTR szTitle, LPCTSTR szTrack)
+void CJabberProto::SetContactTune(MCONTACT hContact, LPCTSTR szArtist, LPCTSTR szLength, LPCTSTR szSource, LPCTSTR szTitle, LPCTSTR szTrack)
{
if (!szArtist && !szTitle) {
delSetting(hContact, "ListeningTo");
@@ -1342,7 +1342,7 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam) if (pepMood == NULL)
return 1;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// fill status member
if (pData->flags & CSSF_MASK_STATUS)
@@ -1451,7 +1451,7 @@ void CJabberProto::RegisterAdvStatusSlot(const char *pszSlot) db_set_resident(szSetting, "text");
}
-void CJabberProto::ResetAdvStatus(HCONTACT hContact, const char *pszSlot)
+void CJabberProto::ResetAdvStatus(MCONTACT hContact, const char *pszSlot)
{
char szSetting[128];
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/id", m_szModuleName, pszSlot);
@@ -1467,7 +1467,7 @@ void CJabberProto::ResetAdvStatus(HCONTACT hContact, const char *pszSlot) db_unset(hContact, "AdvStatus", szSetting);
}
-void CJabberProto::WriteAdvStatus(HCONTACT hContact, const char *pszSlot, const TCHAR *pszMode, const char *pszIcon, const TCHAR *pszTitle, const TCHAR *pszText)
+void CJabberProto::WriteAdvStatus(MCONTACT hContact, const char *pszSlot, const TCHAR *pszMode, const char *pszIcon, const TCHAR *pszTitle, const TCHAR *pszText)
{
char szSetting[128];
@@ -1490,14 +1490,14 @@ void CJabberProto::WriteAdvStatus(HCONTACT hContact, const char *pszSlot, const }
}
-char* CJabberProto::ReadAdvStatusA(HCONTACT hContact, const char *pszSlot, const char *pszValue)
+char* CJabberProto::ReadAdvStatusA(MCONTACT hContact, const char *pszSlot, const char *pszValue)
{
char szSetting[128];
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
return db_get_sa(hContact, "AdvStatus", szSetting);
}
-TCHAR* CJabberProto::ReadAdvStatusT(HCONTACT hContact, const char *pszSlot, const char *pszValue)
+TCHAR* CJabberProto::ReadAdvStatusT(MCONTACT hContact, const char *pszSlot, const char *pszValue)
{
char szSetting[128];
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
diff --git a/protocols/JabberG/src/jabber_xstatus.h b/protocols/JabberG/src/jabber_xstatus.h index f0ebf5429a..cbe77aae6f 100644 --- a/protocols/JabberG/src/jabber_xstatus.h +++ b/protocols/JabberG/src/jabber_xstatus.h @@ -45,7 +45,7 @@ public: virtual void InitGui() {}
virtual void RebuildMenu() {}
- virtual void ResetExtraIcon(HCONTACT) {}
+ virtual void ResetExtraIcon(MCONTACT) {}
virtual bool LaunchSetGui() { return false; }
protected:
@@ -88,7 +88,7 @@ public: (*this)[i].RebuildMenu();
}
- void ResetExtraIcon(HCONTACT hContact)
+ void ResetExtraIcon(MCONTACT hContact)
{
for (int i=0; i < getCount(); i++)
(*this)[i].ResetExtraIcon(hContact);
@@ -152,7 +152,7 @@ public: CPepMood(CJabberProto *proto);
~CPepMood();
void ProcessItems(const TCHAR *from, HXML items);
- void ResetExtraIcon(HCONTACT hContact);
+ void ResetExtraIcon(MCONTACT hContact);
public:
TCHAR *m_text;
@@ -161,9 +161,9 @@ public: protected:
void CreateData(HXML);
void ShowSetDialog(BYTE bQuiet);
- void SetExtraIcon(HCONTACT hContact, char *szMood);
+ void SetExtraIcon(MCONTACT hContact, char *szMood);
- void SetMood(HCONTACT hContact, const TCHAR *szMood, const TCHAR *szText);
+ void SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szText);
};
class CPepActivity: public CPepGuiService
@@ -173,7 +173,7 @@ public: CPepActivity(CJabberProto *proto);
~CPepActivity();
void ProcessItems(const TCHAR *from, HXML items);
- void ResetExtraIcon(HCONTACT hContact);
+ void ResetExtraIcon(MCONTACT hContact);
protected:
TCHAR *m_text;
@@ -181,9 +181,9 @@ protected: void CreateData(HXML);
void ShowSetDialog(BYTE bQuiet);
- void SetExtraIcon(HCONTACT hContact, char *szActivity);
+ void SetExtraIcon(MCONTACT hContact, char *szActivity);
- void SetActivity(HCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSecond, LPCTSTR szText);
+ void SetActivity(MCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSecond, LPCTSTR szText);
};
#endif // _JABBER_XSTATUS_H_
diff --git a/protocols/JabberG/src/ui_utils.cpp b/protocols/JabberG/src/ui_utils.cpp index d48e881578..45303df0bc 100644 --- a/protocols/JabberG/src/ui_utils.cpp +++ b/protocols/JabberG/src/ui_utils.cpp @@ -601,7 +601,7 @@ BOOL CCtrlClc::OnNotify(int, NMHDR *pnmh) return FALSE;
}
-void CCtrlClc::AddContact(HCONTACT hContact)
+void CCtrlClc::AddContact(MCONTACT hContact)
{ SendMessage(m_hwnd, CLM_ADDCONTACT, (WPARAM)hContact, 0);
}
@@ -633,7 +633,7 @@ void CCtrlClc::Expand(HANDLE hItem, DWORD flags) { SendMessage(m_hwnd, CLM_EXPAND, (WPARAM)hItem, flags);
}
-HANDLE CCtrlClc::FindContact(HCONTACT hContact)
+HANDLE CCtrlClc::FindContact(MCONTACT hContact)
{ return (HANDLE)SendMessage(m_hwnd, CLM_FINDCONTACT, (WPARAM)hContact, 0);
}
diff --git a/protocols/JabberG/src/ui_utils.h b/protocols/JabberG/src/ui_utils.h index 7e0b4792ad..2bc6b2d0e6 100644 --- a/protocols/JabberG/src/ui_utils.h +++ b/protocols/JabberG/src/ui_utils.h @@ -458,7 +458,7 @@ class CCtrlClc: public CCtrlBase public:
CCtrlClc(CDlgBase* dlg, int ctrlId);
- void AddContact(HCONTACT hContact);
+ void AddContact(MCONTACT hContact);
void AddGroup(HANDLE hGroup);
void AutoRebuild();
void DeleteItem(HANDLE hItem);
@@ -466,7 +466,7 @@ public: void EndEditLabel(bool save);
void EnsureVisible(HANDLE hItem, bool partialOk);
void Expand(HANDLE hItem, DWORD flags);
- HANDLE FindContact(HCONTACT hContact);
+ HANDLE FindContact(MCONTACT hContact);
HANDLE FindGroup(HANDLE hGroup);
COLORREF GetBkColor();
bool GetCheck(HANDLE hItem);
|