diff options
author | Szymon Tokarz <wsx22@o2.pl> | 2012-10-17 21:05:02 +0000 |
---|---|---|
committer | Szymon Tokarz <wsx22@o2.pl> | 2012-10-17 21:05:02 +0000 |
commit | fd67a89688262e4e58337c33728488f5f29196a8 (patch) | |
tree | b6f8d04257ce002aaf251d586d27253db3755c42 | |
parent | 1099f914b0eb16acdcbf594ac4105224a6dfb2fd (diff) |
Tlen protocol adopted
- code moved to trunk\protocols folder
- update project files (based on rev: 27, 228, 204, 350, 279, 280, 1374, 278)
- changed code organisation to c++ convention (based on rev: 1092, 503, 504)
- changed code to Miranda NG convention (based on rev: 49, 54, 312, 401, 321, 358, 410, 441, 477, 483, 496, 507, 515, 644, 652, 743, 956, 1206, 667, 1040, 1590, 1857)
- folders restructurization (based on rev: 1890)
- code cleaning (based on rev: 270, 398, 409)
- this commit includes adopted sources of tlen_czaty.dll (former mucc.dll) plugin witch is now deprecated and will be removed
--
wsx22{at}o2.pl
git-svn-id: http://svn.miranda-ng.org/main/trunk@1972 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | plugins/!NotAdopted/Tlen/resource.h | 147 | ||||
-rw-r--r-- | plugins/!NotAdopted/Tlen/tlen_10.vcxproj | 928 | ||||
-rw-r--r-- | plugins/!NotAdopted/Tlen/tlen_czaty/mucc.vcxproj | 1245 | ||||
-rw-r--r-- | plugins/!NotAdopted/Tlen/tlen_czaty/resource.h | 218 | ||||
-rw-r--r-- | plugins/!NotAdopted/Tlen/tlen_picture.c | 320 | ||||
-rw-r--r-- | protocols/Tlen/docs/InstallScript.xml (renamed from plugins/!NotAdopted/Tlen/docs/InstallScript.xml) | 0 | ||||
-rw-r--r-- | protocols/Tlen/docs/changelog_tlen.txt (renamed from plugins/!NotAdopted/Tlen/docs/changelog_tlen.txt) | 0 | ||||
-rw-r--r-- | protocols/Tlen/docs/gpl.txt (renamed from plugins/!NotAdopted/Tlen/docs/gpl.txt) | 0 | ||||
-rw-r--r-- | protocols/Tlen/docs/gpl_comment.txt (renamed from plugins/!NotAdopted/Tlen/docs/gpl_comment.txt) | 2 | ||||
-rw-r--r-- | protocols/Tlen/docs/readme_tlen.txt (renamed from plugins/!NotAdopted/Tlen/docs/readme_tlen.txt) | 9 | ||||
-rw-r--r-- | protocols/Tlen/docs/tlen-translation.txt (renamed from plugins/!NotAdopted/Tlen/docs/tlen-translation.txt) | 0 | ||||
-rw-r--r-- | protocols/Tlen/res/auth_grant.ico (renamed from plugins/!NotAdopted/Tlen/icos/auth_grant.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/auth_request.ico (renamed from plugins/!NotAdopted/Tlen/icos/auth_request.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/groupchats.ico (renamed from plugins/!NotAdopted/Tlen/icos/groupchats.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/image.ico (renamed from plugins/!NotAdopted/Tlen/icos/image.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/mail.ico (renamed from plugins/!NotAdopted/Tlen/icos/mail.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/microphone.ico (renamed from plugins/!NotAdopted/Tlen/icos/microphone.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/speaker.ico (renamed from plugins/!NotAdopted/Tlen/icos/speaker.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/tlen.ico (renamed from plugins/!NotAdopted/Tlen/icos/tlen.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/tlen.rc (renamed from plugins/!NotAdopted/Tlen/tlen.rc) | 28 | ||||
-rw-r--r-- | protocols/Tlen/res/tlenchats.ico (renamed from plugins/!NotAdopted/Tlen/icos/tlenchats.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/res/voicechat.ico (renamed from plugins/!NotAdopted/Tlen/icos/voicechat.ico) | bin | 2550 -> 2550 bytes | |||
-rw-r--r-- | protocols/Tlen/src/codec/gsm.h (renamed from plugins/!NotAdopted/Tlen/codec/gsm.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/codec/gsm_codec.c (renamed from plugins/!NotAdopted/Tlen/codec/gsm_codec.c) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/codec/gsm_long.c (renamed from plugins/!NotAdopted/Tlen/codec/gsm_long.c) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/codec/gsm_lpc.c (renamed from plugins/!NotAdopted/Tlen/codec/gsm_lpc.c) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/codec/gsm_preprocess.c (renamed from plugins/!NotAdopted/Tlen/codec/gsm_preprocess.c) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/codec/gsm_rpe.c (renamed from plugins/!NotAdopted/Tlen/codec/gsm_rpe.c) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/codec/gsm_short.c (renamed from plugins/!NotAdopted/Tlen/codec/gsm_short.c) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/commons.h (renamed from plugins/!NotAdopted/Tlen/commons.h) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/crypto/aes.c (renamed from plugins/!NotAdopted/Tlen/crypto/aes.c) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/crypto/bignum.c (renamed from plugins/!NotAdopted/Tlen/crypto/bignum.c) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/crypto/padlock.c (renamed from plugins/!NotAdopted/Tlen/crypto/padlock.c) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/crypto/polarssl/aes.h (renamed from plugins/!NotAdopted/Tlen/crypto/polarssl/aes.h) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/crypto/polarssl/bignum.h (renamed from plugins/!NotAdopted/Tlen/crypto/polarssl/bignum.h) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/crypto/polarssl/bn_mul.h (renamed from plugins/!NotAdopted/Tlen/crypto/polarssl/bn_mul.h) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/crypto/polarssl/config.h (renamed from plugins/!NotAdopted/Tlen/crypto/polarssl/config.h) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/crypto/polarssl/padlock.h (renamed from plugins/!NotAdopted/Tlen/crypto/polarssl/padlock.h) | 0 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber.h (renamed from plugins/!NotAdopted/Tlen/jabber.h) | 199 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_iq.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_iq.c) | 14 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_iq.h (renamed from plugins/!NotAdopted/Tlen/jabber_iq.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_iqid.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_iqid.c) | 309 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_list.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_list.c) | 51 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_list.h (renamed from plugins/!NotAdopted/Tlen/jabber_list.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_misc.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_misc.c) | 57 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_opt.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_opt.c) | 282 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_svc.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_svc.c) | 767 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_thread.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_thread.c) | 328 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_util.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_util.c) | 96 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_ws.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_ws.c) | 49 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_xml.cpp (renamed from plugins/!NotAdopted/Tlen/jabber_xml.c) | 74 | ||||
-rw-r--r-- | protocols/Tlen/src/jabber_xml.h (renamed from plugins/!NotAdopted/Tlen/jabber_xml.h) | 13 | ||||
-rw-r--r-- | protocols/Tlen/src/resource.h | 147 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen.cpp (renamed from plugins/!NotAdopted/Tlen/tlen.c) | 343 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_advsearch.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_advsearch.c) | 8 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_avatar.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_avatar.c) | 141 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_avatar.h (renamed from plugins/!NotAdopted/Tlen/tlen_avatar.h) | 6 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_file.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_file.c) | 134 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_file.h (renamed from plugins/!NotAdopted/Tlen/tlen_file.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_muc.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_muc.c) | 208 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_muc.h (renamed from plugins/!NotAdopted/Tlen/tlen_muc.h) | 8 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_p2p_new.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_p2p_new.c) | 65 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_p2p_old.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_p2p_old.c) | 107 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_p2p_old.h (renamed from plugins/!NotAdopted/Tlen/tlen_p2p_old.h) | 8 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_picture.cpp | 320 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_picture.h (renamed from plugins/!NotAdopted/Tlen/tlen_picture.h) | 14 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_presence.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_presence.c) | 40 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_presence.h (renamed from plugins/!NotAdopted/Tlen/tlen_presence.h) | 10 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_userinfo.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_userinfo.c) | 72 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_voice.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_voice.c) | 393 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_voice.h (renamed from plugins/!NotAdopted/Tlen/tlen_voice.h) | 8 | ||||
-rw-r--r-- | protocols/Tlen/tlen_10.vcxproj | 366 | ||||
-rw-r--r-- | protocols/Tlen/tlen_10.vcxproj.filters | 208 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/mucc.vcxproj | 479 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/mucc.vcxproj.filters | 178 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/admin.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/admin.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/administration.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/administration.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/blank.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/blank.ico) | bin | 318 -> 318 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/bold.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/bold.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/chat.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/chat.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/delete.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/delete.ico) | bin | 1406 -> 1406 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/glowner.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/glowner.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/invite.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/invite.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/italic.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/italic.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/message.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/message.ico) | bin | 1406 -> 1406 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/mucc.rc (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/mucc.rc) | 46 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/next.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/next.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/options.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/options.ico) | bin | 1406 -> 1406 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/owner.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/owner.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/prev.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/prev.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/r_anon.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_anon.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/r_memb.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_memb.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/r_mod.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_mod.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/registered.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/registered.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/save.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/save.ico) | bin | 318 -> 318 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/search.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/search.ico) | bin | 1406 -> 1406 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/sendmail.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/sendmail.ico) | bin | 1406 -> 1406 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/smile.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/smile.ico) | bin | 1406 -> 1406 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/tlenbig.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/tlenbig.ico) | bin | 2238 -> 2238 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/tlensmall.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/tlensmall.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/res/underline.ico (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/icos/underline.ico) | bin | 894 -> 894 bytes | |||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/AdminWindow.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/AdminWindow.cpp) | 12 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/AdminWindow.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/AdminWindow.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatContainer.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatContainer.cpp) | 26 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatContainer.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatContainer.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatEvent.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatEvent.cpp) | 10 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatEvent.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatEvent.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatGroup.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatGroup.cpp) | 10 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatGroup.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatGroup.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatRoom.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatRoom.cpp) | 6 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatRoom.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatRoom.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatUser.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatUser.cpp) | 6 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatUser.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatUser.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatWindow.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatWindow.cpp) | 301 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ChatWindow.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ChatWindow.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/FontList.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/FontList.cpp) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/FontList.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/FontList.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/HelperDialog.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/HelperDialog.cpp) | 50 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/HelperDialog.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/HelperDialog.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ManagerWindow.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ManagerWindow.cpp) | 76 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/ManagerWindow.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/ManagerWindow.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/Options.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/Options.cpp) | 78 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/Options.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/Options.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/Utils.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/Utils.cpp) | 18 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/Utils.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/Utils.h) | 4 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/mucc.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/mucc.cpp) | 37 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/mucc.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/mucc.h) | 6 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/mucc_services.cpp (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/mucc_services.cpp) | 16 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/mucc_services.h (renamed from plugins/!NotAdopted/Tlen/tlen_czaty/mucc_services.h) | 2 | ||||
-rw-r--r-- | protocols/Tlen/tlen_czaty/src/resource.h | 218 |
130 files changed, 4217 insertions, 5148 deletions
diff --git a/plugins/!NotAdopted/Tlen/resource.h b/plugins/!NotAdopted/Tlen/resource.h deleted file mode 100644 index f3a350630e..0000000000 --- a/plugins/!NotAdopted/Tlen/resource.h +++ /dev/null @@ -1,147 +0,0 @@ -//{{NO_DEPENDENCIES}}
-// Microsoft Developer Studio generated include file.
-// Used by Tlen.rc
-//
-
-#define IDI_TLEN 100
-#define IDI_MAIL 101
-#define IDI_MUC 102
-#define IDI_CHATS 103
-#define IDI_GRANT 104
-#define IDI_REQUEST 105
-#define IDI_VOICE 106
-#define IDI_MICROPHONE 107
-#define IDI_SPEAKER 108
-#define IDI_IMAGE 109
-
-#define IDD_OPTIONS_BASIC 151
-#define IDD_OPTIONS_VOICE 152
-#define IDD_OPTIONS_POPUPS 153
-#define IDD_OPTIONS_ADVANCED 154
-#define IDD_USER_INFO 155
-#define IDD_USER_VCARD 156
-#define IDD_PASSWORD 157
-#define IDD_ADVSEARCH 158
-#define IDD_VOICE 159
-#define IDD_ACCEPT_VOICE 160
-#define IDD_USER_CHANGEAVATAR 161
-#define IDD_ACCMGRUI 162
-
-#define IDC_TABS 1000
-#define IDC_EDIT_USERNAME 1001
-#define IDC_SAVE 1002
-#define IDC_EDIT_PASSWORD 1003
-#define IDC_EDIT_LOGIN_SERVER 1004
-#define IDC_INFO_JID 1007
-#define IDC_INFO_RESOURCE 1008
-#define IDC_SHOW_OFFLINE 1012
-#define IDC_OFFLINE_MESSAGE 1013
-#define IDC_OFFLINE_MESSAGE_OPTION 1014
-#define IDC_VISIBILITY_SUPPORT 1015
-#define IDC_NUDGE_SUPPORT 1016
-#define IDC_LOG_ALERTS 1017
-
-#define IDC_SUBSCRIPTION 1039
-#define IDC_REGISTERACCOUNT 1040
-#define IDC_SIMPLE 1041
-#define IDC_KEEPALIVE 1042
-#define IDC_HOST 1043
-#define IDC_HOSTPORT 1044
-#define IDC_USE_SSL 1045
-#define IDC_SAVEPASSWORD 1048
-#define IDC_ROSTER_ALERTS 1049
-#define IDC_PASSWORD 1050
-#define IDC_RECONNECT 1050
-#define IDC_JID 1051
-#define IDC_ROSTER_SYNC 1052
-#define IDC_ALERT_POLICY 1053
-#define IDC_MUC_POLICY 1054
-#define IDC_VOICE_POLICY 1055
-#define IDC_IGNORE_ADVERTISEMENTS 1056
-#define IDC_AVATARS 1057
-#define IDC_VERSIONINFO 1058
-#define IDC_IMAGE_POLICY 1059
-#define IDC_CITY 1060
-#define IDC_FULLNAME 1061
-#define IDC_NICKNAME 1062
-#define IDC_FIRSTNAME 1063
-#define IDC_LASTNAME 1064
-#define IDC_BIRTH 1065
-#define IDC_AGE 1065
-#define IDC_OCCUPATION 1066
-#define IDC_EMAIL 1073
-#define IDC_GENDER 1096
-#define IDC_VOICECONVERSATIONS 1097
-#define IDC_PUBLICSTATUS 1098
-#define IDC_VCQUALITY 1100
-#define IDC_VUMETERIN 1101
-#define IDC_VUMETEROUT 1102
-#define IDC_BYTESIN 1103
-#define IDC_BYTESOUT 1104
-#define IDC_MICROPHONE 1105
-#define IDC_SPEAKER 1106
-#define IDC_ACCEPT 1107
-
-#define IDC_FILE_PROXY_TYPE_LABEL 1108
-#define IDC_FILE_PROXY_TYPE 1109
-#define IDC_FILE_PROXY_HOST_LABEL 1110
-#define IDC_FILE_PROXY_HOST 1111
-#define IDC_FILE_PROXY_PORT_LABEL 1112
-#define IDC_FILE_PROXY_PORT 1113
-#define IDC_FILE_PROXY_USE_AUTH 1114
-#define IDC_FILE_PROXY_USER 1115
-#define IDC_FILE_PROXY_USER_LABEL 1116
-#define IDC_FILE_PROXY_PASSWORD_LABEL 1117
-#define IDC_FILE_PROXY_PASSWORD 1118
-#define IDC_FILE_USE_PROXY 1119
-#define IDC_VOICE_DEVICE_IN 1120
-#define IDC_VOICE_DEVICE_OUT 1121
-
-#define IDC_MSG_ACK 1124
-#define IDC_SERVER 1125
-#define IDC_NICK 1129
-#define IDC_LIST 1133
-#define IDC_ENTER 1144
-#define IDC_AGEFROM 1152
-#define IDC_AGETO 1153
-#define IDC_LOOKFOR 1154
-#define IDC_SCHOOL 1155
-#define IDC_FROM 1175
-#define IDC_DELAY 1180
-#define IDC_COLORBKG 1181
-#define IDC_COLORTXT 1182
-#define IDC_PREVIEW 1183
-#define IDC_ENABLEPOPUP 1184
-#define IDC_DELAY_PERMANENT 1185
-#define IDC_DELAY_CUSTOM 1186
-#define IDC_DELAY_POPUP 1187
-#define IDC_TLEN 1190
-#define IDC_GENDER_TEXT 1195
-#define IDC_OCCUPATION_TEXT 1199
-#define IDC_LOOKFOR_TEXT 1200
-#define IDC_GROUP 1203
-#define IDC_SOFTWARE 1204
-#define IDC_VERSION 1205
-#define IDC_SYSTEM 1206
-#define IDC_AVATAR 1210
-#define IDC_SETAVATAR 1211
-#define IDC_DELETEAVATAR 1212
-#define IDC_AVATAR_LIST 1213
-#define IDC_OLD_AVATAR 1214
-#define IDC_BROWSEAVATAR 1215
-#define IDC_PUBLICAVATAR 1216
-
-#define IDC_STATUS 1414
-#define IDC_PLAN 1415
-#define IDC_PERSONALGROUP 1434
-#define IDC_EXTRAGROUP 1435
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 190
-#define _APS_NEXT_COMMAND_VALUE 40017
-#define _APS_NEXT_CONTROL_VALUE 1204
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/plugins/!NotAdopted/Tlen/tlen_10.vcxproj b/plugins/!NotAdopted/Tlen/tlen_10.vcxproj deleted file mode 100644 index 606d56b8d8..0000000000 --- a/plugins/!NotAdopted/Tlen/tlen_10.vcxproj +++ /dev/null @@ -1,928 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug Ansi|x64">
- <Configuration>Debug Ansi</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Unicode|Win32">
- <Configuration>Debug Unicode</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Unicode|x64">
- <Configuration>Debug Unicode</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug x64|Win32">
- <Configuration>Debug x64</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Ansi|Win32">
- <Configuration>Debug Ansi</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug x64|x64">
- <Configuration>Debug x64</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Ansi|x64">
- <Configuration>Release Ansi</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Unicode|Win32">
- <Configuration>Release Unicode</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Unicode|x64">
- <Configuration>Release Unicode</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release x64|Win32">
- <Configuration>Release x64</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Ansi|Win32">
- <Configuration>Release Ansi</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release x64|x64">
- <Configuration>Release x64</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectName>tlen</ProjectName>
- <ProjectGuid>{33276462-8313-4192-8306-13717ECCA60A}</ProjectGuid>
- <RootNamespace>jabber</RootNamespace>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">true</IgnoreImportLibrary>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">true</IgnoreImportLibrary>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">true</IgnoreImportLibrary>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">$(SolutionDir)$(Configuration)/Plugins\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">$(SolutionDir)$(Configuration)/Obj/$(ProjectName)\</IntDir>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">true</IgnoreImportLibrary>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Debug/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <GenerateMapFile>false</GenerateMapFile>
- <MapFileName>
- </MapFileName>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Debug/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ExceptionHandling>
- </ExceptionHandling>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <GenerateMapFile>false</GenerateMapFile>
- <MapFileName>
- </MapFileName>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <GenerateMapFile>false</GenerateMapFile>
- <MapFileName>
- </MapFileName>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Release/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <GenerateMapFile>false</GenerateMapFile>
- <MapFileName>
- </MapFileName>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Release/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_X64;X64;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Release/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Full</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_X64;X64;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalOptions>/ALIGN:4096 /ignore:4108 %(AdditionalOptions)</AdditionalOptions>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Debug/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>false</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Precise</FloatingPointModel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
- <GenerateMapFile>false</GenerateMapFile>
- <MapFileName>
- </MapFileName>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Debug/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>false</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Precise</FloatingPointModel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
- <GenerateMapFile>false</GenerateMapFile>
- <MapFileName>
- </MapFileName>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Debug/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_X64;X64;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>false</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Precise</FloatingPointModel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
- <GenerateMapFile>false</GenerateMapFile>
- <MapFileName>
- </MapFileName>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Debug/jabber.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;./ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_X64;X64;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>false</StringPooling>
- <ExceptionHandling>
- </ExceptionHandling>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <FloatingPointModel>Precise</FloatingPointModel>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <BrowseInformationFile>
- </BrowseInformationFile>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <CompileAs>Default</CompileAs>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0409</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>wsock32.lib;version.lib;comctl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
- <GenerateMapFile>false</GenerateMapFile>
- <MapFileName>
- </MapFileName>
- <BaseAddress>0x32500000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="crypto\aes.c" />
- <ClCompile Include="crypto\bignum.c" />
- <ClCompile Include="codec\gsm_codec.c" />
- <ClCompile Include="codec\gsm_long.c" />
- <ClCompile Include="codec\gsm_lpc.c" />
- <ClCompile Include="codec\gsm_preprocess.c" />
- <ClCompile Include="codec\gsm_rpe.c" />
- <ClCompile Include="codec\gsm_short.c" />
- <ClCompile Include="jabber_iq.c" />
- <ClCompile Include="jabber_iqid.c" />
- <ClCompile Include="jabber_list.c" />
- <ClCompile Include="jabber_misc.c" />
- <ClCompile Include="jabber_opt.c" />
- <ClCompile Include="jabber_svc.c" />
- <ClCompile Include="jabber_thread.c" />
- <ClCompile Include="jabber_util.c" />
- <ClCompile Include="jabber_ws.c" />
- <ClCompile Include="jabber_xml.c" />
- <ClCompile Include="crypto\padlock.c" />
- <ClCompile Include="tlen.c" />
- <ClCompile Include="tlen_advsearch.c" />
- <ClCompile Include="tlen_avatar.c" />
- <ClCompile Include="tlen_file.c" />
- <ClCompile Include="tlen_muc.c" />
- <ClCompile Include="tlen_p2p_new.c" />
- <ClCompile Include="tlen_p2p_old.c" />
- <ClCompile Include="tlen_picture.c" />
- <ClCompile Include="tlen_presence.c" />
- <ClCompile Include="tlen_userinfo.c" />
- <ClCompile Include="tlen_voice.c" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="tlen.rc" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="commons.h" />
- <ClInclude Include="crypto\polarssl\aes.h" />
- <ClInclude Include="crypto\polarssl\bignum.h" />
- <ClInclude Include="crypto\polarssl\bn_mul.h" />
- <ClInclude Include="crypto\polarssl\config.h" />
- <ClInclude Include="codec\gsm.h" />
- <ClInclude Include="jabber.h" />
- <ClInclude Include="jabber_iq.h" />
- <ClInclude Include="jabber_list.h" />
- <ClInclude Include="jabber_xml.h" />
- <ClInclude Include="crypto\polarssl\padlock.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="tlen_avatar.h" />
- <ClInclude Include="tlen_file.h" />
- <ClInclude Include="tlen_muc.h" />
- <ClInclude Include="tlen_p2p_new.h" />
- <ClInclude Include="tlen_p2p_old.h" />
- <ClInclude Include="tlen_picture.h" />
- <ClInclude Include="tlen_presence.h" />
- <ClInclude Include="tlen_voice.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="icos\auth_grant.ico" />
- <None Include="icos\auth_request.ico" />
- <None Include="icos\groupchats.ico" />
- <None Include="icos\image.ico" />
- <None Include="icos\mail.ico" />
- <None Include="icos\microphone.ico" />
- <None Include="icos\speaker.ico" />
- <None Include="icos\tlen.ico" />
- <None Include="icos\tlenbig.ico" />
- <None Include="icos\tlenchats.ico" />
- <None Include="icos\tlensmall.ico" />
- <None Include="icos\voicechat.ico" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.vcxproj b/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.vcxproj deleted file mode 100644 index c2fe6e7b70..0000000000 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.vcxproj +++ /dev/null @@ -1,1245 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug Ansi|Win32">
- <Configuration>Debug Ansi</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Ansi|x64">
- <Configuration>Debug Ansi</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Unicode|Win32">
- <Configuration>Debug Unicode</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug Unicode|x64">
- <Configuration>Debug Unicode</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug x64|Win32">
- <Configuration>Debug x64</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Debug x64|x64">
- <Configuration>Debug x64</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Ansi|Win32">
- <Configuration>Release Ansi</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Ansi|x64">
- <Configuration>Release Ansi</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Unicode|Win32">
- <Configuration>Release Unicode</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release Unicode|x64">
- <Configuration>Release Unicode</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release x64|Win32">
- <Configuration>Release x64</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release x64|x64">
- <Configuration>Release x64</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{BD1D155A-7A47-4414-80A3-CCCC3C5C583B}</ProjectGuid>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseOfMfc>false</UseOfMfc>
- <CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>Windows7.1SDK</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">$(Configuration)\Obj\</IntDir>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">true</IgnoreImportLibrary>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">false</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">false</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">false</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">false</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">false</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">$(Configuration)\</OutDir>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">$(Configuration)\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">$(Configuration)\Obj\</IntDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">$(Configuration)\Obj\</IntDir>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">true</IgnoreImportLibrary>
- <IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">true</IgnoreImportLibrary>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">true</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">true</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">true</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">true</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">true</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">true</LinkIncremental>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">tlen_czaty</TargetName>
- <TargetName Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">tlen_czaty</TargetName>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;_X64;X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <BaseAddress>0x32600000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Release/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;UNICODE;_UNICODE;_X64;X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <BaseAddress>0x32600000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <BaseAddress>0x32600000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Release/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <BaseAddress>0x32600000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Release/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <BaseAddress>0x32600000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">
- <Midl>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Release/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <StringPooling>true</StringPooling>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <BaseAddress>0x32600000</BaseAddress>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Debug/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;X64;_X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Debug/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;UNICODE;_UNICODE;X64;_X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Debug/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Debug/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TargetEnvironment>Win32</TargetEnvironment>
- <TypeLibraryName>.\Debug/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">
- <Midl>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MkTypLibCompatible>true</MkTypLibCompatible>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <TypeLibraryName>.\Debug/mucc.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
- </Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../../include;../ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
- <AssemblerListingLocation>
- </AssemblerListingLocation>
- <ObjectFileName>$(IntDir)</ObjectFileName>
- <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
- <WarningLevel>Level3</WarningLevel>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- </ClCompile>
- <ResourceCompile>
- <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <Culture>0x0415</Culture>
- </ResourceCompile>
- <Link>
- <AdditionalDependencies>odbc32.lib;odbccp32.lib;comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
- </Link>
- <Bscmake>
- <SuppressStartupBanner>true</SuppressStartupBanner>
- <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
- </Bscmake>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="AdminWindow.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="ChatContainer.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="ChatEvent.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="ChatGroup.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="ChatRoom.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="ChatUser.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="ChatWindow.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="FontList.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="HelperDialog.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="ManagerWindow.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="mucc.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="mucc_services.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="Options.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- <ClCompile Include="Utils.cpp">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="AdminWindow.h" />
- <ClInclude Include="ChatContainer.h" />
- <ClInclude Include="ChatEvent.h" />
- <ClInclude Include="ChatGroup.h" />
- <ClInclude Include="ChatRoom.h" />
- <ClInclude Include="ChatUser.h" />
- <ClInclude Include="ChatWindow.h" />
- <ClInclude Include="FontList.h" />
- <ClInclude Include="HelperDialog.h" />
- <ClInclude Include="ManagerWindow.h" />
- <ClInclude Include="mucc.h" />
- <ClInclude Include="mucc_services.h" />
- <ClInclude Include="Options.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="Utils.h" />
- </ItemGroup>
- <ItemGroup>
- <None Include="icos\admin.ico" />
- <None Include="icos\administration.ico" />
- <None Include="icos\blank.ico" />
- <None Include="icos\bold.ico" />
- <None Include="icos\chat.ico" />
- <None Include="icos\glowner.ico" />
- <None Include="icos\invite.ico" />
- <None Include="icos\italic.ico" />
- <None Include="icos\message.ico" />
- <None Include="icos\moderator.ico" />
- <None Include="icos\next.ico" />
- <None Include="icos\options.ico" />
- <None Include="icos\owner.ico" />
- <None Include="icos\prev.ico" />
- <None Include="icos\r_anon.ico" />
- <None Include="icos\r_memb.ico" />
- <None Include="icos\r_mod.ico" />
- <None Include="icos\registered.ico" />
- <None Include="icos\search.ico" />
- <None Include="icos\smile.ico" />
- <None Include="icos\tlensmall.ico" />
- <None Include="icos\underline.ico" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="mucc.rc">
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release x64|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Unicode|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release Ansi|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
- </ResourceCompile>
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project>
\ No newline at end of file diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/resource.h b/plugins/!NotAdopted/Tlen/tlen_czaty/resource.h deleted file mode 100644 index c4d2f1945c..0000000000 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/resource.h +++ /dev/null @@ -1,218 +0,0 @@ -/*
-
-MUCC Group Chat GUI Plugin for Miranda IM
-Copyright (C) 2004 Piotr Piastucki
-
-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.
-
-*/
-#define IDI_CHAT 100
-#define IDI_ITALIC 101
-#define IDI_BOLD 102
-#define IDI_UNDERLINE 103
-#define IDI_OPTIONS 104
-#define IDI_OWNER 105
-#define IDI_ADMIN 106
-#define IDI_REGISTERED 107
-#define IDI_R_MODERATED 108
-#define IDI_R_MEMBERS 109
-#define IDI_R_ANONYMOUS 110
-#define IDI_SEARCH 111
-#define IDI_PREV 112
-#define IDI_NEXT 113
-#define IDI_BLANK 114
-#define IDI_INVITE 115
-#define IDI_ADMINISTRATION 116
-#define IDI_GLOBALOWNER 117
-#define IDI_SMILEY 118
-#define IDI_MESSAGE 119
-
-#define IDD_CHATMANAGER 150
-#define IDD_GROUPCHAT_LOG 151
-#define IDD_HELPER_JOIN 152
-#define IDD_HELPER_INPUT 153
-#define IDD_HELPER_INVITE 154
-#define IDD_HELPER_INVITE_ACCEPT 155
-#define IDD_HELPER_TOPIC 156
-#define IDD_OPTIONS 157
-#define IDD_OPT_POPUPS 158
-#define IDD_TAB_CHATROOMS 159
-#define IDD_TAB_MYROOMS 160
-#define IDD_TAB_MYNICKNAMES 161
-#define IDD_USER_ADMIN 162
-#define IDD_USER_KICK 163
-#define IDD_USER_ROLE 164
-#define IDD_USER_BROWSER 165
-#define IDD_GROUPCHAT_CONTAINER 166
-
-#define IDR_CHATOPTIONS 200
-#define IDR_CONTEXT 201
-
-#define IDC_FONTLIST 1000
-#define IDC_COLORINPUT 1001
-#define IDC_COLORBKG 1002
-#define IDC_COLORLIST 1003
-#define IDC_COLORTXT 1004
-#define IDC_CHOOSEFONT 1005
-#define IDC_FONTSGB 1006
-#define IDC_OPTIONSGB 1007
-#define IDC_LOGLIMITSPIN 1008
-#define IDC_LOGLIMIT 1009
-#define IDC_SENDONENTER 1010
-#define IDC_USETABS 1011
-#define IDC_ENABLEIEVIEW 1012
-#define IDC_REGISTER 1020
-#define IDC_NAME 1021
-#define IDC_FRAME 1037
-#define IDC_SIMPLE 1041
-#define IDC_PASSWORD 1050
-#define IDC_JID 1051
-#define IDC_COUNTRY 1060
-#define IDC_NICKNAME 1062
-#define IDC_MSG 1084
-#define IDC_TITLE 1089
-#define IDC_DESC 1090
-#define IDC_DELETE 1092
-#define IDC_LOAD 1093
-#define IDC_JOIN 1123
-#define IDC_ROOM 1124
-#define IDC_ROOM_LABEL 1125
-#define IDC_BROWSE 1126
-#define IDC_VSCROLL 1128
-#define IDC_NICK 1129
-#define IDC_NICK_LABEL 1130
-#define IDC_EDIT 1131
-#define IDC_TREELIST 1132
-#define IDC_LIST 1133
-#define IDC_HSPLIT 1134
-#define IDC_LOG 1136
-#define IDC_VSPLIT 1137
-#define IDC_SET 1140
-#define IDC_TABS 1141
-#define IDC_TOPIC 1141
-#define IDC_TOPIC_BUTTON 1142
-#define IDC_FONT 1143
-#define IDC_ENTER 1144
-#define IDC_CTRLENTER 1145
-#define IDC_FLASH 1148
-#define IDC_TIME 1156
-#define IDC_DATE 1157
-#define IDC_REASON 1171
-#define IDC_USER 1172
-#define IDC_INVITE 1173
-#define IDC_ACCEPT 1174
-#define IDC_FROM 1175
-#define IDC_DELAY 1180
-#define IDC_PREVIEW 1183
-#define IDC_ENABLEPOPUP 1184
-#define IDC_DELAY_PERMANENT 1185
-#define IDC_DELAY_CUSTOM 1186
-#define IDC_DELAY_POPUP 1187
-#define IDC_GROUP 1203
-#define IDC_BOLD 1204
-#define IDC_SMILEY 1205
-#define IDC_UNDERLINE 1205
-#define IDC_ITALIC 1206
-#define IDC_COLOR 1207
-#define IDC_OPTIONS 1208
-#define IDC_SMILEYBTN 1209
-#define IDC_CHECK_PERMANENT 1210
-#define IDC_CHECK_PUBLIC 1211
-#define IDC_CHECK_NICKNAMES 1212
-#define IDC_CHECK_MEMBERS 1213
-#define IDC_NEXT 1214
-#define IDC_PREV 1215
-#define IDC_FONTSIZE 1215
-#define IDC_SEARCH 1216
-#define IDC_REFRESH 1216
-#define IDC_REMOVE 1217
-#define IDC_KICK_OPTIONS 1218
-#define IDC_ROLE_OPTIONS 1219
-#define IDC_KICK 1220
-#define IDC_SET_ROLE 1221
-#define IDC_UPDATE 1313
-#define IDC_STATUS 1414
-#define IDC_PLAN 1415
-#define IDC_SHOW 1416
-
-#define IDC_PERSONALGROUP 1434
-#define IDC_EXTRAGROUP 1436
-
-#define ID_OPTIONMENU_SHOWNICKNAMES 40001
-#define ID_OPTIONMENU_MSGINNEWLINE 40002
-#define ID_OPTIONMENU_SHOWTIMESTAMP 40011
-#define ID_OPTIONMENU_SHOWDATE 40012
-#define ID_OPTIONMENU_SHOWSECONDS 40013
-#define ID_OPTIONMENU_USELONGDATE 40014
-#define ID_OPTIONMENU_FORMATFONT 40021
-#define ID_OPTIONMENU_FORMATSIZE 40022
-#define ID_OPTIONMENU_FORMATCOLOR 40023
-#define ID_OPTIONMENU_FORMATSTYLE 40024
-#define ID_OPTIONMENU_LOGMESSAGES 40031
-#define ID_OPTIONMENU_LOGJOINED 40032
-#define ID_OPTIONMENU_LOGLEFT 40033
-#define ID_OPTIONMENU_LOGTOPIC 40034
-#define ID_OPTIONMENU_FLASHMESSAGES 40035
-#define ID_OPTIONMENU_FLASHJOINED 40036
-#define ID_OPTIONMENU_FLASHLEFT 40037
-#define ID_OPTIONMENU_FLASHTOPIC 40038
-#define ID_OPTIONMENU_SAVEDEFAULT 40040
-#define ID_USERMENU_MESSAGE 40050
-#define ID_USERMENU_KICK_POPUP 40051
-#define ID_USERMENU_KICK_NO_BAN 40052
-#define ID_USERMENU_KICK_BAN_1_MIN 40053
-#define ID_USERMENU_KICK_BAN_5_MIN 40054
-#define ID_USERMENU_KICK_BAN_15_MIN 40055
-#define ID_USERMENU_KICK_BAN_30_MIN 40056
-#define ID_USERMENU_KICK_BAN_1_H 40057
-#define ID_USERMENU_KICK_BAN_6_H 40058
-#define ID_USERMENU_KICK_BAN_1_D 40059
-#define ID_USERMENU_KICK_BAN_3_D 40060
-#define ID_USERMENU_KICK_BAN_1_W 40061
-#define ID_USERMENU_KICK_BAN_2_W 40062
-#define ID_USERMENU_KICK_BAN_4_W 40063
-#define ID_USERMENU_RIGHTS_NO 40065
-#define ID_USERMENU_RIGHTS_MEMBER 40066
-#define ID_USERMENU_RIGHTS_ADMIN 40067
-#define ID_USERMENU_ADMINISTRATION 40070
-#define ID_USERMENU_UNBAN 40071
-#define ID_ADMINMENU_DESTROY 40080
-#define ID_ADMINMENU_ADMIN 40081
-#define ID_ADMINMENU_BROWSE 40082
-#define ID_ADMINMENU_SAVELOG 40083
-
-#define IDM_CUT 40000
-#define IDM_COPY 40001
-#define IDM_PASTE 40002
-#define IDM_UNDO 40003
-#define IDM_DELETE 40004
-#define IDM_REDO 40005
-#define IDM_COPYALL 40011
-#define IDM_SELECTALL 40012
-#define IDM_CLEAR 40013
-#define IDM_OPENNEW 40014
-#define IDM_OPENEXISTING 40015
-#define IDM_COPYLINK 40016
-
-// Next default values for new objects
-//
-#ifdef APSTUDIO_INVOKED
-#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 205
-#define _APS_NEXT_COMMAND_VALUE 40090
-#define _APS_NEXT_CONTROL_VALUE 1217
-#define _APS_NEXT_SYMED_VALUE 101
-#endif
-#endif
diff --git a/plugins/!NotAdopted/Tlen/tlen_picture.c b/plugins/!NotAdopted/Tlen/tlen_picture.c deleted file mode 100644 index c8f8d6f3e2..0000000000 --- a/plugins/!NotAdopted/Tlen/tlen_picture.c +++ /dev/null @@ -1,320 +0,0 @@ -/*
-
-Tlen Protocol Plugin for Miranda IM
-Copyright (C) 2002-2004 Santithorn Bunchua
-Copyright (C) 2004-2009 Piotr Piastucki
-
-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 "jabber.h"
-#include "jabber_list.h"
-#include "tlen_file.h"
-#include "tlen_p2p_old.h"
-
-typedef struct {
- TlenProtocol *proto;
- JABBER_LIST_ITEM *item;
-} TLENPSREQUESTTHREADDATA;
-
-static void LogPictureMessage(TlenProtocol *proto, const char *jid, const char *filename, BOOL isSent)
-{
- char message[1024];
- const char *msg = isSent ? "Image sent file://%s" : "Image received file://%s";
- _snprintf(message, sizeof(message), Translate(msg), filename);
- TlenLogMessage(proto, JabberHContactFromJID(proto, jid), isSent ? DBEF_SENT : 0, message);
-}
-
-static void TlenPsPostThread(void *ptr) {
- TLENPSREQUESTTHREADDATA *data = (TLENPSREQUESTTHREADDATA *)ptr;
- TlenProtocol *proto = data->proto;
- JABBER_LIST_ITEM *item = data->item;
- JABBER_SOCKET socket = JabberWsConnect(proto, "ps.tlen.pl", 443);
- BOOL bSent = FALSE;
- if (socket != NULL) {
- char header[512];
- DWORD ret;
- item->ft->s = socket;
- item->ft->hFileEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- _snprintf(header, sizeof(header), "<pic auth='%s' t='p' to='%s' size='%d' idt='%s'/>", proto->threadData->username, item->ft->jid, item->ft->fileTotalSize, item->jid);
- JabberWsSend(proto, socket, header, (int)strlen(header));
- ret = WaitForSingleObject(item->ft->hFileEvent, 1000 * 60 * 5);
- if (ret == WAIT_OBJECT_0) {
- FILE *fp = fopen( item->ft->files[0], "rb" );
- if (fp) {
- int i;
- char header[512];
- char fileBuffer[2048];
- _snprintf(header, sizeof(header), "<pic st='%s' idt='%s'/>", item->ft->iqId, item->jid);
- JabberWsSend(proto, socket, header, (int)strlen(header));
- JabberLog(proto, "Sending picture data...");
- for (i = item->ft->filesSize[0]; i > 0; ) {
- int toread = min(2048, i);
- int readcount = (int)fread(fileBuffer, (size_t)1, (size_t)toread, fp);
- i -= readcount;
- if (readcount > 0) {
- JabberWsSend(proto, socket, fileBuffer, readcount);
- }
- if (toread != readcount) {
- break;
- }
- }
- fclose(fp);
- SleepEx(3000, TRUE);
- bSent = TRUE;
- } else {
- /* picture not found */
- }
- } else {
- /* 5 minutes passed */
- }
- Netlib_CloseHandle(socket);
- if (bSent) {
- JabberSend(proto, "<message to='%s' idt='%s' rt='%s' pid='1001' type='pic' />", item->ft->jid, item->jid, item->ft->id2);
- LogPictureMessage(proto, item->ft->jid, item->ft->files[0], TRUE);
- }
- TlenP2PFreeFileTransfer(item->ft);
- JabberListRemove(proto, LIST_PICTURE, item->jid);
- } else {
- /* cannot connect to ps server */
- }
- mir_free(data);
-}
-
-static void TlenPsPost(TlenProtocol *proto, JABBER_LIST_ITEM *item) {
- TLENPSREQUESTTHREADDATA *threadData = (TLENPSREQUESTTHREADDATA *)mir_alloc(sizeof(TLENPSREQUESTTHREADDATA));
- threadData->proto = proto;
- threadData->item = item;
- JabberForkThread(TlenPsPostThread, 0, threadData);
-}
-
-static void TlenPsGetThread(void *ptr) {
- TLENPSREQUESTTHREADDATA *data = (TLENPSREQUESTTHREADDATA *)ptr;
- TlenProtocol *proto = data->proto;
- JABBER_LIST_ITEM *item = data->item;
- FILE *fp;
- fp = fopen( item->ft->files[0], "wb" );
- if (fp) {
- JABBER_SOCKET socket = JabberWsConnect(proto, "ps.tlen.pl", 443);
- if (socket != NULL) {
- XmlState xmlState;
- char header[512];
- char fileBuffer[2048];
- JabberXmlInitState(&xmlState);
- _snprintf(header, sizeof(header), "<pic auth='%s' t='g' to='%s' pid='1001' idt='%s' rt='%s'/>", proto->threadData->username, item->ft->jid, item->jid, item->ft->id2);
- JabberWsSend(proto, socket, header, (int)strlen(header));
- JabberLog(proto, "Reveiving picture data...");
- {
- int totalcount = 0;
- int size = item->ft->filesSize[0];
- BOOL bHeader = TRUE;
- while (TRUE) {
- int readcount = JabberWsRecv(proto, socket, fileBuffer, 2048 - totalcount);
- if (readcount == 0) {
- break;
- }
- totalcount += readcount;
- if (bHeader) {
- char * tagend = memchr(fileBuffer, '/', totalcount);
- tagend = memchr(tagend + 1, '>', totalcount - (tagend - fileBuffer) - 1);
- if (tagend != NULL) {
- int parsed = JabberXmlParse(&xmlState, fileBuffer, tagend - fileBuffer + 1);
- if (parsed == 0) {
- continue;
- }
- bHeader = FALSE;
- totalcount -= parsed;
- memmove(fileBuffer, fileBuffer+parsed, totalcount);
- }
- }
- if (!bHeader) {
- if (totalcount > 0) {
- fwrite(fileBuffer, 1, totalcount, fp);
- size -= totalcount;
- totalcount = 0;
- }
- if (size == 0) {
- break;
- }
- }
- }
- }
- Netlib_CloseHandle(socket);
- JabberLog(proto, "Picture received...");
- LogPictureMessage(proto, item->ft->jid, item->ft->files[0], FALSE);
- } else {
- /* cannot connect to ps server */
- }
- fclose(fp);
- } else {
- /* cannot create file */
- }
- TlenP2PFreeFileTransfer(item->ft);
- JabberListRemove(proto, LIST_PICTURE, item->jid);
- mir_free(data);
-}
-
-static void TlenPsGet(TlenProtocol *proto, JABBER_LIST_ITEM *item) {
- TLENPSREQUESTTHREADDATA *threadData = (TLENPSREQUESTTHREADDATA *)mir_alloc(sizeof(TLENPSREQUESTTHREADDATA));
- threadData->proto = proto;
- threadData->item = item;
- JabberForkThread(TlenPsGetThread, 0, threadData);
-}
-
-void TlenProcessPic(XmlNode *node, TlenProtocol *proto) {
- JABBER_LIST_ITEM *item = NULL;
- char *crc, *crc_c, *idt, *size, *from, *fromRaw, *rt;
- from = JabberXmlGetAttrValue(node, "from");
- fromRaw = JabberLoginFromJID(from);
- idt = JabberXmlGetAttrValue(node, "idt");
- size = JabberXmlGetAttrValue(node, "size");
- crc_c = JabberXmlGetAttrValue(node, "crc_c");
- crc = JabberXmlGetAttrValue(node, "crc");
- rt = JabberXmlGetAttrValue(node, "rt");
- if (idt != NULL) {
- item = JabberListGetItemPtr(proto, LIST_PICTURE, idt);
- }
- if (item != NULL) {
- if (!strcmp(from, "ps")) {
- char *st = JabberXmlGetAttrValue(node, "st");
- if (st != NULL) {
- item->ft->iqId = mir_strdup(st);
- item->ft->id2 = mir_strdup(rt);
- if (item->ft->hFileEvent != NULL) {
- SetEvent(item->ft->hFileEvent);
- item->ft->hFileEvent = NULL;
- }
- }
- } else if (!strcmp(item->ft->jid, fromRaw)) {
- if (crc_c != NULL) {
- if (!strcmp(crc_c, "n")) {
- /* crc_c = n, picture transfer accepted */
- TlenPsPost(proto, item);
- } else if (!strcmp(crc_c, "f")) {
- /* crc_c = f, picture cached, no need to transfer again */
- LogPictureMessage(proto, item->ft->jid, item->ft->files[0], TRUE);
- TlenP2PFreeFileTransfer(item->ft);
- JabberListRemove(proto, LIST_PICTURE, idt);
- }
- } else if (rt != NULL) {
- item->ft->id2 = mir_strdup(rt);
- TlenPsGet(proto, item);
- }
- }
- } else if (crc != NULL) {
- BOOL bAccept = proto->tlenOptions.imagePolicy == TLEN_IMAGES_ACCEPT_ALL || (proto->tlenOptions.imagePolicy == TLEN_IMAGES_IGNORE_NIR && IsAuthorized(proto, from));
- if (bAccept) {
- FILE* fp;
- char fileName[MAX_PATH];
- char *ext = JabberXmlGetAttrValue(node, "ext");
- char *tmpPath = Utils_ReplaceVars( "%miranda_userdata%" );
- int tPathLen = mir_snprintf( fileName, MAX_PATH, "%s\\Images\\Tlen", tmpPath );
- long oldSize = 0, lSize = atol(size);
- DWORD dwAttributes = GetFileAttributesA( fileName );
- if ( dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 ) {
- CallService( MS_UTILS_CREATEDIRTREE, 0, ( LPARAM )fileName );
- }
- mir_free(tmpPath);
- fileName[ tPathLen++ ] = '\\';
- mir_snprintf( fileName + tPathLen, MAX_PATH - tPathLen, "%s.%s", crc, ext );
- fp = fopen( fileName, "rb" );
- if (fp) {
- fseek(fp, 0, SEEK_END);
- oldSize = ftell(fp);
- fclose(fp);
- }
- if (oldSize != lSize) {
- item = JabberListAdd(proto, LIST_PICTURE, idt);
- item->ft = TlenFileCreateFT(proto, from);
- item->ft->files = (char **) mir_alloc(sizeof(char *));
- item->ft->filesSize = (long *) mir_alloc(sizeof(long));
- item->ft->files[0] = mir_strdup(fileName);
- item->ft->filesSize[0] = lSize;
- item->ft->fileTotalSize = item->ft->filesSize[0];
- JabberSend(proto, "<message type='pic' to='%s' crc_c='n' idt='%s'/>", from, idt);
- } else {
- JabberSend(proto, "<message type='pic' to='%s' crc_c='f' idt='%s'/>", from, idt);
- LogPictureMessage(proto, from, fileName, FALSE);
- }
- }
- }
- mir_free(fromRaw);
-}
-
-BOOL SendPicture(TlenProtocol *proto, HANDLE hContact) {
- DBVARIANT dbv;
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
- char *jid = dbv.pszVal;
- char szFilter[512];
- char *szFileName = (char*) mir_alloc(_MAX_PATH);
- OPENFILENAMEA ofn = {0};
- CallService( MS_UTILS_GETBITMAPFILTERSTRINGS, ( WPARAM ) sizeof( szFilter ), ( LPARAM )szFilter );
- ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
- ofn.hwndOwner = NULL;
- ofn.lpstrFilter = szFilter;
- ofn.lpstrCustomFilter = NULL;
- ofn.lpstrFile = szFileName;
- ofn.nMaxFile = _MAX_PATH;
- ofn.Flags = OFN_FILEMUSTEXIST;
- szFileName[0] = '\0';
- if ( GetOpenFileNameA( &ofn )) {
- long size;
- FILE* fp = fopen( szFileName, "rb" );
- if (fp) {
- fseek(fp, 0, SEEK_END);
- size = ftell(fp);
- if (size > 0 && size < 256*1024) {
- JABBER_LIST_ITEM *item;
- mir_sha1_ctx sha;
- DWORD digest[5];
- int i;
- char idStr[10];
- char fileBuffer[2048];
- int id = JabberSerialNext(proto);
- _snprintf(idStr, sizeof(idStr), "%d", id);
- item = JabberListAdd(proto, LIST_PICTURE, idStr);
- item->ft = TlenFileCreateFT(proto, jid);
- item->ft->files = (char **) mir_alloc(sizeof(char *));
- item->ft->filesSize = (long *) mir_alloc(sizeof(long));
- item->ft->files[0] = szFileName;
- item->ft->filesSize[0] = size;
- item->ft->fileTotalSize = size;
- fseek(fp, 0, SEEK_SET);
- mir_sha1_init( &sha );
- for (i = item->ft->filesSize[0]; i > 0; ) {
- int toread = min(2048, i);
- int readcount = (int)fread(fileBuffer, (size_t)1, (size_t)toread, fp);
- i -= readcount;
- if (readcount > 0) {
- mir_sha1_append( &sha, (mir_sha1_byte_t* )fileBuffer, readcount);
- }
- if (toread != readcount) {
- break;
- }
- }
- mir_sha1_finish( &sha, (mir_sha1_byte_t* )digest );
- JabberSend(proto, "<message type='pic' to='%s' crc='%08x%08x%08x%08x%08x' idt='%s' size='%d' ext='%s'/>", jid,
- (int)htonl(digest[0]), (int)htonl(digest[1]), (int)htonl(digest[2]), (int)htonl(digest[3]), (int)htonl(digest[4]), idStr, item->ft->filesSize[0], "jpg");
- } else {
- /* file too big */
- }
- fclose(fp);
- }
- }
- DBFreeVariant(&dbv);
- }
- return FALSE;
-}
diff --git a/plugins/!NotAdopted/Tlen/docs/InstallScript.xml b/protocols/Tlen/docs/InstallScript.xml index 7d8a8f28fe..7d8a8f28fe 100644 --- a/plugins/!NotAdopted/Tlen/docs/InstallScript.xml +++ b/protocols/Tlen/docs/InstallScript.xml diff --git a/plugins/!NotAdopted/Tlen/docs/changelog_tlen.txt b/protocols/Tlen/docs/changelog_tlen.txt index b2c05c760a..b2c05c760a 100644 --- a/plugins/!NotAdopted/Tlen/docs/changelog_tlen.txt +++ b/protocols/Tlen/docs/changelog_tlen.txt diff --git a/plugins/!NotAdopted/Tlen/docs/gpl.txt b/protocols/Tlen/docs/gpl.txt index 45645b4b53..45645b4b53 100644 --- a/plugins/!NotAdopted/Tlen/docs/gpl.txt +++ b/protocols/Tlen/docs/gpl.txt diff --git a/plugins/!NotAdopted/Tlen/docs/gpl_comment.txt b/protocols/Tlen/docs/gpl_comment.txt index ecacc17720..3e51542c78 100644 --- a/plugins/!NotAdopted/Tlen/docs/gpl_comment.txt +++ b/protocols/Tlen/docs/gpl_comment.txt @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2012 Santithorn Bunchua, Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/docs/readme_tlen.txt b/protocols/Tlen/docs/readme_tlen.txt index 234e9b098b..6eef0b8a95 100644 --- a/plugins/!NotAdopted/Tlen/docs/readme_tlen.txt +++ b/protocols/Tlen/docs/readme_tlen.txt @@ -1,4 +1,4 @@ -Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
===================================
Introduction:
@@ -40,9 +40,10 @@ Acknowledgement: ================================================================
-Tlen Protocol Plugin for Miranda IM
-Copyright (C) 2002-2012 Santithorn Bunchua, Piotr Piastucki
-
+Tlen Protocol Plugin for Miranda NG
+Copyright (C)
+ 2002-2012 Santithorn Bunchua, Piotr Piastucki (Miranga IM)
+ 2012 Szymon Tokarz (Miranda IM / NG)
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
diff --git a/plugins/!NotAdopted/Tlen/docs/tlen-translation.txt b/protocols/Tlen/docs/tlen-translation.txt index 6406f204c7..6406f204c7 100644 --- a/plugins/!NotAdopted/Tlen/docs/tlen-translation.txt +++ b/protocols/Tlen/docs/tlen-translation.txt diff --git a/plugins/!NotAdopted/Tlen/icos/auth_grant.ico b/protocols/Tlen/res/auth_grant.ico Binary files differindex 8d1ba94308..8d1ba94308 100644 --- a/plugins/!NotAdopted/Tlen/icos/auth_grant.ico +++ b/protocols/Tlen/res/auth_grant.ico diff --git a/plugins/!NotAdopted/Tlen/icos/auth_request.ico b/protocols/Tlen/res/auth_request.ico Binary files differindex 116ed47baf..116ed47baf 100644 --- a/plugins/!NotAdopted/Tlen/icos/auth_request.ico +++ b/protocols/Tlen/res/auth_request.ico diff --git a/plugins/!NotAdopted/Tlen/icos/groupchats.ico b/protocols/Tlen/res/groupchats.ico Binary files differindex ecd2070d20..ecd2070d20 100644 --- a/plugins/!NotAdopted/Tlen/icos/groupchats.ico +++ b/protocols/Tlen/res/groupchats.ico diff --git a/plugins/!NotAdopted/Tlen/icos/image.ico b/protocols/Tlen/res/image.ico Binary files differindex 832b9a8b69..832b9a8b69 100644 --- a/plugins/!NotAdopted/Tlen/icos/image.ico +++ b/protocols/Tlen/res/image.ico diff --git a/plugins/!NotAdopted/Tlen/icos/mail.ico b/protocols/Tlen/res/mail.ico Binary files differindex c5ded81702..c5ded81702 100644 --- a/plugins/!NotAdopted/Tlen/icos/mail.ico +++ b/protocols/Tlen/res/mail.ico diff --git a/plugins/!NotAdopted/Tlen/icos/microphone.ico b/protocols/Tlen/res/microphone.ico Binary files differindex 1edeb90d1f..1edeb90d1f 100644 --- a/plugins/!NotAdopted/Tlen/icos/microphone.ico +++ b/protocols/Tlen/res/microphone.ico diff --git a/plugins/!NotAdopted/Tlen/icos/speaker.ico b/protocols/Tlen/res/speaker.ico Binary files differindex 77545c0598..77545c0598 100644 --- a/plugins/!NotAdopted/Tlen/icos/speaker.ico +++ b/protocols/Tlen/res/speaker.ico diff --git a/plugins/!NotAdopted/Tlen/icos/tlen.ico b/protocols/Tlen/res/tlen.ico Binary files differindex a166dd4c5b..a166dd4c5b 100644 --- a/plugins/!NotAdopted/Tlen/icos/tlen.ico +++ b/protocols/Tlen/res/tlen.ico diff --git a/plugins/!NotAdopted/Tlen/tlen.rc b/protocols/Tlen/res/tlen.rc index 1a304cad39..98ba762f77 100644 --- a/plugins/!NotAdopted/Tlen/tlen.rc +++ b/protocols/Tlen/res/tlen.rc @@ -1,5 +1,5 @@ -#include "resource.h"
-#include "commons.h"
+#include "..\src\resource.h"
+#include "..\src\commons.h"
#ifdef __MINGW32__
#define WINVER 0x500
#define _WIN32_IE 0x500
@@ -17,7 +17,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 TEXTINCLUDE DISCARDABLE
BEGIN
- "resource.h\0"
+ "..\\src\\resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
@@ -394,7 +394,7 @@ BEGIN BLOCK "041504e3"
BEGIN
VALUE "Comments", "\0"
- VALUE "CompanyName", "http://mtlen.berlios.de\0"
+ VALUE "CompanyName", "http://miranda-ng.org/\0"
VALUE "FileDescription", "Tlen Protocol Plugin for Miranda NG\0"
VALUE "FileVersion", TLEN_VERSION_STRING
VALUE "InternalName", "tlen\0"
@@ -423,16 +423,16 @@ END // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_TLEN ICON DISCARDABLE "icos/tlen.ico"
-IDI_MAIL ICON DISCARDABLE "icos/mail.ico"
-IDI_MUC ICON DISCARDABLE "icos/groupchats.ico"
-IDI_CHATS ICON DISCARDABLE "icos/tlenchats.ico"
-IDI_GRANT ICON DISCARDABLE "icos/auth_grant.ico"
-IDI_REQUEST ICON DISCARDABLE "icos/auth_request.ico"
-IDI_VOICE ICON DISCARDABLE "icos/voicechat.ico"
-IDI_MICROPHONE ICON DISCARDABLE "icos/microphone.ico"
-IDI_SPEAKER ICON DISCARDABLE "icos/speaker.ico"
-IDI_IMAGE ICON DISCARDABLE "icos/image.ico"
+IDI_TLEN ICON DISCARDABLE "res\\tlen.ico"
+IDI_MAIL ICON DISCARDABLE "res\\mail.ico"
+IDI_MUC ICON DISCARDABLE "res\\groupchats.ico"
+IDI_CHATS ICON DISCARDABLE "res\\tlenchats.ico"
+IDI_GRANT ICON DISCARDABLE "res\\auth_grant.ico"
+IDI_REQUEST ICON DISCARDABLE "res\\auth_request.ico"
+IDI_VOICE ICON DISCARDABLE "res\\voicechat.ico"
+IDI_MICROPHONE ICON DISCARDABLE "res\\microphone.ico"
+IDI_SPEAKER ICON DISCARDABLE "res\\speaker.ico"
+IDI_IMAGE ICON DISCARDABLE "res\\image.ico"
#endif // English (U.S.) resources
diff --git a/plugins/!NotAdopted/Tlen/icos/tlenchats.ico b/protocols/Tlen/res/tlenchats.ico Binary files differindex 52ab77ff63..52ab77ff63 100644 --- a/plugins/!NotAdopted/Tlen/icos/tlenchats.ico +++ b/protocols/Tlen/res/tlenchats.ico diff --git a/plugins/!NotAdopted/Tlen/icos/voicechat.ico b/protocols/Tlen/res/voicechat.ico Binary files differindex f989d5b212..f989d5b212 100644 --- a/plugins/!NotAdopted/Tlen/icos/voicechat.ico +++ b/protocols/Tlen/res/voicechat.ico diff --git a/plugins/!NotAdopted/Tlen/codec/gsm.h b/protocols/Tlen/src/codec/gsm.h index fba1bcb1ac..f522739d10 100644 --- a/plugins/!NotAdopted/Tlen/codec/gsm.h +++ b/protocols/Tlen/src/codec/gsm.h @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is based on GSM 06.10 source code developed by
diff --git a/plugins/!NotAdopted/Tlen/codec/gsm_codec.c b/protocols/Tlen/src/codec/gsm_codec.c index 1d0a08a41e..afa1ef32de 100644 --- a/plugins/!NotAdopted/Tlen/codec/gsm_codec.c +++ b/protocols/Tlen/src/codec/gsm_codec.c @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is based on GSM 06.10 source code developed by
diff --git a/plugins/!NotAdopted/Tlen/codec/gsm_long.c b/protocols/Tlen/src/codec/gsm_long.c index 7d9148061c..56d83f7873 100644 --- a/plugins/!NotAdopted/Tlen/codec/gsm_long.c +++ b/protocols/Tlen/src/codec/gsm_long.c @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is based on GSM 06.10 source code developed by
diff --git a/plugins/!NotAdopted/Tlen/codec/gsm_lpc.c b/protocols/Tlen/src/codec/gsm_lpc.c index 519612baff..538a03ad92 100644 --- a/plugins/!NotAdopted/Tlen/codec/gsm_lpc.c +++ b/protocols/Tlen/src/codec/gsm_lpc.c @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is based on GSM 06.10 source code developed by
diff --git a/plugins/!NotAdopted/Tlen/codec/gsm_preprocess.c b/protocols/Tlen/src/codec/gsm_preprocess.c index b3d11bb7b1..462b8e6c17 100644 --- a/plugins/!NotAdopted/Tlen/codec/gsm_preprocess.c +++ b/protocols/Tlen/src/codec/gsm_preprocess.c @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is based on GSM 06.10 source code developed by
diff --git a/plugins/!NotAdopted/Tlen/codec/gsm_rpe.c b/protocols/Tlen/src/codec/gsm_rpe.c index ad7234e606..21c5419672 100644 --- a/plugins/!NotAdopted/Tlen/codec/gsm_rpe.c +++ b/protocols/Tlen/src/codec/gsm_rpe.c @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is based on GSM 06.10 source code developed by
diff --git a/plugins/!NotAdopted/Tlen/codec/gsm_short.c b/protocols/Tlen/src/codec/gsm_short.c index c461484639..4b02515a72 100644 --- a/plugins/!NotAdopted/Tlen/codec/gsm_short.c +++ b/protocols/Tlen/src/codec/gsm_short.c @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is based on GSM 06.10 source code developed by
diff --git a/plugins/!NotAdopted/Tlen/commons.h b/protocols/Tlen/src/commons.h index af5a9bbcd7..af5a9bbcd7 100644 --- a/plugins/!NotAdopted/Tlen/commons.h +++ b/protocols/Tlen/src/commons.h diff --git a/plugins/!NotAdopted/Tlen/crypto/aes.c b/protocols/Tlen/src/crypto/aes.c index 7bccdf93a1..7bccdf93a1 100644 --- a/plugins/!NotAdopted/Tlen/crypto/aes.c +++ b/protocols/Tlen/src/crypto/aes.c diff --git a/plugins/!NotAdopted/Tlen/crypto/bignum.c b/protocols/Tlen/src/crypto/bignum.c index eabfbfe6f9..eabfbfe6f9 100644 --- a/plugins/!NotAdopted/Tlen/crypto/bignum.c +++ b/protocols/Tlen/src/crypto/bignum.c diff --git a/plugins/!NotAdopted/Tlen/crypto/padlock.c b/protocols/Tlen/src/crypto/padlock.c index 2e2e4775ff..2e2e4775ff 100644 --- a/plugins/!NotAdopted/Tlen/crypto/padlock.c +++ b/protocols/Tlen/src/crypto/padlock.c diff --git a/plugins/!NotAdopted/Tlen/crypto/polarssl/aes.h b/protocols/Tlen/src/crypto/polarssl/aes.h index efc13daf5b..efc13daf5b 100644 --- a/plugins/!NotAdopted/Tlen/crypto/polarssl/aes.h +++ b/protocols/Tlen/src/crypto/polarssl/aes.h diff --git a/plugins/!NotAdopted/Tlen/crypto/polarssl/bignum.h b/protocols/Tlen/src/crypto/polarssl/bignum.h index 7938406708..7938406708 100644 --- a/plugins/!NotAdopted/Tlen/crypto/polarssl/bignum.h +++ b/protocols/Tlen/src/crypto/polarssl/bignum.h diff --git a/plugins/!NotAdopted/Tlen/crypto/polarssl/bn_mul.h b/protocols/Tlen/src/crypto/polarssl/bn_mul.h index 59a32857cb..59a32857cb 100644 --- a/plugins/!NotAdopted/Tlen/crypto/polarssl/bn_mul.h +++ b/protocols/Tlen/src/crypto/polarssl/bn_mul.h diff --git a/plugins/!NotAdopted/Tlen/crypto/polarssl/config.h b/protocols/Tlen/src/crypto/polarssl/config.h index 61500a75ee..61500a75ee 100644 --- a/plugins/!NotAdopted/Tlen/crypto/polarssl/config.h +++ b/protocols/Tlen/src/crypto/polarssl/config.h diff --git a/plugins/!NotAdopted/Tlen/crypto/polarssl/padlock.h b/protocols/Tlen/src/crypto/polarssl/padlock.h index 08fbe825c9..08fbe825c9 100644 --- a/plugins/!NotAdopted/Tlen/crypto/polarssl/padlock.h +++ b/protocols/Tlen/src/crypto/polarssl/padlock.h diff --git a/plugins/!NotAdopted/Tlen/jabber.h b/protocols/Tlen/src/jabber.h index fdaabf5e43..450b84c1f8 100644 --- a/plugins/!NotAdopted/Tlen/jabber.h +++ b/protocols/Tlen/src/jabber.h @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -24,13 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _JABBER_H_
#define _JABBER_H_
-#if defined(UNICODE)
- #ifndef _UNICODE
- #define _UNICODE
- #endif
-#endif
-
-#define MIRANDA_VER 0x0800
+#define MIRANDA_VER 0x0A00
#undef _WIN32_WINNT
#undef _WIN32_IE
@@ -45,6 +39,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _except __except
#define _finally __finally
+
+#include "m_stdhdr.h"
+
+
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
@@ -59,6 +57,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /*******************************************************************
* Global header files
*******************************************************************/
+
#include <windows.h>
#include <process.h>
#include <stdio.h>
@@ -69,6 +68,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <newpluginapi.h>
#include <m_system.h>
+#include <m_system_cpp.h>
#include <m_netlib.h>
#include <m_protomod.h>
#include <m_protosvc.h>
@@ -205,76 +205,141 @@ typedef struct { BOOL useNudge;
BOOL logAlerts;
BOOL useNewP2P;
- BOOL sendKeepAlive;
- BOOL savePassword;
+ BOOL sendKeepAlive;
+ BOOL savePassword;
} TlenOptions;
+
struct JABBER_IQ_FUNC_STRUCT;
struct JABBER_LIST_ITEM_STRUCT;
struct TLEN_VOICE_CONTROL_STRUCT;
-typedef struct {
- PROTO_INTERFACE iface;
- HANDLE hNetlibUser;
- HANDLE hFileNetlibUser;
- JABBER_MODEMSGS modeMsgs;
+struct TlenProtocol : public PROTO_INTERFACE, public MZeroedObject
+{
+ typedef PROTO_INTERFACE CSuper;
+
+ TlenProtocol( const char*, const TCHAR* );
+ ~TlenProtocol();
+
+ //====================================================================================
+ // PROTO_INTERFACE
+ //====================================================================================
+
+ virtual HANDLE __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual HANDLE __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+
+ virtual int __cdecl Authorize(HANDLE hDbEvent);
+ virtual int __cdecl AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason);
+ virtual int __cdecl AuthRecv(HANDLE hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(HANDLE hContact, const PROTOCHAR* szMessage);
+
+ virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
+
+ virtual HANDLE __cdecl FileAllow(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual int __cdecl FileCancel(HANDLE hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
+ virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
+
+ virtual DWORD_PTR __cdecl GetCaps(int type, HANDLE hContact = NULL);
+ virtual HICON __cdecl GetIcon(int iconIndex);
+ virtual int __cdecl GetInfo(HANDLE hContact, int infoType);
+
+ virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
+ virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
+ virtual HANDLE __cdecl SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
+
+ virtual int __cdecl RecvContacts(HANDLE hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(HANDLE hContact, PROTOFILEEVENT*);
+ virtual int __cdecl RecvMsg(HANDLE hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(HANDLE hContact, PROTORECVEVENT*);
- struct ThreadDataStruct *threadData;
- HANDLE hTlenNudge;
- HANDLE hMenuMUC;
- HANDLE hMenuChats;
- HANDLE hMenuInbox;
- HANDLE hMenuContactMUC;
- HANDLE hMenuContactVoice;
- HANDLE hMenuContactGrantAuth;
- HANDLE hMenuContactRequestAuth;
- HANDLE hMenuPicture;
+ virtual int __cdecl SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList);
+ virtual HANDLE __cdecl SendFile(HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual int __cdecl SendMsg(HANDLE hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(HANDLE hContact, int flags, const char* url);
- HANDLE* hServices;
- unsigned serviceNum;
- HANDLE* hHooks;
- unsigned hookNum;
+ virtual int __cdecl SetApparentMode(HANDLE hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- int listsCount;
- struct JABBER_LIST_ITEM_STRUCT *lists;
- CRITICAL_SECTION csLists;
+ virtual HANDLE __cdecl GetAwayMsg(HANDLE hContact);
+ virtual int __cdecl RecvAwayMsg(HANDLE hContact, int mode, PROTORECVEVENT* evt);
+ virtual int __cdecl SendAwayMsg(HANDLE hContact, HANDLE hProcess, const char* msg);
+ virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
- int iqCount;
- int iqAlloced;
- struct JABBER_IQ_FUNC_STRUCT *iqList;
- CRITICAL_SECTION csIqList;
+ virtual int __cdecl UserIsTyping(HANDLE hContact, int type);
- CRITICAL_SECTION csSerial;
- unsigned int serial;
- BOOL isOnline;
- BOOL isConnected;
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam);
- CRITICAL_SECTION modeMsgMutex;
- HANDLE hMenuRoot;
- char *searchJID;
- int searchID;
- int searchIndex;
- char *searchQuery;
- int searchQueryLen;
- CRITICAL_SECTION csSend;
- HWND voiceDlgHWND;
- struct TLEN_VOICE_CONTROL_STRUCT *playbackControl;
- struct TLEN_VOICE_CONTROL_STRUCT *recordingControl;
- int framesAvailableForPlayback;
- int availOverrunValue;
+ HANDLE hNetlibUser;
+ HANDLE hFileNetlibUser;
+
+ JABBER_MODEMSGS modeMsgs;
+
+ struct ThreadDataStruct *threadData;
+ HANDLE hTlenNudge;
+ HANDLE hMenuMUC;
+ HANDLE hMenuChats;
+ HANDLE hMenuInbox;
+ HANDLE hMenuContactMUC;
+ HANDLE hMenuContactVoice;
+ HANDLE hMenuContactGrantAuth;
+ HANDLE hMenuContactRequestAuth;
+ HANDLE hMenuPicture;
+
+ HANDLE* hServices;
+ unsigned serviceNum;
+ HANDLE* hHooks;
+ unsigned hookNum;
+
+
+ int listsCount;
+ struct JABBER_LIST_ITEM_STRUCT *lists;
+ CRITICAL_SECTION csLists;
+
+ int iqCount;
+ int iqAlloced;
+ struct JABBER_IQ_FUNC_STRUCT *iqList;
+ CRITICAL_SECTION csIqList;
+
+ CRITICAL_SECTION csSerial;
+ unsigned int serial;
+ BOOL isOnline;
+ BOOL isConnected;
+
+ CRITICAL_SECTION modeMsgMutex;
+
+ HANDLE hMenuRoot;
+
+ char *searchJID;
+ int searchID;
+ int searchIndex;
+ char *searchQuery;
+ int searchQueryLen;
+
+ CRITICAL_SECTION csSend;
+
+ HWND voiceDlgHWND;
+ struct TLEN_VOICE_CONTROL_STRUCT *playbackControl;
+ struct TLEN_VOICE_CONTROL_STRUCT *recordingControl;
+ int framesAvailableForPlayback;
+ int availOverrunValue;
+
+ TlenOptions tlenOptions;
+
+};
- TlenOptions tlenOptions;
-} TlenProtocol;
typedef struct ThreadDataStruct{
HANDLE hThread;
- char *streamId;
+ char *streamId;
char username[128];
char password[128];
char server[128];
@@ -285,7 +350,7 @@ typedef struct ThreadDataStruct{ WORD port;
BOOL useEncryption;
- JABBER_SOCKET s; //HANDLE from CallService(MS_NETLIB_OPENCONNECTION (jabber_ws.c:68)
+ JABBER_SOCKET s; //HANDLE from CallService(MS_NETLIB_OPENCONNECTION (jabber_ws.c:68)
aes_context aes_in_context;
aes_context aes_out_context;
unsigned char aes_in_iv[16];
@@ -293,7 +358,7 @@ typedef struct ThreadDataStruct{ BOOL useAES;
TlenConfiguration tlenConfig;
- TlenProtocol *proto;
+ TlenProtocol *proto;
} ThreadData;
@@ -366,12 +431,13 @@ extern HANDLE hMainThread; /*******************************************************************
* Function declarations
*******************************************************************/
+void uninitMenuItems(TlenProtocol *proto);
HICON GetIcolibIcon(int iconId);
void ReleaseIcolibIcon(HICON hIcon);
void JabberLog(TlenProtocol *proto, const char *fmt, ...);
void __cdecl JabberServerThread(ThreadData *info);
-// jabber_ws.c
+// jabber_ws.cpp
BOOL JabberWsInit(TlenProtocol *proto);
void JabberWsUninit(TlenProtocol *proto);
JABBER_SOCKET JabberWsConnect(TlenProtocol *proto, char *host, WORD port);
@@ -379,7 +445,7 @@ int JabberWsSend(TlenProtocol *proto, JABBER_SOCKET s, char *data, int datalen); int JabberWsRecv(TlenProtocol *proto, JABBER_SOCKET s, char *data, long datalen);
int JabberWsSendAES(TlenProtocol *proto, char *data, int datalen, aes_context *aes_ctx, unsigned char *aes_iv);
int JabberWsRecvAES(TlenProtocol *proto, char *data, long datalen, aes_context *aes_ctx, unsigned char *aes_iv);
-// jabber_util.c
+// jabber_util.cpp
HANDLE HookEventObj_Ex(const char *name, TlenProtocol *proto, MIRANDAHOOKOBJ hook);
HANDLE CreateServiceFunction_Ex(const char *name, TlenProtocol *proto, MIRANDASERVICEOBJ service);
void UnhookEvents_Ex(TlenProtocol *proto);
@@ -414,22 +480,25 @@ time_t TlenTimeToUTC(time_t time); void JabberSendPresence(TlenProtocol *proto,int status);
void JabberStringAppend(char **str, int *sizeAlloced, const char *fmt, ...);
//char *JabberGetClientJID(char *jid);
-// jabber_misc.c
+// jabber_misc.cpp
void JabberDBAddEvent(TlenProtocol *proto, HANDLE hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob);
void JabberDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick);
HANDLE JabberDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary);
void JabberContactListCreateGroup(char *groupName);
unsigned long JabberForkThread(void (__cdecl *threadcode)(void*), unsigned long stacksize, void *arg);
-// jabber_svc.c
-int JabberGetInfo(PROTO_INTERFACE *ptr, HANDLE hContact, int infoType);
+// jabber_svc.cpp
int TlenRunSearch(TlenProtocol *proto);
-// jabber_advsearch.c
+// jabber_opt.cpp
+void TlenLoadOptions(TlenProtocol *proto);
+// tlen_voice.cpp
+int TlenVoiceCancelAll(TlenProtocol *proto);
+// jabber_advsearch.cpp
extern JABBER_FIELD_MAP tlenFieldGender[];
extern JABBER_FIELD_MAP tlenFieldLookfor[];
extern JABBER_FIELD_MAP tlenFieldStatus[];
extern JABBER_FIELD_MAP tlenFieldOccupation[];
extern JABBER_FIELD_MAP tlenFieldPlan[];
-
+// tlen_advsearch.cpp
INT_PTR CALLBACK TlenAdvSearchDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
char *TlenAdvSearchCreateQuery(HWND hwndDlg, int iqId);
diff --git a/plugins/!NotAdopted/Tlen/jabber_iq.c b/protocols/Tlen/src/jabber_iq.cpp index 219f60e53d..01ce67129b 100644 --- a/plugins/!NotAdopted/Tlen/jabber_iq.c +++ b/protocols/Tlen/src/jabber_iq.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
This program is free software; you can redistribute it and/or
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void JabberIqInit(TlenProtocol *proto)
{
InitializeCriticalSection(&proto->csIqList);
- proto->iqList = NULL;
+ proto->iqList = NULL;
proto->iqCount = 0;
proto->iqAlloced = 0;
}
@@ -44,7 +44,7 @@ void JabberIqUninit(TlenProtocol *proto) static void JabberIqRemove(TlenProtocol *proto, int index)
{
EnterCriticalSection(&proto->csIqList);
- if (index>=0 && index<proto->iqCount) {
+ if (index >= 0 && index<proto->iqCount) {
memmove(proto->iqList+index, proto->iqList+index+1, sizeof(JABBER_IQ_FUNC)*(proto->iqCount-index-1));
proto->iqCount--;
}
@@ -75,7 +75,7 @@ JABBER_IQ_PFUNC JabberIqFetchFunc(TlenProtocol *proto, int iqId) EnterCriticalSection(&proto->csIqList);
JabberIqExpire(proto);
- for (i=0; i<proto->iqCount && proto->iqList[i].iqId!=iqId; i++);
+ for (i=0; i<proto->iqCount && proto->iqList[i].iqId != iqId; i++);
if (i < proto->iqCount) {
res = proto->iqList[i].func;
JabberIqRemove(proto, i);
@@ -95,11 +95,11 @@ void JabberIqAdd(TlenProtocol *proto, unsigned int iqId, JABBER_IQ_PROCID procId if (procId == IQ_PROC_NONE)
i = proto->iqCount;
else
- for (i=0; i<proto->iqCount && proto->iqList[i].procId!=procId; i++);
+ for (i=0; i<proto->iqCount && proto->iqList[i].procId != procId; i++);
- if (i>=proto->iqCount && proto->iqCount>=proto->iqAlloced) {
+ if (i >= proto->iqCount && proto->iqCount >= proto->iqAlloced) {
proto->iqAlloced = proto->iqCount + 8;
- proto->iqList = mir_realloc(proto->iqList, sizeof(JABBER_IQ_FUNC)*proto->iqAlloced);
+ proto->iqList = (JABBER_IQ_FUNC*)mir_realloc(proto->iqList, sizeof(JABBER_IQ_FUNC)*proto->iqAlloced);
}
if (proto->iqList != NULL) {
diff --git a/plugins/!NotAdopted/Tlen/jabber_iq.h b/protocols/Tlen/src/jabber_iq.h index dfdcf9e91a..d521c85c66 100644 --- a/plugins/!NotAdopted/Tlen/jabber_iq.h +++ b/protocols/Tlen/src/jabber_iq.h @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
diff --git a/plugins/!NotAdopted/Tlen/jabber_iqid.c b/protocols/Tlen/src/jabber_iqid.cpp index 2c16054038..2fde1bb6df 100644 --- a/plugins/!NotAdopted/Tlen/jabber_iqid.c +++ b/protocols/Tlen/src/jabber_iqid.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -38,8 +38,8 @@ void JabberIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) if (!strcmp(type, "result")) {
DBVARIANT dbv;
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "Nick", &dbv))
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "Nick", proto->threadData->username);
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "Nick", &dbv))
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "Nick", proto->threadData->username);
else
DBFreeVariant(&dbv);
// iqId = JabberSerialNext();
@@ -56,75 +56,75 @@ void JabberIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) JabberSend(proto, "</s>");
_snprintf(text, sizeof(text), "%s %s@%s.", TranslateT("Authentication failed for"), proto->threadData->username, proto->threadData->server);
MessageBoxA(NULL, text, Translate("Tlen Authentication"), MB_OK|MB_ICONSTOP|MB_SETFOREGROUND);
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
+ ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD);
proto->threadData = NULL; // To disallow auto reconnect
}
}
void JabberResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) {
- DBVARIANT dbv;
- XmlNode *itemNode, *groupNode;
- JABBER_LIST_ITEM *item;
- HANDLE hContact;
- char *jid, *name, *nick;
- int i;
- char *str;
-
- for (i=0; i<queryNode->numChild; i++) {
- itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
- if ((jid=JabberXmlGetAttrValue(itemNode, "jid")) != NULL) {
- str = JabberXmlGetAttrValue(itemNode, "subscription");
- if (!strcmp(str, "remove")) {
- if ((hContact=JabberHContactFromJID(proto, jid)) != NULL) {
- if (DBGetContactSettingWord(hContact, proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
- DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE);
- }
- JabberListRemove(proto, LIST_ROSTER, jid);
- } else {
- item = JabberListAdd(proto, LIST_ROSTER, jid);
- if (item != NULL) {
- if (str == NULL) item->subscription = SUB_NONE;
- else if (!strcmp(str, "both")) item->subscription = SUB_BOTH;
- else if (!strcmp(str, "to")) item->subscription = SUB_TO;
- else if (!strcmp(str, "from")) item->subscription = SUB_FROM;
- else item->subscription = SUB_NONE;
- if ((name=JabberXmlGetAttrValue(itemNode, "name")) != NULL) {
- nick = JabberTextDecode(name);
- } else {
- nick = JabberLocalNickFromJID(jid);
- }
- if (nick != NULL) {
- if (item->nick) mir_free(item->nick);
- item->nick = nick;
-
- if ((hContact=JabberHContactFromJID(proto, jid)) == NULL) {
- // Received roster has a new JID.
- // Add the jid (with empty resource) to Miranda contact list.
- hContact = JabberDBCreateContact(proto, jid, nick, FALSE);
- }
- DBWriteContactSettingString(hContact, "CList", "MyHandle", nick);
- if (item->group) mir_free(item->group);
- if ((groupNode=JabberXmlGetChild(itemNode, "group"))!=NULL && groupNode->text!=NULL) {
- item->group = TlenGroupDecode(groupNode->text);
- JabberContactListCreateGroup(item->group);
- // Don't set group again if already correct, or Miranda may show wrong group count in some case
- if (!DBGetContactSetting(hContact, "CList", "Group", &dbv)) {
- if (strcmp(dbv.pszVal, item->group))
- DBWriteContactSettingString(hContact, "CList", "Group", item->group);
- DBFreeVariant(&dbv);
- } else
- DBWriteContactSettingString(hContact, "CList", "Group", item->group);
- } else {
- item->group = NULL;
- DBDeleteContactSetting(hContact, "CList", "Group");
- }
- }
- }
- }
- }
- }
- }
+ DBVARIANT dbv;
+ XmlNode *itemNode, *groupNode;
+ JABBER_LIST_ITEM *item;
+ HANDLE hContact;
+ char *jid, *name, *nick;
+ int i;
+ char *str;
+
+ for (i=0; i<queryNode->numChild; i++) {
+ itemNode = queryNode->child[i];
+ if (!strcmp(itemNode->name, "item")) {
+ if ((jid=JabberXmlGetAttrValue(itemNode, "jid")) != NULL) {
+ str = JabberXmlGetAttrValue(itemNode, "subscription");
+ if (!strcmp(str, "remove")) {
+ if ((hContact=JabberHContactFromJID(proto, jid)) != NULL) {
+ if (DBGetContactSettingWord(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ DBWriteContactSettingWord(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
+ }
+ JabberListRemove(proto, LIST_ROSTER, jid);
+ } else {
+ item = JabberListAdd(proto, LIST_ROSTER, jid);
+ if (item != NULL) {
+ if (str == NULL) item->subscription = SUB_NONE;
+ else if (!strcmp(str, "both")) item->subscription = SUB_BOTH;
+ else if (!strcmp(str, "to")) item->subscription = SUB_TO;
+ else if (!strcmp(str, "from")) item->subscription = SUB_FROM;
+ else item->subscription = SUB_NONE;
+ if ((name=JabberXmlGetAttrValue(itemNode, "name")) != NULL) {
+ nick = JabberTextDecode(name);
+ } else {
+ nick = JabberLocalNickFromJID(jid);
+ }
+ if (nick != NULL) {
+ if (item->nick) mir_free(item->nick);
+ item->nick = nick;
+
+ if ((hContact=JabberHContactFromJID(proto, jid)) == NULL) {
+ // Received roster has a new JID.
+ // Add the jid (with empty resource) to Miranda contact list.
+ hContact = JabberDBCreateContact(proto, jid, nick, FALSE);
+ }
+ DBWriteContactSettingString(hContact, "CList", "MyHandle", nick);
+ if (item->group) mir_free(item->group);
+ if ((groupNode=JabberXmlGetChild(itemNode, "group")) != NULL && groupNode->text != NULL) {
+ item->group = TlenGroupDecode(groupNode->text);
+ JabberContactListCreateGroup(item->group);
+ // Don't set group again if already correct, or Miranda may show wrong group count in some case
+ if (!DBGetContactSetting(hContact, "CList", "Group", &dbv)) {
+ if (strcmp(dbv.pszVal, item->group))
+ DBWriteContactSettingString(hContact, "CList", "Group", item->group);
+ DBFreeVariant(&dbv);
+ } else
+ DBWriteContactSettingString(hContact, "CList", "Group", item->group);
+ } else {
+ item->group = NULL;
+ DBDeleteContactSetting(hContact, "CList", "Group");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode)
@@ -140,7 +140,7 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) if (!strcmp(type, "result")) {
str = JabberXmlGetAttrValue(queryNode, "xmlns");
- if (str!=NULL && !strcmp(str, "jabber:iq:roster")) {
+ if (str != NULL && !strcmp(str, "jabber:iq:roster")) {
DBVARIANT dbv;
XmlNode *itemNode, *groupNode;
JABBER_SUBSCRIPTION sub;
@@ -153,12 +153,12 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) itemNode = queryNode->child[i];
if (!strcmp(itemNode->name, "item")) {
str = JabberXmlGetAttrValue(itemNode, "subscription");
- if (str==NULL) sub = SUB_NONE;
+ if (str == NULL) sub = SUB_NONE;
else if (!strcmp(str, "both")) sub = SUB_BOTH;
else if (!strcmp(str, "to")) sub = SUB_TO;
else if (!strcmp(str, "from")) sub = SUB_FROM;
else sub = SUB_NONE;
- //if (str!=NULL && (!strcmp(str, "to") || !strcmp(str, "both"))) {
+ //if (str != NULL && (!strcmp(str, "to") || !strcmp(str, "both"))) {
if ((jid=JabberXmlGetAttrValue(itemNode, "jid")) != NULL) {
if ((name=JabberXmlGetAttrValue(itemNode, "name")) != NULL) {
nick = JabberTextDecode(name);
@@ -177,7 +177,7 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) }
DBWriteContactSettingString(hContact, "CList", "MyHandle", nick);
if (item->group) mir_free(item->group);
- if ((groupNode=JabberXmlGetChild(itemNode, "group"))!=NULL && groupNode->text!=NULL) {
+ if ((groupNode=JabberXmlGetChild(itemNode, "group")) != NULL && groupNode->text != NULL) {
item->group = TlenGroupDecode(groupNode->text);
JabberContactListCreateGroup(item->group);
// Don't set group again if already correct, or Miranda may show wrong group count in some case
@@ -193,29 +193,29 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) item->group = NULL;
DBDeleteContactSetting(hContact, "CList", "Group");
}
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "AvatarHash", &dbv)) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "AvatarHash", &dbv)) {
if (item->avatarHash) mir_free(item->avatarHash);
item->avatarHash = mir_strdup(dbv.pszVal);
JabberLog(proto, "Setting hash [%s] = %s", nick, item->avatarHash);
DBFreeVariant(&dbv);
}
- item->avatarFormat = DBGetContactSettingDword(hContact, proto->iface.m_szModuleName, "AvatarFormat", PA_FORMAT_UNKNOWN);
+ item->avatarFormat = DBGetContactSettingDword(hContact, proto->m_szModuleName, "AvatarFormat", PA_FORMAT_UNKNOWN);
}
}
}
}
// Delete orphaned contacts (if roster sync is enabled)
- if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "RosterSync", FALSE) == TRUE) {
+ if (DBGetContactSettingByte(NULL, proto->m_szModuleName, "RosterSync", FALSE) == TRUE) {
HANDLE *list;
int listSize, listAllocSize;
listSize = listAllocSize = 0;
list = NULL;
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact != NULL) {
str = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if(str!=NULL && !strcmp(str, proto->iface.m_szModuleName)) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (str != NULL && !strcmp(str, proto->m_szModuleName)) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
if (!JabberListExist(proto, LIST_ROSTER, dbv.pszVal)) {
JabberLog(proto, "Syncing roster: preparing to delete %s (hContact=0x%x)", dbv.pszVal, hContact);
if (listSize >= listAllocSize) {
@@ -230,7 +230,7 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) DBFreeVariant(&dbv);
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
for (i=0; i<listSize; i++) {
JabberLog(proto, "Syncing roster: deleting 0x%x", list[i]);
@@ -253,9 +253,9 @@ void JabberIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) proto->isOnline = TRUE;
JabberLog(proto, "Status changed via THREADSTART");
- oldStatus = proto->iface.m_iStatus;
- JabberSendPresence(proto, proto->iface.m_iDesiredStatus);
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, proto->iface.m_iStatus);
+ oldStatus = proto->m_iStatus;
+ JabberSendPresence(proto, proto->m_iDesiredStatus);
+ ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, proto->m_iStatus);
//////////////////////////////////
}
}
@@ -282,7 +282,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) if ((queryNode=JabberXmlGetChild(iqNode, "query")) == NULL) return;
if ((itemNode=JabberXmlGetChild(queryNode, "item")) == NULL) return;
if ((jid=JabberXmlGetAttrValue(itemNode, "jid")) != NULL) {
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) return;
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) return;
if (strchr(jid, '@') != NULL) {
sprintf(text, "%s", jid);
} else {
@@ -290,7 +290,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) }
DBFreeVariant(&dbv);
if ((hContact=JabberHContactFromJID(proto, text)) == NULL) {
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginName", &dbv)) return;
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "LoginName", &dbv)) return;
if (strcmp(dbv.pszVal, jid)) {
DBFreeVariant(&dbv);
return;
@@ -303,12 +303,12 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) hasFirst = hasLast = hasNick = hasEmail = hasCity = hasAge = hasGender = hasOccupation = hasLookFor = hasSchool = FALSE;
for (i=0; i<itemNode->numChild; i++) {
n = itemNode->child[i];
- if (n==NULL || n->name==NULL) continue;
+ if (n == NULL || n->name == NULL) continue;
if (!strcmp(n->name, "first")) {
if (n->text != NULL) {
hasFirst = TRUE;
nText = JabberTextDecode(n->text);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "FirstName", nText);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "FirstName", nText);
mir_free(nText);
}
}
@@ -316,7 +316,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) if (n->text != NULL) {
hasLast = TRUE;
nText = JabberTextDecode(n->text);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "LastName", nText);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "LastName", nText);
mir_free(nText);
}
}
@@ -324,7 +324,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) if (n->text != NULL) {
hasNick = TRUE;
nText = JabberTextDecode(n->text);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "Nick", nText);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "Nick", nText);
mir_free(nText);
}
}
@@ -332,7 +332,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) if (n->text != NULL) {
hasEmail = TRUE;
nText = JabberTextDecode(n->text);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "e-mail", nText);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "e-mail", nText);
mir_free(nText);
}
}
@@ -340,7 +340,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) if (n->text != NULL) {
hasCity = TRUE;
nText = JabberTextDecode(n->text);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "City", nText);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "City", nText);
mir_free(nText);
}
}
@@ -349,20 +349,20 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) WORD nAge;
hasAge = TRUE;
nAge = atoi(n->text);
- DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "Age", nAge);
+ DBWriteContactSettingWord(hContact, proto->m_szModuleName, "Age", nAge);
}
}
else if (!strcmp(n->name, "s")) {
- if (n->text!=NULL && n->text[1]=='\0' && (n->text[0]=='1' || n->text[0]=='2')) {
+ if (n->text != NULL && n->text[1] == '\0' && (n->text[0] == '1' || n->text[0] == '2')) {
hasGender = TRUE;
- DBWriteContactSettingByte(hContact, proto->iface.m_szModuleName, "Gender", (BYTE) (n->text[0]=='1'?'M':'F'));
+ DBWriteContactSettingByte(hContact, proto->m_szModuleName, "Gender", (BYTE) (n->text[0] == '1'?'M':'F'));
}
}
else if (!strcmp(n->name, "e")) {
if (n->text != NULL) {
hasSchool = TRUE;
nText = JabberTextDecode(n->text);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "School", nText);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "School", nText);
mir_free(nText);
}
}
@@ -371,7 +371,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) WORD nOccupation;
hasOccupation = TRUE;
nOccupation = atoi(n->text);
- DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "Occupation", nOccupation);
+ DBWriteContactSettingWord(hContact, proto->m_szModuleName, "Occupation", nOccupation);
}
}
else if (!strcmp(n->name, "r")) {
@@ -379,46 +379,46 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) WORD nLookFor;
hasLookFor = TRUE;
nLookFor = atoi(n->text);
- DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "LookingFor", nLookFor);
+ DBWriteContactSettingWord(hContact, proto->m_szModuleName, "LookingFor", nLookFor);
}
}
else if (!strcmp(n->name, "g")) { // voice chat enabled
if (n->text != NULL) {
BYTE bVoice;
bVoice = atoi(n->text);
- DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "VoiceChat", bVoice);
+ DBWriteContactSettingWord(hContact, proto->m_szModuleName, "VoiceChat", bVoice);
}
}
else if (!strcmp(n->name, "v")) { // status visibility
if (n->text != NULL) {
BYTE bPublic;
bPublic = atoi(n->text);
- DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "PublicStatus", bPublic);
+ DBWriteContactSettingWord(hContact, proto->m_szModuleName, "PublicStatus", bPublic);
}
}
}
if (!hasFirst)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "FirstName");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "FirstName");
if (!hasLast)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "LastName");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "LastName");
// We are not removing "Nick"
// if (!hasNick)
-// DBDeleteContactSetting(hContact, iface.m_szModuleName, "Nick");
+// DBDeleteContactSetting(hContact, m_szModuleName, "Nick");
if (!hasEmail)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "e-mail");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "e-mail");
if (!hasCity)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "City");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "City");
if (!hasAge)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "Age");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "Age");
if (!hasGender)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "Gender");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "Gender");
if (!hasSchool)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "School");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "School");
if (!hasOccupation)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "Occupation");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "Occupation");
if (!hasLookFor)
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "LookingFor");
- ProtoBroadcastAck(proto->iface.m_szModuleName, hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "LookingFor");
+ ProtoBroadcastAck(proto->m_szModuleName, hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
}
@@ -427,7 +427,7 @@ void JabberIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) XmlNode *queryNode, *itemNode, *n;
char *type, *jid, *str;
int id, i, found;
- JABBER_SEARCH_RESULT jsr = {0};
+ JABBER_SEARCH_RESULT jsr = {0};
DBVARIANT dbv = {0};
found = 0;
@@ -438,8 +438,9 @@ void JabberIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) if (!strcmp(type, "result")) {
if ((queryNode=JabberXmlGetChild(iqNode, "query")) == NULL) return;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
+ jsr.hdr.flags = PSR_TCHAR;
for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
if (!strcmp(itemNode->name, "item")) {
@@ -450,27 +451,39 @@ void JabberIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) _snprintf(jsr.jid, sizeof(jsr.jid), "%s@%s", jid, dbv.pszVal);
}
jsr.jid[sizeof(jsr.jid)-1] = '\0';
- jsr.hdr.id = jid;
- jsr.hdr.flags = 0; //results are ansi
- if ((n=JabberXmlGetChild(itemNode, "nick"))!=NULL && n->text!=NULL)
- jsr.hdr.nick = JabberTextDecode(n->text);
- else
- jsr.hdr.nick = mir_strdup("");
- if ((n=JabberXmlGetChild(itemNode, "first"))!=NULL && n->text!=NULL)
- jsr.hdr.firstName = JabberTextDecode(n->text);
- else
- jsr.hdr.firstName = mir_strdup("");
- if ((n=JabberXmlGetChild(itemNode, "last"))!=NULL && n->text!=NULL)
- jsr.hdr.lastName = JabberTextDecode(n->text);
- else
- jsr.hdr.lastName = mir_strdup("");
- if ((n=JabberXmlGetChild(itemNode, "email"))!=NULL && n->text!=NULL)
- jsr.hdr.email = JabberTextDecode(n->text);
- else
- jsr.hdr.email = mir_strdup("");
-
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) id, (LPARAM) &jsr);
+ jsr.hdr.id = mir_a2t(jid);
+ if ((n=JabberXmlGetChild(itemNode, "nick")) != NULL && n->text != NULL){
+ char* buf = JabberTextDecode(n->text);
+ jsr.hdr.nick = mir_a2t(buf);
+ mir_free(buf);
+ } else {
+ jsr.hdr.nick = mir_tstrdup(TEXT(""));
+ }
+ if ((n=JabberXmlGetChild(itemNode, "first")) != NULL && n->text != NULL){
+ char* buf = JabberTextDecode(n->text);
+ jsr.hdr.firstName = mir_a2t(buf);
+ mir_free(buf);
+ } else {
+ jsr.hdr.firstName = mir_tstrdup(TEXT(""));
+ }
+ if ((n=JabberXmlGetChild(itemNode, "last")) != NULL && n->text != NULL){
+ char* buf = JabberTextDecode(n->text);
+ jsr.hdr.lastName = mir_a2t(buf);
+ mir_free(buf);
+ } else {
+ jsr.hdr.lastName = mir_tstrdup(TEXT(""));
+ }
+ if ((n=JabberXmlGetChild(itemNode, "email"))!=NULL && n->text!=NULL){
+ char* buf = JabberTextDecode(n->text);
+ jsr.hdr.email = mir_a2t(buf);
+ mir_free(buf);
+ } else {
+ jsr.hdr.email = mir_tstrdup(TEXT(""));
+ }
+
+ ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) id, (LPARAM) &jsr);
found = 1;
+ mir_free(jsr.hdr.id);
mir_free(jsr.hdr.nick);
mir_free(jsr.hdr.firstName);
mir_free(jsr.hdr.lastName);
@@ -478,7 +491,7 @@ void JabberIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) }
}
}
- if (proto->searchJID!=NULL) {
+ if (proto->searchJID != NULL) {
if (!found) {
if (strchr(proto->searchJID, '@') != NULL) {
_snprintf(jsr.jid, sizeof(jsr.jid), "%s", proto->searchJID);
@@ -486,12 +499,12 @@ void JabberIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) _snprintf(jsr.jid, sizeof(jsr.jid), "%s@%s", proto->searchJID, dbv.pszVal);
}
jsr.jid[sizeof(jsr.jid)-1] = '\0';
- jsr.hdr.nick = mir_strdup("");
- jsr.hdr.firstName = mir_strdup("");
- jsr.hdr.lastName = mir_strdup("");
- jsr.hdr.email = mir_strdup("");
- jsr.hdr.id = mir_strdup("");
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) id, (LPARAM) &jsr);
+ jsr.hdr.nick = mir_tstrdup(TEXT(""));
+ jsr.hdr.firstName = mir_tstrdup(TEXT(""));
+ jsr.hdr.lastName = mir_tstrdup(TEXT(""));
+ jsr.hdr.email = mir_tstrdup(TEXT(""));
+ jsr.hdr.id = mir_tstrdup(TEXT(""));
+ ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE) id, (LPARAM) &jsr);
mir_free(jsr.hdr.nick);
mir_free(jsr.hdr.firstName);
mir_free(jsr.hdr.lastName);
@@ -507,13 +520,13 @@ void JabberIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) found = TlenRunSearch(proto);
}
if (!found) {
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) id, 0);
+ ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) id, 0);
}
} else if (!strcmp(type, "error")) {
- // ProtoBroadcastAck(iface.m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE) id, 0);
+ // ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE) id, 0);
// There is no ACKRESULT_FAILED for ACKTYPE_SEARCH :) look at findadd.c
// So we will just send a SUCCESS
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) id, 0);
+ ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) id, 0);
}
}
@@ -574,29 +587,29 @@ void TlenIqResultVersion(TlenProtocol *proto, XmlNode *iqNode) char* from;
if (( from=JabberXmlGetAttrValue( iqNode, "from" )) != NULL ) {
JABBER_LIST_ITEM *item;
- if (( item=JabberListGetItemPtr( proto, LIST_ROSTER, from ))!=NULL) {
+ if (( item=JabberListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
HANDLE hContact;
XmlNode *n;
if ( item->software ) mir_free( item->software );
if ( item->version ) mir_free( item->version );
if ( item->system ) mir_free( item->system );
- if (( n=JabberXmlGetChild( queryNode, "name" ))!=NULL && n->text ) {
+ if (( n=JabberXmlGetChild( queryNode, "name" )) != NULL && n->text ) {
item->software = JabberTextDecode( n->text );
} else
item->software = NULL;
- if (( n=JabberXmlGetChild( queryNode, "version" ))!=NULL && n->text )
+ if (( n=JabberXmlGetChild( queryNode, "version" )) != NULL && n->text )
item->version = JabberTextDecode( n->text );
else
item->version = NULL;
- if (( n=JabberXmlGetChild( queryNode, "os" ))!=NULL && n->text )
+ if (( n=JabberXmlGetChild( queryNode, "os" )) != NULL && n->text )
item->system = JabberTextDecode( n->text );
else
item->system = NULL;
if (( hContact=JabberHContactFromJID(proto, item->jid )) != NULL ) {
if (item->software != NULL) {
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "MirVer", item->software);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "MirVer", item->software);
} else {
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "MirVer");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "MirVer");
}
}
}
@@ -611,7 +624,7 @@ void TlenIqResultInfo(TlenProtocol *proto, XmlNode *iqNode) char* from;
if (( from=JabberXmlGetAttrValue( queryNode, "from" )) != NULL ) {
JABBER_LIST_ITEM *item;
- if (( item=JabberListGetItemPtr( proto, LIST_ROSTER, from ))!=NULL) {
+ if (( item=JabberListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
HANDLE hContact;
XmlNode *version = JabberXmlGetChild(queryNode, "version");
item->protocolVersion = JabberTextDecode(version->text);
@@ -619,7 +632,7 @@ void TlenIqResultInfo(TlenProtocol *proto, XmlNode *iqNode) if (item->software == NULL) {
char str[128];
mir_snprintf(str, sizeof(str), "Tlen Protocol %s", item->protocolVersion);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "MirVer", str);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "MirVer", str);
}
}
}
diff --git a/plugins/!NotAdopted/Tlen/jabber_list.c b/protocols/Tlen/src/jabber_list.cpp index 8b916b6584..de9fe21c78 100644 --- a/plugins/!NotAdopted/Tlen/jabber_list.c +++ b/protocols/Tlen/src/jabber_list.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -45,7 +45,7 @@ void JabberListWipe(TlenProtocol *proto) int i;
EnterCriticalSection(&proto->csLists);
- for(i=0; i<proto->listsCount; i++)
+ for (i=0; i<proto->listsCount; i++)
JabberListFreeItemInternal(&(proto->lists[i]));
if (proto->lists != NULL) {
mir_free(proto->lists);
@@ -59,7 +59,7 @@ void JabberListWipeSpecial(TlenProtocol *proto) {
int i;
EnterCriticalSection(&proto->csLists);
- for(i=0; i<proto->listsCount; i++) {
+ for (i=0; i<proto->listsCount; i++) {
if (proto->lists[i].list != LIST_FILE && proto->lists[i].list != LIST_VOICE) {
JabberListFreeItemInternal(&(proto->lists[i]));
proto->listsCount--;
@@ -97,31 +97,32 @@ static char * GetItemId(JABBER_LIST list, const char *jid) {
char *s, *p, *q;
s = mir_strdup(jid);
- if (list != LIST_PICTURE) {
- _strlwr(s);
- // strip resouce name if any
- if ((p=strchr(s, '@')) != NULL) {
- if ((q=strchr(p, '/')) != NULL)
- *q = '\0';
- }
- }
- return s;
+ if (list != LIST_PICTURE) {
+ _strlwr(s);
+ // strip resouce name if any
+ if ((p=strchr(s, '@')) != NULL) {
+ if ((q=strchr(p, '/')) != NULL)
+ *q = '\0';
+ }
+ }
+ return s;
}
+
int JabberListExist(TlenProtocol *proto, JABBER_LIST list, const char *jid)
{
int i;
size_t len;
char *s, *p;
- s = GetItemId(list, jid);
+ s = GetItemId(list, jid);
len = strlen(s);
EnterCriticalSection(&proto->csLists);
- for(i=0; i<proto->listsCount; i++)
- if (proto->lists[i].list==list) {
+ for (i=0; i<proto->listsCount; i++)
+ if (proto->lists[i].list == list) {
p = proto->lists[i].jid;
- if (p && strlen(p)>=len && (p[(int)len]=='\0'||p[(int)len]=='/') && !strncmp(p, s, len)) {
- LeaveCriticalSection(&proto->csLists);
+ if (p && strlen(p) >= len && (p[(int)len] == '\0' || p[(int)len] == '/') && !strncmp(p, s, len)) {
+ LeaveCriticalSection(&proto->csLists);
mir_free(s);
return i+1;
}
@@ -203,7 +204,7 @@ void JabberListRemoveList(TlenProtocol *proto, JABBER_LIST list) void JabberListRemoveByIndex(TlenProtocol *proto, int index)
{
EnterCriticalSection(&proto->csLists);
- if (index>=0 && index<proto->listsCount) {
+ if (index >= 0 && index<proto->listsCount) {
JabberListFreeItemInternal(&(proto->lists[index]));
proto->listsCount--;
memmove(proto->lists+index, proto->lists+index+1, sizeof(JABBER_LIST_ITEM)*(proto->listsCount-index));
@@ -251,10 +252,10 @@ int JabberListFindNext(TlenProtocol *proto, JABBER_LIST list, int fromOffset) int i;
EnterCriticalSection(&proto->csLists);
- i = (fromOffset>=0) ? fromOffset : 0;
- for(; i<proto->listsCount; i++)
+ i = (fromOffset >= 0) ? fromOffset : 0;
+ for (; i<proto->listsCount; i++)
if (proto->lists[i].list == list) {
- LeaveCriticalSection(&proto->csLists);
+ LeaveCriticalSection(&proto->csLists);
return i;
}
LeaveCriticalSection(&proto->csLists);
@@ -286,12 +287,12 @@ JABBER_LIST_ITEM *JabberListFindItemPtrById2(TlenProtocol *proto, JABBER_LIST li len = strlen(id);
EnterCriticalSection(&proto->csLists);
- for(i=0; i<proto->listsCount; i++) {
- if (proto->lists[i].list==list) {
+ for (i=0; i<proto->listsCount; i++) {
+ if (proto->lists[i].list == list) {
p = proto->lists[i].id2;
if (p != NULL) {
if (!strncmp(p, id, len)) {
- LeaveCriticalSection(&proto->csLists);
+ LeaveCriticalSection(&proto->csLists);
return &(proto->lists[i]);
}
}
@@ -304,7 +305,7 @@ JABBER_LIST_ITEM *JabberListFindItemPtrById2(TlenProtocol *proto, JABBER_LIST li JABBER_LIST_ITEM *JabberListGetItemPtrFromIndex(TlenProtocol *proto, int index)
{
EnterCriticalSection(&proto->csLists);
- if (index>=0 && index<proto->listsCount) {
+ if (index >= 0 && index<proto->listsCount) {
LeaveCriticalSection(&proto->csLists);
return &(proto->lists[index]);
}
diff --git a/plugins/!NotAdopted/Tlen/jabber_list.h b/protocols/Tlen/src/jabber_list.h index 116440a6a1..30eb1abbdb 100644 --- a/plugins/!NotAdopted/Tlen/jabber_list.h +++ b/protocols/Tlen/src/jabber_list.h @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
diff --git a/plugins/!NotAdopted/Tlen/jabber_misc.c b/protocols/Tlen/src/jabber_misc.cpp index c514c71c88..c9db7eed21 100644 --- a/plugins/!NotAdopted/Tlen/jabber_misc.c +++ b/protocols/Tlen/src/jabber_misc.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -28,7 +28,7 @@ void JabberDBAddEvent(TlenProtocol *proto, HANDLE hContact, int eventType, DWORD {
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(DBEVENTINFO);
- dbei.szModule = proto->iface.m_szModuleName;
+ dbei.szModule = proto->m_szModuleName;
dbei.timestamp = (DWORD) time(NULL);
dbei.flags = flags;
dbei.eventType = eventType;
@@ -40,50 +40,49 @@ void JabberDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick) {
char *s;
PBYTE pCurBlob;
- PBYTE pBlob;
+ PBYTE pBlob;
DWORD cbBlob;
HANDLE hContact;
if ((hContact=JabberHContactFromJID(proto, jid)) == NULL) {
hContact = (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->iface.m_szModuleName);
- // strip resource if present
- s = JabberLoginFromJID(jid);
- _strlwr(s);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "jid", s);
- mir_free(s);
+ CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
+ // strip resource if present
+ s = JabberLoginFromJID(jid);
+ _strlwr(s);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "jid", s);
+ mir_free(s);
}
else {
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "Hidden");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "Hidden");
}
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "Nick", nick);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "Nick", nick);
JabberLog(proto, "auth request: %s, %s", jid, nick);
//blob is: uin(DWORD), hContact(HANDLE), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ), reason(ASCIIZ)
//blob is: 0(DWORD), hContact(HANDLE), nick(ASCIIZ), ""(ASCIIZ), ""(ASCIIZ), email(ASCIIZ), ""(ASCIIZ)
cbBlob = sizeof(DWORD) + sizeof(HANDLE) + (int)strlen(nick) + (int)strlen(jid) + 5;
pBlob = pCurBlob = (PBYTE) mir_alloc(cbBlob);
*((PDWORD)pCurBlob) = 0; pCurBlob += sizeof(DWORD);
- *((PDWORD)pCurBlob) = hContact; pCurBlob += sizeof(DWORD);
+ *((PHANDLE)pCurBlob) = hContact; pCurBlob += sizeof(DWORD);
strcpy((char *) pCurBlob, nick); pCurBlob += strlen(nick)+1;
*pCurBlob = '\0'; pCurBlob++; //firstName
*pCurBlob = '\0'; pCurBlob++; //lastName
strcpy((char *) pCurBlob, jid); pCurBlob += strlen(jid)+1;
*pCurBlob = '\0'; //reason
- JabberDBAddEvent(proto, NULL, EVENTTYPE_AUTHREQUEST, 0, pBlob, cbBlob);
+ JabberDBAddEvent(proto, NULL, EVENTTYPE_AUTHREQUEST, 0, pBlob, cbBlob);
}
char *JabberJIDFromHContact(TlenProtocol *proto, HANDLE hContact)
{
char *p = NULL;
DBVARIANT dbv;
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
p = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
}
return p;
}
-
HANDLE JabberHContactFromJID(TlenProtocol *proto, const char *jid)
{
HANDLE hContact, hContactMatched;
@@ -92,11 +91,11 @@ HANDLE JabberHContactFromJID(TlenProtocol *proto, const char *jid) char *p;
if (jid == NULL) return (HANDLE) NULL;
hContactMatched = NULL;
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact != NULL) {
szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if (szProto!=NULL && !strcmp(proto->iface.m_szModuleName, szProto)) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (szProto != NULL && !strcmp(proto->m_szModuleName, szProto)) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
if ((p=dbv.pszVal) != NULL) {
if (!stricmp(p, jid)) { // exact match (node@domain/resource)
hContactMatched = hContact;
@@ -107,7 +106,7 @@ HANDLE JabberHContactFromJID(TlenProtocol *proto, const char *jid) DBFreeVariant(&dbv);
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
if (hContactMatched != NULL) {
return hContactMatched;
@@ -118,15 +117,15 @@ HANDLE JabberHContactFromJID(TlenProtocol *proto, const char *jid) HANDLE JabberDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary)
{
HANDLE hContact;
- if (jid==NULL || jid[0]=='\0')
+ if (jid == NULL || jid[0] == '\0')
return NULL;
if ((hContact=JabberHContactFromJID(proto, jid)) == NULL) {
hContact = (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->iface.m_szModuleName);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "jid", jid);
- if (nick!=NULL && nick[0]!='\0')
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "Nick", nick);
+ CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "jid", jid);
+ if (nick != NULL && nick[0] != '\0')
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "Nick", nick);
if (temporary)
DBWriteContactSettingByte(hContact, "CList", "NotOnList", 1);
}
@@ -145,7 +144,7 @@ static void JabberContactListCreateClistGroup(char *groupName) if (DBGetContactSetting(NULL, "CListGroups", str, &dbv))
break;
name = dbv.pszVal;
- if (name[0]!='\0' && !strcmp(name+1, groupName)) {
+ if (name[0] != '\0' && !strcmp(name+1, groupName)) {
// Already exist, no need to create
DBFreeVariant(&dbv);
return;
@@ -166,11 +165,11 @@ void JabberContactListCreateGroup(char *groupName) char name[128];
char *p;
- if (groupName==NULL || groupName[0]=='\0' || groupName[0]=='\\') return;
+ if (groupName == NULL || groupName[0] == '\0' || groupName[0] == '\\') return;
strncpy(name, groupName, sizeof(name));
name[sizeof(name)-1] = '\0';
- for (p=name; *p!='\0'; p++) {
+ for (p=name; *p != '\0'; p++) {
if (*p == '\\') {
*p = '\0';
JabberContactListCreateClistGroup(name);
@@ -191,10 +190,10 @@ static void __cdecl forkthread_r(struct FORK_ARG *fa) {
void (*callercode)(void*) = fa->threadcode;
void *arg = fa->arg;
- CallService(MS_SYSTEM_THREAD_PUSH, 0, 0);
+ Thread_Push(0);
SetEvent(fa->hEvent);
callercode(arg);
- CallService(MS_SYSTEM_THREAD_POP, 0, 0);
+ Thread_Pop();
return;
}
diff --git a/plugins/!NotAdopted/Tlen/jabber_opt.c b/protocols/Tlen/src/jabber_opt.cpp index 3ef45e4289..297ac34cae 100644 --- a/plugins/!NotAdopted/Tlen/jabber_opt.c +++ b/protocols/Tlen/src/jabber_opt.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -39,31 +39,31 @@ typedef struct TabDefStruct { } TabDef;
static TabDef tabPages[] = {
- {TlenBasicOptDlgProc, IDD_OPTIONS_BASIC, _T("General")},
- {TlenVoiceOptDlgProc, IDD_OPTIONS_VOICE, _T("Voice Chats")},
- {TlenAdvOptDlgProc, IDD_OPTIONS_ADVANCED, _T("Advanced")},
- {TlenPopupsDlgProc, IDD_OPTIONS_POPUPS, _T("Notifications")}
- };
+ {TlenBasicOptDlgProc, IDD_OPTIONS_BASIC, LPGENT("General")},
+ {TlenVoiceOptDlgProc, IDD_OPTIONS_VOICE, LPGENT("Voice Chats")},
+ {TlenAdvOptDlgProc, IDD_OPTIONS_ADVANCED, LPGENT("Advanced")},
+ {TlenPopupsDlgProc, IDD_OPTIONS_POPUPS, LPGENT("Notifications")}
+ };
void TlenLoadOptions(TlenProtocol *proto)
{
- proto->tlenOptions.savePassword = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "SavePassword", TRUE);
- proto->tlenOptions.useEncryption = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "UseEncryption", TRUE);
- proto->tlenOptions.reconnect = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "Reconnect", TRUE);
- proto->tlenOptions.alertPolicy = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "AlertPolicy", TLEN_ALERTS_IGNORE_NIR);
- proto->tlenOptions.rosterSync = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "RosterSync", FALSE);
- proto->tlenOptions.offlineAsInvisible = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "OfflineAsInvisible", FALSE);
- proto->tlenOptions.leaveOfflineMessage = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "LeaveOfflineMessage", TRUE);
- proto->tlenOptions.offlineMessageOption = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "OfflineMessageOption", 0);
- proto->tlenOptions.ignoreAdvertisements = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "IgnoreAdvertisements", TRUE);
- proto->tlenOptions.groupChatPolicy = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "GroupChatPolicy", TLEN_MUC_ASK);
- proto->tlenOptions.voiceChatPolicy = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "VoiceChatPolicy", TLEN_MUC_ASK);
- proto->tlenOptions.imagePolicy = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "ImagePolicy",TLEN_IMAGES_IGNORE_NIR);
- proto->tlenOptions.enableAvatars = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "EnableAvatars", TRUE);
- proto->tlenOptions.enableVersion = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "EnableVersion", TRUE);
- proto->tlenOptions.useNudge = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "UseNudge", FALSE);
- proto->tlenOptions.logAlerts = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "LogAlerts", TRUE);
- proto->tlenOptions.sendKeepAlive = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "KeepAlive", TRUE);
+ proto->tlenOptions.savePassword = DBGetContactSettingByte(NULL, proto->m_szModuleName, "SavePassword", TRUE);
+ proto->tlenOptions.useEncryption = DBGetContactSettingByte(NULL, proto->m_szModuleName, "UseEncryption", TRUE);
+ proto->tlenOptions.reconnect = DBGetContactSettingByte(NULL, proto->m_szModuleName, "Reconnect", TRUE);
+ proto->tlenOptions.alertPolicy = DBGetContactSettingWord(NULL, proto->m_szModuleName, "AlertPolicy", TLEN_ALERTS_IGNORE_NIR);
+ proto->tlenOptions.rosterSync = DBGetContactSettingByte(NULL, proto->m_szModuleName, "RosterSync", FALSE);
+ proto->tlenOptions.offlineAsInvisible = DBGetContactSettingByte(NULL, proto->m_szModuleName, "OfflineAsInvisible", FALSE);
+ proto->tlenOptions.leaveOfflineMessage = DBGetContactSettingByte(NULL, proto->m_szModuleName, "LeaveOfflineMessage", TRUE);
+ proto->tlenOptions.offlineMessageOption = DBGetContactSettingWord(NULL, proto->m_szModuleName, "OfflineMessageOption", 0);
+ proto->tlenOptions.ignoreAdvertisements = DBGetContactSettingByte(NULL, proto->m_szModuleName, "IgnoreAdvertisements", TRUE);
+ proto->tlenOptions.groupChatPolicy = DBGetContactSettingWord(NULL, proto->m_szModuleName, "GroupChatPolicy", TLEN_MUC_ASK);
+ proto->tlenOptions.voiceChatPolicy = DBGetContactSettingWord(NULL, proto->m_szModuleName, "VoiceChatPolicy", TLEN_MUC_ASK);
+ proto->tlenOptions.imagePolicy = DBGetContactSettingWord(NULL, proto->m_szModuleName, "ImagePolicy",TLEN_IMAGES_IGNORE_NIR);
+ proto->tlenOptions.enableAvatars = DBGetContactSettingByte(NULL, proto->m_szModuleName, "EnableAvatars", TRUE);
+ proto->tlenOptions.enableVersion = DBGetContactSettingByte(NULL, proto->m_szModuleName, "EnableVersion", TRUE);
+ proto->tlenOptions.useNudge = DBGetContactSettingByte(NULL, proto->m_szModuleName, "UseNudge", FALSE);
+ proto->tlenOptions.logAlerts = DBGetContactSettingByte(NULL, proto->m_szModuleName, "LogAlerts", TRUE);
+ proto->tlenOptions.sendKeepAlive = DBGetContactSettingByte(NULL, proto->m_szModuleName, "KeepAlive", TRUE);
proto->tlenOptions.useNewP2P = TRUE;
}
@@ -82,21 +82,23 @@ static void MarkChanges(int i, HWND hWnd) { }
-int TlenOptionsInit(TlenProtocol *proto, WPARAM wParam, LPARAM lParam)
+int TlenOptionsInit(void *ptr, WPARAM wParam, LPARAM lParam)
{
int i;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+
OPTIONSDIALOGPAGE odp = { 0 };
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
- odp.ptszGroup = TranslateT("Network");
- odp.ptszTitle = proto->iface.m_tszUserName;
+ odp.ptszGroup = LPGENT("Network");
+ odp.ptszTitle = proto->m_tszUserName;
odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
- odp.dwInitParam = (LPARAM)proto;
+ odp.dwInitParam = (LPARAM)proto;
for (i = 0; i < SIZEOF(tabPages); i++) {
odp.pszTemplate = MAKEINTRESOURCEA(tabPages[i].dlgId);
odp.pfnDlgProc = tabPages[i].dlgProc;
odp.ptszTab = tabPages[i].tabName;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) & odp);
+ Options_AddPage(wParam, &odp);
}
/*
if (ServiceExists(MS_POPUP_ADDPOPUP)) {
@@ -104,15 +106,15 @@ int TlenOptionsInit(TlenProtocol *proto, WPARAM wParam, LPARAM lParam) odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInst;
- odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
+ odp.flags = ODPF_BOLDGROUPS | ODPF_TCHAR;
odp.ptszGroup = TranslateT("PopUps");
- odp.ptszTitle = proto->iface.m_tszUserName;
- odp.dwInitParam = (LPARAM)proto;
+ odp.ptszTitle = proto->m_tszUserName;
+ odp.dwInitParam = (LPARAM)proto;
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS_POPUPS);
odp.pfnDlgProc = TlenPopupsDlgProc;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
- */
+*/
return 0;
}
@@ -134,7 +136,7 @@ INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR char text[256];
WNDPROC oldProc;
- TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
{
@@ -142,16 +144,16 @@ INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR proto = (TlenProtocol *)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto);
TranslateDialogDefault(hwndDlg);
- if (!DBGetContactSettingTString(NULL, proto->iface.m_szModuleName, "LoginName", &dbv)) {
+ if (!DBGetContactSettingTString(NULL, proto->m_szModuleName, "LoginName", &dbv)) {
SetDlgItemText(hwndDlg, IDC_EDIT_USERNAME, dbv.ptszVal);
DBFreeVariant(&dbv);
}
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "Password", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "Password", &dbv)) {
CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM) dbv.pszVal);
SetDlgItemTextA(hwndDlg, IDC_EDIT_PASSWORD, dbv.pszVal);
DBFreeVariant(&dbv);
}
- CheckDlgButton(hwndDlg, IDC_SAVEPASSWORD, DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "SavePassword", TRUE));
+ CheckDlgButton(hwndDlg, IDC_SAVEPASSWORD, DBGetContactSettingByte(NULL, proto->m_szModuleName, "SavePassword", TRUE));
oldProc = (WNDPROC) GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT_USERNAME), GWLP_WNDPROC);
SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT_USERNAME), GWLP_USERDATA, (LONG_PTR) oldProc);
@@ -162,15 +164,15 @@ INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR switch (LOWORD(wParam)) {
case IDC_EDIT_USERNAME:
case IDC_EDIT_PASSWORD:
- if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
+ if ((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_SAVEPASSWORD:
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
+ SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
case IDC_REGISTERACCOUNT:
- CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) TLEN_REGISTER);
- break;
+ CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) TLEN_REGISTER);
+ break;
}
break;
case WM_NOTIFY:
@@ -181,23 +183,23 @@ INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR DBVARIANT dbv;
GetDlgItemTextA(hwndDlg, IDC_EDIT_USERNAME, text, sizeof(text));
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginName", &dbv) || strcmp(text, dbv.pszVal))
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "LoginName", &dbv) || strcmp(text, dbv.pszVal))
reconnectRequired = TRUE;
if (dbv.pszVal != NULL) DBFreeVariant(&dbv);
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "LoginName", strlwr(text));
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "LoginName", strlwr(text));
if (IsDlgButtonChecked(hwndDlg, IDC_SAVEPASSWORD)) {
GetDlgItemTextA(hwndDlg, IDC_EDIT_PASSWORD, text, sizeof(text));
CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(text), (LPARAM) text);
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "Password", &dbv) || strcmp(text, dbv.pszVal))
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "Password", &dbv) || strcmp(text, dbv.pszVal))
reconnectRequired = TRUE;
if (dbv.pszVal != NULL) DBFreeVariant(&dbv);
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "Password", text);
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "Password", text);
}
else
- DBDeleteContactSetting(NULL, proto->iface.m_szModuleName, "Password");
+ DBDeleteContactSetting(NULL, proto->m_szModuleName, "Password");
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "SavePassword", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_SAVEPASSWORD));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "SavePassword", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_SAVEPASSWORD));
if (reconnectRequired && proto->isConnected)
MessageBox(hwndDlg, TranslateT("These changes will take effect the next time you connect to the Tlen network."), TranslateT("Tlen Protocol Option"), MB_OK|MB_SETFOREGROUND);
TlenLoadOptions(proto);
@@ -214,7 +216,7 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara char text[256];
WNDPROC oldProc;
- TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
{
@@ -222,16 +224,16 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara proto = (TlenProtocol *)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto);
TranslateDialogDefault(hwndDlg);
- if (!DBGetContactSettingTString(NULL, proto->iface.m_szModuleName, "LoginName", &dbv)) {
+ if (!DBGetContactSettingTString(NULL, proto->m_szModuleName, "LoginName", &dbv)) {
SetDlgItemText(hwndDlg, IDC_EDIT_USERNAME, dbv.ptszVal);
DBFreeVariant(&dbv);
}
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "Password", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "Password", &dbv)) {
CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM) dbv.pszVal);
SetDlgItemTextA(hwndDlg, IDC_EDIT_PASSWORD, dbv.pszVal);
DBFreeVariant(&dbv);
}
- CheckDlgButton(hwndDlg, IDC_SAVEPASSWORD, DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "SavePassword", TRUE));
+ CheckDlgButton(hwndDlg, IDC_SAVEPASSWORD, DBGetContactSettingByte(NULL, proto->m_szModuleName, "SavePassword", TRUE));
CheckDlgButton(hwndDlg, IDC_RECONNECT, proto->tlenOptions.reconnect);
CheckDlgButton(hwndDlg, IDC_ROSTER_SYNC, proto->tlenOptions.rosterSync);
@@ -261,13 +263,13 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SendDlgItemMessage(hwndDlg, IDC_IMAGE_POLICY, CB_SETCURSEL, proto->tlenOptions.imagePolicy, 0);
SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("<Last message>"));
- //SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("<Ask me>"));
- SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Online"));
- SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Away"));
- SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("NA"));
- SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("DND"));
- SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Free for chat"));
- SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Invisible"));
+ //SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("<Ask me>"));
+ SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Online"));
+ SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Away"));
+ SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("NA"));
+ SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("DND"));
+ SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Free for chat"));
+ SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_ADDSTRING, 0, (LPARAM)TranslateT("Invisible"));
SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_SETCURSEL, proto->tlenOptions.offlineMessageOption, 0);
oldProc = (WNDPROC) GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_EDIT_USERNAME), GWLP_WNDPROC);
@@ -279,7 +281,7 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara switch (LOWORD(wParam)) {
case IDC_EDIT_USERNAME:
case IDC_EDIT_PASSWORD:
- if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
+ if ((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
// Fall through
@@ -300,8 +302,8 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara MarkChanges(1, hwndDlg);
break;
case IDC_REGISTERACCOUNT:
- CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) TLEN_REGISTER);
- break;
+ CallService(MS_UTILS_OPENURL, (WPARAM) 1, (LPARAM) TLEN_REGISTER);
+ break;
case IDC_OFFLINE_MESSAGE_OPTION:
case IDC_ALERT_POLICY:
case IDC_MUC_POLICY:
@@ -321,36 +323,36 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara DBVARIANT dbv;
GetDlgItemTextA(hwndDlg, IDC_EDIT_USERNAME, text, sizeof(text));
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginName", &dbv) || strcmp(text, dbv.pszVal))
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "LoginName", &dbv) || strcmp(text, dbv.pszVal))
reconnectRequired = TRUE;
if (dbv.pszVal != NULL) DBFreeVariant(&dbv);
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "LoginName", strlwr(text));
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "LoginName", strlwr(text));
if (IsDlgButtonChecked(hwndDlg, IDC_SAVEPASSWORD)) {
GetDlgItemTextA(hwndDlg, IDC_EDIT_PASSWORD, text, sizeof(text));
CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(text), (LPARAM) text);
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "Password", &dbv) || strcmp(text, dbv.pszVal))
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "Password", &dbv) || strcmp(text, dbv.pszVal))
reconnectRequired = TRUE;
if (dbv.pszVal != NULL) DBFreeVariant(&dbv);
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "Password", text);
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "Password", text);
}
else
- DBDeleteContactSetting(NULL, proto->iface.m_szModuleName, "Password");
-
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "SavePassword", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_SAVEPASSWORD));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "Reconnect", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_RECONNECT));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "RosterSync", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ROSTER_SYNC));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "OfflineAsInvisible", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_SHOW_OFFLINE));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "IgnoreAdvertisements", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_IGNORE_ADVERTISEMENTS));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "LeaveOfflineMessage", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_OFFLINE_MESSAGE));
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "OfflineMessageOption", (WORD) SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_GETCURSEL, 0, 0));
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "AlertPolicy", (WORD) SendDlgItemMessage(hwndDlg, IDC_ALERT_POLICY, CB_GETCURSEL, 0, 0));
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "GroupChatPolicy", (WORD) SendDlgItemMessage(hwndDlg, IDC_MUC_POLICY, CB_GETCURSEL, 0, 0));
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "ImagePolicy", (WORD) SendDlgItemMessage(hwndDlg, IDC_IMAGE_POLICY, CB_GETCURSEL, 0, 0));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "EnableAvatars", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_AVATARS));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "EnableVersion", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_VERSIONINFO));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "UseNudge", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_NUDGE_SUPPORT));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "LogAlerts", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_LOG_ALERTS));
+ DBDeleteContactSetting(NULL, proto->m_szModuleName, "Password");
+
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "SavePassword", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_SAVEPASSWORD));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "Reconnect", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_RECONNECT));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "RosterSync", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ROSTER_SYNC));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "OfflineAsInvisible", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_SHOW_OFFLINE));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "IgnoreAdvertisements", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_IGNORE_ADVERTISEMENTS));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "LeaveOfflineMessage", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_OFFLINE_MESSAGE));
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "OfflineMessageOption", (WORD) SendDlgItemMessage(hwndDlg, IDC_OFFLINE_MESSAGE_OPTION, CB_GETCURSEL, 0, 0));
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "AlertPolicy", (WORD) SendDlgItemMessage(hwndDlg, IDC_ALERT_POLICY, CB_GETCURSEL, 0, 0));
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "GroupChatPolicy", (WORD) SendDlgItemMessage(hwndDlg, IDC_MUC_POLICY, CB_GETCURSEL, 0, 0));
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "ImagePolicy", (WORD) SendDlgItemMessage(hwndDlg, IDC_IMAGE_POLICY, CB_GETCURSEL, 0, 0));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "EnableAvatars", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_AVATARS));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "EnableVersion", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_VERSIONINFO));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "UseNudge", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_NUDGE_SUPPORT));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "LogAlerts", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_LOG_ALERTS));
if (reconnectRequired && proto->isConnected)
MessageBox(hwndDlg, TranslateT("These changes will take effect the next time you connect to the Tlen network."), TranslateT("Tlen Protocol Option"), MB_OK|MB_SETFOREGROUND);
ApplyChanges(proto, 1);
@@ -364,7 +366,7 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara static INT_PTR CALLBACK TlenVoiceOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
{
@@ -394,9 +396,9 @@ static INT_PTR CALLBACK TlenVoiceOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara switch (((LPNMHDR) lParam)->code) {
case PSN_APPLY:
{
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "VoiceChatPolicy", (WORD) SendDlgItemMessage(hwndDlg, IDC_VOICE_POLICY, CB_GETCURSEL, 0, 0));
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "VoiceDeviceIn", (WORD) SendDlgItemMessage(hwndDlg, IDC_VOICE_DEVICE_IN, CB_GETCURSEL, 0, 0));
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "VoiceDeviceOut", (WORD) SendDlgItemMessage(hwndDlg, IDC_VOICE_DEVICE_OUT, CB_GETCURSEL, 0, 0));
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "VoiceChatPolicy", (WORD) SendDlgItemMessage(hwndDlg, IDC_VOICE_POLICY, CB_GETCURSEL, 0, 0));
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "VoiceDeviceIn", (WORD) SendDlgItemMessage(hwndDlg, IDC_VOICE_DEVICE_IN, CB_GETCURSEL, 0, 0));
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "VoiceDeviceOut", (WORD) SendDlgItemMessage(hwndDlg, IDC_VOICE_DEVICE_OUT, CB_GETCURSEL, 0, 0));
ApplyChanges(proto, 2);
return TRUE;
}
@@ -411,7 +413,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, {
char text[256];
BOOL bChecked;
- TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
@@ -420,7 +422,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, proto = (TlenProtocol *)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto);
TranslateDialogDefault(hwndDlg);
- if (!DBGetContactSettingTString(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSettingTString(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
SetDlgItemText(hwndDlg, IDC_EDIT_LOGIN_SERVER, dbv.ptszVal);
DBFreeVariant(&dbv);
} else {
@@ -430,22 +432,22 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, EnableWindow(GetDlgItem(hwndDlg, IDC_HOST), TRUE);
EnableWindow(GetDlgItem(hwndDlg, IDC_HOSTPORT), TRUE);
- if (!DBGetContactSettingTString(NULL, proto->iface.m_szModuleName, "ManualHost", &dbv)) {
+ if (!DBGetContactSettingTString(NULL, proto->m_szModuleName, "ManualHost", &dbv)) {
SetDlgItemText(hwndDlg, IDC_HOST, dbv.ptszVal);
DBFreeVariant(&dbv);
} else
SetDlgItemText(hwndDlg, IDC_HOST, _T("s1.tlen.pl"));
- SetDlgItemInt(hwndDlg, IDC_HOSTPORT, DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "ManualPort", TLEN_DEFAULT_PORT), FALSE);
+ SetDlgItemInt(hwndDlg, IDC_HOSTPORT, DBGetContactSettingWord(NULL, proto->m_szModuleName, "ManualPort", TLEN_DEFAULT_PORT), FALSE);
- CheckDlgButton(hwndDlg, IDC_KEEPALIVE, DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "KeepAlive", TRUE));
+ CheckDlgButton(hwndDlg, IDC_KEEPALIVE, DBGetContactSettingByte(NULL, proto->m_szModuleName, "KeepAlive", TRUE));
- CheckDlgButton(hwndDlg, IDC_USE_SSL, DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "UseEncryption", TRUE));
+ CheckDlgButton(hwndDlg, IDC_USE_SSL, DBGetContactSettingByte(NULL, proto->m_szModuleName, "UseEncryption", TRUE));
- CheckDlgButton(hwndDlg, IDC_VISIBILITY_SUPPORT, DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "VisibilitySupport", FALSE));
+ CheckDlgButton(hwndDlg, IDC_VISIBILITY_SUPPORT, DBGetContactSettingByte(NULL, proto->m_szModuleName, "VisibilitySupport", FALSE));
// File transfer options
bChecked = FALSE;
- if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "UseFileProxy", FALSE) == TRUE) {
- bChecked = TRUE;
+ if (DBGetContactSettingByte(NULL, proto->m_szModuleName, "UseFileProxy", FALSE) == TRUE) {
+ bChecked = TRUE;
CheckDlgButton(hwndDlg, IDC_FILE_USE_PROXY, TRUE);
}
EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_TYPE_LABEL), bChecked);
@@ -455,10 +457,10 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_PORT_LABEL), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_PORT), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_USE_AUTH), bChecked);
- if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "FileProxyAuth", FALSE) == TRUE) {
+ if (DBGetContactSettingByte(NULL, proto->m_szModuleName, "FileProxyAuth", FALSE) == TRUE) {
CheckDlgButton(hwndDlg, IDC_FILE_PROXY_USE_AUTH, TRUE);
} else {
- bChecked = FALSE;
+ bChecked = FALSE;
}
EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_USER_LABEL), bChecked);
EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_USER), bChecked);
@@ -466,19 +468,19 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, EnableWindow(GetDlgItem(hwndDlg, IDC_FILE_PROXY_PASSWORD), bChecked);
SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("Forwarding"));
- SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("SOCKS4"));
- SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("SOCKS5"));
- SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_SETCURSEL, DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "FileProxyType", 0), 0);
- if (!DBGetContactSettingTString(NULL, proto->iface.m_szModuleName, "FileProxyHost", &dbv)) {
+ SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("SOCKS4"));
+ SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_ADDSTRING, 0, (LPARAM)TranslateT("SOCKS5"));
+ SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_SETCURSEL, DBGetContactSettingWord(NULL, proto->m_szModuleName, "FileProxyType", 0), 0);
+ if (!DBGetContactSettingTString(NULL, proto->m_szModuleName, "FileProxyHost", &dbv)) {
SetDlgItemText(hwndDlg, IDC_FILE_PROXY_HOST, dbv.ptszVal);
DBFreeVariant(&dbv);
}
- SetDlgItemInt(hwndDlg, IDC_FILE_PROXY_PORT, DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "FileProxyPort", 0), FALSE);
- if (!DBGetContactSettingTString(NULL, proto->iface.m_szModuleName, "FileProxyUsername", &dbv)) {
+ SetDlgItemInt(hwndDlg, IDC_FILE_PROXY_PORT, DBGetContactSettingWord(NULL, proto->m_szModuleName, "FileProxyPort", 0), FALSE);
+ if (!DBGetContactSettingTString(NULL, proto->m_szModuleName, "FileProxyUsername", &dbv)) {
SetDlgItemText(hwndDlg, IDC_FILE_PROXY_USER, dbv.ptszVal);
DBFreeVariant(&dbv);
}
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "FileProxyPassword", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "FileProxyPassword", &dbv)) {
CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM) dbv.pszVal);
SetDlgItemTextA(hwndDlg, IDC_FILE_PROXY_PASSWORD, dbv.pszVal);
DBFreeVariant(&dbv);
@@ -499,7 +501,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, case IDC_FILE_PROXY_PORT:
case IDC_FILE_PROXY_USER:
case IDC_FILE_PROXY_PASSWORD:
- if ((HWND)lParam==GetFocus() && HIWORD(wParam)==EN_CHANGE)
+ if ((HWND)lParam == GetFocus() && HIWORD(wParam) == EN_CHANGE)
MarkChanges(4, hwndDlg);
break;
case IDC_FILE_USE_PROXY:
@@ -537,43 +539,43 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, BOOL reconnectRequired = FALSE;
DBVARIANT dbv;
GetDlgItemTextA(hwndDlg, IDC_EDIT_LOGIN_SERVER, text, sizeof(text));
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv) || strcmp(text, dbv.pszVal))
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv) || strcmp(text, dbv.pszVal))
reconnectRequired = TRUE;
if (dbv.pszVal != NULL) DBFreeVariant(&dbv);
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "LoginServer", strlwr(text));
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "LoginServer", strlwr(text));
GetDlgItemTextA(hwndDlg, IDC_HOST, text, sizeof(text));
- if (DBGetContactSetting(NULL, proto->iface.m_szModuleName, "ManualHost", &dbv) || strcmp(text, dbv.pszVal))
+ if (DBGetContactSetting(NULL, proto->m_szModuleName, "ManualHost", &dbv) || strcmp(text, dbv.pszVal))
reconnectRequired = TRUE;
if (dbv.pszVal != NULL) DBFreeVariant(&dbv);
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "ManualHost", text);
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "ManualHost", text);
port = (WORD) GetDlgItemInt(hwndDlg, IDC_HOSTPORT, NULL, FALSE);
- if (DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "ManualPort", TLEN_DEFAULT_PORT) != port)
+ if (DBGetContactSettingWord(NULL, proto->m_szModuleName, "ManualPort", TLEN_DEFAULT_PORT) != port)
reconnectRequired = TRUE;
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "ManualPort", port);
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "ManualPort", port);
proto->tlenOptions.sendKeepAlive = IsDlgButtonChecked(hwndDlg, IDC_KEEPALIVE);
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "KeepAlive", (BYTE) proto->tlenOptions.sendKeepAlive);
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "KeepAlive", (BYTE) proto->tlenOptions.sendKeepAlive);
useEncryption = IsDlgButtonChecked(hwndDlg, IDC_USE_SSL);
- if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "UseEncryption", TRUE) != useEncryption)
+ if (DBGetContactSettingByte(NULL, proto->m_szModuleName, "UseEncryption", TRUE) != useEncryption)
reconnectRequired = TRUE;
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "UseEncryption", (BYTE) useEncryption);
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "UseEncryption", (BYTE) useEncryption);
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "VisibilitySupport", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_VISIBILITY_SUPPORT));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "VisibilitySupport", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_VISIBILITY_SUPPORT));
// File transfer options
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "UseFileProxy", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_FILE_USE_PROXY));
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "FileProxyType", (WORD) SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_GETCURSEL, 0, 0));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "UseFileProxy", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_FILE_USE_PROXY));
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "FileProxyType", (WORD) SendDlgItemMessage(hwndDlg, IDC_FILE_PROXY_TYPE, CB_GETCURSEL, 0, 0));
GetDlgItemTextA(hwndDlg, IDC_FILE_PROXY_HOST, text, sizeof(text));
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "FileProxyHost", text);
- DBWriteContactSettingWord(NULL, proto->iface.m_szModuleName, "FileProxyPort", (WORD) GetDlgItemInt(hwndDlg, IDC_FILE_PROXY_PORT, NULL, FALSE));
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "FileProxyAuth", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_FILE_PROXY_USE_AUTH));
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "FileProxyHost", text);
+ DBWriteContactSettingWord(NULL, proto->m_szModuleName, "FileProxyPort", (WORD) GetDlgItemInt(hwndDlg, IDC_FILE_PROXY_PORT, NULL, FALSE));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "FileProxyAuth", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_FILE_PROXY_USE_AUTH));
GetDlgItemTextA(hwndDlg, IDC_FILE_PROXY_USER, text, sizeof(text));
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "FileProxyUsername", text);
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "FileProxyUsername", text);
GetDlgItemTextA(hwndDlg, IDC_FILE_PROXY_PASSWORD, text, sizeof(text));
CallService(MS_DB_CRYPT_ENCODESTRING, sizeof(text), (LPARAM) text);
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "FileProxyPassword", text);
+ DBWriteContactSettingString(NULL, proto->m_szModuleName, "FileProxyPassword", text);
if (reconnectRequired && proto->isConnected)
MessageBox(hwndDlg, TranslateT("These changes will take effect the next time you connect to the Tlen network."), TranslateT("Tlen Protocol Option"), MB_OK|MB_SETFOREGROUND);
ApplyChanges(proto, 4);
@@ -623,7 +625,7 @@ static void MailPopupPreview(DWORD colorBack, DWORD colorText, char *title, char static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
{
@@ -631,14 +633,14 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, proto = (TlenProtocol *)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto);
TranslateDialogDefault(hwndDlg);
- CheckDlgButton(hwndDlg, IDC_ENABLEPOPUP, DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "MailPopupEnabled", TRUE));
- SendDlgItemMessage(hwndDlg, IDC_COLORBKG, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupBack", POPUP_DEFAULT_COLORBKG));
- SendDlgItemMessage(hwndDlg, IDC_COLORTXT, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupText", POPUP_DEFAULT_COLORTXT));
- SetDlgItemInt(hwndDlg, IDC_DELAY, DBGetContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupDelay", 4), FALSE);
- delayMode = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "MailPopupDelayMode", 0);
- if (delayMode==1) {
+ CheckDlgButton(hwndDlg, IDC_ENABLEPOPUP, DBGetContactSettingByte(NULL, proto->m_szModuleName, "MailPopupEnabled", TRUE));
+ SendDlgItemMessage(hwndDlg, IDC_COLORBKG, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupBack", POPUP_DEFAULT_COLORBKG));
+ SendDlgItemMessage(hwndDlg, IDC_COLORTXT, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupText", POPUP_DEFAULT_COLORTXT));
+ SetDlgItemInt(hwndDlg, IDC_DELAY, DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupDelay", 4), FALSE);
+ delayMode = DBGetContactSettingByte(NULL, proto->m_szModuleName, "MailPopupDelayMode", 0);
+ if (delayMode == 1) {
CheckDlgButton(hwndDlg, IDC_DELAY_CUSTOM, TRUE);
- } else if (delayMode==2) {
+ } else if (delayMode == 2) {
CheckDlgButton(hwndDlg, IDC_DELAY_PERMANENT, TRUE);
} else {
CheckDlgButton(hwndDlg, IDC_DELAY_POPUP, TRUE);
@@ -654,7 +656,7 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, case IDC_DELAY_POPUP:
case IDC_DELAY_CUSTOM:
case IDC_DELAY_PERMANENT:
- MarkChanges(8, hwndDlg);
+ MarkChanges(8, hwndDlg);
break;
case IDC_PREVIEW:
{
@@ -667,12 +669,12 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, } else {
delay=GetDlgItemInt(hwndDlg, IDC_DELAY, NULL, FALSE);
}
- _snprintf(title, sizeof(title), Translate("%s mail"), proto->iface.m_szProtoName);
+ _snprintf(title, sizeof(title), Translate("%s mail"), proto->m_szProtoName);
MailPopupPreview((DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORBKG,CPM_GETCOLOUR,0,0),
- (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORTXT,CPM_GETCOLOUR,0,0),
- title,
- "From: test@test.test\nSubject: test",
- delay);
+ (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORTXT,CPM_GETCOLOUR,0,0),
+ title,
+ "From: test@test.test\nSubject: test",
+ delay);
}
}
@@ -684,10 +686,10 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, case PSN_APPLY:
{
BYTE delayMode;
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "MailPopupEnabled", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLEPOPUP));
- DBWriteContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupBack", (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORBKG,CPM_GETCOLOUR,0,0));
- DBWriteContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupText", (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORTXT,CPM_GETCOLOUR,0,0));
- DBWriteContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupDelay", (DWORD) GetDlgItemInt(hwndDlg,IDC_DELAY, NULL, FALSE));
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "MailPopupEnabled", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLEPOPUP));
+ DBWriteContactSettingDword(NULL, proto->m_szModuleName, "MailPopupBack", (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORBKG,CPM_GETCOLOUR,0,0));
+ DBWriteContactSettingDword(NULL, proto->m_szModuleName, "MailPopupText", (DWORD) SendDlgItemMessage(hwndDlg,IDC_COLORTXT,CPM_GETCOLOUR,0,0));
+ DBWriteContactSettingDword(NULL, proto->m_szModuleName, "MailPopupDelay", (DWORD) GetDlgItemInt(hwndDlg,IDC_DELAY, NULL, FALSE));
delayMode=0;
if (IsDlgButtonChecked(hwndDlg, IDC_DELAY_CUSTOM)) {
delayMode=1;
@@ -695,7 +697,7 @@ static INT_PTR CALLBACK TlenPopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, delayMode=2;
}
- DBWriteContactSettingByte(NULL, proto->iface.m_szModuleName, "MailPopupDelayMode", delayMode);
+ DBWriteContactSettingByte(NULL, proto->m_szModuleName, "MailPopupDelayMode", delayMode);
ApplyChanges(proto, 8);
return TRUE;
}
diff --git a/plugins/!NotAdopted/Tlen/jabber_svc.c b/protocols/Tlen/src/jabber_svc.cpp index 36ef5d547f..345490df30 100644 --- a/plugins/!NotAdopted/Tlen/jabber_svc.c +++ b/protocols/Tlen/src/jabber_svc.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -36,7 +36,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern int TlenOnModulesLoaded(void *ptr, WPARAM wParam, LPARAM lParam);
extern int TlenOptionsInit(void *ptr, WPARAM wParam, LPARAM lParam);
extern int TlenPreShutdown(void *ptr, WPARAM wParam, LPARAM lParam);
-DWORD_PTR TlenGetCaps(PROTO_INTERFACE *ptr, int type, HANDLE hContact)
+extern int TlenSystemModulesLoaded(void *ptr, WPARAM wParam, LPARAM lParam);
+extern int TlenPrebuildContactMenu(void *ptr, WPARAM wParam, LPARAM lParam);
+
+
+DWORD_PTR __cdecl TlenProtocol::GetCaps(int type, HANDLE hContact)
{
if (type == PFLAGNUM_1)
return PF1_IM|PF1_AUTHREQ|PF1_SERVERCLIST|PF1_MODEMSG|PF1_BASICSEARCH|PF1_SEARCHBYEMAIL|PF1_EXTSEARCH|PF1_EXTSEARCHUI|PF1_SEARCHBYNAME|PF1_FILE;//|PF1_VISLIST|PF1_INVISLIST;
@@ -53,14 +57,14 @@ DWORD_PTR TlenGetCaps(PROTO_INTERFACE *ptr, int type, HANDLE hContact) return 0;
}
-INT_PTR TlenGetName(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenGetName(void *ptr, LPARAM wParam, LPARAM lParam)
{
- TlenProtocol *proto = (TlenProtocol *)ptr;
- strncpy((char *) lParam, proto->iface.m_szProtoName, wParam);
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ strncpy((char *) lParam, proto->m_szProtoName, wParam);
return 0;
}
-HICON TlenGetIcon(PROTO_INTERFACE *ptr, int iconIndex)
+HICON __cdecl TlenProtocol::GetIcon(int iconIndex)
{
if ((iconIndex&0xffff) == PLI_PROTOCOL) {
HICON hIcon = GetIcolibIcon(IDI_TLEN);
@@ -97,93 +101,99 @@ void TlenResetSearchQuery(TlenProtocol *proto) { proto->searchID = JabberSerialNext(proto);
}
-HANDLE TlenBasicSearch(PROTO_INTERFACE *ptr, const char *id)
+HANDLE __cdecl TlenProtocol::SearchBasic(const PROTOCHAR* id)
{
char *jid;
int iqId = 0;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 0;
+ if (!isOnline) return 0;
if (id == NULL) return 0;
- if ((jid=JabberTextEncode(id)) != NULL) {
- proto->searchJID = mir_strdup(id);
- TlenResetSearchQuery(proto);
- JabberStringAppend(&proto->searchQuery, &proto->searchQueryLen, "<i>%s</i>", jid);
- iqId = TlenRunSearch(proto);
+ char* id_A = mir_t2a(id);
+ if ((jid=JabberTextEncode(id_A)) != NULL) {
+ searchJID = mir_strdup(id_A);
+ TlenResetSearchQuery(this);
+ JabberStringAppend(&searchQuery, &searchQueryLen, "<i>%s</i>", jid);
+ iqId = TlenRunSearch(this);
mir_free(jid);
}
+ mir_free(id_A);
return (HANDLE)iqId;
}
-HANDLE TlenSearchByEmail(PROTO_INTERFACE *ptr, const char* email)
+HANDLE __cdecl TlenProtocol::SearchByEmail(const PROTOCHAR* email)
{
char *emailEnc;
int iqId = 0;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 0;
+ if (!isOnline) return 0;
if (email == NULL) return 0;
- if ((emailEnc=JabberTextEncode(email)) != NULL) {
- TlenResetSearchQuery(proto);
- JabberStringAppend(&proto->searchQuery, &proto->searchQueryLen, "<email>%s</email>", emailEnc);
- iqId = TlenRunSearch(proto);
+ char* email_A = mir_t2a(email);
+ if ((emailEnc=JabberTextEncode(email_A)) != NULL) {
+ TlenResetSearchQuery(this);
+ JabberStringAppend(&searchQuery, &searchQueryLen, "<email>%s</email>", emailEnc);
+ iqId = TlenRunSearch(this);
mir_free(emailEnc);
}
+ mir_free(email_A);
return (HANDLE)iqId;
}
-HANDLE TlenSearchByName(PROTO_INTERFACE *ptr, const char* nick, const char* firstName, const char* lastName)
+HANDLE __cdecl TlenProtocol::SearchByName(const PROTOCHAR* nickT, const PROTOCHAR* firstNameT, const PROTOCHAR* lastNameT)
{
+
+ char* nick = mir_t2a(nickT);
+ char* firstName = mir_t2a(firstNameT);
+ char* lastName = mir_t2a(lastNameT);
+
char *p;
int iqId = 0;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 0;
+ if (!isOnline) return 0;
- TlenResetSearchQuery(proto);
+ TlenResetSearchQuery(this);
if (nick != NULL && nick[0] != '\0') {
if ((p=JabberTextEncode(nick)) != NULL) {
- JabberStringAppend(&proto->searchQuery, &proto->searchQueryLen, "<nick>%s</nick>", p);
+ JabberStringAppend(&searchQuery, &searchQueryLen, "<nick>%s</nick>", p);
mir_free(p);
}
}
if (firstName != NULL && firstName[0] != '\0') {
if ((p=JabberTextEncode(firstName)) != NULL) {
- JabberStringAppend(&proto->searchQuery, &proto->searchQueryLen, "<first>%s</first>", p);
+ JabberStringAppend(&searchQuery, &searchQueryLen, "<first>%s</first>", p);
mir_free(p);
}
}
if (lastName != NULL && lastName[0] != '\0') {
if ((p=JabberTextEncode(lastName)) != NULL) {
- JabberStringAppend(&proto->searchQuery, &proto->searchQueryLen, "<last>%s</last>", p);
+ JabberStringAppend(&searchQuery, &searchQueryLen, "<last>%s</last>", p);
mir_free(p);
}
}
- iqId = TlenRunSearch(proto);
+ iqId = TlenRunSearch(this);
return (HANDLE)iqId;
}
-HWND TlenCreateAdvSearchUI(PROTO_INTERFACE *ptr, HWND owner)
+HWND __cdecl TlenProtocol::CreateExtendedSearchUI(HWND owner)
{
return (HWND) CreateDialog(hInst, MAKEINTRESOURCE(IDD_ADVSEARCH), owner, TlenAdvSearchDlgProc);
}
-HWND TlenSearchAdvanced(PROTO_INTERFACE *ptr, HWND owner)
+HWND __cdecl TlenProtocol::SearchAdvanced(HWND owner)
{
int iqId;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 0;
+ if (!isOnline) return 0;
- TlenResetSearchQuery(proto);
- iqId = JabberSerialNext(proto);
- if ((proto->searchQuery = TlenAdvSearchCreateQuery(owner, iqId)) != NULL) {
- iqId = TlenRunSearch(proto);
+ TlenResetSearchQuery(this);
+ iqId = JabberSerialNext(this);
+ if ((searchQuery = TlenAdvSearchCreateQuery(owner, iqId)) != NULL) {
+ iqId = TlenRunSearch(this);
}
return (HWND)iqId;
}
+
static HANDLE AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD flags)
{
HANDLE hContact;
@@ -193,8 +203,8 @@ static HANDLE AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD flag // not already there: add
jid = mir_strdup(newJid); _strlwr(jid);
hContact = (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->iface.m_szModuleName);
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "jid", jid);
+ CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "jid", jid);
if ((nick=JabberNickFromJID(newJid)) == NULL)
nick = mir_strdup(newJid);
DBWriteContactSettingString(hContact, "CList", "MyHandle", nick);
@@ -223,37 +233,35 @@ static HANDLE AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD flag return hContact;
}
-HANDLE TlenAddToList(PROTO_INTERFACE *ptr, int flags, PROTOSEARCHRESULT *psr)
+HANDLE __cdecl TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
HANDLE hContact;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- JABBER_SEARCH_RESULT *jsr = (JABBER_SEARCH_RESULT*)psr;
+ JABBER_SEARCH_RESULT *jsr = (JABBER_SEARCH_RESULT*)psr;
if (jsr->hdr.cbSize != sizeof(JABBER_SEARCH_RESULT))
return (int) NULL;
- hContact = AddToListByJID(proto, jsr->jid, flags); // wParam is flag e.g. PALF_TEMPORARY
+ hContact = AddToListByJID(this, jsr->jid, flags); // wParam is flag e.g. PALF_TEMPORARY
return hContact;
}
-HANDLE TlenAddToListByEvent(PROTO_INTERFACE *ptr, int flags, int iContact, HANDLE hDbEvent)
+HANDLE __cdecl TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEvent )
{
DBEVENTINFO dbei;
HANDLE hContact;
char *nick, *firstName, *lastName, *jid;
- TlenProtocol *proto = (TlenProtocol *)ptr;
ZeroMemory(&dbei, sizeof(dbei));
dbei.cbSize = sizeof(dbei);
if ((dbei.cbBlob=CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent, 0)) == (DWORD)(-1))
- return (int)(HANDLE) NULL;
+ return (HANDLE) NULL;
if ((dbei.pBlob=(PBYTE) mir_alloc(dbei.cbBlob)) == NULL)
- return (int)(HANDLE) NULL;
+ return (HANDLE) NULL;
if (CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent, (LPARAM) &dbei)) {
mir_free(dbei.pBlob);
- return (int)(HANDLE) NULL;
+ return (HANDLE) NULL;
}
- if (strcmp(dbei.szModule, proto->iface.m_szModuleName)) {
+ if (strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
- return (int)(HANDLE) NULL;
+ return (HANDLE) NULL;
}
/*
@@ -265,7 +273,7 @@ HANDLE TlenAddToListByEvent(PROTO_INTERFACE *ptr, int flags, int iContact, HANDL if (dbei.eventType != EVENTTYPE_AUTHREQUEST) {
mir_free(dbei.pBlob);
- return (int)(HANDLE) NULL;
+ return (HANDLE) NULL;
}
nick = (char *)dbei.pBlob + sizeof(DWORD)*2;
@@ -273,28 +281,27 @@ HANDLE TlenAddToListByEvent(PROTO_INTERFACE *ptr, int flags, int iContact, HANDL lastName = firstName + strlen(firstName) + 1;
jid = lastName + strlen(lastName) + 1;
- hContact = (HANDLE) AddToListByJID(proto, jid, flags);
+ hContact = (HANDLE) AddToListByJID(this, jid, flags);
mir_free(dbei.pBlob);
return hContact;
}
-int TlenAuthAllow(PROTO_INTERFACE *ptr, HANDLE hContact)
+int __cdecl TlenProtocol::Authorize(HANDLE hDbEvent)
{
DBEVENTINFO dbei;
char *nick, *firstName, *lastName, *jid;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline)
+ if (!isOnline)
return 1;
memset(&dbei, sizeof(dbei), 0);
dbei.cbSize = sizeof(dbei);
- if ((dbei.cbBlob=CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hContact, 0)) == (DWORD)(-1))
+ if (( dbei.cbBlob=CallService( MS_DB_EVENT_GETBLOBSIZE, ( WPARAM )hDbEvent, 0 )) == ( DWORD )( -1 ))
return 1;
if ((dbei.pBlob=(PBYTE) mir_alloc(dbei.cbBlob)) == NULL)
return 1;
- if (CallService(MS_DB_EVENT_GET, (WPARAM)hContact, (LPARAM) &dbei)) {
+ if ( CallService( MS_DB_EVENT_GET, ( WPARAM )hDbEvent, ( LPARAM )&dbei )){
mir_free(dbei.pBlob);
return 1;
}
@@ -302,7 +309,7 @@ int TlenAuthAllow(PROTO_INTERFACE *ptr, HANDLE hContact) mir_free(dbei.pBlob);
return 1;
}
- if (strcmp(dbei.szModule, proto->iface.m_szModuleName)) {
+ if (strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
return 1;
}
@@ -312,16 +319,16 @@ int TlenAuthAllow(PROTO_INTERFACE *ptr, HANDLE hContact) lastName = firstName + strlen(firstName) + 1;
jid = lastName + strlen(lastName) + 1;
- JabberSend(proto, "<presence to='%s' type='subscribed'/>", jid);
+ JabberSend(this, "<presence to='%s' type='subscribed'/>", jid);
// Automatically add this user to my roster if option is enabled
- if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "AutoAdd", TRUE) == TRUE) {
+ if (DBGetContactSettingByte(NULL, m_szModuleName, "AutoAdd", TRUE) == TRUE) {
HANDLE hContact;
JABBER_LIST_ITEM *item;
- if ((item=JabberListGetItemPtr(proto, LIST_ROSTER, jid))==NULL || (item->subscription!=SUB_BOTH && item->subscription!=SUB_TO)) {
- JabberLog(proto, "Try adding contact automatically jid=%s", jid);
- if ((hContact=AddToListByJID(proto, jid, 0)) != NULL) {
+ if ((item=JabberListGetItemPtr(this, LIST_ROSTER, jid)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
+ JabberLog(this, "Try adding contact automatically jid=%s", jid);
+ if ((hContact=AddToListByJID(this, jid, 0)) != NULL) {
// Trigger actual add by removing the "NotOnList" added by AddToListByJID()
// See AddToListByJID() and JabberDbSettingChanged().
DBDeleteContactSetting(hContact, "CList", "NotOnList");
@@ -333,22 +340,21 @@ int TlenAuthAllow(PROTO_INTERFACE *ptr, HANDLE hContact) return 0;
}
-int TlenAuthDeny(PROTO_INTERFACE *ptr, HANDLE hContact, const TCHAR* szReason)
+int __cdecl TlenProtocol::AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason)
{
DBEVENTINFO dbei;
char *nick, *firstName, *lastName, *jid;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline)
+ if (!isOnline)
return 1;
memset(&dbei, sizeof(dbei), 0);
dbei.cbSize = sizeof(dbei);
- if ((dbei.cbBlob=CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hContact, 0)) == (DWORD)(-1))
+ if ((dbei.cbBlob=CallService(MS_DB_EVENT_GETBLOBSIZE, (WPARAM)hDbEvent/*hContact*/, 0)) == (DWORD)(-1))
return 1;
if ((dbei.pBlob=(PBYTE) mir_alloc(dbei.cbBlob)) == NULL)
return 1;
- if (CallService(MS_DB_EVENT_GET, (WPARAM)hContact, (LPARAM) &dbei)) {
+ if (CallService(MS_DB_EVENT_GET, (WPARAM)hDbEvent/*hContact*/, (LPARAM) &dbei)) {
mir_free(dbei.pBlob);
return 1;
}
@@ -356,7 +362,7 @@ int TlenAuthDeny(PROTO_INTERFACE *ptr, HANDLE hContact, const TCHAR* szReason) mir_free(dbei.pBlob);
return 1;
}
- if (strcmp(dbei.szModule, proto->iface.m_szModuleName)) {
+ if (strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
return 1;
}
@@ -366,8 +372,8 @@ int TlenAuthDeny(PROTO_INTERFACE *ptr, HANDLE hContact, const TCHAR* szReason) lastName = firstName + strlen(firstName) + 1;
jid = lastName + strlen(lastName) + 1;
- JabberSend(proto, "<presence to='%s' type='unsubscribed'/>", jid);
- JabberSend(proto, "<iq type='set'><query xmlns='jabber:iq:roster'><item jid='%s' subscription='remove'/></query></iq>", jid);
+ JabberSend(this, "<presence to='%s' type='unsubscribed'/>", jid);
+ JabberSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item jid='%s' subscription='remove'/></query></iq>", jid);
mir_free(dbei.pBlob);
return 0;
}
@@ -380,110 +386,111 @@ static void TlenConnect(TlenProtocol *proto, int initialStatus) thread = (ThreadData *) mir_alloc(sizeof(ThreadData));
memset(thread, 0, sizeof(ThreadData));
- thread->proto = proto;
- proto->iface.m_iDesiredStatus = initialStatus;
+ thread->proto = proto;
+ proto->m_iDesiredStatus = initialStatus;
- oldStatus = proto->iface.m_iStatus;
- proto->iface.m_iStatus = ID_STATUS_CONNECTING;
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, proto->iface.m_iStatus);
+ oldStatus = proto->m_iStatus;
+ proto->m_iStatus = ID_STATUS_CONNECTING;
+ ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, proto->m_iStatus);
thread->hThread = (HANDLE) JabberForkThread((void (__cdecl *)(void*))JabberServerThread, 0, thread);
}
}
-int TlenSetStatus(PROTO_INTERFACE *ptr, int iNewStatus)
+int __cdecl TlenProtocol::SetStatus(int iNewStatus)
{
int oldStatus;
HANDLE s;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- proto->iface.m_iDesiredStatus = iNewStatus;
+ m_iDesiredStatus = iNewStatus;
- if (iNewStatus == ID_STATUS_OFFLINE) {
- if (proto->threadData) {
- if (proto->isConnected) {
- JabberSendPresence(proto, ID_STATUS_OFFLINE);
+ if (iNewStatus == ID_STATUS_OFFLINE) {
+ if (threadData) {
+ if (isConnected) {
+ JabberSendPresence(this, ID_STATUS_OFFLINE);
}
- s = proto;
- proto->threadData = NULL;
- if (proto->isConnected) {
+
+ // TODO bug? s = proto;
+ s = threadData->s;
+
+ threadData = NULL;
+ if (isConnected) {
Sleep(200);
// JabberSend(s, "</s>");
// Force closing connection
- proto->isConnected = FALSE;
- proto->isOnline = FALSE;
+ isConnected = FALSE;
+ isOnline = FALSE;
Netlib_CloseHandle(s);
}
}
else {
- if (proto->iface.m_iStatus != ID_STATUS_OFFLINE) {
- oldStatus = proto->iface.m_iStatus;
- proto->iface.m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, proto->iface.m_iStatus);
+ if (m_iStatus != ID_STATUS_OFFLINE) {
+ oldStatus = m_iStatus;
+ m_iStatus = ID_STATUS_OFFLINE;
+ ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, m_iStatus);
}
}
}
- else if (iNewStatus != proto->iface.m_iStatus) {
- if (!proto->isConnected)
- TlenConnect(proto, iNewStatus);
+ else if (iNewStatus != m_iStatus) {
+ if (!isConnected)
+ TlenConnect(this, iNewStatus);
else {
// change status
- oldStatus = proto->iface.m_iStatus;
+ oldStatus = m_iStatus;
// send presence update
- JabberSendPresence(proto, iNewStatus);
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, proto->iface.m_iStatus);
+ JabberSendPresence(this, iNewStatus);
+ ProtoBroadcastAck(m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, m_iStatus);
}
}
return 0;
}
-INT_PTR TlenGetStatus(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenGetStatus(void *ptr, LPARAM wParam, LPARAM lParam)
{
- TlenProtocol *proto = (TlenProtocol *)ptr;
- return proto->iface.m_iStatus;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ return proto->m_iStatus;
}
-int TlenSetAwayMsg(PROTO_INTERFACE *ptr, int iStatus, const char* msg )
+int __cdecl TlenProtocol::SetAwayMsg(int iStatus, const PROTOCHAR* msg)
{
char **szMsg;
char *newModeMsg;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- JabberLog(proto, "SetAwayMsg called, wParam=%d lParam=%s", iStatus, msg);
+ JabberLog(this, "SetAwayMsg called, wParam=%d lParam=%s", iStatus, msg);
- newModeMsg = JabberTextEncode(msg);
+ newModeMsg = JabberTextEncode(mir_t2a(msg)); //TODO TCHAR
- EnterCriticalSection(&proto->modeMsgMutex);
+ EnterCriticalSection(&modeMsgMutex);
switch (iStatus) {
case ID_STATUS_ONLINE:
- szMsg = &proto->modeMsgs.szOnline;
+ szMsg = &modeMsgs.szOnline;
break;
case ID_STATUS_AWAY:
case ID_STATUS_ONTHEPHONE:
case ID_STATUS_OUTTOLUNCH:
- szMsg = &proto->modeMsgs.szAway;
+ szMsg = &modeMsgs.szAway;
break;
case ID_STATUS_NA:
- szMsg = &proto->modeMsgs.szNa;
+ szMsg = &modeMsgs.szNa;
break;
case ID_STATUS_DND:
case ID_STATUS_OCCUPIED:
- szMsg = &proto->modeMsgs.szDnd;
+ szMsg = &modeMsgs.szDnd;
break;
case ID_STATUS_FREECHAT:
- szMsg = &proto->modeMsgs.szFreechat;
+ szMsg = &modeMsgs.szFreechat;
break;
case ID_STATUS_INVISIBLE:
- szMsg = &proto->modeMsgs.szInvisible;
+ szMsg = &modeMsgs.szInvisible;
break;
default:
- LeaveCriticalSection(&proto->modeMsgMutex);
+ LeaveCriticalSection(&modeMsgMutex);
return 1;
}
- if ((*szMsg==NULL && newModeMsg==NULL) ||
- (*szMsg!=NULL && newModeMsg!=NULL && !strcmp(*szMsg, newModeMsg))) {
+ if ((*szMsg == NULL && newModeMsg == NULL) ||
+ (*szMsg != NULL && newModeMsg != NULL && !strcmp(*szMsg, newModeMsg))) {
// Message is the same, no update needed
if (newModeMsg != NULL) mir_free(newModeMsg);
}
@@ -492,34 +499,33 @@ int TlenSetAwayMsg(PROTO_INTERFACE *ptr, int iStatus, const char* msg ) if (*szMsg != NULL) mir_free(*szMsg);
*szMsg = newModeMsg;
// Send a presence update if needed
- if (iStatus == proto->iface.m_iStatus) {
- JabberSendPresence(proto, proto->iface.m_iStatus);
+ if (iStatus == m_iStatus) {
+ JabberSendPresence(this, m_iStatus);
}
}
- LeaveCriticalSection(&proto->modeMsgMutex);
+ LeaveCriticalSection(&modeMsgMutex);
return 0;
}
-int JabberGetInfo(PROTO_INTERFACE *ptr, HANDLE hContact, int infoType)
+int __cdecl TlenProtocol::GetInfo(HANDLE hContact, int infoType)
{
DBVARIANT dbv;
int iqId;
char *nick, *pNick;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 1;
- if (hContact==NULL) {
- iqId = JabberSerialNext(proto);
- JabberIqAdd(proto, iqId, IQ_PROC_NONE, TlenIqResultVcard);
- JabberSend(proto, "<iq type='get' id='"JABBER_IQID"%d' to='tuba'><query xmlns='jabber:iq:register'></query></iq>", iqId);
+ if (!isOnline) return 1;
+ if (hContact == NULL) {
+ iqId = JabberSerialNext(this);
+ JabberIqAdd(this, iqId, IQ_PROC_NONE, TlenIqResultVcard);
+ JabberSend(this, "<iq type='get' id='"JABBER_IQID"%d' to='tuba'><query xmlns='jabber:iq:register'></query></iq>", iqId);
} else {
- if (DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) return 1;
+ if (DBGetContactSetting(hContact, m_szModuleName, "jid", &dbv)) return 1;
if ((nick=JabberNickFromJID(dbv.pszVal)) != NULL) {
if ((pNick=JabberTextEncode(nick)) != NULL) {
- iqId = JabberSerialNext(proto);
- JabberIqAdd(proto, iqId, IQ_PROC_NONE, TlenIqResultVcard);
- JabberSend(proto, "<iq type='get' id='"JABBER_IQID"%d' to='tuba'><query xmlns='jabber:iq:search'><i>%s</i></query></iq>", iqId, pNick);
+ iqId = JabberSerialNext(this);
+ JabberIqAdd(this, iqId, IQ_PROC_NONE, TlenIqResultVcard);
+ JabberSend(this, "<iq type='get' id='"JABBER_IQID"%d' to='tuba'><query xmlns='jabber:iq:search'><i>%s</i></query></iq>", iqId, pNick);
mir_free(pNick);
}
mir_free(nick);
@@ -529,35 +535,34 @@ int JabberGetInfo(PROTO_INTERFACE *ptr, HANDLE hContact, int infoType) return 0;
}
-int TlenSetApparentMode(PROTO_INTERFACE *ptr, HANDLE hContact, int mode)
+int __cdecl TlenProtocol::SetApparentMode(HANDLE hContact, int mode)
{
DBVARIANT dbv;
int oldMode;
char *jid;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 0;
- if (!DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "VisibilitySupport", FALSE)) return 0;
- if (mode!=0 && mode!=ID_STATUS_ONLINE && mode!=ID_STATUS_OFFLINE) return 1;
- oldMode = DBGetContactSettingWord(hContact, proto->iface.m_szModuleName, "ApparentMode", 0);
+ if (!isOnline) return 0;
+ if (!DBGetContactSettingByte(NULL, m_szModuleName, "VisibilitySupport", FALSE)) return 0;
+ if (mode != 0 && mode != ID_STATUS_ONLINE && mode != ID_STATUS_OFFLINE) return 1;
+ oldMode = DBGetContactSettingWord(hContact, m_szModuleName, "ApparentMode", 0);
if ((int) mode == oldMode) return 1;
- DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "ApparentMode", (WORD) mode);
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ DBWriteContactSettingWord(hContact, m_szModuleName, "ApparentMode", (WORD) mode);
+ if (!DBGetContactSetting(hContact, m_szModuleName, "jid", &dbv)) {
jid = dbv.pszVal;
switch (mode) {
case ID_STATUS_ONLINE:
- if (proto->iface.m_iStatus==ID_STATUS_INVISIBLE || oldMode==ID_STATUS_OFFLINE)
- JabberSend(proto, "<presence to='%s'><show>available</show></presence>", jid);
+ if (m_iStatus == ID_STATUS_INVISIBLE || oldMode == ID_STATUS_OFFLINE)
+ JabberSend(this, "<presence to='%s'><show>available</show></presence>", jid);
break;
case ID_STATUS_OFFLINE:
- if (proto->iface.m_iStatus!=ID_STATUS_INVISIBLE || oldMode==ID_STATUS_ONLINE)
- JabberSend(proto, "<presence to='%s' type='invisible'/>", jid);
+ if (m_iStatus != ID_STATUS_INVISIBLE || oldMode == ID_STATUS_ONLINE)
+ JabberSend(this, "<presence to='%s' type='invisible'/>", jid);
break;
case 0:
- if (oldMode==ID_STATUS_ONLINE && proto->iface.m_iStatus==ID_STATUS_INVISIBLE)
- JabberSend(proto, "<presence to='%s' type='invisible'/>", jid);
- else if (oldMode==ID_STATUS_OFFLINE && proto->iface.m_iStatus!=ID_STATUS_INVISIBLE)
- JabberSend(proto, "<presence to='%s'><show>available</show></presence>", jid);
+ if (oldMode == ID_STATUS_ONLINE && m_iStatus == ID_STATUS_INVISIBLE)
+ JabberSend(this, "<presence to='%s' type='invisible'/>", jid);
+ else if (oldMode == ID_STATUS_OFFLINE && m_iStatus != ID_STATUS_INVISIBLE)
+ JabberSend(this, "<presence to='%s'><show>available</show></presence>", jid);
break;
}
DBFreeVariant(&dbv);
@@ -566,36 +571,36 @@ int TlenSetApparentMode(PROTO_INTERFACE *ptr, HANDLE hContact, int mode) }
typedef struct{
- TlenProtocol *proto;
- HANDLE hContact;
+ TlenProtocol *proto;
+ HANDLE hContact;
} SENDACKTHREADDATA;
static void __cdecl JabberSendMessageAckThread(void *ptr)
{
- SENDACKTHREADDATA *data = (SENDACKTHREADDATA *)ptr;
+ SENDACKTHREADDATA *data = (SENDACKTHREADDATA *)ptr;
SleepEx(10, TRUE);
- ProtoBroadcastAck(data->proto->iface.m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
- mir_free(data);
+ ProtoBroadcastAck(data->proto->m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ mir_free(data);
}
static void __cdecl TlenSendMessageFailedThread(void *ptr)
{
- SENDACKTHREADDATA *data = (SENDACKTHREADDATA *)ptr;
+ SENDACKTHREADDATA *data = (SENDACKTHREADDATA *)ptr;
SleepEx(10, TRUE);
- ProtoBroadcastAck(data->proto->iface.m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 2, 0);
- mir_free(data);
+ ProtoBroadcastAck(data->proto->m_szModuleName, data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 2, 0);
+ mir_free(data);
}
static void __cdecl TlenGetAwayMsgThread(void *ptr)
{
DBVARIANT dbv;
JABBER_LIST_ITEM *item;
- SENDACKTHREADDATA *data = (SENDACKTHREADDATA *)ptr;
- if (!DBGetContactSetting(data->hContact, data->proto->iface.m_szModuleName, "jid", &dbv)) {
+ SENDACKTHREADDATA *data = (SENDACKTHREADDATA *)ptr;
+ if (!DBGetContactSetting(data->hContact, data->proto->m_szModuleName, "jid", &dbv)) {
if ((item=JabberListGetItemPtr(data->proto, LIST_ROSTER, dbv.pszVal)) != NULL) {
- DBFreeVariant(&dbv);
- if (item->statusMessage != NULL) {
- ProtoBroadcastAck(data->proto->iface.m_szModuleName, data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) item->statusMessage);
+ DBFreeVariant(&dbv);
+ if (item->statusMessage != NULL) {
+ ProtoBroadcastAck(data->proto->m_szModuleName, data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) item->statusMessage);
return;
}
}
@@ -603,16 +608,16 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr) DBFreeVariant(&dbv);
}
}
- ProtoBroadcastAck(data->proto->iface.m_szModuleName, data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) "");
- mir_free(data);
+ ProtoBroadcastAck(data->proto->m_szModuleName, data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE) 1, (LPARAM) "");
+ mir_free(data);
}
-INT_PTR TlenSendAlert(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenSendAlert(void *ptr, LPARAM wParam, LPARAM lParam)
{
HANDLE hContact = ( HANDLE )wParam;
DBVARIANT dbv;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (proto->isOnline && !DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ if (proto->isOnline && !DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
JabberSend(proto, "<m tp='a' to='%s'/>", dbv.pszVal);
DBFreeVariant(&dbv);
@@ -620,64 +625,62 @@ INT_PTR TlenSendAlert(void *ptr, WPARAM wParam, LPARAM lParam) return 0;
}
-
-int TlenSendMessage(PROTO_INTERFACE *ptr, HANDLE hContact, int flags, const char* msg)
+int __cdecl TlenProtocol::SendMsg(HANDLE hContact, int flags, const char* msg)
{
DBVARIANT dbv;
char *msgEnc;
JABBER_LIST_ITEM *item;
int id;
char msgType[16];
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline || DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
- SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
- tdata->proto = proto;
- tdata->hContact = hContact;
+ if (!isOnline || DBGetContactSetting(hContact, m_szModuleName, "jid", &dbv)) {
+ SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
+ tdata->proto = this;
+ tdata->hContact = hContact;
JabberForkThread(TlenSendMessageFailedThread, 0, (void *) tdata);
return 2;
}
if (!strcmp(msg, "<alert>")) {
- SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
- tdata->proto = proto;
- tdata->hContact = hContact;
- JabberSend(proto, "<m tp='a' to='%s'/>", dbv.pszVal);
+ SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
+ tdata->proto = this;
+ tdata->hContact = hContact;
+ JabberSend(this, "<m tp='a' to='%s'/>", dbv.pszVal);
JabberForkThread(JabberSendMessageAckThread, 0, (void *) tdata);
} else if (!strcmp(msg, "<image>")) {
- SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
- tdata->proto = proto;
- tdata->hContact = hContact;
- id = JabberSerialNext(proto);
- JabberSend(proto, "<message to='%s' type='%s' crc='%x' idt='%d'/>", dbv.pszVal, "pic", 0x757f044, id);
+ SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
+ tdata->proto = this;
+ tdata->hContact = hContact;
+ id = JabberSerialNext(this);
+ JabberSend(this, "<message to='%s' type='%s' crc='%x' idt='%d'/>", dbv.pszVal, "pic", 0x757f044, id);
JabberForkThread(JabberSendMessageAckThread, 0, (void *) tdata);
} else {
if ((msgEnc=JabberTextEncode(msg)) != NULL) {
- if (JabberListExist(proto, LIST_CHATROOM, dbv.pszVal) && strchr(dbv.pszVal, '/')==NULL) {
+ if (JabberListExist(this, LIST_CHATROOM, dbv.pszVal) && strchr(dbv.pszVal, '/') == NULL) {
strcpy(msgType, "groupchat");
- } else if (DBGetContactSettingByte(hContact, proto->iface.m_szModuleName, "bChat", FALSE)) {
+ } else if (DBGetContactSettingByte(hContact, m_szModuleName, "bChat", FALSE)) {
strcpy(msgType, "privchat");
} else {
strcpy(msgType, "chat");
}
- if (!strcmp(msgType, "groupchat") || DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "MsgAck", FALSE) == FALSE) {
- SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
- tdata->proto = proto;
- tdata->hContact = hContact;
+ if (!strcmp(msgType, "groupchat") || DBGetContactSettingByte(NULL, m_szModuleName, "MsgAck", FALSE) == FALSE) {
+ SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
+ tdata->proto = this;
+ tdata->hContact = hContact;
if (!strcmp(msgType, "groupchat")) {
- JabberSend(proto, "<message to='%s' type='%s'><body>%s</body></message>", dbv.pszVal, msgType, msgEnc);
+ JabberSend(this, "<message to='%s' type='%s'><body>%s</body></message>", dbv.pszVal, msgType, msgEnc);
} else if (!strcmp(msgType, "privchat")) {
- JabberSend(proto, "<m to='%s'><b n='6' s='10' f='0' c='000000'>%s</b></m>", dbv.pszVal, msgEnc);
+ JabberSend(this, "<m to='%s'><b n='6' s='10' f='0' c='000000'>%s</b></m>", dbv.pszVal, msgEnc);
} else {
- id = JabberSerialNext(proto);
- JabberSend(proto, "<message to='%s' type='%s' id='"JABBER_IQID"%d'><body>%s</body><x xmlns='jabber:x:event'><composing/></x></message>", dbv.pszVal, msgType, id, msgEnc);
+ id = JabberSerialNext(this);
+ JabberSend(this, "<message to='%s' type='%s' id='"JABBER_IQID"%d'><body>%s</body><x xmlns='jabber:x:event'><composing/></x></message>", dbv.pszVal, msgType, id, msgEnc);
}
JabberForkThread(JabberSendMessageAckThread, 0, (void *) tdata);
}
else {
- id = JabberSerialNext(proto);
- if ((item=JabberListGetItemPtr(proto, LIST_ROSTER, dbv.pszVal)) != NULL)
+ id = JabberSerialNext(this);
+ if ((item=JabberListGetItemPtr(this, LIST_ROSTER, dbv.pszVal)) != NULL)
item->idMsgAckPending = id;
- JabberSend(proto, "<message to='%s' type='%s' id='"JABBER_IQID"%d'><body>%s</body><x xmlns='jabber:x:event'><offline/><delivered/><composing/></x></message>", dbv.pszVal, msgType, id, msgEnc);
+ JabberSend(this, "<message to='%s' type='%s' id='"JABBER_IQID"%d'><body>%s</body><x xmlns='jabber:x:event'><offline/><delivered/><composing/></x></message>", dbv.pszVal, msgType, id, msgEnc);
}
}
mir_free(msgEnc);
@@ -689,18 +692,18 @@ int TlenSendMessage(PROTO_INTERFACE *ptr, HANDLE hContact, int flags, const char /////////////////////////////////////////////////////////////////////////////////////////
// JabberGetAvatarInfo - retrieves the avatar info
-static INT_PTR TlenGetAvatarInfo(void *ptr, WPARAM wParam, LPARAM lParam)
+static INT_PTR TlenGetAvatarInfo(void *ptr, LPARAM wParam, LPARAM lParam)
{
BOOL downloadingAvatar = FALSE;
char *avatarHash = NULL;
JABBER_LIST_ITEM *item = NULL;
DBVARIANT dbv;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- PROTO_AVATAR_INFORMATION* AI = ( PROTO_AVATAR_INFORMATION* )lParam;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ PROTO_AVATAR_INFORMATIONT* AI = ( PROTO_AVATAR_INFORMATIONT* )lParam;
if (!proto->tlenOptions.enableAvatars) return GAIR_NOAVATAR;
if (AI->hContact != NULL) {
- if (!DBGetContactSetting(AI->hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (!DBGetContactSetting(AI->hContact, proto->m_szModuleName, "jid", &dbv)) {
item = JabberListGetItemPtr(proto, LIST_ROSTER, dbv.pszVal);
DBFreeVariant(&dbv);
if (item != NULL) {
@@ -728,65 +731,75 @@ static INT_PTR TlenGetAvatarInfo(void *ptr, WPARAM wParam, LPARAM lParam) return GAIR_NOAVATAR;
}
-HANDLE TlenGetAwayMsg(PROTO_INTERFACE *ptr, HANDLE hContact)
+HANDLE __cdecl TlenProtocol::GetAwayMsg(HANDLE hContact)
{
- TlenProtocol *proto = (TlenProtocol *)ptr;
- SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
- tdata->proto = proto;
- tdata->hContact = hContact;
+ SENDACKTHREADDATA *tdata = (SENDACKTHREADDATA*) mir_alloc(sizeof(SENDACKTHREADDATA));
+ tdata->proto = this;
+ tdata->hContact = hContact;
JabberForkThread((void (__cdecl *)(void*))TlenGetAwayMsgThread, 0, (void *) tdata);
return (HANDLE)1;
}
-HANDLE TlenFileAllow(PROTO_INTERFACE *ptr, HANDLE hContact, HANDLE hTransfer, const char* szPath)
+int __cdecl TlenProtocol::RecvAwayMsg(HANDLE hContact, int mode, PROTORECVEVENT* evt)
+{
+ return 0;
+}
+
+int __cdecl TlenProtocol::SendAwayMsg(HANDLE hContact, HANDLE hProcess, const char* msg)
+{
+ return 0;
+}
+
+HANDLE __cdecl TlenProtocol::FileAllow(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
TLEN_FILE_TRANSFER *ft;
JABBER_LIST_ITEM *item;
char *nick;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 0;
+ if (!isOnline) return 0;
ft = (TLEN_FILE_TRANSFER *) hTransfer;
- ft->szSavePath = mir_strdup(szPath);
- if ((item=JabberListAdd(proto, LIST_FILE, ft->iqId)) != NULL) {
+ ft->szSavePath = mir_strdup(mir_t2a(szPath)); //TODO convert to PROTOCHAR*
+ if ((item=JabberListAdd(this, LIST_FILE, ft->iqId)) != NULL) {
item->ft = ft;
}
nick = JabberNickFromJID(ft->jid);
if (ft->newP2P) {
- JabberSend(proto, "<iq to='%s'><query xmlns='p2p'><fs t='%s' e='5' i='%s' v='1'/></query></iq>", ft->jid, ft->jid, ft->iqId);
+ JabberSend(this, "<iq to='%s'><query xmlns='p2p'><fs t='%s' e='5' i='%s' v='1'/></query></iq>", ft->jid, ft->jid, ft->iqId);
} else {
- JabberSend(proto, "<f t='%s' i='%s' e='5' v='1'/>", nick, ft->iqId);
+ JabberSend(this, "<f t='%s' i='%s' e='5' v='1'/>", nick, ft->iqId);
}
mir_free(nick);
return (HANDLE)hTransfer;
}
-int TlenFileDeny(PROTO_INTERFACE *ptr, HANDLE hContact, HANDLE hTransfer, const char* szReason)
+int __cdecl TlenProtocol::FileDeny(HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
{
TLEN_FILE_TRANSFER *ft;
char *nick;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 1;
+ if (!isOnline) return 1;
ft = (TLEN_FILE_TRANSFER *) hTransfer;
nick = JabberNickFromJID(ft->jid);
if (ft->newP2P) {
- JabberSend(proto, "<f i='%s' e='4' t='%s'/>", ft->iqId, nick);\
+ JabberSend(this, "<f i='%s' e='4' t='%s'/>", ft->iqId, nick);\
} else {
- JabberSend(proto, "<f i='%s' e='4' t='%s'/>", ft->iqId, nick);\
+ JabberSend(this, "<f i='%s' e='4' t='%s'/>", ft->iqId, nick);\
}
mir_free(nick);
TlenP2PFreeFileTransfer(ft);
return 0;
}
-int TlenFileCancel(PROTO_INTERFACE *ptr, HANDLE hContact, HANDLE hTransfer)
+int __cdecl TlenProtocol::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename) {
+ return 0;
+}
+
+int __cdecl TlenProtocol::FileCancel(HANDLE hContact, HANDLE hTransfer)
{
TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *) hTransfer;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- JabberLog(proto, "Invoking FileCancel()");
+ JabberLog(this, "Invoking FileCancel()");
if (ft->s != NULL) {
ft->state = FT_ERROR;
Netlib_CloseHandle(ft->s);
@@ -802,7 +815,7 @@ int TlenFileCancel(PROTO_INTERFACE *ptr, HANDLE hContact, HANDLE hTransfer) return 0;
}
-HANDLE TlenSendFile(PROTO_INTERFACE *ptr, HANDLE hContact, const char* szDescription, char** ppszFiles)
+HANDLE __cdecl TlenProtocol::SendFile(HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
TLEN_FILE_TRANSFER *ft;
int i, j;
@@ -811,54 +824,58 @@ HANDLE TlenSendFile(PROTO_INTERFACE *ptr, HANDLE hContact, const char* szDescrip char *nick, *p, idStr[10];
JABBER_LIST_ITEM *item;
int id;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 0;
-// if (DBGetContactSettingWord(ccs->hContact, iface.m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) return 0;
- if (DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) return 0;
- ft = TlenFileCreateFT(proto, dbv.pszVal);
- for(ft->fileCount=0; ppszFiles[ft->fileCount]; ft->fileCount++);
+ if (!isOnline) return 0;
+// if (DBGetContactSettingWord(ccs->hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) return 0;
+ if (DBGetContactSetting(hContact, m_szModuleName, "jid", &dbv)) return 0;
+ ft = TlenFileCreateFT(this, dbv.pszVal);
+ for (ft->fileCount=0; ppszFiles[ft->fileCount]; ft->fileCount++);
ft->files = (char **) mir_alloc(sizeof(char *) * ft->fileCount);
ft->filesSize = (long *) mir_alloc(sizeof(long) * ft->fileCount);
ft->allFileTotalSize = 0;
- for(i=j=0; i<ft->fileCount; i++) {
- if (_stat(ppszFiles[i], &statbuf))
- JabberLog(proto, "'%s' is an invalid filename", ppszFiles[i]);
+ for (i=j=0; i<ft->fileCount; i++) {
+ char* ppszFiles_i_A = mir_t2a(ppszFiles[i]);
+ if (_stat(ppszFiles_i_A, &statbuf))
+ JabberLog(this, "'%s' is an invalid filename", ppszFiles[i]);
else {
ft->filesSize[j] = statbuf.st_size;
- ft->files[j++] = mir_strdup(ppszFiles[i]);
+ ft->files[j++] = mir_strdup(ppszFiles_i_A);
ft->allFileTotalSize += statbuf.st_size;
}
+ mir_free(ppszFiles_i_A);
}
ft->fileCount = j;
- ft->szDescription = mir_strdup(szDescription);
+ ft->szDescription = mir_t2a(szDescription);
ft->hContact = hContact;
ft->currentFile = 0;
DBFreeVariant(&dbv);
- id = JabberSerialNext(proto);
+ id = JabberSerialNext(this);
_snprintf(idStr, sizeof(idStr), "%d", id);
- if ((item=JabberListAdd(proto, LIST_FILE, idStr)) != NULL) {
+ if ((item=JabberListAdd(this, LIST_FILE, idStr)) != NULL) {
ft->iqId = mir_strdup(idStr);
nick = JabberNickFromJID(ft->jid);
item->ft = ft;
- if (proto->tlenOptions.useNewP2P) {
- JabberSend(proto, "<iq to='%s'><query xmlns='p2p'><fs t='%s' e='1' i='%s' c='%d' s='%d' v='%d'/></query></iq>",
+ if (tlenOptions.useNewP2P) {
+ JabberSend(this, "<iq to='%s'><query xmlns='p2p'><fs t='%s' e='1' i='%s' c='%d' s='%d' v='%d'/></query></iq>",
ft->jid, ft->jid, idStr, ft->fileCount, ft->allFileTotalSize, ft->fileCount);
ft->newP2P = TRUE;
} else {
if (ft->fileCount == 1) {
- if ((p=strrchr(ppszFiles[0], '\\')) != NULL)
+ char* ppszFiles_0_A = mir_t2a(ppszFiles[0]);
+ if ((p=strrchr(ppszFiles_0_A, '\\')) != NULL) {
p++;
- else
- p = ppszFiles[0];
+ } else {
+ p = ppszFiles_0_A;
+ }
p = JabberTextEncode(p);
- JabberSend(proto, "<f t='%s' n='%s' e='1' i='%s' c='1' s='%d' v='1'/>", nick, p, idStr, ft->allFileTotalSize);
+ JabberSend(this, "<f t='%s' n='%s' e='1' i='%s' c='1' s='%d' v='1'/>", nick, p, idStr, ft->allFileTotalSize);
+ mir_free(ppszFiles[0]);
mir_free(p);
+ } else {
+ JabberSend(this, "<f t='%s' e='1' i='%s' c='%d' s='%d' v='1'/>", nick, idStr, ft->fileCount, ft->allFileTotalSize);
}
- else
- JabberSend(proto, "<f t='%s' e='1' i='%s' c='%d' s='%d' v='1'/>", nick, idStr, ft->fileCount, ft->allFileTotalSize);
}
mir_free(nick);
}
@@ -866,18 +883,27 @@ HANDLE TlenSendFile(PROTO_INTERFACE *ptr, HANDLE hContact, const char* szDescrip return (HANDLE) ft;
}
-int TlenRecvMessage(PROTO_INTERFACE *ptr, HANDLE hContact, PROTORECVEVENT* evt)
+int __cdecl TlenProtocol::SendContacts(HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList){
+ return 0;
+}
+
+int __cdecl TlenProtocol::SendUrl(HANDLE hContact, int flags, const char* urlt){
+ return 0;
+}
+
+int __cdecl TlenProtocol::RecvMsg(HANDLE hContact, PROTORECVEVENT* evt)
{
- CCSDATA ccs = { hContact, PSR_MESSAGE, 0, ( LPARAM )evt };
- return CallService( MS_PROTO_RECVMSG, 0, ( LPARAM )&ccs );
+ return Proto_RecvMessage(hContact, evt);
}
-int TlenRecvFile(PROTO_INTERFACE *ptr, HANDLE hContact, PROTORECVFILE* evt)
+int __cdecl TlenProtocol::RecvFile(HANDLE hContact, PROTOFILEEVENT* evt)
{
- CCSDATA ccs = { hContact, PSR_FILE, 0, ( LPARAM )evt };
- return CallService( MS_PROTO_RECVFILE, 0, ( LPARAM )&ccs );
+ return Proto_RecvFile(hContact, evt);
}
+int __cdecl TlenProtocol::RecvUrl(HANDLE hContact, PROTORECVEVENT*){
+ return 0;
+}
static char* settingToChar( DBCONTACTWRITESETTING* cws )
{
@@ -885,7 +911,7 @@ static char* settingToChar( DBCONTACTWRITESETTING* cws ) case DBVT_ASCIIZ:
return mir_strdup( cws->value.pszVal );
case DBVT_UTF8:
- return mir_utf8decode(mir_strdup(cws->value.pszVal), NULL);
+ return mir_utf8decode(mir_strdup(cws->value.pszVal), NULL);
}
return NULL;
}
@@ -893,7 +919,7 @@ static char* settingToChar( DBCONTACTWRITESETTING* cws ) int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- TlenProtocol *proto = (TlenProtocol *)ptr;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
// no action for hContact == NULL or when offline
if ((HANDLE) wParam == NULL) return 0;
if (!proto->isConnected) return 0;
@@ -906,17 +932,17 @@ int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam) hContact = (HANDLE) wParam;
szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if (szProto==NULL || strcmp(szProto, proto->iface.m_szModuleName)) return 0;
-// if (DBGetContactSettingByte(hContact, iface.m_szModuleName, "ChatRoom", 0) != 0) return 0;
+ if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
+// if (DBGetContactSettingByte(hContact, proto->m_szModuleName, "ChatRoom", 0) != 0) return 0;
// A contact's group is changed
if (!strcmp(cws->szSetting, "Group")) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
if ((item=JabberListGetItemPtr(proto, LIST_ROSTER, dbv.pszVal)) != NULL) {
DBFreeVariant(&dbv);
if (!DBGetContactSetting(hContact, "CList", "MyHandle", &dbv)) {
nick = JabberTextEncode(dbv.pszVal);
DBFreeVariant(&dbv);
- } else if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "Nick", &dbv)) {
+ } else if (!DBGetContactSetting(hContact, proto->m_szModuleName, "Nick", &dbv)) {
nick = JabberTextEncode(dbv.pszVal);
DBFreeVariant(&dbv);
} else {
@@ -924,12 +950,12 @@ int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam) }
if (nick != NULL) {
// Note: we need to compare with item->group to prevent infinite loop
- if (cws->value.type==DBVT_DELETED && item->group!=NULL) {
+ if (cws->value.type == DBVT_DELETED && item->group != NULL) {
JabberLog(proto, "Group set to nothing");
JabberSend(proto, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'></item></query></iq>", nick, item->jid);
} else if (cws->value.pszVal != NULL) {
char *newGroup = settingToChar(cws);
- if (item->group==NULL || strcmp(newGroup, item->group)) {
+ if (item->group == NULL || strcmp(newGroup, item->group)) {
JabberLog(proto, "Group set to %s", newGroup);
if ((group=TlenGroupEncode(newGroup)) != NULL) {
JabberSend(proto, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, item->jid, group);
@@ -952,23 +978,23 @@ int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam) // hContact = (HANDLE) wParam;
// szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
-// if (szProto==NULL || strcmp(szProto, iface.m_szModuleName)) return 0;
+// if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
jid = dbv.pszVal;
if ((item=JabberListGetItemPtr(proto, LIST_ROSTER, dbv.pszVal)) != NULL) {
if (cws->value.type == DBVT_DELETED) {
newNick = mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_NOMYHANDLE));
- } else if (cws->value.pszVal!=NULL) {
- newNick = settingToChar(cws);
+ } else if (cws->value.pszVal != NULL) {
+ newNick = settingToChar(cws);
} else {
newNick = NULL;
}
// Note: we need to compare with item->nick to prevent infinite loop
- if (newNick!=NULL && (item->nick==NULL || (item->nick!=NULL && strcmp(item->nick, newNick)))) {
+ if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && strcmp(item->nick, newNick)))) {
if ((nick=JabberTextEncode(newNick)) != NULL) {
JabberLog(proto, "Nick set to %s", newNick);
- if (item->group!=NULL && (group=TlenGroupEncode(item->group))!=NULL) {
+ if (item->group != NULL && (group=TlenGroupEncode(item->group)) != NULL) {
JabberSend(proto, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, jid, group);
mir_free(group);
} else {
@@ -987,7 +1013,7 @@ int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam) char *jid, *nick, *pGroup;
if (cws->value.type==DBVT_DELETED || (cws->value.type==DBVT_BYTE && cws->value.bVal==0)) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
jid = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
JabberLog(proto, "Add %s permanently to list", jid);
@@ -1028,14 +1054,14 @@ int JabberContactDeleted(void *ptr, WPARAM wParam, LPARAM lParam) {
char *szProto;
DBVARIANT dbv;
- TlenProtocol *proto = (TlenProtocol *)ptr;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
- if(!proto->isOnline) // should never happen
+ if (!proto->isOnline) // should never happen
return 0;
szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, wParam, 0);
- if (szProto==NULL || strcmp(szProto, proto->iface.m_szModuleName))
+ if (szProto == NULL || strcmp(szProto, proto->m_szModuleName))
return 0;
- if (!DBGetContactSetting((HANDLE) wParam, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (!DBGetContactSetting((HANDLE) wParam, proto->m_szModuleName, "jid", &dbv)) {
char *jid, *p, *q;
jid = dbv.pszVal;
@@ -1053,21 +1079,20 @@ int JabberContactDeleted(void *ptr, WPARAM wParam, LPARAM lParam) return 0;
}
-int TlenUserIsTyping(PROTO_INTERFACE *ptr, HANDLE hContact, int type)
+int __cdecl TlenProtocol::UserIsTyping(HANDLE hContact, int type)
{
DBVARIANT dbv;
JABBER_LIST_ITEM *item;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!proto->isOnline) return 0;
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
- if ((item=JabberListGetItemPtr(proto, LIST_ROSTER, dbv.pszVal))!=NULL /*&& item->wantComposingEvent==TRUE*/) {
+ if (!isOnline) return 0;
+ if (!DBGetContactSetting(hContact, m_szModuleName, "jid", &dbv)) {
+ if ((item=JabberListGetItemPtr(this, LIST_ROSTER, dbv.pszVal)) != NULL /*&& item->wantComposingEvent == TRUE*/) {
switch (type) {
case PROTOTYPE_SELFTYPING_OFF:
- JabberSend(proto, "<m tp='u' to='%s'/>", dbv.pszVal);
+ JabberSend(this, "<m tp='u' to='%s'/>", dbv.pszVal);
break;
case PROTOTYPE_SELFTYPING_ON:
- JabberSend(proto, "<m tp='t' to='%s'/>", dbv.pszVal);
+ JabberSend(this, "<m tp='t' to='%s'/>", dbv.pszVal);
break;
}
}
@@ -1076,16 +1101,17 @@ int TlenUserIsTyping(PROTO_INTERFACE *ptr, HANDLE hContact, int type) return 0;
}
-INT_PTR TlenGetMyAvatar(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenGetMyAvatar(void *ptr, LPARAM wParam, LPARAM lParam)
{
- char* buf = ( char* )wParam;
+ TCHAR* buf = (TCHAR*)wParam;
int size = ( int )lParam;
- TlenProtocol *proto = (TlenProtocol *)ptr;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
if ( buf == NULL || size <= 0 )
return -1;
TlenGetAvatarFileName( proto, NULL, buf, size );
+ //wParam (buf) is output var
return 0;
}
@@ -1118,20 +1144,21 @@ static INT_PTR CALLBACK TlenChangeAvatarDlgProc( HWND hwndDlg, UINT msg, WPARAM return 0;
}
-INT_PTR TlenSetMyAvatar(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenSetMyAvatar(void *ptr, LPARAM wParam, LPARAM lParam)
{
- char* szFileName = ( char* )lParam;
- char tFileName[ MAX_PATH ];
+ TCHAR* szFileName = ( TCHAR* )lParam;
+ TCHAR tFileName[ MAX_PATH ];
int fileIn;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if(!proto->isOnline) return 1;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ if (!proto->isOnline) return 1;
if (szFileName != NULL) {
int result = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_USER_CHANGEAVATAR), NULL, TlenChangeAvatarDlgProc, (LPARAM) NULL);
TlenGetAvatarFileName( proto, NULL, tFileName, MAX_PATH);
- if ( CopyFileA( szFileName, tFileName, FALSE ) == FALSE ) {
+ if ( CopyFile( szFileName, tFileName, FALSE ) == FALSE ) {
return 1;
}
- fileIn = open( tFileName, O_RDWR | O_BINARY, S_IREAD | S_IWRITE );
+ char* tFileNameA = mir_t2a(tFileName); //TODO - drop io.h
+ fileIn = open( tFileNameA, O_RDWR | O_BINARY, S_IREAD | S_IWRITE );
if ( fileIn != -1 ) {
long dwPngSize = filelength(fileIn);
BYTE* pResult = (BYTE *)mir_alloc(dwPngSize);
@@ -1142,15 +1169,17 @@ INT_PTR TlenSetMyAvatar(void *ptr, WPARAM wParam, LPARAM lParam) mir_free(pResult);
}
}
+ mir_free(tFileName);
+ mir_free(tFileNameA);
} else {
TlenRemoveAvatar(proto);
}
return 0;
}
-INT_PTR TlenGetAvatarCaps(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenGetAvatarCaps(void *ptr, LPARAM wParam, LPARAM lParam)
{
- TlenProtocol *proto = (TlenProtocol *)ptr;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
switch (wParam) {
case AF_MAXSIZE:
{
@@ -1158,7 +1187,7 @@ INT_PTR TlenGetAvatarCaps(void *ptr, WPARAM wParam, LPARAM lParam) if ( size )
size->x = size->y = 64;
}
- return 0;
+ return 0;
case AF_PROPORTION:
return PIP_SQUARE;
case AF_FORMATSUPPORTED:
@@ -1175,45 +1204,45 @@ INT_PTR TlenGetAvatarCaps(void *ptr, WPARAM wParam, LPARAM lParam) return 0;
}
-
-int TlenOnEvent( PROTO_INTERFACE *ptr, PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam )
+int __cdecl TlenProtocol::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam)
{
- TlenProtocol *proto = (TlenProtocol *)ptr;
- switch( eventType ) {
- case EV_PROTO_ONLOAD: return TlenOnModulesLoaded(proto, 0, 0 );
- case EV_PROTO_ONOPTIONS: return TlenOptionsInit(proto, wParam, lParam );
- case EV_PROTO_ONEXIT: return TlenPreShutdown(proto, 0, 0 );
+ //TlenProtocol *proto = (TlenProtocol *)ptr;
+ switch( iEventType ) {
+ case EV_PROTO_ONLOAD: return TlenOnModulesLoaded(this, 0, 0 );
+ case EV_PROTO_ONOPTIONS: return TlenOptionsInit(this, wParam, lParam );
+ case EV_PROTO_ONEXIT: return TlenPreShutdown(this, 0, 0 );
case EV_PROTO_ONRENAME:
{
CLISTMENUITEM clmi = { 0 };
clmi.cbSize = sizeof( CLISTMENUITEM );
clmi.flags = CMIM_NAME | CMIF_TCHAR;
- clmi.ptszName = proto->iface.m_tszUserName;
- CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )proto->hMenuRoot, ( LPARAM )&clmi );
+ clmi.ptszName = m_tszUserName;
+ CallService( MS_CLIST_MODIFYMENUITEM, ( WPARAM )hMenuRoot, ( LPARAM )&clmi );
/* FIXME: Rename network user as well */
- }
- }
+ }
+ }
return 1;
}
// PSS_ADDED
-int TlenAuthRecv(PROTO_INTERFACE *ptr, HANDLE hContact, PROTORECVEVENT* evt )
+int __cdecl TlenProtocol::AuthRecv(HANDLE hContact, PROTORECVEVENT* evt)
{
return 1;
}
// PSS_AUTHREQUEST
-int TlenAuthRequest(PROTO_INTERFACE *ptr, HANDLE hContact, const TCHAR* szMessage )
+int __cdecl TlenProtocol::AuthRequest(HANDLE hContact, const PROTOCHAR* szMessage)
{
return 1;
}
-HANDLE TlenChangeInfo(PROTO_INTERFACE *ptr, int iInfoType, void* pInfoData )
+HANDLE __cdecl TlenProtocol::ChangeInfo(int iInfoType, void* pInfoData)
{
return NULL;
}
-int TlenRecvContacts(PROTO_INTERFACE *ptr, HANDLE hContact, PROTORECVEVENT* evt)
+
+int __cdecl TlenProtocol::RecvContacts(HANDLE hContact, PROTORECVEVENT* evt)
{
return 1;
}
@@ -1221,79 +1250,115 @@ int TlenRecvContacts(PROTO_INTERFACE *ptr, HANDLE hContact, PROTORECVEVENT* ev extern INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-INT_PTR TlenAccMgrUI(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenAccMgrUI(void *ptr, LPARAM wParam, LPARAM lParam)
{
return (INT_PTR) CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ACCMGRUI), (HWND)lParam, TlenAccMgrUIDlgProc, (LPARAM) ptr);
}
void TlenInitServicesVTbl(TlenProtocol *proto) {
+
char s[128];
- proto->iface.vtbl = (PROTO_INTERFACE_VTBL*) mir_alloc(sizeof(PROTO_INTERFACE_VTBL));
- proto->iface.vtbl->AddToList = TlenAddToList;
- proto->iface.vtbl->AddToListByEvent = TlenAddToListByEvent;
- proto->iface.vtbl->AuthDeny = TlenAuthDeny;
- proto->iface.vtbl->AuthRecv = TlenAuthRecv;
- proto->iface.vtbl->AuthRequest = TlenAuthRequest;
- proto->iface.vtbl->Authorize = TlenAuthAllow;
- proto->iface.vtbl->ChangeInfo = TlenChangeInfo;
- proto->iface.vtbl->FileAllow = TlenFileAllow;
- proto->iface.vtbl->FileCancel = TlenFileCancel;
- proto->iface.vtbl->FileDeny = TlenFileDeny;
- proto->iface.vtbl->FileResume = NULL;
- proto->iface.vtbl->SearchBasic = TlenBasicSearch;
- proto->iface.vtbl->SearchByEmail = TlenSearchByEmail;
- proto->iface.vtbl->SearchByName = TlenSearchByName;
- proto->iface.vtbl->SearchAdvanced = TlenSearchAdvanced;
- proto->iface.vtbl->CreateExtendedSearchUI = TlenCreateAdvSearchUI;
-
- proto->iface.vtbl->RecvContacts = TlenRecvContacts;
- proto->iface.vtbl->RecvFile = TlenRecvFile;
- proto->iface.vtbl->RecvMsg = TlenRecvMessage;
- proto->iface.vtbl->RecvUrl = NULL;
-
- proto->iface.vtbl->SendContacts = NULL;
- proto->iface.vtbl->SendFile = TlenSendFile;
- proto->iface.vtbl->SendMsg = TlenSendMessage;
- proto->iface.vtbl->SendUrl = NULL;
-
- proto->iface.vtbl->GetCaps = TlenGetCaps;
- proto->iface.vtbl->GetIcon = TlenGetIcon;
- proto->iface.vtbl->GetInfo = JabberGetInfo;
- proto->iface.vtbl->SetApparentMode = TlenSetApparentMode;
- proto->iface.vtbl->SetStatus = TlenSetStatus;
-
-
- proto->iface.vtbl->GetAwayMsg = TlenGetAwayMsg;
- proto->iface.vtbl->RecvAwayMsg = NULL;
- proto->iface.vtbl->SendAwayMsg = NULL;
- proto->iface.vtbl->SetAwayMsg = TlenSetAwayMsg;
-
- proto->iface.vtbl->UserIsTyping = TlenUserIsTyping;
-
- proto->iface.vtbl->OnEvent = TlenOnEvent;
-
- sprintf(s, "%s%s", proto->iface.m_szModuleName, PS_GETNAME);
+
+ sprintf(s, "%s%s", proto->m_szModuleName, PS_GETNAME);
CreateServiceFunction_Ex(s, proto, TlenGetName);
- sprintf(s, "%s%s", proto->iface.m_szModuleName, PS_GETAVATARINFO);
+ sprintf(s, "%s%s", proto->m_szModuleName, PS_GETAVATARINFO);
CreateServiceFunction_Ex(s, proto, TlenGetAvatarInfo);
- sprintf(s, "%s%s", proto->iface.m_szModuleName, "/SendNudge");
+ sprintf(s, "%s%s", proto->m_szModuleName, "/SendNudge");
CreateServiceFunction_Ex(s, proto, TlenSendAlert);
- sprintf(s, "%s%s", proto->iface.m_szModuleName, PS_GETAVATARCAPS);
+ sprintf(s, "%s%s", proto->m_szModuleName, PS_GETAVATARCAPS);
CreateServiceFunction_Ex(s, proto, TlenGetAvatarCaps);
- sprintf(s, "%s%s", proto->iface.m_szModuleName, PS_SETMYAVATAR);
+ sprintf(s, "%s%s", proto->m_szModuleName, PS_SETMYAVATART);
CreateServiceFunction_Ex(s, proto, TlenSetMyAvatar);
- sprintf(s, "%s%s", proto->iface.m_szModuleName, PS_GETMYAVATAR);
+ sprintf(s, "%s%s", proto->m_szModuleName, PS_GETMYAVATART);
CreateServiceFunction_Ex(s, proto, TlenGetMyAvatar);
- sprintf(s, "%s%s", proto->iface.m_szModuleName, PS_GETSTATUS);
+ sprintf(s, "%s%s", proto->m_szModuleName, PS_GETSTATUS);
CreateServiceFunction_Ex(s, proto, TlenGetStatus);
- sprintf(s, "%s%s", proto->iface.m_szModuleName, PS_CREATEACCMGRUI);
+ sprintf(s, "%s%s", proto->m_szModuleName, PS_CREATEACCMGRUI);
CreateServiceFunction_Ex(s, proto, TlenAccMgrUI);
}
+
+TlenProtocol::TlenProtocol( const char* aProtoName, const TCHAR* aUserName )
+{
+
+ m_iVersion = 2;
+ m_tszUserName = mir_tstrdup(aUserName);
+ m_szModuleName = mir_strdup(aProtoName);
+ m_szProtoName = mir_strdup(aProtoName);
+ _strlwr( m_szProtoName );
+ m_szProtoName[0] = toupper( m_szProtoName[0] );
+ m_iStatus = ID_STATUS_OFFLINE;
+
+ TlenInitServicesVTbl(this);
+
+ InitializeCriticalSection(&modeMsgMutex);
+ InitializeCriticalSection(&csSend);
+
+ char text[_MAX_PATH];
+ sprintf(text, "%s/%s", m_szModuleName, "Nudge");
+ hTlenNudge = CreateHookableEvent(text);
+
+ HookEventObj_Ex(ME_SYSTEM_MODULESLOADED, this, TlenSystemModulesLoaded);
+ HookEventObj_Ex(ME_OPT_INITIALISE, this, TlenOptionsInit);
+ HookEventObj_Ex(ME_DB_CONTACT_SETTINGCHANGED, this, JabberDbSettingChanged);
+ HookEventObj_Ex(ME_DB_CONTACT_DELETED, this, JabberContactDeleted);
+ HookEventObj_Ex(ME_CLIST_PREBUILDCONTACTMENU, this, TlenPrebuildContactMenu);
+// HookEventObj_Ex(ME_SKIN2_ICONSCHANGED, this, TlenIconsChanged);
+ HookEventObj_Ex(ME_SYSTEM_PRESHUTDOWN, this, TlenPreShutdown);
+
+
+ DBVARIANT dbv;
+ if (!DBGetContactSetting(NULL, m_szModuleName, "LoginServer", &dbv)) {
+ DBFreeVariant(&dbv);
+ } else {
+ DBWriteContactSettingString(NULL, m_szModuleName, "LoginServer", "tlen.pl");
+ }
+ if (!DBGetContactSetting(NULL, m_szModuleName, "ManualHost", &dbv)) {
+ DBFreeVariant(&dbv);
+ } else {
+ DBWriteContactSettingString(NULL, m_szModuleName, "ManualHost", "s1.tlen.pl");
+ }
+
+ TlenLoadOptions(this);
+
+ JabberWsInit(this);
+ JabberSerialInit(this);
+ JabberIqInit(this);
+ JabberListInit(this);
+
+}
+
+TlenProtocol::~TlenProtocol()
+{
+
+ uninitMenuItems(this);
+ TlenVoiceCancelAll(this);
+ TlenFileCancelAll(this);
+ if (hTlenNudge)
+ DestroyHookableEvent(hTlenNudge);
+ UnhookEvents_Ex(this);
+ JabberListUninit(this);
+ JabberIqUninit(this);
+ JabberSerialUninit(this);
+ DeleteCriticalSection(&modeMsgMutex);
+ DeleteCriticalSection(&csSend);
+ //DestroyServices_Ex(this);
+ JabberWsUninit(this);
+
+ mir_free(modeMsgs.szOnline);
+ mir_free(modeMsgs.szAway);
+ mir_free(modeMsgs.szNa);
+ mir_free(modeMsgs.szDnd);
+ mir_free(modeMsgs.szFreechat);
+ mir_free(modeMsgs.szInvisible);
+
+}
+
+
diff --git a/plugins/!NotAdopted/Tlen/jabber_thread.c b/protocols/Tlen/src/jabber_thread.cpp index fc76c893cf..b9fe951ee1 100644 --- a/plugins/!NotAdopted/Tlen/jabber_thread.c +++ b/protocols/Tlen/src/jabber_thread.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -38,7 +38,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <sys/types.h>
#include <sys/stat.h>
-extern void TlenProcessP2P(XmlNode *node, void *userdata);
+
+extern void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info);
+
//static void __cdecl TlenProcessInvitation(struct ThreadData *info);
static void __cdecl JabberKeepAliveThread(void *ptr);
@@ -113,7 +115,7 @@ void __cdecl JabberServerThread(ThreadData *info) int reconnectTime;
char *str;
CLISTMENUITEM clmi;
- int loginErr = 0;
+ int loginErr = 0;
JabberLog(info->proto, "Thread started");
@@ -131,90 +133,90 @@ void __cdecl JabberServerThread(ThreadData *info) return;
}
- info->proto->threadData = info;
+ info->proto->threadData = info;
- if (!DBGetContactSetting(NULL, info->proto->iface.m_szModuleName, "LoginName", &dbv)) {
+ if (!DBGetContactSetting(NULL, info->proto->m_szModuleName, "LoginName", &dbv)) {
strncpy(info->username, dbv.pszVal, sizeof(info->username));
info->username[sizeof(info->username)-1] = '\0';
_strlwr(info->username);
- DBWriteContactSettingString(NULL, info->proto->iface.m_szModuleName, "LoginName", info->username);
+ DBWriteContactSettingString(NULL, info->proto->m_szModuleName, "LoginName", info->username);
DBFreeVariant(&dbv);
} else {
JabberLog(info->proto, "Thread ended, login name is not configured");
- loginErr = LOGINERR_BADUSERID;
- }
-
- if (loginErr == 0) {
- if (!DBGetContactSetting(NULL, info->proto->iface.m_szModuleName, "LoginServer", &dbv)) {
- strncpy(info->server, dbv.pszVal, sizeof(info->server));
- info->server[sizeof(info->server)-1] = '\0';
- _strlwr(info->server);
- DBWriteContactSettingString(NULL, info->proto->iface.m_szModuleName, "LoginServer", info->server);
- DBFreeVariant(&dbv);
- } else {
- JabberLog(info->proto, "Thread ended, login server is not configured");
- loginErr = LOGINERR_NONETWORK;
- }
- }
-
- if (loginErr == 0) {
- if (!info->proto->tlenOptions.savePassword) {
- // Ugly hack: continue logging on only the return value is &(onlinePassword[0])
- // because if WM_QUIT while dialog box is still visible, p is returned with some
- // exit code which may not be NULL.
- // Should be better with modeless.
- onlinePassword[0] = (char) -1;
- hEventPasswdDlg = CreateEvent(NULL, FALSE, FALSE, NULL);
- QueueUserAPC(JabberPasswordCreateDialogApcProc, hMainThread, (DWORD) jidStr);
- WaitForSingleObject(hEventPasswdDlg, INFINITE);
- CloseHandle(hEventPasswdDlg);
- //if ((p=(char *)DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_PASSWORD), NULL, JabberPasswordDlgProc, (LPARAM) jidStr)) != onlinePassword) {
- if (onlinePassword[0] != (char) -1) {
- strncpy(info->password, onlinePassword, sizeof(info->password));
- info->password[sizeof(info->password)-1] = '\0';
- } else {
- JabberLog(info->proto, "Thread ended, password request dialog was canceled");
- loginErr = LOGINERR_BADUSERID;
- }
- } else {
- if (!DBGetContactSetting(NULL, info->proto->iface.m_szModuleName, "Password", &dbv)) {
- CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM) dbv.pszVal);
- strncpy(info->password, dbv.pszVal, sizeof(info->password));
- info->password[sizeof(info->password)-1] = '\0';
- DBFreeVariant(&dbv);
- } else {
- JabberLog(info->proto, "Thread ended, password is not configured");
- loginErr = LOGINERR_BADUSERID;
- }
- }
- }
-
- jabberNetworkBufferSize = 2048;
+ loginErr = LOGINERR_BADUSERID;
+ }
+
+ if (loginErr == 0) {
+ if (!DBGetContactSetting(NULL, info->proto->m_szModuleName, "LoginServer", &dbv)) {
+ strncpy(info->server, dbv.pszVal, sizeof(info->server));
+ info->server[sizeof(info->server)-1] = '\0';
+ _strlwr(info->server);
+ DBWriteContactSettingString(NULL, info->proto->m_szModuleName, "LoginServer", info->server);
+ DBFreeVariant(&dbv);
+ } else {
+ JabberLog(info->proto, "Thread ended, login server is not configured");
+ loginErr = LOGINERR_NONETWORK;
+ }
+ }
+
+ if (loginErr == 0) {
+ if (!info->proto->tlenOptions.savePassword) {
+ // Ugly hack: continue logging on only the return value is &(onlinePassword[0])
+ // because if WM_QUIT while dialog box is still visible, p is returned with some
+ // exit code which may not be NULL.
+ // Should be better with modeless.
+ onlinePassword[0] = (char) -1;
+ hEventPasswdDlg = CreateEvent(NULL, FALSE, FALSE, NULL);
+ QueueUserAPC(JabberPasswordCreateDialogApcProc, hMainThread, (DWORD) jidStr);
+ WaitForSingleObject(hEventPasswdDlg, INFINITE);
+ CloseHandle(hEventPasswdDlg);
+ //if ((p=(char *)DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_PASSWORD), NULL, JabberPasswordDlgProc, (LPARAM) jidStr)) != onlinePassword) {
+ if (onlinePassword[0] != (char) -1) {
+ strncpy(info->password, onlinePassword, sizeof(info->password));
+ info->password[sizeof(info->password)-1] = '\0';
+ } else {
+ JabberLog(info->proto, "Thread ended, password request dialog was canceled");
+ loginErr = LOGINERR_BADUSERID;
+ }
+ } else {
+ if (!DBGetContactSetting(NULL, info->proto->m_szModuleName, "Password", &dbv)) {
+ CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM) dbv.pszVal);
+ strncpy(info->password, dbv.pszVal, sizeof(info->password));
+ info->password[sizeof(info->password)-1] = '\0';
+ DBFreeVariant(&dbv);
+ } else {
+ JabberLog(info->proto, "Thread ended, password is not configured");
+ loginErr = LOGINERR_BADUSERID;
+ }
+ }
+ }
+
+ jabberNetworkBufferSize = 2048;
if ((buffer=(char *) mir_alloc(jabberNetworkBufferSize+1)) == NULL) { // +1 is for '\0' when debug logging this buffer
JabberLog(info->proto, "Thread ended, network buffer cannot be allocated");
- loginErr = LOGINERR_NONETWORK;
- }
-
- if (loginErr != 0) {
- info->proto->threadData = NULL;
- oldStatus = info->proto->iface.m_iStatus;
- info->proto->iface.m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->iface.m_iStatus);
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, loginErr);
+ loginErr = LOGINERR_NONETWORK;
+ }
+
+ if (loginErr != 0) {
+ info->proto->threadData = NULL;
+ oldStatus = info->proto->m_iStatus;
+ info->proto->m_iStatus = ID_STATUS_OFFLINE;
+ ProtoBroadcastAck(info->proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->m_iStatus);
+ ProtoBroadcastAck(info->proto->m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, loginErr);
mir_free(info);
return;
}
_snprintf(jidStr, sizeof(jidStr), "%s@%s", info->username, info->server);
- DBWriteContactSettingString(NULL, info->proto->iface.m_szModuleName, "jid", jidStr);
+ DBWriteContactSettingString(NULL, info->proto->m_szModuleName, "jid", jidStr);
- if (!DBGetContactSetting(NULL, info->proto->iface.m_szModuleName, "ManualHost", &dbv)) {
+ if (!DBGetContactSetting(NULL, info->proto->m_szModuleName, "ManualHost", &dbv)) {
strncpy(info->manualHost, dbv.pszVal, sizeof(info->manualHost));
info->manualHost[sizeof(info->manualHost)-1] = '\0';
DBFreeVariant(&dbv);
}
- info->port = DBGetContactSettingWord(NULL, info->proto->iface.m_szModuleName, "ManualPort", TLEN_DEFAULT_PORT);
+ info->port = DBGetContactSettingWord(NULL, info->proto->m_szModuleName, "ManualPort", TLEN_DEFAULT_PORT);
info->useEncryption = info->proto->tlenOptions.useEncryption;
if (info->manualHost[0])
@@ -225,11 +227,11 @@ void __cdecl JabberServerThread(ThreadData *info) JabberLog(info->proto, "Thread server='%s' port='%d'", connectHost, info->port);
- if (!DBGetContactSetting(NULL, info->proto->iface.m_szModuleName, "AvatarHash", &dbv)) {
+ if (!DBGetContactSetting(NULL, info->proto->m_szModuleName, "AvatarHash", &dbv)) {
strcpy(info->proto->threadData->avatarHash, dbv.pszVal);
DBFreeVariant(&dbv);
}
- info->avatarFormat = DBGetContactSettingDword(NULL, info->proto->iface.m_szModuleName, "AvatarFormat", PA_FORMAT_UNKNOWN);
+ info->avatarFormat = DBGetContactSettingDword(NULL, info->proto->m_szModuleName, "AvatarFormat", PA_FORMAT_UNKNOWN);
reconnectMaxTime = 10;
@@ -241,10 +243,10 @@ void __cdecl JabberServerThread(ThreadData *info) if (info->s == NULL) {
JabberLog(info->proto, "Connection failed (%d)", WSAGetLastError());
if (info->proto->threadData == info) {
- oldStatus = info->proto->iface.m_iStatus;
- info->proto->iface.m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NONETWORK);
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->iface.m_iStatus);
+ oldStatus = info->proto->m_iStatus;
+ info->proto->m_iStatus = ID_STATUS_OFFLINE;
+ ProtoBroadcastAck(info->proto->m_szModuleName, NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NONETWORK);
+ ProtoBroadcastAck(info->proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->m_iStatus);
if (info->proto->tlenOptions.reconnect == TRUE) {
reconnectTime = rand() % reconnectMaxTime;
JabberLog(info->proto, "Sleeping %d seconds before automatic reconnecting...", reconnectTime);
@@ -255,9 +257,9 @@ void __cdecl JabberServerThread(ThreadData *info) JabberLog(info->proto, "Reconnecting to the network...");
if (numRetry < MAX_CONNECT_RETRIES)
numRetry++;
- oldStatus = info->proto->iface.m_iStatus;
- info->proto->iface.m_iStatus = ID_STATUS_CONNECTING + numRetry;
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->iface.m_iStatus);
+ oldStatus = info->proto->m_iStatus;
+ info->proto->m_iStatus = ID_STATUS_CONNECTING + numRetry;
+ ProtoBroadcastAck(info->proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->m_iStatus);
continue;
}
else {
@@ -267,7 +269,7 @@ void __cdecl JabberServerThread(ThreadData *info) return;
}
}
- info->proto->threadData = NULL;
+ info->proto->threadData = NULL;
}
JabberLog(info->proto, "Thread ended, connection failed");
mir_free(buffer);
@@ -288,15 +290,15 @@ void __cdecl JabberServerThread(ThreadData *info) */
// User may change status to OFFLINE while we are connecting above
- if (info->proto->iface.m_iDesiredStatus!=ID_STATUS_OFFLINE) {
+ if (info->proto->m_iDesiredStatus != ID_STATUS_OFFLINE) {
info->proto->isConnected = TRUE;
JabberForkThread(JabberKeepAliveThread, 0, info->proto);
JabberXmlInitState(&xmlState);
- JabberXmlSetCallback(&xmlState, 1, ELEM_OPEN, JabberProcessStreamOpening, info);
- JabberXmlSetCallback(&xmlState, 1, ELEM_CLOSE, JabberProcessStreamClosing, info);
- JabberXmlSetCallback(&xmlState, 2, ELEM_CLOSE, JabberProcessProtocol, info);
+ JabberXmlSetCallback(&xmlState, 1, ELEM_OPEN, (void (__cdecl *)(XmlNode *,void *))JabberProcessStreamOpening, info);
+ JabberXmlSetCallback(&xmlState, 1, ELEM_CLOSE, (void (__cdecl *)(XmlNode *,void *))JabberProcessStreamClosing, info);
+ JabberXmlSetCallback(&xmlState, 2, ELEM_CLOSE, (void (__cdecl *)(XmlNode *,void *))JabberProcessProtocol, info);
info->useAES = FALSE;
@@ -360,33 +362,33 @@ void __cdecl JabberServerThread(ThreadData *info) }
// Set status to offline
- oldStatus = info->proto->iface.m_iStatus;
- info->proto->iface.m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->iface.m_iStatus);
+ oldStatus = info->proto->m_iStatus;
+ info->proto->m_iStatus = ID_STATUS_OFFLINE;
+ ProtoBroadcastAck(info->proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->m_iStatus);
// Set all contacts to offline
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact != NULL) {
str = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if(str!=NULL && !strcmp(str, info->proto->iface.m_szModuleName)) {
- if (DBGetContactSettingWord(hContact, info->proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
- DBWriteContactSettingWord(hContact, info->proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE);
+ if (str != NULL && !strcmp(str, info->proto->m_szModuleName)) {
+ if (DBGetContactSettingWord(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
+ DBWriteContactSettingWord(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
JabberListWipeSpecial(info->proto);
}
else {
- oldStatus = info->proto->iface.m_iStatus;
- info->proto->iface.m_iStatus = ID_STATUS_OFFLINE;
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->iface.m_iStatus);
+ oldStatus = info->proto->m_iStatus;
+ info->proto->m_iStatus = ID_STATUS_OFFLINE;
+ ProtoBroadcastAck(info->proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->m_iStatus);
}
Netlib_CloseHandle(info->s);
- if (info->proto->tlenOptions.reconnect==FALSE)
+ if (info->proto->tlenOptions.reconnect == FALSE)
break;
if (info->proto->threadData != info) // Make sure this is still the main Jabber connection thread
@@ -398,21 +400,21 @@ void __cdecl JabberServerThread(ThreadData *info) if (info->proto->threadData != info) // Make sure this is still the main Jabber connection thread
break;
JabberLog(info->proto, "Reconnecting to the network...");
- info->proto->iface.m_iDesiredStatus = oldStatus; // Reconnect to my last status
- oldStatus = info->proto->iface.m_iStatus;
- info->proto->iface.m_iStatus = ID_STATUS_CONNECTING;
+ info->proto->m_iDesiredStatus = oldStatus; // Reconnect to my last status
+ oldStatus = info->proto->m_iStatus;
+ info->proto->m_iStatus = ID_STATUS_CONNECTING;
numRetry = 1;
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->iface.m_iStatus);
+ ProtoBroadcastAck(info->proto->m_szModuleName, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->m_iStatus);
}
JabberLog(info->proto, "Thread ended: server='%s'", info->server);
- if (info->proto->threadData==info) {
- info->proto->threadData = NULL;
+ if (info->proto->threadData == info) {
+ info->proto->threadData = NULL;
}
mir_free(buffer);
- if (info->streamId) mir_free(info->streamId);
+ if (info->streamId) mir_free(info->streamId);
JabberLog(info->proto, "Exiting ServerThread");
mir_free(info);
}
@@ -439,7 +441,7 @@ static void JabberProcessStreamOpening(XmlNode *node, ThreadData *info) {
char *sid, *s;
- if (node->name==NULL || strcmp(node->name, "s"))
+ if (node->name == NULL || strcmp(node->name, "s"))
return;
if ((sid=JabberXmlGetAttrValue(node, "i")) != NULL) {
@@ -478,7 +480,7 @@ static void JabberProcessStreamOpening(XmlNode *node, ThreadData *info) memset(&k1_mpi, 0, sizeof (mpi));
mpi_read_string( &k1_mpi, 16, k1 );
memset(&k2_mpi, 0, sizeof (mpi));
- mpi_read_string( &k2_mpi, 16, k2 );
+ mpi_read_string( &k2_mpi, 16, k2 );
memset(&aes_mpi, 0, sizeof (mpi));
mpi_read_binary(&aes_mpi, (unsigned char *)aes_key, 16);
mpi_exp_mod( &aes_mpi, &aes_mpi, &k1_mpi, &k2_mpi, NULL );
@@ -543,7 +545,7 @@ static void TlenProcessIqGetVersion(TlenProtocol *proto, XmlNode* node) char* os = NULL;
JABBER_LIST_ITEM *item;
- if (proto->iface.m_iStatus == ID_STATUS_INVISIBLE) return;
+ if (proto->m_iStatus == ID_STATUS_INVISIBLE) return;
if (!proto->tlenOptions.enableVersion) return;
if (( from=JabberXmlGetAttrValue( node, "from" )) == NULL ) return;
if (( item=JabberListGetItemPtr( proto, LIST_ROSTER, from )) ==NULL) return;
@@ -620,11 +622,11 @@ static void JabberProcessMessage(XmlNode *node, ThreadData *info) if (!node->name || strcmp(node->name, "message")) return;
- if ((type=JabberXmlGetAttrValue(node, "type"))!=NULL && !strcmp(type, "error")) {
+ if ((type=JabberXmlGetAttrValue(node, "type")) != NULL && !strcmp(type, "error")) {
}
else {
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- char *fromJid = JabberLoginFromJID(from);
+ char *fromJid = JabberLoginFromJID(from);
if (info->proto->tlenOptions.ignoreAdvertisements && strstr(from, "b73@tlen.pl") == from) {
return;
}
@@ -632,11 +634,11 @@ static void JabberProcessMessage(XmlNode *node, ThreadData *info) item = JabberListGetItemPtr(info->proto, LIST_ROSTER, fromJid);
isChatRoomJid = JabberListExist(info->proto, LIST_CHATROOM, from);
- if (isChatRoomJid && type!=NULL && !strcmp(type, "groupchat")) {
+ if (isChatRoomJid && type != NULL && !strcmp(type, "groupchat")) {
//JabberGroupchatProcessMessage(node, userdata);
- } else if (type!=NULL && !strcmp(type, "pic")) {
- TlenProcessPic(node, info->proto);
- } else if (type!=NULL && !strcmp(type, "iq")) {
+ } else if (type != NULL && !strcmp(type, "pic")) {
+ TlenProcessPic(node, info->proto);
+ } else if (type != NULL && !strcmp(type, "iq")) {
XmlNode *iqNode;
// Jabber-compatible iq
if ((iqNode=JabberXmlGetChild(node, "iq")) != NULL) {
@@ -646,7 +648,7 @@ static void JabberProcessMessage(XmlNode *node, ThreadData *info) } else {
if ((bodyNode=JabberXmlGetChild(node, "body")) != NULL) {
if (bodyNode->text != NULL) {
- if ((subjectNode=JabberXmlGetChild(node, "subject"))!=NULL && subjectNode->text!=NULL && subjectNode->text[0]!='\0') {
+ if ((subjectNode=JabberXmlGetChild(node, "subject")) != NULL && subjectNode->text != NULL && subjectNode->text[0] != '\0') {
p = (char *) mir_alloc(strlen(subjectNode->text)+strlen(bodyNode->text)+5);
sprintf(p, "%s\r\n%s", subjectNode->text, bodyNode->text);
localMessage = JabberTextDecode(p);
@@ -667,17 +669,17 @@ static void JabberProcessMessage(XmlNode *node, ThreadData *info) }
else if (!strcmp(p, "jabber:x:event")) {
// Check whether any event is requested
- if (!delivered && (n=JabberXmlGetChild(xNode, "delivered"))!=NULL) {
+ if (!delivered && (n=JabberXmlGetChild(xNode, "delivered")) != NULL) {
delivered = TRUE;
idStr = JabberXmlGetAttrValue(node, "id");
- JabberSend(info->proto, "<message to='%s'><x xmlns='jabber:x:event'><delivered/><id>%s</id></x></message>", from, (idStr!=NULL)?idStr:"");
+ JabberSend(info->proto, "<message to='%s'><x xmlns='jabber:x:event'><delivered/><id>%s</id></x></message>", from, (idStr != NULL)?idStr:"");
}
- if (item!=NULL && JabberXmlGetChild(xNode, "composing")!=NULL) {
+ if (item != NULL && JabberXmlGetChild(xNode, "composing") != NULL) {
composing = TRUE;
if (item->messageEventIdStr)
mir_free(item->messageEventIdStr);
idStr = JabberXmlGetAttrValue(node, "id");
- item->messageEventIdStr = (idStr==NULL)?NULL:mir_strdup(idStr);
+ item->messageEventIdStr = (idStr == NULL)?NULL:mir_strdup(idStr);
}
}
}
@@ -696,7 +698,7 @@ static void JabberProcessMessage(XmlNode *node, ThreadData *info) if ((hContact=JabberHContactFromJID(info->proto, fromJid)) == NULL) {
// Create a temporary contact
if (isChatRoomJid) {
- if ((p=strchr(from, '/'))!=NULL && p[1]!='\0')
+ if ((p=strchr(from, '/')) != NULL && p[1]!='\0')
p++;
else
p = from;
@@ -740,7 +742,7 @@ static void JabberProcessMessage(XmlNode *node, ThreadData *info) }
}
}
- mir_free(fromJid);
+ mir_free(fromJid);
}
}
}
@@ -788,7 +790,7 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info) }
}
// RECVED: <iq type='set'><query ...
- else if (!strcmp(type, "set") && queryNode!=NULL && xmlns!=NULL) {
+ else if (!strcmp(type, "set") && queryNode != NULL && xmlns != NULL) {
// RECVED: roster push
// ACTION: similar to iqIdGetRoster above
@@ -821,7 +823,7 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info) }
DBWriteContactSettingString(hContact, "CList", "MyHandle", nick);
if (item->group) mir_free(item->group);
- if ((groupNode=JabberXmlGetChild(itemNode, "group"))!=NULL && groupNode->text!=NULL) {
+ if ((groupNode=JabberXmlGetChild(itemNode, "group")) != NULL && groupNode->text != NULL) {
item->group = TlenGroupDecode(groupNode->text);
JabberContactListCreateGroup(item->group);
DBWriteContactSettingString(hContact, "CList", "Group", item->group);
@@ -830,9 +832,9 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info) item->group = NULL;
DBDeleteContactSetting(hContact, "CList", "Group");
}
- if (!strcmp(str, "none") || (!strcmp(str, "from") && strchr(jid, '@')!=NULL)) {
- if (DBGetContactSettingWord(hContact, info->proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
- DBWriteContactSettingWord(hContact, info->proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE);
+ if (!strcmp(str, "none") || (!strcmp(str, "from") && strchr(jid, '@') != NULL)) {
+ if (DBGetContactSettingWord(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ DBWriteContactSettingWord(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
}
}
else {
@@ -851,8 +853,8 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info) // remove, so that history will be retained.
if (!strcmp(str, "remove")) {
if ((hContact=JabberHContactFromJID(info->proto, jid)) != NULL) {
- if (DBGetContactSettingWord(hContact, info->proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
- DBWriteContactSettingWord(hContact, info->proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE);
+ if (DBGetContactSettingWord(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ DBWriteContactSettingWord(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
JabberListRemove(info->proto, LIST_ROSTER, jid);
}
}
@@ -865,14 +867,14 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info) }
// RECVED: <iq type='get'><query ...
- else if ( !strcmp( type, "get" ) && queryNode!=NULL && xmlns!=NULL ) {
+ else if ( !strcmp( type, "get" ) && queryNode != NULL && xmlns != NULL ) {
// RECVED: software version query
// ACTION: return my software version
if ( !strcmp( xmlns, "jabber:iq:version" )) TlenProcessIqGetVersion(info->proto, node);
}
// RECVED: <iq type='result'><query ...
- else if ( !strcmp( type, "result") && queryNode!=NULL) {
- if (xmlns!=NULL ) {
+ else if ( !strcmp( type, "result") && queryNode != NULL) {
+ if (xmlns != NULL ) {
if ( !strcmp(xmlns, "jabber:iq:roster" )) {
JabberIqResultRoster(info->proto, node);
} else if ( !strcmp( xmlns, "jabber:iq:version" )) {
@@ -895,7 +897,7 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info) // Check for multi-user chat errors
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strstr(from, "@c")!=NULL || !strcmp(from, "c")) {
+ if (strstr(from, "@c") != NULL || !strcmp(from, "c")) {
TlenMUCRecvError(info->proto, from, node);
return;
}
@@ -917,7 +919,7 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info) else if (!strcmp(type, "1")) { // Chat groups list result
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c")==0) {
+ if (strcmp(from, "c") == 0) {
TlenIqResultChatGroups(info->proto, node);
}
}
@@ -925,49 +927,49 @@ static void JabberProcessIq(XmlNode *node, ThreadData *info) else if (!strcmp(type, "2")) { // Chat rooms list result
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c")==0) {
+ if (strcmp(from, "c") == 0) {
TlenIqResultChatRooms(info->proto, node);
}
}
} else if (!strcmp(type, "3")) { // room search result - result to iq type 3 query
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c")==0) {
+ if (strcmp(from, "c") == 0) {
TlenIqResultRoomSearch(info->proto, node);
}
}
} else if (!strcmp(type, "4")) { // chat room users list
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strstr(from, "@c")!=NULL) {
+ if (strstr(from, "@c") != NULL) {
TlenIqResultChatRoomUsers(info->proto, node);
}
}
} else if (!strcmp(type, "5")) { // room name & group & flags info - sent on joining the room
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strstr(from, "@c")!=NULL) {
+ if (strstr(from, "@c") != NULL) {
TlenIqResultRoomInfo(info->proto, node);
}
}
} else if (!strcmp(type, "6")) { // new nick registered
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c")==0) {
+ if (strcmp(from, "c") == 0) {
TlenIqResultUserNicks(info->proto, node);
}
}
} else if (!strcmp(type, "7")) { // user nicknames list
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c")==0) {
+ if (strcmp(from, "c") == 0) {
TlenIqResultUserNicks(info->proto, node);
}
}
} else if (!strcmp(type, "8")) { // user chat rooms list
char *from;
if ((from=JabberXmlGetAttrValue(node, "from")) != NULL) {
- if (strcmp(from, "c")==0) {
+ if (strcmp(from, "c") == 0) {
TlenIqResultUserRooms(info->proto, node);
}
}
@@ -992,7 +994,7 @@ static void TlenProcessW(XmlNode *node, ThreadData *info) if ((f=JabberXmlGetAttrValue(node, "f")) != NULL) {
char webContactName[128];
- sprintf(webContactName, Translate("%s Web Messages"), info->proto->iface.m_szProtoName);
+ sprintf(webContactName, Translate("%s Web Messages"), info->proto->m_szProtoName);
if ((hContact=JabberHContactFromJID(info->proto, webContactName)) == NULL) {
hContact = JabberDBCreateContact(info->proto, webContactName, webContactName, TRUE);
}
@@ -1049,19 +1051,19 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) if ((hContact=JabberHContactFromJID(info->proto, fLogin)) != NULL) {
if ((tp=JabberXmlGetAttrValue(node, "tp")) != NULL) {
JABBER_LIST_ITEM *item = JabberListGetItemPtr(info->proto, LIST_ROSTER, fLogin);
- if(!strcmp(tp, "t")) { //contact is writing
- if (item!=NULL ) {
+ if (!strcmp(tp, "t")) { //contact is writing
+ if (item != NULL ) {
item->isTyping = TRUE;
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_INFINITE);
}
}
- else if(!strcmp(tp, "u")) {//contact stopped writing
- if (item!=NULL) {
+ else if (!strcmp(tp, "u")) {//contact stopped writing
+ if (item != NULL) {
item->isTyping = FALSE;
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
}
}
- else if(!strcmp(tp, "a")) {//alert was received
+ else if (!strcmp(tp, "a")) {//alert was received
int bAlert = TRUE;
if (info->proto->tlenOptions.alertPolicy == TLEN_ALERTS_IGNORE_ALL) {
bAlert = FALSE;
@@ -1073,7 +1075,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) NotifyEventHooks(info->proto->hTlenNudge,(WPARAM) hContact,0);
} else {
if (info->proto->tlenOptions.logAlerts) {
- TlenLogMessage(info->proto, hContact, 0, Translate("An alert has been received."));
+ TlenLogMessage(info->proto, hContact, 0, Translate("An alert has been received."));
}
SkinPlaySound("TlenAlertNotify");
}
@@ -1083,7 +1085,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) }
mir_free(fLogin);
if ((p=strchr(f, '@')) != NULL) {
- if ((p=strchr(p, '/'))!=NULL && p[1]!='\0') { // message from user
+ if ((p=strchr(p, '/')) != NULL && p[1]!='\0') { // message from user
time_t timestamp;
s = JabberXmlGetAttrValue(node, "s");
if (s != NULL) {
@@ -1102,7 +1104,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) /* MUC private message */
str = JabberResourceFromJID(f);
hContact = JabberDBCreateContact(info->proto, f, str, TRUE);
- DBWriteContactSettingByte(hContact, info->proto->iface.m_szModuleName, "bChat", TRUE);
+ DBWriteContactSettingByte(hContact, info->proto->m_szModuleName, "bChat", TRUE);
mir_free(str);
localMessage = JabberTextDecode(bNode->text);
recv.flags = 0;
@@ -1126,7 +1128,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) if (subjectNode != NULL) {
f = JabberTextDecode(f);
localMessage = "";
- if (subjectNode->text!=NULL) {
+ if (subjectNode->text != NULL) {
localMessage = subjectNode->text;
}
localMessage = JabberTextDecode(localMessage);
@@ -1144,7 +1146,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) f = JabberXmlGetAttrValue(invNode, "f");
f = JabberTextDecode(f);
n = JabberXmlGetAttrValue(invNode, "n");
- if (n!=NULL && strstr(r, n)!=r) {
+ if (n != NULL && strstr(r, n) != r) {
n = JabberTextDecode(n);
} else {
n = mir_strdup(Translate("Private conference"));
@@ -1167,7 +1169,7 @@ static void TlenMailPopup(TlenProtocol *proto, char *title, char *emailInfo) char * lpzContactName;
char * lpzText;
- if (!DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "MailPopupEnabled", TRUE)) {
+ if (!DBGetContactSettingByte(NULL, proto->m_szModuleName, "MailPopupEnabled", TRUE)) {
return;
}
lpzContactName = title;
@@ -1177,17 +1179,17 @@ static void TlenMailPopup(TlenProtocol *proto, char *title, char *emailInfo) ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_MAIL));
strcpy(ppd.lpzContactName, lpzContactName);
strcpy(ppd.lpzText, lpzText);
- ppd.colorBack = DBGetContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupBack", 0);
- ppd.colorText = DBGetContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupText", 0);
+ ppd.colorBack = DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupBack", 0);
+ ppd.colorText = DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupText", 0);
ppd.PluginWindowProc = NULL;
ppd.PluginData=NULL;
if ( ServiceExists( MS_POPUP_ADDPOPUPEX )) {
BYTE delayMode;
int delay;
- delayMode = DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "MailPopupDelayMode", 0);
+ delayMode = DBGetContactSettingByte(NULL, proto->m_szModuleName, "MailPopupDelayMode", 0);
delay = 0;
if (delayMode==1) {
- delay = DBGetContactSettingDword(NULL, proto->iface.m_szModuleName, "MailPopupDelay", 4);
+ delay = DBGetContactSettingDword(NULL, proto->m_szModuleName, "MailPopupDelay", 4);
} else if (delayMode==2) {
delay = -1;
}
@@ -1212,11 +1214,11 @@ static void TlenProcessN(XmlNode *node, ThreadData *info) s = JabberXmlGetAttrValue(node, "s");
f = JabberXmlGetAttrValue(node, "f");
- if (s != NULL && f!=NULL) {
+ if (s != NULL && f != NULL) {
str = NULL;
strSize = 0;
- JabberStringAppend(&str, &strSize, Translate("%s mail"), info->proto->iface.m_szProtoName);
+ JabberStringAppend(&str, &strSize, Translate("%s mail"), info->proto->m_szProtoName);
popupTitle = JabberTextDecode(str);
mir_free(str);
@@ -1247,7 +1249,7 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) if (!node->name || strcmp(node->name, "p")) return;
- // presence from users in chat room
+// presence from users in chat room
flags = 0;
status = ID_STATUS_ONLINE;
f = JabberXmlGetAttrValue(node, "f");
@@ -1257,7 +1259,7 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) iNode = JabberXmlGetChild(xNode, "i");
if (iNode != NULL) {
iStr = JabberXmlGetAttrValue(iNode, "i");
- temp = mir_alloc(strlen(f)+strlen(iStr)+2);
+ temp = (char*)mir_alloc(strlen(f)+strlen(iStr)+2);
strcpy(temp, f);
strcat(temp, "/");
strcat(temp, iStr);
@@ -1272,13 +1274,13 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) f = JabberTextDecode(f);
}
a = JabberXmlGetAttrValue(node, "z");
- if (a!=NULL) {
+ if (a != NULL) {
if (atoi(a) &1 ) {
flags |= USER_FLAGS_REGISTERED;
}
}
a = JabberXmlGetAttrValue(node, "a");
- if (a!=NULL) {
+ if (a != NULL) {
if (atoi(a) == 2) {
flags |= USER_FLAGS_ADMIN;
}
@@ -1302,23 +1304,23 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) k = NULL;
if (kNode != NULL) {
k = JabberXmlGetAttrValue(kNode, "r");
- if (k==NULL) {
+ if (k == NULL) {
k = "";
}
k = JabberTextDecode(k);
}
tp = JabberXmlGetAttrValue(node, "tp");
- if (tp!=NULL && !strcmp(tp, "c")) { // new chat room has just been created
+ if (tp != NULL && !strcmp(tp, "c")) { // new chat room has just been created
id = JabberXmlGetAttrValue(node, "id");
if (id != NULL) {
n = JabberXmlGetAttrValue(node, "n");
- if (n!=NULL) {
+ if (n != NULL) {
n = JabberTextDecode(n);
} else {
n = mir_strdup(Translate("Private conference"));// JabberNickFromJID(f);
}
sprintf(jid, "%s/%s", f, info->username);
-// if (!DBGetContactSetting(NULL, iface.m_szModuleName, "LoginName", &dbv)) {
+// if (!DBGetContactSetting(NULL, info->proto->m_szModuleName, "LoginName", &dbv)) {
// always real username
// sprintf(jid, "%s/%s", f, dbv.pszVal);
TlenMUCCreateWindow(info->proto, f, n, 0, NULL, id);
@@ -1330,7 +1332,7 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) } else {
TlenMUCRecvPresence(info->proto, f, status, flags, k); // user presence
}
- if (k!=NULL) {
+ if (k != NULL) {
mir_free(k);
}
mir_free(f);
@@ -1421,7 +1423,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) if ((p=JabberXmlGetAttrValue(node, "i")) != NULL) {
if ((item=JabberListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
if ((p=JabberXmlGetAttrValue(node, "a")) != NULL) {
- if (item->ft->hostName!=NULL) mir_free(item->ft->hostName);
+ if (item->ft->hostName != NULL) mir_free(item->ft->hostName);
item->ft->hostName = mir_strdup(p);
if ((p=JabberXmlGetAttrValue(node, "p")) != NULL) {
item->ft->wPort = atoi(p);
diff --git a/plugins/!NotAdopted/Tlen/jabber_util.c b/protocols/Tlen/src/jabber_util.cpp index 1caa390f10..00ce04e579 100644 --- a/plugins/!NotAdopted/Tlen/jabber_util.c +++ b/protocols/Tlen/src/jabber_util.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -26,13 +26,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <ctype.h>
#include <win2k.h>
-HANDLE HookEventObj_Ex(const char *name, TlenProtocol *proto, MIRANDAHOOKOBJ hook) {
+
+HANDLE HookEventObj_Ex(const char *name, TlenProtocol *proto, MIRANDAHOOKOBJ hook)
+{
proto->hookNum ++;
proto->hHooks = (HANDLE *) mir_realloc(proto->hHooks, sizeof(HANDLE) * (proto->hookNum));
proto->hHooks[proto->hookNum - 1] = HookEventObj(name, hook, proto);
return proto->hHooks[proto->hookNum - 1] ;
}
+
HANDLE CreateServiceFunction_Ex(const char *name, TlenProtocol *proto, MIRANDASERVICEOBJ service) {
proto->serviceNum++;
proto->hServices = (HANDLE *) mir_realloc(proto->hServices, sizeof(HANDLE) * (proto->serviceNum));
@@ -75,6 +78,7 @@ void JabberSerialUninit(TlenProtocol *proto) DeleteCriticalSection(&proto->csSerial);
}
+
unsigned int JabberSerialNext(TlenProtocol *proto)
{
unsigned int ret;
@@ -86,6 +90,7 @@ unsigned int JabberSerialNext(TlenProtocol *proto) return ret;
}
+
void JabberLog(TlenProtocol *proto, const char *fmt, ...)
{
#ifdef ENABLE_LOGGING
@@ -103,12 +108,12 @@ void JabberLog(TlenProtocol *proto, const char *fmt, ...) va_end(vararg);
extra = 0;
- for (p=str; *p!='\0'; p++)
- if (*p=='\n' || *p=='\r')
+ for (p=str; *p != '\0'; p++)
+ if (*p == '\n' || *p == '\r')
extra++;
text = (char *) mir_alloc(strlen("TLEN")+2+strlen(str)+2+extra);
sprintf(text, "[%s]", "TLEN");
- for (p=str,q=text+strlen(text); *p!='\0'; p++,q++) {
+ for (p=str,q=text+strlen(text); *p != '\0'; p++,q++) {
if (*p == '\r') {
*q = '\\';
*(q+1) = 'r';
@@ -124,7 +129,7 @@ void JabberLog(TlenProtocol *proto, const char *fmt, ...) }
*q = '\n';
*(q+1) = '\0';
- if (proto->hNetlibUser!=NULL) {
+ if (proto->hNetlibUser != NULL) {
CallService(MS_NETLIB_LOG, (WPARAM) proto->hNetlibUser, (LPARAM) text);
}
//OutputDebugString(text);
@@ -134,6 +139,7 @@ void JabberLog(TlenProtocol *proto, const char *fmt, ...) }
// Caution: DO NOT use JabberSend() to send binary (non-string) data
+
int JabberSend(TlenProtocol *proto, const char *fmt, ...)
{
char *str;
@@ -154,27 +160,27 @@ int JabberSend(TlenProtocol *proto, const char *fmt, ...) JabberLog(proto, "SEND:%s", str);
size = (int)strlen(str);
- if (proto->threadData != NULL) {
- if (proto->threadData->useAES) {
- result = JabberWsSendAES(proto, str, size, &proto->threadData->aes_out_context, proto->threadData->aes_out_iv);
- } else {
- result = JabberWsSend(proto, proto->threadData->s, str, size);
- }
- }
+ if (proto->threadData != NULL) {
+ if (proto->threadData->useAES) {
+ result = JabberWsSendAES(proto, str, size, &proto->threadData->aes_out_context, proto->threadData->aes_out_iv);
+ } else {
+ result = JabberWsSend(proto, proto->threadData->s, str, size);
+ }
+ }
LeaveCriticalSection(&proto->csSend);
mir_free(str);
return result;
}
-
-char *JabberResourceFromJID(const char *jid)
+char *JabberResourceFromJID(const char *jid2)
{
char *p;
char *nick;
+ char* jid = mir_strdup(jid2);
p=strchr(jid, '/');
- if (p != NULL && p[1]!='\0') {
+ if (p != NULL && p[1] != '\0') {
p++;
if ((nick=(char *) mir_alloc(1+strlen(jid)-(p-jid))) != NULL) {
strncpy(nick, p, strlen(jid)-(p-jid));
@@ -185,13 +191,15 @@ char *JabberResourceFromJID(const char *jid) nick = mir_strdup(jid);
}
+ mir_free(jid);
return nick;
}
-char *JabberNickFromJID(const char *jid)
+char *JabberNickFromJID(const char *jid2)
{
char *p;
char *nick;
+ char* jid = mir_strdup(jid2);
if ((p=strchr(jid, '@')) == NULL)
p = strchr(jid, '/');
@@ -205,13 +213,15 @@ char *JabberNickFromJID(const char *jid) nick = mir_strdup(jid);
}
+ mir_free(jid);
return nick;
}
-char *JabberLoginFromJID(const char *jid)
+char *JabberLoginFromJID(const char *jid2)
{
char *p;
char *nick;
+ char* jid = mir_strdup(jid2);
p = strchr(jid, '/');
if (p != NULL) {
@@ -223,6 +233,8 @@ char *JabberLoginFromJID(const char *jid) else {
nick = mir_strdup(jid);
}
+
+ mir_free(jid);
return nick;
}
@@ -240,7 +252,7 @@ char *JabberLocalNickFromJID(const char *jid) char *JabberSha1(char *str)
{
mir_sha1_ctx sha;
- DWORD digest[5];
+ DWORD digest[5];
char* result;
if ( str == NULL )
@@ -281,8 +293,8 @@ char *TlenPasswordHash(const char *str) char *p, *res;
if (str == NULL) return NULL;
- for (p=(char *)str; *p!='\0'; p++) {
- if (*p!=' ' && *p!='\t') {
+ for (p=(char *)str; *p != '\0'; p++) {
+ if (*p != ' ' && *p != '\t') {
magic1 ^= (((magic1 & 0x3f) + sum) * ((char) *p)) + (magic1 << 8);
magic2 += (magic2 << 8) ^ magic1;
sum += ((char) *p);
@@ -302,11 +314,11 @@ char *TlenUrlEncode(const char *str) if (str == NULL) return NULL;
res = (char *) mir_alloc(3*strlen(str) + 1);
- for (p=(char *)str,q=res; *p!='\0'; p++,q++) {
+ for (p=(char *)str,q=res; *p != '\0'; p++,q++) {
if (*p == ' ') {
*q = '+';
}
- else if (*p<0x20 || *p>=0x7f || strchr("%&+:'<>\"", *p)!=NULL) {
+ else if (*p < 0x20 || *p >= 0x7f || strchr("%&+:'<>\"", *p) != NULL) {
// Convert first from CP1252 to ISO8859-2
switch ((unsigned char) *p) {
case 0xa5: c = (unsigned char) 0xa1; break;
@@ -334,11 +346,11 @@ void TlenUrlDecode(char *str) unsigned int code;
if (str == NULL) return;
- for (p=q=str; *p!='\0'; p++,q++) {
+ for (p=q=str; *p != '\0'; p++,q++) {
if (*p == '+') {
*q = ' ';
}
- else if (*p=='%' && *(p+1)!='\0' && isxdigit(*(p+1)) && *(p+2)!='\0' && isxdigit(*(p+2))) {
+ else if (*p == '%' && *(p+1) != '\0' && isxdigit(*(p+1)) && *(p+2) != '\0' && isxdigit(*(p+2))) {
sscanf(p+1, "%2x", &code);
*q = (char) code;
// Convert from ISO8859-2 to CP1252
@@ -364,7 +376,7 @@ char * TlenGroupDecode(const char *str) char *p, *q;
if (str == NULL) return NULL;
p = q = JabberTextDecode(str);
- for (; *p!='\0'; p++) {
+ for (; *p != '\0'; p++) {
if (*p == '/') {
*p = '\\';
}
@@ -377,7 +389,7 @@ char * TlenGroupEncode(const char *str) char *p, *q;
if (str == NULL) return NULL;
p = q = mir_strdup(str);
- for (; *p!='\0'; p++) {
+ for (; *p != '\0'; p++) {
if (*p == '\\') {
*p = '/';
}
@@ -416,7 +428,7 @@ char *JabberBase64Encode(const char *buffer, int bufferLen) char *p, *peob;
char *res, *r;
- if (buffer==NULL || bufferLen<=0) return NULL;
+ if (buffer == NULL || bufferLen <= 0) return NULL;
if ((res=(char *) mir_alloc((((bufferLen+2)/3)*4) + 1)) == NULL) return NULL;
for (p=(char*)buffer,peob=p+bufferLen,r=res; p<peob;) {
@@ -452,7 +464,7 @@ char *JabberBase64Decode(const char *str, int *resultLen) unsigned char *p, *r, igroup[4], a[4];
int n, num, count;
- if (str==NULL || resultLen==NULL) return NULL;
+ if (str == NULL || resultLen == NULL) return NULL;
if ((res=(char *) mir_alloc(((strlen(str)+3)/4)*3)) == NULL) return NULL;
for (n=0; n<256; n++)
@@ -467,7 +479,7 @@ char *JabberBase64Decode(const char *str, int *resultLen) b64rtable['/'] = 63;
b64rtable['='] = 0;
count = 0;
- for (p=(unsigned char *)str,r=(unsigned char *)res; *p!='\0';) {
+ for (p=(unsigned char *)str,r=(unsigned char *)res; *p != '\0';) {
for (n=0; n<4; n++) {
if ( *p == '\r' || *p == '\n' ) {
n--; p++;
@@ -481,7 +493,7 @@ char *JabberBase64Decode(const char *str, int *resultLen) return NULL;
}
- if ( b64rtable[*p]==0x80 ) {
+ if ( b64rtable[*p] == 0x80 ) {
mir_free( res );
return NULL;
}
@@ -494,7 +506,7 @@ char *JabberBase64Decode(const char *str, int *resultLen) r[1] = igroup[1]<<4 | igroup[2]>>2;
r[2] = igroup[2]<<6 | igroup[3];
r += 3;
- num = ( a[2]=='='?1:( a[3]=='='?2:3 ));
+ num = ( a[2] == '='?1:( a[3] == '='?2:3 ));
count += num;
if ( num < 3 ) break;
}
@@ -533,7 +545,7 @@ time_t JabberIsoToUnixTime(char *stamp) p = stamp;
// Get the date part
- for (i=0; *p!='\0' && i<8 && isdigit(*p); p++,i++)
+ for (i=0; *p != '\0' && i<8 && isdigit(*p); p++,i++)
date[i] = *p;
// Parse year
@@ -556,7 +568,7 @@ time_t JabberIsoToUnixTime(char *stamp) timestamp.tm_mday = (date[i-2]-'0')*10 + date[i-1]-'0';
// Skip any date/time delimiter
- for (; *p!='\0' && !isdigit(*p); p++);
+ for (; *p != '\0' && !isdigit(*p); p++);
// Parse time
if (sscanf(p, "%d:%d:%d", &(timestamp.tm_hour), &(timestamp.tm_min), &(timestamp.tm_sec)) != 3)
@@ -582,7 +594,7 @@ void JabberStringAppend(char **str, int *sizeAlloced, const char *fmt, ...) if (str == NULL) return;
- if (*str==NULL || *sizeAlloced<=0) {
+ if (*str == NULL || *sizeAlloced <= 0) {
*sizeAlloced = size = 2048;
*str = (char *) mir_alloc(size);
len = 0;
@@ -610,7 +622,7 @@ int JabberGetPictureType( const char* buf ) if ( memcmp( buf, "\x89PNG", 4 ) == 0 ) return PA_FORMAT_PNG;
if ( memcmp( buf, "BM", 2 ) == 0 ) return PA_FORMAT_BMP;
if ( memcmp( buf, "\xFF\xD8", 2 ) == 0 ) return PA_FORMAT_JPEG;
- }
+ }
return PA_FORMAT_UNKNOWN;
}
@@ -626,10 +638,10 @@ BOOL IsAuthorized(TlenProtocol *proto, const char *jid) void TlenLogMessage(TlenProtocol *proto, HANDLE hContact, DWORD flags, const char *message)
{
- int size = (int)strlen(message) + 2;
- char *localMessage = (char *)mir_alloc(size);
- strcpy(localMessage, message);
- localMessage[size - 1] = '\0';
- JabberDBAddEvent(proto, hContact, EVENTTYPE_MESSAGE, flags, (PBYTE)message, (DWORD)size);
- mir_free(localMessage);
+ int size = (int)strlen(message) + 2;
+ char *localMessage = (char *)mir_alloc(size);
+ strcpy(localMessage, message);
+ localMessage[size - 1] = '\0';
+ JabberDBAddEvent(proto, hContact, EVENTTYPE_MESSAGE, flags, (PBYTE)message, (DWORD)size);
+ mir_free(localMessage);
}
diff --git a/plugins/!NotAdopted/Tlen/jabber_ws.c b/protocols/Tlen/src/jabber_ws.cpp index 49599fa0e3..c2cb853b02 100644 --- a/plugins/!NotAdopted/Tlen/jabber_ws.c +++ b/protocols/Tlen/src/jabber_ws.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -32,47 +32,48 @@ BOOL JabberWsInit(TlenProtocol *proto) nlu.cbSize = sizeof(nlu);
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS | NUF_TCHAR; // | NUF_HTTPGATEWAY;
- mir_sntprintf( name, SIZEOF(name), TranslateT("%s connection"), proto->iface.m_tszUserName);
+ mir_sntprintf( name, SIZEOF(name), TranslateT("%s connection"), proto->m_tszUserName);
nlu.ptszDescriptiveName = name;
- nlu.szSettingsModule = proto->iface.m_szModuleName;
+ nlu.szSettingsModule = proto->m_szModuleName;
proto->hNetlibUser = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) &nlu);
nlu.flags = NUF_OUTGOING | NUF_INCOMING | NUF_NOOPTIONS | NUF_TCHAR;
- mir_sntprintf( name, SIZEOF(name), TranslateT("%s SOCKS connection"), proto->iface.m_tszUserName);
+ mir_sntprintf( name, SIZEOF(name), TranslateT("%s SOCKS connection"), proto->m_tszUserName);
nlu.ptszDescriptiveName = name;
proto->hFileNetlibUser = (HANDLE) CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM) &nlu);
nlus.cbSize = sizeof(nlus);
nlus.useProxy = 0;
CallService(MS_NETLIB_SETUSERSETTINGS, (WPARAM) proto->hFileNetlibUser, (LPARAM) &nlus);
- return (proto->hNetlibUser!=NULL)?TRUE:FALSE;
+ return (proto->hNetlibUser != NULL)?TRUE:FALSE;
}
void JabberWsUninit(TlenProtocol *proto)
{
- if (proto->hNetlibUser!=NULL) Netlib_CloseHandle(proto->hNetlibUser);
- if (proto->hFileNetlibUser!=NULL) Netlib_CloseHandle(proto->hFileNetlibUser);
- proto->hNetlibUser = NULL;
- proto->hFileNetlibUser = NULL;
+ if (proto->hNetlibUser != NULL) Netlib_CloseHandle(proto->hNetlibUser);
+ if (proto->hFileNetlibUser != NULL) Netlib_CloseHandle(proto->hFileNetlibUser);
+ proto->hNetlibUser = NULL;
+ proto->hFileNetlibUser = NULL;
}
JABBER_SOCKET JabberWsConnect(TlenProtocol *proto, char *host, WORD port)
{
- NETLIBOPENCONNECTION nloc = {0};
+ NETLIBOPENCONNECTION nloc = {0};
nloc.cbSize = sizeof(NETLIBOPENCONNECTION); //NETLIBOPENCONNECTION_V1_SIZE;
nloc.szHost = host;
nloc.wPort = port;
nloc.flags = 0;
- nloc.timeout = 6;
+ nloc.timeout = 6;
return (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) proto->hNetlibUser, (LPARAM) &nloc);
}
+
int JabberWsSend(TlenProtocol *proto, JABBER_SOCKET s, char *data, int datalen)
{
int len;
- if ((len=Netlib_Send(s, data, datalen, /*MSG_NODUMP|*/MSG_DUMPASTEXT))==SOCKET_ERROR || len!=datalen) {
- JabberLog(proto, "Netlib_Send() failed, error=%d", WSAGetLastError());
+ if ((len=Netlib_Send(s, data, datalen, /*MSG_NODUMP|*/MSG_DUMPASTEXT)) == SOCKET_ERROR || len != datalen) {
+ JabberLog(proto, "Netlib_Send() failed, error=%d", WSAGetLastError());
return FALSE;
}
return TRUE;
@@ -82,11 +83,11 @@ int JabberWsRecv(TlenProtocol *proto, JABBER_SOCKET s, char *data, long datalen) {
int ret;
ret = Netlib_Recv(s, data, datalen, /*MSG_NODUMP|*/MSG_DUMPASTEXT);
- if(ret == SOCKET_ERROR) {
+ if (ret == SOCKET_ERROR) {
JabberLog(proto, "Netlib_Recv() failed, error=%d", WSAGetLastError());
return 0;
}
- if(ret == 0) {
+ if (ret == 0) {
JabberLog(proto, "Connection closed gracefully");
return 0;
}
@@ -99,9 +100,9 @@ int JabberWsSendAES(TlenProtocol *proto, char *data, int datalen, aes_context *a int len, sendlen;
unsigned char aes_input[16];
unsigned char aes_output[256];
- if (proto->threadData == NULL) {
- return FALSE;
- }
+ if (proto->threadData == NULL) {
+ return FALSE;
+ }
while (datalen > 0) {
len = 0;
while (datalen > 0 && len < 256) {
@@ -115,7 +116,7 @@ int JabberWsSendAES(TlenProtocol *proto, char *data, int datalen, aes_context *a }
if (len > 0) {
JabberLog(proto, "Sending %d bytes", len);
- if ((sendlen=Netlib_Send(proto->threadData->s, (char *)aes_output, len, MSG_NODUMP))==SOCKET_ERROR || len!=sendlen) {
+ if ((sendlen=Netlib_Send(proto->threadData->s, (char *)aes_output, len, MSG_NODUMP)) == SOCKET_ERROR || len != sendlen) {
JabberLog(proto, "Netlib_Send() failed, error=%d", WSAGetLastError());
return FALSE;
}
@@ -129,16 +130,16 @@ int JabberWsRecvAES(TlenProtocol *proto, char *data, long datalen, aes_context * int ret, len = 0, maxlen = datalen;
unsigned char aes_input[16];
unsigned char *aes_output = (unsigned char *)data;
- if (proto->threadData == NULL) {
- return 0;
- }
+ if (proto->threadData == NULL) {
+ return 0;
+ }
for (maxlen = maxlen & ~0xF; maxlen != 0; maxlen = maxlen & 0xF) {
ret = Netlib_Recv(proto->threadData->s, data, maxlen, MSG_NODUMP);
- if(ret == SOCKET_ERROR) {
+ if (ret == SOCKET_ERROR) {
JabberLog(proto, "Netlib_Recv() failed, error=%d", WSAGetLastError());
return 0;
}
- if(ret == 0) {
+ if (ret == 0) {
JabberLog(proto, "Connection closed gracefully");
return 0;
}
diff --git a/plugins/!NotAdopted/Tlen/jabber_xml.c b/protocols/Tlen/src/jabber_xml.cpp index 6925e60eb1..5786404dc6 100644 --- a/plugins/!NotAdopted/Tlen/jabber_xml.c +++ b/protocols/Tlen/src/jabber_xml.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -75,21 +75,21 @@ void JabberXmlDestroyState(XmlState *xmlState) if (node->name) mir_free(node->name);
}
-BOOL JabberXmlSetCallback(XmlState *xmlState, int depth, XmlElemType type, void (*callback)(), void *userdata)
+BOOL JabberXmlSetCallback(XmlState *xmlState, int depth, XmlElemType type, void (*callback)(XmlNode*, void*), void *userdata)
{
- if (depth==1 && type==ELEM_OPEN) {
+ if (depth == 1 && type == ELEM_OPEN) {
xmlState->callback1_open = callback;
xmlState->userdata1_open = userdata;
}
- else if (depth==1 && type==ELEM_CLOSE) {
+ else if (depth == 1 && type == ELEM_CLOSE) {
xmlState->callback1_close = callback;
xmlState->userdata1_close = userdata;
}
- else if (depth==2 && type==ELEM_OPEN) {
+ else if (depth == 2 && type == ELEM_OPEN) {
xmlState->callback2_open = callback;
xmlState->userdata2_open = userdata;
}
- else if (depth==2 && type==ELEM_CLOSE) {
+ else if (depth == 2 && type == ELEM_CLOSE) {
xmlState->callback2_close = callback;
xmlState->userdata2_close = userdata;
}
@@ -108,7 +108,7 @@ int JabberXmlParse(XmlState *xmlState, char *buffer, int datalen) int num;
char tag[TAG_MAX_LEN];
char attr[ATTR_MAX_LEN];
- XmlElemType elemType = 0;
+ XmlElemType elemType = ELEM_OPEN;
eob = buffer + datalen;
num = 0;
@@ -116,9 +116,9 @@ int JabberXmlParse(XmlState *xmlState, char *buffer, int datalen) for (p=buffer; p<eob && isspace(*p); p++,num++);
while (num < datalen) {
if (*p == '<') { // found starting bracket
- for (q=p+1; q<eob && *q!='>'; q++);
+ for (q=p+1; q<eob && *q != '>'; q++);
if (q < eob) { // found closing bracket
- for (r=p+1; *r!='>' && *r!=' ' && *r!='\t'; r++);
+ for (r=p+1; *r != '>' && *r != ' ' && *r != '\t'; r++);
if (r-(p+1) > TAG_MAX_LEN) {
// JabberLog("TAG_MAX_LEN too small, ignore current tag");
}
@@ -140,13 +140,13 @@ int JabberXmlParse(XmlState *xmlState, char *buffer, int datalen) elemType = ELEM_OPEN;
}
}
- for (;r<q && (*r==' ' || *r=='\t'); r++);
+ for (;r<q && (*r == ' ' || *r == '\t'); r++);
if (q-r > ATTR_MAX_LEN) {
// JabberLog("ATTR_MAX_LEN too small, ignore current tag");
}
else {
strncpy(attr, r, q-r);
- if ((q-r)>0 && attr[q-r-1]=='/') {
+ if ((q-r)>0 && attr[q-r-1] == '/') {
attr[q-r-1] = '\0';
elemType = ELEM_OPENCLOSE;
}
@@ -157,7 +157,7 @@ int JabberXmlParse(XmlState *xmlState, char *buffer, int datalen) }
num += (q-p+1);
p = q + 1;
- if (elemType==ELEM_CLOSE || elemType==ELEM_OPENCLOSE) {
+ if (elemType == ELEM_CLOSE || elemType == ELEM_OPENCLOSE) {
// Skip whitespaces after end tags
for (; p<eob && isspace(*p); p++,num++);
}
@@ -166,7 +166,7 @@ int JabberXmlParse(XmlState *xmlState, char *buffer, int datalen) break;
}
else { // found inner text
- for (q=p+1; q<eob && *q!='<'; q++);
+ for (q=p+1; q<eob && *q != '<'; q++);
if (q < eob) { // found starting bracket of the next element
str = (char *) mir_alloc(q-p+1);
strncpy(str, p, q-p);
@@ -191,19 +191,19 @@ static void JabberXmlParseAttr(XmlNode *node, char *text) char *p;
XmlAttr *a;
- if (node==NULL || text==NULL || strlen(text)<=0)
+ if (node == NULL || text == NULL || strlen(text) <= 0)
return;
for (p=text;;) {
// Skip leading whitespaces
- for (;*p!='\0' && (*p==' ' || *p=='\t'); p++);
+ for (;*p != '\0' && (*p == ' ' || *p == '\t'); p++);
if (*p == '\0')
break;
// Fetch key
kstart = p;
- for (;*p!='\0' && *p!='=' && *p!=' ' && *p!='\t'; p++);
+ for (;*p != '\0' && *p != '=' && *p != ' ' && *p != '\t'; p++);
klen = p-kstart;
if (node->numAttr >= node->maxNumAttr) {
@@ -214,7 +214,7 @@ static void JabberXmlParseAttr(XmlNode *node, char *text) node->numAttr++;
// Skip possible whitespaces between key and '='
- for (;*p!='\0' && (*p==' ' || *p=='\t'); p++);
+ for (;*p != '\0' && (*p == ' ' || *p == '\t'); p++);
if (*p == '\0') {
a->name = (char *) mir_alloc(klen+1);
@@ -236,7 +236,7 @@ static void JabberXmlParseAttr(XmlNode *node, char *text) p++;
// Skip possible whitespaces between '=' and value
- for (;*p!='\0' && (*p==' ' || *p=='\t'); p++);
+ for (;*p != '\0' && (*p == ' ' || *p == '\t'); p++);
if (*p == '\0') {
a->name = (char *) mir_alloc(klen+1);
@@ -247,16 +247,16 @@ static void JabberXmlParseAttr(XmlNode *node, char *text) }
// Fetch value
- if (*p=='\'' || *p=='"') {
+ if (*p == '\'' || *p == '"') {
p++;
vstart = p;
- for (;*p!='\0' && *p!=*(vstart-1); p++);
+ for (;*p != '\0' && *p != *(vstart-1); p++);
vlen = p-vstart;
if (*p != '\0') p++;
}
else {
vstart = p;
- for (;*p!='\0' && *p!=' ' && *p!='\t'; p++);
+ for (;*p != '\0' && *p != ' ' && *p != '\t'; p++);
vlen = p-vstart;
}
@@ -277,7 +277,7 @@ static BOOL JabberXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char if (elemText == NULL) return FALSE;
- if (elemType==ELEM_OPEN && !strcmp(elemText, "?xml")) {
+ if (elemType == ELEM_OPEN && !strcmp(elemText, "?xml")) {
// JabberLog("XML: skip <?xml> tag");
return TRUE;
}
@@ -285,7 +285,7 @@ static BOOL JabberXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char // Find active node
node = &(xmlState->root);
parentNode = NULL;
- while (node->numChild>0 && node->child[node->numChild-1]->state==NODE_OPEN) {
+ while (node->numChild>0 && node->child[node->numChild-1]->state == NODE_OPEN) {
parentNode = node;
node = node->child[node->numChild-1];
}
@@ -316,9 +316,9 @@ static BOOL JabberXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char n->attr = NULL;
JabberXmlParseAttr(n, attr);
n->text = NULL;
- if (n->depth==1 && xmlState->callback1_open!=NULL)
+ if (n->depth == 1 && xmlState->callback1_open != NULL)
(*(xmlState->callback1_open))(n, xmlState->userdata1_open);
- if (n->depth==2 && xmlState->callback2_open!=NULL)
+ if (n->depth == 2 && xmlState->callback2_open != NULL)
(*xmlState->callback2_open)(n, xmlState->userdata2_open);
break;
case ELEM_OPENCLOSE:
@@ -337,23 +337,23 @@ static BOOL JabberXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char n->attr = NULL;
JabberXmlParseAttr(n, attr);
n->text = NULL;
- if (n->depth==1 && xmlState->callback1_close!=NULL) {
+ if (n->depth == 1 && xmlState->callback1_close != NULL) {
(*(xmlState->callback1_close))(n, xmlState->userdata1_close);
JabberXmlRemoveChild(node, n);
}
- if (n->depth==2 && xmlState->callback2_close!=NULL) {
+ if (n->depth == 2 && xmlState->callback2_close != NULL) {
(*xmlState->callback2_close)(n, xmlState->userdata2_close);
JabberXmlRemoveChild(node, n);
}
break;
case ELEM_CLOSE:
- if (node->name!=NULL && !strcmp(node->name, text)) {
+ if (node->name != NULL && !strcmp(node->name, text)) {
node->state = NODE_CLOSE;
- if (node->depth==1 && xmlState->callback1_close!=NULL) {
+ if (node->depth == 1 && xmlState->callback1_close != NULL) {
(*(xmlState->callback1_close))(node, xmlState->userdata1_close);
JabberXmlRemoveChild(parentNode, node);
}
- if (node->depth==2 && xmlState->callback2_close!=NULL) {
+ if (node->depth == 2 && xmlState->callback2_close != NULL) {
(*xmlState->callback2_close)(node, xmlState->userdata2_close);
JabberXmlRemoveChild(parentNode, node);
}
@@ -384,7 +384,7 @@ char *JabberXmlGetAttrValue(XmlNode *node, char *key) {
int i;
- if (node==NULL || node->numAttr<=0 || key==NULL || strlen(key)<=0)
+ if (node == NULL || node->numAttr <= 0 || key == NULL || strlen(key) <= 0)
return NULL;
for (i=0; i<node->numAttr; i++) {
if (node->attr[i]->name && !strcmp(key, node->attr[i]->name))
@@ -402,7 +402,7 @@ XmlNode *JabberXmlGetNthChild(XmlNode *node, char *tag, int nth) {
int i, num;
- if (node==NULL || node->numChild<=0 || tag==NULL || strlen(tag)<=0 || nth<1)
+ if (node == NULL || node->numChild <= 0 || tag == NULL || strlen(tag) <= 0 || nth < 1)
return NULL;
num = 1;
for (i=0; i<node->numChild; i++) {
@@ -421,7 +421,7 @@ XmlNode *JabberXmlGetChildWithGivenAttrValue(XmlNode *node, char *tag, char *att int i;
char *str;
- if (node==NULL || node->numChild<=0 || tag==NULL || strlen(tag)<=0 || attrKey==NULL || strlen(attrKey)<=0 || attrValue==NULL || strlen(attrValue)<=0)
+ if (node == NULL || node->numChild <= 0 || tag == NULL || strlen(tag) <= 0 || attrKey == NULL || strlen(attrKey) <= 0 || attrValue == NULL || strlen(attrValue) <= 0)
return NULL;
for (i=0; i<node->numChild; i++) {
if (node->child[i]->name && !strcmp(tag, node->child[i]->name)) {
@@ -437,7 +437,7 @@ static void JabberXmlRemoveChild(XmlNode *node, XmlNode *child) {
int i;
- if (node==NULL || child==NULL || node->numChild<=0) return;
+ if (node == NULL || child == NULL || node->numChild <= 0) return;
for (i=0; i<node->numChild; i++) {
if (node->child[i] == child)
break;
@@ -531,7 +531,7 @@ void JabberXmlAddAttr(XmlNode *n, char *name, char *value) {
int i;
- if (n==NULL || name==NULL || value==NULL)
+ if (n == NULL || name == NULL || value == NULL)
return;
i = n->numAttr;
@@ -546,7 +546,7 @@ XmlNode *JabberXmlAddChild(XmlNode *n, char *name) {
int i;
- if (n==NULL || name==NULL)
+ if (n == NULL || name == NULL)
return NULL;
i = n->numChild;
@@ -560,7 +560,7 @@ XmlNode *JabberXmlAddChild(XmlNode *n, char *name) void JabberXmlAddText(XmlNode *n, char *text)
{
- if (n!=NULL && text!=NULL) {
+ if (n != NULL && text != NULL) {
if (n->text) mir_free(n->text);
n->text = mir_strdup(text);
}
diff --git a/plugins/!NotAdopted/Tlen/jabber_xml.h b/protocols/Tlen/src/jabber_xml.h index 98949b92f6..165a8fadc5 100644 --- a/plugins/!NotAdopted/Tlen/jabber_xml.h +++ b/protocols/Tlen/src/jabber_xml.h @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -45,13 +45,14 @@ typedef struct tagXmlNode { XmlNodeType state; // internal use by parser
} XmlNode;
+
typedef struct tagXmlState {
XmlNode root; // root is the document (depth = 0);
// callback for depth=n element on opening/closing
- void (*callback1_open)();
- void (*callback1_close)();
- void (*callback2_open)();
- void (*callback2_close)();
+ void (*callback1_open)(XmlNode *,void *);
+ void (*callback1_close)(XmlNode *,void *);
+ void (*callback2_open)(XmlNode *,void *);
+ void (*callback2_close)(XmlNode *,void *);
void *userdata1_open;
void *userdata1_close;
void *userdata2_open;
@@ -60,7 +61,7 @@ typedef struct tagXmlState { void JabberXmlInitState(XmlState *xmlState);
void JabberXmlDestroyState(XmlState *xmlState);
-BOOL JabberXmlSetCallback(XmlState *xmlState, int depth, XmlElemType type, void (*callback)(), void *userdata);
+BOOL JabberXmlSetCallback(XmlState *xmlState, int depth, XmlElemType type, void (*callback)(XmlNode*, void*), void *userdata);
int JabberXmlParse(XmlState *xmlState, char *buffer, int datalen);
char *JabberXmlGetAttrValue(XmlNode *node, char *key);
XmlNode *JabberXmlGetChild(XmlNode *node, char *tag);
diff --git a/protocols/Tlen/src/resource.h b/protocols/Tlen/src/resource.h new file mode 100644 index 0000000000..6f3b59b64d --- /dev/null +++ b/protocols/Tlen/src/resource.h @@ -0,0 +1,147 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Developer Studio generated include file.
+// Used by Tlen.rc
+//
+
+#define IDI_TLEN 100
+#define IDI_MAIL 101
+#define IDI_MUC 102
+#define IDI_CHATS 103
+#define IDI_GRANT 104
+#define IDI_REQUEST 105
+#define IDI_VOICE 106
+#define IDI_MICROPHONE 107
+#define IDI_SPEAKER 108
+#define IDI_IMAGE 109
+
+#define IDD_OPTIONS_BASIC 151
+#define IDD_OPTIONS_VOICE 152
+#define IDD_OPTIONS_POPUPS 153
+#define IDD_OPTIONS_ADVANCED 154
+#define IDD_USER_INFO 155
+#define IDD_USER_VCARD 156
+#define IDD_PASSWORD 157
+#define IDD_ADVSEARCH 158
+#define IDD_VOICE 159
+#define IDD_ACCEPT_VOICE 160
+#define IDD_USER_CHANGEAVATAR 161
+#define IDD_ACCMGRUI 162
+
+#define IDC_TABS 1000
+#define IDC_EDIT_USERNAME 1001
+#define IDC_SAVE 1002
+#define IDC_EDIT_PASSWORD 1003
+#define IDC_EDIT_LOGIN_SERVER 1004
+#define IDC_INFO_JID 1007
+#define IDC_INFO_RESOURCE 1008
+#define IDC_SHOW_OFFLINE 1012
+#define IDC_OFFLINE_MESSAGE 1013
+#define IDC_OFFLINE_MESSAGE_OPTION 1014
+#define IDC_VISIBILITY_SUPPORT 1015
+#define IDC_NUDGE_SUPPORT 1016
+#define IDC_LOG_ALERTS 1017
+
+#define IDC_SUBSCRIPTION 1039
+#define IDC_REGISTERACCOUNT 1040
+#define IDC_SIMPLE 1041
+#define IDC_KEEPALIVE 1042
+#define IDC_HOST 1043
+#define IDC_HOSTPORT 1044
+#define IDC_USE_SSL 1045
+#define IDC_SAVEPASSWORD 1048
+#define IDC_ROSTER_ALERTS 1049
+#define IDC_PASSWORD 1050
+#define IDC_RECONNECT 1050
+#define IDC_JID 1051
+#define IDC_ROSTER_SYNC 1052
+#define IDC_ALERT_POLICY 1053
+#define IDC_MUC_POLICY 1054
+#define IDC_VOICE_POLICY 1055
+#define IDC_IGNORE_ADVERTISEMENTS 1056
+#define IDC_AVATARS 1057
+#define IDC_VERSIONINFO 1058
+#define IDC_IMAGE_POLICY 1059
+#define IDC_CITY 1060
+#define IDC_FULLNAME 1061
+#define IDC_NICKNAME 1062
+#define IDC_FIRSTNAME 1063
+#define IDC_LASTNAME 1064
+#define IDC_BIRTH 1065
+#define IDC_AGE 1065
+#define IDC_OCCUPATION 1066
+#define IDC_EMAIL 1073
+#define IDC_GENDER 1096
+#define IDC_VOICECONVERSATIONS 1097
+#define IDC_PUBLICSTATUS 1098
+#define IDC_VCQUALITY 1100
+#define IDC_VUMETERIN 1101
+#define IDC_VUMETEROUT 1102
+#define IDC_BYTESIN 1103
+#define IDC_BYTESOUT 1104
+#define IDC_MICROPHONE 1105
+#define IDC_SPEAKER 1106
+#define IDC_ACCEPT 1107
+
+#define IDC_FILE_PROXY_TYPE_LABEL 1108
+#define IDC_FILE_PROXY_TYPE 1109
+#define IDC_FILE_PROXY_HOST_LABEL 1110
+#define IDC_FILE_PROXY_HOST 1111
+#define IDC_FILE_PROXY_PORT_LABEL 1112
+#define IDC_FILE_PROXY_PORT 1113
+#define IDC_FILE_PROXY_USE_AUTH 1114
+#define IDC_FILE_PROXY_USER 1115
+#define IDC_FILE_PROXY_USER_LABEL 1116
+#define IDC_FILE_PROXY_PASSWORD_LABEL 1117
+#define IDC_FILE_PROXY_PASSWORD 1118
+#define IDC_FILE_USE_PROXY 1119
+#define IDC_VOICE_DEVICE_IN 1120
+#define IDC_VOICE_DEVICE_OUT 1121
+
+#define IDC_MSG_ACK 1124
+#define IDC_SERVER 1125
+#define IDC_NICK 1129
+#define IDC_LIST 1133
+#define IDC_ENTER 1144
+#define IDC_AGEFROM 1152
+#define IDC_AGETO 1153
+#define IDC_LOOKFOR 1154
+#define IDC_SCHOOL 1155
+#define IDC_FROM 1175
+#define IDC_DELAY 1180
+#define IDC_COLORBKG 1181
+#define IDC_COLORTXT 1182
+#define IDC_PREVIEW 1183
+#define IDC_ENABLEPOPUP 1184
+#define IDC_DELAY_PERMANENT 1185
+#define IDC_DELAY_CUSTOM 1186
+#define IDC_DELAY_POPUP 1187
+#define IDC_TLEN 1190
+#define IDC_GENDER_TEXT 1195
+#define IDC_OCCUPATION_TEXT 1199
+#define IDC_LOOKFOR_TEXT 1200
+#define IDC_GROUP 1203
+#define IDC_SOFTWARE 1204
+#define IDC_VERSION 1205
+#define IDC_SYSTEM 1206
+#define IDC_AVATAR 1210
+#define IDC_SETAVATAR 1211
+#define IDC_DELETEAVATAR 1212
+#define IDC_AVATAR_LIST 1213
+#define IDC_OLD_AVATAR 1214
+#define IDC_BROWSEAVATAR 1215
+#define IDC_PUBLICAVATAR 1216
+
+#define IDC_STATUS 1414
+#define IDC_PLAN 1415
+#define IDC_PERSONALGROUP 1434
+#define IDC_EXTRAGROUP 1435
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 190
+#define _APS_NEXT_COMMAND_VALUE 40017
+#define _APS_NEXT_CONTROL_VALUE 1204
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/plugins/!NotAdopted/Tlen/tlen.c b/protocols/Tlen/src/tlen.cpp index 8ca67cb313..2feb99495e 100644 --- a/plugins/!NotAdopted/Tlen/tlen.c +++ b/protocols/Tlen/src/tlen.cpp @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -35,56 +35,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_icolib.h>
#include <m_genmenu.h>
#include "m_mucc.h"
-#include "m_updater.h"
-struct MM_INTERFACE mmi;
-struct SHA1_INTERFACE sha1i;
-struct MD5_INTERFACE md5i;
-struct UTF8_INTERFACE utfi;
+int hLangpack;
HINSTANCE hInst;
-PLUGINLINK *pluginLink;
HANDLE hMainThread;
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
-#ifdef _UNICODE
-#ifdef _X64
- "Tlen Protocol (x64, Unicode)",
-#else
- "Tlen Protocol (Unicode)",
-#endif
-#else
"Tlen Protocol",
-#endif
PLUGIN_MAKE_VERSION(TLEN_MAJOR_VERSION,TLEN_MINOR_VERSION,TLEN_RELEASE_NUM,TLEN_BUILD_NUM),
"Tlen protocol plugin for Miranda NG (version: " TLEN_VERSION_STRING ")",
"Santithorn Bunchua, Adam Strzelecki, Piotr Piastucki",
"the_leech@users.berlios.de",
"(c) 2002-2012 Santithorn Bunchua, Piotr Piastucki",
- "http://mtlen.berlios.de",
- 0,
- 0,
-#if defined( _UNICODE )
-#ifdef _X64
- {0x3ba4a3c6, 0x27b5, 0x4c78, { 0x92, 0x8c, 0x38, 0x2a, 0xe1, 0xd3, 0x2a, 0xb5 }}
-#else
+ "http://miranda-ng.org/",
+ UNICODE_AWARE,
{0x748f8934, 0x781a, 0x528d, { 0x52, 0x08, 0x00, 0x12, 0x65, 0x40, 0x4a, 0xb3 }}
-#endif
-#else
- {0x11fc3484, 0x475c, 0x11dc, { 0x83, 0x14, 0x08, 0x00, 0x20, 0x0c, 0x9a, 0x66 }}
-#endif
};
// Main jabber server connection thread global variables
-void TlenLoadOptions(TlenProtocol *proto);
-int TlenOptionsInit(void *ptr, WPARAM wParam, LPARAM lParam);
int TlenUserInfoInit(void *ptr, WPARAM wParam, LPARAM lParam);
int TlenSystemModulesLoaded(void *ptr, WPARAM wParam, LPARAM lParam);
-extern void TlenInitServicesVTbl(TlenProtocol *proto);
-extern int JabberContactDeleted(void *ptr, WPARAM wParam, LPARAM lParam);
-extern int JabberDbSettingChanged(void *ptr, WPARAM wParam, LPARAM lParam);
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
@@ -96,18 +69,13 @@ BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved) return TRUE;
}
-__declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx( DWORD mirandaVersion )
+extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
- if ( mirandaVersion < PLUGIN_MAKE_VERSION( 0,8,0,15 )) {
- MessageBox( NULL, TranslateT("The Tlen protocol plugin cannot be loaded. It requires Miranda IM 0.8.0.15 or later."), TranslateT("Tlen Protocol Plugin"), MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST );
- return NULL;
- }
-
return &pluginInfoEx;
}
extern "C" __declspec(dllexport) const MUUID interfaces[] = {MIID_PROTOCOL, MIID_LAST};
-__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
{
return interfaces;
}
@@ -116,27 +84,27 @@ struct {
TCHAR* szDescr;
char* szName;
- int defIconID;
+ int defIconID;
HANDLE hIconLibItem;
}
static iconList[] =
{
- { _T("Protocol icon"), "PROTO", IDI_TLEN },
- { _T("Tlen inbox"), "MAIL", IDI_MAIL },
- { _T("Group chats"), "MUC", IDI_MUC },
- { _T("Tlen chats"), "CHATS", IDI_CHATS },
- { _T("Grant authorization"), "GRANT", IDI_GRANT },
- { _T("Request authorization"),"REQUEST", IDI_REQUEST },
- { _T("Voice chat"), "VOICE", IDI_VOICE },
- { _T("Microphone"), "MICROPHONE", IDI_MICROPHONE },
- { _T("Speaker"), "SPEAKER", IDI_SPEAKER },
- { _T("Send image"), "IMAGE", IDI_IMAGE }
+ { _T("Protocol icon"), "PROTO", IDI_TLEN },
+ { _T("Tlen inbox"), "MAIL", IDI_MAIL },
+ { _T("Group chats"), "MUC", IDI_MUC },
+ { _T("Tlen chats"), "CHATS", IDI_CHATS },
+ { _T("Grant authorization"), "GRANT", IDI_GRANT },
+ { _T("Request authorization"), "REQUEST", IDI_REQUEST },
+ { _T("Voice chat"), "VOICE", IDI_VOICE },
+ { _T("Microphone"), "MICROPHONE", IDI_MICROPHONE },
+ { _T("Speaker"), "SPEAKER", IDI_SPEAKER },
+ { _T("Send image"), "IMAGE", IDI_IMAGE }
};
static HANDLE GetIconHandle(int iconId) {
int i;
- for(i = 0; i < SIZEOF(iconList); i++)
- if(iconList[i].defIconID == iconId)
+ for (i = 0; i < SIZEOF(iconList); i++)
+ if (iconList[i].defIconID == iconId)
return iconList[i].hIconLibItem;
return NULL;
}
@@ -162,18 +130,18 @@ static int TlenIconsChanged(void *ptr, WPARAM wParam, LPARAM lParam) static void TlenRegisterIcons()
{
- SKINICONDESC sid = { 0 };
- char path[MAX_PATH];
+ SKINICONDESC sid = { 0 };
+ char path[MAX_PATH];
TCHAR szSectionName[100];
int i;
mir_sntprintf(szSectionName, SIZEOF( szSectionName ), _T("%s/%s"), _T("Protocols"), _T("Tlen"));
- GetModuleFileNameA(hInst, path, MAX_PATH);
- sid.cbSize = sizeof(SKINICONDESC);
- sid.cx = sid.cy = 16;
- sid.ptszSection = szSectionName;
- sid.pszDefaultFile = path;
- sid.flags = SIDF_TCHAR;
+ GetModuleFileNameA(hInst, path, MAX_PATH);
+ sid.cbSize = sizeof(SKINICONDESC);
+ sid.cx = sid.cy = 16;
+ sid.ptszSection = szSectionName;
+ sid.pszDefaultFile = path;
+ sid.flags = SIDF_TCHAR;
for ( i = 0; i < SIZEOF(iconList); i++ ) {
char szSettingName[100];
@@ -181,46 +149,46 @@ static void TlenRegisterIcons() sid.pszName = szSettingName;
sid.pszDescription = (char*)iconList[i].szDescr;
sid.iDefaultIndex = -iconList[i].defIconID;
- iconList[i].hIconLibItem = ( HANDLE )CallService(MS_SKIN2_ADDICON, 0, (LPARAM)&sid);
+ iconList[i].hIconLibItem = Skin_AddIcon(&sid);;
}
}
-static int TlenPrebuildContactMenu(void *ptr, WPARAM wParam, LPARAM lParam)
+int TlenPrebuildContactMenu(void *ptr, WPARAM wParam, LPARAM lParam)
{
HANDLE hContact;
DBVARIANT dbv;
CLISTMENUITEM clmi = {0};
JABBER_LIST_ITEM *item;
- TlenProtocol *proto = (TlenProtocol *)ptr;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
clmi.cbSize = sizeof(CLISTMENUITEM);
- if ((hContact=(HANDLE) wParam)!=NULL && proto->isOnline) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if ((hContact=(HANDLE) wParam) != NULL && proto->isOnline) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
if ((item=JabberListGetItemPtr(proto, LIST_ROSTER, dbv.pszVal)) != NULL) {
- if (item->subscription==SUB_NONE || item->subscription==SUB_FROM)
+ if (item->subscription == SUB_NONE || item->subscription == SUB_FROM)
clmi.flags = CMIM_FLAGS;
else
clmi.flags = CMIM_FLAGS|CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuContactRequestAuth, (LPARAM) &clmi);
- if (item->subscription==SUB_NONE || item->subscription==SUB_TO)
+ if (item->subscription == SUB_NONE || item->subscription == SUB_TO)
clmi.flags = CMIM_FLAGS;
else
clmi.flags = CMIM_FLAGS|CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuContactGrantAuth, (LPARAM) &clmi);
- if (item->status!=ID_STATUS_OFFLINE)
+ if (item->status != ID_STATUS_OFFLINE)
clmi.flags = CMIM_FLAGS;
else
clmi.flags = CMIM_FLAGS|CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuContactMUC, (LPARAM) &clmi);
- if (item->status!=ID_STATUS_OFFLINE && !TlenVoiceIsInUse(proto))
+ if (item->status != ID_STATUS_OFFLINE && !TlenVoiceIsInUse(proto))
clmi.flags = CMIM_FLAGS;
else
clmi.flags = CMIM_FLAGS|CMIF_HIDDEN;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuContactVoice, (LPARAM) &clmi);
- if (item->status!=ID_STATUS_OFFLINE)
+ if (item->status != ID_STATUS_OFFLINE)
clmi.flags = CMIM_FLAGS;
else
clmi.flags = CMIM_FLAGS|CMIF_HIDDEN;
@@ -240,13 +208,13 @@ static int TlenPrebuildContactMenu(void *ptr, WPARAM wParam, LPARAM lParam) return 0;
}
-INT_PTR TlenContactMenuHandleRequestAuth(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenContactMenuHandleRequestAuth(void *ptr, LPARAM wParam, LPARAM lParam)
{
HANDLE hContact;
DBVARIANT dbv;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if ((hContact=(HANDLE) wParam)!=NULL && proto->isOnline) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ if ((hContact=(HANDLE) wParam) != NULL && proto->isOnline) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
JabberSend(proto, "<presence to='%s' type='subscribe'/>", dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -254,13 +222,13 @@ INT_PTR TlenContactMenuHandleRequestAuth(void *ptr, WPARAM wParam, LPARAM lParam return 0;
}
-INT_PTR TlenContactMenuHandleGrantAuth(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenContactMenuHandleGrantAuth(void *ptr, LPARAM wParam, LPARAM lParam)
{
HANDLE hContact;
DBVARIANT dbv;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if ((hContact=(HANDLE) wParam)!=NULL && proto->isOnline) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ if ((hContact=(HANDLE) wParam) != NULL && proto->isOnline) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
JabberSend(proto, "<presence to='%s' type='subscribed'/>", dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -268,33 +236,33 @@ INT_PTR TlenContactMenuHandleGrantAuth(void *ptr, WPARAM wParam, LPARAM lParam) return 0;
}
-INT_PTR TlenContactMenuHandleSendPicture(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenContactMenuHandleSendPicture(void *ptr, LPARAM wParam, LPARAM lParam)
{
HANDLE hContact;
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if ((hContact=(HANDLE) wParam)!=NULL && proto->isOnline) {
- SendPicture(proto, hContact);
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ if ((hContact=(HANDLE) wParam) != NULL && proto->isOnline) {
+ SendPicture(proto, hContact);
}
return 0;
}
-INT_PTR TlenMenuHandleInbox(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenMenuHandleInbox(void *ptr, LPARAM wParam, LPARAM lParam)
{
char szFileName[ MAX_PATH ];
DBVARIANT dbv;
NETLIBHTTPREQUEST req;
NETLIBHTTPHEADER headers[2];
- NETLIBHTTPREQUEST *resp;
+ NETLIBHTTPREQUEST *resp;
char *login = NULL, *password = NULL;
char form[1024];
char cookie[1024];
- TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginName", &dbv)) {
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginName", &dbv)) {
login = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
}
- if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "SavePassword", TRUE) == TRUE) {
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "Password", &dbv)) {
+ if (DBGetContactSettingByte(NULL, proto->m_szModuleName, "SavePassword", TRUE) == TRUE) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "Password", &dbv)) {
CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM) dbv.pszVal);
password = mir_strdup(dbv.pszVal);
DBFreeVariant(&dbv);
@@ -319,10 +287,10 @@ INT_PTR TlenMenuHandleInbox(void *ptr, WPARAM wParam, LPARAM lParam) req.szUrl = "http://poczta.o2.pl/login.html";
resp = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)proto->hNetlibUser, (LPARAM)&req);
if (resp != NULL) {
- if (resp->resultCode/100==2 || resp->resultCode == 302) {
+ if (resp->resultCode/100 == 2 || resp->resultCode == 302) {
int i;
for (i=0; i<resp->headersCount; i++ ) {
- if (strcmpi(resp->headers[i].szName, "Set-Cookie")==0) {
+ if (strcmpi(resp->headers[i].szName, "Set-Cookie") == 0) {
char *start = strstr(resp->headers[i].szValue, "ssid=");
if (start != NULL) {
char *end = strstr(resp->headers[i].szValue, ";");
@@ -346,38 +314,40 @@ INT_PTR TlenMenuHandleInbox(void *ptr, WPARAM wParam, LPARAM lParam) return 0;
}
-int TlenOnModulesLoaded(void *ptr, WPARAM wParam, LPARAM lParam) {
+int TlenOnModulesLoaded(void *ptr, WPARAM wParam, LPARAM lParam)
+{
char str[128];
- TlenProtocol *proto = (TlenProtocol *)ptr;
- /* Set all contacts to offline */
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ /* Set all contacts to offline */
+ HANDLE hContact = db_find_first();
while (hContact != NULL) {
char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if(szProto!=NULL && !strcmp(szProto, proto->iface.m_szModuleName)) {
- if (DBGetContactSettingWord(hContact, proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
- DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE);
+ if (szProto != NULL && !strcmp(szProto, proto->m_szModuleName)) {
+ if (DBGetContactSettingWord(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
+ DBWriteContactSettingWord(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
TlenMUCInit(proto);
- sprintf(str, "%s", Translate("Incoming mail"));
- SkinAddNewSoundEx("TlenMailNotify", proto->iface.m_szProtoName, str);
- sprintf(str, "%s", Translate("Alert"));
- SkinAddNewSoundEx("TlenAlertNotify", proto->iface.m_szProtoName, str);
- sprintf(str, "%s", Translate("Voice chat"));
- SkinAddNewSoundEx("TlenVoiceNotify", proto->iface.m_szProtoName, str);
+ sprintf(str, "%s", LPGEN("Incoming mail"));
+ SkinAddNewSoundEx("TlenMailNotify", proto->m_szProtoName, str);
+ sprintf(str, "%s", LPGEN("Alert"));
+ SkinAddNewSoundEx("TlenAlertNotify", proto->m_szProtoName, str);
+ sprintf(str, "%s", LPGEN("Voice chat"));
+ SkinAddNewSoundEx("TlenVoiceNotify", proto->m_szProtoName, str);
- HookEventObj_Ex(ME_USERINFO_INITIALISE, proto, TlenUserInfoInit);
+ HookEventObj_Ex(ME_USERINFO_INITIALISE, proto, TlenUserInfoInit);
- return 0;
+ return 0;
}
+
int TlenPreShutdown(void *ptr, WPARAM wParam, LPARAM lParam)
{
- JabberLog(ptr, "TLEN TlenPreShutdown");
- //TlenProtocol *proto = (TlenProtocol *)ptr;
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ JabberLog(proto, "TLEN TlenPreShutdown");
return 0;
}
@@ -393,104 +363,104 @@ static void initMenuItems(TlenProtocol *proto) clmi.cbSize = sizeof(CLISTMENUITEM);
clmi.flags = CMIM_FLAGS | CMIF_GRAYED;
- mi.pszContactOwner = proto->iface.m_szModuleName;
+ mi.pszContactOwner = proto->m_szModuleName;
mi.popupPosition = 500090000;
- strcpy(text, proto->iface.m_szModuleName);
+ strcpy(text, proto->m_szModuleName);
mi.pszService = text;
- mi.ptszName = proto->iface.m_tszUserName;
+ mi.ptszName = proto->m_tszUserName;
mi.position = -1999901009;
mi.pszPopupName = (char *)-1;
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR | CMIF_ICONFROMICOLIB;
mi.icolibItem = GetIconHandle(IDI_TLEN);
- proto->hMenuRoot = (HANDLE)CallService( MS_CLIST_ADDMAINMENUITEM, (WPARAM)0, (LPARAM)&mi);
+ proto->hMenuRoot = Menu_AddMainMenuItem(&mi);
- mi.flags = CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB;
- //mi.pszPopupName = (char *)proto->hMenuRoot;
- mi.hParentMenu = (HGENMENU)proto->hMenuRoot;
+ mi.flags = CMIF_CHILDPOPUP | CMIF_ICONFROMICOLIB;
+ //mi.pszPopupName = (char *)proto->hMenuRoot;
+ mi.hParentMenu = (HGENMENU)proto->hMenuRoot;
- proto->hMenuChats = NULL;
- if(ServiceExists(MS_MUCC_NEW_WINDOW))
+ proto->hMenuChats = NULL;
+ if (ServiceExists(MS_MUCC_NEW_WINDOW))
{
- sprintf(text, "%s/MainMenuChats", proto->iface.m_szModuleName);
+ sprintf(text, "%s/MainMenuChats", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenMUCMenuHandleChats);
mi.pszName = "Tlen Chats";
mi.position = 2000050001;
mi.icolibItem = GetIconHandle(IDI_CHATS);
mi.pszService = text;
- proto->hMenuChats = (HANDLE) CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM) &mi);
+ proto->hMenuChats = Menu_AddMainMenuItem(&mi);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuChats, (LPARAM) &clmi);
}
// "Multi-User Conference"
- sprintf(text, "%s/MainMenuMUC", proto->iface.m_szModuleName);
+ sprintf(text, "%s/MainMenuMUC", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenMUCMenuHandleMUC);
mi.pszName = "Multi-User Conference";
mi.position = 2000050002;
mi.icolibItem = GetIconHandle(IDI_MUC);
mi.pszService = text;
- proto->hMenuMUC = (HANDLE) CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM) &mi);
+ proto->hMenuMUC = Menu_AddMainMenuItem(&mi);
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM) proto->hMenuMUC, (LPARAM) &clmi);
- sprintf(text, "%s/MainMenuInbox", proto->iface.m_szModuleName);
+ sprintf(text, "%s/MainMenuInbox", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenMenuHandleInbox);
mi.pszName = "Tlen Mail";
mi.position = 2000050003;
mi.icolibItem = GetIconHandle(IDI_MAIL);
mi.pszService = text;
- proto->hMenuInbox = (HANDLE) CallService(MS_CLIST_ADDMAINMENUITEM, 0, (LPARAM) &mi);
+ proto->hMenuInbox = Menu_AddMainMenuItem(&mi);
mi.hParentMenu = NULL;
// "Send picture"
- sprintf(text, "%s/SendPicture", proto->iface.m_szModuleName);
+ sprintf(text, "%s/SendPicture", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenContactMenuHandleSendPicture);
mi.flags = CMIF_ICONFROMICOLIB;
mi.pszName = "Send picture";
mi.position = -2000019030;
mi.icolibItem = GetIconHandle(IDI_IMAGE);
mi.pszService = text;
- proto->hMenuPicture = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ proto->hMenuPicture = Menu_AddContactMenuItem(&mi);
// "Invite to MUC"
- sprintf(text, "%s/ContactMenuMUC", proto->iface.m_szModuleName);
+ sprintf(text, "%s/ContactMenuMUC", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenMUCContactMenuHandleMUC);
mi.pszName = "Multi-User Conference";
mi.position = -2000019020;
mi.icolibItem = GetIconHandle(IDI_MUC);
mi.pszService = text;
- proto->hMenuContactMUC = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ proto->hMenuContactMUC = Menu_AddContactMenuItem(&mi);
// "Invite to voice chat"
- sprintf(text, "%s/ContactMenuVoice", proto->iface.m_szModuleName);
+ sprintf(text, "%s/ContactMenuVoice", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenVoiceContactMenuHandleVoice);
mi.pszName = "Voice Chat";
mi.position = -2000019010;
mi.icolibItem = GetIconHandle(IDI_VOICE);
mi.pszService = text;
- proto->hMenuContactVoice = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ proto->hMenuContactVoice = Menu_AddContactMenuItem(&mi);
// "Request authorization"
- sprintf(text, "%s/RequestAuth", proto->iface.m_szModuleName);
+ sprintf(text, "%s/RequestAuth", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenContactMenuHandleRequestAuth);
mi.pszName = "Request authorization";
mi.position = -2000001001;
mi.icolibItem = GetIconHandle(IDI_REQUEST);
mi.pszService = text;
- proto->hMenuContactRequestAuth = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ proto->hMenuContactRequestAuth = Menu_AddContactMenuItem(&mi);
// "Grant authorization"
- sprintf(text, "%s/GrantAuth", proto->iface.m_szModuleName);
+ sprintf(text, "%s/GrantAuth", proto->m_szModuleName);
CreateServiceFunction_Ex(text, proto, TlenContactMenuHandleGrantAuth);
mi.pszName = "Grant authorization";
mi.position = -2000001000;
mi.icolibItem = GetIconHandle(IDI_GRANT);
mi.pszService = text;
- proto->hMenuContactGrantAuth = (HANDLE) CallService(MS_CLIST_ADDCONTACTMENUITEM, 0, (LPARAM) &mi);
+ proto->hMenuContactGrantAuth = Menu_AddContactMenuItem(&mi);
}
-static void uninitMenuItems(TlenProtocol *proto) {
+void uninitMenuItems(TlenProtocol *proto) {
CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)proto->hMenuChats, (LPARAM) 0);
CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)proto->hMenuMUC, (LPARAM) 0);
CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)proto->hMenuInbox, (LPARAM) 0);
@@ -502,118 +472,37 @@ static void uninitMenuItems(TlenProtocol *proto) { CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)proto->hMenuContactGrantAuth, (LPARAM) 0);
}
-
-static TlenProtocol *tlenProtoInit( const char* pszProtoName, const TCHAR* tszUserName )
+TlenProtocol* tlenProtoInit( const char* pszProtoName, const TCHAR* tszUserName )
{
- DBVARIANT dbv;
- char text[_MAX_PATH];
- TlenProtocol *proto = (TlenProtocol *)mir_alloc(sizeof(TlenProtocol));
- memset(proto, 0, sizeof(TlenProtocol));
- proto->iface.m_tszUserName = mir_tstrdup( tszUserName );
- proto->iface.m_szModuleName = mir_strdup(pszProtoName);
- proto->iface.m_szProtoName = mir_strdup(pszProtoName);
- _strlwr( proto->iface.m_szProtoName );
- proto->iface.m_szProtoName[0] = toupper( proto->iface.m_szProtoName[0] );
- proto->iface.m_iStatus = ID_STATUS_OFFLINE;
- TlenInitServicesVTbl(proto);
-
- InitializeCriticalSection(&proto->modeMsgMutex);
- InitializeCriticalSection(&proto->csSend);
-
- sprintf(text, "%s/%s", proto->iface.m_szModuleName, "Nudge");
- proto->hTlenNudge = CreateHookableEvent(text);
-
- HookEventObj_Ex(ME_SYSTEM_MODULESLOADED, proto, TlenSystemModulesLoaded);
- HookEventObj_Ex(ME_OPT_INITIALISE, proto, TlenOptionsInit);
- HookEventObj_Ex(ME_DB_CONTACT_SETTINGCHANGED, proto, JabberDbSettingChanged);
- HookEventObj_Ex(ME_DB_CONTACT_DELETED, proto, JabberContactDeleted);
- HookEventObj_Ex(ME_CLIST_PREBUILDCONTACTMENU, proto, TlenPrebuildContactMenu);
-// HookEventObj_Ex(ME_SKIN2_ICONSCHANGED, proto, TlenIconsChanged);
- HookEventObj_Ex(ME_SYSTEM_PRESHUTDOWN, proto, TlenPreShutdown);
-
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
- DBFreeVariant(&dbv);
- } else {
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "LoginServer", "tlen.pl");
- }
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "ManualHost", &dbv)) {
- DBFreeVariant(&dbv);
- } else {
- DBWriteContactSettingString(NULL, proto->iface.m_szModuleName, "ManualHost", "s1.tlen.pl");
- }
-
- TlenLoadOptions(proto);
+ TlenProtocol* ppro = new TlenProtocol( pszProtoName, tszUserName );
- JabberWsInit(proto);
- JabberSerialInit(proto);
- JabberIqInit(proto);
- JabberListInit(proto);
-
- return proto;
+ return ppro;
}
int TlenSystemModulesLoaded(void *ptr, WPARAM wParam, LPARAM lParam)
{
- TlenProtocol *proto = (TlenProtocol *)ptr;
- initMenuItems(proto);
-
- // updater plugin support
- if(ServiceExists(MS_UPDATE_REGISTERFL))
- {
- PLUGININFO* pluginInfoPtr = (PLUGININFO*)&pluginInfoEx;
- #ifdef _UNICODE
- #ifdef _X64
- CallService(MS_UPDATE_REGISTERFL, (WPARAM)4435, (LPARAM)pluginInfoPtr); //x64 version
- #else
- CallService(MS_UPDATE_REGISTERFL, (WPARAM)4405, (LPARAM)pluginInfoPtr); //Unicode version
- #endif
- #else
- CallService(MS_UPDATE_REGISTERFL, (WPARAM)4404, (LPARAM)pluginInfoPtr); //ANSI version
- #endif
- }
+ TlenProtocol *proto = (TlenProtocol *)ptr;
+ initMenuItems(proto);
return 0;
}
-static int tlenProtoUninit( TlenProtocol *proto )
+static int tlenProtoUninit( TlenProtocol* ppro )
{
- uninitMenuItems(proto);
- TlenVoiceCancelAll(proto);
- TlenFileCancelAll(proto);
- if (proto->hTlenNudge)
- DestroyHookableEvent(proto->hTlenNudge);
- UnhookEvents_Ex(proto);
- JabberListUninit(proto);
- JabberIqUninit(proto);
- JabberSerialUninit(proto);
- DeleteCriticalSection(&proto->modeMsgMutex);
- DeleteCriticalSection(&proto->csSend);
- //DestroyServices_Ex(proto);
- JabberWsUninit(proto);
- mir_free(proto->modeMsgs.szOnline);
- mir_free(proto->modeMsgs.szAway);
- mir_free(proto->modeMsgs.szNa);
- mir_free(proto->modeMsgs.szDnd);
- mir_free(proto->modeMsgs.szFreechat);
- mir_free(proto->modeMsgs.szInvisible);
- mir_free(proto);
- return 0;
+ delete ppro;
+ return 0;
}
-int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void)
{
PROTOCOLDESCRIPTOR pd;
- pluginLink = link;
- mir_getMMI( &mmi );
- mir_getMD5I( &md5i );
- mir_getSHA1I( &sha1i );
- mir_getUTFI( &utfi );
+ mir_getLP( &pluginInfoEx );
DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &hMainThread, THREAD_SET_CONTEXT, FALSE, 0);
- srand((unsigned) time(NULL));
+ srand((unsigned) time(NULL));
TlenRegisterIcons();
@@ -621,7 +510,7 @@ int __declspec(dllexport) Load(PLUGINLINK *link) ZeroMemory(&pd, sizeof(PROTOCOLDESCRIPTOR));
pd.cbSize = sizeof(PROTOCOLDESCRIPTOR);
pd.szName = "TLEN";
- pd.fnInit = ( pfnInitProto )tlenProtoInit;
+ pd.fnInit = ( pfnInitProto )tlenProtoInit;
pd.fnUninit = ( pfnUninitProto )tlenProtoUninit;
pd.type = PROTOTYPE_PROTOCOL;
CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM) &pd);
@@ -629,7 +518,7 @@ int __declspec(dllexport) Load(PLUGINLINK *link) return 0;
}
-int __declspec(dllexport) Unload(void)
+extern "C" int __declspec(dllexport) Unload(void)
{
return 0;
}
diff --git a/plugins/!NotAdopted/Tlen/tlen_advsearch.c b/protocols/Tlen/src/tlen_advsearch.cpp index 5e3d5465b8..5a338a3bd6 100644 --- a/plugins/!NotAdopted/Tlen/tlen_advsearch.c +++ b/protocols/Tlen/src/tlen_advsearch.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -31,7 +31,7 @@ static void InitComboBox(HWND hwndCombo, JABBER_FIELD_MAP *fieldMap) n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)_T(""));
SendMessage(hwndCombo, CB_SETITEMDATA, n, 0);
SendMessage(hwndCombo, CB_SETCURSEL, n, 0);
- for(i=0;;i++) {
+ for (i=0;;i++) {
if (fieldMap[i].name == NULL)
break;
n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) TranslateTS(fieldMap[i].name));
@@ -59,7 +59,7 @@ static void FetchField(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, i char text[512];
char *localFieldName, *localText;
- if (hwndDlg==NULL || fieldName==NULL || str==NULL || strSize==NULL)
+ if (hwndDlg == NULL || fieldName == NULL || str == NULL || strSize == NULL)
return;
GetDlgItemTextA(hwndDlg, idCtrl, text, sizeof(text));
if (text[0]) {
@@ -78,7 +78,7 @@ static void FetchCombo(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, i int value;
char *localFieldName;
- if (hwndDlg==NULL || fieldName==NULL || str==NULL || strSize==NULL)
+ if (hwndDlg == NULL || fieldName == NULL || str == NULL || strSize == NULL)
return;
value = (int) SendDlgItemMessage(hwndDlg, idCtrl, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, idCtrl, CB_GETCURSEL, 0, 0), 0);
if (value > 0) {
diff --git a/plugins/!NotAdopted/Tlen/tlen_avatar.c b/protocols/Tlen/src/tlen_avatar.cpp index e06c793344..8acf004681 100644 --- a/plugins/!NotAdopted/Tlen/tlen_avatar.c +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -19,10 +19,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include <stdio.h>
+
#include "jabber.h"
#include "jabber_list.h"
#include "tlen_avatar.h"
+#include <stdio.h>
#include <io.h>
#include <fcntl.h>
#include <sys/types.h>
@@ -30,71 +31,75 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. /* TlenGetAvatarFileName() - gets a file name for the avatar image */
-void TlenGetAvatarFileName(TlenProtocol *proto, JABBER_LIST_ITEM *item, char* pszDest, int cbLen)
+void TlenGetAvatarFileName(TlenProtocol *proto, JABBER_LIST_ITEM *item, TCHAR* ptszDest, int cbLen)
{
DWORD dwAttributes;
int tPathLen;
int format = PA_FORMAT_PNG;
- char* szFileType;
- char *tmpPath = Utils_ReplaceVars( "%miranda_avatarcache%" );
- tPathLen = mir_snprintf( pszDest, cbLen, "%s\\Tlen", tmpPath );
- mir_free(tmpPath);
- dwAttributes = GetFileAttributesA( pszDest );
+ TCHAR* tszFileType;
+ TCHAR* tmpPath = Utils_ReplaceVarsT( TEXT("%miranda_avatarcache%") );
+ tPathLen = mir_sntprintf( ptszDest, cbLen, TEXT("%s\\Tlen"), tmpPath );
+ mir_free(tmpPath);
+ dwAttributes = GetFileAttributes( ptszDest );
if ( dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 ) {
- CallService( MS_UTILS_CREATEDIRTREE, 0, ( LPARAM )pszDest );
+ CallService( MS_UTILS_CREATEDIRTREET, 0, ( LPARAM )ptszDest );
}
- pszDest[ tPathLen++ ] = '\\';
+ ptszDest[ tPathLen++ ] = '\\';
if (item != NULL) {
format = item->avatarFormat;
} else if (proto->threadData != NULL) {
format = proto->threadData->avatarFormat;
} else {
- format = DBGetContactSettingDword(NULL, proto->iface.m_szModuleName, "AvatarFormat", PA_FORMAT_UNKNOWN);
+ format = DBGetContactSettingDword(NULL, proto->m_szModuleName, "AvatarFormat", PA_FORMAT_UNKNOWN);
}
- szFileType = "png";
+ tszFileType = TEXT("png");
switch(format) {
- case PA_FORMAT_JPEG: szFileType = "jpg"; break;
- case PA_FORMAT_ICON: szFileType = "ico"; break;
- case PA_FORMAT_PNG: szFileType = "png"; break;
- case PA_FORMAT_GIF: szFileType = "gif"; break;
- case PA_FORMAT_BMP: szFileType = "bmp"; break;
+ case PA_FORMAT_JPEG: tszFileType = TEXT("jpg"); break;
+ case PA_FORMAT_ICON: tszFileType = TEXT("ico"); break;
+ case PA_FORMAT_PNG: tszFileType = TEXT("png"); break;
+ case PA_FORMAT_GIF: tszFileType = TEXT("gif"); break;
+ case PA_FORMAT_BMP: tszFileType = TEXT("bmp"); break;
}
if ( item != NULL ) {
char* hash;
hash = JabberSha1(item->jid);
- mir_snprintf( pszDest + tPathLen, MAX_PATH - tPathLen, "%s.%s", hash, szFileType );
+ TCHAR* hashT = mir_a2t(hash);
mir_free( hash );
+ mir_sntprintf( ptszDest + tPathLen, MAX_PATH - tPathLen, TEXT("%s.%s"), hashT, tszFileType );
+ mir_free( hashT );
} else {
- mir_snprintf( pszDest + tPathLen, MAX_PATH - tPathLen, "%s_avatar.%s", proto->iface.m_szModuleName, szFileType );
+ TCHAR* m_tszModuleName = mir_a2t(proto->m_szModuleName);
+ mir_sntprintf( ptszDest + tPathLen, MAX_PATH - tPathLen, TEXT("%s_avatar.%s"), m_tszModuleName, tszFileType );
+ mir_free( m_tszModuleName );
}
}
static void RemoveAvatar(TlenProtocol *proto, HANDLE hContact) {
- char tFileName[ MAX_PATH ];
+ TCHAR tFileName[ MAX_PATH ];
if (hContact == NULL) {
proto->threadData->avatarHash[0] = '\0';
}
TlenGetAvatarFileName( proto, NULL, tFileName, sizeof tFileName );
- DeleteFileA(tFileName);
+ DeleteFile(tFileName);
DBDeleteContactSetting(hContact, "ContactPhoto", "File");
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "AvatarHash");
- DBDeleteContactSetting(hContact, proto->iface.m_szModuleName, "AvatarFormat");
- ProtoBroadcastAck(proto->iface.m_szModuleName, NULL, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "AvatarHash");
+ DBDeleteContactSetting(hContact, proto->m_szModuleName, "AvatarFormat");
+ ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
static void SetAvatar(TlenProtocol *proto, HANDLE hContact, JABBER_LIST_ITEM *item, char *data, int len, DWORD format) {
FILE* out;
- char filename[MAX_PATH];
+ TCHAR filename[MAX_PATH];
char md5[33];
- mir_md5_state_t ctx;
- DWORD digest[4];
+ mir_md5_state_t ctx;
+ DWORD digest[4];
if (format == PA_FORMAT_UNKNOWN && len > 4) {
format = JabberGetPictureType(data);
}
mir_md5_init( &ctx );
- mir_md5_append( &ctx, ( BYTE* )data, len);
+ mir_md5_append( &ctx, ( BYTE* )data, len);
mir_md5_finish( &ctx, ( BYTE* )digest );
sprintf( md5, "%08x%08x%08x%08x", (int)htonl(digest[0]), (int)htonl(digest[1]), (int)htonl(digest[2]), (int)htonl(digest[3]));
@@ -108,16 +113,16 @@ static void SetAvatar(TlenProtocol *proto, HANDLE hContact, JABBER_LIST_ITEM *it strcpy(proto->threadData->avatarHash, md5);
}
TlenGetAvatarFileName(proto, item, filename, sizeof filename );
- DeleteFileA(filename);
- out = fopen( filename, "wb" );
+ DeleteFile(filename);
+ out = _tfopen( filename, TEXT("wb") );
if ( out != NULL ) {
fwrite( data, len, 1, out );
fclose( out );
- DBWriteContactSettingString(hContact, "ContactPhoto", "File", filename );
- DBWriteContactSettingString(hContact, proto->iface.m_szModuleName, "AvatarHash", md5);
- DBWriteContactSettingDword(hContact, proto->iface.m_szModuleName, "AvatarFormat", format);
+ DBWriteContactSettingTString(hContact, "ContactPhoto", "File", filename );
+ DBWriteContactSettingString(hContact, proto->m_szModuleName, "AvatarHash", md5);
+ DBWriteContactSettingDword(hContact, proto->m_szModuleName, "AvatarFormat", format);
}
- ProtoBroadcastAck( proto->iface.m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL , 0);
+ ProtoBroadcastAck( proto->m_szModuleName, hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL , 0);
}
int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, JABBER_LIST_ITEM *item) {
@@ -225,17 +230,17 @@ static char *replaceTokens(const char *base, const char *uri, const char *login, static int getAvatarMutex = 0;
typedef struct {
- TlenProtocol *proto;
- HANDLE hContact;
+ TlenProtocol *proto;
+ HANDLE hContact;
} TLENGETAVATARTHREADDATA;
static void TlenGetAvatarThread(void *ptr) {
- JABBER_LIST_ITEM *item = NULL;
+ JABBER_LIST_ITEM *item = NULL;
NETLIBHTTPREQUEST req;
- NETLIBHTTPREQUEST *resp;
- TLENGETAVATARTHREADDATA *data = (TLENGETAVATARTHREADDATA *)ptr;
- HANDLE hContact = data->hContact;
+ NETLIBHTTPREQUEST *resp;
+ TLENGETAVATARTHREADDATA *data = (TLENGETAVATARTHREADDATA *)ptr;
+ HANDLE hContact = data->hContact;
char *request;
char *login = NULL;
if (hContact != NULL) {
@@ -248,7 +253,7 @@ static void TlenGetAvatarThread(void *ptr) { }
if ((data->proto->threadData != NULL && hContact == NULL) || item != NULL) {
DWORD format = PA_FORMAT_UNKNOWN;
- if (item!= NULL) {
+ if (item != NULL) {
item->newAvatarDownloading = TRUE;
}
request = replaceTokens(data->proto->threadData->tlenConfig.mailBase, data->proto->threadData->tlenConfig.avatarGet, login, data->proto->threadData->avatarToken, 0, 0);
@@ -261,26 +266,26 @@ static void TlenGetAvatarThread(void *ptr) { req.dataLength = 0;
req.szUrl = request;
resp = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)data->proto->hNetlibUser, (LPARAM)&req);
- if (item!= NULL) {
+ if (item != NULL) {
item->newAvatarDownloading = FALSE;
}
if (resp != NULL) {
- if (resp->resultCode/100==2) {
+ if (resp->resultCode/100 == 2) {
if (resp->dataLength > 0) {
int i;
for (i=0; i<resp->headersCount; i++ ) {
- if (strcmpi(resp->headers[i].szName, "Content-Type")==0) {
- if (strcmpi(resp->headers[i].szValue, "image/png")==0) {
+ if (strcmpi(resp->headers[i].szName, "Content-Type") == 0) {
+ if (strcmpi(resp->headers[i].szValue, "image/png") == 0) {
format = PA_FORMAT_PNG;
- } else if (strcmpi(resp->headers[i].szValue, "image/x-png")==0) {
+ } else if (strcmpi(resp->headers[i].szValue, "image/x-png") == 0) {
format = PA_FORMAT_PNG;
- } else if (strcmpi(resp->headers[i].szValue, "image/jpeg")==0) {
+ } else if (strcmpi(resp->headers[i].szValue, "image/jpeg") == 0) {
format = PA_FORMAT_JPEG;
- } else if (strcmpi(resp->headers[i].szValue, "image/jpg")==0) {
+ } else if (strcmpi(resp->headers[i].szValue, "image/jpg") == 0) {
format = PA_FORMAT_JPEG;
- } else if (strcmpi(resp->headers[i].szValue, "image/gif")==0) {
+ } else if (strcmpi(resp->headers[i].szValue, "image/gif") == 0) {
format = PA_FORMAT_GIF;
- } else if (strcmpi(resp->headers[i].szValue, "image/bmp")==0) {
+ } else if (strcmpi(resp->headers[i].szValue, "image/bmp") == 0) {
format = PA_FORMAT_BMP;
}
break;
@@ -299,7 +304,7 @@ static void TlenGetAvatarThread(void *ptr) { if (hContact == NULL) {
getAvatarMutex = 0;
}
- mir_free(data);
+ mir_free(data);
}
void TlenGetAvatar(TlenProtocol *proto, HANDLE hContact) {
@@ -309,22 +314,22 @@ void TlenGetAvatar(TlenProtocol *proto, HANDLE hContact) { }
getAvatarMutex = 1;
}
- {
- TLENGETAVATARTHREADDATA *data = (TLENGETAVATARTHREADDATA *)mir_alloc(sizeof(TLENGETAVATARTHREADDATA));
- data->proto = proto;
- data->hContact = hContact;
- JabberForkThread(TlenGetAvatarThread, 0, data);
- }
+ {
+ TLENGETAVATARTHREADDATA *data = (TLENGETAVATARTHREADDATA *)mir_alloc(sizeof(TLENGETAVATARTHREADDATA));
+ data->proto = proto;
+ data->hContact = hContact;
+ JabberForkThread(TlenGetAvatarThread, 0, data);
+ }
}
typedef struct {
- TlenProtocol *proto;
- NETLIBHTTPREQUEST *req;
+ TlenProtocol *proto;
+ NETLIBHTTPREQUEST *req;
}TLENREMOVEAVATARTHREADDATA;
static void TlenRemoveAvatarRequestThread(void *ptr) {
NETLIBHTTPREQUEST *resp;
- TLENREMOVEAVATARTHREADDATA *data = ptr;
+ TLENREMOVEAVATARTHREADDATA *data = (TLENREMOVEAVATARTHREADDATA*)ptr;
NETLIBHTTPREQUEST *req = (NETLIBHTTPREQUEST *)data->req;
resp = (NETLIBHTTPREQUEST *)CallService(MS_NETLIB_HTTPTRANSACTION, (WPARAM)data->proto->hNetlibUser, (LPARAM)req);
mir_free(req->szUrl);
@@ -335,12 +340,12 @@ static void TlenRemoveAvatarRequestThread(void *ptr) { CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT, (WPARAM)0, (LPARAM)resp);
RemoveAvatar(data->proto, NULL);
}
- mir_free(data);
+ mir_free(data);
}
typedef struct {
- TlenProtocol *proto;
+ TlenProtocol *proto;
NETLIBHTTPREQUEST *req;
char *data;
int length;
@@ -367,10 +372,10 @@ void TlenRemoveAvatar(TlenProtocol *proto) { NETLIBHTTPREQUEST *req;
char *request;
if (proto->threadData != NULL) {
- TLENREMOVEAVATARTHREADDATA *data = (TLENREMOVEAVATARTHREADDATA *)mir_alloc(sizeof(TLENREMOVEAVATARTHREADDATA));
+ TLENREMOVEAVATARTHREADDATA *data = (TLENREMOVEAVATARTHREADDATA *)mir_alloc(sizeof(TLENREMOVEAVATARTHREADDATA));
req = (NETLIBHTTPREQUEST *)mir_alloc(sizeof(NETLIBHTTPREQUEST));
- data->proto =proto;
- data->req = req;
+ data->proto =proto;
+ data->req = req;
request = replaceTokens(proto->threadData->tlenConfig.mailBase, proto->threadData->tlenConfig.avatarRemove, "", proto->threadData->avatarToken, 0, 0);
ZeroMemory(req, sizeof(NETLIBHTTPREQUEST));
req->cbSize = sizeof(NETLIBHTTPREQUEST);
@@ -393,7 +398,7 @@ void TlenUploadAvatar(TlenProtocol *proto, unsigned char *data, int dataLen, int int size, sizeHead = (int)strlen(mpartHead), sizeTail = (int)strlen(mpartTail);
request = replaceTokens(proto->threadData->tlenConfig.mailBase, proto->threadData->tlenConfig.avatarUpload, "", proto->threadData->avatarToken, 0, access);
threadData = (TLENUPLOADAVATARTHREADDATA *)mir_alloc(sizeof(TLENUPLOADAVATARTHREADDATA));
- threadData->proto = proto;
+ threadData->proto = proto;
req = (NETLIBHTTPREQUEST *)mir_alloc(sizeof(NETLIBHTTPREQUEST));
headers = (NETLIBHTTPHEADER *)mir_alloc(sizeof(NETLIBHTTPHEADER));
ZeroMemory(req, sizeof(NETLIBHTTPREQUEST));
@@ -406,12 +411,12 @@ void TlenUploadAvatar(TlenProtocol *proto, unsigned char *data, int dataLen, int req->headersCount = 1;
req->headers = headers;
size = dataLen + sizeHead + sizeTail;
- buffer = mir_alloc(size);
+ buffer = (unsigned char *)mir_alloc(size);
memcpy(buffer, mpartHead, sizeHead);
memcpy(buffer + sizeHead, data, dataLen);
memcpy(buffer + sizeHead + dataLen, mpartTail, sizeTail);
req->dataLength = size;
- req->pData = buffer;
+ req->pData = (char*)buffer;
threadData->req = req;
threadData->data = (char *) mir_alloc(dataLen);
memcpy(threadData->data, data, dataLen);
diff --git a/plugins/!NotAdopted/Tlen/tlen_avatar.h b/protocols/Tlen/src/tlen_avatar.h index 48a258ed38..0a0694fe11 100644 --- a/plugins/!NotAdopted/Tlen/tlen_avatar.h +++ b/protocols/Tlen/src/tlen_avatar.h @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -26,9 +26,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void TlenProcessPresenceAvatar(TlenProtocol *proto, XmlNode *node, JABBER_LIST_ITEM *item);
int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, JABBER_LIST_ITEM *item);
-void TlenGetAvatarFileName(TlenProtocol *proto, JABBER_LIST_ITEM *item, char* pszDest, int cbLen);
+void TlenGetAvatarFileName(TlenProtocol *proto, JABBER_LIST_ITEM *item, TCHAR* psztDest, int cbLen);
void TlenGetAvatar(TlenProtocol *proto, HANDLE hContact);
void TlenUploadAvatar(TlenProtocol *proto, unsigned char *data, int dataLen, int access);
void TlenRemoveAvatar(TlenProtocol *proto);
-#endif // TLEN_AVATAR_H_INCLUDED
+#endif // _TLEN_AVATAR_H_
diff --git a/plugins/!NotAdopted/Tlen/tlen_file.c b/protocols/Tlen/src/tlen_file.cpp index 9926a09aa6..4a02259245 100644 --- a/plugins/!NotAdopted/Tlen/tlen_file.c +++ b/protocols/Tlen/src/tlen_file.cpp @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -27,9 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "jabber_list.h"
#include "tlen_p2p_old.h"
-extern int TlenFileCancel(PROTO_INTERFACE *ptr, HANDLE hContact, HANDLE hTransfer);
-
-
static void TlenFileReceiveParse(TLEN_FILE_TRANSFER *ft)
{
int i;
@@ -106,13 +103,12 @@ static void TlenFileReceiveParse(TLEN_FILE_TRANSFER *ft) memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = ft->hContact;
- pfts.sending = FALSE;
- pfts.files = ft->files;
+ pfts.pszFiles = ft->files;
pfts.totalFiles = ft->fileCount;
pfts.currentFileNumber = ft->currentFile;
pfts.totalBytes = ft->allFileTotalSize;
- pfts.workingDir = NULL;
- pfts.currentFile = ft->files[ft->currentFile];
+ pfts.szWorkingDir = NULL;
+ pfts.szCurrentFile = ft->files[ft->currentFile];
pfts.currentFileSize = ft->filesSize[ft->currentFile];
pfts.currentFileTime = 0;
JabberLog(ft->proto, "Receiving data...");
@@ -131,7 +127,7 @@ static void TlenFileReceiveParse(TLEN_FILE_TRANSFER *ft) ft->allFileReceivedBytes += writeSize;
pfts.totalProgress = ft->allFileReceivedBytes;
pfts.currentFileProgress = ft->fileReceivedBytes;
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM) &pfts);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM) &pfts);
}
}
else if (rpacket->type == TLEN_FILE_PACKET_END_OF_FILE) { // end of file
@@ -144,7 +140,7 @@ static void TlenFileReceiveParse(TLEN_FILE_TRANSFER *ft) ft->currentFile++;
ft->state = FT_INITIALIZING;
JabberLog(ft->proto, "File received, advancing to the next file...");
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
}
}
TlenP2PPacketFree(rpacket);
@@ -161,20 +157,20 @@ static void TlenFileReceivingConnection(JABBER_SOCKET hConnection, DWORD dwRemot JABBER_SOCKET slisten;
TLEN_FILE_TRANSFER *ft;
- TlenProtocol *proto = (TlenProtocol *)pExtra;
- ft = TlenP2PEstablishIncomingConnection(proto, hConnection, LIST_FILE, TRUE);
+ TlenProtocol *proto = (TlenProtocol *)pExtra;
+ ft = TlenP2PEstablishIncomingConnection(proto, hConnection, LIST_FILE, TRUE);
if (ft != NULL) {
slisten = ft->s;
ft->s = hConnection;
JabberLog(ft->proto, "Set ft->s to %d (saving %d)", hConnection, slisten);
JabberLog(ft->proto, "Entering send loop for this file connection... (ft->s is hConnection)");
- while (ft->state!=FT_DONE && ft->state!=FT_ERROR) {
+ while (ft->state != FT_DONE && ft->state != FT_ERROR) {
TlenFileReceiveParse(ft);
}
- if (ft->state==FT_DONE)
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ if (ft->state == FT_DONE)
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
else
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
JabberLog(ft->proto, "Closing connection for this file transfer... (ft->s is now hBind)");
ft->s = slisten;
JabberLog(ft->proto, "ft->s is restored to %d", ft->s);
@@ -199,13 +195,13 @@ static void __cdecl TlenFileReceiveThread(TLEN_FILE_TRANSFER *ft) nloc.szHost = ft->hostName;
nloc.wPort = ft->wPort;
nloc.flags = 0;
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
s = (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) ft->proto->hNetlibUser, (LPARAM) &nloc);
if (s != NULL) {
ft->s = s;
JabberLog(ft->proto, "Entering file receive loop");
TlenP2PEstablishOutgoingConnection(ft, TRUE);
- while (ft->state!=FT_DONE && ft->state!=FT_ERROR) {
+ while (ft->state != FT_DONE && ft->state != FT_ERROR) {
TlenFileReceiveParse(ft);
}
if (ft->s) {
@@ -238,14 +234,14 @@ static void __cdecl TlenFileReceiveThread(TLEN_FILE_TRANSFER *ft) }
}
JabberListRemove(ft->proto, LIST_FILE, ft->iqId);
- if (ft->state==FT_DONE)
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ if (ft->state == FT_DONE)
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
else {
char *nick;
nick = JabberNickFromJID(ft->jid);
JabberSend(ft->proto, "<f t='%s' i='%s' e='8'/>", nick, ft->iqId);
mir_free(nick);
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
}
JabberLog(ft->proto, "Thread ended: type=file_receive server='%s'", ft->hostName);
@@ -298,12 +294,12 @@ static void TlenFileSendParse(TLEN_FILE_TRANSFER *ft) }
else if (ft->state == FT_INITIALIZING) { // FT_INITIALIZING
rpacket = TlenP2PPacketReceive(ft->s);
- JabberLog(ft->proto, "FT_INITIALIZING: recv %d", rpacket);
+ JabberLog(ft->proto, "FT_INITIALIZING: recv %d", rpacket);
if (rpacket == NULL) {
ft->state = FT_ERROR;
return;
}
- JabberLog(ft->proto, "FT_INITIALIZING: recv type %d", rpacket->type);
+ JabberLog(ft->proto, "FT_INITIALIZING: recv type %d", rpacket->type);
p = rpacket->packet;
// TYPE: TLEN_FILE_PACKET_FILE_LIST_ACK will be ignored
// LEN: 0
@@ -336,13 +332,13 @@ static void TlenFileSendParse(TLEN_FILE_TRANSFER *ft) memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
pfts.hContact = ft->hContact;
- pfts.sending = TRUE;
- pfts.files = ft->files;
+ pfts.flags = PFTS_SENDING;
+ pfts.pszFiles = ft->files;
pfts.totalFiles = ft->fileCount;
pfts.currentFileNumber = ft->currentFile;
pfts.totalBytes = ft->allFileTotalSize;
- pfts.workingDir = NULL;
- pfts.currentFile = ft->files[ft->currentFile];
+ pfts.szWorkingDir = NULL;
+ pfts.szCurrentFile = ft->files[ft->currentFile];
pfts.currentFileSize = ft->filesSize[ft->currentFile]; //statbuf.st_size;
pfts.currentFileTime = 0;
ft->fileReceivedBytes = 0;
@@ -363,7 +359,7 @@ static void TlenFileSendParse(TLEN_FILE_TRANSFER *ft) ft->allFileReceivedBytes += numRead;
pfts.totalProgress = ft->allFileReceivedBytes;
pfts.currentFileProgress = ft->fileReceivedBytes;
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM) &pfts);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_DATA, ft, (LPARAM) &pfts);
}
else {
ft->state = FT_ERROR;
@@ -379,7 +375,7 @@ static void TlenFileSendParse(TLEN_FILE_TRANSFER *ft) ft->currentFile++;
ft->state = FT_INITIALIZING;
JabberLog(ft->proto, "File sent, advancing to the next file...");
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_NEXTFILE, ft, 0);
}
}
JabberLog(ft->proto, "Finishing this file...");
@@ -412,13 +408,13 @@ static void TlenFileSendingConnection(JABBER_SOCKET hConnection, DWORD dwRemoteI JabberLog(ft->proto, "Set ft->s to %d (saving %d)", hConnection, slisten);
JabberLog(ft->proto, "Entering send loop for this file connection... (ft->s is hConnection)");
- while (ft->state!=FT_DONE && ft->state!=FT_ERROR) {
+ while (ft->state != FT_DONE && ft->state != FT_ERROR) {
TlenFileSendParse(ft);
}
- if (ft->state==FT_DONE)
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ if (ft->state == FT_DONE)
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
else
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
JabberLog(ft->proto, "Closing connection for this file transfer... (ft->s is now hBind)");
ft->s = slisten;
JabberLog(ft->proto, "ft->s is restored to %d", ft->s);
@@ -444,7 +440,7 @@ int TlenFileCancelAll(TlenProtocol *proto) JabberListRemoveByIndex(proto, i);
if (ft != NULL) {
if (ft->s) {
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ //ProtoBroadcastAck(m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
JabberLog(ft->proto, "Closing ft->s = %d", ft->s);
ft->state = FT_ERROR;
Netlib_CloseHandle(ft->s);
@@ -475,7 +471,7 @@ static void __cdecl TlenFileSendingThread(TLEN_FILE_TRANSFER *ft) ft->pfnNewConnectionV2 = TlenFileSendingConnection;
s = TlenP2PListen(ft);
if (s != NULL) {
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
ft->s = s;
//JabberLog("ft->s = %d", s);
//JabberLog("fileCount = %d", ft->fileCount);
@@ -508,17 +504,17 @@ static void __cdecl TlenFileSendingThread(TLEN_FILE_TRANSFER *ft) nloc.flags = 0;
s = (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) ft->proto->hNetlibUser, (LPARAM) &nloc);
if (s != NULL) {
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
ft->s = s;
TlenP2PEstablishOutgoingConnection(ft, TRUE);
JabberLog(ft->proto, "Entering send loop for this file connection...");
- while (ft->state!=FT_DONE && ft->state!=FT_ERROR) {
+ while (ft->state != FT_DONE && ft->state != FT_ERROR) {
TlenFileSendParse(ft);
}
- if (ft->state==FT_DONE)
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ if (ft->state == FT_DONE)
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
else
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
JabberLog(ft->proto, "Closing connection for this file transfer... ");
Netlib_CloseHandle(s);
} else {
@@ -533,17 +529,17 @@ static void __cdecl TlenFileSendingThread(TLEN_FILE_TRANSFER *ft) switch (ft->state) {
case FT_DONE:
JabberLog(ft->proto, "Finish successfully");
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
break;
case FT_DENIED:
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, ft, 0);
break;
default: // FT_ERROR:
nick = JabberNickFromJID(ft->jid);
JabberSend(ft->proto, "<f t='%s' i='%s' e='8'/>", nick, ft->iqId);
mir_free(nick);
JabberLog(ft->proto, "Finish with errors");
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
break;
}
JabberLog(ft->proto, "Thread ended: type=file_send");
@@ -553,22 +549,21 @@ static void __cdecl TlenFileSendingThread(TLEN_FILE_TRANSFER *ft) TLEN_FILE_TRANSFER *TlenFileCreateFT(TlenProtocol *proto, const char *jid) {
TLEN_FILE_TRANSFER *ft;
- ft = (TLEN_FILE_TRANSFER *) mir_alloc(sizeof(TLEN_FILE_TRANSFER));
- memset(ft, 0, sizeof(TLEN_FILE_TRANSFER));
- ft->proto = proto;
- ft->jid = mir_strdup(jid);
+ ft = (TLEN_FILE_TRANSFER *) mir_alloc(sizeof(TLEN_FILE_TRANSFER));
+ memset(ft, 0, sizeof(TLEN_FILE_TRANSFER));
+ ft->proto = proto;
+ ft->jid = mir_strdup(jid);
return ft;
}
+
/*
* File transfer
*/
void TlenProcessF(XmlNode *node, ThreadData *info)
{
TLEN_FILE_TRANSFER *ft;
- CCSDATA ccs;
- PROTORECVEVENT pre;
- char *szBlob, *from, *p, *e;
+ char *from, *p, *e;
char jid[128], szFilename[MAX_PATH];
int numFiles;
JABBER_LIST_ITEM *item;
@@ -587,7 +582,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) if (!strcmp(e, "1")) {
// FILE_RECV : e='1' : File transfer request
- ft = TlenFileCreateFT(info->proto, jid);
+ ft = TlenFileCreateFT(info->proto, jid);
ft->hContact = JabberHContactFromJID(info->proto, jid);
if ((p=JabberXmlGetAttrValue(node, "i")) != NULL)
@@ -610,25 +605,20 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
}
- if (szFilename[0]!='\0' && ft->iqId!=NULL) {
- // blob is DWORD(*ft), ASCIIZ(filenames), ASCIIZ(description)
- szBlob = (char *) mir_alloc(sizeof(DWORD) + strlen(szFilename) + 2);
- *((PDWORD) szBlob) = (DWORD) ft;
- strcpy(szBlob + sizeof(DWORD), szFilename);
- szBlob[sizeof(DWORD) + strlen(szFilename) + 1] = '\0';
- pre.flags = 0;
+ if (szFilename[0] != '\0' && ft->iqId != NULL) {
+ TCHAR* filenameT = mir_utf8decodeT((char*)szFilename);
+ PROTORECVFILET pre = {0};
+ pre.flags = PREF_TCHAR;
+ pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.szMessage = szBlob;
- pre.lParam = 0;
- ccs.szProtoService = PSR_FILE;
- ccs.hContact = ft->hContact;
- ccs.wParam = 0;
- ccs.lParam = (LPARAM) ⪯
+ pre.tszDescription = filenameT;
+ pre.ptszFiles = &filenameT;
+ pre.lParam = (LPARAM)ft;
JabberLog(ft->proto, "sending chainrecv");
+ CCSDATA ccs = { ft->hContact, PSR_FILE, 0, (LPARAM)&pre };
CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
- mir_free(szBlob);
- }
- else {
+ mir_free(filenameT);
+ } else {
// malformed <f/> request, reject
if (ft->iqId)
JabberSend(ft->proto, "<f i='%s' e='4' t='%s'/>", ft->iqId, from);
@@ -642,8 +632,8 @@ void TlenProcessF(XmlNode *node, ThreadData *info) if ((p=JabberXmlGetAttrValue(node, "i")) != NULL) {
if ((item=JabberListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
if (item->ft != NULL) {
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, item->ft, 0);
- TlenFileCancel((PROTO_INTERFACE *)info->proto, NULL, item->ft);
+ ProtoBroadcastAck(info->proto->m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, item->ft, 0);
+ info->proto->FileCancel(NULL, item->ft);
}
JabberListRemove(info->proto, LIST_FILE, p);
}
@@ -654,7 +644,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) if ((p=JabberXmlGetAttrValue(node, "i")) != NULL) {
if ((item=JabberListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
if (!strcmp(item->ft->jid, jid)) {
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, item->ft, 0);
+ ProtoBroadcastAck(info->proto->m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, item->ft, 0);
JabberListRemove(info->proto, LIST_FILE, p);
}
}
@@ -689,7 +679,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) if ((p=JabberXmlGetAttrValue(node, "i")) != NULL) {
if ((item=JabberListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
if ((p=JabberXmlGetAttrValue(node, "a")) != NULL) {
- if (item->ft->hostName!=NULL) mir_free(item->ft->hostName);
+ if (item->ft->hostName != NULL) mir_free(item->ft->hostName);
item->ft->hostName = mir_strdup(p);
if ((p=JabberXmlGetAttrValue(node, "p")) != NULL) {
item->ft->wPort = atoi(p);
@@ -708,7 +698,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) if (item->ft->hFileEvent != NULL) {
SetEvent(item->ft->hFileEvent);
} else {
- ProtoBroadcastAck(info->proto->iface.m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, item->ft, 0);
+ ProtoBroadcastAck(info->proto->m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, item->ft, 0);
}
}
}
diff --git a/plugins/!NotAdopted/Tlen/tlen_file.h b/protocols/Tlen/src/tlen_file.h index 40527a2bcb..1cd0704ea5 100644 --- a/plugins/!NotAdopted/Tlen/tlen_file.h +++ b/protocols/Tlen/src/tlen_file.h @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
diff --git a/plugins/!NotAdopted/Tlen/tlen_muc.c b/protocols/Tlen/src/tlen_muc.cpp index 0b8e7534f5..5f3809d806 100644 --- a/plugins/!NotAdopted/Tlen/tlen_muc.c +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -39,10 +39,10 @@ static int isSelf(TlenProtocol *proto, const char *roomID, const char *nick) int result;
result=0;
item = JabberListGetItemPtr(proto, LIST_CHATROOM, roomID);
- if (item!=NULL) {
- if (item->nick==NULL) {
+ if (item != NULL) {
+ if (item->nick == NULL) {
if (!strcmp(nick, proto->threadData->username)) result = 1;
- } else if (nick[0]=='~') {
+ } else if (nick[0] == '~') {
if (!strcmp(nick+1, item->nick)) {
result = 1;
}
@@ -57,9 +57,9 @@ static int stringToHex(const char *str) val = 0;
for (i=0;i<2;i++) {
val <<= 4;
- if (str[i]>='A' && str[i]<='F') {
+ if (str[i] >= 'A' && str[i] <= 'F') {
val += 10 + str[i]-'A';
- } else if (str[i]>='0' && str[i]<='9') {
+ } else if (str[i] >= '0' && str[i] <= '9') {
val += str[i]-'0';
}
}
@@ -72,20 +72,20 @@ static char *getDisplayName(TlenProtocol *proto, const char *id) char jid[256];
HANDLE hContact;
DBVARIANT dbv;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
_snprintf(jid, sizeof(jid), "%s@%s", id, dbv.pszVal);
DBFreeVariant(&dbv);
if (((hContact=JabberHContactFromJID(proto, jid)) != NULL) || !strcmp(id, proto->threadData->username)) {
ZeroMemory(&ci, sizeof(ci));
ci.cbSize = sizeof(ci);
ci.hContact = hContact;
- ci.szProto = (char *)proto->iface.m_szModuleName;
+ ci.szProto = (char *)proto->m_szModuleName;
ci.dwFlag = CNF_DISPLAY;
if (!CallService(MS_CONTACT_GETCONTACTINFO, 0, (LPARAM) & ci)) {
if (ci.type == CNFT_ASCIIZ) {
if (ci.pszVal) {
- char * str = mir_strdup((char *)ci.pszVal);
- miranda_sys_free(ci.pszVal);
+ char* str = mir_t2a(ci.pszVal);
+ mir_free(ci.pszVal);
return str;
}
}
@@ -106,7 +106,7 @@ static int TlenMUCHandleEvent(void *ptr, WPARAM wParam, LPARAM lParam) int id;
MUCCEVENT *mucce=(MUCCEVENT *) lParam;
TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!strcmp(mucce->pszModule, proto->iface.m_szModuleName)) {
+ if (!strcmp(mucce->pszModule, proto->m_szModuleName)) {
switch (mucce->iType) {
case MUCC_EVENT_INVITE:
TlenMUCSendInvitation(proto, mucce->pszID, mucce->pszNick);
@@ -160,7 +160,7 @@ static int TlenMUCHandleEvent(void *ptr, WPARAM wParam, LPARAM lParam) case MUCC_EVENT_REGISTER_ROOM:
id = JabberSerialNext(proto);
if (proto->isOnline) {
- if (mucce->pszNick!=NULL) {
+ if (mucce->pszNick != NULL) {
JabberSend(proto, "<p to='c' tp='c' id='"JABBER_IQID"%d' x='%d' n='%s' p='%s' nick='%s'/>", id, mucce->dwFlags | 0x10, mucce->pszName, mucce->pszID);
} else {
JabberSend(proto, "<p to='c' tp='c' id='"JABBER_IQID"%d' x='%d' n='%s' p='%s'/>", id, mucce->dwFlags | 0x10, mucce->pszName, mucce->pszID);
@@ -224,8 +224,8 @@ static int TlenMUCHandleEvent(void *ptr, WPARAM wParam, LPARAM lParam) break;
case MUCC_EVENT_JOIN:
if (proto->isOnline) {
- if (mucce->pszID==NULL || strlen(mucce->pszID)==0) {
- if (mucce->pszName==NULL || strlen(mucce->pszName)==0) { // create a new chat room
+ if (mucce->pszID == NULL || strlen(mucce->pszID) == 0) {
+ if (mucce->pszName == NULL || strlen(mucce->pszName) == 0) { // create a new chat room
id = JabberSerialNext(proto);
JabberSend(proto, "<p to='c' tp='c' id='"JABBER_IQID"%d'/>", id);
} else { // find a chat room by name
@@ -242,19 +242,19 @@ static int TlenMUCHandleEvent(void *ptr, WPARAM wParam, LPARAM lParam) if (proto->isOnline) {
JABBER_LIST_ITEM *item;
item = JabberListGetItemPtr(proto, LIST_CHATROOM, mucce->pszID);
- if (item!=NULL) {
+ if (item != NULL) {
char *nick;
nick = JabberResourceFromJID(mucce->pszUID);
if (!isSelf(proto, mucce->pszID, nick)) {
- if (nick[0]=='~' || item->nick!=NULL) {
+ if (nick[0] == '~' || item->nick != NULL) {
char str[256];
sprintf(str, "%s/%s", mucce->pszID, nick);
hContact = JabberDBCreateContact(proto, str, nick, TRUE); //(char *)mucce->pszUID
- DBWriteContactSettingByte(hContact, proto->iface.m_szModuleName, "bChat", TRUE);
+ DBWriteContactSettingByte(hContact, proto->m_szModuleName, "bChat", TRUE);
CallService(MS_MSG_SENDMESSAGE, (WPARAM) hContact, (LPARAM) NULL);
} else {
DBVARIANT dbv;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
char str[512];
_snprintf(str, sizeof(str), "%s@%s", nick, dbv.pszVal);
DBFreeVariant(&dbv);
@@ -277,7 +277,7 @@ int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomId, const char *r char *nick;
int ignore, ask, groupChatPolicy;
if (roomId == NULL) return 1;
- groupChatPolicy = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "GroupChatPolicy", 0);
+ groupChatPolicy = DBGetContactSettingWord(NULL, proto->m_szModuleName, "GroupChatPolicy", 0);
ask = TRUE;
ignore = FALSE;
if (groupChatPolicy == TLEN_MUC_ASK) {
@@ -287,9 +287,8 @@ int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomId, const char *r ignore = TRUE;
} else if (groupChatPolicy == TLEN_MUC_IGNORE_NIR) {
char jid[256];
- JABBER_LIST_ITEM *item;
DBVARIANT dbv;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
_snprintf(jid, sizeof(jid), "%s@%s", from, dbv.pszVal);
DBFreeVariant(&dbv);
} else {
@@ -301,7 +300,7 @@ int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomId, const char *r char jid[256];
JABBER_LIST_ITEM *item;
DBVARIANT dbv;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
_snprintf(jid, sizeof(jid), "%s@%s", from, dbv.pszVal);
DBFreeVariant(&dbv);
} else {
@@ -318,7 +317,7 @@ int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomId, const char *r if (ask) {
MUCCEVENT mucce;
mucce.cbSize = sizeof(MUCCEVENT);
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
mucce.pszID = roomId;
mucce.pszName = roomName;
mucce.iType = MUCC_EVENT_INVITATION;
@@ -347,7 +346,7 @@ int TlenMUCRecvPresence(TlenProtocol *proto, const char *from, int status, int f userId = JabberResourceFromJID(from);
nick = getDisplayName(proto, userId);
mucce.cbSize = sizeof(MUCCEVENT);
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
mucce.pszID = roomId;
mucce.iType = MUCC_EVENT_STATUS;
mucce.pszUID = userId;//from;
@@ -360,7 +359,7 @@ int TlenMUCRecvPresence(TlenProtocol *proto, const char *from, int status, int f if (flags & USER_FLAGS_OWNER) mucce.dwFlags |= MUCC_EF_USER_OWNER;
if (flags & USER_FLAGS_ADMIN) mucce.dwFlags |= MUCC_EF_USER_ADMIN;
if (flags & USER_FLAGS_REGISTERED) mucce.dwFlags |= MUCC_EF_USER_REGISTERED;
- if (status == ID_STATUS_OFFLINE && mucce.bIsMe && kick!=NULL) {
+ if (status == ID_STATUS_OFFLINE && mucce.bIsMe && kick != NULL) {
mucce.iType = MUCC_EVENT_ERROR;
sprintf(str, Translate("You have been kicked. Reason: %s "), kick);
mucce.pszText = str;
@@ -387,7 +386,7 @@ int TlenMUCRecvMessage(TlenProtocol *proto, const char *from, long timestamp, Xm mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_MESSAGE;
mucce.pszID = roomId;
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
mucce.pszText = localMessage;
mucce.pszUID = userId;//from;
mucce.pszNick = nick;
@@ -396,28 +395,28 @@ int TlenMUCRecvMessage(TlenProtocol *proto, const char *from, long timestamp, Xm mucce.dwFlags = 0;
mucce.iFontSize = 0;
style = JabberXmlGetAttrValue(bodyNode, "f");
- if (style!=NULL) {
+ if (style != NULL) {
iStyle = atoi(style);
if (iStyle & 1) mucce.dwFlags |= MUCC_EF_FONT_BOLD;
if (iStyle & 2) mucce.dwFlags |= MUCC_EF_FONT_ITALIC;
if (iStyle & 4) mucce.dwFlags |= MUCC_EF_FONT_UNDERLINE;
}
style = JabberXmlGetAttrValue(bodyNode, "c");
- if (style!=NULL && strlen(style)>5) {
+ if (style != NULL && strlen(style) > 5) {
iStyle = (stringToHex(style)<<16) | (stringToHex(style+2)<<8) | stringToHex(style+4);
} else {
iStyle = 0xFFFFFFFF;
}
mucce.color = (COLORREF) iStyle;
style = JabberXmlGetAttrValue(bodyNode, "s");
- if (style!=NULL) {
+ if (style != NULL) {
iStyle = atoi(style);
} else {
iStyle = 0;
}
mucce.iFontSize = iStyle;
style = JabberXmlGetAttrValue(bodyNode, "n");
- if (style!=NULL) {
+ if (style != NULL) {
iStyle = atoi(style)-1;
} else {
iStyle = 0;
@@ -438,7 +437,7 @@ int TlenMUCRecvTopic(TlenProtocol *proto, const char *from, const char *subject) mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_TOPIC;
mucce.pszID = from;
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
mucce.pszText = subject;
mucce.time = time(NULL);
CallService(MS_MUCC_EVENT, 0, (LPARAM) &mucce);
@@ -455,7 +454,7 @@ int TlenMUCRecvError(TlenProtocol *proto, const char *from, XmlNode *errorNode) mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_ERROR;
mucce.pszID = from;
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
errCode = atoi(JabberXmlGetAttrValue(errorNode, "code"));
switch (errCode) {
case 403:
@@ -506,10 +505,10 @@ int TlenMUCRecvError(TlenProtocol *proto, const char *from, XmlNode *errorNode) switch (errCode) {
case 412:
item = JabberListGetItemPtr(proto, LIST_CHATROOM, from);
- if (item!=NULL) {
+ if (item != NULL) {
mucce.iType = MUCC_EVENT_JOIN;
mucce.dwFlags = MUCC_EF_ROOM_NICKNAMES;
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
mucce.pszID = from;
mucce.pszName = item->roomName;
mucce.pszNick = JabberXmlGetAttrValue(errorNode, "free");
@@ -518,10 +517,10 @@ int TlenMUCRecvError(TlenProtocol *proto, const char *from, XmlNode *errorNode) break;
case 601:
item = JabberListGetItemPtr(proto, LIST_CHATROOM, from);
- if (item!=NULL) {
+ if (item != NULL) {
mucce.iType = MUCC_EVENT_JOIN;
mucce.dwFlags = 0;
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
mucce.pszID = from;
mucce.pszName = item->roomName;
mucce.pszNick = NULL;
@@ -549,27 +548,27 @@ static int TlenMUCSendPresence(TlenProtocol *proto, const char *roomID, const ch if (!proto->isOnline) {
return 1;
}
- if (nick!=NULL) {
+ if (nick != NULL) {
_snprintf(str, sizeof(str), "%s/%s", roomID, nick);
} else {
_snprintf(str, sizeof(str), "%s", roomID);
}
- if ((jid = JabberTextEncode(str))!=NULL) {
+ if ((jid = JabberTextEncode(str)) != NULL) {
switch (desiredStatus) {
case ID_STATUS_ONLINE:
JabberSend(proto, "<p to='%s'/>", jid);
item = JabberListGetItemPtr(proto, LIST_CHATROOM, roomID);
- if (item!=NULL) {
- if (item->nick!=NULL) mir_free(item->nick);
+ if (item != NULL) {
+ if (item->nick != NULL) mir_free(item->nick);
item->nick = NULL;
- if (nick!=NULL) {
+ if (nick != NULL) {
item->nick = mir_strdup(nick);
}
}
break;
default:
item = JabberListGetItemPtr(proto, LIST_CHATROOM, roomID);
- if (item!=NULL) {
+ if (item != NULL) {
JabberSend(proto, "<p to='%s'><s>unavailable</s></p>", jid);
JabberListRemove(proto, LIST_CHATROOM, roomID);
}
@@ -588,8 +587,8 @@ static int TlenMUCSendMessage(TlenProtocol *proto, MUCCEVENT *event) if (!proto->isOnline) {
return 1;
}
- if ((msg = JabberTextEncode(event->pszText))!=NULL) {
- if ((jid = JabberTextEncode(event->pszID))!=NULL) {
+ if ((msg = JabberTextEncode(event->pszText)) != NULL) {
+ if ((jid = JabberTextEncode(event->pszID)) != NULL) {
style = 0;
if (event->dwFlags & MUCC_EF_FONT_BOLD) style |=1;
if (event->dwFlags & MUCC_EF_FONT_ITALIC) style |=2;
@@ -608,8 +607,8 @@ static int TlenMUCSendTopic(TlenProtocol *proto, MUCCEVENT *event) if (!proto->isOnline) {
return 1;
}
- if ((msg = JabberTextEncode(event->pszText))!=NULL) {
- if ((jid = JabberTextEncode(event->pszID))!=NULL) {
+ if ((msg = JabberTextEncode(event->pszText)) != NULL) {
+ if ((jid = JabberTextEncode(event->pszID)) != NULL) {
JabberSend(proto, "<m to='%s'><subject>%s</subject></m>", jid, msg);
mir_free(jid);
}
@@ -623,7 +622,7 @@ static int TlenMUCSendQuery(TlenProtocol *proto, int type, const char *parent, i if (!proto->isOnline) {
return 1;
}
- if (type==3) { // find chat room by name
+ if (type == 3) { // find chat room by name
char serialId[32];
JABBER_LIST_ITEM *item;
sprintf(serialId, JABBER_IQID"%d", JabberSerialNext(proto));
@@ -631,20 +630,20 @@ static int TlenMUCSendQuery(TlenProtocol *proto, int type, const char *parent, i item->roomName = mir_strdup(parent);
JabberSend(proto, "<iq to='c' type='3' n='%s' id='%s'/>", parent, serialId);
} else {
- if (parent==NULL) {
+ if (parent == NULL) {
JabberSend(proto, "<iq to='c' type='%d'/>", type);
} else { // 1 - groups, 2 - chat rooms, 7 - user nicks, 8 - user rooms
- if (type==1 || (type==2 && page==0) || type==7 || type==8) {
+ if (type == 1 || (type == 2 && page == 0) || type == 7 || type == 8) {
JabberSend(proto, "<iq to='c' type='%d' p='%s'/>", type, parent);
- } else if (type==2) {
+ } else if (type == 2) {
JabberSend(proto, "<iq to='c' type='%d' p='%s' n='%d'/>", type, parent, page);
- } else if (type==6) {
+ } else if (type == 6) {
if (page) {
JabberSend(proto, "<iq to='c' type='%d' n='%s' k='u'/>", type, parent);
} else {
JabberSend(proto, "<iq to='c' type='%d' n='%s'/>", type, parent);
}
- } else if (type==4) { // list of users, admins etc.
+ } else if (type == 4) { // list of users, admins etc.
JabberSend(proto, "<iq to='%s' type='%d' k='%d'/>", parent, type, page);
}
}
@@ -656,23 +655,23 @@ int TlenMUCCreateWindow(TlenProtocol *proto, const char *roomID, const char *roo {
JABBER_LIST_ITEM *item;
MUCCWINDOW mucw;
- if (!proto->isOnline || roomID==NULL) {
+ if (!proto->isOnline || roomID == NULL) {
return 1;
}
if (JabberListExist(proto, LIST_CHATROOM, roomID)) {
return 0;
}
item = JabberListAdd(proto, LIST_CHATROOM, roomID);
- if (roomName!=NULL) {
+ if (roomName != NULL) {
item->roomName = mir_strdup(roomName);
}
- if (nick!=NULL) {
+ if (nick != NULL) {
item->nick = mir_strdup(nick);
}
mucw.cbSize = sizeof(MUCCWINDOW);
mucw.iType = MUCC_WINDOW_CHATROOM;
- mucw.pszModule = proto->iface.m_szModuleName;
- mucw.pszModuleName = proto->iface.m_szProtoName;
+ mucw.pszModule = proto->m_szModuleName;
+ mucw.pszModuleName = proto->m_szProtoName;
mucw.pszID = roomID;
mucw.pszName = roomName;
mucw.pszNick = nick;
@@ -717,15 +716,15 @@ void TlenIqResultChatGroups(TlenProtocol *proto, XmlNode *iqNode) if ((lNode=JabberXmlGetChild(iqNode, "l")) == NULL) return;
p = JabberXmlGetAttrValue(iqNode, "p");
- if (p==NULL) {
+ if (p == NULL) {
p="";
}
p = JabberTextDecode(p);
queryResult.cbSize = sizeof (MUCCQUERYRESULT);
queryResult.iType = MUCC_EVENT_QUERY_GROUPS;
- queryResult.pszModule = proto->iface.m_szModuleName;
+ queryResult.pszModule = proto->m_szModuleName;
queryResult.pszParent = p;
- queryResult.pItems = mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
+ queryResult.pItems = (MUCCQUERYITEM*)mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
memset(queryResult.pItems, 0, sizeof(MUCCQUERYITEM) * lNode->numChild);
for (i=j=0; i<lNode->numChild; i++) {
itemNode = lNode->child[i];
@@ -765,9 +764,9 @@ void TlenIqResultChatRooms(TlenProtocol *proto, XmlNode *iqNode) p = JabberTextDecode(p);
queryResult.cbSize = sizeof (MUCCQUERYRESULT);
queryResult.iType = MUCC_EVENT_QUERY_ROOMS;
- queryResult.pszModule = proto->iface.m_szModuleName;
+ queryResult.pszModule = proto->m_szModuleName;
queryResult.pszParent = p;
- queryResult.pItems = mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
+ queryResult.pItems = (MUCCQUERYITEM*)mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
memset(queryResult.pItems, 0, sizeof(MUCCQUERYITEM) * lNode->numChild);
queryResult.iPage = atoi(pn);
queryResult.iLastPage = atoi(px)&2?1:0;
@@ -800,8 +799,8 @@ void TlenIqResultUserRooms(TlenProtocol *proto, XmlNode *iqNode) if ((lNode=JabberXmlGetChild(iqNode, "l")) == NULL) return;
queryResult.cbSize = sizeof (MUCCQUERYRESULT);
queryResult.iType = MUCC_EVENT_QUERY_USER_ROOMS;
- queryResult.pszModule = proto->iface.m_szModuleName;
- queryResult.pItems = mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
+ queryResult.pszModule = proto->m_szModuleName;
+ queryResult.pItems = (MUCCQUERYITEM*)mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
memset(queryResult.pItems, 0, sizeof(MUCCQUERYITEM) * lNode->numChild);
for (i=j=0; i<lNode->numChild; i++) {
itemNode = lNode->child[i];
@@ -828,8 +827,8 @@ void TlenIqResultUserNicks(TlenProtocol *proto, XmlNode *iqNode) if ((lNode=JabberXmlGetChild(iqNode, "l")) == NULL) return;
queryResult.cbSize = sizeof (MUCCQUERYRESULT);
queryResult.iType = MUCC_EVENT_QUERY_USER_NICKS;
- queryResult.pszModule = proto->iface.m_szModuleName;
- queryResult.pItems = mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
+ queryResult.pszModule = proto->m_szModuleName;
+ queryResult.pItems = (MUCCQUERYITEM*)mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
memset(queryResult.pItems, 0, sizeof(MUCCQUERYITEM) * lNode->numChild);
for (i=j=0; i<lNode->numChild; i++) {
itemNode = lNode->child[i];
@@ -854,9 +853,9 @@ void TlenIqResultChatRoomUsers(TlenProtocol *proto, XmlNode *iqNode) if ((id=JabberXmlGetAttrValue(iqNode, "from")) == NULL) return;
queryResult.cbSize = sizeof (MUCCQUERYRESULT);
queryResult.iType = MUCC_EVENT_QUERY_USERS;
- queryResult.pszModule = proto->iface.m_szModuleName;
+ queryResult.pszModule = proto->m_szModuleName;
queryResult.pszParent = id;
- queryResult.pItems = mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
+ queryResult.pItems = (MUCCQUERYITEM*)mir_alloc(sizeof(MUCCQUERYITEM) * lNode->numChild);
memset(queryResult.pItems, 0, sizeof(MUCCQUERYITEM) * lNode->numChild);
for (i=j=0; i<lNode->numChild; i++) {
itemNode = lNode->child[i];
@@ -865,23 +864,23 @@ void TlenIqResultChatRoomUsers(TlenProtocol *proto, XmlNode *iqNode) if (id != NULL) {
queryResult.pItems[j].pszID = JabberTextDecode(id);
n = JabberXmlGetAttrValue(itemNode, "n");
- if (n!=NULL) {
+ if (n != NULL) {
queryResult.pItems[j].pszName = JabberTextDecode(n);
}
n = JabberXmlGetAttrValue(itemNode, "a");
- if (n!=NULL) {
+ if (n != NULL) {
queryResult.pItems[j].pszNick = JabberTextDecode(n);
}
n = JabberXmlGetAttrValue(itemNode, "r");
- if (n!=NULL) {
+ if (n != NULL) {
queryResult.pItems[j].pszText = JabberTextDecode(n);
}
n = JabberXmlGetAttrValue(itemNode, "e");
- if (n!=NULL) {
+ if (n != NULL) {
queryResult.pItems[j].iCount = atoi(n);
}
n = JabberXmlGetAttrValue(itemNode, "s");
- if (n!=NULL) {
+ if (n != NULL) {
queryResult.pItems[j].dwFlags = atoi(n);
}
j++;
@@ -904,10 +903,10 @@ void TlenIqResultRoomSearch(TlenProtocol *proto, XmlNode *iqNode) id = JabberTextDecode(id);
mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_JOIN;
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
mucce.pszID = id;
mucce.pszName = id;
- if (item!=NULL) {
+ if (item != NULL) {
mucce.pszName = item->roomName;
}
mucce.pszNick = NULL;
@@ -930,7 +929,7 @@ void TlenIqResultRoomInfo(TlenProtocol *proto, XmlNode *iqNode) name = JabberTextDecode(name);
mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_ROOM_INFO;
- mucce.pszModule = proto->iface.m_szModuleName;
+ mucce.pszModule = proto->m_szModuleName;
mucce.pszID = id;
mucce.pszName = name;
mucce.dwFlags = atoi(flags);
@@ -943,8 +942,8 @@ void TlenIqResultRoomInfo(TlenProtocol *proto, XmlNode *iqNode) typedef struct {
- TlenProtocol *proto;
- char *roomId;
+ TlenProtocol *proto;
+ char *roomId;
} MUCSENDQUERYTHREADDATA;
static void __cdecl TlenMUCCSendQueryResultThread(void *ptr)
@@ -952,18 +951,18 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr) HANDLE hContact;
MUCCQUERYRESULT queryResult;
DBVARIANT dbv;
- MUCSENDQUERYTHREADDATA* threadData = (MUCSENDQUERYTHREADDATA*)ptr;
+ MUCSENDQUERYTHREADDATA* threadData = (MUCSENDQUERYTHREADDATA*)ptr;
queryResult.cbSize = sizeof (MUCCQUERYRESULT);
queryResult.iType = MUCC_EVENT_QUERY_CONTACTS;
- queryResult.pszModule = threadData->proto->iface.m_szModuleName;
+ queryResult.pszModule = threadData->proto->m_szModuleName;
queryResult.pszParent = threadData->roomId;
queryResult.iItemsNum = 0;
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact != NULL) {
char *str = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if(str!=NULL && !strcmp(str, threadData->proto->iface.m_szModuleName)) {
- if (!DBGetContactSettingByte(hContact, threadData->proto->iface.m_szModuleName, "bChat", FALSE)) {
- if (!DBGetContactSetting(hContact, threadData->proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (str != NULL && !strcmp(str, threadData->proto->m_szModuleName)) {
+ if (!DBGetContactSettingByte(hContact, threadData->proto->m_szModuleName, "bChat", FALSE)) {
+ if (!DBGetContactSetting(hContact, threadData->proto->m_szModuleName, "jid", &dbv)) {
if (strcmp(dbv.pszVal, "b73@tlen.pl")) {
queryResult.iItemsNum++;
}
@@ -971,17 +970,17 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr) }
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
- queryResult.pItems = mir_alloc(sizeof(MUCCQUERYITEM) * queryResult.iItemsNum);
+ queryResult.pItems = (MUCCQUERYITEM*)mir_alloc(sizeof(MUCCQUERYITEM) * queryResult.iItemsNum);
memset(queryResult.pItems, 0, sizeof(MUCCQUERYITEM) * queryResult.iItemsNum);
queryResult.iItemsNum = 0;
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact != NULL) {
char *baseProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if(baseProto!=NULL && !strcmp(baseProto, threadData->proto->iface.m_szModuleName)) {
- if (!DBGetContactSettingByte(hContact, threadData->proto->iface.m_szModuleName, "bChat", FALSE)) {
- if (!DBGetContactSetting(hContact, threadData->proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (baseProto != NULL && !strcmp(baseProto, threadData->proto->m_szModuleName)) {
+ if (!DBGetContactSettingByte(hContact, threadData->proto->m_szModuleName, "bChat", FALSE)) {
+ if (!DBGetContactSetting(hContact, threadData->proto->m_szModuleName, "jid", &dbv)) {
if (strcmp(dbv.pszVal, "b73@tlen.pl")) {
queryResult.pItems[queryResult.iItemsNum].pszID = mir_strdup(dbv.pszVal);
queryResult.pItems[queryResult.iItemsNum].pszName = mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, 0));
@@ -991,26 +990,25 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr) }
}
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
CallService(MS_MUCC_QUERY_RESULT, 0, (LPARAM) &queryResult);
TlenMUCFreeQueryResult(&queryResult);
mir_free(threadData->roomId);
- mir_free(threadData);
+ mir_free(threadData);
}
static int TlenMUCQueryContacts(TlenProtocol *proto, const char *roomId) {
-
- MUCSENDQUERYTHREADDATA *threadData = (MUCSENDQUERYTHREADDATA *)mir_alloc(sizeof(MUCSENDQUERYTHREADDATA));
- threadData->proto = proto;
- threadData->roomId = mir_strdup(roomId);
+
+ MUCSENDQUERYTHREADDATA *threadData = (MUCSENDQUERYTHREADDATA *)mir_alloc(sizeof(MUCSENDQUERYTHREADDATA));
+ threadData->proto = proto;
+ threadData->roomId = mir_strdup(roomId);
JabberForkThread(TlenMUCCSendQueryResultThread, 0, (void *)threadData);
return 1;
}
-
-INT_PTR TlenMUCMenuHandleMUC(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenMUCMenuHandleMUC(void *ptr, LPARAM wParam, LPARAM lParam)
{
TlenProtocol *proto = (TlenProtocol *)ptr;
if (!proto->isOnline) {
@@ -1023,7 +1021,7 @@ INT_PTR TlenMUCMenuHandleMUC(void *ptr, WPARAM wParam, LPARAM lParam) mucce->cbSize = sizeof(MUCCEVENT);
mucce->iType = MUCC_EVENT_JOIN;
mucce->dwFlags = 0;
- mucce->pszModule = iface.m_szModuleName;
+ mucce->pszModule = proto->m_szModuleName;
mucce->pszID = NULL;
mucce->pszName = NULL;
mucce->pszNick = NULL;
@@ -1033,7 +1031,7 @@ INT_PTR TlenMUCMenuHandleMUC(void *ptr, WPARAM wParam, LPARAM lParam) return 0;
}
-INT_PTR TlenMUCMenuHandleChats(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenMUCMenuHandleChats(void *ptr, LPARAM wParam, LPARAM lParam)
{
MUCCWINDOW mucw;
TlenProtocol *proto = (TlenProtocol *)ptr;
@@ -1042,13 +1040,13 @@ INT_PTR TlenMUCMenuHandleChats(void *ptr, WPARAM wParam, LPARAM lParam) }
mucw.cbSize = sizeof(MUCCWINDOW);
mucw.iType = MUCC_WINDOW_CHATLIST;
- mucw.pszModule = proto->iface.m_szModuleName;
- mucw.pszModuleName = proto->iface.m_szProtoName;
+ mucw.pszModule = proto->m_szModuleName;
+ mucw.pszModuleName = proto->m_szProtoName;
CallService(MS_MUCC_NEW_WINDOW, 0, (LPARAM) &mucw);
return 0;
}
-INT_PTR TlenMUCContactMenuHandleMUC(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenMUCContactMenuHandleMUC(void *ptr, LPARAM wParam, LPARAM lParam)
{
HANDLE hContact;
DBVARIANT dbv;
@@ -1057,8 +1055,8 @@ INT_PTR TlenMUCContactMenuHandleMUC(void *ptr, WPARAM wParam, LPARAM lParam) if (!proto->isOnline) {
return 1;
}
- if ((hContact=(HANDLE) wParam)!=NULL && proto->isOnline) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if ((hContact=(HANDLE) wParam) != NULL && proto->isOnline) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
char serialId[32];
sprintf(serialId, JABBER_IQID"%d", JabberSerialNext(proto));
item = JabberListAdd(proto, LIST_INVITATIONS, serialId);
diff --git a/plugins/!NotAdopted/Tlen/tlen_muc.h b/protocols/Tlen/src/tlen_muc.h index fc1713a837..8409315ecd 100644 --- a/plugins/!NotAdopted/Tlen/tlen_muc.h +++ b/protocols/Tlen/src/tlen_muc.h @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -32,9 +32,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define USER_FLAGS_KICKED 0x80
extern BOOL TlenMUCInit(TlenProtocol *proto);
-extern INT_PTR TlenMUCMenuHandleMUC(void *ptr, WPARAM wParam, LPARAM lParam);
-extern INT_PTR TlenMUCMenuHandleChats(void *ptr, WPARAM wParam, LPARAM lParam);
-extern INT_PTR TlenMUCContactMenuHandleMUC(void *ptr, WPARAM wParam, LPARAM lParam);
+extern INT_PTR TlenMUCMenuHandleMUC(void *ptr, LPARAM wParam, LPARAM lParam);
+extern INT_PTR TlenMUCMenuHandleChats(void *ptr, LPARAM wParam, LPARAM lParam);
+extern INT_PTR TlenMUCContactMenuHandleMUC(void *ptr, LPARAM wParam, LPARAM lParam);
extern int TlenMUCCreateWindow(TlenProtocol *proto, const char *roomID, const char *roomName, int roomFlags, const char *nick, const char *iqId);
extern int TlenMUCRecvInvitation(TlenProtocol *proto, const char *roomJid, const char *roomName, const char *from, const char *reason);
extern int TlenMUCRecvPresence(TlenProtocol *proto, const char *from, int status, int flags, const char *kick);
diff --git a/plugins/!NotAdopted/Tlen/tlen_p2p_new.c b/protocols/Tlen/src/tlen_p2p_new.cpp index 7d9c959a42..35584f277a 100644 --- a/plugins/!NotAdopted/Tlen/tlen_p2p_new.c +++ b/protocols/Tlen/src/tlen_p2p_new.cpp @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -18,14 +18,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
-#include "jabber.h"
+#include "tlen_p2p_old.h"
#include <io.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "jabber_list.h"
-#include "tlen_p2p_old.h"
static void logInfo(const char *filename, const char *fmt, ...) {
@@ -34,16 +32,16 @@ static void logInfo(const char *filename, const char *fmt, ...) { va_list vararg;
int strsize;
FILE *flog=fopen(filename,"at");
- if (flog!=NULL) {
+ if (flog != NULL) {
GetLocalTime(&time);
- va_start(vararg, fmt);
- str = (char *) mir_alloc(strsize=2048);
- while (_vsnprintf(str, strsize, fmt, vararg) == -1)
- str = (char *) realloc(str, strsize+=2048);
- va_end(vararg);
- fprintf(flog,"%04d-%02d-%02d %02d:%02d:%02d,%03d [%s]",time.wYear,time.wMonth,time.wDay,time.wHour,time.wMinute,time.wSecond,time.wMilliseconds, "INFO");
+ va_start(vararg, fmt);
+ str = (char *) mir_alloc(strsize=2048);
+ while (_vsnprintf(str, strsize, fmt, vararg) == -1)
+ str = (char *) realloc(str, strsize+=2048);
+ va_end(vararg);
+ fprintf(flog,"%04d-%02d-%02d %02d:%02d:%02d,%03d [%s]",time.wYear,time.wMonth,time.wDay,time.wHour,time.wMinute,time.wSecond,time.wMilliseconds, "INFO");
fprintf(flog," %s\n",str);
- mir_free(str);
+ mir_free(str);
fclose(flog);
}
}
@@ -51,7 +49,7 @@ static void logInfo(const char *filename, const char *fmt, ...) { void __cdecl TlenNewFileReceiveThread(TLEN_FILE_TRANSFER *ft)
{
JabberLog(ft->proto, "P2P receive thread started");
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
// ft->mode = FT_RECV;
// ft->currentFile = 0;
// ft->state = FT_CONNECTING;
@@ -106,10 +104,10 @@ void __cdecl TlenNewFileReceiveThread(TLEN_FILE_TRANSFER *ft) }
JabberListRemove(ft->proto, LIST_FILE, ft->iqId);
- if (ft->state==FT_DONE)
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ if (ft->state == FT_DONE)
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
else {
- ProtoBroadcastAck(ft->proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
}
JabberLog(ft->proto, "P2P receive thread ended");
TlenP2PFreeFileTransfer(ft);
@@ -119,7 +117,7 @@ void __cdecl TlenNewFileSendThread(TLEN_FILE_TRANSFER *ft) {
JabberLog(ft->proto, "P2P send thread started");
// ft->mode = FT_RECV;
-// ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
+// ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
// ft->currentFile = 0;
// ft->state = FT_CONNECTING;
{
@@ -182,7 +180,7 @@ void TlenBindUDPSocket(TLEN_FILE_TRANSFER *ft) sin.sin_addr.s_addr = htonl(INADDR_ANY);;
sin.sin_port = 0;
if (bind(ft->udps, (struct sockaddr *)&sin, sizeof(sin)) >= 0) {
- if(!getsockname((SOCKET)ft->udps,(SOCKADDR *)&sin,&len)) {
+ if (!getsockname((SOCKET)ft->udps,(SOCKADDR *)&sin,&len)) {
struct hostent *hp;
char host_name[256];
gethostname(host_name, sizeof(host_name));
@@ -221,7 +219,7 @@ B SEND: <iq to='bbb@tlen.pl'><query xmlns='p2p'><dcng la='xx.xx.xx.xx' lp='nnn' */
-void TlenProcessP2P(XmlNode *node, ThreadData *info) {
+void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) {
XmlNode *queryNode;
JABBER_LIST_ITEM *item;
char *from;
@@ -248,40 +246,33 @@ void TlenProcessP2P(XmlNode *node, ThreadData *info) { id = JabberXmlGetAttrValue(fs, "i");
if (e != NULL) {
if (!strcmp(e, "1")) {
- CCSDATA ccs;
- PROTORECVEVENT pre;
char *c, *s;
TLEN_FILE_TRANSFER * ft = (TLEN_FILE_TRANSFER *) mir_alloc(sizeof(TLEN_FILE_TRANSFER));
memset(ft, 0, sizeof(TLEN_FILE_TRANSFER));
c = JabberXmlGetAttrValue(fs, "c");
s = JabberXmlGetAttrValue(fs, "s");
ft->jid = mir_strdup(from);
- ft->proto = info->proto;
+ ft->proto = info->proto;
ft->hContact = JabberHContactFromJID(info->proto, from);
ft->iqId = mir_strdup(id);
ft->fileTotalSize = atoi(s);
ft->newP2P = TRUE;
if ((item=JabberListAdd(ft->proto, LIST_FILE, ft->iqId)) != NULL) {
- char *szBlob;
char fileInfo[128];
item->ft = ft;
mir_snprintf(fileInfo, sizeof(fileInfo), "%s file(s), %s bytes", c, s);
- // blob is DWORD(*ft), ASCIIZ(filenames), ASCIIZ(description)
- szBlob = (char *) mir_alloc(sizeof(DWORD) + strlen(fileInfo) + 2);
- *((PDWORD) szBlob) = (DWORD) ft;
- strcpy(szBlob + sizeof(DWORD), fileInfo);
- szBlob[sizeof(DWORD) + strlen(fileInfo) + 1] = '\0';
- pre.flags = 0;
+ TCHAR* filenameT = mir_utf8decodeT((char*)fileInfo);
+ PROTORECVFILET pre = {0};
+ pre.flags = PREF_TCHAR;
+ pre.fileCount = 1;
pre.timestamp = time(NULL);
- pre.szMessage = szBlob;
- pre.lParam = 0;
- ccs.szProtoService = PSR_FILE;
- ccs.hContact = ft->hContact;
- ccs.wParam = 0;
- ccs.lParam = (LPARAM) ⪯
+ pre.tszDescription = filenameT;
+ pre.ptszFiles = &filenameT;
+ pre.lParam = (LPARAM)ft;
JabberLog(ft->proto, "sending chainrecv");
+ CCSDATA ccs = { ft->hContact, PSR_FILE, 0, (LPARAM)&pre };
CallService(MS_PROTO_CHAINRECV, 0, (LPARAM) &ccs);
- mir_free(szBlob);
+ mir_free(filenameT);
}
} else if (!strcmp(e, "3")) {
/* transfer error */
@@ -315,7 +306,7 @@ void TlenProcessP2P(XmlNode *node, ThreadData *info) { /* ks - key size (in bytes) */
/* iv - aes initial vector */
/* mi - p2p connection id */
- char *n, *k, *v, *ck, *ks, *iv;
+ char *n, *k, *v, *ck, *iv;
n = JabberXmlGetAttrValue(dcng, "n");
k = JabberXmlGetAttrValue(dcng, "k");
v = JabberXmlGetAttrValue(dcng, "v");
diff --git a/plugins/!NotAdopted/Tlen/tlen_p2p_old.c b/protocols/Tlen/src/tlen_p2p_old.cpp index 0d5c121535..7c1f706d49 100644 --- a/plugins/!NotAdopted/Tlen/tlen_p2p_old.c +++ b/protocols/Tlen/src/tlen_p2p_old.cpp @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -18,14 +18,13 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
-#include "jabber.h"
+#include "tlen_p2p_old.h"
#include <io.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "jabber_list.h"
-#include "tlen_p2p_old.h"
+
void TlenP2PFreeFileTransfer(TLEN_FILE_TRANSFER *ft)
{
@@ -53,13 +52,13 @@ TLEN_FILE_PACKET *TlenP2PPacketCreate(int datalen) if ((packet=(TLEN_FILE_PACKET *) mir_alloc(sizeof(TLEN_FILE_PACKET))) == NULL)
return NULL;
- packet->packet = NULL;
- if (datalen > 0) {
- if ((packet->packet=(char *) mir_alloc(datalen)) == NULL) {
- mir_free(packet);
- return NULL;
- }
- }
+ packet->packet = NULL;
+ if (datalen > 0) {
+ if ((packet->packet=(char *) mir_alloc(datalen)) == NULL) {
+ mir_free(packet);
+ return NULL;
+ }
+ }
packet->maxDataLen = datalen;
packet->type=0;
packet->len=0;
@@ -77,21 +76,21 @@ void TlenP2PPacketFree(TLEN_FILE_PACKET *packet) void TlenP2PPacketSetType(TLEN_FILE_PACKET *packet, DWORD type)
{
- if (packet!=NULL) {
+ if (packet != NULL) {
packet->type = type;
}
}
void TlenP2PPacketSetLen(TLEN_FILE_PACKET *packet, DWORD len)
{
- if (packet!=NULL) {
+ if (packet != NULL) {
packet->len = len;
}
}
void TlenP2PPacketPackDword(TLEN_FILE_PACKET *packet, DWORD data)
{
- if (packet!=NULL && packet->packet!=NULL) {
+ if (packet != NULL && packet->packet != NULL) {
if (packet->len + sizeof(DWORD) <= packet->maxDataLen) {
(*((DWORD*)((packet->packet)+(packet->len)))) = data;
packet->len += sizeof(DWORD);
@@ -101,7 +100,7 @@ void TlenP2PPacketPackDword(TLEN_FILE_PACKET *packet, DWORD data) void TlenP2PPacketPackBuffer(TLEN_FILE_PACKET *packet, char *buffer, int len)
{
- if (packet!=NULL && packet->packet!=NULL) {
+ if (packet != NULL && packet->packet != NULL) {
if (packet->len + len <= packet->maxDataLen) {
memcpy((packet->packet)+(packet->len), buffer, len);
packet->len += len;
@@ -118,11 +117,11 @@ void TlenP2PUninit() { int TlenP2PPacketSend(JABBER_SOCKET s, TLEN_FILE_PACKET *packet)
{
DWORD sendResult;
- if (packet!=NULL && packet->packet!=NULL) {
+ if (packet != NULL && packet->packet != NULL) {
Netlib_Send(s, (char *)&packet->type, 4, MSG_NODUMP);
Netlib_Send(s, (char *)&packet->len, 4, MSG_NODUMP);
sendResult=Netlib_Send(s, packet->packet, packet->len, MSG_NODUMP);
- if (sendResult==SOCKET_ERROR || sendResult!=packet->len) return 0;
+ if (sendResult == SOCKET_ERROR || sendResult != packet->len) return 0;
}
return 1;
}
@@ -133,16 +132,16 @@ TLEN_FILE_PACKET* TlenP2PPacketReceive(JABBER_SOCKET s) DWORD recvResult;
DWORD type, len, pos;
recvResult = Netlib_Recv(s, (char *)&type, 4, MSG_NODUMP);
- if (recvResult==0 || recvResult==SOCKET_ERROR) return NULL;
+ if (recvResult == 0 || recvResult == SOCKET_ERROR) return NULL;
recvResult = Netlib_Recv(s, (char *)&len, 4, MSG_NODUMP);
- if (recvResult==0 || recvResult==SOCKET_ERROR) return NULL;
+ if (recvResult == 0 || recvResult == SOCKET_ERROR) return NULL;
packet = TlenP2PPacketCreate(len);
TlenP2PPacketSetType(packet, type);
TlenP2PPacketSetLen(packet, len);
pos = 0;
while (len > 0) {
recvResult = Netlib_Recv(s, packet->packet+pos, len, MSG_NODUMP);
- if (recvResult==0 || recvResult==SOCKET_ERROR) {
+ if (recvResult == 0 || recvResult == SOCKET_ERROR) {
TlenP2PPacketFree(packet);
return NULL;
}
@@ -161,7 +160,7 @@ void TlenP2PEstablishOutgoingConnection(TLEN_FILE_TRANSFER *ft, BOOL sendAck) JabberLog(proto, "Establishing outgoing connection.");
ft->state = FT_ERROR;
- if ((packet = TlenP2PPacketCreate(2*sizeof(DWORD) + 20))!=NULL) {
+ if ((packet = TlenP2PPacketCreate(2*sizeof(DWORD) + 20)) != NULL) {
TlenP2PPacketSetType(packet, TLEN_FILE_PACKET_CONNECTION_REQUEST);
TlenP2PPacketPackDword(packet, 1);
TlenP2PPacketPackDword(packet, (DWORD) atoi(ft->iqId));
@@ -177,7 +176,7 @@ void TlenP2PEstablishOutgoingConnection(TLEN_FILE_TRANSFER *ft, BOOL sendAck) if ((int)(*((DWORD*)packet->packet)) == atoi(ft->iqId)) {
ft->state = FT_CONNECTING;
if (sendAck) {
- ProtoBroadcastAck(proto->iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, ft, 0);
+ ProtoBroadcastAck(proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, ft, 0);
}
}
}
@@ -186,7 +185,7 @@ void TlenP2PEstablishOutgoingConnection(TLEN_FILE_TRANSFER *ft, BOOL sendAck) }
}
-TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, JABBER_SOCKET s, int list, BOOL sendAck)
+TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, JABBER_SOCKET s, JABBER_LIST list, BOOL sendAck)
{
JABBER_LIST_ITEM *item = NULL;
TLEN_FILE_PACKET *packet;
@@ -200,7 +199,7 @@ TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, JABB // (BYTE) hash[20]
packet = TlenP2PPacketReceive(s);
if (packet == NULL || packet->type != TLEN_FILE_PACKET_CONNECTION_REQUEST || packet->len<28) {
- if (packet!=NULL) {
+ if (packet != NULL) {
TlenP2PPacketFree(packet);
}
return NULL;
@@ -208,7 +207,7 @@ TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, JABB iqId = *((DWORD *)(packet->packet+sizeof(DWORD)));
i = 0;
while ((i=JabberListFindNext(proto, list, i)) >= 0) {
- if ((item=JabberListGetItemPtrFromIndex(proto, i))!=NULL) {
+ if ((item=JabberListGetItemPtrFromIndex(proto, i)) != NULL) {
_snprintf(str, sizeof(str), "%d", iqId);
if (!strcmp(item->ft->iqId, str)) {
char *hash, *nick;
@@ -218,10 +217,10 @@ TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, JABB mir_free(nick);
hash = TlenSha1(str, (int)strlen(str));
for (j=0;j<20;j++) {
- if (hash[j]!=packet->packet[2*sizeof(DWORD)+j]) break;
+ if (hash[j] != packet->packet[2*sizeof(DWORD)+j]) break;
}
mir_free(hash);
- if (j==20) break;
+ if (j == 20) break;
}
}
i++;
@@ -236,7 +235,7 @@ TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, JABB TlenP2PPacketFree(packet);
item->ft->state = FT_CONNECTING;
if (sendAck) {
- ProtoBroadcastAck(item->ft->proto->iface.m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, item->ft, 0);
+ ProtoBroadcastAck(item->ft->proto->m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, item->ft, 0);
}
return item->ft;
}
@@ -252,7 +251,7 @@ static void __cdecl TlenFileBindSocks4Thread(TLEN_FILE_TRANSFER* ft) // JabberLog("Waiting for the file to be sent via SOCKS...");
status = Netlib_Recv(ft->s, (char*)buf, 8, MSG_NODUMP);
// JabberLog("accepted connection !!!");
- if ( status == SOCKET_ERROR || status<8 || buf[1]!=90) {
+ if ( status == SOCKET_ERROR || status < 8 || buf[1] != 90) {
status = 1;
} else {
status = 0;
@@ -260,7 +259,7 @@ static void __cdecl TlenFileBindSocks4Thread(TLEN_FILE_TRANSFER* ft) if (!status) {
ft->pfnNewConnectionV2(ft->s, 0, NULL);
} else {
- if (ft->state!=FT_SWITCH) {
+ if (ft->state != FT_SWITCH) {
ft->state = FT_ERROR;
}
}
@@ -278,7 +277,7 @@ static void __cdecl TlenFileBindSocks5Thread(TLEN_FILE_TRANSFER* ft) // JabberLog("Waiting for the file to be sent via SOCKS...");
status = Netlib_Recv(ft->s, (char*)buf, sizeof(buf), MSG_NODUMP);
// JabberLog("accepted connection !!!");
- if ( status == SOCKET_ERROR || status<7 || buf[1]!=0) {
+ if ( status == SOCKET_ERROR || status < 7 || buf[1] != 0) {
status = 1;
} else {
status = 0;
@@ -286,7 +285,7 @@ static void __cdecl TlenFileBindSocks5Thread(TLEN_FILE_TRANSFER* ft) if (!status) {
ft->pfnNewConnectionV2(ft->s, 0, NULL);
} else {
- if (ft->state!=FT_SWITCH) {
+ if (ft->state != FT_SWITCH) {
ft->state = FT_ERROR;
}
}
@@ -311,7 +310,7 @@ static JABBER_SOCKET TlenP2PBindSocks4(SOCKSBIND * sb, TLEN_FILE_TRANSFER *ft) nloc.wPort = sb->wPort;
nloc.flags = 0;
s = (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) ft->proto->hFileNetlibUser, (LPARAM) &nloc);
- if (s==NULL) {
+ if (s == NULL) {
// JabberLog("Connection failed (%d), thread ended", WSAGetLastError());
return NULL;
}
@@ -328,19 +327,19 @@ static JABBER_SOCKET TlenP2PBindSocks4(SOCKSBIND * sb, TLEN_FILE_TRANSFER *ft) }
len += 9;
status = Netlib_Send(s, (char*)buf, len, MSG_NODUMP);
- if (status==SOCKET_ERROR || status<len) {
+ if (status == SOCKET_ERROR || status < len) {
// JabberLog("Send failed (%d), thread ended", WSAGetLastError());
Netlib_CloseHandle(s);
return NULL;
}
status = Netlib_Recv(s, (char*)buf, 8, MSG_NODUMP);
- if (status==SOCKET_ERROR || status<8 || buf[1]!=90) {
+ if (status == SOCKET_ERROR || status < 8 || buf[1] != 90) {
// JabberLog("SOCKS4 negotiation failed");
Netlib_CloseHandle(s);
return NULL;
}
status = Netlib_Recv(s, (char*)buf, sizeof(buf), MSG_NODUMP);
- if ( status == SOCKET_ERROR || status<7 || buf[0]!=5 || buf[1]!=0) {
+ if ( status == SOCKET_ERROR || status < 7 || buf[0] != 5 || buf[1] != 0) {
// JabberLog("SOCKS5 request failed");
Netlib_CloseHandle(s);
return NULL;
@@ -366,7 +365,7 @@ static JABBER_SOCKET TlenP2PBindSocks5(SOCKSBIND * sb, TLEN_FILE_TRANSFER *ft) nloc.wPort = sb->wPort;
nloc.flags = 0;
s = (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) ft->proto->hFileNetlibUser, (LPARAM) &nloc);
- if (s==NULL) {
+ if (s == NULL) {
JabberLog(ft->proto, "Connection failed (%d), thread ended", WSAGetLastError());
return NULL;
}
@@ -374,18 +373,18 @@ static JABBER_SOCKET TlenP2PBindSocks5(SOCKSBIND * sb, TLEN_FILE_TRANSFER *ft) buf[1] = 1; //one auth method
buf[2] = sb->useAuth?2:0; // authorization
status = Netlib_Send(s, (char*)buf, 3, MSG_NODUMP);
- if (status==SOCKET_ERROR || status<3) {
+ if (status == SOCKET_ERROR || status < 3) {
JabberLog(ft->proto, "Send failed (%d), thread ended", WSAGetLastError());
Netlib_CloseHandle(s);
return NULL;
}
status = Netlib_Recv(s, (char*)buf, 2, MSG_NODUMP);
- if (status==SOCKET_ERROR || status<2 || (buf[1]!=0 && buf[1]!=2)) {
+ if (status == SOCKET_ERROR || status < 2 || (buf[1] != 0 && buf[1] != 2)) {
JabberLog(ft->proto, "SOCKS5 negotiation failed");
Netlib_CloseHandle(s);
return NULL;
}
- if(buf[1]==2) { //rfc1929
+ if (buf[1] == 2) { //rfc1929
int nUserLen, nPassLen;
PBYTE pAuthBuf;
@@ -399,13 +398,13 @@ static JABBER_SOCKET TlenP2PBindSocks5(SOCKSBIND * sb, TLEN_FILE_TRANSFER *ft) memcpy(pAuthBuf+3+nUserLen,sb->szPassword,nPassLen);
status = Netlib_Send(s, (char*)pAuthBuf, 3+nUserLen+nPassLen, MSG_NODUMP);
mir_free(pAuthBuf);
- if (status==SOCKET_ERROR || status<3+nUserLen+nPassLen) {
+ if (status == SOCKET_ERROR || status < 3 + nUserLen+nPassLen) {
JabberLog(ft->proto, "Send failed (%d), thread ended", WSAGetLastError());
Netlib_CloseHandle(s);
return NULL;
}
status = Netlib_Recv(s, (char*)buf, sizeof(buf), MSG_NODUMP);
- if (status==SOCKET_ERROR || status<2 || buf[1]!=0) {
+ if (status == SOCKET_ERROR || status < 2 || buf[1] != 0) {
JabberLog(ft->proto, "SOCKS5 sub-negotiation failed");
Netlib_CloseHandle(s);
return NULL;
@@ -424,19 +423,19 @@ static JABBER_SOCKET TlenP2PBindSocks5(SOCKSBIND * sb, TLEN_FILE_TRANSFER *ft) *(PWORD)(pInit+4+nHostLen)=htons(0);
status = Netlib_Send(s, (char*)pInit, 6+nHostLen, MSG_NODUMP);
mir_free(pInit);
- if (status==SOCKET_ERROR || status<6+nHostLen) {
+ if (status == SOCKET_ERROR || status < 6 + nHostLen) {
// JabberLog("Send failed (%d), thread ended", WSAGetLastError());
Netlib_CloseHandle(s);
return NULL;
}
}
status = Netlib_Recv(s, (char*)buf, sizeof(buf), MSG_NODUMP);
- if ( status == SOCKET_ERROR || status<7 || buf[0]!=5 || buf[1]!=0) {
+ if ( status == SOCKET_ERROR || status < 7 || buf[0] != 5 || buf[1] != 0) {
// JabberLog("SOCKS5 request failed");
Netlib_CloseHandle(s);
return NULL;
}
- if (buf[2]==1) { // domain
+ if (buf[2] == 1) { // domain
len = buf[4];
memcpy(sb->szHost, buf+5, len);
sb->szHost[len]=0;
@@ -464,30 +463,30 @@ JABBER_SOCKET TlenP2PListen(TLEN_FILE_TRANSFER *ft) struct in_addr in;
TlenProtocol *proto = ft->proto;
useProxy=0;
- if (ft->localName!= NULL) mir_free(ft->localName);
+ if (ft->localName != NULL) mir_free(ft->localName);
ft->localName = NULL;
ft->wPort = 0;
- if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "UseFileProxy", FALSE)) {
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "FileProxyHost", &dbv)) {
+ if (DBGetContactSettingByte(NULL, proto->m_szModuleName, "UseFileProxy", FALSE)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "FileProxyHost", &dbv)) {
strcpy(sb.szHost, dbv.pszVal);
DBFreeVariant(&dbv);
- sb.wPort = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "FileProxyPort", 0);
+ sb.wPort = DBGetContactSettingWord(NULL, proto->m_szModuleName, "FileProxyPort", 0);
sb.useAuth = FALSE;
strcpy(sb.szUser, "");
strcpy(sb.szPassword, "");
- if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "FileProxyAuth", FALSE)) {
+ if (DBGetContactSettingByte(NULL, proto->m_szModuleName, "FileProxyAuth", FALSE)) {
sb.useAuth = TRUE;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "FileProxyUsername", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "FileProxyUsername", &dbv)) {
strcpy(sb.szUser, dbv.pszVal);
DBFreeVariant(&dbv);
}
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "FileProxyPassword", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "FileProxyPassword", &dbv)) {
CallService(MS_DB_CRYPT_DECODESTRING, strlen(dbv.pszVal)+1, (LPARAM) dbv.pszVal);
strcpy(sb.szPassword, dbv.pszVal);
DBFreeVariant(&dbv);
}
}
- switch (DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "FileProxyType", 0)) {
+ switch (DBGetContactSettingWord(NULL, proto->m_szModuleName, "FileProxyType", 0)) {
case 0: // forwarding
useProxy = 1;
break;
@@ -514,7 +513,7 @@ JABBER_SOCKET TlenP2PListen(TLEN_FILE_TRANSFER *ft) s = (HANDLE) CallService(MS_NETLIB_BINDPORT, (WPARAM) ft->proto->hNetlibUser, (LPARAM) &nlb);
JabberLog(ft->proto, "listening on %d",s);
}
- if (useProxy==0) {
+ if (useProxy == 0) {
in.S_un.S_addr = htonl(nlb.dwExternalIP);
ft->localName = mir_strdup(inet_ntoa(in));
ft->wPort = nlb.wPort;
diff --git a/plugins/!NotAdopted/Tlen/tlen_p2p_old.h b/protocols/Tlen/src/tlen_p2p_old.h index d6405a378e..4e2305310f 100644 --- a/plugins/!NotAdopted/Tlen/tlen_p2p_old.h +++ b/protocols/Tlen/src/tlen_p2p_old.h @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -60,7 +60,11 @@ extern void TlenP2PPacketPackBuffer(TLEN_FILE_PACKET *packet, char *buffer, int extern int TlenP2PPacketSend(JABBER_SOCKET s, TLEN_FILE_PACKET *packet);
extern TLEN_FILE_PACKET* TlenP2PPacketReceive(JABBER_SOCKET s);
extern void TlenP2PEstablishOutgoingConnection(TLEN_FILE_TRANSFER *ft, BOOL sendAck);
-extern TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, JABBER_SOCKET s, int list, BOOL sendAck);
+extern TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, JABBER_SOCKET s, JABBER_LIST list, BOOL sendAck);
extern JABBER_SOCKET TlenP2PListen(TLEN_FILE_TRANSFER *ft);
extern void TlenP2PStopListening(JABBER_SOCKET s);
+
+void __cdecl TlenProcessP2P(XmlNode *node, void *userdata);
+
+
#endif
diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp new file mode 100644 index 0000000000..1120b23839 --- /dev/null +++ b/protocols/Tlen/src/tlen_picture.cpp @@ -0,0 +1,320 @@ +/*
+
+Tlen Protocol Plugin for Miranda NG
+Copyright (C) 2002-2004 Santithorn Bunchua
+Copyright (C) 2004-2009 Piotr Piastucki
+
+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 "jabber.h"
+#include "jabber_list.h"
+#include "tlen_file.h"
+#include "tlen_p2p_old.h"
+
+typedef struct {
+ TlenProtocol *proto;
+ JABBER_LIST_ITEM *item;
+} TLENPSREQUESTTHREADDATA;
+
+static void LogPictureMessage(TlenProtocol *proto, const char *jid, const char *filename, BOOL isSent)
+{
+ char message[1024];
+ const char *msg = isSent ? "Image sent file://%s" : "Image received file://%s";
+ _snprintf(message, sizeof(message), Translate(msg), filename);
+ TlenLogMessage(proto, JabberHContactFromJID(proto, jid), isSent ? DBEF_SENT : 0, message);
+}
+
+static void TlenPsPostThread(void *ptr) {
+ TLENPSREQUESTTHREADDATA *data = (TLENPSREQUESTTHREADDATA *)ptr;
+ TlenProtocol *proto = data->proto;
+ JABBER_LIST_ITEM *item = data->item;
+ JABBER_SOCKET socket = JabberWsConnect(proto, "ps.tlen.pl", 443);
+ BOOL bSent = FALSE;
+ if (socket != NULL) {
+ char header[512];
+ DWORD ret;
+ item->ft->s = socket;
+ item->ft->hFileEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ _snprintf(header, sizeof(header), "<pic auth='%s' t='p' to='%s' size='%d' idt='%s'/>", proto->threadData->username, item->ft->jid, item->ft->fileTotalSize, item->jid);
+ JabberWsSend(proto, socket, header, (int)strlen(header));
+ ret = WaitForSingleObject(item->ft->hFileEvent, 1000 * 60 * 5);
+ if (ret == WAIT_OBJECT_0) {
+ FILE *fp = fopen( item->ft->files[0], "rb" );
+ if (fp) {
+ int i;
+ char header[512];
+ char fileBuffer[2048];
+ _snprintf(header, sizeof(header), "<pic st='%s' idt='%s'/>", item->ft->iqId, item->jid);
+ JabberWsSend(proto, socket, header, (int)strlen(header));
+ JabberLog(proto, "Sending picture data...");
+ for (i = item->ft->filesSize[0]; i > 0; ) {
+ int toread = min(2048, i);
+ int readcount = (int)fread(fileBuffer, (size_t)1, (size_t)toread, fp);
+ i -= readcount;
+ if (readcount > 0) {
+ JabberWsSend(proto, socket, fileBuffer, readcount);
+ }
+ if (toread != readcount) {
+ break;
+ }
+ }
+ fclose(fp);
+ SleepEx(3000, TRUE);
+ bSent = TRUE;
+ } else {
+ /* picture not found */
+ }
+ } else {
+ /* 5 minutes passed */
+ }
+ Netlib_CloseHandle(socket);
+ if (bSent) {
+ JabberSend(proto, "<message to='%s' idt='%s' rt='%s' pid='1001' type='pic' />", item->ft->jid, item->jid, item->ft->id2);
+ LogPictureMessage(proto, item->ft->jid, item->ft->files[0], TRUE);
+ }
+ TlenP2PFreeFileTransfer(item->ft);
+ JabberListRemove(proto, LIST_PICTURE, item->jid);
+ } else {
+ /* cannot connect to ps server */
+ }
+ mir_free(data);
+}
+
+static void TlenPsPost(TlenProtocol *proto, JABBER_LIST_ITEM *item) {
+ TLENPSREQUESTTHREADDATA *threadData = (TLENPSREQUESTTHREADDATA *)mir_alloc(sizeof(TLENPSREQUESTTHREADDATA));
+ threadData->proto = proto;
+ threadData->item = item;
+ JabberForkThread(TlenPsPostThread, 0, threadData);
+}
+
+static void TlenPsGetThread(void *ptr) {
+ TLENPSREQUESTTHREADDATA *data = (TLENPSREQUESTTHREADDATA *)ptr;
+ TlenProtocol *proto = data->proto;
+ JABBER_LIST_ITEM *item = data->item;
+ FILE *fp;
+ fp = fopen( item->ft->files[0], "wb" );
+ if (fp) {
+ JABBER_SOCKET socket = JabberWsConnect(proto, "ps.tlen.pl", 443);
+ if (socket != NULL) {
+ XmlState xmlState;
+ char header[512];
+ char fileBuffer[2048];
+ JabberXmlInitState(&xmlState);
+ _snprintf(header, sizeof(header), "<pic auth='%s' t='g' to='%s' pid='1001' idt='%s' rt='%s'/>", proto->threadData->username, item->ft->jid, item->jid, item->ft->id2);
+ JabberWsSend(proto, socket, header, (int)strlen(header));
+ JabberLog(proto, "Reveiving picture data...");
+ {
+ int totalcount = 0;
+ int size = item->ft->filesSize[0];
+ BOOL bHeader = TRUE;
+ while (TRUE) {
+ int readcount = JabberWsRecv(proto, socket, fileBuffer, 2048 - totalcount);
+ if (readcount == 0) {
+ break;
+ }
+ totalcount += readcount;
+ if (bHeader) {
+ char * tagend = (char*)memchr(fileBuffer, '/', totalcount);
+ tagend = (char*)memchr(tagend + 1, '>', totalcount - (tagend - fileBuffer) - 1);
+ if (tagend != NULL) {
+ int parsed = JabberXmlParse(&xmlState, fileBuffer, tagend - fileBuffer + 1);
+ if (parsed == 0) {
+ continue;
+ }
+ bHeader = FALSE;
+ totalcount -= parsed;
+ memmove(fileBuffer, fileBuffer+parsed, totalcount);
+ }
+ }
+ if (!bHeader) {
+ if (totalcount > 0) {
+ fwrite(fileBuffer, 1, totalcount, fp);
+ size -= totalcount;
+ totalcount = 0;
+ }
+ if (size == 0) {
+ break;
+ }
+ }
+ }
+ }
+ Netlib_CloseHandle(socket);
+ JabberLog(proto, "Picture received...");
+ LogPictureMessage(proto, item->ft->jid, item->ft->files[0], FALSE);
+ } else {
+ /* cannot connect to ps server */
+ }
+ fclose(fp);
+ } else {
+ /* cannot create file */
+ }
+ TlenP2PFreeFileTransfer(item->ft);
+ JabberListRemove(proto, LIST_PICTURE, item->jid);
+ mir_free(data);
+}
+
+static void TlenPsGet(TlenProtocol *proto, JABBER_LIST_ITEM *item) {
+ TLENPSREQUESTTHREADDATA *threadData = (TLENPSREQUESTTHREADDATA *)mir_alloc(sizeof(TLENPSREQUESTTHREADDATA));
+ threadData->proto = proto;
+ threadData->item = item;
+ JabberForkThread(TlenPsGetThread, 0, threadData);
+}
+
+void TlenProcessPic(XmlNode *node, TlenProtocol *proto) {
+ JABBER_LIST_ITEM *item = NULL;
+ char *crc, *crc_c, *idt, *size, *from, *fromRaw, *rt;
+ from = JabberXmlGetAttrValue(node, "from");
+ fromRaw = JabberLoginFromJID(from);
+ idt = JabberXmlGetAttrValue(node, "idt");
+ size = JabberXmlGetAttrValue(node, "size");
+ crc_c = JabberXmlGetAttrValue(node, "crc_c");
+ crc = JabberXmlGetAttrValue(node, "crc");
+ rt = JabberXmlGetAttrValue(node, "rt");
+ if (idt != NULL) {
+ item = JabberListGetItemPtr(proto, LIST_PICTURE, idt);
+ }
+ if (item != NULL) {
+ if (!strcmp(from, "ps")) {
+ char *st = JabberXmlGetAttrValue(node, "st");
+ if (st != NULL) {
+ item->ft->iqId = mir_strdup(st);
+ item->ft->id2 = mir_strdup(rt);
+ if (item->ft->hFileEvent != NULL) {
+ SetEvent(item->ft->hFileEvent);
+ item->ft->hFileEvent = NULL;
+ }
+ }
+ } else if (!strcmp(item->ft->jid, fromRaw)) {
+ if (crc_c != NULL) {
+ if (!strcmp(crc_c, "n")) {
+ /* crc_c = n, picture transfer accepted */
+ TlenPsPost(proto, item);
+ } else if (!strcmp(crc_c, "f")) {
+ /* crc_c = f, picture cached, no need to transfer again */
+ LogPictureMessage(proto, item->ft->jid, item->ft->files[0], TRUE);
+ TlenP2PFreeFileTransfer(item->ft);
+ JabberListRemove(proto, LIST_PICTURE, idt);
+ }
+ } else if (rt != NULL) {
+ item->ft->id2 = mir_strdup(rt);
+ TlenPsGet(proto, item);
+ }
+ }
+ } else if (crc != NULL) {
+ BOOL bAccept = proto->tlenOptions.imagePolicy == TLEN_IMAGES_ACCEPT_ALL || (proto->tlenOptions.imagePolicy == TLEN_IMAGES_IGNORE_NIR && IsAuthorized(proto, from));
+ if (bAccept) {
+ FILE* fp;
+ char fileName[MAX_PATH];
+ char *ext = JabberXmlGetAttrValue(node, "ext");
+ char *tmpPath = Utils_ReplaceVars( "%miranda_userdata%" );
+ int tPathLen = mir_snprintf( fileName, MAX_PATH, "%s\\Images\\Tlen", tmpPath );
+ long oldSize = 0, lSize = atol(size);
+ DWORD dwAttributes = GetFileAttributesA( fileName );
+ if ( dwAttributes == 0xffffffff || ( dwAttributes & FILE_ATTRIBUTE_DIRECTORY ) == 0 ) {
+ CallService( MS_UTILS_CREATEDIRTREE, 0, ( LPARAM )fileName );
+ }
+ mir_free(tmpPath);
+ fileName[ tPathLen++ ] = '\\';
+ mir_snprintf( fileName + tPathLen, MAX_PATH - tPathLen, "%s.%s", crc, ext );
+ fp = fopen( fileName, "rb" );
+ if (fp) {
+ fseek(fp, 0, SEEK_END);
+ oldSize = ftell(fp);
+ fclose(fp);
+ }
+ if (oldSize != lSize) {
+ item = JabberListAdd(proto, LIST_PICTURE, idt);
+ item->ft = TlenFileCreateFT(proto, from);
+ item->ft->files = (char **) mir_alloc(sizeof(char *));
+ item->ft->filesSize = (long *) mir_alloc(sizeof(long));
+ item->ft->files[0] = mir_strdup(fileName);
+ item->ft->filesSize[0] = lSize;
+ item->ft->fileTotalSize = item->ft->filesSize[0];
+ JabberSend(proto, "<message type='pic' to='%s' crc_c='n' idt='%s'/>", from, idt);
+ } else {
+ JabberSend(proto, "<message type='pic' to='%s' crc_c='f' idt='%s'/>", from, idt);
+ LogPictureMessage(proto, from, fileName, FALSE);
+ }
+ }
+ }
+ mir_free(fromRaw);
+}
+
+BOOL SendPicture(TlenProtocol *proto, HANDLE hContact) {
+ DBVARIANT dbv;
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
+ char *jid = dbv.pszVal;
+ char szFilter[512];
+ char *szFileName = (char*) mir_alloc(_MAX_PATH);
+ OPENFILENAMEA ofn = {0};
+ CallService( MS_UTILS_GETBITMAPFILTERSTRINGS, ( WPARAM ) sizeof( szFilter ), ( LPARAM )szFilter );
+ ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.hwndOwner = NULL;
+ ofn.lpstrFilter = szFilter;
+ ofn.lpstrCustomFilter = NULL;
+ ofn.lpstrFile = szFileName;
+ ofn.nMaxFile = _MAX_PATH;
+ ofn.Flags = OFN_FILEMUSTEXIST;
+ szFileName[0] = '\0';
+ if ( GetOpenFileNameA( &ofn )) {
+ long size;
+ FILE* fp = fopen( szFileName, "rb" );
+ if (fp) {
+ fseek(fp, 0, SEEK_END);
+ size = ftell(fp);
+ if (size > 0 && size < 256*1024) {
+ JABBER_LIST_ITEM *item;
+ mir_sha1_ctx sha;
+ DWORD digest[5];
+ int i;
+ char idStr[10];
+ char fileBuffer[2048];
+ int id = JabberSerialNext(proto);
+ _snprintf(idStr, sizeof(idStr), "%d", id);
+ item = JabberListAdd(proto, LIST_PICTURE, idStr);
+ item->ft = TlenFileCreateFT(proto, jid);
+ item->ft->files = (char **) mir_alloc(sizeof(char *));
+ item->ft->filesSize = (long *) mir_alloc(sizeof(long));
+ item->ft->files[0] = szFileName;
+ item->ft->filesSize[0] = size;
+ item->ft->fileTotalSize = size;
+ fseek(fp, 0, SEEK_SET);
+ mir_sha1_init( &sha );
+ for (i = item->ft->filesSize[0]; i > 0; ) {
+ int toread = min(2048, i);
+ int readcount = (int)fread(fileBuffer, (size_t)1, (size_t)toread, fp);
+ i -= readcount;
+ if (readcount > 0) {
+ mir_sha1_append( &sha, (mir_sha1_byte_t* )fileBuffer, readcount);
+ }
+ if (toread != readcount) {
+ break;
+ }
+ }
+ mir_sha1_finish( &sha, (mir_sha1_byte_t* )digest );
+ JabberSend(proto, "<message type='pic' to='%s' crc='%08x%08x%08x%08x%08x' idt='%s' size='%d' ext='%s'/>", jid,
+ (int)htonl(digest[0]), (int)htonl(digest[1]), (int)htonl(digest[2]), (int)htonl(digest[3]), (int)htonl(digest[4]), idStr, item->ft->filesSize[0], "jpg");
+ } else {
+ /* file too big */
+ }
+ fclose(fp);
+ }
+ }
+ DBFreeVariant(&dbv);
+ }
+ return FALSE;
+}
diff --git a/plugins/!NotAdopted/Tlen/tlen_picture.h b/protocols/Tlen/src/tlen_picture.h index e4836444ee..ef98b02405 100644 --- a/plugins/!NotAdopted/Tlen/tlen_picture.h +++ b/protocols/Tlen/src/tlen_picture.h @@ -1,7 +1,7 @@ /* Jabber Protocol Plugin for Miranda IM -Tlen Protocol Plugin for Miranda IM +Tlen Protocol Plugin for Miranda NG Copyright (C) 2002-2004 Santithorn Bunchua Copyright (C) 2004-2009 Piotr Piastucki @@ -26,16 +26,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <windows.h> #include "jabber.h" -#ifdef __cplusplus -extern "C" { -#endif - -extern void TlenProcessPic(XmlNode *node, TlenProtocol *proto); -extern BOOL SendPicture(TlenProtocol *, HANDLE hContact); - -#ifdef __cplusplus -} -#endif +void TlenProcessPic(XmlNode *node, TlenProtocol *proto); +BOOL SendPicture(TlenProtocol *, HANDLE hContact); #endif /* _TLEN_PICTURE_H */ diff --git a/plugins/!NotAdopted/Tlen/tlen_presence.c b/protocols/Tlen/src/tlen_presence.cpp index ca1f14e23c..7dc15f41f6 100644 --- a/plugins/!NotAdopted/Tlen/tlen_presence.c +++ b/protocols/Tlen/src/tlen_presence.cpp @@ -1,6 +1,6 @@ /* -Tlen Protocol Plugin for Miranda IM +Tlen Protocol Plugin for Miranda NG Copyright (C) 2002-2004 Santithorn Bunchua Copyright (C) 2004-2009 Piotr Piastucki @@ -44,7 +44,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) TlenProcessPresenceAvatar(proto, node, item); } } - if (type==NULL || (!strcmp(type, "available"))) { + if (type == NULL || (!strcmp(type, "available"))) { if ((nick=JabberLocalNickFromJID(from)) != NULL) { if ((hContact=JabberHContactFromJID(proto, from)) == NULL) hContact = JabberDBCreateContact(proto, from, nick, FALSE); @@ -83,9 +83,9 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) laststatus = item->status; item->status = status; } - if (strchr(from, '@')!=NULL || DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "ShowTransport", TRUE)==TRUE) { - if (DBGetContactSettingWord(hContact, proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE) != status) - DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "Status", (WORD) status); + if (strchr(from, '@') != NULL || DBGetContactSettingByte(NULL, proto->m_szModuleName, "ShowTransport", TRUE) == TRUE) { + if (DBGetContactSettingWord(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != status) + DBWriteContactSettingWord(hContact, proto->m_szModuleName, "Status", (WORD) status); } if (item != NULL) { if (!item->infoRequested) { @@ -95,7 +95,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) } if (proto->tlenOptions.enableVersion && !item->versionRequested) { item->versionRequested = TRUE; - if (proto->iface.m_iStatus != ID_STATUS_INVISIBLE) { + if (proto->m_iStatus != ID_STATUS_INVISIBLE) { JabberSend( proto, "<message to='%s' type='iq'><iq type='get'><query xmlns='jabber:iq:version'/></iq></message>", from ); } } @@ -136,9 +136,9 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) item->infoRequested = FALSE; } if ((hContact=JabberHContactFromJID(proto, from)) != NULL) { - if (strchr(from, '@')!=NULL || DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "ShowTransport", TRUE)==TRUE) { - if (DBGetContactSettingWord(hContact, proto->iface.m_szModuleName, "Status", ID_STATUS_OFFLINE) != status) - DBWriteContactSettingWord(hContact, proto->iface.m_szModuleName, "Status", (WORD) status); + if (strchr(from, '@') != NULL || DBGetContactSettingByte(NULL, proto->m_szModuleName, "ShowTransport", TRUE) == TRUE) { + if (DBGetContactSettingWord(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != status) + DBWriteContactSettingWord(hContact, proto->m_szModuleName, "Status", (WORD) status); } if (item != NULL && item->isTyping) { item->isTyping = FALSE; @@ -214,10 +214,10 @@ static void JabberSendPresenceTo(TlenProtocol *proto, int status, char *to) break; case ID_STATUS_OFFLINE: presenceType = "unavailable"; - if (DBGetContactSettingByte(NULL, proto->iface.m_szModuleName, "LeaveOfflineMessage", FALSE)) { - int offlineMessageOption = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "OfflineMessageOption", 0); + if (DBGetContactSettingByte(NULL, proto->m_szModuleName, "LeaveOfflineMessage", FALSE)) { + int offlineMessageOption = DBGetContactSettingWord(NULL, proto->m_szModuleName, "OfflineMessageOption", 0); if (offlineMessageOption == 0) { - switch (proto->iface.m_iStatus) { + switch (proto->m_iStatus) { case ID_STATUS_ONLINE: ptr = mir_strdup(proto->modeMsgs.szOnline); break; @@ -250,14 +250,14 @@ static void JabberSendPresenceTo(TlenProtocol *proto, int status, char *to) char substituteStr[128]; ptr = mir_strdup(dbv.pszVal); DBFreeVariant(&dbv); - for(i=0;ptr[i];i++) { - if(ptr[i]!='%') continue; - if(!_strnicmp(ptr+i,"%time%",6)) + for (i=0;ptr[i];i++) { + if (ptr[i] != '%') continue; + if (!_strnicmp(ptr+i,"%time%",6)) GetTimeFormatA(LOCALE_USER_DEFAULT,TIME_NOSECONDS,NULL,NULL,substituteStr,sizeof(substituteStr)); - else if(!_strnicmp(ptr+i,"%date%",6)) + else if (!_strnicmp(ptr+i,"%date%",6)) GetDateFormatA(LOCALE_USER_DEFAULT,DATE_SHORTDATE,NULL,NULL,substituteStr,sizeof(substituteStr)); else continue; - if(strlen(substituteStr)>6) ptr=(char*)mir_realloc(ptr,strlen(ptr)+1+strlen(substituteStr)-6); + if (strlen(substituteStr)>6) ptr=(char*)mir_realloc(ptr,strlen(ptr)+1+strlen(substituteStr)-6); MoveMemory(ptr+i+strlen(substituteStr),ptr+i+6,strlen(ptr)-i-5); CopyMemory(ptr+i,substituteStr,strlen(substituteStr)); } @@ -270,7 +270,7 @@ static void JabberSendPresenceTo(TlenProtocol *proto, int status, char *to) // Should not reach here break; } - proto->iface.m_iStatus = status; + proto->m_iStatus = status; if (presenceType) { if (statusMsg) JabberSend(proto, "<presence type='%s'><status>%s</status></presence>", presenceType, statusMsg); @@ -288,6 +288,8 @@ static void JabberSendPresenceTo(TlenProtocol *proto, int status, char *to) LeaveCriticalSection(&proto->modeMsgMutex); } + + void JabberSendPresence(TlenProtocol *proto, int statusIn) { int statusOut; @@ -312,3 +314,5 @@ void JabberSendPresence(TlenProtocol *proto, int statusIn) } JabberSendPresenceTo(proto, statusOut, NULL); } + + diff --git a/plugins/!NotAdopted/Tlen/tlen_presence.h b/protocols/Tlen/src/tlen_presence.h index fdc3ea642e..caf92ddab5 100644 --- a/plugins/!NotAdopted/Tlen/tlen_presence.h +++ b/protocols/Tlen/src/tlen_presence.h @@ -1,7 +1,7 @@ /* Jabber Protocol Plugin for Miranda IM -Tlen Protocol Plugin for Miranda IM +Tlen Protocol Plugin for Miranda NG Copyright (C) 2002-2004 Santithorn Bunchua Copyright (C) 2004-2009 Piotr Piastucki @@ -23,15 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _TLEN_PRESENCE_H #define _TLEN_PRESENCE_H -#ifdef __cplusplus -extern "C" { -#endif - void TlenProcessPresence(XmlNode *node, TlenProtocol *proto); -#ifdef __cplusplus -} -#endif - #endif /* _TLEN_PRESENCE_H */ diff --git a/plugins/!NotAdopted/Tlen/tlen_userinfo.c b/protocols/Tlen/src/tlen_userinfo.cpp index 50345282a9..38463f746c 100644 --- a/plugins/!NotAdopted/Tlen/tlen_userinfo.c +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -1,7 +1,7 @@ /*
Jabber Protocol Plugin for Miranda IM
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2002-2004 Santithorn Bunchua
Copyright (C) 2004-2007 Piotr Piastucki
@@ -84,7 +84,7 @@ static void InitComboBox(HWND hwndCombo, JABBER_FIELD_MAP *fieldMap) n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)_T(""));
SendMessage(hwndCombo, CB_SETITEMDATA, n, 0);
SendMessage(hwndCombo, CB_SETCURSEL, n, 0);
- for(i=0;;i++) {
+ for (i=0;;i++) {
if (fieldMap[i].name == NULL)
break;
n = SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM) TranslateTS(fieldMap[i].name));
@@ -97,7 +97,7 @@ static void FetchField(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, i char text[512];
char *localFieldName, *localText;
- if (hwndDlg==NULL || fieldName==NULL || str==NULL || strSize==NULL)
+ if (hwndDlg == NULL || fieldName == NULL || str == NULL || strSize == NULL)
return;
GetDlgItemTextA(hwndDlg, idCtrl, text, sizeof(text));
if (text[0]) {
@@ -116,7 +116,7 @@ static void FetchCombo(HWND hwndDlg, UINT idCtrl, char *fieldName, char **str, i int value;
char *localFieldName;
- if (hwndDlg==NULL || fieldName==NULL || str==NULL || strSize==NULL)
+ if (hwndDlg == NULL || fieldName == NULL || str == NULL || strSize == NULL)
return;
value = (int) SendDlgItemMessage(hwndDlg, idCtrl, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, idCtrl, CB_GETCURSEL, 0, 0), 0);
if (value > 0) {
@@ -135,44 +135,44 @@ int TlenUserInfoInit(void *ptr, WPARAM wParam, LPARAM lParam) OPTIONSDIALOGPAGE odp = {0};
TlenProtocol *proto = (TlenProtocol *)ptr;
- if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM) proto->iface.m_szModuleName))
+ if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM) proto->m_szModuleName))
return 0;
hContact = (HANDLE) lParam;
szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
- if ((szProto!=NULL && !strcmp(szProto, proto->iface.m_szModuleName)) || !lParam) {
+ if ((szProto != NULL && !strcmp(szProto, proto->m_szModuleName)) || !lParam) {
odp.cbSize = sizeof(odp);
odp.hInstance = hInst;
- odp.flags = ODPF_TCHAR;
+ odp.flags = ODPF_TCHAR;
odp.pfnDlgProc = TlenUserInfoDlgProc;
odp.position = -2000000000;
- odp.pszTemplate = ((HANDLE)lParam!=NULL) ? MAKEINTRESOURCEA(IDD_USER_INFO):MAKEINTRESOURCEA(IDD_USER_VCARD);
- odp.ptszTitle = (hContact != NULL) ? TranslateT("Account") : proto->iface.m_tszUserName;
- odp.dwInitParam = (LPARAM)proto;
- CallService(MS_USERINFO_ADDPAGE, wParam, (LPARAM) &odp);
+ odp.pszTemplate = ((HANDLE)lParam != NULL) ? MAKEINTRESOURCEA(IDD_USER_INFO):MAKEINTRESOURCEA(IDD_USER_VCARD);
+ odp.ptszTitle = (hContact != NULL) ? LPGENT("Account") : proto->m_tszUserName;
+ odp.dwInitParam = (LPARAM)proto;
+ UserInfo_AddPage(wParam, &odp);
}
if (!lParam && proto->isOnline) {
CCSDATA ccs = {0};
- JabberGetInfo(ptr, 0, (LPARAM) &ccs);
+ proto->GetInfo(0, (LPARAM) &ccs);
}
return 0;
}
typedef struct {
- TlenProtocol *proto;
- HANDLE hContact;
+ TlenProtocol *proto;
+ HANDLE hContact;
}TLENUSERINFODLGDATA;
static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- TLENUSERINFODLGDATA *data = (TLENUSERINFODLGDATA *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ TLENUSERINFODLGDATA *data = (TLENUSERINFODLGDATA *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
- data = (TLENUSERINFODLGDATA*)mir_alloc(sizeof(TLENUSERINFODLGDATA));
- data->hContact = (HANDLE) lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data);
+ data = (TLENUSERINFODLGDATA*)mir_alloc(sizeof(TLENUSERINFODLGDATA));
+ data->hContact = (HANDLE) lParam;
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data);
// lParam is hContact
TranslateDialogDefault(hwndDlg);
InitComboBox(GetDlgItem(hwndDlg, IDC_GENDER), tlenFieldGender);
@@ -191,35 +191,35 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_SUBSCRIPTION, _T(""));
SetFocus(GetDlgItem(hwndDlg, IDC_STATIC));
- if (!DBGetContactSettingTString(data->hContact, data->proto->iface.m_szModuleName, "FirstName", &dbv)) {
+ if (!DBGetContactSettingTString(data->hContact, data->proto->m_szModuleName, "FirstName", &dbv)) {
SetDlgItemText(hwndDlg, IDC_FIRSTNAME, dbv.ptszVal);
DBFreeVariant(&dbv);
} else SetDlgItemText(hwndDlg, IDC_FIRSTNAME, _T(""));
- if (!DBGetContactSettingTString(data->hContact, data->proto->iface.m_szModuleName, "LastName", &dbv)) {
+ if (!DBGetContactSettingTString(data->hContact, data->proto->m_szModuleName, "LastName", &dbv)) {
SetDlgItemText(hwndDlg, IDC_LASTNAME, dbv.ptszVal);
DBFreeVariant(&dbv);
} else SetDlgItemText(hwndDlg, IDC_LASTNAME, _T(""));
- if (!DBGetContactSettingTString(data->hContact, data->proto->iface.m_szModuleName, "Nick", &dbv)) {
+ if (!DBGetContactSettingTString(data->hContact, data->proto->m_szModuleName, "Nick", &dbv)) {
SetDlgItemText(hwndDlg, IDC_NICKNAME, dbv.ptszVal);
DBFreeVariant(&dbv);
} else SetDlgItemText(hwndDlg, IDC_NICKNAME, _T(""));
- if (!DBGetContactSettingTString(data->hContact, data->proto->iface.m_szModuleName, "e-mail", &dbv)) {
+ if (!DBGetContactSettingTString(data->hContact, data->proto->m_szModuleName, "e-mail", &dbv)) {
SetDlgItemText(hwndDlg, IDC_EMAIL, dbv.ptszVal);
DBFreeVariant(&dbv);
} else SetDlgItemText(hwndDlg, IDC_EMAIL, _T(""));
- if (!DBGetContactSetting(data->hContact, data->proto->iface.m_szModuleName, "Age", &dbv)) {
+ if (!DBGetContactSetting(data->hContact, data->proto->m_szModuleName, "Age", &dbv)) {
SetDlgItemInt(hwndDlg, IDC_AGE, dbv.wVal, FALSE);
DBFreeVariant(&dbv);
} else SetDlgItemText(hwndDlg, IDC_AGE, _T(""));
- if (!DBGetContactSettingTString(data->hContact, data->proto->iface.m_szModuleName, "City", &dbv)) {
+ if (!DBGetContactSettingTString(data->hContact, data->proto->m_szModuleName, "City", &dbv)) {
SetDlgItemText(hwndDlg, IDC_CITY, dbv.ptszVal);
DBFreeVariant(&dbv);
} else SetDlgItemText(hwndDlg, IDC_CITY, _T(""));
- if (!DBGetContactSettingTString(data->hContact, data->proto->iface.m_szModuleName, "School", &dbv)) {
+ if (!DBGetContactSettingTString(data->hContact, data->proto->m_szModuleName, "School", &dbv)) {
SetDlgItemText(hwndDlg, IDC_SCHOOL, dbv.ptszVal);
DBFreeVariant(&dbv);
} else SetDlgItemText(hwndDlg, IDC_SCHOOL, _T(""));
- switch (DBGetContactSettingByte(data->hContact, data->proto->iface.m_szModuleName, "Gender", '?')) {
+ switch (DBGetContactSettingByte(data->hContact, data->proto->m_szModuleName, "Gender", '?')) {
case 'M':
SendDlgItemMessage(hwndDlg, IDC_GENDER, CB_SETCURSEL, 1, 0);
SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, TranslateTS(tlenFieldGender[0].name));
@@ -233,7 +233,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_GENDER_TEXT, _T(""));
break;
}
- i = DBGetContactSettingWord(data->hContact, data->proto->iface.m_szModuleName, "Occupation", 0);
+ i = DBGetContactSettingWord(data->hContact, data->proto->m_szModuleName, "Occupation", 0);
if (i>0 && i<13) {
SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, TranslateTS(tlenFieldOccupation[i-1].name));
SendDlgItemMessage(hwndDlg, IDC_OCCUPATION, CB_SETCURSEL, i, 0);
@@ -241,7 +241,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_OCCUPATION_TEXT, _T(""));
SendDlgItemMessage(hwndDlg, IDC_OCCUPATION, CB_SETCURSEL, 0, 0);
}
- i = DBGetContactSettingWord(data->hContact, data->proto->iface.m_szModuleName, "LookingFor", 0);
+ i = DBGetContactSettingWord(data->hContact, data->proto->m_szModuleName, "LookingFor", 0);
if (i>0 && i<6) {
SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, TranslateTS(tlenFieldLookfor[i-1].name));
SendDlgItemMessage(hwndDlg, IDC_LOOKFOR, CB_SETCURSEL, i, 0);
@@ -249,11 +249,11 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara SetDlgItemText(hwndDlg, IDC_LOOKFOR_TEXT, _T(""));
SendDlgItemMessage(hwndDlg, IDC_LOOKFOR, CB_SETCURSEL, 0, 0);
}
- i = DBGetContactSettingWord(data->hContact, data->proto->iface.m_szModuleName, "VoiceChat", 0);
+ i = DBGetContactSettingWord(data->hContact, data->proto->m_szModuleName, "VoiceChat", 0);
CheckDlgButton(hwndDlg, IDC_VOICECONVERSATIONS, i);
- i = DBGetContactSettingWord(data->hContact, data->proto->iface.m_szModuleName, "PublicStatus", 0);
+ i = DBGetContactSettingWord(data->hContact, data->proto->m_szModuleName, "PublicStatus", 0);
CheckDlgButton(hwndDlg, IDC_PUBLICSTATUS, i);
- if (!DBGetContactSetting(data->hContact, data->proto->iface.m_szModuleName, "jid", &dbv)) {
+ if (!DBGetContactSetting(data->hContact, data->proto->m_szModuleName, "jid", &dbv)) {
jid = JabberTextDecode(dbv.pszVal);
SetDlgItemTextA(hwndDlg, IDC_INFO_JID, jid);
mir_free(jid);
@@ -305,7 +305,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara }
break;
case WM_COMMAND:
- if (LOWORD(wParam)==IDC_SAVE && HIWORD(wParam)==BN_CLICKED) {
+ if (LOWORD(wParam) == IDC_SAVE && HIWORD(wParam) == BN_CLICKED) {
char *str = NULL;
int strSize;
JabberStringAppend(&str, &strSize, "<iq type='set' id='"JABBER_IQID"%d' to='tuba'><query xmlns='jabber:iq:register'>", JabberSerialNext(data->proto));
@@ -324,12 +324,12 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara JabberStringAppend(&str, &strSize, "</query></iq>");
JabberSend(data->proto, "%s", str);
mir_free(str);
- JabberGetInfo((PROTO_INTERFACE *)data->proto, NULL, 0);
+ data->proto->GetInfo(NULL, 0);
}
break;
- case WM_DESTROY:
- mir_free(data);
- break;
+ case WM_DESTROY:
+ mir_free(data);
+ break;
}
return FALSE;
}
diff --git a/plugins/!NotAdopted/Tlen/tlen_voice.c b/protocols/Tlen/src/tlen_voice.cpp index 4c4868152c..c476d55116 100644 --- a/plugins/!NotAdopted/Tlen/tlen_voice.c +++ b/protocols/Tlen/src/tlen_voice.cpp @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -117,23 +117,23 @@ static int TlenVoicePlaybackStart(TLEN_VOICE_CONTROL *control) int iNumDevs, iSelDev;
WAVEOUTCAPS wic;
- memset(&wfm, 0, sizeof(wfm));
- wfm.cbSize = sizeof(WAVEFORMATEX);
- wfm.nChannels = 1;
- wfm.wBitsPerSample = 16;
- wfm.nSamplesPerSec = MODE_FREQUENCY[control->codec];
- wfm.nAvgBytesPerSec = wfm.nSamplesPerSec * wfm.nChannels * wfm.wBitsPerSample/8;
- wfm.nBlockAlign = 2 * wfm.nChannels;
- wfm.wFormatTag = WAVE_FORMAT_PCM;
+ memset(&wfm, 0, sizeof(wfm));
+ wfm.cbSize = sizeof(WAVEFORMATEX);
+ wfm.nChannels = 1;
+ wfm.wBitsPerSample = 16;
+ wfm.nSamplesPerSec = MODE_FREQUENCY[control->codec];
+ wfm.nAvgBytesPerSec = wfm.nSamplesPerSec * wfm.nChannels * wfm.wBitsPerSample/8;
+ wfm.nBlockAlign = 2 * wfm.nChannels;
+ wfm.wFormatTag = WAVE_FORMAT_PCM;
control->waveMode = 0;
control->waveFrameSize = MODE_FRAME_SIZE[control->codec] * 160 * wfm.nChannels;// * wfm.wBitsPerSample / 8;
control->waveHeadersPos = 0;
control->waveHeadersNum = FRAMES_AVAILABLE_MAX_LIMIT + 2;
- j = DBGetContactSettingWord(NULL, control->proto->iface.m_szModuleName, "VoiceDeviceOut", 0);
+ j = DBGetContactSettingWord(NULL, control->proto->m_szModuleName, "VoiceDeviceOut", 0);
iSelDev = WAVE_MAPPER;
- if (j!=0) {
+ if (j != 0) {
iNumDevs = waveOutGetNumDevs();
for (i = 0; i < iNumDevs; i++) {
if (!waveOutGetDevCaps(i, &wic, sizeof(WAVEOUTCAPS))) {
@@ -152,7 +152,7 @@ static int TlenVoicePlaybackStart(TLEN_VOICE_CONTROL *control) }
mmres = waveOutOpen(&control->hWaveOut, iSelDev, &wfm, (DWORD) &TlenVoicePlaybackCallback, (DWORD) control, CALLBACK_FUNCTION);
- if (mmres!=MMSYSERR_NOERROR) {
+ if (mmres != MMSYSERR_NOERROR) {
JabberLog(control->proto, "TlenVoiceStart FAILED!");
return 1;
}
@@ -170,16 +170,16 @@ static int TlenVoiceRecordingStart(TLEN_VOICE_CONTROL *control) MMRESULT mmres;
int i, j;
int iNumDevs, iSelDev;
- WAVEINCAPS wic;
+ WAVEINCAPS wic;
- memset(&wfm, 0, sizeof(wfm));
- wfm.cbSize = sizeof(WAVEFORMATEX);
- wfm.nChannels = 1;
- wfm.wBitsPerSample = 16;
- wfm.nSamplesPerSec = MODE_FREQUENCY[control->codec];
- wfm.nAvgBytesPerSec = wfm.nSamplesPerSec * wfm.nChannels * wfm.wBitsPerSample/8;
- wfm.nBlockAlign = 2 * wfm.nChannels;
- wfm.wFormatTag = WAVE_FORMAT_PCM;
+ memset(&wfm, 0, sizeof(wfm));
+ wfm.cbSize = sizeof(WAVEFORMATEX);
+ wfm.nChannels = 1;
+ wfm.wBitsPerSample = 16;
+ wfm.nSamplesPerSec = MODE_FREQUENCY[control->codec];
+ wfm.nAvgBytesPerSec = wfm.nSamplesPerSec * wfm.nChannels * wfm.wBitsPerSample/8;
+ wfm.nBlockAlign = 2 * wfm.nChannels;
+ wfm.wFormatTag = WAVE_FORMAT_PCM;
control->waveMode = 0;
@@ -189,18 +189,18 @@ static int TlenVoiceRecordingStart(TLEN_VOICE_CONTROL *control) control->waveHeadersNum = 2;
control->hThread = CreateThread( NULL,
- 0,
- (LPTHREAD_START_ROUTINE)TlenVoiceRecordingThreadProc,
- control,
- 0,
- (LPDWORD)&control->threadID);
+ 0,
+ (LPTHREAD_START_ROUTINE)TlenVoiceRecordingThreadProc,
+ control,
+ 0,
+ (LPDWORD)&control->threadID);
SetThreadPriority(control->hThread, THREAD_PRIORITY_ABOVE_NORMAL);
- j = DBGetContactSettingWord(NULL, control->proto->iface.m_szModuleName, "VoiceDeviceIn", 0);
+ j = DBGetContactSettingWord(NULL, control->proto->m_szModuleName, "VoiceDeviceIn", 0);
iSelDev = WAVE_MAPPER;
- if (j!=0) {
+ if (j != 0) {
iNumDevs = waveInGetNumDevs();
for (i = 0; i < iNumDevs; i++) {
if (!waveInGetDevCaps(i, &wic, sizeof(WAVEINCAPS))) {
@@ -220,7 +220,7 @@ static int TlenVoiceRecordingStart(TLEN_VOICE_CONTROL *control) mmres = waveInOpen(&control->hWaveIn, iSelDev, &wfm, (DWORD) control->threadID, 0, CALLBACK_THREAD);
// mmres = waveInOpen(&control->hWaveIn, 3, &wfm, (DWORD) &TlenVoiceRecordingCallback, (DWORD) control, CALLBACK_FUNCTION);
- if (mmres!=MMSYSERR_NOERROR) {
+ if (mmres != MMSYSERR_NOERROR) {
PostThreadMessage(control->threadID, WIM_CLOSE, 0, 0);
JabberLog(control->proto, "TlenVoiceStart FAILED %d!", mmres);
return 1;
@@ -233,12 +233,12 @@ static int TlenVoiceRecordingStart(TLEN_VOICE_CONTROL *control) control->waveHeaders[i].lpData = (char *) (control->waveData + i * control->waveFrameSize);
control->waveHeaders[i].dwBufferLength = control->waveFrameSize *2;
mmres = waveInPrepareHeader(control->hWaveIn, &control->waveHeaders[i], sizeof(WAVEHDR));
- if (mmres!=MMSYSERR_NOERROR) {
+ if (mmres != MMSYSERR_NOERROR) {
waveInClose(control->hWaveIn);
// PostThreadMessage(control->threadID, WIM_CLOSE, 0, 0);
JabberLog(control->proto, "TlenVoiceStart FAILED #2!");
return 1;
- }
+ }
}
for (i=0;i<control->waveHeadersNum;i++) {
waveInAddBuffer(control->hWaveIn, &control->waveHeaders[i], sizeof(WAVEHDR));
@@ -256,7 +256,7 @@ static TLEN_VOICE_CONTROL *TlenVoiceCreateVC(TlenProtocol *proto, int codec) memset(vc, 0, sizeof(TLEN_VOICE_CONTROL));
vc->gsmstate = gsm_create();
vc->codec = codec;
- vc->proto = proto;
+ vc->proto = proto;
return vc;
}
static void TlenVoiceFreeVc(TLEN_VOICE_CONTROL *vc)
@@ -265,27 +265,27 @@ static void TlenVoiceFreeVc(TLEN_VOICE_CONTROL *vc) JabberLog(vc->proto, "-> TlenVoiceFreeVc");
vc->stopThread = 1;
PostThreadMessage(vc->threadID, MM_WIM_CLOSE, 0, 0);
- while(vc->isRunning) {
+ while (vc->isRunning) {
Sleep(50);
}
- if (vc->hThread!=NULL) CloseHandle(vc->hThread);
+ if (vc->hThread != NULL) CloseHandle(vc->hThread);
if (vc->hWaveIn) {
for (i=0;i<vc->waveHeadersNum;i++) {
- while(waveInUnprepareHeader(vc->hWaveIn, &vc->waveHeaders[i], sizeof(WAVEHDR)) == WAVERR_STILLPLAYING) {
+ while (waveInUnprepareHeader(vc->hWaveIn, &vc->waveHeaders[i], sizeof(WAVEHDR)) == WAVERR_STILLPLAYING) {
Sleep(50);
}
}
- while(waveInClose(vc->hWaveIn) == WAVERR_STILLPLAYING) {
+ while (waveInClose(vc->hWaveIn) == WAVERR_STILLPLAYING) {
Sleep(50);
}
}
if (vc->hWaveOut) {
for (i=0;i<vc->waveHeadersNum;i++) {
- while(waveOutUnprepareHeader(vc->hWaveOut, &vc->waveHeaders[i], sizeof(WAVEHDR)) == WAVERR_STILLPLAYING) {
+ while (waveOutUnprepareHeader(vc->hWaveOut, &vc->waveHeaders[i], sizeof(WAVEHDR)) == WAVERR_STILLPLAYING) {
Sleep(50);
}
}
- while(waveOutClose(vc->hWaveOut) == WAVERR_STILLPLAYING) {
+ while (waveOutClose(vc->hWaveOut) == WAVERR_STILLPLAYING) {
Sleep(50);
}
}
@@ -321,18 +321,18 @@ void __cdecl TlenVoiceReceiveThread(TLEN_FILE_TRANSFER *ft) nloc.wPort = ft->wPort;
nloc.flags = 0;
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Connecting..."));
-// ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
+// ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
s = (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) ft->proto->hNetlibUser, (LPARAM) &nloc);
if (s != NULL) {
ft->s = s;
JabberLog(ft->proto, "Entering file receive loop");
TlenP2PEstablishOutgoingConnection(ft, FALSE);
- if (ft->state!=FT_ERROR) {
+ if (ft->state != FT_ERROR) {
ft->proto->playbackControl = NULL;
ft->proto->recordingControl = TlenVoiceCreateVC(ft->proto, 3);
ft->proto->recordingControl->ft = ft;
TlenVoiceRecordingStart(ft->proto->recordingControl);
- while (ft->state!=FT_DONE && ft->state!=FT_ERROR) {
+ while (ft->state != FT_DONE && ft->state != FT_ERROR) {
TlenVoiceReceiveParse(ft);
}
TlenVoiceFreeVc(ft->proto->recordingControl);
@@ -370,16 +370,16 @@ void __cdecl TlenVoiceReceiveThread(TLEN_FILE_TRANSFER *ft) }
}
JabberListRemove(ft->proto, LIST_VOICE, ft->iqId);
- if (ft->state==FT_DONE) {
+ if (ft->state == FT_DONE) {
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Finished..."));
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ //ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
} else {
char *nick;
nick = JabberNickFromJID(ft->jid);
JabberSend(ft->proto, "<f t='%s' i='%s' e='8'/>", nick, ft->iqId);
mir_free(nick);
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Error..."));
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ //ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
}
JabberLog(ft->proto, "Thread ended: type=file_receive server='%s'", ft->hostName);
@@ -402,17 +402,17 @@ static void TlenVoiceReceivingConnection(JABBER_SOCKET hConnection, DWORD dwRemo proto->recordingControl = TlenVoiceCreateVC(proto, 3);
proto->recordingControl->ft = ft;
TlenVoiceRecordingStart(proto->recordingControl);
- while (ft->state!=FT_DONE && ft->state!=FT_ERROR) {
+ while (ft->state != FT_DONE && ft->state != FT_ERROR) {
TlenVoiceReceiveParse(ft);
}
TlenVoiceFreeVc(proto->recordingControl);
proto->playbackControl = NULL;
proto->recordingControl = NULL;
- if (ft->state==FT_DONE) {
+ if (ft->state == FT_DONE) {
SetDlgItemText(proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Finished..."));
-// ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+// ProtoBroadcastAck(proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
} else {
-// ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+// ProtoBroadcastAck(proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Error..."));
}
JabberLog(ft->proto, "Closing connection for this file transfer... (ft->s is now hBind)");
@@ -420,7 +420,7 @@ static void TlenVoiceReceivingConnection(JABBER_SOCKET hConnection, DWORD dwRemo JabberLog(ft->proto, "ft->s is restored to %d", ft->s);
}
Netlib_CloseHandle(hConnection);
- if (ft!=NULL && ft->hFileEvent != NULL)
+ if (ft != NULL && ft->hFileEvent != NULL)
SetEvent(ft->hFileEvent);
}
@@ -522,7 +522,7 @@ static void TlenVoiceReceiveParse(TLEN_FILE_TRANSFER *ft) TlenP2PPacketFree(packet);
}
else {
- if (ft->proto->playbackControl!=NULL) {
+ if (ft->proto->playbackControl != NULL) {
TlenVoiceFreeVc(ft->proto->playbackControl);
ft->proto->playbackControl = NULL;
}
@@ -542,7 +542,7 @@ void __cdecl TlenVoiceSendingThread(TLEN_FILE_TRANSFER *ft) s = TlenP2PListen(ft);
if (s != NULL) {
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Waiting for connection..."));
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
+ //ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
ft->s = s;
//JabberLog("ft->s = %d", s);
//JabberLog("fileCount = %d", ft->fileCount);
@@ -576,16 +576,16 @@ void __cdecl TlenVoiceSendingThread(TLEN_FILE_TRANSFER *ft) s = (HANDLE) CallService(MS_NETLIB_OPENCONNECTION, (WPARAM) ft->proto->hNetlibUser, (LPARAM) &nloc);
if (s != NULL) {
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Connecting..."));
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
+ //ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, ft, 0);
ft->s = s;
TlenP2PEstablishOutgoingConnection(ft, FALSE);
- if (ft->state!=FT_ERROR) {
+ if (ft->state != FT_ERROR) {
JabberLog(ft->proto, "Entering send loop for this file connection...");
ft->proto->playbackControl = NULL;
ft->proto->recordingControl = TlenVoiceCreateVC(ft->proto, 3);
ft->proto->recordingControl->ft = ft;
TlenVoiceRecordingStart(ft->proto->recordingControl);
- while (ft->state!=FT_DONE && ft->state!=FT_ERROR) {
+ while (ft->state != FT_DONE && ft->state != FT_ERROR) {
TlenVoiceReceiveParse(ft);
}
}
@@ -604,11 +604,11 @@ void __cdecl TlenVoiceSendingThread(TLEN_FILE_TRANSFER *ft) case FT_DONE:
JabberLog(ft->proto, "Finish successfully");
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Finished..."));
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
+ //ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_SUCCESS, ft, 0);
break;
case FT_DENIED:
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Denied..."));
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, ft, 0);
+ //ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, ft, 0);
break;
default: // FT_ERROR:
nick = JabberNickFromJID(ft->jid);
@@ -616,7 +616,7 @@ void __cdecl TlenVoiceSendingThread(TLEN_FILE_TRANSFER *ft) mir_free(nick);
JabberLog(ft->proto, "Finish with errors");
SetDlgItemText(ft->proto->voiceDlgHWND, IDC_STATUS, TranslateT("...Error..."));
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ //ProtoBroadcastAck(ft->proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
break;
}
JabberLog(ft->proto, "Thread ended: type=voice_send");
@@ -674,7 +674,7 @@ int TlenVoiceCancelAll(TlenProtocol *proto) JabberListRemoveByIndex(proto, i);
if (ft != NULL) {
if (ft->s) {
- //ProtoBroadcastAck(iface.m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
+ //ProtoBroadcastAck(proto->m_szModuleName, ft->hContact, ACKTYPE_FILE, ACKRESULT_FAILED, ft, 0);
JabberLog(proto, "Closing ft->s = %d", ft->s);
ft->state = FT_ERROR;
Netlib_CloseHandle(ft->s);
@@ -691,28 +691,28 @@ int TlenVoiceCancelAll(TlenProtocol *proto) }
}
}
- if (proto->voiceDlgHWND !=NULL) {
+ if (proto->voiceDlgHWND != NULL) {
EndDialog(proto->voiceDlgHWND, 0);
}
return 0;
}
-INT_PTR TlenVoiceContactMenuHandleVoice(void *ptr, WPARAM wParam, LPARAM lParam)
+INT_PTR TlenVoiceContactMenuHandleVoice(void *ptr, LPARAM wParam, LPARAM lParam)
{
HANDLE hContact;
DBVARIANT dbv;
JABBER_LIST_ITEM *item;
TLEN_FILE_TRANSFER *ft;
- TlenProtocol *proto =(TlenProtocol *)ptr;
+ TlenProtocol *proto =(TlenProtocol *)ptr;
if (!proto->isOnline) {
return 1;
}
- if ((hContact=(HANDLE) wParam)!=NULL) {
- if (!DBGetContactSetting(hContact, proto->iface.m_szModuleName, "jid", &dbv)) {
+ if ((hContact=(HANDLE) wParam) != NULL) {
+ if (!DBGetContactSetting(hContact, proto->m_szModuleName, "jid", &dbv)) {
char serialId[32];
sprintf(serialId, "%d", JabberSerialNext(proto));
if ((item = JabberListAdd(proto, LIST_VOICE, serialId)) != NULL) {
- ft = TlenFileCreateFT(proto, dbv.pszVal);
+ ft = TlenFileCreateFT(proto, dbv.pszVal);
ft->iqId = mir_strdup(serialId);
item->ft = ft;
// JabberSend(ft->proto, "<iq to='%s'><query xmlns='voip'><voip k='1' s='1' v='1' i='51245604'/></query></iq>", ft->jid);
@@ -727,7 +727,7 @@ INT_PTR TlenVoiceContactMenuHandleVoice(void *ptr, WPARAM wParam, LPARAM lParam) }
int TlenVoiceIsInUse(TlenProtocol *proto) {
- if (JabberListFindNext(proto, LIST_VOICE, 0) >= 0 || proto->voiceDlgHWND!=NULL) {
+ if (JabberListFindNext(proto, LIST_VOICE, 0) >= 0 || proto->voiceDlgHWND != NULL) {
JabberLog(proto, "voice in use ? %d", proto->voiceDlgHWND);
return 1;
}
@@ -770,7 +770,7 @@ static void TlenVoiceInitVUMeters() memset(pBits, 0x80, 3*VU_METER_WIDTH*VU_METER_HEIGHT);
for (i=0;i<VU_METER_LEVELS;i++) {
for (v=0;v<VU_METER_LEVELS-1;v++) {
- if (v>=i) {
+ if (v >= i) {
if (v < 10) col0 = 0x104010;
else if (v<13) col0 = 0x404010;
else col0 = 0x401010;
@@ -796,139 +796,139 @@ static void TlenVoiceInitVUMeters() static INT_PTR CALLBACK TlenVoiceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HDC hDC, hMemDC;
- int v;
- static int counter;
- TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- switch (msg) {
+ HDC hDC, hMemDC;
+ int v;
+ static int counter;
+ TlenProtocol *proto = (TlenProtocol *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ switch (msg) {
case WM_INITDIALOG:
- proto = (TlenProtocol *)lParam;
- SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto);
- proto->voiceDlgHWND = hwndDlg;
- TranslateDialogDefault(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM) TranslateT("8000 Hz / 13.8 kbps"));
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM) TranslateT("11025 Hz / 19.1 kbps"));
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM) TranslateT("22050 Hz / 36.8 kbps"));
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM) TranslateT("44100 Hz / 72 kbps"));
- SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_SETCURSEL, 1, 0);
- SendDlgItemMessage(hwndDlg, IDC_MICROPHONE, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_SPEAKER, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_MICROPHONE, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_SPEAKER, BUTTONSETASPUSHBTN, 0, 0);
- {
- HICON hIcon = GetIcolibIcon(IDI_MICROPHONE);
+ proto = (TlenProtocol *)lParam;
+ SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)proto);
+ proto->voiceDlgHWND = hwndDlg;
+ TranslateDialogDefault(hwndDlg);
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM) TranslateT("8000 Hz / 13.8 kbps"));
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM) TranslateT("11025 Hz / 19.1 kbps"));
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM) TranslateT("22050 Hz / 36.8 kbps"));
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_ADDSTRING, 0, (LPARAM) TranslateT("44100 Hz / 72 kbps"));
+ SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_SETCURSEL, 1, 0);
+ SendDlgItemMessage(hwndDlg, IDC_MICROPHONE, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_SPEAKER, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_MICROPHONE, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_SPEAKER, BUTTONSETASPUSHBTN, TRUE, 0);
+ {
+ HICON hIcon = GetIcolibIcon(IDI_MICROPHONE);
SendDlgItemMessage(hwndDlg, IDC_MICROPHONE, BM_SETIMAGE, IMAGE_ICON, (LPARAM) hIcon);
ReleaseIcolibIcon(hIcon);
hIcon = GetIcolibIcon(IDI_SPEAKER);
SendDlgItemMessage(hwndDlg, IDC_SPEAKER, BM_SETIMAGE, IMAGE_ICON, (LPARAM) hIcon);
ReleaseIcolibIcon(hIcon);
- }
- CheckDlgButton(hwndDlg, IDC_MICROPHONE, TRUE);
- CheckDlgButton(hwndDlg, IDC_SPEAKER, TRUE);
- TlenVoiceInitVUMeters();
- SetDlgItemText(hwndDlg, IDC_STATUS, TranslateT("...???..."));
- counter = 0;
- SetTimer(hwndDlg, 1, 100, NULL);
- return FALSE;
+ }
+ CheckDlgButton(hwndDlg, IDC_MICROPHONE, TRUE);
+ CheckDlgButton(hwndDlg, IDC_SPEAKER, TRUE);
+ TlenVoiceInitVUMeters();
+ SetDlgItemText(hwndDlg, IDC_STATUS, TranslateT("...???..."));
+ counter = 0;
+ SetTimer(hwndDlg, 1, 100, NULL);
+ return FALSE;
case WM_TIMER:
- if (proto->recordingControl != NULL && !proto->recordingControl->bDisable) {
- v = proto->recordingControl->vuMeter % VU_METER_LEVELS;
- if (proto->recordingControl->vuMeter >0) {
- proto->recordingControl->vuMeter--;
- }
- } else {
- v = 0;
- }
- hDC = GetDC(GetDlgItem(hwndDlg, IDC_VUMETERIN));
- if (NULL != (hMemDC = CreateCompatibleDC( hDC ))) {
- SelectObject( hMemDC, vuMeterBitmaps[v]) ;
- BitBlt( hDC, 0, 0, VU_METER_WIDTH, VU_METER_HEIGHT, hMemDC, 0, 0, SRCCOPY ) ;
- DeleteDC(hMemDC);
- }
- ReleaseDC(GetDlgItem(hwndDlg, IDC_PLAN), hDC);
- if (proto->playbackControl != NULL && !proto->playbackControl->bDisable) {
- v = proto->playbackControl->vuMeter % VU_METER_LEVELS;
- if (proto->playbackControl->vuMeter >0) {
- proto->playbackControl->vuMeter--;
- }
- } else {
- v = 0;
- }
- hDC = GetDC(GetDlgItem(hwndDlg, IDC_VUMETEROUT));
- if (NULL != (hMemDC = CreateCompatibleDC( hDC ))) {
- SelectObject( hMemDC, vuMeterBitmaps[v]) ;
- BitBlt( hDC, 0, 0, VU_METER_WIDTH, VU_METER_HEIGHT, hMemDC, 0, 0, SRCCOPY ) ;
- DeleteDC(hMemDC);
- }
- ReleaseDC(GetDlgItem(hwndDlg, IDC_PLAN), hDC);
- counter ++;
- if (counter %10 == 0) {
- char str[50];
- float fv;
- if (proto->recordingControl != NULL) {
- fv = (float)proto->recordingControl->bytesSum;
- proto->recordingControl->bytesSum = 0;
- } else {
- fv = 0;
- }
- sprintf(str, "%.1f kB/s", fv / 1024);
- SetDlgItemTextA(hwndDlg, IDC_BYTESOUT, str);
- if (proto->playbackControl != NULL) {
- fv = (float)proto->playbackControl->bytesSum;
- proto->playbackControl->bytesSum = 0;
- } else {
- fv = 0;
- }
- sprintf(str, "%.1f kB/s", fv / 1024);
- SetDlgItemTextA(hwndDlg, IDC_BYTESIN, str);
- }
- break;
+ if (proto->recordingControl != NULL && !proto->recordingControl->bDisable) {
+ v = proto->recordingControl->vuMeter % VU_METER_LEVELS;
+ if (proto->recordingControl->vuMeter >0) {
+ proto->recordingControl->vuMeter--;
+ }
+ } else {
+ v = 0;
+ }
+ hDC = GetDC(GetDlgItem(hwndDlg, IDC_VUMETERIN));
+ if (NULL != (hMemDC = CreateCompatibleDC( hDC ))) {
+ SelectObject( hMemDC, vuMeterBitmaps[v]) ;
+ BitBlt( hDC, 0, 0, VU_METER_WIDTH, VU_METER_HEIGHT, hMemDC, 0, 0, SRCCOPY ) ;
+ DeleteDC(hMemDC);
+ }
+ ReleaseDC(GetDlgItem(hwndDlg, IDC_PLAN), hDC);
+ if (proto->playbackControl != NULL && !proto->playbackControl->bDisable) {
+ v = proto->playbackControl->vuMeter % VU_METER_LEVELS;
+ if (proto->playbackControl->vuMeter >0) {
+ proto->playbackControl->vuMeter--;
+ }
+ } else {
+ v = 0;
+ }
+ hDC = GetDC(GetDlgItem(hwndDlg, IDC_VUMETEROUT));
+ if (NULL != (hMemDC = CreateCompatibleDC( hDC ))) {
+ SelectObject( hMemDC, vuMeterBitmaps[v]) ;
+ BitBlt( hDC, 0, 0, VU_METER_WIDTH, VU_METER_HEIGHT, hMemDC, 0, 0, SRCCOPY ) ;
+ DeleteDC(hMemDC);
+ }
+ ReleaseDC(GetDlgItem(hwndDlg, IDC_PLAN), hDC);
+ counter ++;
+ if (counter %10 == 0) {
+ char str[50];
+ float fv;
+ if (proto->recordingControl != NULL) {
+ fv = (float)proto->recordingControl->bytesSum;
+ proto->recordingControl->bytesSum = 0;
+ } else {
+ fv = 0;
+ }
+ sprintf(str, "%.1f kB/s", fv / 1024);
+ SetDlgItemTextA(hwndDlg, IDC_BYTESOUT, str);
+ if (proto->playbackControl != NULL) {
+ fv = (float)proto->playbackControl->bytesSum;
+ proto->playbackControl->bytesSum = 0;
+ } else {
+ fv = 0;
+ }
+ sprintf(str, "%.1f kB/s", fv / 1024);
+ SetDlgItemTextA(hwndDlg, IDC_BYTESIN, str);
+ }
+ break;
case WM_COMMAND:
- switch (LOWORD(wParam)) {
- case IDCANCEL:
- EndDialog(hwndDlg, 0);
- return TRUE;
- case IDC_VCQUALITY:
- if (HIWORD(wParam)==CBN_SELCHANGE) {
- if (proto->recordingControl!=NULL) {
- int codec;
- codec = SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_GETCURSEL, 0, 0) + 2;
- if (codec!=proto->recordingControl->codec && codec>1 && codec<6) {
- TLEN_FILE_TRANSFER *ft = proto->recordingControl->ft;
- TlenVoiceFreeVc(proto->recordingControl);
- proto->recordingControl = TlenVoiceCreateVC(ft->proto, codec);
- proto->recordingControl->ft = ft;
- TlenVoiceRecordingStart(proto->recordingControl);
- }
- }
- }
- case IDC_MICROPHONE:
- if (proto->recordingControl!=NULL) {
- proto->recordingControl->bDisable = !IsDlgButtonChecked(hwndDlg, IDC_MICROPHONE);
- }
- break;
- case IDC_SPEAKER:
- if (proto->playbackControl!=NULL) {
- proto->playbackControl->bDisable = !IsDlgButtonChecked(hwndDlg, IDC_SPEAKER);
- }
- break;
- }
- break;
+ switch (LOWORD(wParam)) {
+ case IDCANCEL:
+ EndDialog(hwndDlg, 0);
+ return TRUE;
+ case IDC_VCQUALITY:
+ if (HIWORD(wParam) == CBN_SELCHANGE) {
+ if (proto->recordingControl != NULL) {
+ int codec;
+ codec = SendDlgItemMessage(hwndDlg, IDC_VCQUALITY, CB_GETCURSEL, 0, 0) + 2;
+ if (codec != proto->recordingControl->codec && codec > 1 && codec < 6) {
+ TLEN_FILE_TRANSFER *ft = proto->recordingControl->ft;
+ TlenVoiceFreeVc(proto->recordingControl);
+ proto->recordingControl = TlenVoiceCreateVC(ft->proto, codec);
+ proto->recordingControl->ft = ft;
+ TlenVoiceRecordingStart(proto->recordingControl);
+ }
+ }
+ }
+ case IDC_MICROPHONE:
+ if (proto->recordingControl != NULL) {
+ proto->recordingControl->bDisable = !IsDlgButtonChecked(hwndDlg, IDC_MICROPHONE);
+ }
+ break;
+ case IDC_SPEAKER:
+ if (proto->playbackControl != NULL) {
+ proto->playbackControl->bDisable = !IsDlgButtonChecked(hwndDlg, IDC_SPEAKER);
+ }
+ break;
+ }
+ break;
case WM_CLOSE:
- EndDialog(hwndDlg, 0);
- break;
+ EndDialog(hwndDlg, 0);
+ break;
case WM_DESTROY:
- proto->voiceDlgHWND = NULL;
+ proto->voiceDlgHWND = NULL;
break;
- }
- return FALSE;
+ }
+ return FALSE;
}
static void __cdecl TlenVoiceDlgThread(void *ptr)
{
- TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *)ptr;
+ TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *)ptr;
TlenProtocol * proto = ft->proto;
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_VOICE), NULL, TlenVoiceDlgProc, (LPARAM) proto);
TlenVoiceCancelAll(proto);
@@ -938,9 +938,9 @@ int TlenVoiceStart(TLEN_FILE_TRANSFER *ft, int mode) {
JabberLog(ft->proto, "starting voice %d", mode);
- if (mode==0) {
+ if (mode == 0) {
JabberForkThread((void (__cdecl *)(void*))TlenVoiceReceiveThread, 0, ft);
- } else if (mode==1) {
+ } else if (mode == 1) {
JabberForkThread((void (__cdecl *)(void*))TlenVoiceSendingThread, 0, ft);
} else {
JabberForkThread((void (__cdecl *)(void*))TlenVoiceDlgThread, 0, ft);
@@ -953,7 +953,7 @@ static char *getDisplayName(TlenProtocol *proto, const char *id) char jid[256];
HANDLE hContact;
DBVARIANT dbv;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
_snprintf(jid, sizeof(jid), "%s@%s", id, dbv.pszVal);
DBFreeVariant(&dbv);
if ((hContact=JabberHContactFromJID(proto, jid)) != NULL) {
@@ -964,8 +964,8 @@ static char *getDisplayName(TlenProtocol *proto, const char *id) }
typedef struct {
- TlenProtocol *proto;
- JABBER_LIST_ITEM *item;
+ TlenProtocol *proto;
+ JABBER_LIST_ITEM *item;
}ACCEPTDIALOGDATA;
static INT_PTR CALLBACK TlenVoiceAcceptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -1014,7 +1014,7 @@ static void __cdecl TlenVoiceAcceptDlgThread(void *ptr) }
JabberListRemove(data->proto, LIST_VOICE, data->item->jid);
}
- mir_free(data);
+ mir_free(data);
}
int TlenVoiceAccept(TlenProtocol *proto, const char *id, const char *from)
@@ -1025,7 +1025,7 @@ int TlenVoiceAccept(TlenProtocol *proto, const char *id, const char *from) int ask, ignore, voiceChatPolicy;
ask = TRUE;
ignore = FALSE;
- voiceChatPolicy = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "VoiceChatPolicy", 0);
+ voiceChatPolicy = DBGetContactSettingWord(NULL, proto->m_szModuleName, "VoiceChatPolicy", 0);
if (voiceChatPolicy == TLEN_MUC_ASK) {
ignore = FALSE;
ask = TRUE;
@@ -1034,7 +1034,7 @@ int TlenVoiceAccept(TlenProtocol *proto, const char *id, const char *from) } else if (voiceChatPolicy == TLEN_MUC_IGNORE_NIR) {
char jid[256];
DBVARIANT dbv;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
_snprintf(jid, sizeof(jid), "%s@%s", from, dbv.pszVal);
DBFreeVariant(&dbv);
} else {
@@ -1044,9 +1044,8 @@ int TlenVoiceAccept(TlenProtocol *proto, const char *id, const char *from) ask = TRUE;
} else if (voiceChatPolicy == TLEN_MUC_ACCEPT_IR) {
char jid[256];
- JABBER_LIST_ITEM *item;
DBVARIANT dbv;
- if (!DBGetContactSetting(NULL, proto->iface.m_szModuleName, "LoginServer", &dbv)) {
+ if (!DBGetContactSetting(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
_snprintf(jid, sizeof(jid), "%s@%s", from, dbv.pszVal);
DBFreeVariant(&dbv);
} else {
@@ -1066,9 +1065,9 @@ int TlenVoiceAccept(TlenProtocol *proto, const char *id, const char *from) } else {
item->nick = mir_strdup(from);
if (ask) {
- ACCEPTDIALOGDATA *data = (ACCEPTDIALOGDATA *)mir_alloc(sizeof(ACCEPTDIALOGDATA));
- data->proto = proto;
- data->item = item;
+ ACCEPTDIALOGDATA *data = (ACCEPTDIALOGDATA *)mir_alloc(sizeof(ACCEPTDIALOGDATA));
+ data->proto = proto;
+ data->item = item;
JabberForkThread((void (__cdecl *)(void*))TlenVoiceAcceptDlgThread, 0, data);
} else if (proto->isOnline) {
item->ft = TlenFileCreateFT(proto, from);
@@ -1096,7 +1095,7 @@ int TlenVoiceBuildInDeviceList(TlenProtocol *proto, HWND hWnd) }
}
}
- i = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "VoiceDeviceIn", 0);
+ i = DBGetContactSettingWord(NULL, proto->m_szModuleName, "VoiceDeviceIn", 0);
if (i>j) i = 0;
SendMessage(hWnd, CB_SETCURSEL, i, 0);
return 0;
@@ -1115,7 +1114,7 @@ int TlenVoiceBuildOutDeviceList(TlenProtocol *proto, HWND hWnd) }
}
}
- i = DBGetContactSettingWord(NULL, proto->iface.m_szModuleName, "VoiceDeviceOut", 0);
+ i = DBGetContactSettingWord(NULL, proto->m_szModuleName, "VoiceDeviceOut", 0);
if (i>j) i = 0;
SendMessage(hWnd, CB_SETCURSEL, i, 0);
return 0;
diff --git a/plugins/!NotAdopted/Tlen/tlen_voice.h b/protocols/Tlen/src/tlen_voice.h index cd38a23c1c..0018bb6e17 100644 --- a/plugins/!NotAdopted/Tlen/tlen_voice.h +++ b/protocols/Tlen/src/tlen_voice.h @@ -1,6 +1,6 @@ /*
-Tlen Protocol Plugin for Miranda IM
+Tlen Protocol Plugin for Miranda NG
Copyright (C) 2004-2007 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -26,7 +26,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <mmsystem.h>
#include "jabber.h"
-#include "codec/gsm.h"
+extern "C" {
+ #include "codec/gsm.h"
+}
typedef struct TLEN_VOICE_CONTROL_STRUCT {
int waveMode;
@@ -58,7 +60,7 @@ typedef struct TLEN_VOICE_CONTROL_STRUCT { extern void __cdecl TlenVoiceSendingThread(TLEN_FILE_TRANSFER *ft);
extern void __cdecl TlenVoiceReceiveThread(TLEN_FILE_TRANSFER *ft);
extern int TlenVoiceIsInUse(TlenProtocol *proto);
-extern INT_PTR TlenVoiceContactMenuHandleVoice(void *ptr, WPARAM wParam, LPARAM lParam);
+extern INT_PTR TlenVoiceContactMenuHandleVoice(void *ptr, LPARAM wParam, LPARAM lParam);
extern int TlenVoiceCancelAll(TlenProtocol *proto);
extern int TlenVoiceStart(TLEN_FILE_TRANSFER *ft, int mode) ;
extern int TlenVoiceAccept(TlenProtocol *proto, const char *id, const char *from);
diff --git a/protocols/Tlen/tlen_10.vcxproj b/protocols/Tlen/tlen_10.vcxproj new file mode 100644 index 0000000000..4e5b9c1a8c --- /dev/null +++ b/protocols/Tlen/tlen_10.vcxproj @@ -0,0 +1,366 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>Tlen</ProjectName>
+ <ProjectGuid>{F3208C96-3C21-46AA-8695-C794E28CDC34}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <IgnoreImportLibrary>true</IgnoreImportLibrary>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/jabber.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <BrowseInformationFile>
+ </BrowseInformationFile>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win32%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x32500000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/jabber.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Full</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
+ <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
+ <BrowseInformationFile>
+ </BrowseInformationFile>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalManifestDependencies>type=%27Win64%27 name=%27Microsoft.Windows.Common-Controls%27 version=%276.0.0.0%27 processorArchitecture=%27X86%27 publicKeyToken=%276595b64144ccf1df%27 language=%27*%27;%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <OptimizeReferences>true</OptimizeReferences>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+ <BaseAddress>0x32500000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/jabber.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>false</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Precise</FloatingPointModel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <BrowseInformationFile>
+ </BrowseInformationFile>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <BaseAddress>0x32500000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Debug/jabber.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>false</StringPooling>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <FloatingPointModel>Precise</FloatingPointModel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <PrecompiledHeaderFile>jabber.h</PrecompiledHeaderFile>
+ <AssemblerListingLocation>
+ </AssemblerListingLocation>
+ <BrowseInformationFile>
+ </BrowseInformationFile>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0409</Culture>
+ </ResourceCompile>
+ <Link>
+ <AdditionalDependencies>ws2_32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)$(TargetName).pdb</ProgramDatabaseFile>
+ <GenerateMapFile>false</GenerateMapFile>
+ <MapFileName>
+ </MapFileName>
+ <BaseAddress>0x32500000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\crypto\aes.c" />
+ <ClCompile Include="src\crypto\bignum.c" />
+ <ClCompile Include="src\codec\gsm_codec.c" />
+ <ClCompile Include="src\codec\gsm_long.c" />
+ <ClCompile Include="src\codec\gsm_lpc.c" />
+ <ClCompile Include="src\codec\gsm_preprocess.c" />
+ <ClCompile Include="src\codec\gsm_rpe.c" />
+ <ClCompile Include="src\codec\gsm_short.c" />
+ <ClCompile Include="src\jabber_iq.cpp" />
+ <ClCompile Include="src\jabber_iqid.cpp" />
+ <ClCompile Include="src\jabber_list.cpp" />
+ <ClCompile Include="src\jabber_misc.cpp" />
+ <ClCompile Include="src\jabber_opt.cpp" />
+ <ClCompile Include="src\jabber_svc.cpp" />
+ <ClCompile Include="src\jabber_thread.cpp" />
+ <ClCompile Include="src\jabber_util.cpp" />
+ <ClCompile Include="src\jabber_ws.cpp" />
+ <ClCompile Include="src\jabber_xml.cpp" />
+ <ClCompile Include="src\crypto\padlock.c" />
+ <ClCompile Include="src\tlen.cpp" />
+ <ClCompile Include="src\tlen_advsearch.cpp" />
+ <ClCompile Include="src\tlen_avatar.cpp" />
+ <ClCompile Include="src\tlen_file.cpp" />
+ <ClCompile Include="src\tlen_muc.cpp" />
+ <ClCompile Include="src\tlen_p2p_new.cpp" />
+ <ClCompile Include="src\tlen_p2p_old.cpp" />
+ <ClCompile Include="src\tlen_picture.cpp" />
+ <ClCompile Include="src\tlen_presence.cpp" />
+ <ClCompile Include="src\tlen_userinfo.cpp" />
+ <ClCompile Include="src\tlen_voice.cpp" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\tlen.rc" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\commons.h" />
+ <ClInclude Include="src\crypto\polarssl\aes.h" />
+ <ClInclude Include="src\crypto\polarssl\bignum.h" />
+ <ClInclude Include="src\crypto\polarssl\bn_mul.h" />
+ <ClInclude Include="src\crypto\polarssl\config.h" />
+ <ClInclude Include="src\codec\gsm.h" />
+ <ClInclude Include="src\jabber.h" />
+ <ClInclude Include="src\jabber_iq.h" />
+ <ClInclude Include="src\jabber_list.h" />
+ <ClInclude Include="src\jabber_xml.h" />
+ <ClInclude Include="src\crypto\polarssl\padlock.h" />
+ <ClInclude Include="src\resource.h" />
+ <ClInclude Include="src\tlen_avatar.h" />
+ <ClInclude Include="src\tlen_file.h" />
+ <ClInclude Include="src\tlen_muc.h" />
+ <ClInclude Include="src\tlen_p2p_old.h" />
+ <ClInclude Include="src\tlen_picture.h" />
+ <ClInclude Include="src\tlen_presence.h" />
+ <ClInclude Include="src\tlen_voice.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\auth_grant.ico" />
+ <None Include="res\auth_request.ico" />
+ <None Include="res\groupchats.ico" />
+ <None Include="res\image.ico" />
+ <None Include="res\mail.ico" />
+ <None Include="res\microphone.ico" />
+ <None Include="res\speaker.ico" />
+ <None Include="res\tlen.ico" />
+ <None Include="res\tlenbig.ico" />
+ <None Include="res\tlenchats.ico" />
+ <None Include="res\tlensmall.ico" />
+ <None Include="res\voicechat.ico" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/protocols/Tlen/tlen_10.vcxproj.filters b/protocols/Tlen/tlen_10.vcxproj.filters new file mode 100644 index 0000000000..2893437d57 --- /dev/null +++ b/protocols/Tlen/tlen_10.vcxproj.filters @@ -0,0 +1,208 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="src\crypto\aes.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\crypto\bignum.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\codec\gsm_codec.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\codec\gsm_long.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\codec\gsm_lpc.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\codec\gsm_preprocess.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\codec\gsm_rpe.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\codec\gsm_short.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\crypto\padlock.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_iq.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_iqid.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_list.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_misc.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_opt.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_svc.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_thread.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_util.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_ws.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\jabber_xml.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_advsearch.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_avatar.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_file.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_muc.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_p2p_new.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_p2p_old.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_picture.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_presence.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_userinfo.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\tlen_voice.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\crypto\polarssl\aes.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\crypto\polarssl\bignum.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\crypto\polarssl\bn_mul.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\crypto\polarssl\config.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\codec\gsm.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\jabber_iq.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\jabber.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\jabber_list.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\tlen_voice.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\tlen_presence.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\tlen_picture.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\tlen_p2p_old.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\tlen_muc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\tlen_file.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\tlen_avatar.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\crypto\polarssl\padlock.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\jabber_xml.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\commons.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\auth_grant.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\auth_request.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\groupchats.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\image.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\mail.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\microphone.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\speaker.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\tlen.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\tlenbig.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\tlenchats.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\tlensmall.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\voicechat.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{35b6da69-06c9-4f34-901c-823e97f865fd}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{a2b613e9-0050-4e07-8d72-9fbd35d80c8d}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{c8abc1f0-582c-43c8-bbe4-043b9c119339}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\tlen.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/protocols/Tlen/tlen_czaty/mucc.vcxproj b/protocols/Tlen/tlen_czaty/mucc.vcxproj new file mode 100644 index 0000000000..d74899057f --- /dev/null +++ b/protocols/Tlen/tlen_czaty/mucc.vcxproj @@ -0,0 +1,479 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectName>TlenCzaty</ProjectName>
+ <ProjectGuid>{BD1D155A-7A47-4414-80A3-CCCC3C5C583B}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v100</PlatformToolset>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>Unicode</CharacterSet>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Plugins\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Plugins\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Configuration)64\Obj\$(ProjectName)\</IntDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\Obj\$(ProjectName)\</IntDir>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
+ <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">tlen_czaty</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">tlen_czaty</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">tlen_czaty</TargetName>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">tlen_czaty</TargetName>
+ <IgnoreImportLibrary>false</IgnoreImportLibrary>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Release/mucc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\include;..\..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;UNICODE;_UNICODE;_X64;X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0415</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
+ <BaseAddress>0x32600000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/mucc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>MaxSpeed</Optimization>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\include;..\..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0415</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
+ <BaseAddress>0x32600000</BaseAddress>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalOptions>/PDBALTPATH:%_PDB%</AdditionalOptions>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TypeLibraryName>.\Debug/mucc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\include;..\..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;UNICODE;_UNICODE;X64;_X64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0415</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/mucc.tlb</TypeLibraryName>
+ <HeaderFileName>
+ </HeaderFileName>
+ </Midl>
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\..\..\include;..\..\..\plugins\ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MUCC_EXPORTS;UNICODE;_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MinimalRebuild>true</MinimalRebuild>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeaderOutputFile>$(IntDir)$(TargetName).pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <ProgramDataBaseFileName>$(IntDir)vc$(PlatformToolsetVersion).pdb</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x0415</Culture>
+ </ResourceCompile>
+ <Link>
+ <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>$(TargetDir)tlen_czaty.pdb</ProgramDatabaseFile>
+ <RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <DataExecutionPrevention>
+ </DataExecutionPrevention>
+ <ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
+ <TargetMachine>MachineX86</TargetMachine>
+ <AdditionalLibraryDirectories>$(SolutionDir)\lib</AdditionalLibraryDirectories>
+ <SubSystem>Windows</SubSystem>
+ <AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ </Link>
+ <Bscmake>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <OutputFile>$(OutDir)$(TargetName).bsc</OutputFile>
+ </Bscmake>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="src\AdminWindow.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\ChatContainer.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\ChatEvent.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\ChatGroup.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\ChatRoom.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\ChatUser.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\ChatWindow.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\FontList.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\HelperDialog.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\ManagerWindow.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\mucc.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\mucc_services.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\Options.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ <ClCompile Include="src\Utils.cpp">
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\AdminWindow.h" />
+ <ClInclude Include="src\ChatContainer.h" />
+ <ClInclude Include="src\ChatEvent.h" />
+ <ClInclude Include="src\ChatGroup.h" />
+ <ClInclude Include="src\ChatRoom.h" />
+ <ClInclude Include="src\ChatUser.h" />
+ <ClInclude Include="src\ChatWindow.h" />
+ <ClInclude Include="src\FontList.h" />
+ <ClInclude Include="src\HelperDialog.h" />
+ <ClInclude Include="src\ManagerWindow.h" />
+ <ClInclude Include="src\mucc.h" />
+ <ClInclude Include="src\mucc_services.h" />
+ <ClInclude Include="src\Options.h" />
+ <ClInclude Include="src\resource.h" />
+ <ClInclude Include="src\Utils.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\admin.ico" />
+ <None Include="res\administration.ico" />
+ <None Include="res\blank.ico" />
+ <None Include="res\bold.ico" />
+ <None Include="res\chat.ico" />
+ <None Include="res\glowner.ico" />
+ <None Include="res\invite.ico" />
+ <None Include="res\italic.ico" />
+ <None Include="res\message.ico" />
+ <None Include="res\moderator.ico" />
+ <None Include="res\next.ico" />
+ <None Include="res\options.ico" />
+ <None Include="res\owner.ico" />
+ <None Include="res\prev.ico" />
+ <None Include="res\r_anon.ico" />
+ <None Include="res\r_memb.ico" />
+ <None Include="res\r_mod.ico" />
+ <None Include="res\registered.ico" />
+ <None Include="res\search.ico" />
+ <None Include="res\smile.ico" />
+ <None Include="res\tlensmall.ico" />
+ <None Include="res\underline.ico" />
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\mucc.rc">
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ </ResourceCompile>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/protocols/Tlen/tlen_czaty/mucc.vcxproj.filters b/protocols/Tlen/tlen_czaty/mucc.vcxproj.filters new file mode 100644 index 0000000000..792e83ddef --- /dev/null +++ b/protocols/Tlen/tlen_czaty/mucc.vcxproj.filters @@ -0,0 +1,178 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <ClCompile Include="src\AdminWindow.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mucc.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\ChatContainer.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\ChatEvent.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\ChatGroup.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\ChatRoom.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\ChatUser.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\ChatWindow.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\FontList.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\HelperDialog.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\ManagerWindow.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\mucc_services.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Utils.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\Options.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\AdminWindow.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\ChatContainer.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\ChatEvent.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\ChatGroup.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\ChatRoom.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\ChatUser.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\ChatWindow.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\FontList.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\HelperDialog.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\ManagerWindow.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\mucc.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\mucc_services.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Options.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\Utils.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="res\admin.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\administration.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\chat.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\blank.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\bold.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\invite.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\glowner.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\italic.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\message.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\moderator.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\next.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\options.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\owner.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\prev.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\r_anon.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\r_memb.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\r_mod.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\registered.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\search.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\smile.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\tlensmall.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ <None Include="res\underline.ico">
+ <Filter>Resource Files</Filter>
+ </None>
+ </ItemGroup>
+ <ItemGroup>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{acd9ca44-7d7e-4add-a4c6-16614bbf78b6}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{b4f7b43d-0f34-4a03-ba3f-90d6ff3b78c8}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{170ec188-279a-4f4d-8cf7-5deaccc50346}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\mucc.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/admin.ico b/protocols/Tlen/tlen_czaty/res/admin.ico Binary files differindex 9699f55d6f..9699f55d6f 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/admin.ico +++ b/protocols/Tlen/tlen_czaty/res/admin.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/administration.ico b/protocols/Tlen/tlen_czaty/res/administration.ico Binary files differindex e57884857e..e57884857e 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/administration.ico +++ b/protocols/Tlen/tlen_czaty/res/administration.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/blank.ico b/protocols/Tlen/tlen_czaty/res/blank.ico Binary files differindex 7845f62fed..7845f62fed 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/blank.ico +++ b/protocols/Tlen/tlen_czaty/res/blank.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/bold.ico b/protocols/Tlen/tlen_czaty/res/bold.ico Binary files differindex 01d5adda1d..01d5adda1d 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/bold.ico +++ b/protocols/Tlen/tlen_czaty/res/bold.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/chat.ico b/protocols/Tlen/tlen_czaty/res/chat.ico Binary files differindex 0b388d8f9d..0b388d8f9d 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/chat.ico +++ b/protocols/Tlen/tlen_czaty/res/chat.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/delete.ico b/protocols/Tlen/tlen_czaty/res/delete.ico Binary files differindex 59408c5337..59408c5337 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/delete.ico +++ b/protocols/Tlen/tlen_czaty/res/delete.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/glowner.ico b/protocols/Tlen/tlen_czaty/res/glowner.ico Binary files differindex 86fdf534e9..86fdf534e9 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/glowner.ico +++ b/protocols/Tlen/tlen_czaty/res/glowner.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/invite.ico b/protocols/Tlen/tlen_czaty/res/invite.ico Binary files differindex bf7dbc4d7a..bf7dbc4d7a 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/invite.ico +++ b/protocols/Tlen/tlen_czaty/res/invite.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/italic.ico b/protocols/Tlen/tlen_czaty/res/italic.ico Binary files differindex d34418be24..d34418be24 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/italic.ico +++ b/protocols/Tlen/tlen_czaty/res/italic.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/message.ico b/protocols/Tlen/tlen_czaty/res/message.ico Binary files differindex 40d183b7b3..40d183b7b3 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/message.ico +++ b/protocols/Tlen/tlen_czaty/res/message.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.rc b/protocols/Tlen/tlen_czaty/res/mucc.rc index 1336baeb98..27c5224948 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.rc +++ b/protocols/Tlen/tlen_czaty/res/mucc.rc @@ -1,5 +1,5 @@ -#include "resource.h"
-#include "../commons.h"
+#include "..\src/resource.h"
+#include "..\..\src/commons.h"
#ifdef __MINGW32__
#define WINVER 0x500
#define _WIN32_IE 0x500
@@ -513,7 +513,7 @@ BEGIN BLOCK "041504e3"
BEGIN
VALUE "Comments", "\0"
- VALUE "CompanyName", "http://mtlen.berlios.de\0"
+ VALUE "CompanyName", "http://miranda-ng.org/\0"
VALUE "FileDescription", "Group Chats GUI Plugin for Miranda NG\0"
VALUE "FileVersion", MUCC_VERSION_STRING
VALUE "InternalName", "tlen_chat\0"
@@ -542,26 +542,26 @@ END // Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_CHAT ICON DISCARDABLE "icos\\chat.ico"
-IDI_BLANK ICON DISCARDABLE "icos\\blank.ico"
-IDI_ITALIC ICON DISCARDABLE "icos\\italic.ico"
-IDI_BOLD ICON DISCARDABLE "icos\\bold.ico"
-IDI_UNDERLINE ICON DISCARDABLE "icos\\underline.ico"
-IDI_OPTIONS ICON DISCARDABLE "icos\\options.ico"
-IDI_OWNER ICON DISCARDABLE "icos\\owner.ico"
-IDI_GLOBALOWNER ICON DISCARDABLE "icos\\glowner.ico"
-IDI_ADMIN ICON DISCARDABLE "icos\\admin.ico"
-IDI_REGISTERED ICON DISCARDABLE "icos\\registered.ico"
-IDI_R_MODERATED ICON DISCARDABLE "icos\\r_mod.ico"
-IDI_R_MEMBERS ICON DISCARDABLE "icos\\r_memb.ico"
-IDI_R_ANONYMOUS ICON DISCARDABLE "icos\\r_anon.ico"
-IDI_SEARCH ICON DISCARDABLE "icos\\search.ico"
-IDI_PREV ICON DISCARDABLE "icos\\prev.ico"
-IDI_NEXT ICON DISCARDABLE "icos\\next.ico"
-IDI_INVITE ICON DISCARDABLE "icos\\invite.ico"
-IDI_ADMINISTRATION ICON DISCARDABLE "icos\\administration.ico"
-IDI_SMILEY ICON DISCARDABLE "icos\\smile.ico"
-IDI_MESSAGE ICON DISCARDABLE "icos\\message.ico"
+IDI_CHAT ICON DISCARDABLE "res\\chat.ico"
+IDI_BLANK ICON DISCARDABLE "res\\blank.ico"
+IDI_ITALIC ICON DISCARDABLE "res\\italic.ico"
+IDI_BOLD ICON DISCARDABLE "res\\bold.ico"
+IDI_UNDERLINE ICON DISCARDABLE "res\\underline.ico"
+IDI_OPTIONS ICON DISCARDABLE "res\\options.ico"
+IDI_OWNER ICON DISCARDABLE "res\\owner.ico"
+IDI_GLOBALOWNER ICON DISCARDABLE "res\\glowner.ico"
+IDI_ADMIN ICON DISCARDABLE "res\\admin.ico"
+IDI_REGISTERED ICON DISCARDABLE "res\\registered.ico"
+IDI_R_MODERATED ICON DISCARDABLE "res\\r_mod.ico"
+IDI_R_MEMBERS ICON DISCARDABLE "res\\r_memb.ico"
+IDI_R_ANONYMOUS ICON DISCARDABLE "res\\r_anon.ico"
+IDI_SEARCH ICON DISCARDABLE "res\\search.ico"
+IDI_PREV ICON DISCARDABLE "res\\prev.ico"
+IDI_NEXT ICON DISCARDABLE "res\\next.ico"
+IDI_INVITE ICON DISCARDABLE "res\\invite.ico"
+IDI_ADMINISTRATION ICON DISCARDABLE "res\\administration.ico"
+IDI_SMILEY ICON DISCARDABLE "res\\smile.ico"
+IDI_MESSAGE ICON DISCARDABLE "res\\message.ico"
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/next.ico b/protocols/Tlen/tlen_czaty/res/next.ico Binary files differindex d817b06cc6..d817b06cc6 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/next.ico +++ b/protocols/Tlen/tlen_czaty/res/next.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/options.ico b/protocols/Tlen/tlen_czaty/res/options.ico Binary files differindex 2fd2d902d9..2fd2d902d9 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/options.ico +++ b/protocols/Tlen/tlen_czaty/res/options.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/owner.ico b/protocols/Tlen/tlen_czaty/res/owner.ico Binary files differindex 27bea391f0..27bea391f0 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/owner.ico +++ b/protocols/Tlen/tlen_czaty/res/owner.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/prev.ico b/protocols/Tlen/tlen_czaty/res/prev.ico Binary files differindex 2f171e5783..2f171e5783 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/prev.ico +++ b/protocols/Tlen/tlen_czaty/res/prev.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_anon.ico b/protocols/Tlen/tlen_czaty/res/r_anon.ico Binary files differindex b5ebd0289e..b5ebd0289e 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_anon.ico +++ b/protocols/Tlen/tlen_czaty/res/r_anon.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_memb.ico b/protocols/Tlen/tlen_czaty/res/r_memb.ico Binary files differindex 418fd9abf5..418fd9abf5 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_memb.ico +++ b/protocols/Tlen/tlen_czaty/res/r_memb.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_mod.ico b/protocols/Tlen/tlen_czaty/res/r_mod.ico Binary files differindex 3b9fa47f60..3b9fa47f60 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/r_mod.ico +++ b/protocols/Tlen/tlen_czaty/res/r_mod.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/registered.ico b/protocols/Tlen/tlen_czaty/res/registered.ico Binary files differindex 3a5182b5d6..3a5182b5d6 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/registered.ico +++ b/protocols/Tlen/tlen_czaty/res/registered.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/save.ico b/protocols/Tlen/tlen_czaty/res/save.ico Binary files differindex 48b0581fd5..48b0581fd5 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/save.ico +++ b/protocols/Tlen/tlen_czaty/res/save.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/search.ico b/protocols/Tlen/tlen_czaty/res/search.ico Binary files differindex 065468e272..065468e272 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/search.ico +++ b/protocols/Tlen/tlen_czaty/res/search.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/sendmail.ico b/protocols/Tlen/tlen_czaty/res/sendmail.ico Binary files differindex 0b60bf950e..0b60bf950e 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/sendmail.ico +++ b/protocols/Tlen/tlen_czaty/res/sendmail.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/smile.ico b/protocols/Tlen/tlen_czaty/res/smile.ico Binary files differindex d4aea87249..d4aea87249 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/smile.ico +++ b/protocols/Tlen/tlen_czaty/res/smile.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/tlenbig.ico b/protocols/Tlen/tlen_czaty/res/tlenbig.ico Binary files differindex 4d09293560..4d09293560 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/tlenbig.ico +++ b/protocols/Tlen/tlen_czaty/res/tlenbig.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/tlensmall.ico b/protocols/Tlen/tlen_czaty/res/tlensmall.ico Binary files differindex 5204d39d21..5204d39d21 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/tlensmall.ico +++ b/protocols/Tlen/tlen_czaty/res/tlensmall.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/underline.ico b/protocols/Tlen/tlen_czaty/res/underline.ico Binary files differindex 7709f5f7f4..7709f5f7f4 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/icos/underline.ico +++ b/protocols/Tlen/tlen_czaty/res/underline.ico diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/AdminWindow.cpp b/protocols/Tlen/tlen_czaty/src/AdminWindow.cpp index a29c6fa2f2..5df8a2abf0 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/AdminWindow.cpp +++ b/protocols/Tlen/tlen_czaty/src/AdminWindow.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -58,7 +58,7 @@ static INT_PTR CALLBACK UserKickDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L GetDlgItemTextA(hwndDlg, IDC_REASON, reason, sizeof(reason));
if (strlen(nick)>0) {
int iSel = SendDlgItemMessage(hwndDlg, IDC_KICK_OPTIONS, CB_GETCURSEL, 0, 0);
- if (iSel>=0 && iSel<12) {
+ if (iSel >= 0 && iSel < 12) {
adminWindow->getParent()->kickAndBan(nick, banTime[iSel] * 60, reason);
}
}
@@ -72,7 +72,7 @@ static INT_PTR CALLBACK UserKickDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L GetDlgItemTextA(hwndDlg, IDC_NICK, nick, sizeof(nick));
if (strlen(nick)>0) {
int iSel = SendDlgItemMessage(hwndDlg, IDC_ROLE_OPTIONS, CB_GETCURSEL, 0, 0);
- if (iSel>=0 && iSel<3) {
+ if (iSel >= 0 && iSel < 3) {
adminWindow->getParent()->setRights(nick, roleMask[iSel]);
}
}
@@ -193,7 +193,7 @@ static INT_PTR CALLBACK UserBrowserDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam rc.bottom = lpDis->rcItem.bottom;
rc.right = x+w-2;
ListView_GetItemText(GetDlgItem(hwndDlg, IDC_LIST), lpDis->itemID, col, text, sizeof(text)/sizeof(TCHAR));
- if (_tcslen(text)==0) {
+ if (_tcslen(text) == 0) {
_tcscpy(text, _TEXT("-"));
}
DrawText(lpDis->hDC, text, (int)_tcslen(text), &rc, DT_LEFT|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER);
@@ -227,7 +227,7 @@ static INT_PTR CALLBACK UserBrowserDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam lvi.cchTextMax = sizeof(nick)/sizeof(TCHAR);
ListView_GetItem(pNmhdr->hwndFrom, &lvi);
hMenu=GetSubMenu(LoadMenu(hInst, MAKEINTRESOURCE(IDR_CHATOPTIONS)), 3);
- CallService(MS_LANGPACK_TRANSLATEMENU,(WPARAM)hMenu,0);
+ TranslateMenu(hMenu);
iSelection = TrackPopupMenu(hMenu, TPM_RETURNCMD | TPM_TOPALIGN | TPM_LEFTALIGN, (short)LOWORD(GetMessagePos()), (short)HIWORD(GetMessagePos()), 0, hwndDlg, NULL);
DestroyMenu(hMenu);
if (iSelection == ID_USERMENU_UNBAN) {
@@ -469,7 +469,7 @@ void AdminWindow::queryResultUsers(MUCCQUERYRESULT *queryResult) { /*
ptr = new HelperContact(queryResult->pItems[i].pszID, queryResult->pItems[i].pszName);
- if (lastptr !=NULL) {
+ if (lastptr != NULL) {
lastptr->setNext(ptr);
} else {
contactList=ptr;
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/AdminWindow.h b/protocols/Tlen/tlen_czaty/src/AdminWindow.h index a73cdb9285..2e3e4f5496 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/AdminWindow.h +++ b/protocols/Tlen/tlen_czaty/src/AdminWindow.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatContainer.cpp b/protocols/Tlen/tlen_czaty/src/ChatContainer.cpp index 11e523e337..eb3a6512fd 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatContainer.cpp +++ b/protocols/Tlen/tlen_czaty/src/ChatContainer.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -44,7 +44,7 @@ static void __cdecl StartThread(void *vContainer); void ChatContainer::release() {
released = true;
- for (ChatContainer *ptr2, *ptr = list; ptr!=NULL; ptr=ptr2) {
+ for (ChatContainer *ptr2, *ptr = list; ptr != NULL; ptr=ptr2) {
ptr2 = ptr->getNext();
SendMessage(ptr->getHWND(), WM_CLOSE, 0, 0);
}
@@ -84,7 +84,7 @@ ChatContainer::ChatContainer() { WaitForSingleObject(hEvent, INFINITE);
EnterCriticalSection(&mutex);
setNext(list);
- if (next!=NULL) {
+ if (next != NULL) {
next->setPrev(this);
}
list = this;
@@ -94,17 +94,17 @@ ChatContainer::ChatContainer() { ChatContainer::~ChatContainer() {
if (!released) {
EnterCriticalSection(&mutex);
- if (getPrev()!=NULL) {
+ if (getPrev() != NULL) {
getPrev()->setNext(next);
- } else if (list==this) {
+ } else if (list == this) {
list = getNext();
}
- if (getNext()!=NULL) {
+ if (getNext() != NULL) {
getNext()->setPrev(prev);
}
LeaveCriticalSection(&mutex);
}
- if (hEvent!=NULL) {
+ if (hEvent != NULL) {
CloseHandle(hEvent);
}
}
@@ -164,16 +164,16 @@ void ChatContainer::setFlash(int n) { void ChatContainer::activateChild(ChatWindow *window) {
RECT rcChild;
getChildWindowRect(&rcChild);
- if (window!=NULL) {
+ if (window != NULL) {
SetWindowPos(window->getHWND(), HWND_TOP, rcChild.left, rcChild.top, rcChild.right-rcChild.left, rcChild.bottom - rcChild.top, SWP_NOSIZE);
}
- if(window != active) {
+ if (window != active) {
ChatWindow *prev = active;
active = window;
SendMessage(hWnd, WM_SIZE, 0, 0);
ShowWindow(active->getHWND(), SW_SHOW);
// SendMessage(active->getHWND(), DM_UPDATETITLE, 0, 0);
- if (prev!=NULL) {
+ if (prev != NULL) {
ShowWindow(prev->getHWND(), SW_HIDE);
}
SetWindowTextA(hWnd, window->getRoomName());
@@ -328,7 +328,7 @@ INT_PTR CALLBACK ContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM {
ChatContainer *container;
container = (ChatContainer *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- if (container==NULL && msg!=WM_INITDIALOG) return FALSE;
+ if (container == NULL && msg != WM_INITDIALOG) return FALSE;
switch (msg) {
case WM_INITDIALOG:
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM) muccIcon[MUCC_IDI_CHAT]);
@@ -368,7 +368,7 @@ INT_PTR CALLBACK ContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM MoveWindow(hwndDlg, rcWindow.left, rcWindow.top, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, TRUE);
container->getChildWindowRect(&rcChild);
}
- if (container->getActive()!=NULL) {
+ if (container->getActive() != NULL) {
MoveWindow(container->getActive()->getHWND(), rcChild.left, rcChild.top, rcChild.right-rcChild.left, rcChild.bottom - rcChild.top, TRUE);
}
}
@@ -442,7 +442,7 @@ INT_PTR CALLBACK ContainerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM FlashWindow(hwndDlg, FALSE);
}
/*
- if (container->getActive()!=NULL) {
+ if (container->getActive() != NULL) {
container->setUnread(container->getActive(), 0);
SendMessage(container->getActive()->getHWND(), WM_ACTIVATE, WA_ACTIVE, 0);
}*/
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatContainer.h b/protocols/Tlen/tlen_czaty/src/ChatContainer.h index 4414068033..43b21014f0 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatContainer.h +++ b/protocols/Tlen/tlen_czaty/src/ChatContainer.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatEvent.cpp b/protocols/Tlen/tlen_czaty/src/ChatEvent.cpp index 246c168f22..98da308382 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatEvent.cpp +++ b/protocols/Tlen/tlen_czaty/src/ChatEvent.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -122,7 +122,7 @@ ChatEventList::ChatEventList() { }
ChatEventList::~ChatEventList() {
- while (eventListRoot.getNext()!=NULL) {
+ while (eventListRoot.getNext() != NULL) {
delete eventListRoot.getNext();
}
}
@@ -135,7 +135,7 @@ int ChatEventList::addEvent(const MUCCEVENT *muccevent) { eventListEnd=event;
currentSize++;
if (currentSize>hiMaxSize) {
- while (currentSize>loMaxSize && eventListRoot.getNext()!=NULL) {
+ while (currentSize>loMaxSize && eventListRoot.getNext() != NULL) {
delete eventListRoot.getNext();
currentSize--;
trimmed = 1;
@@ -162,9 +162,9 @@ void ChatEventList::clear() { eventListRoot.setNext(NULL);
eventListEnd = &eventListRoot;
currentSize = 0;
- if (event!=NULL) {
+ if (event != NULL) {
event->setPrev(NULL);
- while (event->getNext()!=NULL) {
+ while (event->getNext() != NULL) {
delete event->getNext();
}
delete event;
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatEvent.h b/protocols/Tlen/tlen_czaty/src/ChatEvent.h index 37e045380f..c90c5b48ee 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatEvent.h +++ b/protocols/Tlen/tlen_czaty/src/ChatEvent.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatGroup.cpp b/protocols/Tlen/tlen_czaty/src/ChatGroup.cpp index a5c47d724f..535985a85d 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatGroup.cpp +++ b/protocols/Tlen/tlen_czaty/src/ChatGroup.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -30,8 +30,8 @@ ChatGroup::ChatGroup() { }
ChatGroup::~ChatGroup() {
- if (name!=NULL) delete name;
- if (id!=NULL) delete id;
+ if (name != NULL) delete name;
+ if (id != NULL) delete id;
}
ChatGroup * ChatGroup::getNext() {
return next;
@@ -55,9 +55,9 @@ ChatGroup * ChatGroup::getChild() { void ChatGroup::addChild(ChatGroup *child) {
ChatGroup *group;
- for (group=getChild();group!=NULL && group->getNext()!=NULL;group=group->getNext()) {
+ for (group=getChild();group != NULL && group->getNext() != NULL;group=group->getNext()) {
}
- if (group==NULL) this->child = child;
+ if (group == NULL) this->child = child;
else {
group->setNext(child);
}
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatGroup.h b/protocols/Tlen/tlen_czaty/src/ChatGroup.h index c04abf81ba..8f92066707 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatGroup.h +++ b/protocols/Tlen/tlen_czaty/src/ChatGroup.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatRoom.cpp b/protocols/Tlen/tlen_czaty/src/ChatRoom.cpp index 2f9c1389c2..e575bdd759 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatRoom.cpp +++ b/protocols/Tlen/tlen_czaty/src/ChatRoom.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -30,8 +30,8 @@ ChatRoom::ChatRoom() { }
ChatRoom::~ChatRoom() {
- if (name!=NULL) delete name;
- if (id!=NULL) delete id;
+ if (name != NULL) delete name;
+ if (id != NULL) delete id;
}
void ChatRoom::setId(const char *id) {
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatRoom.h b/protocols/Tlen/tlen_czaty/src/ChatRoom.h index 51593f00c2..e883ccd84a 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatRoom.h +++ b/protocols/Tlen/tlen_czaty/src/ChatRoom.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatUser.cpp b/protocols/Tlen/tlen_czaty/src/ChatUser.cpp index cb5baea1a8..3f306d4523 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatUser.cpp +++ b/protocols/Tlen/tlen_czaty/src/ChatUser.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -30,8 +30,8 @@ ChatUser::ChatUser() { }
ChatUser::~ChatUser() {
- if (id!=NULL) delete id;
- if (nick!=NULL) delete nick;
+ if (id != NULL) delete id;
+ if (nick != NULL) delete nick;
}
void ChatUser::setNick(const char *nick) {
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatUser.h b/protocols/Tlen/tlen_czaty/src/ChatUser.h index 0084a14608..5fa95c2291 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatUser.h +++ b/protocols/Tlen/tlen_czaty/src/ChatUser.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatWindow.cpp b/protocols/Tlen/tlen_czaty/src/ChatWindow.cpp index 97dc986381..b5db25ea9f 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatWindow.cpp +++ b/protocols/Tlen/tlen_czaty/src/ChatWindow.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -46,7 +46,7 @@ static HCURSOR hCurSplitNS, hCurSplitWE, hCurHyperlinkHand; void ChatWindow::release() {
released = true;
- for (ChatWindow *ptr2, *ptr = list; ptr!=NULL; ptr=ptr2) {
+ for (ChatWindow *ptr2, *ptr = list; ptr != NULL; ptr=ptr2) {
ptr2 = ptr->getNext();
//SendMessage(ptr->getHWND(), WM_CLOSE, 0, 0);
}
@@ -96,7 +96,7 @@ static void __stdcall StartThread(void *vChat) { //__cdecl gcw.pszStatusbarText = "status";
gcw.bDisableNickList = FALSE;
gcw.dwItemData = (DWORD) chat;
- if(CallService(MS_GC_NEWCHAT, 0, (LPARAM) &gcw)) {
+ if (CallService(MS_GC_NEWCHAT, 0, (LPARAM) &gcw)) {
MessageBox(NULL, "cannot create", "CHAT", MB_OK);
}
@@ -106,7 +106,7 @@ static void __stdcall StartThread(void *vChat) { //__cdecl gcdest.pszModule = (char *)chat->getModule();
gcdest.pszID = (char *)chat->getRoomId();
gcevent.bAddToLog = FALSE;
- gcevent.time = 0;
+ gcevent.time = 0;
gcdest.iType = GC_EVENT_ADDGROUP;
for (int i=0;i<5;i++) {
gcevent.pszStatus = Translate(groupNames[i]);
@@ -160,37 +160,37 @@ ChatWindow::ChatWindow(MUCCWINDOW *mucw) { ChatWindow::~ChatWindow () {
if (!released) {
EnterCriticalSection(&mutex);
- if (getPrev()!=NULL) {
+ if (getPrev() != NULL) {
getPrev()->setNext(next);
- } else if (list==this) {
+ } else if (list == this) {
list = getNext();
}
- if (getNext()!=NULL) {
+ if (getNext() != NULL) {
getNext()->setPrev(prev);
}
LeaveCriticalSection(&mutex);
}
- if (adminWindow!=NULL) {
+ if (adminWindow != NULL) {
delete adminWindow;
}
- if (hEvent!=NULL) {
+ if (hEvent != NULL) {
CloseHandle(hEvent);
}
- while (users!=NULL) {
+ while (users != NULL) {
ChatUser *user = users;
users = users->getNext();
delete user;
}
- if (module!=NULL) {
+ if (module != NULL) {
delete module;
}
- if (roomId!=NULL) {
+ if (roomId != NULL) {
delete roomId;
}
- if (roomName!=NULL) {
+ if (roomName != NULL) {
delete roomName;
}
- if (topic!=NULL) {
+ if (topic != NULL) {
delete topic;
}
container->remoteRemoveChild(this);
@@ -301,7 +301,7 @@ static void __cdecl StartAdminThread(void *vChat) { }
void ChatWindow::startAdminDialog(int mode) {
- if (adminWindow==NULL) {
+ if (adminWindow == NULL) {
ChatUser *user = getSelectedUser();
if (user != NULL) {
adminWindow = new AdminWindow(this, user->getId(), mode);
@@ -317,12 +317,12 @@ void ChatWindow::addUser(ChatUser *user) { }
void ChatWindow::removeUser(ChatUser *user) {
ChatUser *user2;
- for (user2=users;user2!=NULL;user2=user2->getNext()) {
- if (user2->getNext()==user) break;
+ for (user2=users;user2 != NULL;user2=user2->getNext()) {
+ if (user2->getNext() == user) break;
}
- if (user2!=NULL) {
+ if (user2 != NULL) {
user2->setNext(user->getNext());
- } else if (users==user) {
+ } else if (users == user) {
users = user->getNext();
}
}
@@ -333,7 +333,7 @@ ChatUser * ChatWindow::getMe() { ChatUser * ChatWindow::findUser(const char *userId) {
ChatUser *user;
- for (user=users;user!=NULL;user=user->getNext()) {
+ for (user=users;user != NULL;user=user->getNext()) {
if (!(strcmp(user->getId(), userId))) break;
}
return user;
@@ -341,7 +341,7 @@ ChatUser * ChatWindow::findUser(const char *userId) { ChatUser * ChatWindow::findUserByNick(const char *nick) {
ChatUser *user;
- for (user=users;user!=NULL;user=user->getNext()) {
+ for (user=users;user != NULL;user=user->getNext()) {
if (!(strcmp(user->getNick(), nick))) break;
}
return user;
@@ -349,7 +349,7 @@ ChatUser * ChatWindow::findUserByNick(const char *nick) { ChatUser *ChatWindow::getSelectedUser() {
HTREEITEM hTreeItem = TreeView_GetSelection(GetDlgItem(hWnd, IDC_TREELIST));
- if (hTreeItem!=NULL) {
+ if (hTreeItem != NULL) {
TVITEM tvi;
tvi.mask = TVIF_PARAM;
tvi.hItem = hTreeItem;
@@ -361,7 +361,7 @@ ChatUser *ChatWindow::getSelectedUser() { int ChatWindow::startPriv() {
ChatUser *user = getSelectedUser();
- if (user!=NULL) {
+ if (user != NULL) {
MUCCEVENT mucce;
mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_START_PRIV;
@@ -374,7 +374,7 @@ int ChatWindow::startPriv() { }
int ChatWindow::unban(const char *id) {
- if (id!=NULL) {
+ if (id != NULL) {
MUCCEVENT mucce;
mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_UNBAN;
@@ -388,7 +388,7 @@ int ChatWindow::unban(const char *id) { int ChatWindow::kickAndBan(const char *id, int time, const char *reason) {
- if (id!=NULL) {
+ if (id != NULL) {
MUCCEVENT mucce;
mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_KICK_BAN;
@@ -404,14 +404,14 @@ int ChatWindow::kickAndBan(const char *id, int time, const char *reason) { int ChatWindow::kickAndBan(int time) {
ChatUser *user = getSelectedUser();
- if (user!=NULL) {
+ if (user != NULL) {
kickAndBan(user->getId(), time, "");
}
return 0;
}
int ChatWindow::setRights(const char *id, int flags) {
- if (id!=NULL) {
+ if (id != NULL) {
MUCCEVENT mucce;
mucce.cbSize = sizeof(MUCCEVENT);
mucce.iType = MUCC_EVENT_SET_USER_ROLE;
@@ -426,7 +426,7 @@ int ChatWindow::setRights(const char *id, int flags) { int ChatWindow::setRights(int flags) {
ChatUser *user = getSelectedUser();
- if (user!=NULL) {
+ if (user != NULL) {
setRights(user->getId(), flags);
}
return 0;
@@ -450,7 +450,7 @@ int ChatWindow::changePresence(const MUCCEVENT *event) { int i, group, bLogEvent = FALSE;
const char *groupNames[] = {"Global Owners", "Owners", "Admins", "Moderators", "Users"};
ChatUser *user = findUser(event->pszUID);
- if (event->dwData == ID_STATUS_ONLINE || (user!=NULL && event->dwData!=ID_STATUS_OFFLINE)) {
+ if (event->dwData == ID_STATUS_ONLINE || (user != NULL && event->dwData != ID_STATUS_OFFLINE)) {
if (user == NULL) {
user = new ChatUser();
user->setId(event->pszUID);
@@ -466,7 +466,7 @@ int ChatWindow::changePresence(const MUCCEVENT *event) { group = getUserGroup(user);
user->setFlags(event->dwFlags);
TreeView_DeleteItem(GetDlgItem(hWnd, IDC_TREELIST), user->getHTreeItem());
- if (TreeView_GetChild(GetDlgItem(hWnd, IDC_TREELIST), getTreeItem(group))==NULL) {
+ if (TreeView_GetChild(GetDlgItem(hWnd, IDC_TREELIST), getTreeItem(group)) == NULL) {
TreeView_DeleteItem(GetDlgItem(hWnd, IDC_TREELIST), getTreeItem(group));
setTreeItem(group, NULL);
}
@@ -480,12 +480,12 @@ int ChatWindow::changePresence(const MUCCEVENT *event) { }
group = getUserGroup(user);
TVINSERTSTRUCT tvis;
- if (getTreeItem(group)==NULL) {
- for (i=group-1;i>=0;i--) {
- if (getTreeItem(i)!=NULL) break;
+ if (getTreeItem(group) == NULL) {
+ for (i=group-1; i >= 0; i--) {
+ if (getTreeItem(i) != NULL) break;
}
tvis.hParent = NULL;
- if (i>=0) {
+ if (i >= 0) {
tvis.hInsertAfter = getTreeItem(i);
} else {
tvis.hInsertAfter = TVI_FIRST;
@@ -514,7 +514,7 @@ int ChatWindow::changePresence(const MUCCEVENT *event) { if (user != NULL) {
group = getUserGroup(user);
TreeView_DeleteItem(GetDlgItem(hWnd, IDC_TREELIST), user->getHTreeItem());
- if (TreeView_GetChild(GetDlgItem(hWnd, IDC_TREELIST), getTreeItem(group))==NULL) {
+ if (TreeView_GetChild(GetDlgItem(hWnd, IDC_TREELIST), getTreeItem(group)) == NULL) {
TreeView_DeleteItem(GetDlgItem(hWnd, IDC_TREELIST), getTreeItem(group));
setTreeItem(group, NULL);
}
@@ -547,15 +547,15 @@ int ChatWindow::changeRoomInfo(const MUCCEVENT *event) { const char * ChatWindow::getFontName(int index) {
const char *fontNames[] = {"Arial",
- "Comic Sans MS",
- "Courier New",
- "Impact",
- "Lucida Console",
- "MS Sans Serif",
- "Tahoma",
- "Times New Roman",
- "Trebuchet MS",
- "Verdana"};
+ "Comic Sans MS",
+ "Courier New",
+ "Impact",
+ "Lucida Console",
+ "MS Sans Serif",
+ "Tahoma",
+ "Times New Roman",
+ "Trebuchet MS",
+ "Verdana"};
if (index>9 || index<0) index = 0;
return fontNames[index];
}
@@ -577,14 +577,14 @@ void ChatWindow::refreshSettings() { void ChatWindow::refreshSettings(int force) {
- if (hListFont!=NULL && !force) {
+ if (hListFont != NULL && !force) {
return;
}
EnterCriticalSection(&mutex);
- if (hListFont!=NULL) {
+ if (hListFont != NULL) {
DeleteObject(hListFont);
}
- if (hListGroupFont!=NULL) {
+ if (hListGroupFont != NULL) {
DeleteObject(hListGroupFont);
}
Font * font = Options::getFont(Options::FONT_USERLIST);
@@ -595,7 +595,7 @@ void ChatWindow::refreshSettings(int force) { font->getStyle() & Font::UNDERLINE ? 1 : 0, 0,
font->getCharSet(),
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_ROMAN,
- font->getFace());
+ font->getFace());
font = Options::getFont(Options::FONT_USERLISTGROUP);
colorListGroupText = font->getColor();
hListGroupFont = CreateFontA(font->getSize(), 0, 0, 0,
@@ -604,9 +604,9 @@ void ChatWindow::refreshSettings(int force) { font->getStyle() & Font::UNDERLINE ? 1 : 0, 0,
font->getCharSet(),
OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, FIXED_PITCH | FF_ROMAN,
- font->getFace());
+ font->getFace());
- for (ChatWindow *ptr=list;ptr!=NULL;ptr=ptr->getNext()) {
+ for (ChatWindow *ptr=list; ptr != NULL; ptr=ptr->getNext()) {
ptr->refreshSettings();
InvalidateRect(ptr->getHWND(), NULL, FALSE);
}
@@ -641,7 +641,7 @@ int ChatWindow::getDefaultOptions() { }
void ChatWindow::clearLog() {
- if (getHWNDLog()!=NULL) {
+ if (getHWNDLog() != NULL) {
IEVIEWEVENT iee;
ZeroMemory(&iee, sizeof(iee));
iee.cbSize = sizeof(iee);
@@ -662,7 +662,7 @@ void ChatWindow::clearLog() { void ChatWindow::rebuildLog() {
int nMin, nMax;
HWND hwndLog;
- if (getHWNDLog()!=NULL) {
+ if (getHWNDLog() != NULL) {
IEVIEWEVENT iee;
ZeroMemory(&iee, sizeof(iee));
iee.cbSize = sizeof(iee);
@@ -677,10 +677,10 @@ void ChatWindow::rebuildLog() { SetDlgItemTextA(getHWND(), IDC_LOG, "");
}
isEmpty = true;
- for (ChatEvent* event=eventList.getEvents();event!=NULL;event=event->getNext()) {
+ for (ChatEvent* event=eventList.getEvents(); event != NULL; event=event->getNext()) {
appendMessage(event->getEvent());
}
- if (getHWNDLog()==NULL) {
+ if (getHWNDLog() == NULL) {
if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) PostMessage(getHWND(), WM_TLEN_SMILEY, 0, 0);
hwndLog = GetDlgItem(getHWND(), IDC_LOG);
int len = GetWindowTextLengthA(hwndLog);
@@ -757,16 +757,16 @@ int ChatWindow::logEvent(const MUCCEVENT *event) { } else {
appendMessage(event);
}
- if (event->iType==MUCC_EVENT_MESSAGE && getOptions() & FLAG_FLASH_MESSAGES) {
+ if (event->iType == MUCC_EVENT_MESSAGE && getOptions() & FLAG_FLASH_MESSAGES) {
container->remoteFlashWindow();
- } else if (event->iType==MUCC_EVENT_STATUS && event->dwData==ID_STATUS_ONLINE && getOptions() & FLAG_FLASH_JOINED) {
+ } else if (event->iType == MUCC_EVENT_STATUS && event->dwData == ID_STATUS_ONLINE && getOptions() & FLAG_FLASH_JOINED) {
container->remoteFlashWindow();
- } else if (event->iType==MUCC_EVENT_STATUS && event->dwData==ID_STATUS_OFFLINE && getOptions() & FLAG_FLASH_LEFT) {
+ } else if (event->iType == MUCC_EVENT_STATUS && event->dwData == ID_STATUS_OFFLINE && getOptions() & FLAG_FLASH_LEFT) {
container->remoteFlashWindow();
- } else if (event->iType==MUCC_EVENT_TOPIC && getOptions() & FLAG_FLASH_TOPIC) {
+ } else if (event->iType == MUCC_EVENT_TOPIC && getOptions() & FLAG_FLASH_TOPIC) {
container->remoteFlashWindow();
}
- if (getHWNDLog()==NULL) {
+ if (getHWNDLog() == NULL) {
if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) PostMessage(getHWND(), WM_TLEN_SMILEY, 0, 0);
hwndLog = GetDlgItem(getHWND(), IDC_LOG);
int len = GetWindowTextLengthA(hwndLog);
@@ -812,21 +812,21 @@ int ChatWindow::appendMessage(const MUCCEVENT *event) { SETTEXTEX stt;
//tm *ltime;
- if (event->iType!=MUCC_EVENT_STATUS && event->iType!=MUCC_EVENT_STATUS && event->iType!=MUCC_EVENT_ERROR
- && event->iType!=MUCC_EVENT_TOPIC && event->iType != MUCC_EVENT_MESSAGE) {
+ if (event->iType != MUCC_EVENT_STATUS && event->iType != MUCC_EVENT_STATUS && event->iType != MUCC_EVENT_ERROR
+ && event->iType != MUCC_EVENT_TOPIC && event->iType != MUCC_EVENT_MESSAGE) {
return 0;
}
- if (event->iType==MUCC_EVENT_MESSAGE && !(getOptions() & FLAG_LOG_MESSAGES)) {
+ if (event->iType == MUCC_EVENT_MESSAGE && !(getOptions() & FLAG_LOG_MESSAGES)) {
return 0;
- } else if (event->iType==MUCC_EVENT_STATUS && event->dwData==ID_STATUS_ONLINE && !(getOptions() & FLAG_LOG_JOINED)) {
+ } else if (event->iType == MUCC_EVENT_STATUS && event->dwData == ID_STATUS_ONLINE && !(getOptions() & FLAG_LOG_JOINED)) {
return 0;
- } else if (event->iType==MUCC_EVENT_STATUS && event->dwData==ID_STATUS_OFFLINE && !(getOptions() & FLAG_LOG_LEFT)) {
+ } else if (event->iType == MUCC_EVENT_STATUS && event->dwData == ID_STATUS_OFFLINE && !(getOptions() & FLAG_LOG_LEFT)) {
return 0;
- } else if (event->iType==MUCC_EVENT_TOPIC && !(getOptions() & FLAG_LOG_TOPIC)) {
+ } else if (event->iType == MUCC_EVENT_TOPIC && !(getOptions() & FLAG_LOG_TOPIC)) {
return 0;
}
- if (getHWNDLog()!=NULL) {
+ if (getHWNDLog() != NULL) {
IEVIEWEVENTDATA ied;
IEVIEWEVENT iee;
IEVIEWWINDOW iew;
@@ -842,15 +842,15 @@ int ChatWindow::appendMessage(const MUCCEVENT *event) { iee.count = 1;
ied.cbSize = sizeof(IEVIEWEVENTDATA);
- if (event->iType==MUCC_EVENT_MESSAGE) {
+ if (event->iType == MUCC_EVENT_MESSAGE) {
ied.iType = IEED_MUCC_EVENT_MESSAGE;
- } else if (event->iType==MUCC_EVENT_STATUS && event->dwData==ID_STATUS_ONLINE) {
+ } else if (event->iType == MUCC_EVENT_STATUS && event->dwData == ID_STATUS_ONLINE) {
ied.iType = IEED_MUCC_EVENT_JOINED;
- } else if (event->iType==MUCC_EVENT_STATUS && event->dwData==ID_STATUS_OFFLINE) {
+ } else if (event->iType == MUCC_EVENT_STATUS && event->dwData == ID_STATUS_OFFLINE) {
ied.iType = IEED_MUCC_EVENT_LEFT;
- } else if (event->iType==MUCC_EVENT_TOPIC) {
+ } else if (event->iType == MUCC_EVENT_TOPIC) {
ied.iType = IEED_MUCC_EVENT_TOPIC;
- } else if (event->iType==MUCC_EVENT_ERROR) {
+ } else if (event->iType == MUCC_EVENT_ERROR) {
ied.iType = IEED_MUCC_EVENT_ERROR;
}
ied.dwFlags = getOptions() & FLAG_FORMAT_ALL;
@@ -919,7 +919,7 @@ int ChatWindow::appendMessage(const MUCCEVENT *event) { JabberStringAppend(&rtf, &msgSize, "\\red%d\\green%d\\blue%d;", color&0xFF, (color>>8)&0xFF, (color>>16)&0xFF);
color = fontName->getColor();
JabberStringAppend(&rtf, &msgSize, "\\red%d\\green%d\\blue%d;", color&0xFF, (color>>8)&0xFF, (color>>16)&0xFF);
- if (event->iType == MUCC_EVENT_MESSAGE && getOptions()&FLAG_FORMAT_COLOR && event->color!=0xFFFFFFFF) {
+ if (event->iType == MUCC_EVENT_MESSAGE && getOptions()&FLAG_FORMAT_COLOR && event->color != 0xFFFFFFFF) {
color = event->color;
} else {
color = fontMessage->getColor();
@@ -1064,20 +1064,20 @@ int ChatWindow::appendMessage(const MUCCEVENT *event) { stt.codepage = CP_ACP;
SendMessage(hwndLog, EM_SETTEXTEX, (WPARAM) &stt, (LPARAM) rtf);
free(rtf);
- if (escapedStr!=NULL) free(escapedStr);
- if (escapedNick!=NULL) free(escapedNick);
+ if (escapedStr != NULL) free(escapedStr);
+ if (escapedNick != NULL) free(escapedNick);
return 1;
}
void ChatWindow::setFont(int font, int size, int bBold, int bItalic, int bUnderline, COLORREF color) {
- if (hEditFont!=NULL) {
+ if (hEditFont != NULL) {
DeleteObject(hEditFont);
}
hEditFont = CreateFontA(MulDiv(-size, logPixelSY, 74), 0, 0, 0, bBold?FW_BOLD:FW_NORMAL,
- bItalic, bUnderline, 0, 238, OUT_DEFAULT_PRECIS,
- CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
- FIXED_PITCH | FF_ROMAN,
- getFontName(font));
+ bItalic, bUnderline, 0, 238, OUT_DEFAULT_PRECIS,
+ CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
+ FIXED_PITCH | FF_ROMAN,
+ getFontName(font));
SendDlgItemMessage(hWnd, IDC_EDIT, WM_SETFONT, (WPARAM) hEditFont, TRUE);
this->font = font;
this->fontSize = size;
@@ -1112,7 +1112,7 @@ void ChatWindow ::queryResultContacts(MUCCQUERYRESULT *queryResult) { }
void ChatWindow ::queryResultUsers(MUCCQUERYRESULT *queryResult) {
- if (adminWindow!=NULL) {
+ if (adminWindow != NULL) {
adminWindow->queryResultUsers(queryResult);
}
}
@@ -1120,8 +1120,8 @@ void ChatWindow ::queryResultUsers(MUCCQUERYRESULT *queryResult) { ChatWindow * ChatWindow::getWindow(const char *module, const char *roomId) {
ChatWindow *ptr;
EnterCriticalSection(&mutex);
- for (ptr=list;ptr!=NULL;ptr=ptr->getNext()) {
- if (strcmp(ptr->getRoomId(), roomId)==0 && strcmp(ptr->getModule(), module)==0) {
+ for (ptr=list; ptr != NULL; ptr=ptr->getNext()) {
+ if (strcmp(ptr->getRoomId(), roomId) == 0 && strcmp(ptr->getModule(), module) == 0) {
break;
}
}
@@ -1132,15 +1132,15 @@ ChatWindow * ChatWindow::getWindow(const char *module, const char *roomId) { static DWORD CALLBACK EditStreamCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
{
- char *szFilename = (char *)dwCookie;
- FILE *file;
+ char *szFilename = (char *)dwCookie;
+ FILE *file;
file = fopen(szFilename, "ab");
if (file != NULL) {
*pcb = (LONG)fwrite(pbBuff, (size_t)cb, (size_t)1, file);
fclose(file);
return 0;
}
- return 1;
+ return 1;
}
static BOOL CALLBACK EditWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -1151,8 +1151,8 @@ static BOOL CALLBACK EditWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar // case WM_GETDLGCODE:
// return DLGC_WANTALLKEYS; //DLGC_WANTARROWS|DLGC_WANTCHARS|DLGC_HASSETSEL|DLGC_WANTALLKEYS;
case WM_CHAR:
- if (wParam=='\r' || wParam=='\n') {
- if (((GetKeyState(VK_CONTROL)&0x8000)==0) == ((Options::getChatWindowOptions() & ChatWindow::FLAG_OPT_SENDONENTER) != 0)) {
+ if (wParam == '\r' || wParam == '\n') {
+ if (((GetKeyState(VK_CONTROL)&0x8000) == 0) == ((Options::getChatWindowOptions() & ChatWindow::FLAG_OPT_SENDONENTER) != 0)) {
PostMessage(GetParent(hwnd), WM_COMMAND, IDOK, 0);
return FALSE;
}
@@ -1234,7 +1234,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM int i;
ChatWindow *chatWindow;
chatWindow = (ChatWindow *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- if (msg!=WM_INITDIALOG && chatWindow==NULL) {
+ if (msg != WM_INITDIALOG && chatWindow == NULL) {
return FALSE;
}
switch (msg) {
@@ -1242,8 +1242,8 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM HDC hdc;
TranslateDialogDefault(hwndDlg);
hdc = GetDC(NULL);
- logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
- ReleaseDC(NULL, hdc);
+ logPixelSY = GetDeviceCaps(hdc, LOGPIXELSY);
+ ReleaseDC(NULL, hdc);
SendMessage(hwndDlg, WM_SETICON, ICON_BIG, (LPARAM) muccIcon[MUCC_IDI_CHAT]);
chatWindow = (ChatWindow *) lParam;
@@ -1277,30 +1277,30 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SendDlgItemMessage(hwndDlg, IDC_OPTIONS, BM_SETIMAGE, IMAGE_ICON, (LPARAM) muccIcon[MUCC_IDI_OPTIONS]);
SendDlgItemMessage(hwndDlg, IDC_INVITE, BM_SETIMAGE, IMAGE_ICON, (LPARAM) muccIcon[MUCC_IDI_INVITE]);
- SendDlgItemMessage(hwndDlg, IDC_TOPIC_BUTTON, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_INVITE, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BOLD, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_BOLD, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_ITALIC, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_ITALIC, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_UNDERLINE, BUTTONSETASPUSHBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_OPTIONS, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_SMILEYBTN, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_TOPIC_BUTTON, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_INVITE, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BOLD, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_BOLD, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_ITALIC, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_ITALIC, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_UNDERLINE, BUTTONSETASPUSHBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_OPTIONS, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_SMILEYBTN, BUTTONSETASFLATBTN, TRUE, 0);
SetWindowLong(GetDlgItem(hwndDlg,IDC_TREELIST),GWL_STYLE,GetWindowLong(GetDlgItem(hwndDlg,IDC_TREELIST),GWL_STYLE)|TVS_NOHSCROLL);
SendDlgItemMessage(hwndDlg,IDC_TREELIST, CCM_SETVERSION,(WPARAM)5,0);
//TreeView_SetImageList(GetDlgItem(hwndDlg, IDC_TREELIST), hImageList, TVSIL_STATE);
TreeView_SetItemHeight(GetDlgItem(hwndDlg, IDC_TREELIST), 16);
TreeView_SetIndent(GetDlgItem(hwndDlg, IDC_TREELIST), 16);
- for(i=0;i<chatWindow->getFontSizeNum();i++) {
+ for (i=0;i<chatWindow->getFontSizeNum();i++) {
char str[10];
sprintf(str, "%d", chatWindow->getFontSize(i));
int n = SendDlgItemMessageA(hwndDlg, IDC_FONTSIZE, CB_ADDSTRING, 0, (LPARAM) str);
SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_SETITEMDATA, n, chatWindow->getFontSize(i));
}
SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_SETCURSEL, Options::getChatWindowFontSize(), 0);
- for(i=0;i<chatWindow->getFontNameNum();i++) {
+ for (i=0;i<chatWindow->getFontNameNum();i++) {
int n = SendDlgItemMessageA(hwndDlg, IDC_FONT, CB_ADDSTRING, 0, (LPARAM) chatWindow->getFontName(i));
SendDlgItemMessage(hwndDlg, IDC_FONT, CB_SETITEMDATA, n, i);
}
@@ -1383,7 +1383,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM mmi->ptMinTrackSize.y = 130;
return FALSE;
case WM_SIZE:
- if (wParam!=SIZE_MINIMIZED) {
+ if (wParam != SIZE_MINIMIZED) {
int dlgWidth, dlgHeight;
RECT rc;
HDWP hdwp;
@@ -1420,7 +1420,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_VSPLIT), 0, dlgWidth-(chatWindow->vSplitterPos)-2, 30, 4, dlgHeight-(chatWindow->hSplitterPos)-30-26-2, SWP_NOZORDER);
hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_HSPLIT), 0, 0, dlgHeight-(chatWindow->hSplitterPos)-2, dlgWidth-8, 4, SWP_NOZORDER);
EndDeferWindowPos(hdwp);
- if (chatWindow->getHWNDLog()!=NULL) {
+ if (chatWindow->getHWNDLog() != NULL) {
IEVIEWWINDOW ieWindow;
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_SETPOS;
@@ -1461,7 +1461,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM muce.pszModule = chatWindow->getModule();
muce.pszID = chatWindow->getRoomId();
NotifyEventHooks(hHookEvent, 0,(WPARAM)&muce);
- if (chatWindow->getHWNDLog()!=NULL) {
+ if (chatWindow->getHWNDLog() != NULL) {
IEVIEWWINDOW ieWindow;
ieWindow.cbSize = sizeof(IEVIEWWINDOW);
ieWindow.iType = IEW_DESTROY;
@@ -1477,13 +1477,14 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
case WM_TLEN_SMILEY:
if (ServiceExists(MS_SMILEYADD_REPLACESMILEYS)) {
- SMADD_RICHEDIT2 smre;
- smre.cbSize = sizeof(SMADD_RICHEDIT2);
+ SMADD_RICHEDIT3 smre = {0};
+ smre.cbSize = sizeof(SMADD_RICHEDIT3);
smre.hwndRichEditControl = GetDlgItem(hwndDlg, IDC_LOG);
smre.Protocolname = (char *)chatWindow->getModule();
smre.rangeToReplace = NULL;
- smre.useSounds = FALSE;
smre.disableRedraw = FALSE;
+ smre.flags = 0; //SAFLRE_OUTGOING
+ smre.hContact = NULL;
CallService(MS_SMILEYADD_REPLACESMILEYS, 0, (LPARAM) &smre);
}
break;
@@ -1497,7 +1498,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM RECT rc;
int iSelection;
hMenu=GetSubMenu(LoadMenu(hInst, MAKEINTRESOURCE(IDR_CHATOPTIONS)),0);
- CallService(MS_LANGPACK_TRANSLATEMENU,(WPARAM)hMenu,0);
+ TranslateMenu(hMenu);
GetWindowRect(GetDlgItem(hwndDlg, IDC_OPTIONS), &rc);
CheckMenuItem(hMenu, ID_OPTIONMENU_SHOWNICKNAMES, MF_BYCOMMAND | chatWindow->getOptions()&ChatWindow::FLAG_SHOW_NICKNAMES ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(hMenu, ID_OPTIONMENU_MSGINNEWLINE, MF_BYCOMMAND | chatWindow->getOptions()&ChatWindow::FLAG_MSGINNEWLINE ? MF_CHECKED : MF_UNCHECKED);
@@ -1517,7 +1518,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM CheckMenuItem(hMenu, ID_OPTIONMENU_FLASHJOINED, MF_BYCOMMAND | chatWindow->getOptions()&ChatWindow::FLAG_FLASH_JOINED ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(hMenu, ID_OPTIONMENU_FLASHLEFT, MF_BYCOMMAND | chatWindow->getOptions()&ChatWindow::FLAG_FLASH_LEFT ? MF_CHECKED : MF_UNCHECKED);
CheckMenuItem(hMenu, ID_OPTIONMENU_FLASHTOPIC, MF_BYCOMMAND | chatWindow->getOptions()&ChatWindow::FLAG_FLASH_TOPIC ? MF_CHECKED : MF_UNCHECKED);
- if (chatWindow->getMe()!=NULL) {
+ if (chatWindow->getMe() != NULL) {
if (chatWindow->getMe()->getFlags() & (MUCC_EF_USER_OWNER | MUCC_EF_USER_ADMIN)) {
EnableMenuItem(hMenu, ID_ADMINMENU_ADMIN, MF_BYCOMMAND | MF_ENABLED);
EnableMenuItem(hMenu, ID_ADMINMENU_BROWSE, MF_BYCOMMAND | MF_ENABLED);
@@ -1610,7 +1611,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM chatWindow->startAdminDialog(ChatWindow::ADMIN_MODE_ROLE);
break;
case ID_ADMINMENU_SAVELOG:
- if (chatWindow->getHWNDLog()!=NULL) {
+ if (chatWindow->getHWNDLog() != NULL) {
IEVIEWEVENT iee;
ZeroMemory(&iee, sizeof(iee));
iee.cbSize = sizeof(iee);
@@ -1645,22 +1646,22 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
break;
case IDC_SMILEYBTN:
- SMADD_SHOWSEL smaddInfo;
+ SMADD_SHOWSEL3 smaddInfo;
RECT rc;
- smaddInfo.cbSize = sizeof(SMADD_SHOWSEL);
+ smaddInfo.cbSize = sizeof(SMADD_SHOWSEL3);
smaddInfo.hwndTarget = GetDlgItem(hwndDlg, IDC_EDIT);
smaddInfo.targetMessage = EM_REPLACESEL;
smaddInfo.targetWParam = TRUE;
- smaddInfo.Protocolname = chatWindow->getModule();
+ //smaddInfo.Protocolname = chatWindow->getModule();
+ Utils::copyString(&smaddInfo.Protocolname, chatWindow->getModule());
GetWindowRect(GetDlgItem(hwndDlg, IDC_SMILEYBTN), &rc);
smaddInfo.Direction = 0;
smaddInfo.xPosition = rc.left;
- smaddInfo.yPosition = rc.top + 24;
- if (chatWindow->getHWNDLog() != NULL) {
- CallService(MS_IEVIEW_SHOWSMILEYSELECTION, 0, (LPARAM) &smaddInfo);
- } else {
- CallService(MS_SMILEYADD_SHOWSELECTION, 0, (LPARAM) &smaddInfo);
- }
+ smaddInfo.yPosition = rc.top + 24; ;
+ smaddInfo.hContact = NULL; //TODO add hcontact here
+ //smaddInfo.Protocolname =
+ CallService(MS_SMILEYADD_SHOWSELECTION, 0, (LPARAM) &smaddInfo);
+ delete smaddInfo.Protocolname;
break;
case IDC_INVITE:
{
@@ -1699,7 +1700,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case IDC_BOLD:
case IDC_ITALIC:
case IDC_UNDERLINE:
- if (HIWORD(wParam)==BN_CLICKED) {
+ if (HIWORD(wParam) == BN_CLICKED) {
chatWindow->setFont((int) SendDlgItemMessage(hwndDlg, IDC_FONT, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_FONT, CB_GETCURSEL, 0, 0), 0),
(int) SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_GETCURSEL, 0, 0), 0),
IsDlgButtonChecked(hwndDlg, IDC_BOLD),
@@ -1709,7 +1710,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
case IDC_FONT:
case IDC_FONTSIZE:
- if (HIWORD(wParam)==CBN_SELCHANGE) {
+ if (HIWORD(wParam) == CBN_SELCHANGE) {
chatWindow->setFont((int) SendDlgItemMessage(hwndDlg, IDC_FONT, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_FONT, CB_GETCURSEL, 0, 0), 0),
(int) SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_GETCURSEL, 0, 0), 0),
IsDlgButtonChecked(hwndDlg, IDC_BOLD),
@@ -1719,7 +1720,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM }
break;
case IDC_COLOR:
- if (HIWORD(wParam)==CPN_COLOURCHANGED) {
+ if (HIWORD(wParam) == CPN_COLOURCHANGED) {
InvalidateRect(GetDlgItem(hwndDlg, IDC_EDIT), NULL, FALSE);
chatWindow->setFont((int) SendDlgItemMessage(hwndDlg, IDC_FONT, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_FONT, CB_GETCURSEL, 0, 0), 0),
(int) SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_FONTSIZE, CB_GETCURSEL, 0, 0), 0),
@@ -1749,7 +1750,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case TVN_ITEMEXPANDING:
{
LPNMTREEVIEW pnmtv = (LPNMTREEVIEW) lParam;
- if (pnmtv->action==TVE_COLLAPSE) {
+ if (pnmtv->action == TVE_COLLAPSE) {
SetWindowLongPtr(hwndDlg,DWLP_MSGRESULT, TRUE);
return TRUE;
}
@@ -1761,20 +1762,20 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM hti.pt.x=(short)LOWORD(GetMessagePos());
hti.pt.y=(short)HIWORD(GetMessagePos());
ScreenToClient(pNmhdr->hwndFrom,&hti.pt);
- if(TreeView_HitTest(pNmhdr->hwndFrom, &hti) && hti.flags&TVHT_ONITEM) {
+ if (TreeView_HitTest(pNmhdr->hwndFrom, &hti) && hti.flags&TVHT_ONITEM) {
TVITEM tvi = {0};
tvi.mask = TVIF_PARAM|TVIF_HANDLE;
tvi.hItem = hti.hItem;
TreeView_GetItem(pNmhdr->hwndFrom, &tvi);
ChatUser *user = (ChatUser *) tvi.lParam;
- if (user!=NULL) {
+ if (user != NULL) {
TreeView_Select(pNmhdr->hwndFrom, tvi.hItem, TVGN_CARET);
if (!user->isMe()) {
HMENU hMenu;
int iSelection;
hMenu = GetSubMenu(LoadMenu(hInst, MAKEINTRESOURCE(IDR_CHATOPTIONS)),1);
- CallService(MS_LANGPACK_TRANSLATEMENU,(WPARAM)hMenu,0);
- if (chatWindow->getMe()!=NULL) {
+ TranslateMenu(hMenu);
+ if (chatWindow->getMe() != NULL) {
if (chatWindow->getMe()->getFlags() & MUCC_EF_USER_OWNER) {
EnableMenuItem(hMenu, 2, MF_BYPOSITION | MF_ENABLED);
EnableMenuItem(hMenu, 3, MF_BYPOSITION | MF_ENABLED);
@@ -1844,7 +1845,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM } else {
pCustomDraw->clrTextBk = Options::getListBgColor();
}
- if (user!=NULL) {
+ if (user != NULL) {
if (user->getFlags()&MUCC_EF_USER_GLOBALOWNER) {
hIcon = muccIcon[MUCC_IDI_U_GLOBALOWNER];
} else if (user->getFlags()&MUCC_EF_USER_OWNER) {
@@ -1858,12 +1859,12 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SelectObject(pCustomDraw->nmcd.hdc, ChatWindow::getListFont());
break;
}
- if (rc.bottom-rc.top!=0 && rc.right-rc.left!=0) {
+ if (rc.bottom-rc.top != 0 && rc.right-rc.left != 0) {
HBRUSH hBr;
hBr = CreateSolidBrush(pCustomDraw->clrTextBk);
FillRect(pCustomDraw->nmcd.hdc, &rc, hBr);
DeleteObject(hBr);
- if (hIcon!=NULL) {
+ if (hIcon != NULL) {
DrawIconEx(pCustomDraw->nmcd.hdc, rc.left, rc.top, hIcon, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), 0, NULL, DI_NORMAL);
}
SetBkMode(pCustomDraw->nmcd.hdc, TRANSPARENT);
@@ -1910,7 +1911,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXT));
hSubMenu = GetSubMenu(hMenu, 0);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) hSubMenu, 0);
+ TranslateMenu(hSubMenu);
SendMessage(((NMHDR *) lParam)->hwndFrom, EM_EXGETSEL, 0, (LPARAM) & sel);
if (sel.cpMin == sel.cpMax)
EnableMenuItem(hSubMenu, IDM_COPY, MF_BYCOMMAND | MF_GRAYED);
@@ -1967,7 +1968,7 @@ static INT_PTR CALLBACK LogDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXT));
hSubMenu = GetSubMenu(hMenu, 1);
- CallService(MS_LANGPACK_TRANSLATEMENU, (WPARAM) hSubMenu, 0);
+ TranslateMenu(hSubMenu);
pt.x = (short) LOWORD(((ENLINK *) lParam)->lParam);
pt.y = (short) HIWORD(((ENLINK *) lParam)->lParam);
ClientToScreen(((NMHDR *) lParam)->hwndFrom, &pt);
@@ -2021,10 +2022,10 @@ static char *JabberRtfEscape(char *str) { if (str == NULL)
return NULL;
- for (p=str,size=0; *p!='\0'; p++) {
- if (*p=='\\' || *p=='{' || *p=='}')
+ for (p=str,size=0; *p != '\0'; p++) {
+ if (*p == '\\' || *p == '{' || *p == '}')
size += 2;
- else if (*p=='\n' || *p=='\t')
+ else if (*p == '\n' || *p == '\t')
size += 5;
else
size++;
@@ -2033,7 +2034,7 @@ static char *JabberRtfEscape(char *str) { if ((escapedStr=(char *)malloc(size+1)) == NULL)
return NULL;
- for (p=str,q=escapedStr; *p!='\0'; p++) {
+ for (p=str,q=escapedStr; *p != '\0'; p++) {
if (strchr("\\{}", *p) != NULL) {
*q++ = '\\';
*q++ = *p;
@@ -2062,7 +2063,7 @@ static void JabberStringAppend(char **str, int *sizeAlloced, const char *fmt, .. if (str == NULL) return;
- if (*str==NULL || *sizeAlloced<=0) {
+ if (*str == NULL || *sizeAlloced <= 0) {
*sizeAlloced = size = 2048;
*str = (char *) malloc(size);
len = 0;
@@ -2086,23 +2087,23 @@ static void JabberStringAppend(char **str, int *sizeAlloced, const char *fmt, .. //static DWORD CALLBACK Log_StreamCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG * pcb)
//{
-// StreamData *stream = (StreamData *) dwCookie;
+// StreamData *stream = (StreamData *) dwCookie;
/*
if (lstrdat->buffer == NULL)
{
lstrdat->iColCount = 4;
- lstrdat->bufferOffset = 0;
+ lstrdat->bufferOffset = 0;
lstrdat->buffer = Log_CreateBody(lstrdat);
- lstrdat->bufferLen = lstrlen(lstrdat->buffer);
- }
- *pcb = min(cb, lstrdat->bufferLen - lstrdat->bufferOffset);
- CopyMemory(pbBuff, lstrdat->buffer + lstrdat->bufferOffset, *pcb);
- lstrdat->bufferOffset += *pcb;
- if (lstrdat->bufferOffset == lstrdat->bufferLen)
+ lstrdat->bufferLen = lstrlen(lstrdat->buffer);
+ }
+ *pcb = min(cb, lstrdat->bufferLen - lstrdat->bufferOffset);
+ CopyMemory(pbBuff, lstrdat->buffer + lstrdat->bufferOffset, *pcb);
+ lstrdat->bufferOffset += *pcb;
+ if (lstrdat->bufferOffset == lstrdat->bufferLen)
{
- free(lstrdat->buffer);
- lstrdat->buffer = NULL;
- }
+ free(lstrdat->buffer);
+ lstrdat->buffer = NULL;
+ }
*/
-// return 0;
+// return 0;
//}
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatWindow.h b/protocols/Tlen/tlen_czaty/src/ChatWindow.h index 37b0b29d6e..5aaf13d1a2 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ChatWindow.h +++ b/protocols/Tlen/tlen_czaty/src/ChatWindow.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/FontList.cpp b/protocols/Tlen/tlen_czaty/src/FontList.cpp index 4d57617013..3bcf7554c5 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/FontList.cpp +++ b/protocols/Tlen/tlen_czaty/src/FontList.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/FontList.h b/protocols/Tlen/tlen_czaty/src/FontList.h index 2e0076e765..0c876fcbfe 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/FontList.h +++ b/protocols/Tlen/tlen_czaty/src/FontList.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/HelperDialog.cpp b/protocols/Tlen/tlen_czaty/src/HelperDialog.cpp index 343d66b89d..db9198e40b 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/HelperDialog.cpp +++ b/protocols/Tlen/tlen_czaty/src/HelperDialog.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -69,7 +69,7 @@ void HelperDialog::init() { }
void HelperDialog::release() {
- while (list!=NULL) {
+ while (list != NULL) {
delete list;
}
DeleteCriticalSection(&mutex);
@@ -83,7 +83,7 @@ HelperDialog::HelperDialog() { hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
EnterCriticalSection(&mutex);
setNext(list);
- if (next!=NULL) {
+ if (next != NULL) {
next->setPrev(this);
}
list = this;
@@ -102,7 +102,7 @@ HelperDialog::HelperDialog(ChatWindow *chat) { setRoomFlags(chat->getRoomFlags());
EnterCriticalSection(&mutex);
setNext(list);
- if (next!=NULL) {
+ if (next != NULL) {
next->setPrev(this);
}
list = this;
@@ -112,23 +112,23 @@ HelperDialog::HelperDialog(ChatWindow *chat) { HelperDialog::~HelperDialog()
{
EnterCriticalSection(&mutex);
- if (getPrev()!=NULL) {
+ if (getPrev() != NULL) {
getPrev()->setNext(next);
} else {
list = getNext();
}
- if (getNext()!=NULL) {
+ if (getNext() != NULL) {
getNext()->setPrev(prev);
}
LeaveCriticalSection(&mutex);
- if (hEvent!=NULL) CloseHandle(hEvent);
- if (module!=NULL) delete module;
- if (roomId!=NULL) delete roomId;
- if (roomName!=NULL) delete roomName;
- if (nick!=NULL) delete nick;
- if (reason!=NULL) delete reason;
- for (HelperContact *ptr2, *ptr=contactList;ptr!=NULL;ptr=ptr2) {
- ptr2 = ptr->getNext();
+ if (hEvent != NULL) CloseHandle(hEvent);
+ if (module != NULL) delete module;
+ if (roomId != NULL) delete roomId;
+ if (roomName != NULL) delete roomName;
+ if (nick != NULL) delete nick;
+ if (reason != NULL) delete reason;
+ for (HelperContact *ptr2, *ptr=contactList;ptr != NULL;ptr=ptr2) {
+ ptr2 = ptr->getNext();
delete ptr;
}
}
@@ -196,7 +196,7 @@ void HelperDialog::setRoomFlags(DWORD flags) }
void HelperDialog::setContactList(MUCCQUERYRESULT *queryResult) {
HelperContact *ptr, *lastptr;
- for (ptr=contactList;ptr!=NULL;ptr=ptr->getNext()) {
+ for (ptr=contactList; ptr != NULL; ptr=ptr->getNext()) {
delete ptr;
}
contactList = NULL;
@@ -297,7 +297,7 @@ static INT_PTR CALLBACK InviteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) dialog);
dialog->setHWND(hwndDlg);
SendDlgItemMessage(hwndDlg, IDC_REASON, EM_SETREADONLY, (WPARAM)TRUE, 0);
- for (contactList = dialog->getContactList();contactList!=NULL;contactList=contactList->getNext()) {
+ for (contactList = dialog->getContactList();contactList != NULL;contactList=contactList->getNext()) {
SendDlgItemMessage(hwndDlg, IDC_USER, CB_ADDSTRING, 0, (LPARAM)contactList->getName());
}
return TRUE;
@@ -307,13 +307,13 @@ static INT_PTR CALLBACK InviteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA MUCCEVENT muce;
GetDlgItemTextA(hwndDlg, IDC_USER, str, 255);
if (strlen(str)>0) {
- for (contactList = dialog->getContactList();contactList!=NULL;contactList=contactList->getNext()) {
+ for (contactList = dialog->getContactList();contactList != NULL;contactList=contactList->getNext()) {
if (!strcmp(str, contactList->getName())) {
dialog->setNick(contactList->getId());
break;
}
}
- if (contactList==NULL) {
+ if (contactList == NULL) {
dialog->setNick(str);
}
}
@@ -431,10 +431,10 @@ static INT_PTR CALLBACK JoinDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA } else {
SendDlgItemMessage(hwndDlg, IDC_NICK, EM_SETREADONLY, (WPARAM)TRUE, 0);
}
- if (dialog->getRoomName()!=NULL) {
+ if (dialog->getRoomName() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_ROOM, dialog->getRoomName());
}
- if (dialog->getNick()!=NULL) {
+ if (dialog->getNick() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_NICK, dialog->getNick());
}
return FALSE;
@@ -442,7 +442,7 @@ static INT_PTR CALLBACK JoinDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA switch (LOWORD(wParam)) {
case IDOK:
MUCCEVENT muce;
- if (dialog->getRoomId()==NULL) {
+ if (dialog->getRoomId() == NULL) {
GetDlgItemTextA(hwndDlg, IDC_ROOM, str, 255);
if (strlen(str)>0) {
//dialog->setRoomId(str);
@@ -483,7 +483,7 @@ static void __cdecl ErrorDlgThread(void *vDialog) MessageBoxA(NULL, dialog->getReason(), Translate("Error"), MB_OK | MB_ICONERROR);
/*
int result = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_GROUPCHAT_JOIN), NULL, JoinDlgProc, (LPARAM) dialog);
- if (result!=0) {
+ if (result != 0) {
MUCCEVENT muce;
muce.iType = MUCC_EVENT_JOIN;
muce.pszModule = dialog->getModule();
@@ -509,17 +509,17 @@ static INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) dialog);
dialog->setHWND(hwndDlg);
SetFocus(GetDlgItem(hwndDlg, IDOK));
- if (dialog->getRoomName()!=NULL) {
+ if (dialog->getRoomName() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_ROOM, dialog->getRoomName());
}
- if (dialog->getNick()!=NULL) {
+ if (dialog->getNick() != NULL) {
SetDlgItemTextA(hwndDlg, IDC_NICK, dialog->getNick());
}
return FALSE;
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDOK:
- if (dialog->getRoomId()==NULL) {
+ if (dialog->getRoomId() == NULL) {
GetDlgItemTextA(hwndDlg, IDC_ROOM, str, 255);
if (strlen(str)>0) {
//dialog->setRoomId(str);
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/HelperDialog.h b/protocols/Tlen/tlen_czaty/src/HelperDialog.h index 08f856c3a9..d1b3871a8c 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/HelperDialog.h +++ b/protocols/Tlen/tlen_czaty/src/HelperDialog.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ManagerWindow.cpp b/protocols/Tlen/tlen_czaty/src/ManagerWindow.cpp index a01caebc15..584c9fec66 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ManagerWindow.cpp +++ b/protocols/Tlen/tlen_czaty/src/ManagerWindow.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -37,7 +37,7 @@ void ManagerWindow::init() { void ManagerWindow::release() {
released = true;
- for (ManagerWindow *ptr2, *ptr = list; ptr!=NULL; ptr=ptr2) {
+ for (ManagerWindow *ptr2, *ptr = list; ptr != NULL; ptr=ptr2) {
ptr2 = ptr->getNext();
delete ptr;
// SendMessage(ptr->getHWND(), WM_CLOSE, 0, 0);
@@ -63,7 +63,7 @@ ManagerWindow::ManagerWindow(const char *module) hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
EnterCriticalSection(&mutex);
setNext(list);
- if (next!=NULL) {
+ if (next != NULL) {
next->setPrev(this);
}
list = this;
@@ -74,41 +74,41 @@ ManagerWindow::~ManagerWindow() {
if (!released) {
EnterCriticalSection(&mutex);
- if (getPrev()!=NULL) {
+ if (getPrev() != NULL) {
getPrev()->setNext(next);
} else {
list = getNext();
}
- if (getNext()!=NULL) {
+ if (getNext() != NULL) {
getNext()->setPrev(prev);
}
LeaveCriticalSection(&mutex);
}
- if (hWnd!=NULL) {
+ if (hWnd != NULL) {
EndDialog(hWnd, 0);
}
- if (hEvent!=NULL) {
+ if (hEvent != NULL) {
CloseHandle(hEvent);
}
- while (groups!=NULL) {
+ while (groups != NULL) {
ChatGroup *group = groups;
groups = groups->getListNext();
delete group;
}
- while (rooms!=NULL) {
+ while (rooms != NULL) {
ChatRoom *room = rooms;
rooms = rooms->getNext();
delete room;
}
- while (myRooms!=NULL) {
+ while (myRooms != NULL) {
ChatRoom *room = myRooms;
myRooms = myRooms->getNext();
delete room;
}
- if (module!=NULL) {
+ if (module != NULL) {
delete module;
}
- if (moduleName!=NULL) {
+ if (moduleName != NULL) {
delete moduleName;
}
}
@@ -240,15 +240,15 @@ void ManagerWindow::queryResultGroups(MUCCQUERYRESULT *queryResult) ChatGroup * group;
if (queryResult->pszParent != NULL) {
par = findGroup(queryResult->pszParent);
- if (par!=NULL) {
- if (par->getChild()!=NULL) return;
+ if (par != NULL) {
+ if (par->getChild() != NULL) return;
}
}
for (int i=0; i<queryResult->iItemsNum; i++) {
group = new ChatGroup();
group->setId(queryResult->pItems[i].pszID);
group->setName(queryResult->pItems[i].pszName);
- if (par!=NULL) {
+ if (par != NULL) {
par->addChild(group);
//group->setParent(par);
tvis.hParent = par->getTreeItem();
@@ -274,13 +274,13 @@ void ManagerWindow::queryResultGroups(MUCCQUERYRESULT *queryResult) void ManagerWindow::queryResultRooms(MUCCQUERYRESULT *queryResult)
{
ChatRoom *room;
- while (rooms!=NULL) {
+ while (rooms != NULL) {
room = rooms;
rooms = rooms->getNext();
delete room;
}
TCHAR str[100];
- if (getCurrentGroup()==NULL || strcmp(getCurrentGroup()->getId(), queryResult->pszParent) || queryResult->iPage!=getCurrentRoomsPage()) return;
+ if (getCurrentGroup() == NULL || strcmp(getCurrentGroup()->getId(), queryResult->pszParent) || queryResult->iPage != getCurrentRoomsPage()) return;
setLastRoomsPage(queryResult->iLastPage);
if (queryResult->iLastPage) {
EnableWindow(GetDlgItem(getChatRoomsTabHWND(), IDC_NEXT), FALSE);
@@ -319,7 +319,7 @@ void ManagerWindow::queryResultUserRooms(MUCCQUERYRESULT *queryResult) {
ChatRoom *room;
ListView_DeleteAllItems(GetDlgItem(getMyRoomsTabHWND(), IDC_LIST));
- while (myRooms!=NULL) {
+ while (myRooms != NULL) {
room = myRooms;
myRooms = myRooms->getNext();
delete room;
@@ -362,7 +362,7 @@ void ManagerWindow::queryResultUserNick(MUCCQUERYRESULT *queryResult) ChatGroup *ManagerWindow::findGroup(const char *id)
{
ChatGroup *group;
- for (group = groups;group!=NULL;group=group->getListNext()) {
+ for (group = groups;group != NULL; group=group->getListNext()) {
if (!strcmp(group->getId(), id)) break;
}
return group;
@@ -381,9 +381,9 @@ static INT_PTR CALLBACK ChatRoomsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) manager);
TranslateDialogDefault(hwndDlg);
manager->setChatRoomsTabHWND(hwndDlg);
- SendDlgItemMessage(hwndDlg, IDC_PREV, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_NEXT, BUTTONSETASFLATBTN, 0, 0);
- SendDlgItemMessage(hwndDlg, IDC_SEARCH, BUTTONSETASFLATBTN, 0, 0);
+ SendDlgItemMessage(hwndDlg, IDC_PREV, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_NEXT, BUTTONSETASFLATBTN, TRUE, 0);
+ SendDlgItemMessage(hwndDlg, IDC_SEARCH, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(hwndDlg, IDC_PREV, BM_SETIMAGE, IMAGE_ICON, (LPARAM) muccIcon[MUCC_IDI_PREV]);
SendDlgItemMessage(hwndDlg, IDC_NEXT, BM_SETIMAGE, IMAGE_ICON, (LPARAM) muccIcon[MUCC_IDI_NEXT]);
SendDlgItemMessage(hwndDlg, IDC_SEARCH, BM_SETIMAGE, IMAGE_ICON, (LPARAM) muccIcon[MUCC_IDI_SEARCH]);
@@ -411,7 +411,7 @@ static INT_PTR CALLBACK ChatRoomsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, case LVN_COLUMNCLICK:
{
LPNMLISTVIEW pnmlv = (LPNMLISTVIEW) lParam;
- if (pnmlv->iSubItem>=0 && pnmlv->iSubItem<=1) {
+ if (pnmlv->iSubItem >= 0 && pnmlv->iSubItem <= 1) {
// if (pnmlv->iSubItem == sortColumn)
// sortAscending = !sortAscending;
// else {
@@ -525,12 +525,12 @@ static INT_PTR CALLBACK ChatRoomsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, rc.top = lpDis->rcItem.top;
rc.bottom = lpDis->rcItem.bottom;
rc.right = x+w;
- if (col==0) {
+ if (col == 0) {
rc.left+=2;
rc.right-=2;
DrawText(lpDis->hDC, text, (int)_tcslen(text), &rc, DT_LEFT|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER);
}
- else if (col<2) {
+ else if (col < 2) {
DrawText(lpDis->hDC, text, (int)_tcslen(text), &rc, DT_CENTER|DT_NOPREFIX|DT_SINGLELINE|DT_VCENTER);
} else {
if (room->getFlags()&MUCC_EF_ROOM_MODERATED) {
@@ -612,10 +612,10 @@ static INT_PTR CALLBACK MyRoomsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_REGISTER:
{
MUCCEVENT muce;
- if (manager->getCurrentGroup()!=NULL) {
+ if (manager->getCurrentGroup() != NULL) {
TCHAR name[256];
GetDlgItemText(hwndDlg, IDC_NAME, name, 255);
- if (_tcslen(name)!=0) {
+ if (_tcslen(name) != 0) {
int flags = 0;
if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_PUBLIC)) {
flags |= MUCC_EF_ROOM_PUBLIC;
@@ -722,7 +722,7 @@ static INT_PTR CALLBACK MyNicksDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
char nick[256];
GetDlgItemTextA(hwndDlg, IDC_NICK, nick, 255);
- if (strlen(nick)!=0) {
+ if (strlen(nick) != 0) {
MUCCEVENT muce;
muce.cbSize = sizeof(MUCCEVENT);
muce.iType = MUCC_EVENT_REGISTER_NICK;
@@ -805,7 +805,7 @@ static INT_PTR CALLBACK ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP RECT rc2;
manager = (ManagerWindow *) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- if (manager==NULL && msg!=WM_INITDIALOG) return FALSE;
+ if (manager == NULL && msg != WM_INITDIALOG) return FALSE;
switch (msg) {
case WM_INITDIALOG:
// lParam is the initial conference server (if any)
@@ -875,7 +875,7 @@ static INT_PTR CALLBACK ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
return TRUE;
case WM_SIZE:
- if (wParam==SIZE_RESTORED || wParam==SIZE_MAXIMIZED) {
+ if (wParam == SIZE_RESTORED || wParam == SIZE_MAXIMIZED) {
HDWP hdwp;
dlgWidth = LOWORD(lParam);
dlgHeight = HIWORD(lParam);
@@ -900,11 +900,11 @@ static INT_PTR CALLBACK ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case TVN_ITEMEXPANDING:
{
LPNMTREEVIEW pnmtv = (LPNMTREEVIEW) lParam;
- if (pnmtv->action==TVE_EXPAND) {
+ if (pnmtv->action == TVE_EXPAND) {
TVITEM item = (TVITEM) pnmtv->itemNew;
ChatGroup *group = (ChatGroup *) item.lParam;// manager->findGroup(item.hItem);
- if (group!=NULL) {
- if (group->getChild()==NULL) {
+ if (group != NULL) {
+ if (group->getChild() == NULL) {
muce.cbSize = sizeof(MUCCEVENT);
muce.iType = MUCC_EVENT_QUERY_GROUPS;
muce.pszModule = manager->getModule();
@@ -920,7 +920,7 @@ static INT_PTR CALLBACK ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP LPNMTREEVIEW pnmtv = (LPNMTREEVIEW) lParam;
TVITEM item = (TVITEM) pnmtv->itemNew;
ChatGroup *group = (ChatGroup *) item.lParam;// manager->findGroup(item.hItem);
- if (group!=NULL) {
+ if (group != NULL) {
EnableWindow(GetDlgItem(manager->getChatRoomsTabHWND(), IDC_PREV), FALSE);
EnableWindow(GetDlgItem(manager->getChatRoomsTabHWND(), IDC_NEXT), FALSE);
ListView_DeleteAllItems(GetDlgItem(manager->getChatRoomsTabHWND(), IDC_ROOM));
@@ -1019,7 +1019,7 @@ static INT_PTR CALLBACK ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_MUCC_REFRESH_ROOMS:
{
ChatGroup *group = manager->getCurrentGroup();
- if (manager->getCurrentGroup()!=NULL) {
+ if (manager->getCurrentGroup() != NULL) {
EnableWindow(GetDlgItem(manager->getChatRoomsTabHWND(), IDC_PREV), FALSE);
EnableWindow(GetDlgItem(manager->getChatRoomsTabHWND(), IDC_NEXT), FALSE);
ListView_DeleteAllItems(GetDlgItem(manager->getChatRoomsTabHWND(), IDC_ROOM));
@@ -1053,13 +1053,13 @@ static INT_PTR CALLBACK ManagerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP ManagerWindow* ManagerWindow::getWindow(const char *module) {
ManagerWindow *ptr;
EnterCriticalSection(&mutex);
- for (ptr=list;ptr!=NULL;ptr=ptr->getNext()) {
- if (strcmp(ptr->getModule(), module)==0) {
+ for (ptr=list;ptr != NULL;ptr=ptr->getNext()) {
+ if (strcmp(ptr->getModule(), module) == 0) {
break;
}
}
LeaveCriticalSection(&mutex);
- if (ptr==NULL) {
+ if (ptr == NULL) {
ptr = new ManagerWindow(module);
}
return ptr;
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/ManagerWindow.h b/protocols/Tlen/tlen_czaty/src/ManagerWindow.h index f57d1c1057..afa4243cae 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/ManagerWindow.h +++ b/protocols/Tlen/tlen_czaty/src/ManagerWindow.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/Options.cpp b/protocols/Tlen/tlen_czaty/src/Options.cpp index 8e0f093ddd..0ab39dd9b0 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/Options.cpp +++ b/protocols/Tlen/tlen_czaty/src/Options.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -47,7 +47,7 @@ void Options::setListBgColor(COLORREF c) { void Options::setInputBgColor(COLORREF c) {
colorInputBg = c;
- if (brushInputBg!= NULL) {
+ if (brushInputBg != NULL) {
DeleteObject(brushInputBg);
}
brushInputBg = CreateSolidBrush(colorInputBg);
@@ -55,7 +55,7 @@ void Options::setInputBgColor(COLORREF c) { void Options::setLogBgColor(COLORREF c) {
colorLogBg = c;
- if (brushLogBg!= NULL) {
+ if (brushLogBg != NULL) {
DeleteObject(brushLogBg);
}
brushLogBg = CreateSolidBrush(colorLogBg);
@@ -191,14 +191,14 @@ int MUCCOptInit(WPARAM wParam, LPARAM lParam) odp.cbSize = sizeof(odp);
odp.position = 0;
odp.hInstance = hInst;
- odp.pszGroup = Translate("Network");
+ odp.pszGroup = LPGEN("Network");
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPTIONS);
// odp.pszTitle = muccModuleName;
- odp.pszTitle = "Tlen czaty";
+ odp.pszTitle = LPGEN("Tlen czaty");
odp.flags = ODPF_BOLDGROUPS;
odp.pfnDlgProc = MUCCOptDlgProc;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
/*
odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS_LOG);
@@ -208,19 +208,19 @@ int MUCCOptInit(WPARAM wParam, LPARAM lParam) odp.pfnDlgProc = MUCCLLogOptDlgProc;
odp.flags = ODPF_BOLDGROUPS|ODPF_EXPERTONLY;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE, wParam, (LPARAM) &odp);
+ Options_AddPage(wParam, &odp);
if (ServiceExists(MS_POPUP_ADDPOPUP)) {
ZeroMemory(&odp,sizeof(odp));
odp.cbSize = sizeof(odp);
odp.position = 100000000;
odp.hInstance = hInst;
- odp.pszGroup = Translate("PopUps");
+ odp.pszGroup = LPGEN("PopUps");
odp.pszTemplate = MAKEINTRESOURCE(IDD_OPTIONS_POPUPS);
odp.pszTitle = jabberModuleName;
odp.flags=ODPF_BOLDGROUPS;
odp.pfnDlgProc = TlenPopupsDlgProc;
odp.nIDBottomSimpleControl = 0;
- CallService(MS_OPT_ADDPAGE,wParam,(LPARAM)&odp);
+ Options_AddPage(wParam, &odp);
}
*/
@@ -289,7 +289,7 @@ static int addOption(HWND hTreeControl, HTREEITEM hParent, const char *text, int static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
int i;
- char *pszText;
+ char *pszText;
switch (msg) {
case WM_INITDIALOG:
{
@@ -402,13 +402,13 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP CheckDlgButton(hwndDlg, IDC_USETABS, Options::getChatContainerOptions() & ChatContainer::FLAG_USE_TABS);
}
- case WM_MEASUREITEM:
+ case WM_MEASUREITEM:
if (wParam == IDC_FONTLIST) {
MEASUREITEMSTRUCT *lpMis = (MEASUREITEMSTRUCT *) lParam;
- HFONT hFont, hoFont;
+ HFONT hFont, hoFont;
HDC hDC;
- SIZE fontSize;
- int iItem = lpMis->itemData - 1;
+ SIZE fontSize;
+ int iItem = lpMis->itemData - 1;
Font *font = Options::getFontSettings(iItem);
if (font != NULL) {
@@ -435,7 +435,7 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
break;
}
- case WM_DRAWITEM:
+ case WM_DRAWITEM:
if (wParam == IDC_FONTLIST) {
DRAWITEMSTRUCT *lpDis = (DRAWITEMSTRUCT *) lParam;
HFONT hFont;
@@ -477,7 +477,7 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP DeleteObject(hFont);
}
return TRUE;
- }
+ }
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_COLORTXT:
@@ -500,13 +500,13 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
break;
case IDC_LOGLIMIT:
- if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam==GetFocus()) {
+ if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) {
i = GetDlgItemInt(hwndDlg, IDC_LOGLIMIT, NULL, FALSE);
// if (i>1000) {
// i = 1000;
// SetDlgItemInt(hwndDlg, IDC_LOGLIMIT, i, FALSE);
// }
- if (i!=Options::getLogLimit()) {
+ if (i != Options::getLogLimit()) {
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}
}
@@ -528,7 +528,7 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
else {
int iItem = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETITEMDATA,
- SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETCURSEL, 0, 0), 0) - 1;
+ SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETCURSEL, 0, 0), 0) - 1;
Font *font = Options::getFontSettings(iItem);
if (font != NULL) {
SendDlgItemMessage(hwndDlg, IDC_COLORTXT, CPM_SETCOLOUR, 0, font->getColor());
@@ -540,12 +540,12 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP return TRUE;
}
case IDC_CHOOSEFONT:
- {
- CHOOSEFONT cf;
- LOGFONT lf;
- int iItem = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETCURSEL, 0, 0), 0) - 1;
- ZeroMemory(&cf, sizeof(cf));
- ZeroMemory(&lf, sizeof(lf));
+ {
+ CHOOSEFONT cf;
+ LOGFONT lf;
+ int iItem = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETITEMDATA, SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETCURSEL, 0, 0), 0) - 1;
+ ZeroMemory(&cf, sizeof(cf));
+ ZeroMemory(&lf, sizeof(lf));
Font *font = Options::getFontSettings(iItem);
if (font != NULL) {
lf.lfHeight = font->getSize();
@@ -566,9 +566,9 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (ChooseFont(&cf)) {
int totalCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETCOUNT, 0, 0);
int *selItems= new int[totalCount];
- int selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELITEMS, totalCount, (LPARAM) selItems);
- for (int i=0; i<selCount; i++) {
- int iItem = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETITEMDATA, selItems[i], 0) - 1;
+ int selCount = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETSELITEMS, totalCount, (LPARAM) selItems);
+ for (int i=0; i<selCount; i++) {
+ int iItem = SendDlgItemMessage(hwndDlg, IDC_FONTLIST, LB_GETITEMDATA, selItems[i], 0) - 1;
Font *font2 = Options::getFontSettings(iItem);
if (font2 != NULL) {
font2->setStyle((lf.lfWeight >= FW_BOLD ? Font::BOLD : 0) | (lf.lfItalic ? Font::ITALIC : 0));
@@ -591,8 +591,8 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
}
}
- return TRUE;
- }
+ return TRUE;
+ }
break;
}
break;
@@ -620,13 +620,13 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case NM_CLICK:
/* Handle checking/unchecking options here - update children and parent appropriately */
- if(((LPNMHDR)lParam)->idFrom == IDC_TREELIST) {
+ if (((LPNMHDR)lParam)->idFrom == IDC_TREELIST) {
TVHITTESTINFO hti;
hti.pt.x = (short)LOWORD(GetMessagePos());
hti.pt.y = (short)HIWORD(GetMessagePos());
ScreenToClient(((LPNMHDR)lParam)->hwndFrom, &hti.pt);
- if(TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti)) {
- if(hti.flags&TVHT_ONITEMSTATEICON) {
+ if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti)) {
+ if (hti.flags&TVHT_ONITEMSTATEICON) {
TVITEM tvi = {0};
tvi.mask = TVIF_HANDLE | TVIF_STATE;
tvi.stateMask = TVIS_STATEIMAGEMASK;
@@ -634,8 +634,8 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
tvi.state ^= INDEXTOSTATEIMAGEMASK(3);
tvi.hItem = TreeView_GetChild(((LPNMHDR)lParam)->hwndFrom, hti.hItem);
- if (tvi.hItem!=NULL) {
- while(tvi.hItem != NULL) {
+ if (tvi.hItem != NULL) {
+ while (tvi.hItem != NULL) {
TreeView_SetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
tvi.hItem=TreeView_GetNextSibling(((LPNMHDR)lParam)->hwndFrom, tvi.hItem);
}
@@ -644,7 +644,7 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (hParent != NULL) {
if ((tvi.state>>12) == 2) {
tvi.hItem = TreeView_GetNextSibling(((LPNMHDR)lParam)->hwndFrom, hti.hItem);
- while(tvi.hItem != NULL) {
+ while (tvi.hItem != NULL) {
TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
if ((tvi.state>>12) != 2) {
break;
@@ -653,7 +653,7 @@ static INT_PTR CALLBACK MUCCOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
if ((tvi.state>>12) == 2) {
tvi.hItem = TreeView_GetPrevSibling(((LPNMHDR)lParam)->hwndFrom, hti.hItem);
- while(tvi.hItem != NULL) {
+ while (tvi.hItem != NULL) {
TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom, &tvi);
if ((tvi.state>>12) != 2) {
break;
@@ -720,9 +720,9 @@ static void MailPopupPreview(DWORD colorBack, DWORD colorText, char *title, char SendDlgItemMessage(hwndDlg, IDC_COLORTXT, CPM_SETCOLOUR, 0, DBGetContactSettingDword(NULL, jabberProtoName, "MailPopupText", POPUP_DEFAULT_COLORTXT));
SetDlgItemInt(hwndDlg, IDC_DELAY, DBGetContactSettingDword(NULL, jabberProtoName, "MailPopupDelay", 4), FALSE);
delayMode = DBGetContactSettingByte(NULL, jabberProtoName, "MailPopupDelayMode", 0);
- if (delayMode==1) {
+ if (delayMode == 1) {
CheckDlgButton(hwndDlg, IDC_DELAY_CUSTOM, TRUE);
- } else if (delayMode==2) {
+ } else if (delayMode == 2) {
CheckDlgButton(hwndDlg, IDC_DELAY_PERMANENT, TRUE);
} else {
CheckDlgButton(hwndDlg, IDC_DELAY_POPUP, TRUE);
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/Options.h b/protocols/Tlen/tlen_czaty/src/Options.h index 90c57099d0..e8eb79dab5 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/Options.h +++ b/protocols/Tlen/tlen_czaty/src/Options.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/Utils.cpp b/protocols/Tlen/tlen_czaty/src/Utils.cpp index 53bddf4488..37c99a8e07 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/Utils.cpp +++ b/protocols/Tlen/tlen_czaty/src/Utils.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -30,10 +30,10 @@ static void __cdecl forkthread_r(struct FORK_ARG *fa) {
void (*callercode)(void*) = fa->threadcode;
void *arg = fa->arg;
- CallService(MS_SYSTEM_THREAD_PUSH, 0, 0);
+ Thread_Push(0);
SetEvent(fa->hEvent);
callercode(arg);
- CallService(MS_SYSTEM_THREAD_POP, 0, 0);
+ Thread_Pop();
return;
}
@@ -57,14 +57,14 @@ void Utils::copyString(char **a, const char *b) { char *oldA;
char *newA;
oldA = *a;
- if (b!=NULL) {
+ if (b != NULL) {
newA = new char[strlen(b)+1];
strcpy(newA, b);
} else {
newA = NULL;
}
*a = newA;
- if (oldA!=NULL) {
+ if (oldA != NULL) {
delete oldA;
}
@@ -72,7 +72,7 @@ void Utils::copyString(char **a, const char *b) { -MM_INTERFACE Utils::mmi;
+//MM_INTERFACE Utils::mmi;
void Utils::mucc_mir_free(void* ptr)
{
@@ -108,12 +108,12 @@ void Utils::log(const char *fmt, ...) va_end(vararg);
extra = 0;
- for (p=str; *p!='\0'; p++)
- if (*p=='\n' || *p=='\r')
+ for (p=str; *p != '\0'; p++)
+ if (*p == '\n' || *p == '\r')
extra++;
text = (char *) malloc(strlen(muccModuleName)+2+strlen(str)+2+extra);
wsprintf(text, "[%s]", muccModuleName);
- for (p=str,q=text+strlen(text); *p!='\0'; p++,q++) {
+ for (p=str,q=text+strlen(text); *p != '\0'; p++,q++) {
if (*p == '\r') {
*q = '\\';
*(q+1) = 'r';
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/Utils.h b/protocols/Tlen/tlen_czaty/src/Utils.h index 6ae4e2a44c..a9f0777145 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/Utils.h +++ b/protocols/Tlen/tlen_czaty/src/Utils.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -28,7 +28,7 @@ public: static void copyString(char **, const char *b);
static void log(const char *fmt, ...);
- static MM_INTERFACE mmi;
+// static MM_INTERFACE mmi;
static void mucc_mir_free(void*);
static char* mucc_mir_t2a(LPCTSTR);
static LPTSTR mucc_mir_a2t(const char* );
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.cpp b/protocols/Tlen/tlen_czaty/src/mucc.cpp index 8ed404c079..cca6980691 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.cpp +++ b/protocols/Tlen/tlen_czaty/src/mucc.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-#include "../commons.h"
+#include "../../src/commons.h"
#include "mucc.h"
#include "mucc_services.h"
#include "HelperDialog.h"
@@ -28,41 +28,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. char *muccModuleName;
HINSTANCE hInst;
-PLUGINLINK *pluginLink;
HANDLE hHookEvent = NULL;
HIMAGELIST hImageList = NULL;
HICON muccIcon[MUCC_ICON_TOTAL];
+int hLangpack;
static int ModulesLoaded(WPARAM wParam, LPARAM lParam);
static int PreShutdown(WPARAM wParam, LPARAM lParam);
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
-#ifdef _UNICODE
-#ifdef _X64
- "Tlen Czaty (x64, Unicode)",
-#else
- "Tlen Czaty (Unicode)",
-#endif
-#else
"Tlen Czaty",
-#endif
PLUGIN_MAKE_VERSION(MUCC_MAJOR_VERSION,MUCC_MINOR_VERSION,MUCC_RELEASE_NUM,MUCC_BUILD_NUM),
"Group chats GUI plugin for Miranda NG (formerly known as mucc.dll) (version: " MUCC_VERSION_STRING ")",
"Piotr Piastucki",
"the_leech@users.berlios.de",
"(c) 2004-2012 Piotr Piastucki",
- "http://mtlen.berlios.de",
- 0,
- 0,
-#if defined( _UNICODE )
-#ifdef _X64
- {0x9061ae31, 0x3d33, 0x49ce, { 0xaf, 0x00, 0x78, 0x9c, 0xbc, 0x25, 0xd9, 0xba }}
-#else
+ "http://miranda-ng.org/",
+ UNICODE_AWARE,
{0xadd9390c, 0x1dd4, 0x4c0d, { 0x9b, 0xa9, 0xcc, 0x76, 0x5d, 0x3d, 0xe5, 0x97 }}
-#endif
-#else
- {0x5cf4792c, 0xa050, 0x46b6, { 0xaf, 0xd0, 0x03, 0x2d, 0x6e, 0xfc, 0xd3, 0x9c }}
-#endif
};
extern "C" BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
@@ -73,10 +56,6 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvRese extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
{
- if (mirandaVersion < PLUGIN_MAKE_VERSION(0,8,0,15)) {
- MessageBox(NULL, _TEXT("The Tlen Czaty plugin cannot be loaded. It requires Miranda IM 0.8.15 or later."), _TEXT("Tlen Czaty plugin (MUCC)"), MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST);
- return NULL;
- }
return &pluginInfoEx;
}
@@ -132,7 +111,7 @@ static void LoadIcons() { }
-extern "C" int __declspec(dllexport) Load(PLUGINLINK *link)
+extern "C" int __declspec(dllexport) Load(void/*PLUGINLINK *link*/)
{
// char text[_MAX_PATH];
// char *p, *q;
@@ -146,7 +125,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) muccModuleName = "MUCC";
- pluginLink = link;
+ //pluginLink = link;
HookEvent(ME_OPT_INITIALISE, MUCCOptInit);
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
@@ -156,7 +135,7 @@ extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) CreateServiceFunction(MS_MUCC_EVENT, MUCCEvent);
hHookEvent = CreateHookableEvent(ME_MUCC_EVENT);
- mir_getMMI(&(Utils::mmi));
+ mir_getLP(&pluginInfoEx);
LoadIcons();
return 0;
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.h b/protocols/Tlen/tlen_czaty/src/mucc.h index 8dc845aa92..efb048d7ce 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc.h +++ b/protocols/Tlen/tlen_czaty/src/mucc.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -45,7 +45,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <win2k.h>
#endif
-#define MIRANDA_VER 0x0700
+#define MIRANDA_VER 0x0A00
#include <newpluginapi.h>
#include <m_system.h>
@@ -89,7 +89,7 @@ enum { };
-extern PLUGINLINK * pluginLink;
+//extern PLUGINLINK * pluginLink;
extern char *muccModuleName;
extern HINSTANCE hInst;
extern HANDLE hHookEvent;
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc_services.cpp b/protocols/Tlen/tlen_czaty/src/mucc_services.cpp index 0d4571a633..fd890dc763 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc_services.cpp +++ b/protocols/Tlen/tlen_czaty/src/mucc_services.cpp @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. int MUCCQueryChatGroups(MUCCQUERYRESULT *queryResult)
{
ManagerWindow *managerWnd=ManagerWindow::getWindow(queryResult->pszModule);
- if (managerWnd!=NULL) {
+ if (managerWnd != NULL) {
managerWnd->queryResultGroups(queryResult);
}
return 1;
@@ -34,7 +34,7 @@ int MUCCQueryChatGroups(MUCCQUERYRESULT *queryResult) int MUCCQueryChatRooms(MUCCQUERYRESULT *queryResult)
{
ManagerWindow *managerWnd=ManagerWindow::getWindow(queryResult->pszModule);
- if (managerWnd!=NULL) {
+ if (managerWnd != NULL) {
managerWnd->queryResultRooms(queryResult);
}
return 1;
@@ -43,7 +43,7 @@ int MUCCQueryChatRooms(MUCCQUERYRESULT *queryResult) int MUCCQueryUserRooms(MUCCQUERYRESULT *queryResult)
{
ManagerWindow *managerWnd=ManagerWindow::getWindow(queryResult->pszModule);
- if (managerWnd!=NULL) {
+ if (managerWnd != NULL) {
managerWnd->queryResultUserRooms(queryResult);
}
return 1;
@@ -52,7 +52,7 @@ int MUCCQueryUserRooms(MUCCQUERYRESULT *queryResult) int MUCCQueryUserNicks(MUCCQUERYRESULT *queryResult)
{
ManagerWindow *managerWnd=ManagerWindow::getWindow(queryResult->pszModule);
- if (managerWnd!=NULL) {
+ if (managerWnd != NULL) {
managerWnd->queryResultUserNick(queryResult);
}
return 1;
@@ -78,7 +78,7 @@ INT_PTR MUCCQueryResult(WPARAM wParam, LPARAM lParam) case MUCC_EVENT_QUERY_CONTACTS:
case MUCC_EVENT_QUERY_USERS:
chatWindow=ChatWindow::getWindow(queryResult->pszModule, queryResult->pszParent);
- if (chatWindow!=NULL) {
+ if (chatWindow != NULL) {
SendMessage(chatWindow->getHWND(), DM_CHAT_QUERY, (WPARAM) 0, (LPARAM) queryResult);
}
break;
@@ -117,13 +117,13 @@ INT_PTR MUCCEvent(WPARAM wParam, LPARAM lParam) case MUCC_EVENT_LEAVE:
case MUCC_EVENT_TOPIC:
chatWindow = ChatWindow::getWindow(mucEvent->pszModule, mucEvent->pszID);
- if (chatWindow!=NULL) {
+ if (chatWindow != NULL) {
SendMessage(chatWindow->getHWND(), DM_CHAT_EVENT, (WPARAM) 0, (LPARAM) mucEvent);
}
break;
case MUCC_EVENT_ERROR:
chatWindow = ChatWindow::getWindow(mucEvent->pszModule, mucEvent->pszID);
- if (chatWindow!=NULL) {
+ if (chatWindow != NULL) {
SendMessage(chatWindow->getHWND(), DM_CHAT_EVENT, (WPARAM) 0, (LPARAM) mucEvent);
} else {
HelperDialog::errorDlg(mucEvent);
diff --git a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc_services.h b/protocols/Tlen/tlen_czaty/src/mucc_services.h index f1db38274b..6829203aea 100644 --- a/plugins/!NotAdopted/Tlen/tlen_czaty/mucc_services.h +++ b/protocols/Tlen/tlen_czaty/src/mucc_services.h @@ -1,6 +1,6 @@ /*
-MUCC Group Chat GUI Plugin for Miranda IM
+MUCC Group Chat GUI Plugin for Miranda NG
Copyright (C) 2004 Piotr Piastucki
This program is free software; you can redistribute it and/or
diff --git a/protocols/Tlen/tlen_czaty/src/resource.h b/protocols/Tlen/tlen_czaty/src/resource.h new file mode 100644 index 0000000000..04ef97014f --- /dev/null +++ b/protocols/Tlen/tlen_czaty/src/resource.h @@ -0,0 +1,218 @@ +/*
+
+MUCC Group Chat GUI Plugin for Miranda NG
+Copyright (C) 2004 Piotr Piastucki
+
+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.
+
+*/
+#define IDI_CHAT 100
+#define IDI_ITALIC 101
+#define IDI_BOLD 102
+#define IDI_UNDERLINE 103
+#define IDI_OPTIONS 104
+#define IDI_OWNER 105
+#define IDI_ADMIN 106
+#define IDI_REGISTERED 107
+#define IDI_R_MODERATED 108
+#define IDI_R_MEMBERS 109
+#define IDI_R_ANONYMOUS 110
+#define IDI_SEARCH 111
+#define IDI_PREV 112
+#define IDI_NEXT 113
+#define IDI_BLANK 114
+#define IDI_INVITE 115
+#define IDI_ADMINISTRATION 116
+#define IDI_GLOBALOWNER 117
+#define IDI_SMILEY 118
+#define IDI_MESSAGE 119
+
+#define IDD_CHATMANAGER 150
+#define IDD_GROUPCHAT_LOG 151
+#define IDD_HELPER_JOIN 152
+#define IDD_HELPER_INPUT 153
+#define IDD_HELPER_INVITE 154
+#define IDD_HELPER_INVITE_ACCEPT 155
+#define IDD_HELPER_TOPIC 156
+#define IDD_OPTIONS 157
+#define IDD_OPT_POPUPS 158
+#define IDD_TAB_CHATROOMS 159
+#define IDD_TAB_MYROOMS 160
+#define IDD_TAB_MYNICKNAMES 161
+#define IDD_USER_ADMIN 162
+#define IDD_USER_KICK 163
+#define IDD_USER_ROLE 164
+#define IDD_USER_BROWSER 165
+#define IDD_GROUPCHAT_CONTAINER 166
+
+#define IDR_CHATOPTIONS 200
+#define IDR_CONTEXT 201
+
+#define IDC_FONTLIST 1000
+#define IDC_COLORINPUT 1001
+#define IDC_COLORBKG 1002
+#define IDC_COLORLIST 1003
+#define IDC_COLORTXT 1004
+#define IDC_CHOOSEFONT 1005
+#define IDC_FONTSGB 1006
+#define IDC_OPTIONSGB 1007
+#define IDC_LOGLIMITSPIN 1008
+#define IDC_LOGLIMIT 1009
+#define IDC_SENDONENTER 1010
+#define IDC_USETABS 1011
+#define IDC_ENABLEIEVIEW 1012
+#define IDC_REGISTER 1020
+#define IDC_NAME 1021
+#define IDC_FRAME 1037
+#define IDC_SIMPLE 1041
+#define IDC_PASSWORD 1050
+#define IDC_JID 1051
+#define IDC_COUNTRY 1060
+#define IDC_NICKNAME 1062
+#define IDC_MSG 1084
+#define IDC_TITLE 1089
+#define IDC_DESC 1090
+#define IDC_DELETE 1092
+#define IDC_LOAD 1093
+#define IDC_JOIN 1123
+#define IDC_ROOM 1124
+#define IDC_ROOM_LABEL 1125
+#define IDC_BROWSE 1126
+#define IDC_VSCROLL 1128
+#define IDC_NICK 1129
+#define IDC_NICK_LABEL 1130
+#define IDC_EDIT 1131
+#define IDC_TREELIST 1132
+#define IDC_LIST 1133
+#define IDC_HSPLIT 1134
+#define IDC_LOG 1136
+#define IDC_VSPLIT 1137
+#define IDC_SET 1140
+#define IDC_TABS 1141
+#define IDC_TOPIC 1141
+#define IDC_TOPIC_BUTTON 1142
+#define IDC_FONT 1143
+#define IDC_ENTER 1144
+#define IDC_CTRLENTER 1145
+#define IDC_FLASH 1148
+#define IDC_TIME 1156
+#define IDC_DATE 1157
+#define IDC_REASON 1171
+#define IDC_USER 1172
+#define IDC_INVITE 1173
+#define IDC_ACCEPT 1174
+#define IDC_FROM 1175
+#define IDC_DELAY 1180
+#define IDC_PREVIEW 1183
+#define IDC_ENABLEPOPUP 1184
+#define IDC_DELAY_PERMANENT 1185
+#define IDC_DELAY_CUSTOM 1186
+#define IDC_DELAY_POPUP 1187
+#define IDC_GROUP 1203
+#define IDC_BOLD 1204
+#define IDC_SMILEY 1205
+#define IDC_UNDERLINE 1205
+#define IDC_ITALIC 1206
+#define IDC_COLOR 1207
+#define IDC_OPTIONS 1208
+#define IDC_SMILEYBTN 1209
+#define IDC_CHECK_PERMANENT 1210
+#define IDC_CHECK_PUBLIC 1211
+#define IDC_CHECK_NICKNAMES 1212
+#define IDC_CHECK_MEMBERS 1213
+#define IDC_NEXT 1214
+#define IDC_PREV 1215
+#define IDC_FONTSIZE 1215
+#define IDC_SEARCH 1216
+#define IDC_REFRESH 1216
+#define IDC_REMOVE 1217
+#define IDC_KICK_OPTIONS 1218
+#define IDC_ROLE_OPTIONS 1219
+#define IDC_KICK 1220
+#define IDC_SET_ROLE 1221
+#define IDC_UPDATE 1313
+#define IDC_STATUS 1414
+#define IDC_PLAN 1415
+#define IDC_SHOW 1416
+
+#define IDC_PERSONALGROUP 1434
+#define IDC_EXTRAGROUP 1436
+
+#define ID_OPTIONMENU_SHOWNICKNAMES 40001
+#define ID_OPTIONMENU_MSGINNEWLINE 40002
+#define ID_OPTIONMENU_SHOWTIMESTAMP 40011
+#define ID_OPTIONMENU_SHOWDATE 40012
+#define ID_OPTIONMENU_SHOWSECONDS 40013
+#define ID_OPTIONMENU_USELONGDATE 40014
+#define ID_OPTIONMENU_FORMATFONT 40021
+#define ID_OPTIONMENU_FORMATSIZE 40022
+#define ID_OPTIONMENU_FORMATCOLOR 40023
+#define ID_OPTIONMENU_FORMATSTYLE 40024
+#define ID_OPTIONMENU_LOGMESSAGES 40031
+#define ID_OPTIONMENU_LOGJOINED 40032
+#define ID_OPTIONMENU_LOGLEFT 40033
+#define ID_OPTIONMENU_LOGTOPIC 40034
+#define ID_OPTIONMENU_FLASHMESSAGES 40035
+#define ID_OPTIONMENU_FLASHJOINED 40036
+#define ID_OPTIONMENU_FLASHLEFT 40037
+#define ID_OPTIONMENU_FLASHTOPIC 40038
+#define ID_OPTIONMENU_SAVEDEFAULT 40040
+#define ID_USERMENU_MESSAGE 40050
+#define ID_USERMENU_KICK_POPUP 40051
+#define ID_USERMENU_KICK_NO_BAN 40052
+#define ID_USERMENU_KICK_BAN_1_MIN 40053
+#define ID_USERMENU_KICK_BAN_5_MIN 40054
+#define ID_USERMENU_KICK_BAN_15_MIN 40055
+#define ID_USERMENU_KICK_BAN_30_MIN 40056
+#define ID_USERMENU_KICK_BAN_1_H 40057
+#define ID_USERMENU_KICK_BAN_6_H 40058
+#define ID_USERMENU_KICK_BAN_1_D 40059
+#define ID_USERMENU_KICK_BAN_3_D 40060
+#define ID_USERMENU_KICK_BAN_1_W 40061
+#define ID_USERMENU_KICK_BAN_2_W 40062
+#define ID_USERMENU_KICK_BAN_4_W 40063
+#define ID_USERMENU_RIGHTS_NO 40065
+#define ID_USERMENU_RIGHTS_MEMBER 40066
+#define ID_USERMENU_RIGHTS_ADMIN 40067
+#define ID_USERMENU_ADMINISTRATION 40070
+#define ID_USERMENU_UNBAN 40071
+#define ID_ADMINMENU_DESTROY 40080
+#define ID_ADMINMENU_ADMIN 40081
+#define ID_ADMINMENU_BROWSE 40082
+#define ID_ADMINMENU_SAVELOG 40083
+
+#define IDM_CUT 40000
+#define IDM_COPY 40001
+#define IDM_PASTE 40002
+#define IDM_UNDO 40003
+#define IDM_DELETE 40004
+#define IDM_REDO 40005
+#define IDM_COPYALL 40011
+#define IDM_SELECTALL 40012
+#define IDM_CLEAR 40013
+#define IDM_OPENNEW 40014
+#define IDM_OPENEXISTING 40015
+#define IDM_COPYLINK 40016
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 205
+#define _APS_NEXT_COMMAND_VALUE 40090
+#define _APS_NEXT_CONTROL_VALUE 1217
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
|