diff options
author | George Hazan <george.hazan@gmail.com> | 2015-03-22 23:05:16 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-03-22 23:05:16 +0000 |
commit | 12d71cc476065d21cc53321cf5ea57e29b4cc124 (patch) | |
tree | 4bcdf851b81c80012c8382abd37bfd22311150f3 /src | |
parent | 23e051890486c96ce377b6578a028b9f8787c338 (diff) |
- PROTO_INTERFACE got the default implementation;
- all unneeded stubs removed from all protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@12481 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_core/src/mir_core.def | 68 | ||||
-rw-r--r-- | src/mir_core/src/mir_core64.def | 68 | ||||
-rw-r--r-- | src/mir_core/src/protos.cpp | 164 |
3 files changed, 300 insertions, 0 deletions
diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 0e3d5e0eae..043c374ea3 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -540,3 +540,71 @@ mir_wstrcmpi @280 ?UnlockBuffer@?$CMSimpleStringT@_W@@QAEXXZ @538 NONAME
?c_str@?$CMSimpleStringT@D@@QBEPBDXZ @539 NONAME
?c_str@?$CMSimpleStringT@_W@@QBEPB_WXZ @540 NONAME
+??0PROTO_INTERFACE@@QAE@ABU0@@Z @541 NONAME
+??0PROTO_INTERFACE@@QAE@XZ @542 NONAME
+??4PROTO_INTERFACE@@QAEAAU0@ABU0@@Z @543 NONAME
+??_7PROTO_INTERFACE@@6B@ @544 NONAME
+?AddToList@PROTO_INTERFACE@@UAAIHPAUPROTOSEARCHRESULT@@@Z @545 NONAME
+?AddToListByEvent@PROTO_INTERFACE@@UAAIHHI@Z @546 NONAME
+?AuthDeny@PROTO_INTERFACE@@UAAHIPB_W@Z @547 NONAME
+?AuthRecv@PROTO_INTERFACE@@UAAHIPAUPROTORECVEVENT@@@Z @548 NONAME
+?AuthRequest@PROTO_INTERFACE@@UAAHIPB_W@Z @549 NONAME
+?Authorize@PROTO_INTERFACE@@UAAHI@Z @550 NONAME
+?CreateExtendedSearchUI@PROTO_INTERFACE@@UAAPAUHWND__@@PAU2@@Z @551 NONAME
+?FileAllow@PROTO_INTERFACE@@UAAPAXIPAXPB_W@Z @552 NONAME
+?FileCancel@PROTO_INTERFACE@@UAAHIPAX@Z @553 NONAME
+?FileDeny@PROTO_INTERFACE@@UAAHIPAXPB_W@Z @554 NONAME
+?FileResume@PROTO_INTERFACE@@UAAHPAXPAHPAPB_W@Z @555 NONAME
+?GetAwayMsg@PROTO_INTERFACE@@UAAPAXI@Z @556 NONAME
+?GetCaps@PROTO_INTERFACE@@UAAKHI@Z @557 NONAME
+?GetInfo@PROTO_INTERFACE@@UAAHIH@Z @558 NONAME
+?OnEvent@PROTO_INTERFACE@@UAAHW4PROTOEVENTTYPE@@IJ@Z @559 NONAME
+?ProtoBroadcastAck@PROTO_INTERFACE@@QAEHIHHPAXJ@Z @560 NONAME
+?RecvAwayMsg@PROTO_INTERFACE@@UAAHIHPAUPROTORECVEVENT@@@Z @561 NONAME
+?RecvContacts@PROTO_INTERFACE@@UAAHIPAUPROTORECVEVENT@@@Z @562 NONAME
+?RecvFile@PROTO_INTERFACE@@UAAHIPAUPROTORECVFILET@@@Z @563 NONAME
+?RecvMsg@PROTO_INTERFACE@@UAAHIPAUPROTORECVEVENT@@@Z @564 NONAME
+?RecvUrl@PROTO_INTERFACE@@UAAHIPAUPROTORECVEVENT@@@Z @565 NONAME
+?SearchAdvanced@PROTO_INTERFACE@@UAAPAUHWND__@@PAU2@@Z @566 NONAME
+?SearchBasic@PROTO_INTERFACE@@UAAPAXPB_W@Z @567 NONAME
+?SearchByEmail@PROTO_INTERFACE@@UAAPAXPB_W@Z @568 NONAME
+?SearchByName@PROTO_INTERFACE@@UAAPAXPB_W00@Z @569 NONAME
+?SendContacts@PROTO_INTERFACE@@UAAHIHHPAI@Z @570 NONAME
+?SendFile@PROTO_INTERFACE@@UAAPAXIPB_WPAPA_W@Z @571 NONAME
+?SendMsg@PROTO_INTERFACE@@UAAHIHPBD@Z @572 NONAME
+?SendUrl@PROTO_INTERFACE@@UAAHIHPBD@Z @573 NONAME
+?SetApparentMode@PROTO_INTERFACE@@UAAHIH@Z @574 NONAME
+?SetAwayMsg@PROTO_INTERFACE@@UAAHHPB_W@Z @575 NONAME
+?SetStatus@PROTO_INTERFACE@@UAAHH@Z @576 NONAME
+?UserIsTyping@PROTO_INTERFACE@@UAAHIH@Z @577 NONAME
+?debugLogA@PROTO_INTERFACE@@QAAXPBDZZ @578 NONAME
+?debugLogW@PROTO_INTERFACE@@QAAXPB_WZZ @579 NONAME
+?delSetting@PROTO_INTERFACE@@QAEHIPBD@Z @580 NONAME
+?delSetting@PROTO_INTERFACE@@QAEHPBD@Z @581 NONAME
+?getBool@PROTO_INTERFACE@@QAE_NIPBD_N@Z @582 NONAME
+?getBool@PROTO_INTERFACE@@QAE_NPBD_N@Z @583 NONAME
+?getByte@PROTO_INTERFACE@@QAEHIPBDE@Z @584 NONAME
+?getByte@PROTO_INTERFACE@@QAEHPBDE@Z @585 NONAME
+?getDword@PROTO_INTERFACE@@QAEKIPBDK@Z @586 NONAME
+?getDword@PROTO_INTERFACE@@QAEKPBDK@Z @587 NONAME
+?getString@PROTO_INTERFACE@@QAEHIPBDPAUDBVARIANT@@@Z @588 NONAME
+?getString@PROTO_INTERFACE@@QAEHPBDPAUDBVARIANT@@@Z @589 NONAME
+?getStringA@PROTO_INTERFACE@@QAEPADIPBD@Z @590 NONAME
+?getStringA@PROTO_INTERFACE@@QAEPADPBD@Z @591 NONAME
+?getWString@PROTO_INTERFACE@@QAEHIPBDPAUDBVARIANT@@@Z @592 NONAME
+?getWString@PROTO_INTERFACE@@QAEHPBDPAUDBVARIANT@@@Z @593 NONAME
+?getWStringA@PROTO_INTERFACE@@QAEPA_WIPBD@Z @594 NONAME
+?getWStringA@PROTO_INTERFACE@@QAEPA_WPBD@Z @595 NONAME
+?getWord@PROTO_INTERFACE@@QAEHIPBDG@Z @596 NONAME
+?getWord@PROTO_INTERFACE@@QAEHPBDG@Z @597 NONAME
+?isChatRoom@PROTO_INTERFACE@@QAE_NI@Z @598 NONAME
+?setByte@PROTO_INTERFACE@@QAEXIPBDE@Z @599 NONAME
+?setByte@PROTO_INTERFACE@@QAEXPBDE@Z @600 NONAME
+?setDword@PROTO_INTERFACE@@QAEXIPBDK@Z @601 NONAME
+?setDword@PROTO_INTERFACE@@QAEXPBDK@Z @602 NONAME
+?setString@PROTO_INTERFACE@@QAEXIPBD0@Z @603 NONAME
+?setString@PROTO_INTERFACE@@QAEXPBD0@Z @604 NONAME
+?setWString@PROTO_INTERFACE@@QAEXIPBDPB_W@Z @605 NONAME
+?setWString@PROTO_INTERFACE@@QAEXPBDPB_W@Z @606 NONAME
+?setWord@PROTO_INTERFACE@@QAEXIPBDG@Z @607 NONAME
+?setWord@PROTO_INTERFACE@@QAEXPBDG@Z @608 NONAME
diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index 1303583f1e..b66aa36d74 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -540,3 +540,71 @@ mir_wstrcmpi @280 ?UnlockBuffer@?$CMSimpleStringT@_W@@QEAAXXZ @538 NONAME
?c_str@?$CMSimpleStringT@D@@QEBAPEBDXZ @539 NONAME
?c_str@?$CMSimpleStringT@_W@@QEBAPEB_WXZ @540 NONAME
+??0PROTO_INTERFACE@@QEAA@AEBU0@@Z @541 NONAME
+??0PROTO_INTERFACE@@QEAA@XZ @542 NONAME
+??4PROTO_INTERFACE@@QEAAAEAU0@AEBU0@@Z @543 NONAME
+??_7PROTO_INTERFACE@@6B@ @544 NONAME
+?AddToList@PROTO_INTERFACE@@UEAAIHPEAUPROTOSEARCHRESULT@@@Z @545 NONAME
+?AddToListByEvent@PROTO_INTERFACE@@UEAAIHHI@Z @546 NONAME
+?AuthDeny@PROTO_INTERFACE@@UEAAHIPEB_W@Z @547 NONAME
+?AuthRecv@PROTO_INTERFACE@@UEAAHIPEAUPROTORECVEVENT@@@Z @548 NONAME
+?AuthRequest@PROTO_INTERFACE@@UEAAHIPEB_W@Z @549 NONAME
+?Authorize@PROTO_INTERFACE@@UEAAHI@Z @550 NONAME
+?CreateExtendedSearchUI@PROTO_INTERFACE@@UEAAPEAUHWND__@@PEAU2@@Z @551 NONAME
+?FileAllow@PROTO_INTERFACE@@UEAAPEAXIPEAXPEB_W@Z @552 NONAME
+?FileCancel@PROTO_INTERFACE@@UEAAHIPEAX@Z @553 NONAME
+?FileDeny@PROTO_INTERFACE@@UEAAHIPEAXPEB_W@Z @554 NONAME
+?FileResume@PROTO_INTERFACE@@UEAAHPEAXPEAHPEAPEB_W@Z @555 NONAME
+?GetAwayMsg@PROTO_INTERFACE@@UEAAPEAXI@Z @556 NONAME
+?GetCaps@PROTO_INTERFACE@@UEAA_KHI@Z @557 NONAME
+?GetInfo@PROTO_INTERFACE@@UEAAHIH@Z @558 NONAME
+?OnEvent@PROTO_INTERFACE@@UEAAHW4PROTOEVENTTYPE@@_K_J@Z @559 NONAME
+?ProtoBroadcastAck@PROTO_INTERFACE@@QEAA_JIHHPEAX_J@Z @560 NONAME
+?RecvAwayMsg@PROTO_INTERFACE@@UEAAHIHPEAUPROTORECVEVENT@@@Z @561 NONAME
+?RecvContacts@PROTO_INTERFACE@@UEAAHIPEAUPROTORECVEVENT@@@Z @562 NONAME
+?RecvFile@PROTO_INTERFACE@@UEAAHIPEAUPROTORECVFILET@@@Z @563 NONAME
+?RecvMsg@PROTO_INTERFACE@@UEAAHIPEAUPROTORECVEVENT@@@Z @564 NONAME
+?RecvUrl@PROTO_INTERFACE@@UEAAHIPEAUPROTORECVEVENT@@@Z @565 NONAME
+?SearchAdvanced@PROTO_INTERFACE@@UEAAPEAUHWND__@@PEAU2@@Z @566 NONAME
+?SearchBasic@PROTO_INTERFACE@@UEAAPEAXPEB_W@Z @567 NONAME
+?SearchByEmail@PROTO_INTERFACE@@UEAAPEAXPEB_W@Z @568 NONAME
+?SearchByName@PROTO_INTERFACE@@UEAAPEAXPEB_W00@Z @569 NONAME
+?SendContacts@PROTO_INTERFACE@@UEAAHIHHPEAI@Z @570 NONAME
+?SendFile@PROTO_INTERFACE@@UEAAPEAXIPEB_WPEAPEA_W@Z @571 NONAME
+?SendMsg@PROTO_INTERFACE@@UEAAHIHPEBD@Z @572 NONAME
+?SendUrl@PROTO_INTERFACE@@UEAAHIHPEBD@Z @573 NONAME
+?SetApparentMode@PROTO_INTERFACE@@UEAAHIH@Z @574 NONAME
+?SetAwayMsg@PROTO_INTERFACE@@UEAAHHPEB_W@Z @575 NONAME
+?SetStatus@PROTO_INTERFACE@@UEAAHH@Z @576 NONAME
+?UserIsTyping@PROTO_INTERFACE@@UEAAHIH@Z @577 NONAME
+?debugLogA@PROTO_INTERFACE@@QEAAXPEBDZZ @578 NONAME
+?debugLogW@PROTO_INTERFACE@@QEAAXPEB_WZZ @579 NONAME
+?delSetting@PROTO_INTERFACE@@QEAA_JIPEBD@Z @580 NONAME
+?delSetting@PROTO_INTERFACE@@QEAA_JPEBD@Z @581 NONAME
+?getBool@PROTO_INTERFACE@@QEAA_NIPEBD_N@Z @582 NONAME
+?getBool@PROTO_INTERFACE@@QEAA_NPEBD_N@Z @583 NONAME
+?getByte@PROTO_INTERFACE@@QEAAHIPEBDE@Z @584 NONAME
+?getByte@PROTO_INTERFACE@@QEAAHPEBDE@Z @585 NONAME
+?getDword@PROTO_INTERFACE@@QEAAKIPEBDK@Z @586 NONAME
+?getDword@PROTO_INTERFACE@@QEAAKPEBDK@Z @587 NONAME
+?getString@PROTO_INTERFACE@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @588 NONAME
+?getString@PROTO_INTERFACE@@QEAA_JPEBDPEAUDBVARIANT@@@Z @589 NONAME
+?getStringA@PROTO_INTERFACE@@QEAAPEADIPEBD@Z @590 NONAME
+?getStringA@PROTO_INTERFACE@@QEAAPEADPEBD@Z @591 NONAME
+?getWString@PROTO_INTERFACE@@QEAA_JIPEBDPEAUDBVARIANT@@@Z @592 NONAME
+?getWString@PROTO_INTERFACE@@QEAA_JPEBDPEAUDBVARIANT@@@Z @593 NONAME
+?getWStringA@PROTO_INTERFACE@@QEAAPEA_WIPEBD@Z @594 NONAME
+?getWStringA@PROTO_INTERFACE@@QEAAPEA_WPEBD@Z @595 NONAME
+?getWord@PROTO_INTERFACE@@QEAAHIPEBDG@Z @596 NONAME
+?getWord@PROTO_INTERFACE@@QEAAHPEBDG@Z @597 NONAME
+?isChatRoom@PROTO_INTERFACE@@QEAA_NI@Z @598 NONAME
+?setByte@PROTO_INTERFACE@@QEAAXIPEBDE@Z @599 NONAME
+?setByte@PROTO_INTERFACE@@QEAAXPEBDE@Z @600 NONAME
+?setDword@PROTO_INTERFACE@@QEAAXIPEBDK@Z @601 NONAME
+?setDword@PROTO_INTERFACE@@QEAAXPEBDK@Z @602 NONAME
+?setString@PROTO_INTERFACE@@QEAAXIPEBD0@Z @603 NONAME
+?setString@PROTO_INTERFACE@@QEAAXPEBD0@Z @604 NONAME
+?setWString@PROTO_INTERFACE@@QEAAXIPEBDPEB_W@Z @605 NONAME
+?setWString@PROTO_INTERFACE@@QEAAXPEBDPEB_W@Z @606 NONAME
+?setWord@PROTO_INTERFACE@@QEAAXIPEBDG@Z @607 NONAME
+?setWord@PROTO_INTERFACE@@QEAAXPEBDG@Z @608 NONAME
diff --git a/src/mir_core/src/protos.cpp b/src/mir_core/src/protos.cpp index e187c9d251..6ac870da74 100644 --- a/src/mir_core/src/protos.cpp +++ b/src/mir_core/src/protos.cpp @@ -262,3 +262,167 @@ MIR_CORE_DLL(int) ProtoGetAvatarFileFormat(const TCHAR *ptszFileName) return (res && dwBytes == SIZEOF(buf)) ? ProtoGetBufferFormat(buf) : PA_FORMAT_UNKNOWN;
}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+// default PROTO_INTERFACE method implementations
+
+MCONTACT PROTO_INTERFACE::AddToList(int flags, PROTOSEARCHRESULT* psr)
+{
+ return NULL; // error
+}
+
+MCONTACT PROTO_INTERFACE::AddToListByEvent(int flags, int iContact, MEVENT hDbEvent)
+{
+ return NULL; // error
+}
+
+int PROTO_INTERFACE::Authorize(MEVENT hDbEvent)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::AuthRecv(MCONTACT hContact, PROTORECVEVENT*)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage)
+{
+ return 1; // error
+}
+
+HANDLE PROTO_INTERFACE::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+{
+ return NULL; // error
+}
+
+int PROTO_INTERFACE::FileCancel(MCONTACT hContact, HANDLE hTransfer)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename)
+{
+ return 1; // error
+}
+
+DWORD_PTR PROTO_INTERFACE::GetCaps(int type, MCONTACT hContact)
+{
+ return 0; // empty value
+}
+
+int PROTO_INTERFACE::GetInfo(MCONTACT hContact, int infoType)
+{
+ return 1; // error
+}
+
+HANDLE PROTO_INTERFACE::SearchBasic(const PROTOCHAR* id)
+{
+ return NULL; // error
+}
+
+HANDLE PROTO_INTERFACE::SearchByEmail(const PROTOCHAR* email)
+{
+ return NULL; // error
+}
+
+HANDLE PROTO_INTERFACE::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName)
+{
+ return NULL; // error
+}
+
+HWND PROTO_INTERFACE::SearchAdvanced(HWND owner)
+{
+ return NULL; // error
+}
+
+HWND PROTO_INTERFACE::CreateExtendedSearchUI(HWND owner)
+{
+ return NULL; // error
+}
+
+int PROTO_INTERFACE::RecvContacts(MCONTACT hContact, PROTORECVEVENT*)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::RecvFile(MCONTACT hContact, PROTOFILEEVENT *evt)
+{
+ return ::Proto_RecvFile(hContact, evt); // default file receiver
+}
+
+int PROTO_INTERFACE::RecvMsg(MCONTACT hContact, PROTORECVEVENT *evt)
+{
+ ::Proto_RecvMessage(hContact, evt); // default message receiver
+ return 0;
+}
+
+int PROTO_INTERFACE::RecvUrl(MCONTACT hContact, PROTORECVEVENT*)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
+{
+ return 1; // error
+}
+
+HANDLE PROTO_INTERFACE::SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles)
+{
+ return NULL; // error
+}
+
+int PROTO_INTERFACE::SendMsg(MCONTACT hContact, int flags, const char *msg)
+{
+ return 0; // error
+}
+
+int PROTO_INTERFACE::SendUrl(MCONTACT hContact, int flags, const char *url)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::SetApparentMode(MCONTACT hContact, int mode)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::SetStatus(int iNewStatus)
+{
+ return 1; // you better declare it
+}
+
+HANDLE PROTO_INTERFACE::GetAwayMsg(MCONTACT hContact)
+{
+ return NULL; // no away message
+}
+
+int PROTO_INTERFACE::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::SetAwayMsg(int iStatus, const PROTOCHAR* msg)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::UserIsTyping(MCONTACT hContact, int type)
+{
+ return 1; // error
+}
+
+int PROTO_INTERFACE::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam)
+{
+ return 1; // not an error, vitally important
+}
|