summaryrefslogtreecommitdiff
path: root/src/modules/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
commit68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch)
treefcc340ad7067561e57733b287f193a7dbed93dd4 /src/modules/protocols
parent7193759b046338c6f47ff2edb34743a1465791cd (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 'src/modules/protocols')
-rw-r--r--src/modules/protocols/protoaccs.cpp10
-rw-r--r--src/modules/protocols/protochains.cpp14
-rw-r--r--src/modules/protocols/protocols.cpp18
-rw-r--r--src/modules/protocols/protoint.cpp46
4 files changed, 44 insertions, 44 deletions
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index e3ef2977c5..2a0e2c4699 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -199,7 +199,7 @@ void WriteDbAccounts()
/////////////////////////////////////////////////////////////////////////////////////////
static int OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
PROTOACCOUNT* pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
@@ -210,7 +210,7 @@ static int OnContactDeleted(WPARAM wParam, LPARAM lParam)
static int OnDbSettingsChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
PROTOACCOUNT* pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
@@ -317,7 +317,7 @@ static INT_PTR stub11(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
static INT_PTR stub12(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
{
- return (INT_PTR)ppi->GetCaps(wParam, (HCONTACT)lParam);
+ return (INT_PTR)ppi->GetCaps(wParam, (MCONTACT)lParam);
}
static INT_PTR stub13(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM)
@@ -550,9 +550,9 @@ void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase)
void EraseAccount(const char* pszModuleName)
{
// remove protocol contacts first
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
while (hContact != NULL) {
- HCONTACT h1 = hContact;
+ MCONTACT h1 = hContact;
hContact = db_find_next(h1);
char *szProto = GetContactProto(hContact);
diff --git a/src/modules/protocols/protochains.cpp b/src/modules/protocols/protochains.cpp
index cc55405227..bf13ecd7d1 100644
--- a/src/modules/protocols/protochains.cpp
+++ b/src/modules/protocols/protochains.cpp
@@ -56,7 +56,7 @@ static int GetProtocolP(MCONTACT hContact, char *szBuf, int cbLen)
/////////////////////////////////////////////////////////////////////////////////////////
-INT_PTR CallContactService(HCONTACT hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam)
+INT_PTR CallContactService(MCONTACT hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam)
{
INT_PTR ret;
CCSDATA ccs = { hContact, szProtoService, wParam, lParam };
@@ -161,7 +161,7 @@ static INT_PTR Proto_RecvChain(WPARAM wParam, LPARAM lParam)
return ret;
}
-PROTOACCOUNT* __fastcall Proto_GetAccount(HCONTACT hContact)
+PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact)
{
if (hContact == NULL)
return NULL;
@@ -175,13 +175,13 @@ PROTOACCOUNT* __fastcall Proto_GetAccount(HCONTACT hContact)
static INT_PTR Proto_GetContactBaseProto(WPARAM wParam, LPARAM)
{
- PROTOACCOUNT *pa = Proto_GetAccount((HCONTACT)wParam);
+ PROTOACCOUNT *pa = Proto_GetAccount((MCONTACT)wParam);
return (INT_PTR)(Proto_IsAccountEnabled(pa) ? pa->szModuleName : NULL);
}
static INT_PTR Proto_GetContactBaseAccount(WPARAM wParam, LPARAM)
{
- PROTOACCOUNT *pa = Proto_GetAccount((HCONTACT)wParam);
+ PROTOACCOUNT *pa = Proto_GetAccount((MCONTACT)wParam);
return (INT_PTR)(pa ? pa->szModuleName : NULL);
}
@@ -210,14 +210,14 @@ static INT_PTR Proto_AddToContact(WPARAM wParam, LPARAM lParam)
if (pd == NULL) {
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
if (pa) {
- db_set_s((HCONTACT)wParam, "Protocol", "p", szProto);
+ db_set_s((MCONTACT)wParam, "Protocol", "p", szProto);
return 0;
}
return 1;
}
if (pd->type == PROTOTYPE_PROTOCOL || pd->type == PROTOTYPE_VIRTUAL)
- db_set_s((HCONTACT)wParam, "Protocol", "p", szProto);
+ db_set_s((MCONTACT)wParam, "Protocol", "p", szProto);
return 0;
}
@@ -228,7 +228,7 @@ static INT_PTR Proto_RemoveFromContact(WPARAM wParam, LPARAM lParam)
case 0:
return 1;
case -1:
- db_unset((HCONTACT)wParam, "Protocol", "p");
+ db_unset((MCONTACT)wParam, "Protocol", "p");
}
return 0;
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp
index f2a30976e7..03ff01a69c 100644
--- a/src/modules/protocols/protocols.cpp
+++ b/src/modules/protocols/protocols.cpp
@@ -203,7 +203,7 @@ static INT_PTR Proto_AuthRecv(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// User Typing Notification services
-static int Proto_ValidTypingContact(HCONTACT hContact, char *szProto)
+static int Proto_ValidTypingContact(MCONTACT hContact, char *szProto)
{
if (!hContact || !szProto)
return 0;
@@ -214,11 +214,11 @@ static int Proto_ValidTypingContact(HCONTACT hContact, char *szProto)
static INT_PTR Proto_SelfIsTyping(WPARAM wParam, LPARAM lParam)
{
if (lParam == PROTOTYPE_SELFTYPING_OFF || lParam == PROTOTYPE_SELFTYPING_ON) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (!szProto)
return 0;
- if (Proto_ValidTypingContact((HCONTACT)wParam, szProto))
+ if (Proto_ValidTypingContact((MCONTACT)wParam, szProto))
CallProtoServiceInt(NULL,szProto, PSS_USERISTYPING, wParam, lParam);
}
@@ -228,7 +228,7 @@ static INT_PTR Proto_SelfIsTyping(WPARAM wParam, LPARAM lParam)
static INT_PTR Proto_ContactIsTyping(WPARAM wParam, LPARAM lParam)
{
int type = (int)lParam;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (!szProto)
return 0;
@@ -238,7 +238,7 @@ static INT_PTR Proto_ContactIsTyping(WPARAM wParam, LPARAM lParam)
if (type < PROTOTYPE_CONTACTTYPING_OFF)
return 0;
- if (Proto_ValidTypingContact((HCONTACT)wParam, szProto))
+ if (Proto_ValidTypingContact((MCONTACT)wParam, szProto))
NotifyEventHooks(hTypeEvent, wParam, lParam);
return 0;
@@ -372,7 +372,7 @@ INT_PTR CallProtoService(const char* szModule, const char* szService, WPARAM wPa
return CallProtoServiceInt(NULL, szModule, szService, wParam, lParam);
}
-INT_PTR CallProtoServiceInt(HCONTACT hContact, const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam)
+INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam)
{
PROTOACCOUNT* pa = Proto_GetAccount(szModule);
if (pa && !pa->bOldProto) {
@@ -442,7 +442,7 @@ INT_PTR CallProtoServiceInt(HCONTACT hContact, const char *szModule, const char
else
return (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action, (const PROTOCHAR**)&pfr->szFilename);
}
- case 12: return (INT_PTR)ppi->GetCaps(wParam, (HCONTACT)lParam);
+ case 12: return (INT_PTR)ppi->GetCaps(wParam, (MCONTACT)lParam);
case 13: return (INT_PTR)Proto_GetIcon(ppi, wParam);
case 14: return (INT_PTR)ppi->GetInfo(hContact, wParam);
case 15:
@@ -469,7 +469,7 @@ INT_PTR CallProtoServiceInt(HCONTACT hContact, const char *szModule, const char
case 21: return (INT_PTR)ppi->RecvFile(hContact, (PROTOFILEEVENT*)lParam);
case 22: return (INT_PTR)ppi->RecvMsg(hContact, (PROTORECVEVENT*)lParam);
case 23: return (INT_PTR)ppi->RecvUrl(hContact, (PROTORECVEVENT*)lParam);
- case 24: return (INT_PTR)ppi->SendContacts(hContact, LOWORD(wParam), HIWORD(wParam), (HCONTACT*)lParam);
+ case 24: return (INT_PTR)ppi->SendContacts(hContact, LOWORD(wParam), HIWORD(wParam), (MCONTACT*)lParam);
case 25:
if (ppi->m_iVersion > 1) {
TCHAR** files = Proto_FilesMatrixU((char**)lParam);
@@ -490,7 +490,7 @@ INT_PTR CallProtoServiceInt(HCONTACT hContact, const char *szModule, const char
return (INT_PTR)ppi->SetAwayMsg(wParam, StrConvT((char*)lParam));
else
return (INT_PTR)ppi->SetAwayMsg(wParam, (TCHAR*)lParam);
- case 34: return (INT_PTR)ppi->UserIsTyping((HCONTACT)wParam, lParam);
+ case 34: return (INT_PTR)ppi->UserIsTyping((MCONTACT)wParam, lParam);
case 35: lstrcpynA((char*)lParam, ppi->m_szModuleName, wParam); return 0;
case 36: return ppi->m_iStatus;
diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp
index 75099e8c95..a1b7ab0469 100644
--- a/src/modules/protocols/protoint.cpp
+++ b/src/modules/protocols/protoint.cpp
@@ -47,14 +47,14 @@ void FreeFilesMatrix(TCHAR ***files)
struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
{
- HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr)
+ MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr)
{
- return (HCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLIST, flags, (LPARAM)psr);
+ return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLIST, flags, (LPARAM)psr);
}
- HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+ MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
- return (HCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), (LPARAM)hDbEvent);
+ return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), (LPARAM)hDbEvent);
}
int __cdecl Authorize(HANDLE hDbEvent)
@@ -67,13 +67,13 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (int)ProtoCallService(m_szModuleName, PS_AUTHDENY, (WPARAM)hDbEvent, (LPARAM)StrConvA(szReason));
}
- int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_AUTH, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_AUTH, 0, (LPARAM)&ccs);
}
- int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage)
+ int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
CCSDATA ccs = { hContact, PSS_AUTHREQUEST, 0, (LPARAM)szMessage };
ccs.lParam = (LPARAM)mir_t2a(szMessage);
@@ -87,7 +87,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (HANDLE)ProtoCallService(m_szModuleName, PS_CHANGEINFO, iInfoType, (LPARAM)pInfoData);
}
- HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+ HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
CCSDATA ccs = { hContact, PSS_FILEALLOW, (WPARAM)hTransfer, (LPARAM)szPath };
@@ -97,13 +97,13 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return res;
}
- int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer)
+ int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
CCSDATA ccs = { hContact, PSS_FILECANCEL, (WPARAM)hTransfer, 0 };
return (int)ProtoCallService(m_szModuleName, PSS_FILECANCEL, 0, (LPARAM)&ccs);
}
- int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+ int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
{
CCSDATA ccs = { hContact, PSS_FILEDENY, (WPARAM)hTransfer, (LPARAM)szReason };
@@ -125,7 +125,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return res;
}
- DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact)
+ DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact)
{
return (DWORD_PTR)ProtoCallService(m_szModuleName, PS_GETCAPS, type, (LPARAM)hContact);
}
@@ -135,7 +135,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (HICON)ProtoCallService(m_szModuleName, PS_LOADICON, iconIndex, 0);
}
- int __cdecl GetInfo(HCONTACT hContact, int flags)
+ int __cdecl GetInfo(MCONTACT hContact, int flags)
{
CCSDATA ccs = { hContact, PSS_GETINFO, flags, 0 };
return ProtoCallService(m_szModuleName, PSS_GETINFO, 0, (LPARAM)&ccs);
@@ -176,37 +176,37 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (HWND)ProtoCallService(m_szModuleName, PS_CREATEADVSEARCHUI, 0, (LPARAM)owner);
}
- int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_CONTACTS, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_CONTACTS, 0, (LPARAM)&ccs);
}
- int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT* evt)
+ int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)evt };
return ProtoCallService(m_szModuleName, PSR_FILE, 0, (LPARAM)&ccs);
}
- int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_MESSAGE, 0, (LPARAM)&ccs);
}
- int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_URL, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_URL, 0, (LPARAM)&ccs);
}
- int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+ int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
CCSDATA ccs = { hContact, PSS_CONTACTS, MAKEWPARAM(flags, nContacts), (LPARAM)hContactsList };
return (int)ProtoCallService(m_szModuleName, PSS_CONTACTS, 0, (LPARAM)&ccs);
}
- HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+ HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
CCSDATA ccs = { hContact, PSS_FILE, (WPARAM)szDescription, (LPARAM)ppszFiles };
@@ -218,19 +218,19 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return res;
}
- int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg)
+ int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg)
{
CCSDATA ccs = { hContact, PSS_MESSAGE, flags, (LPARAM)msg };
return (int)ProtoCallService(m_szModuleName, PSS_MESSAGE, 0, (LPARAM)&ccs);
}
- int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url)
+ int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url)
{
CCSDATA ccs = { hContact, PSS_URL, flags, (LPARAM)url };
return (int)ProtoCallService(m_szModuleName, PSS_URL, 0, (LPARAM)&ccs);
}
- int __cdecl SetApparentMode(HCONTACT hContact, int mode)
+ int __cdecl SetApparentMode(MCONTACT hContact, int mode)
{
CCSDATA ccs = { hContact, PSS_SETAPPARENTMODE, mode, 0 };
return (int)ProtoCallService(m_szModuleName, PSS_SETAPPARENTMODE, 0, (LPARAM)&ccs);
@@ -241,13 +241,13 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (int)ProtoCallService(m_szModuleName, PS_SETSTATUS, iNewStatus, 0);
}
- HANDLE __cdecl GetAwayMsg(HCONTACT hContact)
+ HANDLE __cdecl GetAwayMsg(MCONTACT hContact)
{
CCSDATA ccs = { hContact, PSS_GETAWAYMSG, 0, 0 };
return (HANDLE)ProtoCallService(m_szModuleName, PSS_GETAWAYMSG, 0, (LPARAM)&ccs);
}
- int __cdecl RecvAwayMsg(HCONTACT hContact, int statusMode, PROTORECVEVENT* evt)
+ int __cdecl RecvAwayMsg(MCONTACT hContact, int statusMode, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_AWAYMSG, statusMode, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_AWAYMSG, 0, (LPARAM)&ccs);
@@ -258,7 +258,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
return (int)ProtoCallService(m_szModuleName, PS_SETAWAYMSG, iStatus, (LPARAM)StrConvA(msg));
}
- int __cdecl UserIsTyping(HCONTACT hContact, int type)
+ int __cdecl UserIsTyping(MCONTACT hContact, int type)
{
CCSDATA ccs = { hContact, PSS_USERISTYPING, (WPARAM)hContact, type };
return ProtoCallService(m_szModuleName, PSS_USERISTYPING, 0, (LPARAM)&ccs);