diff options
Diffstat (limited to 'src/mir_app')
-rw-r--r-- | src/mir_app/src/mir_app.def | 67 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 5 | ||||
-rw-r--r-- | src/mir_app/src/proto_accs.cpp | 12 | ||||
-rw-r--r-- | src/mir_app/src/proto_internal.cpp | 66 | ||||
-rw-r--r-- | src/mir_app/src/proto_utils.cpp | 13 |
5 files changed, 90 insertions, 73 deletions
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 8038d95dc8..ec0240613f 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -31,48 +31,48 @@ Skin_GetIconName @24 ??4PROTO_INTERFACE@@QAEAAU0@ABU0@@Z @31 NONAME
??_7CProtoIntDlgBase@@6B@ @32 NONAME
??_7PROTO_INTERFACE@@6B@ @33 NONAME
-?AddToList@PROTO_INTERFACE@@UAAIHPAUPROTOSEARCHRESULT@@@Z @34 NONAME
-?AddToListByEvent@PROTO_INTERFACE@@UAAIHHI@Z @35 NONAME
-?AuthDeny@PROTO_INTERFACE@@UAAHIPB_W@Z @36 NONAME
-?AuthRecv@PROTO_INTERFACE@@UAAHIPAUPROTORECVEVENT@@@Z @37 NONAME
-?AuthRequest@PROTO_INTERFACE@@UAAHIPB_W@Z @38 NONAME
-?Authorize@PROTO_INTERFACE@@UAAHI@Z @39 NONAME
-?CreateExtendedSearchUI@PROTO_INTERFACE@@UAAPAUHWND__@@PAU2@@Z @40 NONAME
+?AddToList@PROTO_INTERFACE@@UAEIHPAUPROTOSEARCHRESULT@@@Z @34 NONAME
+?AddToListByEvent@PROTO_INTERFACE@@UAEIHHI@Z @35 NONAME
+?AuthDeny@PROTO_INTERFACE@@UAEHIPB_W@Z @36 NONAME
+?AuthRecv@PROTO_INTERFACE@@UAEHIPAUPROTORECVEVENT@@@Z @37 NONAME
+?AuthRequest@PROTO_INTERFACE@@UAEHIPB_W@Z @38 NONAME
+?Authorize@PROTO_INTERFACE@@UAEHI@Z @39 NONAME
+?CreateExtendedSearchUI@PROTO_INTERFACE@@UAEPAUHWND__@@PAU2@@Z @40 NONAME
?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PADEK@Z @41 NONAME
?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PBDPA_W@Z @42 NONAME
?DlgProc@CProtoIntDlgBase@@MAEHIIJ@Z @43 NONAME
-?FileAllow@PROTO_INTERFACE@@UAAPAXIPAXPB_W@Z @44 NONAME
-?FileCancel@PROTO_INTERFACE@@UAAHIPAX@Z @45 NONAME
-?FileDeny@PROTO_INTERFACE@@UAAHIPAXPB_W@Z @46 NONAME
-?FileResume@PROTO_INTERFACE@@UAAHPAXPAHPAPB_W@Z @47 NONAME
-?GetAwayMsg@PROTO_INTERFACE@@UAAPAXI@Z @48 NONAME
-?GetCaps@PROTO_INTERFACE@@UAAKHI@Z @49 NONAME
-?GetInfo@PROTO_INTERFACE@@UAAHIH@Z @50 NONAME
+?FileAllow@PROTO_INTERFACE@@UAEPAXIPAXPB_W@Z @44 NONAME
+?FileCancel@PROTO_INTERFACE@@UAEHIPAX@Z @45 NONAME
+?FileDeny@PROTO_INTERFACE@@UAEHIPAXPB_W@Z @46 NONAME
+?FileResume@PROTO_INTERFACE@@UAEHPAXPAHPAPB_W@Z @47 NONAME
+?GetAwayMsg@PROTO_INTERFACE@@UAEPAXI@Z @48 NONAME
+?GetCaps@PROTO_INTERFACE@@UAEHHI@Z @49 NONAME
+?GetInfo@PROTO_INTERFACE@@UAEHIH@Z @50 NONAME
?GetProtoInterface@CProtoIntDlgBase@@QAEPAUPROTO_INTERFACE@@XZ @51 NONAME
-?OnEvent@PROTO_INTERFACE@@UAAHW4PROTOEVENTTYPE@@IJ@Z @52 NONAME
+?OnEvent@PROTO_INTERFACE@@UAEHW4PROTOEVENTTYPE@@IJ@Z @52 NONAME
?OnProtoActivate@CProtoIntDlgBase@@MAEXIJ@Z @53 NONAME
?OnProtoCheckOnline@CProtoIntDlgBase@@MAEXIJ@Z @54 NONAME
?OnProtoRefresh@CProtoIntDlgBase@@MAEXIJ@Z @55 NONAME
?ProtoBroadcastAck@PROTO_INTERFACE@@QAEHIHHPAXJ@Z @56 NONAME
-?RecvAwayMsg@PROTO_INTERFACE@@UAAHIHPAUPROTORECVEVENT@@@Z @57 NONAME
-?RecvContacts@PROTO_INTERFACE@@UAAHIPAUPROTORECVEVENT@@@Z @58 NONAME
-?RecvFile@PROTO_INTERFACE@@UAAHIPAUPROTORECVFILE@@@Z @59 NONAME
-?RecvMsg@PROTO_INTERFACE@@UAAHIPAUPROTORECVEVENT@@@Z @60 NONAME
-?RecvUrl@PROTO_INTERFACE@@UAAHIPAUPROTORECVEVENT@@@Z @61 NONAME
-?SearchAdvanced@PROTO_INTERFACE@@UAAPAUHWND__@@PAU2@@Z @62 NONAME
-?SearchBasic@PROTO_INTERFACE@@UAAPAXPB_W@Z @63 NONAME
-?SearchByEmail@PROTO_INTERFACE@@UAAPAXPB_W@Z @64 NONAME
-?SearchByName@PROTO_INTERFACE@@UAAPAXPB_W00@Z @65 NONAME
-?SendContacts@PROTO_INTERFACE@@UAAHIHHPAI@Z @66 NONAME
-?SendFile@PROTO_INTERFACE@@UAAPAXIPB_WPAPA_W@Z @67 NONAME
-?SendMsg@PROTO_INTERFACE@@UAAHIHPBD@Z @68 NONAME
-?SendUrl@PROTO_INTERFACE@@UAAHIHPBD@Z @69 NONAME
-?SetApparentMode@PROTO_INTERFACE@@UAAHIH@Z @70 NONAME
-?SetAwayMsg@PROTO_INTERFACE@@UAAHHPB_W@Z @71 NONAME
-?SetStatus@PROTO_INTERFACE@@UAAHH@Z @72 NONAME
+?RecvAwayMsg@PROTO_INTERFACE@@UAEHIHPAUPROTORECVEVENT@@@Z @57 NONAME
+?RecvContacts@PROTO_INTERFACE@@UAEHIPAUPROTORECVEVENT@@@Z @58 NONAME
+?RecvFile@PROTO_INTERFACE@@UAEHIPAUPROTORECVFILE@@@Z @59 NONAME
+?RecvMsg@PROTO_INTERFACE@@UAEHIPAUPROTORECVEVENT@@@Z @60 NONAME
+?RecvUrl@PROTO_INTERFACE@@UAEHIPAUPROTORECVEVENT@@@Z @61 NONAME
+?SearchAdvanced@PROTO_INTERFACE@@UAEPAUHWND__@@PAU2@@Z @62 NONAME
+?SearchBasic@PROTO_INTERFACE@@UAEPAXPB_W@Z @63 NONAME
+?SearchByEmail@PROTO_INTERFACE@@UAEPAXPB_W@Z @64 NONAME
+?SearchByName@PROTO_INTERFACE@@UAEPAXPB_W00@Z @65 NONAME
+?SendContacts@PROTO_INTERFACE@@UAEHIHHPAI@Z @66 NONAME
+?SendFile@PROTO_INTERFACE@@UAEPAXIPB_WPAPA_W@Z @67 NONAME
+?SendMsg@PROTO_INTERFACE@@UAEHIHPBD@Z @68 NONAME
+?SendUrl@PROTO_INTERFACE@@UAEHIHPBD@Z @69 NONAME
+?SetApparentMode@PROTO_INTERFACE@@UAEHIH@Z @70 NONAME
+?SetAwayMsg@PROTO_INTERFACE@@UAEHHPB_W@Z @71 NONAME
+?SetStatus@PROTO_INTERFACE@@UAEHH@Z @72 NONAME
?SetStatusText@CProtoIntDlgBase@@QAEXPB_W@Z @73 NONAME
?UpdateStatusBar@CProtoIntDlgBase@@AAEXXZ @75 NONAME
-?UserIsTyping@PROTO_INTERFACE@@UAAHIH@Z @76 NONAME
+?UserIsTyping@PROTO_INTERFACE@@UAEHIH@Z @76 NONAME
?WindowSubscribe@PROTO_INTERFACE@@QAEXPAUHWND__@@@Z @77 NONAME
?WindowUnsubscribe@PROTO_INTERFACE@@QAEXPAUHWND__@@@Z @78 NONAME
?debugLogA@PROTO_INTERFACE@@QAAXPBDZZ @79 NONAME
@@ -580,3 +580,6 @@ Proto_GetStatus @601 ?Compact@MDatabaseCommon@@UAGHXZ @603 NONAME
?getInst@CMPluginBase@@QBEPAUHINSTANCE__@@XZ @604 NONAME
?setInst@CMPluginBase@@QAEXPAUHINSTANCE__@@@Z @605 NONAME
+?IsReadyToExit@PROTO_INTERFACE@@UAE_NXZ @606 NONAME
+?OnModulesLoaded@PROTO_INTERFACE@@UAEXXZ @607 NONAME
+?OnShutdown@PROTO_INTERFACE@@UAEXXZ @608 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 0a954143b1..4d4d09d4c5 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -46,7 +46,7 @@ Skin_GetIconName @24 ?FileDeny@PROTO_INTERFACE@@UEAAHIPEAXPEB_W@Z @46 NONAME
?FileResume@PROTO_INTERFACE@@UEAAHPEAXPEAHPEAPEB_W@Z @47 NONAME
?GetAwayMsg@PROTO_INTERFACE@@UEAAPEAXI@Z @48 NONAME
-?GetCaps@PROTO_INTERFACE@@UEAA_KHI@Z @49 NONAME
+?GetCaps@PROTO_INTERFACE@@UEAA_JHI@Z @49 NONAME
?GetInfo@PROTO_INTERFACE@@UEAAHIH@Z @50 NONAME
?GetProtoInterface@CProtoIntDlgBase@@QEAAPEAUPROTO_INTERFACE@@XZ @51 NONAME
?OnEvent@PROTO_INTERFACE@@UEAAHW4PROTOEVENTTYPE@@_K_J@Z @52 NONAME
@@ -580,3 +580,6 @@ Proto_GetStatus @601 ?Compact@MDatabaseCommon@@UEAAHXZ @603 NONAME
?getInst@CMPluginBase@@QEBAPEAUHINSTANCE__@@XZ @604 NONAME
?setInst@CMPluginBase@@QEAAXPEAUHINSTANCE__@@@Z @605 NONAME
+?IsReadyToExit@PROTO_INTERFACE@@UEAA_NXZ @606 NONAME
+?OnModulesLoaded@PROTO_INTERFACE@@UEAAXXZ @607 NONAME
+?OnShutdown@PROTO_INTERFACE@@UEAAXXZ @608 NONAME
diff --git a/src/mir_app/src/proto_accs.cpp b/src/mir_app/src/proto_accs.cpp index 0bc5621fb8..c2fda9e605 100644 --- a/src/mir_app/src/proto_accs.cpp +++ b/src/mir_app/src/proto_accs.cpp @@ -218,7 +218,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM) if (!pa->ppro || !pa->IsEnabled())
continue;
- pa->ppro->OnEvent(EV_PROTO_ONLOAD, 0, 0);
+ pa->ppro->OnModulesLoaded();
if (!pa->bOldProto)
count++;
@@ -243,13 +243,13 @@ static int UninitializeStaticAccounts(WPARAM, LPARAM) // request permission to exit first
for (auto &pa : accounts)
if (pa->ppro && pa->IsEnabled())
- if (pa->ppro->OnEvent(EV_PROTO_ONREADYTOEXIT, 0, 0) != TRUE)
+ if (!pa->ppro->IsReadyToExit())
return 1;
// okay, all protocols are ready, exiting
for (auto &pa : accounts)
if (pa->ppro && pa->IsEnabled())
- pa->ppro->OnEvent(EV_PROTO_ONEXIT, 0, 0);
+ pa->ppro->OnShutdown();
return 0;
}
@@ -306,7 +306,7 @@ bool ActivateAccount(PROTOACCOUNT *pa, bool bIsDynamic) if (bIsDynamic) {
if (bModulesLoadedFired)
- pa->ppro->OnEvent(EV_PROTO_ONLOAD, 0, 0);
+ pa->ppro->OnModulesLoaded();
if (!db_get_b(0, "CList", "MoveProtoMenus", true))
pa->ppro->OnEvent(EV_PROTO_ONMENU, 0, 0);
pa->bDynDisabled = false;
@@ -356,10 +356,10 @@ static int DeactivationThread(DeactivationThreadParam* param) char *szModuleName = NEWSTR_ALLOCA(p->m_szModuleName);
if (param->bIsDynamic) {
- while (p->OnEvent(EV_PROTO_ONREADYTOEXIT, 0, 0) != TRUE)
+ while (!p->IsReadyToExit())
SleepEx(100, TRUE);
- p->OnEvent(EV_PROTO_ONEXIT, 0, 0);
+ p->OnShutdown();
}
KillObjectThreads(p); // waits for them before terminating
diff --git a/src/mir_app/src/proto_internal.cpp b/src/mir_app/src/proto_internal.cpp index 8e735105db..7218e2b2f1 100644 --- a/src/mir_app/src/proto_internal.cpp +++ b/src/mir_app/src/proto_internal.cpp @@ -52,22 +52,22 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE PROTO_INTERFACE(pszModuleName, ptszUserName)
{}
- virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT *psr) override
+ virtual MCONTACT AddToList(int flags, PROTOSEARCHRESULT *psr) override
{
return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLIST, flags, (LPARAM)psr);
}
- virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, MEVENT hDbEvent) override
+ virtual MCONTACT AddToListByEvent(int flags, int iContact, MEVENT hDbEvent) override
{
return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), hDbEvent);
}
- virtual int __cdecl Authorize(MEVENT hDbEvent) override
+ virtual int Authorize(MEVENT hDbEvent) override
{
return (int)ProtoCallService(m_szModuleName, PS_AUTHALLOW, (WPARAM)hDbEvent, 0);
}
- virtual int __cdecl AuthDeny(MEVENT hDbEvent, const wchar_t *szReason) override
+ virtual int AuthDeny(MEVENT hDbEvent, const wchar_t *szReason) override
{
if (m_iVersion > 1)
return (int)ProtoCallService(m_szModuleName, PS_AUTHDENY, hDbEvent, (LPARAM)szReason);
@@ -75,13 +75,13 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (int)ProtoCallService(m_szModuleName, PS_AUTHDENY, hDbEvent, _T2A(szReason));
}
- virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT *evt) override
+ virtual int AuthRecv(MCONTACT hContact, PROTORECVEVENT *evt) override
{
CCSDATA ccs = { hContact, PSR_AUTH, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_AUTH, 0, (LPARAM)&ccs);
}
- virtual int __cdecl AuthRequest(MCONTACT hContact, const wchar_t *szMessage) override
+ virtual int AuthRequest(MCONTACT hContact, const wchar_t *szMessage) override
{
CCSDATA ccs = { hContact, PSS_AUTHREQUEST, 0, (LPARAM)szMessage };
if (m_iVersion > 1)
@@ -93,7 +93,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szPath) override
+ virtual HANDLE FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szPath) override
{
CCSDATA ccs = { hContact, PSS_FILEALLOW, (WPARAM)hTransfer, (LPARAM)szPath };
if (m_iVersion > 1)
@@ -105,13 +105,13 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer) override
+ virtual int FileCancel(MCONTACT hContact, HANDLE hTransfer) override
{
CCSDATA ccs = { hContact, PSS_FILECANCEL, (WPARAM)hTransfer, 0 };
return (int)ProtoCallService(m_szModuleName, PSS_FILECANCEL, 0, (LPARAM)&ccs);
}
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason) override
+ virtual int FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason) override
{
CCSDATA ccs = { hContact, PSS_FILEDENY, (WPARAM)hTransfer, (LPARAM)szReason };
if (m_iVersion > 1)
@@ -123,7 +123,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename) override
+ virtual int FileResume(HANDLE hTransfer, int* action, const wchar_t** szFilename) override
{
PROTOFILERESUME pfr = { *action, *szFilename };
if (m_iVersion > 1)
@@ -137,18 +137,18 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact) override
+ virtual INT_PTR GetCaps(int type, MCONTACT hContact) override
{
- return (DWORD_PTR)ProtoCallService(m_szModuleName, PS_GETCAPS, type, hContact);
+ return ProtoCallService(m_szModuleName, PS_GETCAPS, type, hContact);
}
- virtual int __cdecl GetInfo(MCONTACT hContact, int flags) override
+ virtual int GetInfo(MCONTACT hContact, int flags) override
{
CCSDATA ccs = { hContact, PSS_GETINFO, (WPARAM)flags, 0 };
return ProtoCallService(m_szModuleName, PSS_GETINFO, 0, (LPARAM)&ccs);
}
- virtual HANDLE __cdecl SearchBasic(const wchar_t* id) override
+ virtual HANDLE SearchBasic(const wchar_t* id) override
{
if (m_iVersion > 1)
return (HANDLE)ProtoCallService(m_szModuleName, PS_BASICSEARCH, 0, (LPARAM)id);
@@ -156,14 +156,14 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (HANDLE)ProtoCallService(m_szModuleName, PS_BASICSEARCH, 0, _T2A(id));
}
- virtual HANDLE __cdecl SearchByEmail(const wchar_t* email) override
+ virtual HANDLE SearchByEmail(const wchar_t* email) override
{
if (m_iVersion > 1)
return (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYEMAIL, 0, (LPARAM)email);
return (HANDLE)ProtoCallService(m_szModuleName, PS_SEARCHBYEMAIL, 0, _T2A(email));
}
- virtual HANDLE __cdecl SearchByName(const wchar_t* nick, const wchar_t* firstName, const wchar_t* lastName) override
+ virtual HANDLE SearchByName(const wchar_t* nick, const wchar_t* firstName, const wchar_t* lastName) override
{
PROTOSEARCHBYNAME psn;
psn.pszNick = (wchar_t*)mir_u2a(nick);
@@ -177,48 +177,48 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE }
- virtual HWND __cdecl SearchAdvanced(HWND owner) override
+ virtual HWND SearchAdvanced(HWND owner) override
{
return (HWND)ProtoCallService(m_szModuleName, PS_SEARCHBYADVANCED, 0, (LPARAM)owner);
}
- virtual HWND __cdecl CreateExtendedSearchUI(HWND owner) override
+ virtual HWND CreateExtendedSearchUI(HWND owner) override
{
return (HWND)ProtoCallService(m_szModuleName, PS_CREATEADVSEARCHUI, 0, (LPARAM)owner);
}
- virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT* evt) override
+ virtual int RecvContacts(MCONTACT hContact, PROTORECVEVENT* evt) override
{
CCSDATA ccs = { hContact, PSR_CONTACTS, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_CONTACTS, 0, (LPARAM)&ccs);
}
- virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILE* evt) override
+ virtual int RecvFile(MCONTACT hContact, PROTORECVFILE* evt) override
{
CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)evt };
return ProtoCallService(m_szModuleName, PSR_FILE, 0, (LPARAM)&ccs);
}
- virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* evt) override
+ virtual int RecvMsg(MCONTACT hContact, PROTORECVEVENT* evt) override
{
CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)evt };
INT_PTR res = ProtoCallService(m_szModuleName, PSR_MESSAGE, 0, (LPARAM)&ccs);
return (res == CALLSERVICE_NOTFOUND) ? -1 : (int)res;
}
- virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* evt) override
+ virtual int RecvUrl(MCONTACT hContact, PROTORECVEVENT* evt) override
{
CCSDATA ccs = { hContact, PSR_URL, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_URL, 0, (LPARAM)&ccs);
}
- virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) override
+ virtual int SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) override
{
CCSDATA ccs = { hContact, PSS_CONTACTS, MAKEWPARAM(flags, nContacts), (LPARAM)hContactsList };
return (int)ProtoCallService(m_szModuleName, PSS_CONTACTS, 0, (LPARAM)&ccs);
}
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles) override
+ virtual HANDLE SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles) override
{
CCSDATA ccs = { hContact, PSS_FILE, (WPARAM)szDescription, (LPARAM)ppszFiles };
@@ -233,55 +233,55 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- virtual int __cdecl SendMsg(MCONTACT hContact, int /*flags*/, const char *msg) override
+ virtual int SendMsg(MCONTACT hContact, int /*flags*/, const char *msg) override
{
CCSDATA ccs = { hContact, PSS_MESSAGE, 0, (LPARAM)msg };
return (int)ProtoCallService(m_szModuleName, PSS_MESSAGE, 0, (LPARAM)&ccs);
}
- virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url) override
+ virtual int SendUrl(MCONTACT hContact, int flags, const char* url) override
{
CCSDATA ccs = { hContact, PSS_URL, (WPARAM)flags, (LPARAM)url };
return (int)ProtoCallService(m_szModuleName, PSS_URL, 0, (LPARAM)&ccs);
}
- virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode) override
+ virtual int SetApparentMode(MCONTACT hContact, int mode) override
{
CCSDATA ccs = { hContact, PSS_SETAPPARENTMODE, (WPARAM)mode, 0 };
return (int)ProtoCallService(m_szModuleName, PSS_SETAPPARENTMODE, 0, (LPARAM)&ccs);
}
- virtual int __cdecl SetStatus(int iNewStatus) override
+ virtual int SetStatus(int iNewStatus) override
{
return (int)ProtoCallService(m_szModuleName, PS_SETSTATUS, iNewStatus, 0);
}
- virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact) override
+ virtual HANDLE GetAwayMsg(MCONTACT hContact) override
{
CCSDATA ccs = { hContact, PSS_GETAWAYMSG, 0, 0 };
return (HANDLE)ProtoCallService(m_szModuleName, PSS_GETAWAYMSG, 0, (LPARAM)&ccs);
}
- virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int statusMode, PROTORECVEVENT* evt) override
+ virtual int RecvAwayMsg(MCONTACT hContact, int statusMode, PROTORECVEVENT* evt) override
{
CCSDATA ccs = { hContact, PSR_AWAYMSG, (WPARAM)statusMode, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_AWAYMSG, 0, (LPARAM)&ccs);
}
- virtual int __cdecl SetAwayMsg(int iStatus, const wchar_t *msg) override
+ virtual int SetAwayMsg(int iStatus, const wchar_t *msg) override
{
if (m_iVersion > 1)
return (int)ProtoCallService(m_szModuleName, PS_SETAWAYMSG, iStatus, (LPARAM)msg);
return (int)ProtoCallService(m_szModuleName, PS_SETAWAYMSG, iStatus, _T2A(msg));
}
- virtual int __cdecl UserIsTyping(MCONTACT hContact, int type) override
+ virtual int UserIsTyping(MCONTACT hContact, int type) override
{
CCSDATA ccs = { hContact, PSS_USERISTYPING, hContact, type };
return ProtoCallService(m_szModuleName, PSS_USERISTYPING, 0, (LPARAM)&ccs);
}
- virtual int __cdecl OnEvent(PROTOEVENTTYPE, WPARAM, LPARAM) override
+ virtual int OnEvent(PROTOEVENTTYPE, WPARAM, LPARAM) override
{
return 1;
}
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 399943562c..a02ce87a74 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -176,6 +176,17 @@ PROTO_INTERFACE::~PROTO_INTERFACE() WindowList_Destroy(m_hWindowList);
}
+void PROTO_INTERFACE::OnModulesLoaded()
+{}
+
+bool PROTO_INTERFACE::IsReadyToExit()
+{
+ return true;
+}
+
+void PROTO_INTERFACE::OnShutdown()
+{}
+
/////////////////////////////////////////////////////////////////////////////////////////
// protocol services
@@ -427,7 +438,7 @@ int PROTO_INTERFACE::FileResume(HANDLE, int*, const wchar_t**) return 1; // error
}
-DWORD_PTR PROTO_INTERFACE::GetCaps(int, MCONTACT)
+INT_PTR PROTO_INTERFACE::GetCaps(int, MCONTACT)
{
return 0; // empty value
}
|