summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/MraProto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MRA/src/MraProto.cpp')
-rw-r--r--protocols/MRA/src/MraProto.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index f6ea74dbff..0bb77b16bd 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -93,7 +93,7 @@ int CMraProto::OnModulesLoaded(WPARAM, LPARAM)
HookProtoEvent(ME_CLIST_GROUPCHANGE, &CMraProto::OnGroupChanged);
// всех в offline // тк unsaved values сохраняются их нужно инициализировать
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact != NULL; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact != NULL; hContact = db_find_next(hContact, m_szModuleName))
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID|SCBIF_GROUP_ID|SCBIF_SERVER_FLAG|SCBIF_STATUS), -1, -1, 0, 0, ID_STATUS_OFFLINE, 0, 0, 0);
// unsaved values
@@ -126,13 +126,13 @@ int CMraProto::OnPreShutdown(WPARAM, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-HCONTACT CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags)
+MCONTACT CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags)
{
if (!plpsEMail)
return NULL;
BOOL bAdded;
- HCONTACT hContact = MraHContactFromEmail(plpsEMail, TRUE, TRUE, &bAdded);
+ MCONTACT hContact = MraHContactFromEmail(plpsEMail, TRUE, TRUE, &bAdded);
if (hContact == NULL)
return NULL;
@@ -153,7 +153,7 @@ HCONTACT CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTST
return hContact;
}
-HCONTACT CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
+MCONTACT CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
if (psr->cbSize != sizeof(PROTOSEARCHRESULT))
return 0;
@@ -161,7 +161,7 @@ HCONTACT CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
return AddToListByEmail(psr->email, psr->nick, psr->firstName, psr->lastName, flags);
}
-HCONTACT CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+MCONTACT CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
@@ -186,9 +186,9 @@ HCONTACT CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
HANDLE CMraProto::ChangeInfo(int, void*) { return NULL; }
int CMraProto::FileResume(HANDLE, int*, const TCHAR**) { return 1; }
-int CMraProto::RecvAwayMsg(HCONTACT, int, PROTORECVEVENT*) { return 1; }
-int CMraProto::RecvUrl(HCONTACT, PROTORECVEVENT*) { return 1; }
-int CMraProto::SendUrl(HCONTACT, int, const char*) { return 1; }
+int CMraProto::RecvAwayMsg(MCONTACT, int, PROTORECVEVENT*) { return 1; }
+int CMraProto::RecvUrl(MCONTACT, PROTORECVEVENT*) { return 1; }
+int CMraProto::SendUrl(MCONTACT, int, const char*) { return 1; }
/////////////////////////////////////////////////////////////////////////////////////////
@@ -234,20 +234,20 @@ int CMraProto::AuthDeny(HANDLE hDBEvent, const TCHAR* szReason)
return 0;
}
-int CMraProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre)
+int CMraProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
{
Proto_AuthRecv(m_szModuleName, pre);
return 0;
}
-int CMraProto::AuthRequest(HCONTACT hContact, const TCHAR *lptszMessage)
+int CMraProto::AuthRequest(MCONTACT hContact, const TCHAR *lptszMessage)
{
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////
-HANDLE CMraProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath)
+HANDLE CMraProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath)
{
if (szPath != NULL)
if ( MraFilesQueueAccept(hFilesQueueHandle, (DWORD)hTransfer, szPath, lstrlen(szPath)) == NO_ERROR)
@@ -256,7 +256,7 @@ HANDLE CMraProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *sz
return NULL;
}
-int CMraProto::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int CMraProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
if (hContact && hTransfer) {
MraFilesQueueCancel(hFilesQueueHandle, (DWORD)hTransfer, TRUE);
@@ -266,14 +266,14 @@ int CMraProto::FileCancel(HCONTACT hContact, HANDLE hTransfer)
return 1;
}
-int CMraProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR*)
+int CMraProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR*)
{
return FileCancel(hContact, hTransfer);
}
/////////////////////////////////////////////////////////////////////////////////////////
-DWORD_PTR CMraProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR CMraProto::GetCaps(int type, MCONTACT hContact)
{
switch ( type ) {
case PFLAGNUM_1:
@@ -310,7 +310,7 @@ DWORD_PTR CMraProto::GetCaps(int type, HCONTACT hContact)
}
}
-int CMraProto::GetInfo(HCONTACT hContact, int infoType)
+int CMraProto::GetInfo(MCONTACT hContact, int infoType)
{
return MraUpdateContactInfo(hContact) != 0;
}
@@ -347,7 +347,7 @@ HANDLE CMraProto::SearchByName(const TCHAR *pszNick, const TCHAR *pszFirstName,
/////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre)
+int CMraProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = m_szModuleName;
@@ -360,19 +360,19 @@ int CMraProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre)
return 0;
}
-int CMraProto::RecvFile(HCONTACT hContact, PROTORECVFILET *pre)
+int CMraProto::RecvFile(MCONTACT hContact, PROTORECVFILET *pre)
{
return Proto_RecvFile(hContact, pre);
}
-int CMraProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+int CMraProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
return Proto_RecvMessage(hContact, pre);
}
/////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int CMraProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
INT_PTR iRet = 0;
@@ -398,7 +398,7 @@ int CMraProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTAC
return iRet;
}
-HANDLE CMraProto::SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
+HANDLE CMraProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
INT_PTR iRet = 0;
@@ -410,7 +410,7 @@ HANDLE CMraProto::SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR*
return (HANDLE)iRet;
}
-int CMraProto::SendMsg(HCONTACT hContact, int flags, const char *lpszMessage)
+int CMraProto::SendMsg(MCONTACT hContact, int flags, const char *lpszMessage)
{
if (!m_bLoggedIn) {
ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)"You cannot send when you are offline.");
@@ -450,7 +450,7 @@ int CMraProto::SendMsg(HCONTACT hContact, int flags, const char *lpszMessage)
/////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::SetApparentMode(HCONTACT hContact, int mode)
+int CMraProto::SetApparentMode(MCONTACT hContact, int mode)
{
if (!m_bLoggedIn || !hContact)
return 1;
@@ -509,7 +509,7 @@ int CMraProto::SetStatus(int iNewStatus)
// всех в offline, только если мы бывали подключены
if (dwOldStatusMode > ID_STATUS_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))
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID|SCBIF_GROUP_ID|SCBIF_SERVER_FLAG|SCBIF_STATUS), -1, -1, 0, 0, ID_STATUS_OFFLINE, 0, 0, 0);
Netlib_CloseHandle(m_hConnection);
@@ -547,7 +547,7 @@ int CMraProto::SetStatus(int iNewStatus)
return 0;
}
-HANDLE CMraProto::GetAwayMsg(HCONTACT hContact)
+HANDLE CMraProto::GetAwayMsg(MCONTACT hContact)
{
if (!m_bLoggedIn || ! hContact)
return 0;
@@ -589,7 +589,7 @@ int CMraProto::SetAwayMsg(int m_iStatus, const TCHAR* msg)
return 0;
}
-int CMraProto::UserIsTyping(HCONTACT hContact, int type)
+int CMraProto::UserIsTyping(MCONTACT hContact, int type)
{
if (!m_bLoggedIn || !hContact || type == PROTOTYPE_SELFTYPING_OFF)
return 1;