summaryrefslogtreecommitdiff
path: root/protocols/IcqOscarJ/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-21 12:33:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-04-21 12:33:31 +0300
commitca5001026a94f702c4012c5e8d2093ad3f51c1fa (patch)
tree554ad80633528d530057fc61035b15f901860ed2 /protocols/IcqOscarJ/src
parente0799755b3966d1d6d8275ee5127242ec029a4e6 (diff)
code cleaning:
- in conformance to C++'11 rules, we don't declare a method as virtual if it's declared as override; - cause this code isn't visible in Pascal anymore, there's no need to use __cdecl calling convention for virtual methods; - since PROTO_INTERFACE is a regular C++ class, there's no need to use old style service declarations for virtual methods like OnModulesLoaded / OnShutdown
Diffstat (limited to 'protocols/IcqOscarJ/src')
-rw-r--r--protocols/IcqOscarJ/src/icq_packet.cpp12
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.cpp86
-rw-r--r--protocols/IcqOscarJ/src/icq_proto.h64
3 files changed, 76 insertions, 86 deletions
diff --git a/protocols/IcqOscarJ/src/icq_packet.cpp b/protocols/IcqOscarJ/src/icq_packet.cpp
index 22aac5fd62..313562af13 100644
--- a/protocols/IcqOscarJ/src/icq_packet.cpp
+++ b/protocols/IcqOscarJ/src/icq_packet.cpp
@@ -443,8 +443,8 @@ void packLETLVLNTS(PBYTE *buf, size_t *bufpos, const char *str, WORD wType)
size_t len = mir_strlen(str) + 1;
*(PWORD)(*buf + *bufpos) = wType;
- *(PWORD)(*buf + *bufpos + 2) = DWORD(len + 2);
- *(PWORD)(*buf + *bufpos + 4) = DWORD(len);
+ *(PWORD)(*buf + *bufpos + 2) = WORD(len + 2);
+ *(PWORD)(*buf + *bufpos + 4) = WORD(len);
memcpy(*buf + *bufpos + 6, str, len);
*bufpos += len + 6;
}
@@ -469,9 +469,9 @@ void ppackLETLVWordLNTS(PBYTE *buf, size_t *buflen, WORD w, const char *str, WOR
*buf = (PBYTE)SAFE_REALLOC(*buf, 8 + *buflen + len);
*(PWORD)(*buf + *buflen) = wType;
- *(PWORD)(*buf + *buflen + 2) = DWORD(len + 4);
+ *(PWORD)(*buf + *buflen + 2) = WORD(len + 4);
*(PWORD)(*buf + *buflen + 4) = w;
- *(PWORD)(*buf + *buflen + 6) = DWORD(len);
+ *(PWORD)(*buf + *buflen + 6) = WORD(len);
memcpy(*buf + *buflen + 8, str, len);
*buflen += len + 8;
}
@@ -483,8 +483,8 @@ void ppackLETLVLNTSByte(PBYTE *buf, size_t *buflen, const char *str, BYTE b, WOR
*buf = (PBYTE)SAFE_REALLOC(*buf, 7 + *buflen + len);
*(PWORD)(*buf + *buflen) = wType;
- *(PWORD)(*buf + *buflen + 2) = DWORD(len + 3);
- *(PWORD)(*buf + *buflen + 4) = DWORD(len);
+ *(PWORD)(*buf + *buflen + 2) = WORD(len + 3);
+ *(PWORD)(*buf + *buflen + 4) = WORD(len);
memcpy(*buf + *buflen + 6, str, len);
*(*buf + *buflen + 6 + len) = b;
*buflen += len + 7;
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp
index e10146939f..768b81881b 100644
--- a/protocols/IcqOscarJ/src/icq_proto.cpp
+++ b/protocols/IcqOscarJ/src/icq_proto.cpp
@@ -232,7 +232,7 @@ CIcqProto::~CIcqProto()
////////////////////////////////////////////////////////////////////////////////////////
// OnModulesLoadedEx - performs hook registration
-int CIcqProto::OnModulesLoaded(WPARAM, LPARAM)
+void CIcqProto::OnModulesLoaded()
{
char pszP2PName[MAX_PATH];
char pszGroupsName[MAX_PATH];
@@ -264,17 +264,15 @@ int CIcqProto::OnModulesLoaded(WPARAM, LPARAM)
if (bXStatus > 0)
setContactExtraIcon(hContact, bXStatus);
}
- return 0;
}
-int CIcqProto::OnPreShutdown(WPARAM, LPARAM)
+void CIcqProto::OnShutdown()
{
// signal info update thread to stop
icq_InfoUpdateCleanup();
// Make sure all connections are closed
CloseContactDirectConns(NULL);
- return 0;
}
////////////////////////////////////////////////////////////////////////////////////////
@@ -311,7 +309,7 @@ MCONTACT CIcqProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
return AddToListByUID(szUid, flags);
}
-MCONTACT __cdecl CIcqProto::AddToListByEvent(int flags, int iContact, MEVENT hDbEvent)
+MCONTACT CIcqProto::AddToListByEvent(int flags, int iContact, MEVENT hDbEvent)
{
DWORD uin = 0;
uid_str uid = { 0 };
@@ -427,7 +425,7 @@ int CIcqProto::AuthDeny(MEVENT hDbEvent, const wchar_t* szReason)
////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CIcqProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
+int CIcqProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
{
setContactHidden(hContact, 0);
ICQAddRecvEvent(NULL, EVENTTYPE_AUTHREQUEST, pre, pre->lParam, (PBYTE)pre->szMessage, 0);
@@ -437,7 +435,7 @@ int __cdecl CIcqProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CIcqProto::AuthRequest(MCONTACT hContact, const wchar_t* szMessage)
+int CIcqProto::AuthRequest(MCONTACT hContact, const wchar_t* szMessage)
{
if (!icqOnline())
return 1;
@@ -463,7 +461,7 @@ int __cdecl CIcqProto::AuthRequest(MCONTACT hContact, const wchar_t* szMessage)
////////////////////////////////////////////////////////////////////////////////////////
// PS_FileAllow - starts a file transfer
-HANDLE __cdecl CIcqProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szPath)
+HANDLE CIcqProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szPath)
{
DWORD dwUin;
uid_str szUid;
@@ -504,7 +502,7 @@ HANDLE __cdecl CIcqProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const w
////////////////////////////////////////////////////////////////////////////////////////
// PS_FileCancel - cancels a file transfer
-int __cdecl CIcqProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
+int CIcqProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
DWORD dwUin;
uid_str szUid;
@@ -533,7 +531,7 @@ int __cdecl CIcqProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
////////////////////////////////////////////////////////////////////////////////////////
// PS_FileDeny - denies a file transfer
-int __cdecl CIcqProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason)
+int CIcqProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason)
{
int nReturnValue = 1;
basic_filetransfer *bft = (basic_filetransfer*)hTransfer;
@@ -573,7 +571,7 @@ int __cdecl CIcqProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar
////////////////////////////////////////////////////////////////////////////////////////
// PS_FileResume - processes file renaming etc
-int __cdecl CIcqProto::FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename)
+int CIcqProto::FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename)
{
if (icqOnline() && hTransfer) {
basic_filetransfer *ft = (basic_filetransfer *)hTransfer;
@@ -602,9 +600,9 @@ int __cdecl CIcqProto::FileResume(HANDLE hTransfer, int* action, const wchar_t**
////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CIcqProto::GetCaps(int type, MCONTACT hContact)
+INT_PTR CIcqProto::GetCaps(int type, MCONTACT hContact)
{
- DWORD_PTR nReturn = 0;
+ INT_PTR nReturn = 0;
switch (type) {
@@ -636,7 +634,7 @@ DWORD_PTR __cdecl CIcqProto::GetCaps(int type, MCONTACT hContact)
return PF2_FREECHAT | PF2_ONTHEPHONE;
case PFLAG_UNIQUEIDTEXT:
- return (DWORD_PTR)Translate("User ID");
+ return (INT_PTR)Translate("User ID");
case PFLAG_MAXLENOFMESSAGE:
return MAX_MESSAGESNACSIZE - 102;
@@ -666,7 +664,7 @@ DWORD_PTR __cdecl CIcqProto::GetCaps(int type, MCONTACT hContact)
////////////////////////////////////////////////////////////////////////////////////////
// GetInfo - retrieves a contact info
-int __cdecl CIcqProto::GetInfo(MCONTACT hContact, int infoType)
+int CIcqProto::GetInfo(MCONTACT hContact, int infoType)
{
if (icqOnline()) {
DWORD dwUin;
@@ -712,7 +710,7 @@ void CIcqProto::CheekySearchThread(void*)
}
-HANDLE __cdecl CIcqProto::SearchBasic(const wchar_t *pszSearch)
+HANDLE CIcqProto::SearchBasic(const wchar_t *pszSearch)
{
if (mir_wstrlen(pszSearch) == 0)
return nullptr;
@@ -760,7 +758,7 @@ HANDLE __cdecl CIcqProto::SearchBasic(const wchar_t *pszSearch)
////////////////////////////////////////////////////////////////////////////////////////
// SearchByEmail - searches the contact by its e-mail
-HANDLE __cdecl CIcqProto::SearchByEmail(const wchar_t *email)
+HANDLE CIcqProto::SearchByEmail(const wchar_t *email)
{
if (email && icqOnline() && mir_wstrlen(email) > 0) {
char *szEmail = unicode_to_ansi(email);
@@ -783,7 +781,7 @@ HANDLE __cdecl CIcqProto::SearchByEmail(const wchar_t *email)
////////////////////////////////////////////////////////////////////////////////////////
// PS_SearchByName - searches the contact by its first or last name, or by a nickname
-HANDLE __cdecl CIcqProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName)
+HANDLE CIcqProto::SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName)
{
if (icqOnline()) {
if (nick || firstName || lastName) {
@@ -806,7 +804,7 @@ HANDLE __cdecl CIcqProto::SearchByName(const wchar_t *nick, const wchar_t *first
}
-HWND __cdecl CIcqProto::CreateExtendedSearchUI(HWND parent)
+HWND CIcqProto::CreateExtendedSearchUI(HWND parent)
{
if (parent && g_plugin.getInst())
return CreateDialog(g_plugin.getInst(), MAKEINTRESOURCE(IDD_ICQADVANCEDSEARCH), parent, AdvancedSearchDlgProc);
@@ -814,7 +812,7 @@ HWND __cdecl CIcqProto::CreateExtendedSearchUI(HWND parent)
return nullptr; // Failure
}
-HWND __cdecl CIcqProto::SearchAdvanced(HWND hwndDlg)
+HWND CIcqProto::SearchAdvanced(HWND hwndDlg)
{
if (icqOnline() && IsWindow(hwndDlg)) {
size_t nDataLen;
@@ -834,7 +832,7 @@ HWND __cdecl CIcqProto::SearchAdvanced(HWND hwndDlg)
////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CIcqProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
+int CIcqProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
{
ICQSEARCHRESULT **isrList = (ICQSEARCHRESULT**)pre->szMessage;
int i;
@@ -871,7 +869,7 @@ int __cdecl CIcqProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
////////////////////////////////////////////////////////////////////////////////////////
// RecvMsg
-int __cdecl CIcqProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
+int CIcqProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
size_t cbBlob = mir_strlen(pre->szMessage) + 1;
ICQAddRecvEvent(hContact, EVENTTYPE_MESSAGE, pre, cbBlob, (PBYTE)pre->szMessage, DBEF_UTF);
@@ -887,7 +885,7 @@ int __cdecl CIcqProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hContactsList)
+int CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONTACT *hContactsList)
{
if (hContact && hContactsList) {
DWORD dwUin;
@@ -1126,7 +1124,7 @@ int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int, int nContacts, MCONT
////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CIcqProto::SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles)
+HANDLE CIcqProto::SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles)
{
if (!icqOnline())
return nullptr;
@@ -1222,7 +1220,7 @@ HANDLE __cdecl CIcqProto::SendFile(MCONTACT hContact, const wchar_t* szDescripti
////////////////////////////////////////////////////////////////////////////////////////
// PS_SendMessage - sends a message
-int __cdecl CIcqProto::SendMsg(MCONTACT hContact, int, const char* pszSrc)
+int CIcqProto::SendMsg(MCONTACT hContact, int, const char* pszSrc)
{
if (hContact == NULL || pszSrc == nullptr)
return NULL;
@@ -1341,7 +1339,7 @@ int __cdecl CIcqProto::SendMsg(MCONTACT hContact, int, const char* pszSrc)
////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CIcqProto::SendUrl(MCONTACT hContact, int, const char* url)
+int CIcqProto::SendUrl(MCONTACT hContact, int, const char* url)
{
if (hContact == NULL || url == nullptr)
return 0;
@@ -1406,7 +1404,7 @@ int __cdecl CIcqProto::SendUrl(MCONTACT hContact, int, const char* url)
////////////////////////////////////////////////////////////////////////////////////////
// PS_SetApparentMode - sets the visibility status
-int __cdecl CIcqProto::SetApparentMode(MCONTACT hContact, int mode)
+int CIcqProto::SetApparentMode(MCONTACT hContact, int mode)
{
DWORD uin;
uid_str uid;
@@ -1481,7 +1479,7 @@ char* CIcqProto::PrepareStatusNote(int nStatus)
////////////////////////////////////////////////////////////////////////////////////////
// PS_SetStatus - sets the protocol status
-int __cdecl CIcqProto::SetStatus(int iNewStatus)
+int CIcqProto::SetStatus(int iNewStatus)
{
int nNewStatus = MirandaStatusToSupported(iNewStatus);
@@ -1621,7 +1619,7 @@ void __cdecl CIcqProto::GetAwayMsgThread(void *pStatusData)
////////////////////////////////////////////////////////////////////////////////////////
// PS_GetAwayMsg - returns a contact's away message
-HANDLE __cdecl CIcqProto::GetAwayMsg(MCONTACT hContact)
+HANDLE CIcqProto::GetAwayMsg(MCONTACT hContact)
{
DWORD dwUin;
uid_str szUID;
@@ -1704,7 +1702,7 @@ HANDLE __cdecl CIcqProto::GetAwayMsg(MCONTACT hContact)
////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG - processes received status mode message
-int __cdecl CIcqProto::RecvAwayMsg(MCONTACT hContact, int, PROTORECVEVENT* evt)
+int CIcqProto::RecvAwayMsg(MCONTACT hContact, int, PROTORECVEVENT* evt)
{
setStatusMsgVar(hContact, evt->szMessage, false);
@@ -1718,7 +1716,7 @@ int __cdecl CIcqProto::RecvAwayMsg(MCONTACT hContact, int, PROTORECVEVENT* evt)
////////////////////////////////////////////////////////////////////////////////////////
// PS_SetAwayMsg - sets the away status message
-int __cdecl CIcqProto::SetAwayMsg(int status, const wchar_t* msg)
+int CIcqProto::SetAwayMsg(int status, const wchar_t* msg)
{
mir_cslock l(m_modeMsgsMutex);
@@ -1787,7 +1785,7 @@ INT_PTR CIcqProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam)
/////////////////////////////////////////////////////////////////////////////////////////
// PS_UserIsTyping - sends a UTN notification
-int __cdecl CIcqProto::UserIsTyping(MCONTACT hContact, int type)
+int CIcqProto::UserIsTyping(MCONTACT hContact, int type)
{
if (hContact && icqOnline()) {
if (CheckContactCapabilities(hContact, CAPF_TYPING)) {
@@ -1810,25 +1808,17 @@ int __cdecl CIcqProto::UserIsTyping(MCONTACT hContact, int type)
/////////////////////////////////////////////////////////////////////////////////////////
// OnEvent - maintain protocol events
-int __cdecl CIcqProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
+int CIcqProto::OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam)
{
switch (eventType) {
- case EV_PROTO_ONLOAD:
- return OnModulesLoaded(0, 0);
-
- case EV_PROTO_ONEXIT:
- return OnPreShutdown(0, 0);
-
case EV_PROTO_ONERASE:
- {
- char szDbSetting[MAX_PATH];
- mir_snprintf(szDbSetting, "%sP2P", m_szModuleName);
- db_delete_module(0, szDbSetting);
- mir_snprintf(szDbSetting, "%sSrvGroups", m_szModuleName);
- db_delete_module(0, szDbSetting);
- mir_snprintf(szDbSetting, "%sGroups", m_szModuleName);
- db_delete_module(0, szDbSetting);
- }
+ char szDbSetting[MAX_PATH];
+ mir_snprintf(szDbSetting, "%sP2P", m_szModuleName);
+ db_delete_module(0, szDbSetting);
+ mir_snprintf(szDbSetting, "%sSrvGroups", m_szModuleName);
+ db_delete_module(0, szDbSetting);
+ mir_snprintf(szDbSetting, "%sGroups", m_szModuleName);
+ db_delete_module(0, szDbSetting);
break;
case EV_PROTO_ONCONTACTDELETED:
diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h
index 0adec2a619..4f4ff59415 100644
--- a/protocols/IcqOscarJ/src/icq_proto.h
+++ b/protocols/IcqOscarJ/src/icq_proto.h
@@ -54,46 +54,48 @@ struct CIcqProto : public PROTO<CIcqProto>
// PROTO_INTERFACE
//====================================================================================
- virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT *psr);
- virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, MEVENT hDbEvent);
+ MCONTACT AddToList( int flags, PROTOSEARCHRESULT *psr) override;
+ MCONTACT AddToListByEvent( int flags, int iContact, MEVENT hDbEvent) override;
- virtual int __cdecl Authorize(MEVENT hDbEvent);
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const wchar_t *szReason);
- virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(MCONTACT hContact, const wchar_t *szMessage);
+ int Authorize(MEVENT hDbEvent) override;
+ int AuthDeny(MEVENT hDbEvent, const wchar_t *szReason) override;
+ int AuthRecv(MCONTACT hContact, PROTORECVEVENT*) override;
+ int AuthRequest(MCONTACT hContact, const wchar_t *szMessage) override;
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szPath);
- virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szReason);
- virtual int __cdecl FileResume( HANDLE hTransfer, int *action, const wchar_t **szFilename);
+ HANDLE FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szPath) override;
+ int FileCancel(MCONTACT hContact, HANDLE hTransfer) override;
+ int FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t *szReason) override;
+ int FileResume( HANDLE hTransfer, int *action, const wchar_t **szFilename) override;
- virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
+ INT_PTR GetCaps(int type, MCONTACT hContact = NULL) override;
+ int GetInfo(MCONTACT hContact, int infoType) override;
- virtual HANDLE __cdecl SearchBasic(const wchar_t *id);
- virtual HANDLE __cdecl SearchByEmail(const wchar_t *email);
- virtual HANDLE __cdecl SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName);
- virtual HWND __cdecl SearchAdvanced(HWND owner);
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
+ HANDLE SearchBasic(const wchar_t *id) override;
+ HANDLE SearchByEmail(const wchar_t *email) override;
+ HANDLE SearchByName(const wchar_t *nick, const wchar_t *firstName, const wchar_t *lastName) override;
+ HWND SearchAdvanced(HWND owner) override;
+ HWND CreateExtendedSearchUI(HWND owner) override;
- virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ int RecvContacts(MCONTACT hContact, PROTORECVEVENT*) override;
+ int RecvMsg(MCONTACT hContact, PROTORECVEVENT*) override;
- virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles);
- virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
- virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url);
+ int SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) override;
+ HANDLE SendFile(MCONTACT hContact, const wchar_t *szDescription, wchar_t **ppszFiles) override;
+ int SendMsg(MCONTACT hContact, int flags, const char *msg) override;
+ int SendUrl(MCONTACT hContact, int flags, const char *url) override;
- virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
- virtual int __cdecl SetStatus(int iNewStatus);
+ int SetApparentMode(MCONTACT hContact, int mode) override;
+ int SetStatus(int iNewStatus) override;
- virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt);
- virtual int __cdecl SetAwayMsg(int m_iStatus, const wchar_t *msg);
+ HANDLE GetAwayMsg(MCONTACT hContact) override;
+ int RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt) override;
+ int SetAwayMsg(int m_iStatus, const wchar_t *msg) override;
- virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
+ int UserIsTyping(MCONTACT hContact, int type) override;
- virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
+ int OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam) override;
+ void OnModulesLoaded() override;
+ void OnShutdown() override;
//====| Services |====================================================================
INT_PTR __cdecl AddServerContact(WPARAM wParam, LPARAM lParam);
@@ -123,9 +125,7 @@ struct CIcqProto : public PROTO<CIcqProto>
//====| Events |======================================================================
int __cdecl OnIdleChanged(WPARAM, LPARAM);
- int __cdecl OnModulesLoaded(WPARAM, LPARAM);
int __cdecl OnOptionsInit(WPARAM, LPARAM);
- int __cdecl OnPreShutdown(WPARAM, LPARAM);
int __cdecl OnPreBuildContactMenu(WPARAM, LPARAM);
int __cdecl OnUserInfoInit(WPARAM, LPARAM);