From ae30cd958593fae5c4d385045f5ba669b9dd4b50 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 18 Jun 2015 18:29:39 +0000 Subject: protocol platform-independent code moved back to mir_app git-svn-id: http://svn.miranda-ng.org/main/trunk@14247 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_core/src/mir_core.def | 104 --------- src/mir_core/src/mir_core64.def | 104 --------- src/mir_core/src/miranda.cpp | 2 - src/mir_core/src/miranda.h | 5 - src/mir_core/src/protos.cpp | 458 ---------------------------------------- src/mir_core/src/stdafx.h | 2 - src/mir_core/src/ui_utils.cpp | 135 ------------ 7 files changed, 810 deletions(-) delete mode 100644 src/mir_core/src/protos.cpp (limited to 'src/mir_core') diff --git a/src/mir_core/src/mir_core.def b/src/mir_core/src/mir_core.def index 026c144ae2..44fd75942f 100644 --- a/src/mir_core/src/mir_core.def +++ b/src/mir_core/src/mir_core.def @@ -159,22 +159,9 @@ wildcmpi @158 wildcmpiw @159 mir_base64_encode @160 mir_base64_decode @161 -ProtoBroadcastAck @163 db_set_resident @165 db_set @166 -ProtoConstructor @167 -ProtoDestructor @168 -ProtoCreateService @169 -ProtoCreateServiceParam @170 -ProtoHookEvent @171 -ProtoCreateHookableEvent @172 -ProtoForkThread @173 -ProtoForkThreadEx @174 mir_subclassWindowFull @218 -ProtoGetAvatarFormat @219 -ProtoGetAvatarExtension @220 -ProtoGetBufferFormat @221 -ProtoGetAvatarFileFormat @222 mir_createLog @223 mir_writeLogA @224 mir_writeLogW @225 @@ -196,8 +183,6 @@ IsWinVer7Plus @240 IsFullScreen @241 IsWorkstationLocked @242 IsScreenSaverRunning @243 -ProtoLogA @244 -ProtoLogW @245 db_get_static @246 db_get_wstatic @247 db_get_static_utf @248 @@ -489,74 +474,6 @@ 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 ??0CCtrlBase@@QAE@ABV0@@Z @609 NONAME ??0CCtrlBase@@QAE@PAVCDlgBase@@H@Z @610 NONAME ??0CCtrlButton@@QAE@ABV0@@Z @611 NONAME @@ -591,8 +508,6 @@ mir_wstrcmpi @280 ??0CDbLink@@QAE@PBD0EPA_W@Z @640 NONAME ??0CDlgBase@@QAE@ABV0@@Z @641 NONAME ??0CDlgBase@@QAE@PAUHINSTANCE__@@H@Z @642 NONAME -??0CProtoIntDlgBase@@QAE@ABV0@@Z @643 NONAME -??0CProtoIntDlgBase@@QAE@PAUPROTO_INTERFACE@@H_N@Z @644 NONAME ??1CCtrlBase@@UAE@XZ @645 NONAME ??1CCtrlButton@@UAE@XZ @646 NONAME ??1CCtrlCheck@@UAE@XZ @647 NONAME @@ -609,7 +524,6 @@ mir_wstrcmpi @280 ??1CDataLink@@UAE@XZ @658 NONAME ??1CDbLink@@UAE@XZ @659 NONAME ??1CDlgBase@@UAE@XZ @660 NONAME -??1CProtoIntDlgBase@@UAE@XZ @661 NONAME ??4CCtrlBase@@QAEAAV0@ABV0@@Z @662 NONAME ??4CCtrlButton@@QAEAAV0@ABV0@@Z @663 NONAME ??4CCtrlCheck@@QAEAAV0@ABV0@@Z @664 NONAME @@ -626,7 +540,6 @@ mir_wstrcmpi @280 ??4CDataLink@@QAEAAV0@ABV0@@Z @675 NONAME ??4CDbLink@@QAEAAV0@ABV0@@Z @676 NONAME ??4CDlgBase@@QAEAAV0@ABV0@@Z @677 NONAME -??4CProtoIntDlgBase@@QAEAAV0@ABV0@@Z @678 NONAME ??_7CCtrlBase@@6B@ @679 NONAME ??_7CCtrlButton@@6B@ @680 NONAME ??_7CCtrlCheck@@6B@ @681 NONAME @@ -643,7 +556,6 @@ mir_wstrcmpi @280 ??_7CDataLink@@6B@ @692 NONAME ??_7CDbLink@@6B@ @693 NONAME ??_7CDlgBase@@6B@ @694 NONAME -??_7CProtoIntDlgBase@@6B@ @695 NONAME ?ActivatePage@CCtrlPages@@QAEXH@Z @696 NONAME ?AddColumn@CCtrlListView@@QAEXHPA_WH@Z @698 NONAME ?AddContact@CCtrlClc@@QAEXI@Z @699 NONAME @@ -668,8 +580,6 @@ mir_wstrcmpi @280 ?CreateDragImage@CCtrlListView@@QAEPAU_IMAGELIST@@HPAUtagPOINT@@@Z @719 NONAME ?CreateDragImage@CCtrlTreeView@@QAEPAU_IMAGELIST@@PAU_TREEITEM@@@Z @720 NONAME ?CreateImageList@CCtrlListView@@QAEPAU_IMAGELIST@@H@Z @721 NONAME -?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PADEK@Z @722 NONAME -?CreateLink@CProtoIntDlgBase@@QAEXAAVCCtrlData@@PBDPA_W@Z @723 NONAME ?CustomWndProc@CCtrlBase@@MAEJIIJ@Z @724 NONAME ?CustomWndProc@CCtrlPages@@MAEJIIJ@Z @725 NONAME ?DeleteAllItems@CCtrlListView@@QAEXXZ @726 NONAME @@ -684,7 +594,6 @@ mir_wstrcmpi @280 ?Detach@?$CMStringT@_WV?$ChTraitsCRT@_W@@@@QBEPA_WXZ @735 NONAME ?Disable@CCtrlBase@@QAEXXZ @736 NONAME ?DlgProc@CDlgBase@@MAEHIIJ@Z @737 NONAME -?DlgProc@CProtoIntDlgBase@@MAEHIIJ@Z @738 NONAME ?DoModal@CDlgBase@@QAEHXZ @739 NONAME ?SetParent@CDlgBase@@QAEXPAUHWND__@@@Z @740 NONAME ?EditLabel@CCtrlClc@@QAEXPAX@Z @741 NONAME @@ -796,7 +705,6 @@ mir_wstrcmpi @280 ?GetParent@CCtrlTreeView@@QAEPAU_TREEITEM@@PAU2@@Z @847 NONAME ?GetPrevSibling@CCtrlTreeView@@QAEPAU_TREEITEM@@PAU2@@Z @848 NONAME ?GetPrevVisible@CCtrlTreeView@@QAEPAU_TREEITEM@@PAU2@@Z @849 NONAME -?GetProtoInterface@CProtoIntDlgBase@@QAEPAUPROTO_INTERFACE@@XZ @850 NONAME ?GetRoot@CCtrlTreeView@@QAEPAU_TREEITEM@@XZ @851 NONAME ?GetScrollTime@CCtrlTreeView@@QAEKXZ @852 NONAME ?GetSel@CCtrlListBox@@QAE_NH@Z @853 NONAME @@ -889,9 +797,6 @@ mir_wstrcmpi @280 ?OnNotify@CCtrlListView@@MAEHHPAUtagNMHDR@@@Z @942 NONAME ?OnNotify@CCtrlPages@@MAEHHPAUtagNMHDR@@@Z @943 NONAME ?OnNotify@CCtrlTreeView@@MAEHHPAUtagNMHDR@@@Z @944 NONAME -?OnProtoActivate@CProtoIntDlgBase@@MAEXIJ@Z @945 NONAME -?OnProtoCheckOnline@CProtoIntDlgBase@@MAEXIJ@Z @946 NONAME -?OnProtoRefresh@CProtoIntDlgBase@@MAEXIJ@Z @947 NONAME ?OnReset@CCtrlBase@@UAEXXZ @948 NONAME ?OnReset@CCtrlCheck@@UAEXXZ @949 NONAME ?OnReset@CCtrlCombo@@UAEXXZ @950 NONAME @@ -979,7 +884,6 @@ mir_wstrcmpi @280 ?SetSelectedColumn@CCtrlListView@@QAEXH@Z @1032 NONAME ?SetSelectionMark@CCtrlListView@@QAEHH@Z @1033 NONAME ?SetState@CCtrlCheck@@QAEXH@Z @1034 NONAME -?SetStatusText@CProtoIntDlgBase@@QAEXPB_W@Z @1035 NONAME ?SetText@CCtrlBase@@QAEXPB_W@Z @1036 NONAME ?SetTextA@CCtrlBase@@QAEXPBD@Z @1037 NONAME ?SetTextBkColor@CCtrlListView@@QAEHK@Z @1038 NONAME @@ -1010,14 +914,6 @@ mir_wstrcmpi @280 ?TranslateTree@CCtrlTreeView@@QAEXXZ @1063 NONAME ?Unsubclass@CCtrlBase@@IAEXXZ @1064 NONAME ?Update@CCtrlListView@@QAEHH@Z @1065 NONAME -?UpdateProtoTitle@CProtoIntDlgBase@@AAEXPB_W@Z @1066 NONAME -?UpdateStatusBar@CProtoIntDlgBase@@AAEXXZ @1067 NONAME -?WindowSubscribe@PROTO_INTERFACE@@QAEXPAUHWND__@@@Z @1068 NONAME -?WindowUnsubscribe@PROTO_INTERFACE@@QAEXPAUHWND__@@@Z @1069 NONAME -ProtoWindowAdd @1071 NONAME -ProtoWindowRemove @1072 NONAME -Proto_IsProtocolLoaded @1073 NONAME -Proto_RegisterModule @1074 NONAME ?GetInst@CDlgBase@@QBEPAUHINSTANCE__@@XZ @1075 NONAME ?Find@CDlgBase@@SAPAV1@PAUHWND__@@@Z @1076 NONAME ?SetCaption@CDlgBase@@QAEXPB_W@Z @1077 NONAME diff --git a/src/mir_core/src/mir_core64.def b/src/mir_core/src/mir_core64.def index d777fb539f..101c8bc390 100644 --- a/src/mir_core/src/mir_core64.def +++ b/src/mir_core/src/mir_core64.def @@ -159,22 +159,9 @@ wildcmpi @158 wildcmpiw @159 mir_base64_encode @160 mir_base64_decode @161 -ProtoBroadcastAck @163 db_set_resident @165 db_set @166 -ProtoConstructor @167 -ProtoDestructor @168 -ProtoCreateService @169 -ProtoCreateServiceParam @170 -ProtoHookEvent @171 -ProtoCreateHookableEvent @172 -ProtoForkThread @173 -ProtoForkThreadEx @174 mir_subclassWindowFull @218 -ProtoGetAvatarFormat @219 -ProtoGetAvatarExtension @220 -ProtoGetBufferFormat @221 -ProtoGetAvatarFileFormat @222 mir_createLog @223 mir_writeLogA @224 mir_writeLogW @225 @@ -196,8 +183,6 @@ IsWinVer7Plus @240 IsFullScreen @241 IsWorkstationLocked @242 IsScreenSaverRunning @243 -ProtoLogA @244 -ProtoLogW @245 db_get_static @246 db_get_wstatic @247 db_get_static_utf @248 @@ -489,74 +474,6 @@ 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 ??0CCtrlBase@@QEAA@AEBV0@@Z @609 NONAME ??0CCtrlBase@@QEAA@PEAVCDlgBase@@H@Z @610 NONAME ??0CCtrlButton@@QEAA@AEBV0@@Z @611 NONAME @@ -591,8 +508,6 @@ mir_wstrcmpi @280 ??0CDbLink@@QEAA@PEBD0EPEA_W@Z @640 NONAME ??0CDlgBase@@QEAA@AEBV0@@Z @641 NONAME ??0CDlgBase@@QEAA@PEAUHINSTANCE__@@H@Z @642 NONAME -??0CProtoIntDlgBase@@QEAA@AEBV0@@Z @643 NONAME -??0CProtoIntDlgBase@@QEAA@PEAUPROTO_INTERFACE@@H_N@Z @644 NONAME ??1CCtrlBase@@UEAA@XZ @645 NONAME ??1CCtrlButton@@UEAA@XZ @646 NONAME ??1CCtrlCheck@@UEAA@XZ @647 NONAME @@ -609,7 +524,6 @@ mir_wstrcmpi @280 ??1CDataLink@@UEAA@XZ @658 NONAME ??1CDbLink@@UEAA@XZ @659 NONAME ??1CDlgBase@@UEAA@XZ @660 NONAME -??1CProtoIntDlgBase@@UEAA@XZ @661 NONAME ??4CCtrlBase@@QEAAAEAV0@AEBV0@@Z @662 NONAME ??4CCtrlButton@@QEAAAEAV0@AEBV0@@Z @663 NONAME ??4CCtrlCheck@@QEAAAEAV0@AEBV0@@Z @664 NONAME @@ -626,7 +540,6 @@ mir_wstrcmpi @280 ??4CDataLink@@QEAAAEAV0@AEBV0@@Z @675 NONAME ??4CDbLink@@QEAAAEAV0@AEBV0@@Z @676 NONAME ??4CDlgBase@@QEAAAEAV0@AEBV0@@Z @677 NONAME -??4CProtoIntDlgBase@@QEAAAEAV0@AEBV0@@Z @678 NONAME ??_7CCtrlBase@@6B@ @679 NONAME ??_7CCtrlButton@@6B@ @680 NONAME ??_7CCtrlCheck@@6B@ @681 NONAME @@ -643,7 +556,6 @@ mir_wstrcmpi @280 ??_7CDataLink@@6B@ @692 NONAME ??_7CDbLink@@6B@ @693 NONAME ??_7CDlgBase@@6B@ @694 NONAME -??_7CProtoIntDlgBase@@6B@ @695 NONAME ?ActivatePage@CCtrlPages@@QEAAXH@Z @696 NONAME ?AddColumn@CCtrlListView@@QEAAXHPEA_WH@Z @698 NONAME ?AddContact@CCtrlClc@@QEAAXI@Z @699 NONAME @@ -668,8 +580,6 @@ mir_wstrcmpi @280 ?CreateDragImage@CCtrlListView@@QEAAPEAU_IMAGELIST@@HPEAUtagPOINT@@@Z @719 NONAME ?CreateDragImage@CCtrlTreeView@@QEAAPEAU_IMAGELIST@@PEAU_TREEITEM@@@Z @720 NONAME ?CreateImageList@CCtrlListView@@QEAAPEAU_IMAGELIST@@H@Z @721 NONAME -?CreateLink@CProtoIntDlgBase@@QEAAXAEAVCCtrlData@@PEADEK@Z @722 NONAME -?CreateLink@CProtoIntDlgBase@@QEAAXAEAVCCtrlData@@PEBDPEA_W@Z @723 NONAME ?CustomWndProc@CCtrlBase@@MEAA_JI_K_J@Z @724 NONAME ?CustomWndProc@CCtrlPages@@MEAA_JI_K_J@Z @725 NONAME ?DeleteAllItems@CCtrlListView@@QEAAXXZ @726 NONAME @@ -684,7 +594,6 @@ mir_wstrcmpi @280 ?Detach@?$CMStringT@_WV?$ChTraitsCRT@_W@@@@QEBAPEA_WXZ @735 NONAME ?Disable@CCtrlBase@@QEAAXXZ @736 NONAME ?DlgProc@CDlgBase@@MEAA_JI_K_J@Z @737 NONAME -?DlgProc@CProtoIntDlgBase@@MEAA_JI_K_J@Z @738 NONAME ?DoModal@CDlgBase@@QEAAHXZ @739 NONAME ?SetParent@CDlgBase@@QEAAXPEAUHWND__@@@Z @740 NONAME ?EditLabel@CCtrlClc@@QEAAXPEAX@Z @741 NONAME @@ -796,7 +705,6 @@ mir_wstrcmpi @280 ?GetParent@CCtrlTreeView@@QEAAPEAU_TREEITEM@@PEAU2@@Z @847 NONAME ?GetPrevSibling@CCtrlTreeView@@QEAAPEAU_TREEITEM@@PEAU2@@Z @848 NONAME ?GetPrevVisible@CCtrlTreeView@@QEAAPEAU_TREEITEM@@PEAU2@@Z @849 NONAME -?GetProtoInterface@CProtoIntDlgBase@@QEAAPEAUPROTO_INTERFACE@@XZ @850 NONAME ?GetRoot@CCtrlTreeView@@QEAAPEAU_TREEITEM@@XZ @851 NONAME ?GetScrollTime@CCtrlTreeView@@QEAAKXZ @852 NONAME ?GetSel@CCtrlListBox@@QEAA_NH@Z @853 NONAME @@ -889,9 +797,6 @@ mir_wstrcmpi @280 ?OnNotify@CCtrlListView@@MEAAHHPEAUtagNMHDR@@@Z @942 NONAME ?OnNotify@CCtrlPages@@MEAAHHPEAUtagNMHDR@@@Z @943 NONAME ?OnNotify@CCtrlTreeView@@MEAAHHPEAUtagNMHDR@@@Z @944 NONAME -?OnProtoActivate@CProtoIntDlgBase@@MEAAX_K_J@Z @945 NONAME -?OnProtoCheckOnline@CProtoIntDlgBase@@MEAAX_K_J@Z @946 NONAME -?OnProtoRefresh@CProtoIntDlgBase@@MEAAX_K_J@Z @947 NONAME ?OnReset@CCtrlBase@@UEAAXXZ @948 NONAME ?OnReset@CCtrlCheck@@UEAAXXZ @949 NONAME ?OnReset@CCtrlCombo@@UEAAXXZ @950 NONAME @@ -979,7 +884,6 @@ mir_wstrcmpi @280 ?SetSelectedColumn@CCtrlListView@@QEAAXH@Z @1032 NONAME ?SetSelectionMark@CCtrlListView@@QEAAHH@Z @1033 NONAME ?SetState@CCtrlCheck@@QEAAXH@Z @1034 NONAME -?SetStatusText@CProtoIntDlgBase@@QEAAXPEB_W@Z @1035 NONAME ?SetText@CCtrlBase@@QEAAXPEB_W@Z @1036 NONAME ?SetTextA@CCtrlBase@@QEAAXPEBD@Z @1037 NONAME ?SetTextBkColor@CCtrlListView@@QEAAHK@Z @1038 NONAME @@ -1010,14 +914,6 @@ mir_wstrcmpi @280 ?TranslateTree@CCtrlTreeView@@QEAAXXZ @1063 NONAME ?Unsubclass@CCtrlBase@@IEAAXXZ @1064 NONAME ?Update@CCtrlListView@@QEAAHH@Z @1065 NONAME -?UpdateProtoTitle@CProtoIntDlgBase@@AEAAXPEB_W@Z @1066 NONAME -?UpdateStatusBar@CProtoIntDlgBase@@AEAAXXZ @1067 NONAME -?WindowSubscribe@PROTO_INTERFACE@@QEAAXPEAUHWND__@@@Z @1068 NONAME -?WindowUnsubscribe@PROTO_INTERFACE@@QEAAXPEAUHWND__@@@Z @1069 NONAME -ProtoWindowAdd @1071 NONAME -ProtoWindowRemove @1072 NONAME -Proto_IsProtocolLoaded @1073 NONAME -Proto_RegisterModule @1074 NONAME ?GetInst@CDlgBase@@QEBAPEAUHINSTANCE__@@XZ @1075 NONAME ?Find@CDlgBase@@SAPEAV1@PEAUHWND__@@@Z @1076 NONAME ?SetCaption@CDlgBase@@QEAAXPEB_W@Z @1077 NONAME diff --git a/src/mir_core/src/miranda.cpp b/src/mir_core/src/miranda.cpp index 64304598d0..53091dc2c9 100644 --- a/src/mir_core/src/miranda.cpp +++ b/src/mir_core/src/miranda.cpp @@ -92,7 +92,6 @@ static void LoadCoreModule(void) InitPathUtils(); InitLogs(); InitialiseModularEngine(); - InitProtocols(); InitMetaContacts(); } @@ -103,7 +102,6 @@ MIR_CORE_DLL(void) UnloadCoreModule(void) CloseHandle(hThreadQueueEmpty); TlsFree(mir_tls); - UninitProtocols(); DestroyModularEngine(); UninitLogs(); UnloadLangPackModule(); diff --git a/src/mir_core/src/miranda.h b/src/mir_core/src/miranda.h index e2da256eeb..74f8eed4dd 100644 --- a/src/mir_core/src/miranda.h +++ b/src/mir_core/src/miranda.h @@ -26,9 +26,6 @@ extern "C" { MIR_CORE_DLL(int) Langpack_MarkPluginLoaded(PLUGININFOEX* pInfo); MIR_CORE_DLL(MUUID*) Langpack_LookupUuid(WPARAM wParam); - - MIR_CORE_DLL(PROTOCOLDESCRIPTOR*) Proto_IsProtocolLoaded(const char *szProtoName); - MIR_CORE_DLL(PROTOCOLDESCRIPTOR*) Proto_RegisterModule(PROTOCOLDESCRIPTOR *pd); }; void UnloadLangPackModule(void); @@ -38,8 +35,6 @@ void DestroyModularEngine(void); int InitPathUtils(void); -void InitProtocols(); -void UninitProtocols(); HINSTANCE ProtoGetInstance(const char *szModuleName); extern HINSTANCE hInst; diff --git a/src/mir_core/src/protos.cpp b/src/mir_core/src/protos.cpp deleted file mode 100644 index f3d3f79f63..0000000000 --- a/src/mir_core/src/protos.cpp +++ /dev/null @@ -1,458 +0,0 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (C) 2012-15 Miranda NG project, -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "stdafx.h" - -static int CompareProtos(const PROTOCOLDESCRIPTOR *p1, const PROTOCOLDESCRIPTOR *p2) -{ - return strcmp(p1->szName, p2->szName); -} - -static LIST protos(10, CompareProtos); - -static HANDLE hAckEvent; - -///////////////////////////////////////////////////////////////////////////////////////// - -MIR_CORE_DLL(PROTOCOLDESCRIPTOR*) Proto_IsProtocolLoaded(const char *szProtoName) -{ - if (szProtoName == NULL) - return NULL; - - PROTOCOLDESCRIPTOR tmp; - tmp.szName = (char*)szProtoName; - return protos.find(&tmp); -} - -INT_PTR Proto_EnumProtocols(WPARAM wParam, LPARAM lParam) -{ - *(int*)wParam = protos.getCount(); - *(PROTOCOLDESCRIPTOR***)lParam = protos.getArray(); - return 0; -} - -MIR_CORE_DLL(PROTOCOLDESCRIPTOR*) Proto_RegisterModule(PROTOCOLDESCRIPTOR *pd) -{ - PROTOCOLDESCRIPTOR *p = (PROTOCOLDESCRIPTOR*)mir_calloc(sizeof(PROTOCOLDESCRIPTOR)); - if (!p) - return NULL; - - memcpy(p, pd, pd->cbSize); - p->szName = mir_strdup(pd->szName); - protos.insert(p); - return p; -} - -HINSTANCE ProtoGetInstance(const char *szModuleName) -{ - PROTOACCOUNT *pa = ProtoGetAccount(szModuleName); - if (pa == NULL) - return NULL; - - PROTOCOLDESCRIPTOR *p = Proto_IsProtocolLoaded(pa->szProtoName); - return (p == NULL) ? NULL : GetInstByAddress(p->fnInit); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -MIR_CORE_DLL(void) ProtoLogA(struct PROTO_INTERFACE *pThis, LPCSTR szFormat, va_list args) -{ - char buf[4096]; - int res = _vsnprintf(buf, sizeof(buf), szFormat, args); - CallService(MS_NETLIB_LOG, (WPARAM)(pThis ? pThis->m_hNetlibUser : NULL), (LPARAM)((res != -1) ? buf : CMStringA().FormatV(szFormat, args))); -} - -MIR_CORE_DLL(void) ProtoLogW(struct PROTO_INTERFACE *pThis, LPCWSTR wszFormat, va_list args) -{ - WCHAR buf[4096]; - int res = _vsnwprintf(buf, SIZEOF(buf), wszFormat, args); - CallService(MS_NETLIB_LOGW, (WPARAM)(pThis ? pThis->m_hNetlibUser : NULL), (LPARAM)((res != -1) ? buf : CMStringW().FormatV(wszFormat, args))); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam) -{ - ACKDATA ack = { sizeof(ACKDATA), szModule, hContact, type, result, hProcess, lParam }; - return NotifyEventHooks(hAckEvent, 0, (LPARAM)&ack); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -MIR_CORE_DLL(void) ProtoConstructor(PROTO_INTERFACE *pThis, LPCSTR pszModuleName, LPCTSTR ptszUserName) -{ - pThis->m_iVersion = 2; - pThis->m_iStatus = pThis->m_iDesiredStatus = ID_STATUS_OFFLINE; - pThis->m_szModuleName = mir_strdup(pszModuleName); - pThis->m_hProtoIcon = IcoLib_IsManaged(Skin_LoadProtoIcon(pszModuleName, ID_STATUS_ONLINE)); - pThis->m_tszUserName = mir_tstrdup(ptszUserName); - db_set_resident(pThis->m_szModuleName, "Status"); -} - -MIR_CORE_DLL(void) ProtoDestructor(PROTO_INTERFACE *pThis) -{ - mir_free(pThis->m_szModuleName); - mir_free(pThis->m_tszUserName); - - WindowList_Destroy(pThis->m_hWindowList); -} - -MIR_CORE_DLL(void) ProtoCreateService(PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFunc serviceProc) -{ - char str[MAXMODULELABELLENGTH * 2]; - strncpy_s(str, pThis->m_szModuleName, _TRUNCATE); - strncat_s(str, szService, _TRUNCATE); - ::CreateServiceFunctionObj(str, (MIRANDASERVICEOBJ)*(void**)&serviceProc, pThis); -} - -MIR_CORE_DLL(void) ProtoCreateServiceParam(PROTO_INTERFACE *pThis, const char* szService, ProtoServiceFuncParam serviceProc, LPARAM lParam) -{ - char str[MAXMODULELABELLENGTH * 2]; - strncpy_s(str, pThis->m_szModuleName, _TRUNCATE); - strncat_s(str, szService, _TRUNCATE); - ::CreateServiceFunctionObjParam(str, (MIRANDASERVICEOBJPARAM)*(void**)&serviceProc, pThis, lParam); -} - -MIR_CORE_DLL(void) ProtoHookEvent(PROTO_INTERFACE *pThis, const char* szEvent, ProtoEventFunc handler) -{ - ::HookEventObj(szEvent, (MIRANDAHOOKOBJ)*(void**)&handler, pThis); -} - -MIR_CORE_DLL(HANDLE) ProtoCreateHookableEvent(PROTO_INTERFACE *pThis, const char* szName) -{ - char str[MAXMODULELABELLENGTH * 2]; - strncpy_s(str, pThis->m_szModuleName, _TRUNCATE); - strncat_s(str, szName, _TRUNCATE); - return CreateHookableEvent(str); -} - -MIR_CORE_DLL(void) ProtoForkThread(PROTO_INTERFACE *pThis, ProtoThreadFunc pFunc, void *param) -{ - UINT threadID; - CloseHandle((HANDLE)::mir_forkthreadowner((pThreadFuncOwner)*(void**)&pFunc, pThis, param, &threadID)); -} - -MIR_CORE_DLL(HANDLE) ProtoForkThreadEx(PROTO_INTERFACE *pThis, ProtoThreadFunc pFunc, void *param, UINT* threadID) -{ - UINT lthreadID; - return (HANDLE)::mir_forkthreadowner((pThreadFuncOwner)*(void**)&pFunc, pThis, param, threadID ? threadID : <hreadID); -} - -MIR_CORE_DLL(void) ProtoWindowAdd(PROTO_INTERFACE *pThis, HWND hwnd) -{ - if (pThis->m_hWindowList == NULL) - pThis->m_hWindowList = WindowList_Create(); - - WindowList_Add(pThis->m_hWindowList, hwnd, NULL); -} - -MIR_CORE_DLL(void) ProtoWindowRemove(PROTO_INTERFACE *pThis, HWND hwnd) -{ - WindowList_Remove(pThis->m_hWindowList, hwnd); -} - -///////////////////////////////////////////////////////////////////////////////////////// - -MIR_CORE_DLL(LPCTSTR) ProtoGetAvatarExtension(int format) -{ - if (format == PA_FORMAT_PNG) - return _T(".png"); - if (format == PA_FORMAT_JPEG) - return _T(".jpg"); - if (format == PA_FORMAT_ICON) - return _T(".ico"); - if (format == PA_FORMAT_BMP) - return _T(".bmp"); - if (format == PA_FORMAT_GIF) - return _T(".gif"); - if (format == PA_FORMAT_SWF) - return _T(".swf"); - if (format == PA_FORMAT_XML) - return _T(".xml"); - - return _T(""); -} - -MIR_CORE_DLL(int) ProtoGetAvatarFormat(const TCHAR *ptszFileName) -{ - if (ptszFileName == NULL) - return PA_FORMAT_UNKNOWN; - - const TCHAR *ptszExt = _tcsrchr(ptszFileName, '.'); - if (ptszExt == NULL) - return PA_FORMAT_UNKNOWN; - - if (!_tcsicmp(ptszExt, _T(".png"))) - return PA_FORMAT_PNG; - - if (!_tcsicmp(ptszExt, _T(".jpg")) || !_tcsicmp(ptszExt, _T(".jpeg"))) - return PA_FORMAT_JPEG; - - if (!_tcsicmp(ptszExt, _T(".ico"))) - return PA_FORMAT_ICON; - - if (!_tcsicmp(ptszExt, _T(".bmp")) || !_tcsicmp(ptszExt, _T(".rle"))) - return PA_FORMAT_BMP; - - if (!_tcsicmp(ptszExt, _T(".gif"))) - return PA_FORMAT_GIF; - - if (!_tcsicmp(ptszExt, _T(".swf"))) - return PA_FORMAT_SWF; - - if (!_tcsicmp(ptszExt, _T(".xml"))) - return PA_FORMAT_XML; - - return PA_FORMAT_UNKNOWN; -} - -MIR_CORE_DLL(int) ProtoGetBufferFormat(const void *pBuffer, const TCHAR **ptszExtension) -{ - if (!memcmp(pBuffer, "\x89PNG", 4)) { - if (ptszExtension) *ptszExtension = _T(".png"); - return PA_FORMAT_PNG; - } - - if (!memcmp(pBuffer, "GIF8", 4)) { - if (ptszExtension) *ptszExtension = _T(".gif"); - return PA_FORMAT_GIF; - } - - if (!memicmp(pBuffer, "szName); - mir_free(protos[i]); - } - protos.destroy(); - - if (hAckEvent) { - DestroyHookableEvent(hAckEvent); - hAckEvent = NULL; - } -} diff --git a/src/mir_core/src/stdafx.h b/src/mir_core/src/stdafx.h index 7bc862bfa0..359230ab17 100644 --- a/src/mir_core/src/stdafx.h +++ b/src/mir_core/src/stdafx.h @@ -54,8 +54,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include -#include #include #include #include diff --git a/src/mir_core/src/ui_utils.cpp b/src/mir_core/src/ui_utils.cpp index 473634fa4c..be5e6df89d 100644 --- a/src/mir_core/src/ui_utils.cpp +++ b/src/mir_core/src/ui_utils.cpp @@ -2515,138 +2515,3 @@ void CDbLink::SaveText(TCHAR *value) { db_set_ts(NULL, m_szModule, m_szSetting, value); } - -///////////////////////////////////////////////////////////////////////////////////////// -// Base protocol dialog - -CProtoIntDlgBase::CProtoIntDlgBase(PROTO_INTERFACE *proto, int idDialog, bool show_label) - : CDlgBase(::ProtoGetInstance(proto->m_szModuleName), idDialog), - m_proto_interface(proto), - m_show_label(show_label), - m_hwndStatus(NULL) -{} - -void CProtoIntDlgBase::CreateLink(CCtrlData& ctrl, char *szSetting, BYTE type, DWORD iValue) -{ - ctrl.CreateDbLink(m_proto_interface->m_szModuleName, szSetting, type, iValue); -} - -void CProtoIntDlgBase::CreateLink(CCtrlData& ctrl, const char *szSetting, TCHAR *szValue) -{ - ctrl.CreateDbLink(m_proto_interface->m_szModuleName, szSetting, szValue); -} - -void CProtoIntDlgBase::OnProtoRefresh(WPARAM, LPARAM) {} -void CProtoIntDlgBase::OnProtoActivate(WPARAM, LPARAM) {} -void CProtoIntDlgBase::OnProtoCheckOnline(WPARAM, LPARAM) {} - -void CProtoIntDlgBase::SetStatusText(const TCHAR *statusText) -{ - if (m_hwndStatus) - SendMessage(m_hwndStatus, SB_SETTEXT, 0, (LPARAM)statusText); -} - -INT_PTR CProtoIntDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) -{ - INT_PTR result; - - switch (msg) { - case WM_INITDIALOG: // call inherited init code first - result = CSuper::DlgProc(msg, wParam, lParam); - m_proto_interface->WindowSubscribe(m_hwnd); - if (m_show_label) { - m_hwndStatus = CreateStatusWindow(WS_CHILD | WS_VISIBLE, NULL, m_hwnd, 999); - SetWindowPos(m_hwndStatus, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); - UpdateStatusBar(); - UpdateProtoTitle(); - } - return result; - - case WM_DESTROY: - IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_BIG, 0)); - IcoLib_ReleaseIcon((HICON)SendMessage(m_hwnd, WM_SETICON, ICON_SMALL, 0)); - m_proto_interface->WindowUnsubscribe(m_hwnd); - break; - - case WM_SETTEXT: - if (m_show_label && IsWindowUnicode(m_hwnd)) { - TCHAR *szTitle = (TCHAR *)lParam; - if (!_tcsstr(szTitle, m_proto_interface->m_tszUserName)) { - UpdateProtoTitle(szTitle); - return TRUE; - } - } - break; - - case WM_SIZE: - if (m_hwndStatus) { - RECT rcStatus; GetWindowRect(m_hwndStatus, &rcStatus); - RECT rcClient; GetClientRect(m_hwnd, &rcClient); - SetWindowPos(m_hwndStatus, NULL, 0, rcClient.bottom - (rcStatus.bottom - rcStatus.top), rcClient.right, (rcStatus.bottom - rcStatus.top), SWP_NOZORDER); - UpdateStatusBar(); - } - break; - - // Protocol events - case WM_PROTO_ACTIVATE: - OnProtoActivate(wParam, lParam); - return m_lresult; - - case WM_PROTO_CHECK_ONLINE: - if (m_hwndStatus) - UpdateStatusBar(); - OnProtoCheckOnline(wParam, lParam); - return m_lresult; - - case WM_PROTO_REFRESH: - OnProtoRefresh(wParam, lParam); - return m_lresult; - } - - return CSuper::DlgProc(msg, wParam, lParam); -} - -void CProtoIntDlgBase::UpdateProtoTitle(const TCHAR *szText) -{ - if (!m_show_label) - return; - - int curLength; - const TCHAR *curText; - - if (szText) { - curText = szText; - curLength = (int)mir_tstrlen(curText); - } - else { - curLength = GetWindowTextLength(m_hwnd) + 1; - TCHAR *tmp = (TCHAR *)_alloca(curLength * sizeof(TCHAR)); - GetWindowText(m_hwnd, tmp, curLength); - curText = tmp; - } - - if (!_tcsstr(curText, m_proto_interface->m_tszUserName)) { - size_t length = curLength + mir_tstrlen(m_proto_interface->m_tszUserName) + 256; - TCHAR *text = (TCHAR *)_alloca(length * sizeof(TCHAR)); - mir_sntprintf(text, length, _T("%s [%s: %s]"), curText, TranslateT("Account"), m_proto_interface->m_tszUserName); - SetWindowText(m_hwnd, text); - } -} - -void CProtoIntDlgBase::UpdateStatusBar() -{ - SIZE sz; - - HDC hdc = GetDC(m_hwndStatus); - HFONT hFntSave = (HFONT)SelectObject(hdc, GetStockObject(DEFAULT_GUI_FONT)); - GetTextExtentPoint32(hdc, m_proto_interface->m_tszUserName, (int)mir_tstrlen(m_proto_interface->m_tszUserName), &sz); - sz.cx += GetSystemMetrics(SM_CXSMICON) * 3; - SelectObject(hdc, hFntSave); - ReleaseDC(m_hwndStatus, hdc); - - RECT rcStatus; GetWindowRect(m_hwndStatus, &rcStatus); - int parts[] = { rcStatus.right - rcStatus.left - sz.cx, -1 }; - SendMessage(m_hwndStatus, SB_SETPARTS, 2, (LPARAM)parts); - SendMessage(m_hwndStatus, SB_SETICON, 1, (LPARAM)Skin_LoadProtoIcon(m_proto_interface->m_szModuleName, m_proto_interface->m_iStatus)); - SendMessage(m_hwndStatus, SB_SETTEXT, 1, (LPARAM)m_proto_interface->m_tszUserName); -} -- cgit v1.2.3